@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
package/lib/index3.js
ADDED
package/lib/index4.js
ADDED
package/lib/main.d.ts
ADDED
|
File without changes
|
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
import { RightRole } from '@edifice.io/client';
|
|
2
|
+
import { Revision } from '../models/revision';
|
|
3
|
+
export declare const mockUser: {
|
|
4
|
+
userId: string;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const mockGroup: {
|
|
8
|
+
groupId: string;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const mockWikisAsResources: {
|
|
12
|
+
id: string;
|
|
13
|
+
title: string;
|
|
14
|
+
rights: string[];
|
|
15
|
+
}[];
|
|
16
|
+
export declare const mockWiki: {
|
|
17
|
+
_id: string;
|
|
18
|
+
title: string;
|
|
19
|
+
pages: ({
|
|
20
|
+
_id: string;
|
|
21
|
+
title: string;
|
|
22
|
+
content: string;
|
|
23
|
+
contentPlain: string;
|
|
24
|
+
contentVersion: number;
|
|
25
|
+
author: string;
|
|
26
|
+
authorName: string;
|
|
27
|
+
created: {
|
|
28
|
+
$date: number;
|
|
29
|
+
};
|
|
30
|
+
modified: {
|
|
31
|
+
$date: number;
|
|
32
|
+
};
|
|
33
|
+
lastContributer: string;
|
|
34
|
+
lastContributerName: string;
|
|
35
|
+
isVisible: boolean;
|
|
36
|
+
position: number;
|
|
37
|
+
parentId?: undefined;
|
|
38
|
+
} | {
|
|
39
|
+
_id: string;
|
|
40
|
+
title: string;
|
|
41
|
+
content: string;
|
|
42
|
+
contentPlain: string;
|
|
43
|
+
contentVersion: number;
|
|
44
|
+
author: string;
|
|
45
|
+
authorName: string;
|
|
46
|
+
created: {
|
|
47
|
+
$date: number;
|
|
48
|
+
};
|
|
49
|
+
modified: {
|
|
50
|
+
$date: number;
|
|
51
|
+
};
|
|
52
|
+
isVisible: boolean;
|
|
53
|
+
position: number;
|
|
54
|
+
lastContributer?: undefined;
|
|
55
|
+
lastContributerName?: undefined;
|
|
56
|
+
parentId?: undefined;
|
|
57
|
+
} | {
|
|
58
|
+
_id: string;
|
|
59
|
+
title: string;
|
|
60
|
+
content: string;
|
|
61
|
+
contentPlain: string;
|
|
62
|
+
contentVersion: number;
|
|
63
|
+
author: string;
|
|
64
|
+
authorName: string;
|
|
65
|
+
created: {
|
|
66
|
+
$date: number;
|
|
67
|
+
};
|
|
68
|
+
modified: {
|
|
69
|
+
$date: number;
|
|
70
|
+
};
|
|
71
|
+
isVisible: boolean;
|
|
72
|
+
parentId: string;
|
|
73
|
+
position: number;
|
|
74
|
+
lastContributer?: undefined;
|
|
75
|
+
lastContributerName?: undefined;
|
|
76
|
+
})[];
|
|
77
|
+
created: {
|
|
78
|
+
$date: number;
|
|
79
|
+
};
|
|
80
|
+
modified: {
|
|
81
|
+
$date: number;
|
|
82
|
+
};
|
|
83
|
+
owner: {
|
|
84
|
+
userId: string;
|
|
85
|
+
displayName: string;
|
|
86
|
+
};
|
|
87
|
+
index: string;
|
|
88
|
+
rights: never[];
|
|
89
|
+
thumbnail: string;
|
|
90
|
+
};
|
|
91
|
+
export declare const mockWikiWithHiddenIndexPage: {
|
|
92
|
+
_id: string;
|
|
93
|
+
title: string;
|
|
94
|
+
pages: ({
|
|
95
|
+
_id: string;
|
|
96
|
+
title: string;
|
|
97
|
+
content: string;
|
|
98
|
+
contentPlain: string;
|
|
99
|
+
contentVersion: number;
|
|
100
|
+
author: string;
|
|
101
|
+
authorName: string;
|
|
102
|
+
modified: {
|
|
103
|
+
$date: number;
|
|
104
|
+
};
|
|
105
|
+
lastContributer: string;
|
|
106
|
+
lastContributerName: string;
|
|
107
|
+
isVisible: boolean;
|
|
108
|
+
} | {
|
|
109
|
+
_id: string;
|
|
110
|
+
title: string;
|
|
111
|
+
content: string;
|
|
112
|
+
contentPlain: string;
|
|
113
|
+
contentVersion: number;
|
|
114
|
+
author: string;
|
|
115
|
+
authorName: string;
|
|
116
|
+
modified: {
|
|
117
|
+
$date: number;
|
|
118
|
+
};
|
|
119
|
+
isVisible: boolean;
|
|
120
|
+
lastContributer?: undefined;
|
|
121
|
+
lastContributerName?: undefined;
|
|
122
|
+
})[];
|
|
123
|
+
modified: {
|
|
124
|
+
$date: number;
|
|
125
|
+
};
|
|
126
|
+
owner: {
|
|
127
|
+
userId: string;
|
|
128
|
+
displayName: string;
|
|
129
|
+
};
|
|
130
|
+
index: string;
|
|
131
|
+
rights: never[];
|
|
132
|
+
thumbnail: string;
|
|
133
|
+
};
|
|
134
|
+
export declare const mockWikiWithOnlyHiddenPages: {
|
|
135
|
+
_id: string;
|
|
136
|
+
title: string;
|
|
137
|
+
pages: ({
|
|
138
|
+
_id: string;
|
|
139
|
+
title: string;
|
|
140
|
+
content: string;
|
|
141
|
+
contentPlain: string;
|
|
142
|
+
contentVersion: number;
|
|
143
|
+
author: string;
|
|
144
|
+
authorName: string;
|
|
145
|
+
modified: {
|
|
146
|
+
$date: number;
|
|
147
|
+
};
|
|
148
|
+
lastContributer: string;
|
|
149
|
+
lastContributerName: string;
|
|
150
|
+
isVisible: boolean;
|
|
151
|
+
} | {
|
|
152
|
+
_id: string;
|
|
153
|
+
title: string;
|
|
154
|
+
content: string;
|
|
155
|
+
contentPlain: string;
|
|
156
|
+
contentVersion: number;
|
|
157
|
+
author: string;
|
|
158
|
+
authorName: string;
|
|
159
|
+
modified: {
|
|
160
|
+
$date: number;
|
|
161
|
+
};
|
|
162
|
+
isVisible: boolean;
|
|
163
|
+
lastContributer?: undefined;
|
|
164
|
+
lastContributerName?: undefined;
|
|
165
|
+
})[];
|
|
166
|
+
modified: {
|
|
167
|
+
$date: number;
|
|
168
|
+
};
|
|
169
|
+
owner: {
|
|
170
|
+
userId: string;
|
|
171
|
+
displayName: string;
|
|
172
|
+
};
|
|
173
|
+
index: string;
|
|
174
|
+
rights: never[];
|
|
175
|
+
thumbnail: string;
|
|
176
|
+
};
|
|
177
|
+
export declare const mockWikis: ({
|
|
178
|
+
_id: string;
|
|
179
|
+
title: string;
|
|
180
|
+
modified: {
|
|
181
|
+
$date: number;
|
|
182
|
+
};
|
|
183
|
+
owner: {
|
|
184
|
+
userId: string;
|
|
185
|
+
displayName: string;
|
|
186
|
+
};
|
|
187
|
+
index: string;
|
|
188
|
+
thumbnail?: undefined;
|
|
189
|
+
} | {
|
|
190
|
+
_id: string;
|
|
191
|
+
title: string;
|
|
192
|
+
thumbnail: string;
|
|
193
|
+
modified: {
|
|
194
|
+
$date: number;
|
|
195
|
+
};
|
|
196
|
+
owner: {
|
|
197
|
+
userId: string;
|
|
198
|
+
displayName: string;
|
|
199
|
+
};
|
|
200
|
+
index: string;
|
|
201
|
+
})[];
|
|
202
|
+
export declare const mockWikisWithPages: {
|
|
203
|
+
_id: string;
|
|
204
|
+
title: string;
|
|
205
|
+
pages: {
|
|
206
|
+
_id: string;
|
|
207
|
+
title: string;
|
|
208
|
+
author: string;
|
|
209
|
+
authorName: string;
|
|
210
|
+
modified: {
|
|
211
|
+
$date: number;
|
|
212
|
+
};
|
|
213
|
+
contentPlain: string;
|
|
214
|
+
}[];
|
|
215
|
+
owner: {
|
|
216
|
+
userId: string;
|
|
217
|
+
displayName: string;
|
|
218
|
+
};
|
|
219
|
+
modified: {
|
|
220
|
+
$date: number;
|
|
221
|
+
thumbnail: string;
|
|
222
|
+
shared: never[];
|
|
223
|
+
index: string;
|
|
224
|
+
};
|
|
225
|
+
}[];
|
|
226
|
+
export declare const mockWikiWithoutPages: {
|
|
227
|
+
_id: string;
|
|
228
|
+
title: string;
|
|
229
|
+
pages: never[];
|
|
230
|
+
owner: {
|
|
231
|
+
userId: string;
|
|
232
|
+
displayName: string;
|
|
233
|
+
};
|
|
234
|
+
modified: {
|
|
235
|
+
$date: number;
|
|
236
|
+
thumbnail: string;
|
|
237
|
+
shared: never[];
|
|
238
|
+
index: string;
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
export declare const mockWikiPages: {
|
|
242
|
+
pages: ({
|
|
243
|
+
_id: string;
|
|
244
|
+
title: string;
|
|
245
|
+
author: string;
|
|
246
|
+
authorName: string;
|
|
247
|
+
isVisible: boolean;
|
|
248
|
+
position: number;
|
|
249
|
+
created: {
|
|
250
|
+
$date: number;
|
|
251
|
+
};
|
|
252
|
+
modified: {
|
|
253
|
+
$date: number;
|
|
254
|
+
};
|
|
255
|
+
comments: undefined;
|
|
256
|
+
lastContributer?: undefined;
|
|
257
|
+
lastContributerName?: undefined;
|
|
258
|
+
} | {
|
|
259
|
+
_id: string;
|
|
260
|
+
title: string;
|
|
261
|
+
author: string;
|
|
262
|
+
authorName: string;
|
|
263
|
+
isVisible: boolean;
|
|
264
|
+
modified: {
|
|
265
|
+
$date: number;
|
|
266
|
+
};
|
|
267
|
+
comments: undefined;
|
|
268
|
+
lastContributer: string;
|
|
269
|
+
lastContributerName: string;
|
|
270
|
+
position?: undefined;
|
|
271
|
+
created?: undefined;
|
|
272
|
+
})[];
|
|
273
|
+
};
|
|
274
|
+
export declare const mockWikiPagesWithoutContent: {
|
|
275
|
+
_id: string;
|
|
276
|
+
title: string;
|
|
277
|
+
pages: ({
|
|
278
|
+
_id: string;
|
|
279
|
+
title: string;
|
|
280
|
+
author: string;
|
|
281
|
+
authorName: string;
|
|
282
|
+
isVisible: boolean;
|
|
283
|
+
modified: {
|
|
284
|
+
$date: number;
|
|
285
|
+
};
|
|
286
|
+
comments: never[];
|
|
287
|
+
created?: undefined;
|
|
288
|
+
lastContributer?: undefined;
|
|
289
|
+
lastContributerName?: undefined;
|
|
290
|
+
} | {
|
|
291
|
+
title: string;
|
|
292
|
+
isVisible: boolean;
|
|
293
|
+
_id: string;
|
|
294
|
+
author: string;
|
|
295
|
+
authorName: string;
|
|
296
|
+
modified: {
|
|
297
|
+
$date: number;
|
|
298
|
+
};
|
|
299
|
+
created: {
|
|
300
|
+
$date: number;
|
|
301
|
+
};
|
|
302
|
+
comments?: undefined;
|
|
303
|
+
lastContributer?: undefined;
|
|
304
|
+
lastContributerName?: undefined;
|
|
305
|
+
} | {
|
|
306
|
+
title: string;
|
|
307
|
+
isVisible: boolean;
|
|
308
|
+
_id: string;
|
|
309
|
+
author: string;
|
|
310
|
+
authorName: string;
|
|
311
|
+
modified: {
|
|
312
|
+
$date: number;
|
|
313
|
+
};
|
|
314
|
+
created: {
|
|
315
|
+
$date: number;
|
|
316
|
+
};
|
|
317
|
+
lastContributer: string;
|
|
318
|
+
lastContributerName: string;
|
|
319
|
+
comments?: undefined;
|
|
320
|
+
})[];
|
|
321
|
+
created: {
|
|
322
|
+
$date: number;
|
|
323
|
+
};
|
|
324
|
+
modified: {
|
|
325
|
+
$date: number;
|
|
326
|
+
};
|
|
327
|
+
owner: {
|
|
328
|
+
userId: string;
|
|
329
|
+
displayName: string;
|
|
330
|
+
};
|
|
331
|
+
index: string;
|
|
332
|
+
rights: never[];
|
|
333
|
+
thumbnail: string;
|
|
334
|
+
};
|
|
335
|
+
export declare const mockPage: {
|
|
336
|
+
_id: string;
|
|
337
|
+
title: string;
|
|
338
|
+
content: string;
|
|
339
|
+
contentPlain: string;
|
|
340
|
+
contentVersion: number;
|
|
341
|
+
author: string;
|
|
342
|
+
authorName: string;
|
|
343
|
+
created: {
|
|
344
|
+
$date: number;
|
|
345
|
+
};
|
|
346
|
+
modified: {
|
|
347
|
+
$date: number;
|
|
348
|
+
};
|
|
349
|
+
isVisible: boolean;
|
|
350
|
+
lastContributer: string;
|
|
351
|
+
lastContributerName: string;
|
|
352
|
+
};
|
|
353
|
+
export declare const mockWikiWithOnePage: {
|
|
354
|
+
_id: string;
|
|
355
|
+
title: string;
|
|
356
|
+
pages: {
|
|
357
|
+
_id: string;
|
|
358
|
+
title: string;
|
|
359
|
+
content: string;
|
|
360
|
+
contentPlain: string;
|
|
361
|
+
contentVersion: number;
|
|
362
|
+
author: string;
|
|
363
|
+
authorName: string;
|
|
364
|
+
created: {
|
|
365
|
+
$date: number;
|
|
366
|
+
};
|
|
367
|
+
modified: {
|
|
368
|
+
$date: number;
|
|
369
|
+
};
|
|
370
|
+
isVisible: boolean;
|
|
371
|
+
lastContributer: string;
|
|
372
|
+
lastContributerName: string;
|
|
373
|
+
}[];
|
|
374
|
+
owner: {
|
|
375
|
+
userId: string;
|
|
376
|
+
displayName: string;
|
|
377
|
+
};
|
|
378
|
+
};
|
|
379
|
+
export declare const mockRevision: Revision[];
|
|
380
|
+
export declare const mockUserCreator: Record<RightRole, boolean>;
|
|
381
|
+
export declare const mockUserManager: Record<RightRole, boolean>;
|
|
382
|
+
export declare const mockUserRead: Record<RightRole, boolean>;
|
|
383
|
+
export declare const mockUserContrib: Record<RightRole, boolean>;
|
|
384
|
+
export declare const mockTreeData: {
|
|
385
|
+
id: string;
|
|
386
|
+
name: string;
|
|
387
|
+
section: boolean;
|
|
388
|
+
showIconSection: boolean;
|
|
389
|
+
}[];
|
|
390
|
+
export declare const mockPagesIDsForViewCounter: string[];
|
|
391
|
+
export declare const mockPagesViewCounterResponse: {
|
|
392
|
+
'66dab5f5812656287f15fd41': number;
|
|
393
|
+
'670541bc088c9c7ceeca2c3f': number;
|
|
394
|
+
};
|
|
395
|
+
export declare const mockActionItemsAriaLabel: string[];
|
|
396
|
+
export declare const mockPoll: {
|
|
397
|
+
_id: string;
|
|
398
|
+
name: string;
|
|
399
|
+
description: null;
|
|
400
|
+
votes: {
|
|
401
|
+
vote: string;
|
|
402
|
+
userId: string;
|
|
403
|
+
userName: string;
|
|
404
|
+
userEmail: string;
|
|
405
|
+
created: null;
|
|
406
|
+
modified: number;
|
|
407
|
+
}[];
|
|
408
|
+
created: number;
|
|
409
|
+
modified: null;
|
|
410
|
+
authorId: string;
|
|
411
|
+
authorName: string;
|
|
412
|
+
authorEmail: string;
|
|
413
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const server: import('msw/node').SetupServerApi;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RenderOptions, RenderResult } from '@testing-library/react';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
3
|
+
declare const user: import('@testing-library/user-event').UserEvent;
|
|
4
|
+
declare const customRender: (ui: ReactElement, options?: Omit<RenderOptions, "wrapper">) => RenderResult & {
|
|
5
|
+
user: typeof user;
|
|
6
|
+
};
|
|
7
|
+
export declare const wrapper: ({ children, }: {
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export * from '@testing-library/react';
|
|
11
|
+
export { customRender as render };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CommentCreated, CommentModified } from './date';
|
|
2
|
+
export interface CommentDto {
|
|
3
|
+
_id: string;
|
|
4
|
+
comment: string;
|
|
5
|
+
author: string;
|
|
6
|
+
authorName: string;
|
|
7
|
+
created: CommentCreated;
|
|
8
|
+
modified: CommentModified;
|
|
9
|
+
replyTo?: string;
|
|
10
|
+
deleted?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface Comment {
|
|
13
|
+
id: string;
|
|
14
|
+
comment: string;
|
|
15
|
+
authorId: string;
|
|
16
|
+
authorName: string;
|
|
17
|
+
createdAt: number;
|
|
18
|
+
updatedAt?: number;
|
|
19
|
+
replyTo?: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { Comment, CommentDto } from './comment';
|
|
2
|
+
import { Created, Modified } from './date';
|
|
3
|
+
export interface PageDto {
|
|
4
|
+
_id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
content: string;
|
|
7
|
+
contentPlain: string;
|
|
8
|
+
contentVersion: number;
|
|
9
|
+
author: string;
|
|
10
|
+
authorName: string;
|
|
11
|
+
created?: Created;
|
|
12
|
+
modified: Modified;
|
|
13
|
+
isVisible: boolean;
|
|
14
|
+
lastContributer?: string;
|
|
15
|
+
lastContributerName?: string;
|
|
16
|
+
comments?: CommentDto[];
|
|
17
|
+
children?: [
|
|
18
|
+
{
|
|
19
|
+
_id: string;
|
|
20
|
+
title: string;
|
|
21
|
+
isVisible: boolean;
|
|
22
|
+
position?: number;
|
|
23
|
+
}
|
|
24
|
+
];
|
|
25
|
+
parentId?: string;
|
|
26
|
+
position?: number;
|
|
27
|
+
}
|
|
28
|
+
export interface Page {
|
|
29
|
+
_id: string;
|
|
30
|
+
title: string;
|
|
31
|
+
content: string;
|
|
32
|
+
contentPlain: string;
|
|
33
|
+
contentVersion: number;
|
|
34
|
+
author: string;
|
|
35
|
+
authorName: string;
|
|
36
|
+
modified: Modified;
|
|
37
|
+
created?: Created;
|
|
38
|
+
isVisible: boolean;
|
|
39
|
+
lastContributer?: string;
|
|
40
|
+
lastContributerName?: string;
|
|
41
|
+
comments?: Comment[];
|
|
42
|
+
children?: [
|
|
43
|
+
{
|
|
44
|
+
_id: string;
|
|
45
|
+
title: string;
|
|
46
|
+
isVisible: boolean;
|
|
47
|
+
position?: number;
|
|
48
|
+
}
|
|
49
|
+
];
|
|
50
|
+
position?: number;
|
|
51
|
+
parentId?: string;
|
|
52
|
+
error?: any;
|
|
53
|
+
views?: number;
|
|
54
|
+
aiMetadata?: {
|
|
55
|
+
contentGenerated?: boolean;
|
|
56
|
+
contentGeneratedDate?: Created;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
export interface PageWithoutContent {
|
|
60
|
+
_id: string;
|
|
61
|
+
title: string;
|
|
62
|
+
author: string;
|
|
63
|
+
authorName: string;
|
|
64
|
+
modified: Modified;
|
|
65
|
+
created?: Created;
|
|
66
|
+
isVisible: boolean;
|
|
67
|
+
lastContributer?: string;
|
|
68
|
+
lastContributerName?: string;
|
|
69
|
+
comments?: Comment[];
|
|
70
|
+
children?: [
|
|
71
|
+
{
|
|
72
|
+
_id: string;
|
|
73
|
+
title: string;
|
|
74
|
+
isVisible: boolean;
|
|
75
|
+
position?: number;
|
|
76
|
+
}
|
|
77
|
+
];
|
|
78
|
+
parentId?: string;
|
|
79
|
+
position?: number;
|
|
80
|
+
}
|
|
81
|
+
export type DuplicatePagePayload = Pick<Page, 'title' | 'content' | 'isVisible' | 'position'>;
|
|
82
|
+
export type DuplicatePageResult = {
|
|
83
|
+
newPageIds: Array<{
|
|
84
|
+
pageId: string;
|
|
85
|
+
wikiId: string;
|
|
86
|
+
}>;
|
|
87
|
+
};
|
|
88
|
+
export type DuplicatePageResultOrError = DuplicatePageResult | {
|
|
89
|
+
error: string;
|
|
90
|
+
};
|
|
91
|
+
export type PickedPageId = Pick<Page, '_id' | 'error'>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { UpdateTreeData } from '@edifice.io/react';
|
|
2
|
+
export type UpdateTreeDataWithVisibility = UpdateTreeData & {
|
|
3
|
+
isVisible?: boolean;
|
|
4
|
+
isIndex?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export interface PagePostPayload {
|
|
7
|
+
title: string;
|
|
8
|
+
content: string;
|
|
9
|
+
isIndex?: boolean;
|
|
10
|
+
parentId?: string;
|
|
11
|
+
isVisible?: boolean;
|
|
12
|
+
position?: number;
|
|
13
|
+
}
|
|
14
|
+
export interface PagePutPayload {
|
|
15
|
+
title: string;
|
|
16
|
+
content: string;
|
|
17
|
+
isIndex?: boolean;
|
|
18
|
+
wasIndex?: boolean;
|
|
19
|
+
isVisible?: boolean;
|
|
20
|
+
parentId?: string;
|
|
21
|
+
position?: number;
|
|
22
|
+
}
|
|
23
|
+
export interface PagesPutPayload {
|
|
24
|
+
pages: UpdateTreeDataWithVisibility[];
|
|
25
|
+
}
|
|
26
|
+
export interface CommentPostPayload {
|
|
27
|
+
comment: string;
|
|
28
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { TreeItem } from '@edifice.io/react';
|
|
2
|
+
import { Created, Modified } from './date';
|
|
3
|
+
import { Page, PageDto } from './page';
|
|
4
|
+
export interface AIMetadata {
|
|
5
|
+
level: string;
|
|
6
|
+
subject: string;
|
|
7
|
+
sequence: string;
|
|
8
|
+
keywords: string;
|
|
9
|
+
generationDate: {
|
|
10
|
+
$date: string;
|
|
11
|
+
};
|
|
12
|
+
contentGenerated: boolean;
|
|
13
|
+
contentGeneratedDate: {
|
|
14
|
+
$date: string;
|
|
15
|
+
};
|
|
16
|
+
usage: {
|
|
17
|
+
completion_tokens: number;
|
|
18
|
+
prompt_tokens: number;
|
|
19
|
+
total_tokens: number;
|
|
20
|
+
model: string;
|
|
21
|
+
version: string;
|
|
22
|
+
status: string;
|
|
23
|
+
};
|
|
24
|
+
structureGenerated: boolean;
|
|
25
|
+
structureGeneratedDate: {
|
|
26
|
+
$date: string;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export interface WikiDto {
|
|
30
|
+
_id: string;
|
|
31
|
+
title: string;
|
|
32
|
+
pages: Page[];
|
|
33
|
+
thumbnail: string;
|
|
34
|
+
created: Created;
|
|
35
|
+
modified: Modified;
|
|
36
|
+
owner: Owner;
|
|
37
|
+
rights: string[];
|
|
38
|
+
index?: string;
|
|
39
|
+
shared?: string[];
|
|
40
|
+
aiGenerated?: boolean;
|
|
41
|
+
aiMetadata?: AIMetadata;
|
|
42
|
+
}
|
|
43
|
+
export interface WikiPagesDto {
|
|
44
|
+
pages: PageDto[];
|
|
45
|
+
}
|
|
46
|
+
export interface Wiki {
|
|
47
|
+
_id: string;
|
|
48
|
+
title: string;
|
|
49
|
+
modified: Modified;
|
|
50
|
+
owner: Owner;
|
|
51
|
+
index?: string;
|
|
52
|
+
shared?: string[];
|
|
53
|
+
rights: string[];
|
|
54
|
+
pages: Page[];
|
|
55
|
+
thumbnail: string;
|
|
56
|
+
}
|
|
57
|
+
export type PickedWiki = Omit<Wiki, 'pages' | 'thumbnail'>;
|
|
58
|
+
export interface Owner {
|
|
59
|
+
userId: string;
|
|
60
|
+
displayName: string;
|
|
61
|
+
}
|
|
62
|
+
export type Shared = string[];
|
|
63
|
+
export interface WikiTreeItem extends TreeItem {
|
|
64
|
+
aiMetadata?: {
|
|
65
|
+
contentGenerated?: boolean;
|
|
66
|
+
contentGeneratedDate?: Created;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { QueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export declare const queryClient: QueryClient;
|
|
4
|
+
export declare const Providers: ({ children }: {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const CustomProviders: ({ children, }: {
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|