Structure API is a set of separate functions for working with structure.json.
npm i @ewizardjs/structure
Note: You can also use the api from ewizardjs
In your .ts/js files:
import { getSlides, getFlatSlides, getVisibleSlides, getFlatVisibleSlides, getHiddenSlides, getFlatHiddenSlides, getArchivedSlides, getSlide, getChapters, getHiddenChapters, getChapter, getChapterSlides, getSlideSubslides, getStartSlide, getStoryboard, StructureApi, getStructureFileVersion, getVisibleChapters, getFlatSlide, } from '@ewizardjs/structure';
In your content (.vue files):
this.$structure.someMethod()
Note: in order to get the values in the thumbnail field when calling the corresponding methods, they need to pass a fragment of the systemSettings object
- SlideType
-
type:
string
-
values:
visible
,hidden
,archived
-
type:
- ChapterType
-
type:
string
-
values:
visible
,hidden
-
type:
- SlideTypes
- type: Object
-
value:
{ visible: boolean; hidden: boolean; archived: boolean; }
- ChapterTypes
- type: Object
-
value:
{ visible: boolean; hidden: boolean; }
- SlideData
- type: Object
-
value:
{ id: string; name: string; chapter: string | undefined; type: SlideType; thumbnail?: string; template?: string; }
- FlatSlideData
- type: Object
-
value:
{ id: string; name: string; chapter: string | undefined; type: SlideType; thumbnail?: string; template?: string; isSubslide: boolean; parentSlide?: string; }
- NestedSlideData
- type: Object
-
value:
{ id: string; name: string; chapter: string | undefined; type: SlideType; thumbnail?: string; template?: string; subslides: SlideData[]; }
- ChapterData
- type: Object
-
value:
{ id: string; name: string; type: ChapterType; }
- NestedChapterData
- type: Object
-
value:
{ id: string; name: string; type: ChapterType; slides: NestedSlideData[]; }
- SystemSettingsSlideFragment
- type: Object
-
value:
{ path: { slides: string, slide: { thumbnail: string } } }
- StartSlide
- type: Object
-
value:
{ slide?: string; chapter?: string; }
-
getSlides
- args:
- structureJson
type:StructureV2.iStructureJSON
,
optional:false
- slideTypes
type:SlideTypes
optional:true
- systemSettings
type:SystemSettingsSlideFragment
optional:true
- structureJson
- return
- type:
Array
, - value: Array of
NestedSlideData
- type:
- args:
-
getFlatSlides
- args:
- structureJson
type:StructureV2.iStructureJSON
,
optional:false
- slideTypes
type:SlideTypes
optional:true
- systemSettings
type:SystemSettingsSlideFragment
optional:true
- structureJson
- return
- type:
Array
, - value: Array of
FlatSlideData
- type:
- args:
-
getVisibleSlides
- args:
- structureJson
type:StructureV2.iStructureJSON
,
optional:false
- systemSettings
type:SystemSettingsSlideFragment
optional:true
- structureJson
- return
- type:
Array
, - value: Array of
NestedSlideData
- type:
- args:
-
getFlatVisibleSlides
- args:
- structureJson
type:StructureV2.iStructureJSON
,
optional:false
- systemSettings
type:SystemSettingsSlideFragment
optional:true
- structureJson
- return
- type:
Array
, - value: Array of
FlatSlideData
- type:
- args:
-
getHiddenSlides
- args:
- structureJson
type:StructureV2.iStructureJSON
,
optional:false
- systemSettings
type:SystemSettingsSlideFragment
optional:true
- structureJson
- return
- type:
Array
, - value: Array of
NestedSlideData
- type:
- args:
-
getFlatHiddenSlides
- args:
- structureJson
type:StructureV2.iStructureJSON
,
optional:false
- systemSettings
type:SystemSettingsSlideFragment
optional:true
- structureJson
- return
- type:
Array
, - value: Array of
FlatSlideData
- type:
- args:
-
getArchivedSlides
- args:
- structureJson
type:StructureV2.iStructureJSON
,
optional:false
- systemSettings
type:SystemSettingsSlideFragment
optional:true
- structureJson
- return
- type:
Array
, - value: Array of
NestedSlideData
- type:
- args:
-
getSlide
- args:
- structureJson
type:StructureV2.iStructureJSON
,
optional:false
- slideId
type:string
optional:false
- systemSettings
type:SystemSettingsSlideFragment
optional:true
- structureJson
- return
- type:
Object
, - value:
NestedSlideData
- type:
- args:
-
getFlatSlide
- args:
- structureJson
type:StructureV2.iStructureJSON
,
optional:false
- slideId
type:string
optional:false
- systemSettings
type:SystemSettingsSlideFragment
optional:true
- structureJson
- return
- type:
Object
, - value:
FlatSlideData
- type:
- args:
-
getChapters
- args:
- structureJson
type:StructureV2.iStructureJSON
,
optional:false
- chapterTypes
type:ChapterTypes
optional:true
- structureJson
- return
- type:
Array
, - value: Array of
ChapterData
- type:
- args:
-
getHiddenChapters
- args:
- structureJson
type:StructureV2.iStructureJSON
,
optional:false
- structureJson
- return
- type:
Array
, - value: Array of
ChapterData
- type:
- args:
-
getVisibleChapters
- args:
- structureJson
type:StructureV2.iStructureJSON
,
optional:false
- structureJson
- return
- type:
Array
, - value: Array of
ChapterData
- type:
- args:
-
getChapter
- args:
- structureJson
type:StructureV2.iStructureJSON
,
optional:false
- chapterId
type:string
optional:false
- structureJson
- return
- type:
Object
, - value:
ChapterData
- type:
- args:
-
getChapterSlides
- args:
- structureJson
type:StructureV2.iStructureJSON
,
optional:false
- chapterId
type:string
optional:false
- slideTypes
type:SlideTypes
optional:true
- systemSettings
type:SystemSettingsSlideFragment
optional:true
- structureJson
- return
- type:
Array
, - value: Array of
SlideData
- type:
- args:
-
getSlideSubslides
- args:
- structureJson
type:StructureV2.iStructureJSON
,
optional:false
- slideId
type:StructureV2.iStructureJSON
,
optional:false
- slideTypes
type:SlideTypes
optional:true
- systemSettings
type:SystemSettingsSlideFragment
optional:true
- structureJson
- return
- type:
Array
, - value: Array of
SlideData
- type:
- args:
-
getStartSlide
- args:
- structureJson
type:StructureV2.iStructureJSON
,
optional:false
- structureJson
- return
- type:
Object
, - value:
StartSlide
- type:
- args:
-
getStoryboard
- args:
- structureJson
type:StructureV2.iStructureJSON
,
optional:false
- chapterTypes
type:ChapterTypes
optional:true
- systemSettings
type:SystemSettingsSlideFragment
optional:true
- structureJson
- return
- type:
Array
, - value: Array of
NestedChapterData
- type:
- args:
-
getStructureFileVersion
- args:
- structureJson
type:StructureV2.iStructureJSON
,
optional:false
- structureJson
- return
- type:
Number
, - value:
1
or2
- type:
- args: