@pitcher/js-api 1.23.0 → 1.24.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/js-api.esm.js +18 -0
- package/js-api.esm.js.map +1 -1
- package/js-api.umd.min.js +9 -9
- package/js-api.umd.min.js.map +1 -1
- package/lib/apps/agenda-selector/App.vue.d.ts +9 -0
- package/lib/apps/agenda-selector/components/AgendaGroup.vue.d.ts +7 -0
- package/lib/apps/agenda-selector/components/AgendaItem.vue.d.ts +29 -0
- package/lib/apps/agenda-selector/components/AgendaToolbar.vue.d.ts +2 -0
- package/lib/apps/agenda-selector/components/AppFooter.vue.d.ts +8 -0
- package/lib/apps/agenda-selector/components/AppHeader.vue.d.ts +6 -0
- package/lib/apps/agenda-selector/components/modals/ApplicationBlockSelectorModal.vue.d.ts +8 -0
- package/lib/apps/agenda-selector/components/modals/MoveItemModal.vue.d.ts +15 -0
- package/lib/apps/agenda-selector/composables/application-block-selector-modal.use.d.ts +17 -0
- package/lib/apps/agenda-selector/composables/move-item-modal.use.d.ts +128 -0
- package/lib/apps/agenda-selector/composables/table-input.use.d.ts +15 -0
- package/lib/apps/agenda-selector/stores/app.store.d.ts +32 -0
- package/lib/apps/agenda-selector/types/agenda.type.d.ts +28 -0
- package/lib/apps/agenda-selector/types/common.type.d.ts +8 -0
- package/lib/apps/agenda-selector/types/move-item-modal.type.d.ts +5 -0
- package/lib/apps/agenda-selector/utils/data.util.d.ts +14 -0
- package/lib/apps/agenda-selector/utils/theme-overrides.util.d.ts +8 -0
- package/lib/apps/browser/App.vue.d.ts +3 -1
- package/lib/apps/browser/components/UploadFilesDropzone/UploadFilesDropzone.vue.d.ts +5 -1
- package/lib/apps/browser/stores/api.d.ts +28 -6
- package/lib/apps/browser/stores/upload.d.ts +12 -12
- package/lib/apps/canvas-builder/App.vue.d.ts +56 -32
- package/lib/apps/canvas-builder/components/container/EditableComponent/EditableComponent.vue.d.ts +9 -0
- package/lib/apps/canvas-builder/components/container/EditableComponent/EditableComponentActionToolbar.vue.d.ts +10 -10
- package/lib/apps/canvas-builder/components/container/EditableComponent/EditableComponentLegacy.vue.d.ts +9 -0
- package/lib/apps/canvas-builder/components/container/EditableComponent/EditableComponentRevamp.vue.d.ts +13 -0
- package/lib/apps/canvas-builder/components/container/EditableComponent/ResizeHandles.vue.d.ts +23 -0
- package/lib/apps/canvas-builder/components/ui/Block/Block.helpers.d.ts +2 -0
- package/lib/apps/canvas-builder/components/ui/Block/Block.types.d.ts +7 -0
- package/lib/apps/canvas-builder/components/ui/{CollectionPlayer/CollectionSelector.vue.d.ts → Block/BlockToolbar.vue.d.ts} +6 -11
- package/lib/apps/canvas-builder/components/ui/CollectionPlayer/CollectionPlayer.vue.d.ts +4 -3
- package/lib/apps/canvas-builder/components/ui/CollectionPlayer/{CollectionPlayer.edit.vue.d.ts → CollectionPlayerEmpty.vue.d.ts} +5 -5
- package/lib/apps/canvas-builder/components/ui/Multimedia/Multimedia.raw.vue.d.ts +3 -1
- package/lib/apps/canvas-builder/components/ui/Multimedia/Multimedia.vue.d.ts +4 -5
- package/lib/apps/canvas-builder/components/ui/Scribble/Scribble.vue.d.ts +34 -0
- package/lib/apps/canvas-builder/components/ui/Scribble/scribble.helpers.d.ts +5 -0
- package/lib/apps/canvas-builder/components/ui/SectionList/SectionSelector.helpers.d.ts +6 -1
- package/lib/apps/canvas-builder/components/ui/SectionList/SectionSelectorSelected.vue.d.ts +2 -2
- package/lib/apps/canvas-builder/composables/useCanvas.d.ts +519 -439
- package/lib/apps/canvas-builder/composables/useCanvasBlocks.d.ts +117 -94
- package/lib/apps/canvas-builder/composables/useCanvasDnd.d.ts +1 -1
- package/lib/apps/canvas-builder/composables/useCanvasHistory.d.ts +104 -86
- package/lib/apps/canvas-builder/composables/useCanvasPages.d.ts +1 -1
- package/lib/apps/canvas-builder/composables/useCanvasSectionOverrides.d.ts +1 -1
- package/lib/apps/canvas-builder/composables/useCanvasTheme.d.ts +38 -0
- package/lib/apps/canvas-builder/composables/useCanvasVisibility.d.ts +1 -1
- package/lib/apps/canvas-builder/composables/useCollectionSelector.d.ts +9 -0
- package/lib/apps/canvas-builder/composables/useComponentStyle.d.ts +22 -0
- package/lib/apps/canvas-builder/composables/useContentSelector.d.ts +5 -14
- package/lib/apps/canvas-builder/composables/useCrmShape.d.ts +28 -0
- package/lib/apps/canvas-builder/composables/useReorderComponent.d.ts +4 -2
- package/lib/apps/canvas-builder/types/canvas.d.ts +22 -31
- package/lib/apps/canvas-builder/util/canvas.util.d.ts +6 -5
- package/lib/apps/canvas-builder/util/url.d.ts +1 -0
- package/lib/apps/canvas-selector/stores/app.d.ts +28 -0
- package/lib/apps/collection-player/App.vue.d.ts +33 -0
- package/lib/apps/collection-player/components/AppFooter.vue.d.ts +2 -0
- package/lib/apps/collection-player/components/AppHeader.vue.d.ts +2 -0
- package/lib/apps/collection-player/components/AppWrapper.vue.d.ts +17 -0
- package/lib/apps/collection-player/components/MainContent.vue.d.ts +2 -0
- package/lib/apps/{canvas-builder/components/ui/CollectionPlayer → collection-player}/components/MainImage.vue.d.ts +3 -3
- package/lib/apps/collection-player/components/TableOfContents.vue.d.ts +2 -0
- package/lib/apps/collection-player/composables/focus-trap.use.d.ts +9 -0
- package/lib/apps/collection-player/composables/fullscreen.use.d.ts +10 -0
- package/lib/apps/{canvas-builder/components/ui/CollectionPlayer/composables/gestures.use.d.ts → collection-player/composables/moving-group-gestures.use.d.ts} +6 -3
- package/lib/apps/collection-player/composables/slide-direction.use.d.ts +11 -0
- package/lib/apps/collection-player/composables/tracking.use.d.ts +10 -0
- package/lib/apps/{canvas-builder/components/ui/CollectionPlayer → collection-player}/composables/zoom.use.d.ts +2 -2
- package/lib/apps/collection-player/export.d.ts +3 -0
- package/lib/apps/collection-player/stores/app.store.d.ts +77 -0
- package/lib/apps/collection-player/types/collection-player.type.d.ts +26 -0
- package/lib/apps/collection-player/utils/node.util.d.ts +4 -0
- package/lib/apps/collection-player/utils/slide-type.util.d.ts +5 -0
- package/lib/apps/collection-selector/App.vue.d.ts +29 -0
- package/lib/apps/collection-selector/components/AppFooter.vue.d.ts +8 -0
- package/lib/apps/collection-selector/components/AppHeader.vue.d.ts +6 -0
- package/lib/apps/collection-selector/components/CollectionGroup.vue.d.ts +7 -0
- package/lib/apps/collection-selector/components/CollectionItem.vue.d.ts +21 -0
- package/lib/apps/collection-selector/components/CollectionToolbar.vue.d.ts +2 -0
- package/lib/apps/{canvas-builder/components/ui/CollectionPlayer/CollectionGroupSelector.vue.d.ts → collection-selector/components/modals/MoveSlideModal.vue.d.ts} +7 -13
- package/lib/apps/collection-selector/composables/move-slide-modal.use.d.ts +106 -0
- package/lib/apps/collection-selector/composables/table-input.use.d.ts +15 -0
- package/lib/apps/collection-selector/stores/app.store.d.ts +156 -0
- package/lib/apps/collection-selector/types/collection-selector.type.d.ts +12 -0
- package/lib/apps/collection-selector/types/common.type.d.ts +18 -0
- package/lib/apps/collection-selector/types/move-slide-modal.type.d.ts +5 -0
- package/lib/apps/collection-selector/utils/content-selector-adapter.util.d.ts +41 -0
- package/lib/apps/collection-selector/utils/data.util.d.ts +23 -0
- package/lib/apps/collection-selector/utils/theme-overrides.util.d.ts +8 -0
- package/lib/apps/content-selector/appTypes.d.ts +7 -29
- package/lib/apps/content-selector/components/Content/ActionsToolbar/ActionsToolbar.vue.d.ts +2 -0
- package/lib/apps/content-selector/components/Content/AllContent/List/FoldersFilesListItem.vue.d.ts +6 -3
- package/lib/apps/content-selector/stores/api.d.ts +252 -0
- package/lib/apps/content-selector/stores/app.d.ts +42 -7
- package/lib/components/CBackgroundImageThemeOptions/CBackgroundImageThemeOptions.vue.d.ts +42 -0
- package/lib/components/CCanvasSelector/CCanvasSelector.vue.d.ts +3 -0
- package/lib/components/CComponentListItem/CComponentListItem.vue.d.ts +9 -2
- package/lib/components/CComponentThemeOptions/CComponentThemeOptions.vue.d.ts +55 -15
- package/lib/components/CDataTable/CDataTableEdit.use.d.ts +1 -1
- package/lib/components/CFileViewer/pdf/CFileViewerCopyPagesMetadata.pdf.vue.d.ts +5 -1
- package/lib/components/CGlobalSearch/CGlobalSearch.vue.d.ts +3 -2
- package/lib/components/CIcon/CIcon.vue.d.ts +1 -0
- package/lib/components/CInfoBadge/CInfoBadge.vue.d.ts +1 -1
- package/lib/components/CRichTextEditor/CRichTextEditor.vue.d.ts +8 -0
- package/lib/components/CRichTextEditor/components/CContentLinkToolbar.vue.d.ts +8 -0
- package/lib/components/CRichTextEditor/components/CEditorMenu.vue.d.ts +8 -0
- package/lib/components/CRichTextEditor/extensions/contentLink.d.ts +9 -3
- package/lib/components/CSearch/CSearchOnClick.vue.d.ts +15 -1
- package/lib/components/CSearchFilters/CSearchFilters.types.d.ts +5 -0
- package/lib/components/CSearchFilters/CSearchFilters.vue.d.ts +22 -1
- package/lib/components/CSingleFileSelector/CSingleFileSelector.vue.d.ts +9 -3
- package/lib/components/CTable/CTable.vue.d.ts +2 -2
- package/lib/components/CTableColumnsSettings/CTableColumnsSettings.vue.d.ts +2 -2
- package/lib/components/CTableTag/CTableTag.vue.d.ts +1 -1
- package/lib/components/canvas-blocks/CBlockManagement.vue.d.ts +6 -6
- package/lib/components/canvas-templates/CTemplateManagement.vue.d.ts +39 -54
- package/lib/components/canvas-templates/CTemplateManagementToolbar.vue.d.ts +26 -35
- package/lib/components/savedCanvases/CSavedCanvasesManagement.vue.d.ts +32 -43
- package/lib/components/savedCanvases/CSavedCanvasesManagementShareCanvas.use.d.ts +1 -0
- package/lib/components/savedCanvases/CSavedCanvasesManagementToolbar.vue.d.ts +25 -33
- package/lib/components/savedCanvases/smartFolders/SmartFolders.use.d.ts +11 -6
- package/lib/components/sections/CSectionManagement.vue.d.ts +6 -6
- package/lib/composables/useConfirmation.d.ts +1 -0
- package/lib/composables/useToast.d.ts +6 -5
- package/lib/constants/appsDb.const.d.ts +2 -0
- package/lib/main.lib.d.ts +10 -0
- package/lib/sdk/api/modules/admin/types.admin.d.ts +20 -1
- package/lib/sdk/api/modules/ui/content.ui.d.ts +31 -1
- package/lib/sdk/api/modules/ui/index.d.ts +2 -0
- package/lib/sdk/api/modules/ui/types.ui.d.ts +29 -2
- package/lib/sdk/interfaces.d.ts +6 -0
- package/lib/sdk/main.d.ts +6 -0
- package/lib/types/app.d.ts +1 -1
- package/lib/types/background.d.ts +5 -0
- package/lib/types/common.d.ts +2 -0
- package/lib/types/instanceSettings.types.d.ts +2 -0
- package/lib/types/launchDarkly.types.d.ts +3 -1
- package/lib/types/organizationSettings.types.d.ts +1 -1
- package/lib/types/selections.d.ts +19 -0
- package/lib/util/eval.d.ts +1 -0
- package/package.json +1 -1
- package/types/openapi/index.d.ts +2 -0
- package/types/openapi/models/Canvas.d.ts +2 -0
- package/types/openapi/models/CanvasCreate.d.ts +2 -0
- package/types/openapi/models/CanvasRecommendedFile.d.ts +4 -0
- package/types/openapi/models/CanvasRetrieve.d.ts +2 -0
- package/types/openapi/models/CanvasUpdate.d.ts +2 -0
- package/types/openapi/models/DeletedCanvas.d.ts +2 -0
- package/types/openapi/models/DeletedFavorite.d.ts +2 -2
- package/types/openapi/models/DeletedFile.d.ts +4 -0
- package/types/openapi/models/Favorite.d.ts +2 -2
- package/types/openapi/models/FavoriteCreate.d.ts +2 -2
- package/types/openapi/models/FavoriteFolder.d.ts +6 -0
- package/types/openapi/models/FavoriteFolderRequest.d.ts +3 -0
- package/types/openapi/models/FavoriteUpdate.d.ts +2 -2
- package/types/openapi/models/File.d.ts +4 -0
- package/types/openapi/models/FileCreate.d.ts +4 -0
- package/types/openapi/models/FileRetrieve.d.ts +4 -0
- package/types/openapi/models/FileUpdate.d.ts +4 -0
- package/types/openapi/models/SearchCanvas.d.ts +1 -0
- package/lib/apps/canvas-builder/components/ui/CollectionPlayer/CollectionListItem.vue.d.ts +0 -37
- package/lib/apps/canvas-builder/components/ui/CollectionPlayer/CollectionPlayer.raw.vue.d.ts +0 -19
- package/lib/apps/canvas-builder/components/ui/CollectionPlayer/composables/tracking.use.d.ts +0 -4
- package/lib/apps/canvas-builder/components/ui/CollectionPlayer/utils/type.util.d.ts +0 -5
- package/lib/apps/canvas-builder/composables/useCollectionPlayer.d.ts +0 -31
- /package/lib/apps/{canvas-builder/components/ui/CollectionPlayer → collection-player}/composables/arrow-keys.use.d.ts +0 -0
- /package/lib/apps/{canvas-builder/components/ui/CollectionPlayer → collection-player}/composables/image-cache.use.d.ts +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CollectionSlide } from '../types/collection-player.type';
|
|
2
2
|
declare const _default: import('vue').DefineComponent<{
|
|
3
3
|
fitToContainerWidth: boolean;
|
|
4
4
|
isActive: boolean;
|
|
5
5
|
zoom: number;
|
|
6
|
-
item:
|
|
6
|
+
item: CollectionSlide;
|
|
7
7
|
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
8
8
|
fitToContainerWidth: boolean;
|
|
9
9
|
isActive: boolean;
|
|
10
10
|
zoom: number;
|
|
11
|
-
item:
|
|
11
|
+
item: CollectionSlide;
|
|
12
12
|
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
type UseFocusTrapOptions = {
|
|
3
|
+
preventFocusLostOnly: boolean;
|
|
4
|
+
};
|
|
5
|
+
export default function useFocusTrap(element: Ref<HTMLElement | null>, options?: UseFocusTrapOptions): {
|
|
6
|
+
enable: () => void;
|
|
7
|
+
disable: () => void;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
type FullscreenPayload = {
|
|
3
|
+
rootElement: Ref<HTMLElement | null>;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: ({ rootElement }: FullscreenPayload) => {
|
|
6
|
+
isFullscreen: Ref<boolean, boolean>;
|
|
7
|
+
enterFullscreen: () => void;
|
|
8
|
+
exitFullscreen: () => void;
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { UseSwipeDirection } from '@vueuse/core';
|
|
3
|
+
import { AxisDirection } from './slide-direction.use';
|
|
3
4
|
declare const _default: (element: Ref<HTMLElement | null>, actions: {
|
|
4
|
-
onSwipeLeft
|
|
5
|
-
onSwipeRight
|
|
6
|
-
|
|
5
|
+
onSwipeLeft?: () => void;
|
|
6
|
+
onSwipeRight?: () => void;
|
|
7
|
+
onSwipeUp?: () => void;
|
|
8
|
+
onSwipeDown?: () => void;
|
|
9
|
+
}, slideAxis: Ref<AxisDirection | undefined>) => {
|
|
7
10
|
touchDirection: import('vue').ComputedRef<UseSwipeDirection>;
|
|
8
11
|
gestureStyling: import('vue').ComputedRef<{
|
|
9
12
|
transform: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Api } from '../stores/app.store';
|
|
2
|
+
import { CollectionGroup } from '../types/collection-player.type';
|
|
3
|
+
export declare enum AxisDirection {
|
|
4
|
+
HORIZONTAL = "horizontal",
|
|
5
|
+
VERTICAL = "vertical"
|
|
6
|
+
}
|
|
7
|
+
declare const _default: (api: Api) => {
|
|
8
|
+
direction: import('vue').Ref<AxisDirection | undefined, AxisDirection | undefined>;
|
|
9
|
+
updateSlideDirection: (groups: CollectionGroup[]) => Promise<void>;
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { CollectionSlide } from '../types/collection-player.type';
|
|
3
|
+
import { Api } from '../stores/app.store';
|
|
4
|
+
declare const _default: ({ nodeId, isSwiperVisible, activeSlide, api: { onFileEnter, onFileExit, onFilePageEnter, onFilePageExit }, }: {
|
|
5
|
+
nodeId: string | undefined;
|
|
6
|
+
isSwiperVisible: Ref<boolean>;
|
|
7
|
+
activeSlide: Ref<CollectionSlide | null>;
|
|
8
|
+
api: Api;
|
|
9
|
+
}) => void;
|
|
10
|
+
export default _default;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { default as Swiper } from 'swiper';
|
|
3
|
-
import {
|
|
3
|
+
import { CollectionSlide } from '../types/collection-player.type';
|
|
4
4
|
type SwiperElement = HTMLElement & {
|
|
5
5
|
swiper: Swiper;
|
|
6
6
|
};
|
|
7
|
-
declare const _default: (swiperElement: Ref<SwiperElement | null>, activeSlide: Ref<
|
|
7
|
+
declare const _default: (swiperElement: Ref<SwiperElement | null>, activeSlide: Ref<CollectionSlide | null>) => {
|
|
8
8
|
zoom: Ref<number, number>;
|
|
9
9
|
isZoomEnabled: import('vue').ComputedRef<boolean | null>;
|
|
10
10
|
resetZoom: () => void;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { EmitFn, Ref, ComputedRef } from 'vue';
|
|
2
|
+
import { CollectionGroup, CollectionPlayer, CollectionSlide } from '../types/collection-player.type';
|
|
3
|
+
import { default as Swiper } from 'swiper';
|
|
4
|
+
import { File } from '../../../../types/openapi';
|
|
5
|
+
import { default as useZoom } from '../composables/zoom.use';
|
|
6
|
+
import { default as useFullscreen } from '../composables/fullscreen.use';
|
|
7
|
+
import { CollectionFileEntity, NodeInfo } from '../../canvas-builder/types/canvas';
|
|
8
|
+
import { default as useArrowKeys } from '../composables/arrow-keys.use';
|
|
9
|
+
import { default as useSlideDirection } from '../composables/slide-direction.use';
|
|
10
|
+
export type RenderPageAsImage = (payload: {
|
|
11
|
+
fileId: File['id'];
|
|
12
|
+
documentId?: File['id'];
|
|
13
|
+
pageIndex: number;
|
|
14
|
+
params: {
|
|
15
|
+
width: number;
|
|
16
|
+
} | {
|
|
17
|
+
height: number;
|
|
18
|
+
};
|
|
19
|
+
}) => Promise<ArrayBuffer>;
|
|
20
|
+
export type Api = {
|
|
21
|
+
renderPageAsImage: RenderPageAsImage;
|
|
22
|
+
onFileEnter?: (node: NodeInfo, file: CollectionFileEntity) => void;
|
|
23
|
+
onFileExit?: (node: NodeInfo, file: CollectionFileEntity) => void;
|
|
24
|
+
onFilePageEnter?: (node: NodeInfo, file: CollectionFileEntity, pageIndex: number) => void;
|
|
25
|
+
onFilePageExit?: (node: NodeInfo, file: CollectionFileEntity, pageIndex: number) => void;
|
|
26
|
+
};
|
|
27
|
+
export type Options = {
|
|
28
|
+
videoStartTime?: number;
|
|
29
|
+
};
|
|
30
|
+
export type Emit = {
|
|
31
|
+
close: [];
|
|
32
|
+
click: [event: MouseEvent];
|
|
33
|
+
};
|
|
34
|
+
type StorePayload = {
|
|
35
|
+
isLoading: Ref<boolean>;
|
|
36
|
+
inModal: Ref<boolean>;
|
|
37
|
+
isEditMode: Ref<boolean>;
|
|
38
|
+
data: Ref<CollectionPlayer>;
|
|
39
|
+
rootElement: Ref<HTMLElement | null>;
|
|
40
|
+
api: Api;
|
|
41
|
+
emit: EmitFn<Emit>;
|
|
42
|
+
options?: Options;
|
|
43
|
+
};
|
|
44
|
+
type StoreData = {
|
|
45
|
+
isLoading: Ref<boolean>;
|
|
46
|
+
inModal: Ref<boolean>;
|
|
47
|
+
fitToWidth: Ref<boolean>;
|
|
48
|
+
isEditMode: Ref<boolean>;
|
|
49
|
+
isOpenTableOfContents: Ref<boolean>;
|
|
50
|
+
swiperElement: Ref<(HTMLElement & {
|
|
51
|
+
swiper: Swiper;
|
|
52
|
+
}) | null>;
|
|
53
|
+
zoom: ReturnType<typeof useZoom>;
|
|
54
|
+
fullscreen: ReturnType<typeof useFullscreen>;
|
|
55
|
+
data: Ref<CollectionPlayer>;
|
|
56
|
+
visibleGroups: ComputedRef<CollectionGroup[]>;
|
|
57
|
+
isNotInModalOrIsInModalWithManyGroups: ComputedRef<boolean>;
|
|
58
|
+
activeSlide: Ref<CollectionSlide | null>;
|
|
59
|
+
activeGroup: Ref<CollectionGroup | null>;
|
|
60
|
+
setActiveSlide: (group?: CollectionGroup, slide?: CollectionSlide) => void;
|
|
61
|
+
onSlideChange: (customEvent: CustomEvent<[swiper: Swiper]>) => void;
|
|
62
|
+
activatePreviousGroup: () => void;
|
|
63
|
+
activateNextGroup: () => void;
|
|
64
|
+
toggleTableOfContents: () => void;
|
|
65
|
+
toggleFitToWidth: () => void;
|
|
66
|
+
allowTouchMove: (value: boolean) => void;
|
|
67
|
+
isSwiperVisible: Ref<boolean>;
|
|
68
|
+
setSwiperVisibility: (isVisible: boolean) => void;
|
|
69
|
+
api: Api;
|
|
70
|
+
arrowKeys: ReturnType<typeof useArrowKeys>;
|
|
71
|
+
slideDirection: ReturnType<typeof useSlideDirection>;
|
|
72
|
+
closeApp: () => void;
|
|
73
|
+
options?: Options;
|
|
74
|
+
};
|
|
75
|
+
export declare function provideAppStore({ data, isEditMode, rootElement, api, emit, inModal, options, isLoading, }: StorePayload): StoreData;
|
|
76
|
+
export declare function useAppStore(): StoreData;
|
|
77
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FileRetrieve } from '../../../../types/openapi';
|
|
2
|
+
import { CollectionFileEntity } from '../../canvas-builder/types/canvas';
|
|
3
|
+
export type CollectionPage = {
|
|
4
|
+
id: string;
|
|
5
|
+
type: 'slide';
|
|
6
|
+
file: CollectionFileEntity;
|
|
7
|
+
slide: {
|
|
8
|
+
index: number;
|
|
9
|
+
url: FileRetrieve['thumbnail_url'];
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type CollectionFile = {
|
|
13
|
+
id: string;
|
|
14
|
+
type: 'file';
|
|
15
|
+
file: CollectionFileEntity;
|
|
16
|
+
};
|
|
17
|
+
export type CollectionSlide = CollectionPage | CollectionFile;
|
|
18
|
+
export type CollectionGroup = {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
slides: CollectionSlide[];
|
|
22
|
+
};
|
|
23
|
+
export type CollectionPlayer = {
|
|
24
|
+
groups: CollectionGroup[];
|
|
25
|
+
name: string;
|
|
26
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CollectionPlayer, CollectionSlide } from '../types/collection-player.type';
|
|
2
|
+
export declare const generateNewCollection: (t: (key: string, values?: Record<string, string | number>) => string) => CollectionPlayer;
|
|
3
|
+
export declare const generateNewCollectionStructure: () => CollectionPlayer;
|
|
4
|
+
export declare const getUniqueSlides: (uniqueSlides: CollectionSlide[], newSlides: CollectionSlide[]) => CollectionSlide[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CollectionSlide } from '../types/collection-player.type';
|
|
2
|
+
export declare const isVideo: (slide?: CollectionSlide) => boolean;
|
|
3
|
+
export declare const isImage: (slide?: CollectionSlide) => boolean;
|
|
4
|
+
export declare const isWeb: (slide?: CollectionSlide) => boolean;
|
|
5
|
+
export declare const isSlide: (slide?: CollectionSlide) => slide is import('../types/collection-player.type').CollectionPage;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { FileRetrieve } from '../../../types/openapi';
|
|
2
|
+
import { CollectionPlayer, CollectionSlide } from '../collection-player/types/collection-player.type';
|
|
3
|
+
import { FetchFileList, SelectFileContent } from './types/common.type';
|
|
4
|
+
declare const _default: import('vue').DefineComponent<{
|
|
5
|
+
zIndex?: number;
|
|
6
|
+
attachTo?: string | HTMLElement;
|
|
7
|
+
initialData?: CollectionPlayer;
|
|
8
|
+
selectFileContent: SelectFileContent;
|
|
9
|
+
openSettings?: () => void;
|
|
10
|
+
fetchFile: (id: string) => Promise<FileRetrieve>;
|
|
11
|
+
fetchFileList: FetchFileList;
|
|
12
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
13
|
+
cancel: () => any;
|
|
14
|
+
close: (args_0: CollectionPlayer) => any;
|
|
15
|
+
contentChange: (args_0: CollectionSlide) => any;
|
|
16
|
+
}, string, import('vue').PublicProps, Readonly<{
|
|
17
|
+
zIndex?: number;
|
|
18
|
+
attachTo?: string | HTMLElement;
|
|
19
|
+
initialData?: CollectionPlayer;
|
|
20
|
+
selectFileContent: SelectFileContent;
|
|
21
|
+
openSettings?: () => void;
|
|
22
|
+
fetchFile: (id: string) => Promise<FileRetrieve>;
|
|
23
|
+
fetchFileList: FetchFileList;
|
|
24
|
+
}> & Readonly<{
|
|
25
|
+
onCancel?: (() => any) | undefined;
|
|
26
|
+
onClose?: ((args_0: CollectionPlayer) => any) | undefined;
|
|
27
|
+
onContentChange?: ((args_0: CollectionSlide) => any) | undefined;
|
|
28
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
29
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
2
|
+
cancel: () => any;
|
|
3
|
+
close: () => any;
|
|
4
|
+
}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
|
|
5
|
+
onCancel?: (() => any) | undefined;
|
|
6
|
+
onClose?: (() => any) | undefined;
|
|
7
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
2
|
+
close: () => any;
|
|
3
|
+
}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
|
|
4
|
+
onClose?: (() => any) | undefined;
|
|
5
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CollectionGroup } from '../../collection-player/types/collection-player.type';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<{
|
|
3
|
+
group: CollectionGroup;
|
|
4
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
5
|
+
group: CollectionGroup;
|
|
6
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CollectionSlide } from '../../collection-player/types/collection-player.type';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<{
|
|
3
|
+
item: CollectionSlide;
|
|
4
|
+
isFirst?: boolean;
|
|
5
|
+
isLast?: boolean;
|
|
6
|
+
disabledMoveToGroup?: boolean;
|
|
7
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
+
moveUp: () => any;
|
|
9
|
+
moveDown: () => any;
|
|
10
|
+
moveToGroup: () => any;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<{
|
|
12
|
+
item: CollectionSlide;
|
|
13
|
+
isFirst?: boolean;
|
|
14
|
+
isLast?: boolean;
|
|
15
|
+
disabledMoveToGroup?: boolean;
|
|
16
|
+
}> & Readonly<{
|
|
17
|
+
onMoveUp?: (() => any) | undefined;
|
|
18
|
+
onMoveDown?: (() => any) | undefined;
|
|
19
|
+
onMoveToGroup?: (() => any) | undefined;
|
|
20
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CollectionGroup, CollectionSlide } from '../../../collection-player/types/collection-player.type';
|
|
2
2
|
declare const _default: import('vue').DefineComponent<{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
groupId: string;
|
|
6
|
-
slide: CollectionSelectorSlide;
|
|
7
|
-
} | null;
|
|
3
|
+
zIndex?: number;
|
|
4
|
+
groups: CollectionGroup[];
|
|
8
5
|
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
6
|
close: () => any;
|
|
10
|
-
moveToGroup: (fromGroup: string, toGroup: string, slide:
|
|
7
|
+
moveToGroup: (fromGroup: string, toGroup: string, slide: CollectionSlide) => any;
|
|
11
8
|
}, string, import('vue').PublicProps, Readonly<{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
groupId: string;
|
|
15
|
-
slide: CollectionSelectorSlide;
|
|
16
|
-
} | null;
|
|
9
|
+
zIndex?: number;
|
|
10
|
+
groups: CollectionGroup[];
|
|
17
11
|
}> & Readonly<{
|
|
18
12
|
onClose?: (() => any) | undefined;
|
|
19
|
-
onMoveToGroup?: ((fromGroup: string, toGroup: string, slide:
|
|
13
|
+
onMoveToGroup?: ((fromGroup: string, toGroup: string, slide: CollectionSlide) => any) | undefined;
|
|
20
14
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
21
15
|
export default _default;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import { ActiveElement } from '../types/move-slide-modal.type';
|
|
3
|
+
type MoveItemModal = {
|
|
4
|
+
open: (type: ActiveElement) => void;
|
|
5
|
+
close: () => void;
|
|
6
|
+
isOpen: Readonly<ComputedRef<boolean>>;
|
|
7
|
+
activeElement: Readonly<Ref<ActiveElement | null>>;
|
|
8
|
+
};
|
|
9
|
+
export declare function provideMoveSlideModal(): {
|
|
10
|
+
isOpen: ComputedRef<boolean>;
|
|
11
|
+
activeElement: Ref<{
|
|
12
|
+
groupId: string;
|
|
13
|
+
slide: {
|
|
14
|
+
id: string;
|
|
15
|
+
type: "slide";
|
|
16
|
+
file: {
|
|
17
|
+
metadata?: Record<string, any> | undefined;
|
|
18
|
+
readonly id: string;
|
|
19
|
+
name?: string | undefined;
|
|
20
|
+
readonly type: import('../../../main.lib').FileTypeEnum;
|
|
21
|
+
readonly thumbnail_url: string | null;
|
|
22
|
+
permissions?: {
|
|
23
|
+
can_download?: boolean | undefined;
|
|
24
|
+
can_share?: boolean | undefined;
|
|
25
|
+
} | undefined;
|
|
26
|
+
readonly content_url: string | null;
|
|
27
|
+
readonly content_type: import('../../../main.lib').FileContentTypeEnum;
|
|
28
|
+
readonly pspdfkit_auth_payload: Record<string, any> | null;
|
|
29
|
+
readonly pspdfkit_document_id: string | null;
|
|
30
|
+
readonly pspdfkit_server_url: string | null;
|
|
31
|
+
};
|
|
32
|
+
slide: {
|
|
33
|
+
index: number;
|
|
34
|
+
url: import('../../../main.lib').FileRetrieve["thumbnail_url"];
|
|
35
|
+
};
|
|
36
|
+
} | {
|
|
37
|
+
id: string;
|
|
38
|
+
type: "file";
|
|
39
|
+
file: {
|
|
40
|
+
metadata?: Record<string, any> | undefined;
|
|
41
|
+
readonly id: string;
|
|
42
|
+
name?: string | undefined;
|
|
43
|
+
readonly type: import('../../../main.lib').FileTypeEnum;
|
|
44
|
+
readonly thumbnail_url: string | null;
|
|
45
|
+
permissions?: {
|
|
46
|
+
can_download?: boolean | undefined;
|
|
47
|
+
can_share?: boolean | undefined;
|
|
48
|
+
} | undefined;
|
|
49
|
+
readonly content_url: string | null;
|
|
50
|
+
readonly content_type: import('../../../main.lib').FileContentTypeEnum;
|
|
51
|
+
readonly pspdfkit_auth_payload: Record<string, any> | null;
|
|
52
|
+
readonly pspdfkit_document_id: string | null;
|
|
53
|
+
readonly pspdfkit_server_url: string | null;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
} | null, ActiveElement | {
|
|
57
|
+
groupId: string;
|
|
58
|
+
slide: {
|
|
59
|
+
id: string;
|
|
60
|
+
type: "slide";
|
|
61
|
+
file: {
|
|
62
|
+
metadata?: Record<string, any> | undefined;
|
|
63
|
+
readonly id: string;
|
|
64
|
+
name?: string | undefined;
|
|
65
|
+
readonly type: import('../../../main.lib').FileTypeEnum;
|
|
66
|
+
readonly thumbnail_url: string | null;
|
|
67
|
+
permissions?: {
|
|
68
|
+
can_download?: boolean | undefined;
|
|
69
|
+
can_share?: boolean | undefined;
|
|
70
|
+
} | undefined;
|
|
71
|
+
readonly content_url: string | null;
|
|
72
|
+
readonly content_type: import('../../../main.lib').FileContentTypeEnum;
|
|
73
|
+
readonly pspdfkit_auth_payload: Record<string, any> | null;
|
|
74
|
+
readonly pspdfkit_document_id: string | null;
|
|
75
|
+
readonly pspdfkit_server_url: string | null;
|
|
76
|
+
};
|
|
77
|
+
slide: {
|
|
78
|
+
index: number;
|
|
79
|
+
url: import('../../../main.lib').FileRetrieve["thumbnail_url"];
|
|
80
|
+
};
|
|
81
|
+
} | {
|
|
82
|
+
id: string;
|
|
83
|
+
type: "file";
|
|
84
|
+
file: {
|
|
85
|
+
metadata?: Record<string, any> | undefined;
|
|
86
|
+
readonly id: string;
|
|
87
|
+
name?: string | undefined;
|
|
88
|
+
readonly type: import('../../../main.lib').FileTypeEnum;
|
|
89
|
+
readonly thumbnail_url: string | null;
|
|
90
|
+
permissions?: {
|
|
91
|
+
can_download?: boolean | undefined;
|
|
92
|
+
can_share?: boolean | undefined;
|
|
93
|
+
} | undefined;
|
|
94
|
+
readonly content_url: string | null;
|
|
95
|
+
readonly content_type: import('../../../main.lib').FileContentTypeEnum;
|
|
96
|
+
readonly pspdfkit_auth_payload: Record<string, any> | null;
|
|
97
|
+
readonly pspdfkit_document_id: string | null;
|
|
98
|
+
readonly pspdfkit_server_url: string | null;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
} | null>;
|
|
102
|
+
open: (type: ActiveElement) => void;
|
|
103
|
+
close: () => null;
|
|
104
|
+
};
|
|
105
|
+
export declare function useMoveSlideModal(): MoveItemModal;
|
|
106
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
type TableInput = {
|
|
3
|
+
activeInputId: Ref<string | null>;
|
|
4
|
+
setActiveInput: (id: string) => void;
|
|
5
|
+
clearActiveInput: () => void;
|
|
6
|
+
getInputState: (isEdit: boolean) => 'edit' | 'view';
|
|
7
|
+
};
|
|
8
|
+
export declare function provideTableInput(): {
|
|
9
|
+
activeInputId: Ref<string | null, string | null>;
|
|
10
|
+
setActiveInput: (id: string) => string;
|
|
11
|
+
clearActiveInput: () => void;
|
|
12
|
+
getInputState: (isEdit: boolean) => "edit" | "view";
|
|
13
|
+
};
|
|
14
|
+
export declare function useTableInput(): TableInput;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { default as useConfirmation } from '../../../composables/useConfirmation';
|
|
3
|
+
import { CollectionGroup, CollectionPlayer, CollectionSlide } from '../../collection-player/types/collection-player.type';
|
|
4
|
+
import { FetchFileList, SelectFileContent } from '../types/common.type';
|
|
5
|
+
import { File, FileRetrieve, FileContentTypeEnum } from '../../../../types/openapi';
|
|
6
|
+
type StorePayload = {
|
|
7
|
+
initialCollection?: CollectionPlayer;
|
|
8
|
+
t: (key: string, values?: Record<string, string | number>) => string;
|
|
9
|
+
confirmation: ReturnType<typeof useConfirmation>;
|
|
10
|
+
selectFileContent: SelectFileContent;
|
|
11
|
+
attachTo?: HTMLElement | string;
|
|
12
|
+
openSettings?: () => void;
|
|
13
|
+
fetchFile: (id: string) => Promise<FileRetrieve>;
|
|
14
|
+
fetchFileList: FetchFileList;
|
|
15
|
+
zIndex?: number;
|
|
16
|
+
};
|
|
17
|
+
type StoreData = {
|
|
18
|
+
collection: Ref<CollectionPlayer>;
|
|
19
|
+
expandedGroups: Ref<string[]>;
|
|
20
|
+
usedFiles: Ref<Record<File['id'], File>>;
|
|
21
|
+
addGroup: (group?: Partial<CollectionGroup>) => CollectionGroup | undefined;
|
|
22
|
+
deleteGroup: (groupId: string, groupName: string) => void;
|
|
23
|
+
updateGroup: (group: Partial<Omit<CollectionGroup, 'id'>> & Pick<CollectionGroup, 'id'>) => void;
|
|
24
|
+
updateGroups: (groups: CollectionGroup[]) => void;
|
|
25
|
+
updateSlides: (groupId: string, slides: CollectionSlide[]) => void;
|
|
26
|
+
updateCollectionName: (name: string) => void;
|
|
27
|
+
updateGroupName: (groupId: string, name: string) => void;
|
|
28
|
+
deleteSlide: (groupId: string, slide: CollectionSlide) => void;
|
|
29
|
+
addSlides: (groupId: string) => Promise<CollectionSlide[] | undefined>;
|
|
30
|
+
moveSlideToGroup: (fromGroup: string, toGroup: string, slide: CollectionSlide) => void;
|
|
31
|
+
selectFileContent: SelectFileContent;
|
|
32
|
+
openSettings?: () => void;
|
|
33
|
+
fetchFile: (id: string) => Promise<FileRetrieve>;
|
|
34
|
+
fetchFileList: FetchFileList;
|
|
35
|
+
childModalZIndex?: number;
|
|
36
|
+
};
|
|
37
|
+
export declare function provideAppStore({ initialCollection, t, confirmation, selectFileContent, attachTo, openSettings, fetchFile, fetchFileList, zIndex, }: StorePayload): {
|
|
38
|
+
collection: Ref<{
|
|
39
|
+
groups: {
|
|
40
|
+
id: string;
|
|
41
|
+
name: string;
|
|
42
|
+
slides: ({
|
|
43
|
+
id: string;
|
|
44
|
+
type: "slide";
|
|
45
|
+
file: {
|
|
46
|
+
metadata?: Record<string, any> | undefined;
|
|
47
|
+
readonly id: string;
|
|
48
|
+
name?: string | undefined;
|
|
49
|
+
readonly type: import('../../../../types/openapi').FileTypeEnum;
|
|
50
|
+
readonly thumbnail_url: string | null;
|
|
51
|
+
permissions?: {
|
|
52
|
+
can_download?: boolean | undefined;
|
|
53
|
+
can_share?: boolean | undefined;
|
|
54
|
+
} | undefined;
|
|
55
|
+
readonly content_url: string | null;
|
|
56
|
+
readonly content_type: FileContentTypeEnum;
|
|
57
|
+
readonly pspdfkit_auth_payload: Record<string, any> | null;
|
|
58
|
+
readonly pspdfkit_document_id: string | null;
|
|
59
|
+
readonly pspdfkit_server_url: string | null;
|
|
60
|
+
};
|
|
61
|
+
slide: {
|
|
62
|
+
index: number;
|
|
63
|
+
url: FileRetrieve["thumbnail_url"];
|
|
64
|
+
};
|
|
65
|
+
} | {
|
|
66
|
+
id: string;
|
|
67
|
+
type: "file";
|
|
68
|
+
file: {
|
|
69
|
+
metadata?: Record<string, any> | undefined;
|
|
70
|
+
readonly id: string;
|
|
71
|
+
name?: string | undefined;
|
|
72
|
+
readonly type: import('../../../../types/openapi').FileTypeEnum;
|
|
73
|
+
readonly thumbnail_url: string | null;
|
|
74
|
+
permissions?: {
|
|
75
|
+
can_download?: boolean | undefined;
|
|
76
|
+
can_share?: boolean | undefined;
|
|
77
|
+
} | undefined;
|
|
78
|
+
readonly content_url: string | null;
|
|
79
|
+
readonly content_type: FileContentTypeEnum;
|
|
80
|
+
readonly pspdfkit_auth_payload: Record<string, any> | null;
|
|
81
|
+
readonly pspdfkit_document_id: string | null;
|
|
82
|
+
readonly pspdfkit_server_url: string | null;
|
|
83
|
+
};
|
|
84
|
+
})[];
|
|
85
|
+
}[];
|
|
86
|
+
name: string;
|
|
87
|
+
}, CollectionPlayer | {
|
|
88
|
+
groups: {
|
|
89
|
+
id: string;
|
|
90
|
+
name: string;
|
|
91
|
+
slides: ({
|
|
92
|
+
id: string;
|
|
93
|
+
type: "slide";
|
|
94
|
+
file: {
|
|
95
|
+
metadata?: Record<string, any> | undefined;
|
|
96
|
+
readonly id: string;
|
|
97
|
+
name?: string | undefined;
|
|
98
|
+
readonly type: import('../../../../types/openapi').FileTypeEnum;
|
|
99
|
+
readonly thumbnail_url: string | null;
|
|
100
|
+
permissions?: {
|
|
101
|
+
can_download?: boolean | undefined;
|
|
102
|
+
can_share?: boolean | undefined;
|
|
103
|
+
} | undefined;
|
|
104
|
+
readonly content_url: string | null;
|
|
105
|
+
readonly content_type: FileContentTypeEnum;
|
|
106
|
+
readonly pspdfkit_auth_payload: Record<string, any> | null;
|
|
107
|
+
readonly pspdfkit_document_id: string | null;
|
|
108
|
+
readonly pspdfkit_server_url: string | null;
|
|
109
|
+
};
|
|
110
|
+
slide: {
|
|
111
|
+
index: number;
|
|
112
|
+
url: FileRetrieve["thumbnail_url"];
|
|
113
|
+
};
|
|
114
|
+
} | {
|
|
115
|
+
id: string;
|
|
116
|
+
type: "file";
|
|
117
|
+
file: {
|
|
118
|
+
metadata?: Record<string, any> | undefined;
|
|
119
|
+
readonly id: string;
|
|
120
|
+
name?: string | undefined;
|
|
121
|
+
readonly type: import('../../../../types/openapi').FileTypeEnum;
|
|
122
|
+
readonly thumbnail_url: string | null;
|
|
123
|
+
permissions?: {
|
|
124
|
+
can_download?: boolean | undefined;
|
|
125
|
+
can_share?: boolean | undefined;
|
|
126
|
+
} | undefined;
|
|
127
|
+
readonly content_url: string | null;
|
|
128
|
+
readonly content_type: FileContentTypeEnum;
|
|
129
|
+
readonly pspdfkit_auth_payload: Record<string, any> | null;
|
|
130
|
+
readonly pspdfkit_document_id: string | null;
|
|
131
|
+
readonly pspdfkit_server_url: string | null;
|
|
132
|
+
};
|
|
133
|
+
})[];
|
|
134
|
+
}[];
|
|
135
|
+
name: string;
|
|
136
|
+
}>;
|
|
137
|
+
expandedGroups: Ref<string[], string[]>;
|
|
138
|
+
selectFileContent: SelectFileContent;
|
|
139
|
+
openSettings: (() => void) | undefined;
|
|
140
|
+
fetchFile: (id: string) => Promise<FileRetrieve>;
|
|
141
|
+
fetchFileList: FetchFileList;
|
|
142
|
+
usedFiles: Ref<Record<string, File>, Record<string, File>>;
|
|
143
|
+
childModalZIndex: number | undefined;
|
|
144
|
+
addGroup: (group?: Partial<CollectionGroup>) => CollectionGroup | undefined;
|
|
145
|
+
deleteGroup: (groupId: string, groupName: string) => void;
|
|
146
|
+
updateGroup: (group: Partial<Omit<CollectionGroup, "id">> & Pick<CollectionGroup, "id">) => void;
|
|
147
|
+
updateGroups: (groups: CollectionGroup[]) => void;
|
|
148
|
+
updateSlides: (groupId: string, slides: CollectionSlide[]) => void;
|
|
149
|
+
updateCollectionName: (name: string) => void;
|
|
150
|
+
updateGroupName: (groupId: string, name: string) => void;
|
|
151
|
+
deleteSlide: (groupId: string, slide: CollectionSlide) => void;
|
|
152
|
+
addSlides: (groupId: string) => Promise<(import('../../collection-player/types/collection-player.type').CollectionPage | import('../../collection-player/types/collection-player.type').CollectionFile)[] | undefined>;
|
|
153
|
+
moveSlideToGroup: (fromGroup: string, toGroup: string, slide: CollectionSlide) => void;
|
|
154
|
+
};
|
|
155
|
+
export declare function useAppStore(): StoreData;
|
|
156
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CollectionPlayer } from '../../collection-player/types/collection-player.type';
|
|
2
|
+
import { FetchFileList, SelectFileContent } from './common.type';
|
|
3
|
+
import { FileRetrieve } from '../../../../types/openapi';
|
|
4
|
+
export type CollectionSelectorProps = {
|
|
5
|
+
zIndex?: number;
|
|
6
|
+
attachTo?: string | HTMLElement;
|
|
7
|
+
initialData?: CollectionPlayer;
|
|
8
|
+
selectFileContent: SelectFileContent;
|
|
9
|
+
openSettings?: () => void;
|
|
10
|
+
fetchFile: (id: string) => Promise<FileRetrieve>;
|
|
11
|
+
fetchFileList: FetchFileList;
|
|
12
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SelectedFile, SelectedPage, SelectorType } from '../../content-selector/stores/app';
|
|
2
|
+
import { File, FileContentTypeEnum } from '../../../../types/openapi';
|
|
3
|
+
import { Selection } from '../../../types/selections';
|
|
4
|
+
export type SelectFileContent = (payload: {
|
|
5
|
+
attachTo?: HTMLElement | string;
|
|
6
|
+
selections?: Selection[];
|
|
7
|
+
allowedSelectorTypes?: SelectorType[];
|
|
8
|
+
allowedContentTypes?: FileContentTypeEnum[];
|
|
9
|
+
allowedAssetContentTypes?: FileContentTypeEnum[];
|
|
10
|
+
}) => Promise<{
|
|
11
|
+
user_action: string;
|
|
12
|
+
content?: (SelectedFile | SelectedPage)[];
|
|
13
|
+
}>;
|
|
14
|
+
export type FetchFileList = <T extends {
|
|
15
|
+
filters: {
|
|
16
|
+
id__in: string;
|
|
17
|
+
};
|
|
18
|
+
}>(payload: T) => Promise<File[]>;
|