@edifice.io/wiki 3.4.0-develop-pedago.1
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/lib/BAGVG3AX.js +33 -0
- package/lib/DeleteListModal.js +36 -0
- package/lib/KZB72KQG.js +42 -0
- package/lib/NITRNJ62.js +9215 -0
- package/lib/PrintModal.js +74 -0
- package/lib/components/AIButton/AIButton.d.ts +6 -0
- package/lib/components/ButtonGroup/index.d.ts +6 -0
- package/lib/components/CancelModal/index.d.ts +6 -0
- package/lib/components/ResourceModal/index.d.ts +2 -0
- package/lib/components/ShareModal/index.d.ts +2 -0
- package/lib/components/SimpleRadioCard/SimpleRadioCard.d.ts +37 -0
- package/lib/components/Toggle/index.d.ts +2 -0
- package/lib/components/WikiApp/components/WikiApp.d.ts +15 -0
- package/lib/components/WikiApp/providers/WikiAppProvider.context.d.ts +7 -0
- package/lib/components/WikiApp/providers/WikiAppProvider.d.ts +9 -0
- package/lib/components/WikiApp/providers/WikiAppProvider.hook.d.ts +1 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/config/constants.d.ts +7 -0
- package/lib/config/explorer.d.ts +2 -0
- package/lib/config/index.d.ts +3 -0
- package/lib/config/workflows.d.ts +19 -0
- package/lib/features/app/AppActions/AppActions.d.ts +8 -0
- package/lib/features/app/AppActions/AppActions.test.d.ts +1 -0
- package/lib/features/app/AppHeader/AppHeader.d.ts +1 -0
- package/lib/features/app/AppHeader/AppHeader.test.d.ts +1 -0
- package/lib/features/index.d.ts +13 -0
- package/lib/features/page/ConfirmVisibilityModal/ConfirmVisibilityModal.d.ts +4 -0
- package/lib/features/page/DeleteListModal/DeleteListModal.d.ts +4 -0
- package/lib/features/page/DeleteListModal/DeleteListModal.test.d.ts +1 -0
- package/lib/features/page/DeletePageModal/DeletePageModal.d.ts +1 -0
- package/lib/features/page/DuplicateModal/DuplicateModal.d.ts +16 -0
- package/lib/features/page/DuplicateModal/DuplicateModal.test.d.ts +1 -0
- package/lib/features/page/FormPage/FormPage.d.ts +4 -0
- package/lib/features/page/MoveModal/MoveModal.d.ts +6 -0
- package/lib/features/page/MoveModal/MoveModal.test.d.ts +1 -0
- package/lib/features/page/PageHeader/PageHeader.d.ts +6 -0
- package/lib/features/page/PageHeader/PageHeader.test.d.ts +1 -0
- package/lib/features/page/PrintModal/PrintModal.d.ts +1 -0
- package/lib/features/page/PrintModal/PrintModal.test.d.ts +1 -0
- package/lib/features/page/RevisionHeader/RevisionHeader.d.ts +4 -0
- package/lib/features/page/RevisionHeader/RevisionHeader.test.d.ts +1 -0
- package/lib/features/page/RevisionModal/RevisionModal.d.ts +4 -0
- package/lib/features/page/RevisionModal/RevisionModal.test.d.ts +1 -0
- package/lib/features/page/RevisionModal/useRevisionModal.d.ts +16 -0
- package/lib/features/wiki/DropdownTreeview/DropdownTreeview.d.ts +6 -0
- package/lib/features/wiki/NewPage/NewPage.d.ts +1 -0
- package/lib/features/wiki/NewPage/NewPage.test.d.ts +1 -0
- package/lib/features/wiki/PagesAssistant/PagesAssistantAISteps/PagesAssistantAIStep1Form.d.ts +1 -0
- package/lib/features/wiki/PagesAssistant/PagesAssistantAISteps/PagesAssistantAIStep2Form.d.ts +1 -0
- package/lib/features/wiki/PagesAssistant/PagesAssistantAISteps/PagesAssistantAIStep3StructureLoading.d.ts +1 -0
- package/lib/features/wiki/PagesAssistant/PagesAssistantAISteps/PagesAssistantAIStep4StructureResult.d.ts +1 -0
- package/lib/features/wiki/PagesAssistant/PagesAssistantAISteps/useLevels.d.ts +23 -0
- package/lib/features/wiki/PagesAssistant/PagesAssistantAISteps/useSubjects.d.ts +12 -0
- package/lib/features/wiki/PagesAssistant/PagesAssistantCards/PagesAssistantAICard.d.ts +1 -0
- package/lib/features/wiki/PagesAssistant/PagesAssistantCards/PagesAssistantImportPollCard.d.ts +1 -0
- package/lib/features/wiki/PagesAssistant/PagesAssistantCards/PagesAssistantLibraryCard.d.ts +1 -0
- package/lib/features/wiki/PagesAssistant/PagesAssistantCards/PagesAssistantManualCreationCard.d.ts +1 -0
- package/lib/features/wiki/PagesAssistant/PagesAssistantLeftPane.d.ts +1 -0
- package/lib/features/wiki/PagesAssistant/PagesAssistantRoot.d.ts +1 -0
- package/lib/features/wiki/PagesAssistant/animations/loading.json.d.ts +2290 -0
- package/lib/features/wiki/WikiEmptyScreen/WikiEmptyScreen.d.ts +2 -0
- package/lib/features/wiki/WikiEmptyScreen/WikiEmptyScreen.test.d.ts +1 -0
- package/lib/hooks/index.d.ts +4 -0
- package/lib/hooks/useCancelPage.d.ts +7 -0
- package/lib/hooks/useCheckablePrint.d.ts +11 -0
- package/lib/hooks/useCheckableTable.d.ts +9 -0
- package/lib/hooks/useFeedData.d.ts +19 -0
- package/lib/hooks/useFilterCurrentPageFromTree.d.ts +8 -0
- package/lib/hooks/useFilterVisiblePage.d.ts +2 -0
- package/lib/hooks/useFilteredWikis.d.ts +10 -0
- package/lib/hooks/useFindTreeItemById.d.ts +11 -0
- package/lib/hooks/useFormPage/useFormPage.d.ts +23 -0
- package/lib/hooks/useFormPage/useFormPage.test.d.ts +1 -0
- package/lib/hooks/useIsAuthorOrManager.d.ts +8 -0
- package/lib/hooks/useIsOnlyRead.d.ts +1 -0
- package/lib/hooks/useListPage/useListPage.d.ts +5 -0
- package/lib/hooks/useListPage/useListPage.test.d.ts +1 -0
- package/lib/hooks/useMenu.d.ts +11 -0
- package/lib/hooks/useRedirectDefaultPage.d.ts +1 -0
- package/lib/hooks/useReorganizeTree.d.ts +16 -0
- package/lib/hooks/useRevision/useRevision.d.ts +54 -0
- package/lib/hooks/useRevision/useRevision.test.d.ts +1 -0
- package/lib/hooks/useUpdatePages.d.ts +4 -0
- package/lib/i18n.d.ts +2 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +4 -0
- package/lib/index2.js +12448 -0
- package/lib/index3.js +5 -0
- package/lib/index4.js +5 -0
- package/lib/main.d.ts +0 -0
- package/lib/mocks/handlers.d.ts +4 -0
- package/lib/mocks/index.d.ts +413 -0
- package/lib/mocks/polyfills.d.ts +5 -0
- package/lib/mocks/renderWithRouter.d.ts +2 -0
- package/lib/mocks/server.d.ts +1 -0
- package/lib/mocks/setup.d.ts +11 -0
- package/lib/models/comment.d.ts +20 -0
- package/lib/models/date.d.ts +12 -0
- package/lib/models/index.d.ts +5 -0
- package/lib/models/page.d.ts +91 -0
- package/lib/models/payload.d.ts +28 -0
- package/lib/models/revision.d.ts +12 -0
- package/lib/models/wiki.d.ts +68 -0
- package/lib/providers/index.d.ts +9 -0
- package/lib/routes/errors/index.d.ts +3 -0
- package/lib/routes/errors/not-found.d.ts +1 -0
- package/lib/routes/index.d.ts +6 -0
- package/lib/routes/old-format/index.d.ts +36 -0
- package/lib/routes/page/create.d.ts +4 -0
- package/lib/routes/page/edit.d.ts +11 -0
- package/lib/routes/page/index.d.ts +37 -0
- package/lib/routes/page/list/list.d.ts +46 -0
- package/lib/routes/page/list/list.test.d.ts +1 -0
- package/lib/routes/page/pageEditAction.d.ts +4 -0
- package/lib/routes/print/index.d.ts +36 -0
- package/lib/routes/root/index.d.ts +4 -0
- package/lib/routes/wiki/index.d.ts +45 -0
- package/lib/routes/wiki/index.test.d.ts +1 -0
- package/lib/services/api/assistant/assistant.service.d.ts +9 -0
- package/lib/services/api/assistant/assistant.types.d.ts +19 -0
- package/lib/services/api/index.d.ts +261 -0
- package/lib/services/api/index.test.d.ts +1 -0
- package/lib/services/api/poll/poll.service.d.ts +17 -0
- package/lib/services/api/poll/poll.types.d.ts +27 -0
- package/lib/services/index.d.ts +12 -0
- package/lib/services/queries/actions.d.ts +11 -0
- package/lib/services/queries/comment.d.ts +20 -0
- package/lib/services/queries/index.d.ts +4 -0
- package/lib/services/queries/page/page.d.ts +264 -0
- package/lib/services/queries/page/page.test.d.ts +1 -0
- package/lib/services/queries/poll/poll.query.d.ts +9 -0
- package/lib/services/queries/poll/poll.test.d.ts +1 -0
- package/lib/services/queries/wiki/wiki.d.ts +235 -0
- package/lib/services/queries/wiki/wiki.test.d.ts +1 -0
- package/lib/services/resource/index.d.ts +47 -0
- package/lib/store/assistant/index.d.ts +7 -0
- package/lib/store/index.d.ts +3 -0
- package/lib/store/rights/index.d.ts +11 -0
- package/lib/store/toast/index.d.ts +13 -0
- package/lib/store/treeview/index.d.ts +12 -0
- package/lib/store/wiki/index.d.ts +55 -0
- package/lib/style.css +1 -0
- package/lib/utils/dtoToPage.d.ts +33 -0
- package/lib/utils/dtoToWiki.d.ts +43 -0
- package/lib/utils/dtoToWikiPages.d.ts +33 -0
- package/lib/utils/findDefaultPage.d.ts +5 -0
- package/lib/utils/findDefaultPage.test.d.ts +1 -0
- package/lib/utils/findLastPage.d.ts +4 -0
- package/lib/utils/findPage.d.ts +2 -0
- package/lib/utils/findPage.test.d.ts +1 -0
- package/lib/utils/getChildrenRecursively.d.ts +19 -0
- package/lib/utils/getFormValue.d.ts +1 -0
- package/lib/utils/sortPagesByDate.d.ts +2 -0
- package/lib/utils/sortPagesByPosition.d.ts +2 -0
- package/package.json +90 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export declare const getOpenUpdateModal: () => boolean;
|
|
2
|
+
export declare const getOpenShareModal: () => boolean;
|
|
3
|
+
export declare const getOpenDeleteModal: () => boolean;
|
|
4
|
+
export declare const getOpenRevisionModal: () => boolean;
|
|
5
|
+
export declare const getOpenConfirmVisibilityModal: () => boolean;
|
|
6
|
+
export declare const getOpenPrintModal: () => boolean;
|
|
7
|
+
export declare const getOpenDuplicateModal: () => boolean;
|
|
8
|
+
export declare const getWikiActions: () => {
|
|
9
|
+
setOpenMoveModal: (value: boolean) => void;
|
|
10
|
+
setOpenUpdateModal: (value: boolean) => void;
|
|
11
|
+
setOpenShareModal: (value: boolean) => void;
|
|
12
|
+
setOpenDeleteModal: (value: boolean) => void;
|
|
13
|
+
setOpenRevisionModal: (value: boolean) => void;
|
|
14
|
+
setOpenConfirmVisibilityModal: (value: boolean) => void;
|
|
15
|
+
setOpenPrintModal: (value: boolean) => void;
|
|
16
|
+
setOpenDuplicateModal: (open: boolean) => void;
|
|
17
|
+
setSelectedPages: (selectedPages: string[]) => void;
|
|
18
|
+
setRedirectingToDefaultPage: (redirectingToDefaultPage: boolean) => void;
|
|
19
|
+
};
|
|
20
|
+
export declare const getSelectedPages: () => string[];
|
|
21
|
+
export declare const getRedirectingToDefaultPage: () => boolean;
|
|
22
|
+
export declare const getRedirectingToDefaultPageActions: () => {
|
|
23
|
+
setOpenMoveModal: (value: boolean) => void;
|
|
24
|
+
setOpenUpdateModal: (value: boolean) => void;
|
|
25
|
+
setOpenShareModal: (value: boolean) => void;
|
|
26
|
+
setOpenDeleteModal: (value: boolean) => void;
|
|
27
|
+
setOpenRevisionModal: (value: boolean) => void;
|
|
28
|
+
setOpenConfirmVisibilityModal: (value: boolean) => void;
|
|
29
|
+
setOpenPrintModal: (value: boolean) => void;
|
|
30
|
+
setOpenDuplicateModal: (open: boolean) => void;
|
|
31
|
+
setSelectedPages: (selectedPages: string[]) => void;
|
|
32
|
+
setRedirectingToDefaultPage: (redirectingToDefaultPage: boolean) => void;
|
|
33
|
+
};
|
|
34
|
+
export declare const useOpenMoveModal: () => boolean;
|
|
35
|
+
export declare const useOpenUpdateModal: () => boolean;
|
|
36
|
+
export declare const useOpenShareModal: () => boolean;
|
|
37
|
+
export declare const useOpenDeleteModal: () => boolean;
|
|
38
|
+
export declare const useOpenRevisionModal: () => boolean;
|
|
39
|
+
export declare const useOpenConfirmVisibilityModal: () => boolean;
|
|
40
|
+
export declare const useOpenPrintModal: () => boolean;
|
|
41
|
+
export declare const useOpenDuplicateModal: () => boolean;
|
|
42
|
+
export declare const useSelectedPages: () => string[];
|
|
43
|
+
export declare const useWikiActions: () => {
|
|
44
|
+
setOpenMoveModal: (value: boolean) => void;
|
|
45
|
+
setOpenUpdateModal: (value: boolean) => void;
|
|
46
|
+
setOpenShareModal: (value: boolean) => void;
|
|
47
|
+
setOpenDeleteModal: (value: boolean) => void;
|
|
48
|
+
setOpenRevisionModal: (value: boolean) => void;
|
|
49
|
+
setOpenConfirmVisibilityModal: (value: boolean) => void;
|
|
50
|
+
setOpenPrintModal: (value: boolean) => void;
|
|
51
|
+
setOpenDuplicateModal: (open: boolean) => void;
|
|
52
|
+
setSelectedPages: (selectedPages: string[]) => void;
|
|
53
|
+
setRedirectingToDefaultPage: (redirectingToDefaultPage: boolean) => void;
|
|
54
|
+
};
|
|
55
|
+
export declare const useRedirectingToDefaultPage: () => boolean;
|
package/lib/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.wiki-page-content .tiptap>h1:first-child{display:none}.wiki-page-content h2{padding:24px 0 12px}.switch{position:relative;display:inline-block;width:34px;height:20px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s;padding:2px}.slider:before{position:absolute;content:"";height:16px;width:16px;left:2px;bottom:2px;background-color:#fff;-webkit-transition:.4s;transition:.4s}input:checked+.slider{background-color:#2196f3}input:focus+.slider{box-shadow:0 0 1px #2196f3}input:checked+.slider:before{-webkit-transform:translateX(14px);-ms-transform:translateX(14px);transform:translate(14px)}input[type=checkbox]:disabled+.slider{cursor:not-allowed}.slider.round{border-radius:32px}.slider.round:before{border-radius:50%}.page-content-editor .ProseMirror[contenteditable=true]{min-height:180px}.page-author{color:var(--edifice-gray-700)}.page-author:hover{color:rgba(var(--edifice-link-color-rgb),var(--edifice-link-opacity, 1));text-decoration:underline}.separator{height:16px;border:0;border-left:1px solid var(--edifice-gray-600)}.indicator{position:relative;padding:0;height:8px;border-color:var(--edifice-secondary-300);background-color:var(--edifice-secondary-300);border-radius:4px;margin-left:var(--indicator-spacing)!important}.indicator>*{opacity:0;height:0}.btn-ai-wrapper{padding:2px;border-radius:120px;background:linear-gradient(to right,#c232aa,#ecbe30)}.btn-ai-wrapper .btn-ai{color:#4a4a4a;background:#fff;border:none;border-radius:120px;padding-left:16px;padding-right:16px;min-width:128px}.btn-ai-wrapper .btn-ai>span{background:linear-gradient(to right,#c232aa,#ecbe30);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;transition:transform .3s cubic-bezier(.4,0,.2,1)}.btn-ai-wrapper .btn-ai:hover,.btn-ai-wrapper .btn-ai:active,.btn-ai-wrapper .btn-ai:focus-visible{background:#fff!important}.btn-ai-wrapper .btn-ai:disabled{background:#fff!important;color:#4a4a4a!important;box-shadow:none!important}.btn-ai-wrapper:has(.btn-ai:disabled){cursor:progress}.btn-ai-wrapper .btn-ai:hover>span{transform:translateY(-2px)!important}.loading .btn-ai-wrapper .btn-ai img{display:inline-block;animation:pulse 1.5s ease-in-out infinite}@keyframes pulse{0%,to{transform:scale(1)}50%{transform:scale(1.3)}}.pages-assistant-wrapper .promotion-card{height:100%}.pages-assistant-wrapper .promotion-card.ai-border-gradient{background:linear-gradient(#fff,#fff) padding-box,linear-gradient(to right,#f9beef,#faea9c) border-box;border-radius:2.4rem;border:3px solid transparent}.pages-assistant-wrapper .promotion-card .ai-background-gradient{background:linear-gradient(90deg,#fee1fa,#fcf8e2)}.pages-assistant-wrapper .promotion-card .btn-thumb-down:hover,.pages-assistant-wrapper .promotion-card .btn-thumb-up:hover,.pages-assistant-wrapper .promotion-card .btn-thumb-down.selected,.pages-assistant-wrapper .promotion-card .btn-thumb-up.selected{background-color:rgba(var(--edifice-white-rgb),var(--edifice-white-opacity, 1))}.pages-assistant-ai-wrapper .dropdown{min-width:100%}.pages-assistant-ai-wrapper .dropdown .dropdown-toggle{min-width:100%;margin-bottom:24px}.pages-assistant-ai-wrapper .simple-radio-card-container{transition:border-color .5s ease}.pages-assistant-ai-wrapper .simple-radio-card-container:hover:not(.selected){border-color:var(--edifice-secondary-bg-subtle)!important}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { PageDto } from '../models';
|
|
2
|
+
export declare const dtoToPage: (dto: PageDto) => {
|
|
3
|
+
comments: {
|
|
4
|
+
id: string;
|
|
5
|
+
comment: string;
|
|
6
|
+
authorId: string;
|
|
7
|
+
authorName: string;
|
|
8
|
+
createdAt: number;
|
|
9
|
+
updatedAt: number;
|
|
10
|
+
replyTo: string | undefined;
|
|
11
|
+
deleted: boolean | undefined;
|
|
12
|
+
}[] | undefined;
|
|
13
|
+
isVisible: boolean;
|
|
14
|
+
_id: string;
|
|
15
|
+
title: string;
|
|
16
|
+
content: string;
|
|
17
|
+
contentPlain: string;
|
|
18
|
+
contentVersion: number;
|
|
19
|
+
author: string;
|
|
20
|
+
authorName: string;
|
|
21
|
+
created?: import('../models').Created;
|
|
22
|
+
modified: import('../models').Modified;
|
|
23
|
+
lastContributer?: string;
|
|
24
|
+
lastContributerName?: string;
|
|
25
|
+
children?: [{
|
|
26
|
+
_id: string;
|
|
27
|
+
title: string;
|
|
28
|
+
isVisible: boolean;
|
|
29
|
+
position?: number;
|
|
30
|
+
}];
|
|
31
|
+
parentId?: string;
|
|
32
|
+
position?: number;
|
|
33
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { WikiDto } from '../models';
|
|
2
|
+
export declare const dtoToWiki: (dto: WikiDto) => {
|
|
3
|
+
pages: {
|
|
4
|
+
isVisible: boolean;
|
|
5
|
+
_id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
content: string;
|
|
8
|
+
contentPlain: string;
|
|
9
|
+
contentVersion: number;
|
|
10
|
+
author: string;
|
|
11
|
+
authorName: string;
|
|
12
|
+
modified: import('../models').Modified;
|
|
13
|
+
created?: import('../models').Created;
|
|
14
|
+
lastContributer?: string;
|
|
15
|
+
lastContributerName?: string;
|
|
16
|
+
comments?: import('../models').Comment[];
|
|
17
|
+
children?: [{
|
|
18
|
+
_id: string;
|
|
19
|
+
title: string;
|
|
20
|
+
isVisible: boolean;
|
|
21
|
+
position?: number;
|
|
22
|
+
}];
|
|
23
|
+
position?: number;
|
|
24
|
+
parentId?: string;
|
|
25
|
+
error?: any;
|
|
26
|
+
views?: number;
|
|
27
|
+
aiMetadata?: {
|
|
28
|
+
contentGenerated?: boolean;
|
|
29
|
+
contentGeneratedDate?: import('../models').Created;
|
|
30
|
+
};
|
|
31
|
+
}[];
|
|
32
|
+
_id: string;
|
|
33
|
+
title: string;
|
|
34
|
+
thumbnail: string;
|
|
35
|
+
created: import('../models').Created;
|
|
36
|
+
modified: import('../models').Modified;
|
|
37
|
+
owner: import('../models').Owner;
|
|
38
|
+
rights: string[];
|
|
39
|
+
index?: string;
|
|
40
|
+
shared?: string[];
|
|
41
|
+
aiGenerated?: boolean;
|
|
42
|
+
aiMetadata?: import('../models').AIMetadata;
|
|
43
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { WikiPagesDto } from '../models';
|
|
2
|
+
export declare const dtoToWikiPages: (dto: WikiPagesDto) => {
|
|
3
|
+
comments: {
|
|
4
|
+
id: string;
|
|
5
|
+
comment: string;
|
|
6
|
+
authorId: string;
|
|
7
|
+
authorName: string;
|
|
8
|
+
createdAt: number;
|
|
9
|
+
updatedAt: number;
|
|
10
|
+
replyTo: string | undefined;
|
|
11
|
+
deleted: boolean | undefined;
|
|
12
|
+
}[] | undefined;
|
|
13
|
+
isVisible: boolean;
|
|
14
|
+
_id: string;
|
|
15
|
+
title: string;
|
|
16
|
+
content: string;
|
|
17
|
+
contentPlain: string;
|
|
18
|
+
contentVersion: number;
|
|
19
|
+
author: string;
|
|
20
|
+
authorName: string;
|
|
21
|
+
created?: import('../models').Created;
|
|
22
|
+
modified: import('../models').Modified;
|
|
23
|
+
lastContributer?: string;
|
|
24
|
+
lastContributerName?: string;
|
|
25
|
+
children?: [{
|
|
26
|
+
_id: string;
|
|
27
|
+
title: string;
|
|
28
|
+
isVisible: boolean;
|
|
29
|
+
position?: number;
|
|
30
|
+
}];
|
|
31
|
+
parentId?: string;
|
|
32
|
+
position?: number;
|
|
33
|
+
}[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Page } from '../models';
|
|
2
|
+
type Child = {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
isVisible: boolean;
|
|
6
|
+
position: number | undefined;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Get all children of a page recursively (flatten the tree)
|
|
10
|
+
* - Direct children
|
|
11
|
+
* - Children of children
|
|
12
|
+
* - Orphans (children of the page that have parentId equal to the page id)
|
|
13
|
+
*/
|
|
14
|
+
export declare const getChildrenRecursively: ({ page, allPages, filterPage, }: {
|
|
15
|
+
page: Page;
|
|
16
|
+
allPages: Page[];
|
|
17
|
+
filterPage: (page: Page) => boolean;
|
|
18
|
+
}) => Record<string, Child>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getFormValue: (formData: FormData, key: string) => string;
|
package/package.json
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@edifice.io/wiki",
|
|
3
|
+
"version": "3.4.0-develop-pedago.1",
|
|
4
|
+
"license": "GPL-3.0",
|
|
5
|
+
"author": "Edifice",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"husky": {
|
|
8
|
+
"hooks": {
|
|
9
|
+
"pre-commit": "lint-staged"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"lint-staged": {
|
|
13
|
+
"**/*.{ts,tsx}": [
|
|
14
|
+
"pnpm run format",
|
|
15
|
+
"pnpm run lint"
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@edifice.io/bootstrap": "link:../../edifice-frontend-framework/packages/bootstrap",
|
|
20
|
+
"@edifice.io/client": "link:../../edifice-frontend-framework/packages/client",
|
|
21
|
+
"@edifice.io/react": "link:../../edifice-frontend-framework/packages/react",
|
|
22
|
+
"@react-spring/web": "9.7.5",
|
|
23
|
+
"@tanstack/react-query": "5.62.7",
|
|
24
|
+
"@uidotdev/usehooks": "2.4.1",
|
|
25
|
+
"clsx": "2.1.1",
|
|
26
|
+
"i18next": "23.8.1",
|
|
27
|
+
"i18next-http-backend": "2.4.2",
|
|
28
|
+
"lottie-react": "2.4.1",
|
|
29
|
+
"ode-explorer": "link:../../explorer/frontend",
|
|
30
|
+
"react": "18.3.1",
|
|
31
|
+
"react-dom": "18.3.1",
|
|
32
|
+
"react-error-boundary": "4.0.13",
|
|
33
|
+
"react-hook-form": "7.71.1",
|
|
34
|
+
"react-i18next": "14.1.0",
|
|
35
|
+
"react-router-dom": "6.30.3",
|
|
36
|
+
"zustand": "4.5.7"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@axe-core/react": "4.11.1",
|
|
40
|
+
"@babel/plugin-transform-react-pure-annotations": "7.23.3",
|
|
41
|
+
"@eslint/js": "9.39.2",
|
|
42
|
+
"@tanstack/react-query-devtools": "5.91.3",
|
|
43
|
+
"@testing-library/jest-dom": "6.5.0",
|
|
44
|
+
"@testing-library/react": "16.0.1",
|
|
45
|
+
"@testing-library/user-event": "14.5.2",
|
|
46
|
+
"@types/node": "18.19.130",
|
|
47
|
+
"@types/react": "18.3.27",
|
|
48
|
+
"@types/react-dom": "18.3.7",
|
|
49
|
+
"@vitejs/plugin-react": "4.7.0",
|
|
50
|
+
"@vitest/coverage-v8": "2.1.9",
|
|
51
|
+
"@vitest/ui": "2.1.9",
|
|
52
|
+
"eslint": "9.39.2",
|
|
53
|
+
"eslint-plugin-react-hooks": "5.1.0-rc-fb9a90fa48-20240614",
|
|
54
|
+
"eslint-plugin-react-refresh": "0.4.26",
|
|
55
|
+
"globals": "15.15.0",
|
|
56
|
+
"husky": "9.1.7",
|
|
57
|
+
"jsdom": "25.0.1",
|
|
58
|
+
"lint-staged": "15.2.9",
|
|
59
|
+
"msw": "2.12.8",
|
|
60
|
+
"nx": "19.6.0",
|
|
61
|
+
"prettier": "3.8.1",
|
|
62
|
+
"typescript": "5.9.3",
|
|
63
|
+
"typescript-eslint": "8.54.0",
|
|
64
|
+
"vite": "5.4.21",
|
|
65
|
+
"vite-plugin-dts": "4.5.4",
|
|
66
|
+
"vite-tsconfig-paths": "5.1.4",
|
|
67
|
+
"vitest": "2.1.9"
|
|
68
|
+
},
|
|
69
|
+
"files": [
|
|
70
|
+
"lib"
|
|
71
|
+
],
|
|
72
|
+
"engines": {
|
|
73
|
+
"node": "20"
|
|
74
|
+
},
|
|
75
|
+
"nx": {},
|
|
76
|
+
"scripts": {
|
|
77
|
+
"build": "pnpm run typecheck && vite build && vite build --mode lib",
|
|
78
|
+
"build-lib": "vite build --mode lib",
|
|
79
|
+
"dev": "vite",
|
|
80
|
+
"typecheck": "tsc -b --noEmit",
|
|
81
|
+
"format": "prettier --write .",
|
|
82
|
+
"lint": "eslint .",
|
|
83
|
+
"pre-commit": "lint-staged",
|
|
84
|
+
"preview": "vite preview",
|
|
85
|
+
"test": "vitest",
|
|
86
|
+
"test:coverage": "vitest run --coverage",
|
|
87
|
+
"test:ui": "vitest --ui",
|
|
88
|
+
"test:watch": "vitest --watch"
|
|
89
|
+
}
|
|
90
|
+
}
|