@mapomodule/uikit 2.0.0-beta.12 → 2.0.0-beta.14
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/README.md +46 -174
- package/dist/__tests__/MapoConfirmDialog.component.test.d.ts +2 -0
- package/dist/__tests__/MapoConfirmDialog.component.test.d.ts.map +1 -0
- package/dist/__tests__/MapoDetail.component.test.d.ts +2 -0
- package/dist/__tests__/MapoDetail.component.test.d.ts.map +1 -0
- package/dist/__tests__/MapoDetailLangSwitch.component.test.d.ts +2 -0
- package/dist/__tests__/MapoDetailLangSwitch.component.test.d.ts.map +1 -0
- package/dist/__tests__/MapoListTable.component.test.d.ts +2 -0
- package/dist/__tests__/MapoListTable.component.test.d.ts.map +1 -0
- package/dist/__tests__/__mocks__/nuxt-app.d.ts +9 -0
- package/dist/__tests__/__mocks__/nuxt-app.d.ts.map +1 -0
- package/dist/__tests__/listTable.test.d.ts +2 -0
- package/dist/__tests__/listTable.test.d.ts.map +1 -0
- package/dist/__tests__/mediaLanguages.test.d.ts +2 -0
- package/dist/__tests__/mediaLanguages.test.d.ts.map +1 -0
- package/dist/module.json +1 -1
- package/dist/runtime/assets/main.css +1 -1
- package/dist/runtime/components/MapoConfirmDialog.vue +18 -1
- package/dist/runtime/components/MapoConfirmDialog.vue.d.ts.map +1 -1
- package/dist/runtime/components/MapoDetail.vue +43 -11
- package/dist/runtime/components/MapoDetail.vue.d.ts +76 -0
- package/dist/runtime/components/MapoDetail.vue.d.ts.map +1 -1
- package/dist/runtime/components/MapoDetailLangSwitch.vue +21 -25
- package/dist/runtime/components/MapoDetailLangSwitch.vue.d.ts +4 -3
- package/dist/runtime/components/MapoDetailLangSwitch.vue.d.ts.map +1 -1
- package/dist/runtime/components/MapoList.vue +3 -2
- package/dist/runtime/components/MapoList.vue.d.ts +9 -4
- package/dist/runtime/components/MapoList.vue.d.ts.map +1 -1
- package/dist/runtime/components/MapoListTable.vue +98 -32
- package/dist/runtime/components/MapoListTable.vue.d.ts +11 -6
- package/dist/runtime/components/MapoListTable.vue.d.ts.map +1 -1
- package/dist/runtime/components/MapoMediaEditor.vue +10 -4
- package/dist/runtime/components/MapoMediaEditor.vue.d.ts +1 -0
- package/dist/runtime/components/MapoMediaEditor.vue.d.ts.map +1 -1
- package/dist/runtime/components/MapoMediaPreview.vue.d.ts +1 -1
- package/dist/runtime/components/MapoMediaPreview.vue.d.ts.map +1 -1
- package/dist/runtime/components/MapoMediaUploader.vue +21 -21
- package/dist/runtime/components/MapoMediaUploader.vue.d.ts.map +1 -1
- package/dist/runtime/components/MapoMenuTreeview.vue.d.ts +1 -1
- package/dist/runtime/components/MapoMenuTreeview.vue.d.ts.map +1 -1
- package/dist/runtime/components/MapoMenuTreeviewNode.vue.d.ts +2 -2
- package/dist/runtime/stores/media.d.ts +8 -2
- package/dist/runtime/stores/media.d.ts.map +1 -1
- package/dist/runtime/stores/media.js +16 -0
- package/dist/runtime/types/list.d.ts +10 -2
- package/dist/runtime/types/list.d.ts.map +1 -1
- package/dist/runtime/utils/listTable.d.ts +29 -0
- package/dist/runtime/utils/listTable.d.ts.map +1 -0
- package/dist/runtime/utils/listTable.js +21 -0
- package/package.json +6 -6
- package/src/__tests__/MapoConfirmDialog.component.test.ts +165 -0
- package/src/__tests__/MapoDetail.component.test.ts +293 -0
- package/src/__tests__/MapoDetailLangSwitch.component.test.ts +145 -0
- package/src/__tests__/MapoListTable.component.test.ts +504 -0
- package/src/__tests__/__mocks__/nuxt-app.ts +8 -0
- package/src/__tests__/listTable.test.ts +82 -0
- package/src/__tests__/mediaLanguages.test.ts +66 -0
- package/src/runtime/assets/main.css +9 -0
- package/src/runtime/components/MapoConfirmDialog.vue +28 -1
- package/src/runtime/components/MapoDetail.vue +78 -11
- package/src/runtime/components/MapoDetailLangSwitch.vue +26 -27
- package/src/runtime/components/MapoList.vue +13 -5
- package/src/runtime/components/MapoListTable.vue +128 -41
- package/src/runtime/components/MapoMediaEditor.vue +17 -4
- package/src/runtime/components/MapoMediaUploader.vue +25 -21
- package/src/runtime/stores/media.ts +32 -0
- package/src/runtime/types/list.ts +10 -2
- package/src/runtime/utils/listTable.ts +54 -0
|
@@ -34,6 +34,12 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
34
34
|
sidebarFields?: AnyFieldDescriptor<T>[];
|
|
35
35
|
/** Translation language codes (e.g. ['it', 'en']). */
|
|
36
36
|
languages?: string[];
|
|
37
|
+
/**
|
|
38
|
+
* Number of languages above which the language switcher adds a searchable
|
|
39
|
+
* select next to its tabs. Default `8` (from MapoDetailLangSwitch); `0`
|
|
40
|
+
* always shows it.
|
|
41
|
+
*/
|
|
42
|
+
langThreshold?: number;
|
|
37
43
|
/** Human readable model name shown in the page title. */
|
|
38
44
|
modelName?: string | null;
|
|
39
45
|
/** Sidebar column span (1–11 in a 12-col grid). */
|
|
@@ -109,7 +115,9 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
109
115
|
currentLang: string;
|
|
110
116
|
isNew: boolean;
|
|
111
117
|
isLoading: boolean;
|
|
118
|
+
/** From the click until the save is done; after `save(true)`, until the page has gone back. */
|
|
112
119
|
isSaving: boolean;
|
|
120
|
+
/** From the confirmation until the delete is done and the page has gone back. */
|
|
113
121
|
isDeleting: boolean;
|
|
114
122
|
isDirty: boolean;
|
|
115
123
|
draftBanner: {
|
|
@@ -119,8 +127,11 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
119
127
|
} | null;
|
|
120
128
|
readonly: boolean;
|
|
121
129
|
canDelete: boolean;
|
|
130
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
122
131
|
save: (andBack?: boolean) => Promise<void>;
|
|
132
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
123
133
|
deleteItem: () => Promise<void>;
|
|
134
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
124
135
|
back: () => void;
|
|
125
136
|
}): VNode[];
|
|
126
137
|
/** Replaces the language switcher in the main column. */
|
|
@@ -130,7 +141,9 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
130
141
|
currentLang: string;
|
|
131
142
|
isNew: boolean;
|
|
132
143
|
isLoading: boolean;
|
|
144
|
+
/** From the click until the save is done; after `save(true)`, until the page has gone back. */
|
|
133
145
|
isSaving: boolean;
|
|
146
|
+
/** From the confirmation until the delete is done and the page has gone back. */
|
|
134
147
|
isDeleting: boolean;
|
|
135
148
|
isDirty: boolean;
|
|
136
149
|
draftBanner: {
|
|
@@ -140,8 +153,11 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
140
153
|
} | null;
|
|
141
154
|
readonly: boolean;
|
|
142
155
|
canDelete: boolean;
|
|
156
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
143
157
|
save: (andBack?: boolean) => Promise<void>;
|
|
158
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
144
159
|
deleteItem: () => Promise<void>;
|
|
160
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
145
161
|
back: () => void;
|
|
146
162
|
}): VNode[];
|
|
147
163
|
/**
|
|
@@ -155,7 +171,9 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
155
171
|
currentLang: string;
|
|
156
172
|
isNew: boolean;
|
|
157
173
|
isLoading: boolean;
|
|
174
|
+
/** From the click until the save is done; after `save(true)`, until the page has gone back. */
|
|
158
175
|
isSaving: boolean;
|
|
176
|
+
/** From the confirmation until the delete is done and the page has gone back. */
|
|
159
177
|
isDeleting: boolean;
|
|
160
178
|
isDirty: boolean;
|
|
161
179
|
draftBanner: {
|
|
@@ -165,8 +183,11 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
165
183
|
} | null;
|
|
166
184
|
readonly: boolean;
|
|
167
185
|
canDelete: boolean;
|
|
186
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
168
187
|
save: (andBack?: boolean) => Promise<void>;
|
|
188
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
169
189
|
deleteItem: () => Promise<void>;
|
|
190
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
170
191
|
back: () => void;
|
|
171
192
|
}): VNode[];
|
|
172
193
|
/** Extra content above the main form. */
|
|
@@ -176,7 +197,9 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
176
197
|
currentLang: string;
|
|
177
198
|
isNew: boolean;
|
|
178
199
|
isLoading: boolean;
|
|
200
|
+
/** From the click until the save is done; after `save(true)`, until the page has gone back. */
|
|
179
201
|
isSaving: boolean;
|
|
202
|
+
/** From the confirmation until the delete is done and the page has gone back. */
|
|
180
203
|
isDeleting: boolean;
|
|
181
204
|
isDirty: boolean;
|
|
182
205
|
draftBanner: {
|
|
@@ -186,8 +209,11 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
186
209
|
} | null;
|
|
187
210
|
readonly: boolean;
|
|
188
211
|
canDelete: boolean;
|
|
212
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
189
213
|
save: (andBack?: boolean) => Promise<void>;
|
|
214
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
190
215
|
deleteItem: () => Promise<void>;
|
|
216
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
191
217
|
back: () => void;
|
|
192
218
|
}): VNode[];
|
|
193
219
|
/** Replaces the entire main form. */
|
|
@@ -197,7 +223,9 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
197
223
|
currentLang: string;
|
|
198
224
|
isNew: boolean;
|
|
199
225
|
isLoading: boolean;
|
|
226
|
+
/** From the click until the save is done; after `save(true)`, until the page has gone back. */
|
|
200
227
|
isSaving: boolean;
|
|
228
|
+
/** From the confirmation until the delete is done and the page has gone back. */
|
|
201
229
|
isDeleting: boolean;
|
|
202
230
|
isDirty: boolean;
|
|
203
231
|
draftBanner: {
|
|
@@ -207,8 +235,11 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
207
235
|
} | null;
|
|
208
236
|
readonly: boolean;
|
|
209
237
|
canDelete: boolean;
|
|
238
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
210
239
|
save: (andBack?: boolean) => Promise<void>;
|
|
240
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
211
241
|
deleteItem: () => Promise<void>;
|
|
242
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
212
243
|
back: () => void;
|
|
213
244
|
}): VNode[];
|
|
214
245
|
/** Extra content below the main form. */
|
|
@@ -218,7 +249,9 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
218
249
|
currentLang: string;
|
|
219
250
|
isNew: boolean;
|
|
220
251
|
isLoading: boolean;
|
|
252
|
+
/** From the click until the save is done; after `save(true)`, until the page has gone back. */
|
|
221
253
|
isSaving: boolean;
|
|
254
|
+
/** From the confirmation until the delete is done and the page has gone back. */
|
|
222
255
|
isDeleting: boolean;
|
|
223
256
|
isDirty: boolean;
|
|
224
257
|
draftBanner: {
|
|
@@ -228,8 +261,11 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
228
261
|
} | null;
|
|
229
262
|
readonly: boolean;
|
|
230
263
|
canDelete: boolean;
|
|
264
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
231
265
|
save: (andBack?: boolean) => Promise<void>;
|
|
266
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
232
267
|
deleteItem: () => Promise<void>;
|
|
268
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
233
269
|
back: () => void;
|
|
234
270
|
}): VNode[];
|
|
235
271
|
/** Replaces the entire sidebar action card (save/delete/back buttons). */
|
|
@@ -239,7 +275,9 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
239
275
|
currentLang: string;
|
|
240
276
|
isNew: boolean;
|
|
241
277
|
isLoading: boolean;
|
|
278
|
+
/** From the click until the save is done; after `save(true)`, until the page has gone back. */
|
|
242
279
|
isSaving: boolean;
|
|
280
|
+
/** From the confirmation until the delete is done and the page has gone back. */
|
|
243
281
|
isDeleting: boolean;
|
|
244
282
|
isDirty: boolean;
|
|
245
283
|
draftBanner: {
|
|
@@ -249,8 +287,11 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
249
287
|
} | null;
|
|
250
288
|
readonly: boolean;
|
|
251
289
|
canDelete: boolean;
|
|
290
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
252
291
|
save: (andBack?: boolean) => Promise<void>;
|
|
292
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
253
293
|
deleteItem: () => Promise<void>;
|
|
294
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
254
295
|
back: () => void;
|
|
255
296
|
}): VNode[];
|
|
256
297
|
/** Override just the Save button. */
|
|
@@ -260,7 +301,9 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
260
301
|
currentLang: string;
|
|
261
302
|
isNew: boolean;
|
|
262
303
|
isLoading: boolean;
|
|
304
|
+
/** From the click until the save is done; after `save(true)`, until the page has gone back. */
|
|
263
305
|
isSaving: boolean;
|
|
306
|
+
/** From the confirmation until the delete is done and the page has gone back. */
|
|
264
307
|
isDeleting: boolean;
|
|
265
308
|
isDirty: boolean;
|
|
266
309
|
draftBanner: {
|
|
@@ -270,8 +313,11 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
270
313
|
} | null;
|
|
271
314
|
readonly: boolean;
|
|
272
315
|
canDelete: boolean;
|
|
316
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
273
317
|
save: (andBack?: boolean) => Promise<void>;
|
|
318
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
274
319
|
deleteItem: () => Promise<void>;
|
|
320
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
275
321
|
back: () => void;
|
|
276
322
|
}): VNode[];
|
|
277
323
|
/** Override just the Save & continue button. */
|
|
@@ -281,7 +327,9 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
281
327
|
currentLang: string;
|
|
282
328
|
isNew: boolean;
|
|
283
329
|
isLoading: boolean;
|
|
330
|
+
/** From the click until the save is done; after `save(true)`, until the page has gone back. */
|
|
284
331
|
isSaving: boolean;
|
|
332
|
+
/** From the confirmation until the delete is done and the page has gone back. */
|
|
285
333
|
isDeleting: boolean;
|
|
286
334
|
isDirty: boolean;
|
|
287
335
|
draftBanner: {
|
|
@@ -291,8 +339,11 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
291
339
|
} | null;
|
|
292
340
|
readonly: boolean;
|
|
293
341
|
canDelete: boolean;
|
|
342
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
294
343
|
save: (andBack?: boolean) => Promise<void>;
|
|
344
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
295
345
|
deleteItem: () => Promise<void>;
|
|
346
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
296
347
|
back: () => void;
|
|
297
348
|
}): VNode[];
|
|
298
349
|
/** Override just the Back button. */
|
|
@@ -302,7 +353,9 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
302
353
|
currentLang: string;
|
|
303
354
|
isNew: boolean;
|
|
304
355
|
isLoading: boolean;
|
|
356
|
+
/** From the click until the save is done; after `save(true)`, until the page has gone back. */
|
|
305
357
|
isSaving: boolean;
|
|
358
|
+
/** From the confirmation until the delete is done and the page has gone back. */
|
|
306
359
|
isDeleting: boolean;
|
|
307
360
|
isDirty: boolean;
|
|
308
361
|
draftBanner: {
|
|
@@ -312,8 +365,11 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
312
365
|
} | null;
|
|
313
366
|
readonly: boolean;
|
|
314
367
|
canDelete: boolean;
|
|
368
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
315
369
|
save: (andBack?: boolean) => Promise<void>;
|
|
370
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
316
371
|
deleteItem: () => Promise<void>;
|
|
372
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
317
373
|
back: () => void;
|
|
318
374
|
}): VNode[];
|
|
319
375
|
/** Override just the Delete button. */
|
|
@@ -323,7 +379,9 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
323
379
|
currentLang: string;
|
|
324
380
|
isNew: boolean;
|
|
325
381
|
isLoading: boolean;
|
|
382
|
+
/** From the click until the save is done; after `save(true)`, until the page has gone back. */
|
|
326
383
|
isSaving: boolean;
|
|
384
|
+
/** From the confirmation until the delete is done and the page has gone back. */
|
|
327
385
|
isDeleting: boolean;
|
|
328
386
|
isDirty: boolean;
|
|
329
387
|
draftBanner: {
|
|
@@ -333,8 +391,11 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
333
391
|
} | null;
|
|
334
392
|
readonly: boolean;
|
|
335
393
|
canDelete: boolean;
|
|
394
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
336
395
|
save: (andBack?: boolean) => Promise<void>;
|
|
396
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
337
397
|
deleteItem: () => Promise<void>;
|
|
398
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
338
399
|
back: () => void;
|
|
339
400
|
}): VNode[];
|
|
340
401
|
/** Extra content at the top of the sidebar (below action buttons). */
|
|
@@ -344,7 +405,9 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
344
405
|
currentLang: string;
|
|
345
406
|
isNew: boolean;
|
|
346
407
|
isLoading: boolean;
|
|
408
|
+
/** From the click until the save is done; after `save(true)`, until the page has gone back. */
|
|
347
409
|
isSaving: boolean;
|
|
410
|
+
/** From the confirmation until the delete is done and the page has gone back. */
|
|
348
411
|
isDeleting: boolean;
|
|
349
412
|
isDirty: boolean;
|
|
350
413
|
draftBanner: {
|
|
@@ -354,8 +417,11 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
354
417
|
} | null;
|
|
355
418
|
readonly: boolean;
|
|
356
419
|
canDelete: boolean;
|
|
420
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
357
421
|
save: (andBack?: boolean) => Promise<void>;
|
|
422
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
358
423
|
deleteItem: () => Promise<void>;
|
|
424
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
359
425
|
back: () => void;
|
|
360
426
|
}): VNode[];
|
|
361
427
|
/** Extra content at the bottom of the sidebar, above the danger zone. */
|
|
@@ -365,7 +431,9 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
365
431
|
currentLang: string;
|
|
366
432
|
isNew: boolean;
|
|
367
433
|
isLoading: boolean;
|
|
434
|
+
/** From the click until the save is done; after `save(true)`, until the page has gone back. */
|
|
368
435
|
isSaving: boolean;
|
|
436
|
+
/** From the confirmation until the delete is done and the page has gone back. */
|
|
369
437
|
isDeleting: boolean;
|
|
370
438
|
isDirty: boolean;
|
|
371
439
|
draftBanner: {
|
|
@@ -375,8 +443,11 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
375
443
|
} | null;
|
|
376
444
|
readonly: boolean;
|
|
377
445
|
canDelete: boolean;
|
|
446
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
378
447
|
save: (andBack?: boolean) => Promise<void>;
|
|
448
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
379
449
|
deleteItem: () => Promise<void>;
|
|
450
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
380
451
|
back: () => void;
|
|
381
452
|
}): VNode[];
|
|
382
453
|
/**
|
|
@@ -389,7 +460,9 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
389
460
|
currentLang: string;
|
|
390
461
|
isNew: boolean;
|
|
391
462
|
isLoading: boolean;
|
|
463
|
+
/** From the click until the save is done; after `save(true)`, until the page has gone back. */
|
|
392
464
|
isSaving: boolean;
|
|
465
|
+
/** From the confirmation until the delete is done and the page has gone back. */
|
|
393
466
|
isDeleting: boolean;
|
|
394
467
|
isDirty: boolean;
|
|
395
468
|
draftBanner: {
|
|
@@ -399,8 +472,11 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
399
472
|
} | null;
|
|
400
473
|
readonly: boolean;
|
|
401
474
|
canDelete: boolean;
|
|
475
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
402
476
|
save: (andBack?: boolean) => Promise<void>;
|
|
477
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
403
478
|
deleteItem: () => Promise<void>;
|
|
479
|
+
/** Ignored while a save, a delete or a navigation back is under way. */
|
|
404
480
|
back: () => void;
|
|
405
481
|
}): VNode[];
|
|
406
482
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapoDetail.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/components/MapoDetail.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MapoDetail.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/components/MapoDetail.vue"],"names":[],"mappings":"AA8+BA,OAAO,EAUL,KAAK,KAAK,EAEX,MAAM,KAAK,CAAC;AAYb,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAIhF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wDAAwD,CAAC;AAEvG,OAAO,KAAK,EAAE,e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D,MAAM,OAAO,CAAC,IAAI,CAAC;YAC/B,wEAAwE;kBAClE,MAAM,IAAI;YAiCoB,KAAK,EAAE;QAC3C;;;WAGG;;mBAvDI,CAAC;oBACA,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;yBACnB,MAAM;mBACZ,OAAO;uBACH,OAAO;YAClB,+FAA+F;sBACrF,OAAO;YACjB,iFAAiF;wBACrE,OAAO;qBACV,OAAO;;yBAfP,IAAI;yBACJ,MAAM,IAAI;yBACV,MAAM,IAAI;;sBAeT,OAAO;uBACN,OAAO;YAClB,wEAAwE;kBAClE,CAAC,OAAO,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC;YAC1C,wEAAwE;wBAC5D,MAAM,OAAO,CAAC,IAAI,CAAC;YAC/B,wEAAwE;kBAClE,MAAM,IAAI;YAsCoB,KAAK,EAAE;;;YA3kBvC,OAAO,SAAS,CAAC,GAAG,IAAI;YACxB,SAAS,GAAG,IAAI;YAMf,aAAa,SACT,CAAC,WACC,IAAI,WACJ,MAAM,IAAI,WACV,MAAM,IAAI,GAClB,IAAI;;EAuzCL,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAI,CAAC;wBACvD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,CAAC,GAAG,EAAE,CAAC"}
|
|
@@ -39,6 +39,7 @@ function onSelectChange(v) {
|
|
|
39
39
|
const lang = typeof v === "object" && v !== null ? v.value : v;
|
|
40
40
|
if (lang) selectLang(lang);
|
|
41
41
|
}
|
|
42
|
+
const showSelect = computed(() => props.langs.length > props.langThreshold);
|
|
42
43
|
const selectItems = computed(
|
|
43
44
|
() => props.langs.map((lang) => ({
|
|
44
45
|
label: lang.toUpperCase(),
|
|
@@ -68,26 +69,21 @@ watch(
|
|
|
68
69
|
<div
|
|
69
70
|
class="flex items-end gap-0 border-b border-gray-200 dark:border-gray-700 mt-2 mb-4"
|
|
70
71
|
>
|
|
71
|
-
<!-- Language select —
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
:trailing-icon="
|
|
87
|
-
open ? 'i-lucide-chevron-up' : 'i-lucide-chevron-down'
|
|
88
|
-
"
|
|
89
|
-
class="w-full justify-between font-medium"
|
|
90
|
-
>
|
|
72
|
+
<!-- Language select — above langThreshold only, aligned at bottom of row -->
|
|
73
|
+
<template v-if="showSelect">
|
|
74
|
+
<USelectMenu
|
|
75
|
+
:model-value="modelValue"
|
|
76
|
+
:items="selectItems"
|
|
77
|
+
value-key="value"
|
|
78
|
+
label-key="label"
|
|
79
|
+
size="sm"
|
|
80
|
+
variant="ghost"
|
|
81
|
+
class="w-28 shrink-0 mb-px font-medium"
|
|
82
|
+
@update:model-value="onSelectChange"
|
|
83
|
+
>
|
|
84
|
+
<!-- The trigger is already a button with its own chevron: the slot
|
|
85
|
+
holds only what it shows, never another button. -->
|
|
86
|
+
<template #default>
|
|
91
87
|
<span class="flex items-center gap-1">
|
|
92
88
|
<span
|
|
93
89
|
v-if="hasErrors(modelValue)"
|
|
@@ -95,12 +91,12 @@ watch(
|
|
|
95
91
|
/>
|
|
96
92
|
{{ modelValue.toUpperCase() }}
|
|
97
93
|
</span>
|
|
98
|
-
</
|
|
99
|
-
</
|
|
100
|
-
</USelectMenu>
|
|
94
|
+
</template>
|
|
95
|
+
</USelectMenu>
|
|
101
96
|
|
|
102
|
-
|
|
103
|
-
|
|
97
|
+
<!-- Divider -->
|
|
98
|
+
<div class="h-5 w-px bg-gray-200 dark:bg-gray-700 mx-2 shrink-0" />
|
|
99
|
+
</template>
|
|
104
100
|
|
|
105
101
|
<!-- Tab bar — always shown, scrollable -->
|
|
106
102
|
<div class="flex gap-1 overflow-x-auto scrollbar-none flex-1">
|
|
@@ -4,8 +4,9 @@ type __VLS_Props = {
|
|
|
4
4
|
errors?: Record<string, string[]>;
|
|
5
5
|
noRouteChange?: boolean;
|
|
6
6
|
/**
|
|
7
|
-
* Number of languages above which
|
|
8
|
-
*
|
|
7
|
+
* Number of languages above which a searchable select appears next to the
|
|
8
|
+
* tab bar, for quick navigation. Default: `8`. `0` always shows it,
|
|
9
|
+
* `Infinity` never does.
|
|
9
10
|
*/
|
|
10
11
|
langThreshold?: number;
|
|
11
12
|
};
|
|
@@ -15,8 +16,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
15
16
|
"onUpdate:modelValue"?: ((lang: string) => any) | undefined;
|
|
16
17
|
}>, {
|
|
17
18
|
errors: Record<string, string[]>;
|
|
18
|
-
noRouteChange: boolean;
|
|
19
19
|
langThreshold: number;
|
|
20
|
+
noRouteChange: boolean;
|
|
20
21
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
22
|
declare const _default: typeof __VLS_export;
|
|
22
23
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapoDetailLangSwitch.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/components/MapoDetailLangSwitch.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MapoDetailLangSwitch.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/components/MapoDetailLangSwitch.vue"],"names":[],"mappings":"AA2KA,KAAK,WAAW,GAAG;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAClC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAkQJ,QAAA,MAAM,YAAY;;;;;YA1QL,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;mBAOjB,MAAM;mBANN,OAAO;6EA6QzB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { ref, computed, watch, useSlots } from "vue";
|
|
2
|
+
import { ref, computed, watch, useSlots, onBeforeUnmount } from "vue";
|
|
3
3
|
import { debounce } from "@mapomodule/utils";
|
|
4
4
|
import { useRoute, useRouter } from "#app";
|
|
5
5
|
const props = defineProps({
|
|
@@ -21,7 +21,7 @@ const props = defineProps({
|
|
|
21
21
|
registry: { type: Object, required: false },
|
|
22
22
|
detailBase: { type: String, required: false },
|
|
23
23
|
permissionModel: { type: String, required: false },
|
|
24
|
-
defaultPageSize: { type: Number, required: false, default: 20 },
|
|
24
|
+
defaultPageSize: { type: [Number, String], required: false, default: 20 },
|
|
25
25
|
pageSizeOptions: { type: Array, required: false, default: () => [10, 20, 50, 100] },
|
|
26
26
|
responseAdapter: { type: Function, required: false },
|
|
27
27
|
paginationParams: { type: Function, required: false }
|
|
@@ -81,6 +81,7 @@ const writeUrlState = debounce(() => {
|
|
|
81
81
|
router.replace({ query });
|
|
82
82
|
}, 150);
|
|
83
83
|
watch([activeTab, activeFilters], writeUrlState, { deep: true });
|
|
84
|
+
onBeforeUnmount(() => writeUrlState.cancel());
|
|
84
85
|
const crudEndpoint = computed(
|
|
85
86
|
() => (props.endpoint ?? "").split("?")[0] || (props.endpoint ?? "")
|
|
86
87
|
);
|
|
@@ -17,6 +17,7 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
17
17
|
* Ignored when `items` is provided.
|
|
18
18
|
*/
|
|
19
19
|
clientSide?: boolean;
|
|
20
|
+
/** Column definitions. A dotted `key` (`category.name`) reads a field of a related object. */
|
|
20
21
|
columns: ListColumn<T>[];
|
|
21
22
|
lookup?: string;
|
|
22
23
|
filters?: FilterDescriptor[];
|
|
@@ -38,10 +39,14 @@ declare const __VLS_export: <T extends object>(__VLS_props: NonNullable<Awaited<
|
|
|
38
39
|
* hides the trash unless the user has `delete_article`. Omit to always show both.
|
|
39
40
|
*/
|
|
40
41
|
permissionModel?: string;
|
|
41
|
-
/** Initial page size
|
|
42
|
-
defaultPageSize?: number;
|
|
43
|
-
/**
|
|
44
|
-
|
|
42
|
+
/** Initial page size: a number, or `"all"`. Default: 20. */
|
|
43
|
+
defaultPageSize?: number | "all";
|
|
44
|
+
/**
|
|
45
|
+
* Options of the per-page selector. `"all"` adds an option that requests
|
|
46
|
+
* the list without pagination params, like `clientSide` does: the backend
|
|
47
|
+
* has to return the whole collection then. Default: [10, 20, 50, 100].
|
|
48
|
+
*/
|
|
49
|
+
pageSizeOptions?: (number | "all")[];
|
|
45
50
|
/**
|
|
46
51
|
* Custom response parser. Replaces the built-in DRF / flat-array detection.
|
|
47
52
|
* Return `{ items, total }` from any shape your backend returns.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapoList.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/components/MapoList.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MapoList.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/components/MapoList.vue"],"names":[],"mappings":"AAgWA,OAAO,KAAK,EACV,UAAU,EACV,gBAAgB,EAChB,YAAY,EAEZ,gBAAgB,EAChB,WAAW,EACZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAIhF,QAAA,MAAM,YAAY,GAAK,CAAC,S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