Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101480219
RsgSection.d.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Feb 10, 21:02
Size
1 KB
Mime Type
text/x-java
Expires
Wed, Feb 12, 21:02 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24160070
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
RsgSection.d.ts
View Options
/// <reference types="react" />
import { RequireItResult } from './RsgRequireItResult';
import { MarkdownExample, Example } from './RsgExample';
import { LoaderComponent, ExpandMode, Component } from './RsgComponent';
export interface BaseSection {
name?: string;
slug?: string;
ignore?: string | string[];
description?: string;
exampleMode?: ExpandMode;
usageMode?: ExpandMode;
href?: string;
sectionDepth?: number;
external?: boolean;
expand?: boolean;
}
export interface ProcessedSection extends BaseSection {
visibleName?: string;
filepath?: string;
externalLink?: boolean;
href?: string;
}
/**
* Section used on the client in javascript
* It is the output of the function `client/utils/processSection`
*/
export interface Section extends ProcessedSection {
content?: Example[] | string;
components?: Component[];
sections?: Section[];
}
/**
* Item of the Table Of Contents used in
* ComponentsList
* TableOfContent
* filterSectionByName
*/
export interface TOCItem extends ProcessedSection {
heading?: boolean;
shouldOpenInNewTab?: boolean;
selected?: boolean;
initialOpen?: boolean;
forcedOpen?: boolean;
content?: React.ReactNode;
components?: TOCItem[];
sections?: TOCItem[];
}
/**
* Used in the config file and at the early stages of processing
* in `schema/config.ts` this is the type that is used
*/
export interface ConfigSection extends BaseSection {
components?: string | string[] | (() => string[]);
sections?: ConfigSection[];
content?: string;
}
/**
* Type returned when sections are transformed to their webpack
* loadable equivalents
*/
export interface LoaderSection extends BaseSection {
slug?: string;
content?: RequireItResult | MarkdownExample;
components: LoaderComponent[];
sections: LoaderSection[];
}
Event Timeline
Log In to Comment