@ditojs/admin 3.1.2 → 3.2.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/dist/dito-admin.es.js +957 -923
- package/dist/dito-admin.umd.js +5 -5
- package/package.json +5 -5
- package/src/components/DitoCreateButton.vue +5 -2
- package/src/mixins/DitoMixin.js +11 -6
- package/src/mixins/OptionsMixin.js +0 -5
- package/src/mixins/SourceMixin.js +17 -3
- package/src/mixins/TypeMixin.js +21 -0
- package/src/mixins/ValueMixin.js +12 -4
- package/src/types/DitoTypeMarkup.vue +12 -3
- package/src/utils/FormModel.js +62 -20
- package/src/utils/schema/data.js +29 -29
- package/types/index.d.ts +9 -4
package/dist/dito-admin.es.js
CHANGED
|
@@ -160,16 +160,16 @@ function pn(e) {
|
|
|
160
160
|
//#endregion
|
|
161
161
|
//#region src/utils/schema/structure.js
|
|
162
162
|
function mn(e, t) {
|
|
163
|
-
for (let n of e) if (
|
|
163
|
+
for (let n of e) if (Dn(n)) {
|
|
164
164
|
let e = t(n.component, n.name, 0);
|
|
165
165
|
if (e !== void 0) return e;
|
|
166
|
-
} else if (
|
|
166
|
+
} else if (U(n)) for (let [e, r] of Object.entries(n.components || {})) {
|
|
167
167
|
let n = t(r, e, 1);
|
|
168
168
|
if (n !== void 0) return n;
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
function hn(e, t) {
|
|
172
|
-
return e ? mn([e, ...
|
|
172
|
+
return e ? mn([e, ...Nn(e)], t) : void 0;
|
|
173
173
|
}
|
|
174
174
|
function gn(e, t) {
|
|
175
175
|
return hn(e, (e) => t(e) ? e : void 0) ?? null;
|
|
@@ -182,95 +182,95 @@ function vn(e) {
|
|
|
182
182
|
}
|
|
183
183
|
function yn(e, t) {
|
|
184
184
|
return !!hn(e, (e, n) => {
|
|
185
|
-
if (
|
|
185
|
+
if (An(e) ? n === t : yn(e, t)) return !0;
|
|
186
186
|
});
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function U(e) {
|
|
189
189
|
return I(e) && L(e.type);
|
|
190
190
|
}
|
|
191
|
+
function bn(e) {
|
|
192
|
+
return U(e) && e.type === "form";
|
|
193
|
+
}
|
|
191
194
|
function xn(e) {
|
|
192
|
-
return
|
|
195
|
+
return U(e) && e.type === "view";
|
|
193
196
|
}
|
|
194
197
|
function Sn(e) {
|
|
195
|
-
return
|
|
198
|
+
return U(e) && e.type === "tab";
|
|
196
199
|
}
|
|
197
200
|
function Cn(e) {
|
|
198
|
-
return
|
|
201
|
+
return U(e) && e.type === "panel";
|
|
199
202
|
}
|
|
200
203
|
function wn(e) {
|
|
201
|
-
return
|
|
204
|
+
return Cn(e) && !!e.data;
|
|
202
205
|
}
|
|
203
206
|
function Tn(e) {
|
|
204
|
-
return
|
|
207
|
+
return U(e) && e.type === "menu";
|
|
205
208
|
}
|
|
206
209
|
function En(e) {
|
|
207
|
-
return
|
|
210
|
+
return JSON.stringify(e);
|
|
208
211
|
}
|
|
209
212
|
function Dn(e) {
|
|
210
|
-
return
|
|
213
|
+
return xn(e) && I(e.component);
|
|
211
214
|
}
|
|
212
215
|
function On(e) {
|
|
213
|
-
return Sn(e) && I(e.component);
|
|
214
|
-
}
|
|
215
|
-
function kn(e) {
|
|
216
216
|
return !!e.compact;
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function kn(e) {
|
|
219
219
|
return !!(e.inlined || e.components);
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function An(e) {
|
|
222
222
|
return !!(e.nested || H(e)?.defaultNested === !0);
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function jn(e, t) {
|
|
225
225
|
let { label: n } = e;
|
|
226
226
|
return n !== !1 && (!!n || t && H(e)?.generateLabel);
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function Mn(e) {
|
|
229
229
|
return !!H(e)?.omitSpacing;
|
|
230
230
|
}
|
|
231
|
-
function
|
|
231
|
+
function Nn(e) {
|
|
232
232
|
return e?.tabs ? Object.values(e.tabs) : [];
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function Pn(e) {
|
|
235
235
|
return e?.panels ? Object.values(e.panels) : [];
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function Fn(e) {
|
|
238
238
|
return pn(e) === "object";
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function In(e) {
|
|
241
241
|
return pn(e) === "list";
|
|
242
242
|
}
|
|
243
|
-
function
|
|
243
|
+
function Ln(e) {
|
|
244
244
|
return !!pn(e) && !!e.resource;
|
|
245
245
|
}
|
|
246
246
|
//#endregion
|
|
247
247
|
//#region src/DitoContext.js
|
|
248
|
-
var { hasOwnProperty:
|
|
249
|
-
function
|
|
248
|
+
var { hasOwnProperty: Rn } = Object.prototype, zn = /* @__PURE__ */ new WeakMap();
|
|
249
|
+
function Bn(e) {
|
|
250
250
|
let t = oe(e), n = t, r;
|
|
251
251
|
do {
|
|
252
|
-
if (r =
|
|
252
|
+
if (r = zn.get(n), r) break;
|
|
253
253
|
n = Object.getPrototypeOf(n);
|
|
254
254
|
} while (n);
|
|
255
|
-
return r && n !== t &&
|
|
255
|
+
return r && n !== t && zn.set(n, r), r;
|
|
256
256
|
}
|
|
257
|
-
function
|
|
258
|
-
let r =
|
|
259
|
-
return i !== void 0 ||
|
|
257
|
+
function W(e, t, n) {
|
|
258
|
+
let r = Bn(e), i = t in r ? r[t] : void 0;
|
|
259
|
+
return i !== void 0 || Rn.call(r, t) ? i : F(n) ? n() : n;
|
|
260
260
|
}
|
|
261
|
-
function
|
|
262
|
-
|
|
261
|
+
function Vn(e, t, n) {
|
|
262
|
+
Bn(e)[t] = n;
|
|
263
263
|
}
|
|
264
|
-
var
|
|
264
|
+
var G = class e {
|
|
265
265
|
constructor(e, t) {
|
|
266
266
|
t = t ? F(t) ? t() : { ...t } : {}, t.nested ??= !0, t.component = e;
|
|
267
267
|
let n = Object.setPrototypeOf(t, e);
|
|
268
|
-
|
|
268
|
+
zn.set(this, n);
|
|
269
269
|
}
|
|
270
270
|
static get(t, n) {
|
|
271
271
|
return n instanceof e ? n : new e(t, n);
|
|
272
272
|
}
|
|
273
|
-
static createForSchema(t, { schema: n, name: r, nested: i =
|
|
273
|
+
static createForSchema(t, { schema: n, name: r, nested: i = An(n), data: a, dataPath: o, rootData: s }) {
|
|
274
274
|
return new e(t, () => ({
|
|
275
275
|
schema: n,
|
|
276
276
|
name: r,
|
|
@@ -284,7 +284,7 @@ var W = class e {
|
|
|
284
284
|
}));
|
|
285
285
|
}
|
|
286
286
|
createChildContext(t, n) {
|
|
287
|
-
let r =
|
|
287
|
+
let r = An(t), i = !!this.schema && An(this.schema);
|
|
288
288
|
return e.createForSchema(this.component, {
|
|
289
289
|
schema: t,
|
|
290
290
|
name: n,
|
|
@@ -298,22 +298,22 @@ var W = class e {
|
|
|
298
298
|
return Object.setPrototypeOf(e, this);
|
|
299
299
|
}
|
|
300
300
|
get nested() {
|
|
301
|
-
return
|
|
301
|
+
return W(this, "nested", !0);
|
|
302
302
|
}
|
|
303
303
|
get schema() {
|
|
304
|
-
return
|
|
304
|
+
return W(this, "schema", null);
|
|
305
305
|
}
|
|
306
306
|
get value() {
|
|
307
|
-
return
|
|
307
|
+
return W(this, "value", () => this.nested ? je(this.rootItem, this.dataPath) : void 0);
|
|
308
308
|
}
|
|
309
309
|
get dataPath() {
|
|
310
|
-
return
|
|
310
|
+
return W(this, "dataPath", "");
|
|
311
311
|
}
|
|
312
312
|
get name() {
|
|
313
|
-
return
|
|
313
|
+
return W(this, "name", () => tn(this.dataPath));
|
|
314
314
|
}
|
|
315
315
|
get index() {
|
|
316
|
-
return
|
|
316
|
+
return W(this, "index", () => nn(this.dataPath));
|
|
317
317
|
}
|
|
318
318
|
get itemDataPath() {
|
|
319
319
|
return Yt(this.dataPath, this.nested);
|
|
@@ -328,89 +328,89 @@ var W = class e {
|
|
|
328
328
|
return nn(this.parentItemDataPath);
|
|
329
329
|
}
|
|
330
330
|
get item() {
|
|
331
|
-
return
|
|
331
|
+
return W(this, "data", () => Qt(this.rootItem, this.dataPath, this.nested) || null);
|
|
332
332
|
}
|
|
333
333
|
get parentItem() {
|
|
334
334
|
let e = $t(this.rootItem, this.dataPath, this.nested) || null;
|
|
335
335
|
return e === this.item ? null : e;
|
|
336
336
|
}
|
|
337
337
|
get rootItem() {
|
|
338
|
-
return
|
|
338
|
+
return W(this, "rootData", null);
|
|
339
339
|
}
|
|
340
340
|
get processedItem() {
|
|
341
|
-
return
|
|
341
|
+
return W(this, "processedData", null);
|
|
342
342
|
}
|
|
343
343
|
get processedRootItem() {
|
|
344
|
-
return
|
|
344
|
+
return W(this, "processedRootData", null);
|
|
345
345
|
}
|
|
346
346
|
get clipboardItem() {
|
|
347
|
-
return
|
|
347
|
+
return W(this, "clipboardData", null);
|
|
348
348
|
}
|
|
349
349
|
get user() {
|
|
350
|
-
return
|
|
350
|
+
return W(this, "user", null);
|
|
351
351
|
}
|
|
352
352
|
get api() {
|
|
353
|
-
return
|
|
353
|
+
return W(this, "api", null);
|
|
354
354
|
}
|
|
355
355
|
get views() {
|
|
356
|
-
return
|
|
356
|
+
return W(this, "views", null);
|
|
357
357
|
}
|
|
358
358
|
get flattenedViews() {
|
|
359
|
-
return
|
|
359
|
+
return W(this, "flattenedViews", null);
|
|
360
360
|
}
|
|
361
361
|
get itemLabel() {
|
|
362
|
-
return
|
|
362
|
+
return W(this, "itemLabel", null);
|
|
363
363
|
}
|
|
364
364
|
get formLabel() {
|
|
365
|
-
return
|
|
365
|
+
return W(this, "formLabel", null);
|
|
366
366
|
}
|
|
367
367
|
get component() {
|
|
368
|
-
return
|
|
368
|
+
return W(this, "component", null);
|
|
369
369
|
}
|
|
370
370
|
get schemaComponent() {
|
|
371
|
-
return
|
|
371
|
+
return W(this, "schemaComponent", null);
|
|
372
372
|
}
|
|
373
373
|
get formComponent() {
|
|
374
|
-
return
|
|
374
|
+
return W(this, "formComponent", null);
|
|
375
375
|
}
|
|
376
376
|
get viewComponent() {
|
|
377
|
-
return
|
|
377
|
+
return W(this, "viewComponent", null);
|
|
378
378
|
}
|
|
379
379
|
get dialogComponent() {
|
|
380
|
-
return
|
|
380
|
+
return W(this, "dialogComponent", null);
|
|
381
381
|
}
|
|
382
382
|
get panelComponent() {
|
|
383
|
-
return
|
|
383
|
+
return W(this, "panelComponent", null);
|
|
384
384
|
}
|
|
385
385
|
get resourceComponent() {
|
|
386
|
-
return
|
|
386
|
+
return W(this, "resourceComponent", null);
|
|
387
387
|
}
|
|
388
388
|
get sourceComponent() {
|
|
389
|
-
return
|
|
389
|
+
return W(this, "sourceComponent", null);
|
|
390
390
|
}
|
|
391
391
|
get option() {
|
|
392
|
-
return
|
|
392
|
+
return W(this, "option", void 0);
|
|
393
393
|
}
|
|
394
394
|
get options() {
|
|
395
|
-
return
|
|
395
|
+
return W(this, "options", void 0);
|
|
396
396
|
}
|
|
397
397
|
get open() {
|
|
398
|
-
return
|
|
398
|
+
return W(this, "open", void 0);
|
|
399
399
|
}
|
|
400
400
|
get searchTerm() {
|
|
401
|
-
return
|
|
401
|
+
return W(this, "searchTerm", void 0);
|
|
402
402
|
}
|
|
403
403
|
get error() {
|
|
404
|
-
return
|
|
404
|
+
return W(this, "error", void 0);
|
|
405
405
|
}
|
|
406
406
|
get wasNotified() {
|
|
407
|
-
return
|
|
407
|
+
return W(this, "wasNotified", !1);
|
|
408
408
|
}
|
|
409
409
|
get isRunning() {
|
|
410
|
-
return
|
|
410
|
+
return W(this, "isRunning", !1);
|
|
411
411
|
}
|
|
412
412
|
set isRunning(e) {
|
|
413
|
-
|
|
413
|
+
Vn(this, "isRunning", e);
|
|
414
414
|
}
|
|
415
415
|
get query() {
|
|
416
416
|
return this.component.$route.query;
|
|
@@ -432,10 +432,10 @@ var W = class e {
|
|
|
432
432
|
}
|
|
433
433
|
get notify() {
|
|
434
434
|
return (e) => {
|
|
435
|
-
this.component.notify(e),
|
|
435
|
+
this.component.notify(e), Vn(this, "wasNotified", !0);
|
|
436
436
|
};
|
|
437
437
|
}
|
|
438
|
-
},
|
|
438
|
+
}, Hn = {
|
|
439
439
|
data() {
|
|
440
440
|
return { listeners: null };
|
|
441
441
|
},
|
|
@@ -517,14 +517,14 @@ var W = class e {
|
|
|
517
517
|
return this;
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
|
-
},
|
|
521
|
-
function
|
|
522
|
-
let n = oe(e), r =
|
|
523
|
-
return !r && e && (r = t?.(e) || `@${++
|
|
520
|
+
}, Un = /* @__PURE__ */ new WeakMap(), Wn = 0;
|
|
521
|
+
function Gn(e, t = null) {
|
|
522
|
+
let n = oe(e), r = Un.get(n);
|
|
523
|
+
return !r && e && (r = t?.(e) || `@${++Wn}`, Un.set(n, r)), r;
|
|
524
524
|
}
|
|
525
525
|
//#endregion
|
|
526
526
|
//#region src/utils/SchemaGraph.js
|
|
527
|
-
var
|
|
527
|
+
var Kn = class {
|
|
528
528
|
graph = {};
|
|
529
529
|
references = {};
|
|
530
530
|
set(e, t, n) {
|
|
@@ -593,7 +593,7 @@ var qn = class {
|
|
|
593
593
|
}
|
|
594
594
|
return t;
|
|
595
595
|
}
|
|
596
|
-
},
|
|
596
|
+
}, qn = {
|
|
597
597
|
Boolean: Pe,
|
|
598
598
|
Number: He,
|
|
599
599
|
String: L,
|
|
@@ -602,7 +602,7 @@ var qn = class {
|
|
|
602
602
|
Object: I,
|
|
603
603
|
RegExp: Ge,
|
|
604
604
|
Function: F
|
|
605
|
-
},
|
|
605
|
+
}, Jn = {
|
|
606
606
|
Boolean: (e) => !!e,
|
|
607
607
|
Number: (e) => +e,
|
|
608
608
|
String: (e) => String(e),
|
|
@@ -611,45 +611,45 @@ var qn = class {
|
|
|
611
611
|
Object: (e) => I(e) ? e : e === !0 ? {} : null,
|
|
612
612
|
RegExp: (e) => Ge(e) ? e : new RegExp(e)
|
|
613
613
|
};
|
|
614
|
-
function
|
|
614
|
+
function Yn(e, t) {
|
|
615
615
|
if (e && t != null) {
|
|
616
|
-
for (let n of e) if (
|
|
616
|
+
for (let n of e) if (qn[n.name]?.(t)) return !0;
|
|
617
617
|
}
|
|
618
618
|
return !1;
|
|
619
619
|
}
|
|
620
|
-
function
|
|
621
|
-
let n = e &&
|
|
620
|
+
function Xn(e, t) {
|
|
621
|
+
let n = e && Jn[e.name || e];
|
|
622
622
|
return n ? n(t) : t;
|
|
623
623
|
}
|
|
624
624
|
//#endregion
|
|
625
625
|
//#region src/utils/schema/lookup.js
|
|
626
|
-
var
|
|
626
|
+
var Zn = {}, Qn = /* @__PURE__ */ new WeakMap();
|
|
627
|
+
function $n(e) {
|
|
628
|
+
return U(e) && (I(e.form || e.forms || e.components) || F(e.components));
|
|
629
|
+
}
|
|
627
630
|
function er(e) {
|
|
628
|
-
return
|
|
631
|
+
return U(e) && Object.keys(e?.forms || {}).length > 1;
|
|
629
632
|
}
|
|
630
|
-
function tr(e) {
|
|
631
|
-
|
|
633
|
+
function tr(e, t) {
|
|
634
|
+
let { view: n } = e, r = n && t.flattenedViews[n];
|
|
635
|
+
return r && gn(r, $n) || null;
|
|
632
636
|
}
|
|
633
637
|
function nr(e, t) {
|
|
634
|
-
|
|
635
|
-
return r && gn(r, er) || null;
|
|
638
|
+
return tr(e, t) ? t.flattenedViews[e.view] : null;
|
|
636
639
|
}
|
|
637
640
|
function rr(e, t) {
|
|
638
|
-
return nr(e, t)
|
|
641
|
+
return !!nr(e, t);
|
|
639
642
|
}
|
|
640
643
|
function ir(e, t) {
|
|
641
|
-
|
|
644
|
+
let n = nr(e, t);
|
|
645
|
+
return n ? Dn(n) ? n.fullPath : `${n.fullPath}/${n.path}` : null;
|
|
642
646
|
}
|
|
643
|
-
function ar(e, t) {
|
|
644
|
-
let
|
|
645
|
-
return n ? On(n) ? n.fullPath : `${n.fullPath}/${n.path}` : null;
|
|
646
|
-
}
|
|
647
|
-
function or(e, t, n) {
|
|
648
|
-
let r = ar(e, n);
|
|
647
|
+
function ar(e, t, n) {
|
|
648
|
+
let r = ir(e, n);
|
|
649
649
|
return r ? `${r}/${t}` : null;
|
|
650
650
|
}
|
|
651
|
-
function
|
|
652
|
-
let r = t &&
|
|
651
|
+
function or(e, t, n) {
|
|
652
|
+
let r = t && tr(e, t);
|
|
653
653
|
if (r) e = r;
|
|
654
654
|
else if (e.view) throw Error(`Unknown view: '${e.view}'`);
|
|
655
655
|
let { form: i, forms: a } = e;
|
|
@@ -665,33 +665,33 @@ function sr(e, t, n) {
|
|
|
665
665
|
};
|
|
666
666
|
else return {};
|
|
667
667
|
}
|
|
668
|
-
return a ||= { default: i }, Object.fromEntries(Object.entries(a).map(([e, r]) => (t && F(r.components) && (r =
|
|
668
|
+
return a ||= { default: i }, Object.fromEntries(Object.entries(a).map(([e, r]) => (t && F(r.components) && (r = sr(r, t)), [e, n?.(r) ?? r])));
|
|
669
669
|
}
|
|
670
|
-
function
|
|
670
|
+
function sr(e, t) {
|
|
671
671
|
let { item: n } = t;
|
|
672
|
-
if (!I(n)) return
|
|
673
|
-
let r =
|
|
674
|
-
r || (r = /* @__PURE__ */ new WeakMap(),
|
|
672
|
+
if (!I(n)) return cr(e, t);
|
|
673
|
+
let r = Qn.get(e.components);
|
|
674
|
+
r || (r = /* @__PURE__ */ new WeakMap(), Qn.set(e.components, r));
|
|
675
675
|
let i = r.get(n);
|
|
676
|
-
return i || (i = a(() =>
|
|
676
|
+
return i || (i = a(() => cr(e, t)), r.set(n, i)), i.value;
|
|
677
677
|
}
|
|
678
|
-
function
|
|
678
|
+
function cr(e, t) {
|
|
679
679
|
let n = re({
|
|
680
680
|
...e,
|
|
681
681
|
components: e.components(t)
|
|
682
682
|
});
|
|
683
683
|
return xi(t.api, n).catch(console.error), n;
|
|
684
684
|
}
|
|
685
|
-
function
|
|
685
|
+
function lr(e, t) {
|
|
686
686
|
return e[t?.type] || e.default || null;
|
|
687
687
|
}
|
|
688
|
-
function
|
|
689
|
-
return
|
|
688
|
+
function ur(e, t, n) {
|
|
689
|
+
return lr(or(e, n), t) || Zn;
|
|
690
690
|
}
|
|
691
|
-
function
|
|
692
|
-
return e ===
|
|
691
|
+
function dr(e) {
|
|
692
|
+
return e === Zn;
|
|
693
693
|
}
|
|
694
|
-
function
|
|
694
|
+
function fr(e, t) {
|
|
695
695
|
let n = (e, n) => e.length > 0 ? e.reduce((e, r) => {
|
|
696
696
|
let i = n(r);
|
|
697
697
|
return i && (e[i.name] = i && t ? {
|
|
@@ -707,10 +707,10 @@ function pr(e, t) {
|
|
|
707
707
|
label: t
|
|
708
708
|
} : null) : null;
|
|
709
709
|
}
|
|
710
|
-
function
|
|
711
|
-
return
|
|
710
|
+
function pr(e) {
|
|
711
|
+
return fr(e, { type: "button" });
|
|
712
712
|
}
|
|
713
|
-
function
|
|
713
|
+
function mr(e, t, n, r) {
|
|
714
714
|
return e ? {
|
|
715
715
|
schema: e,
|
|
716
716
|
dataPath: t,
|
|
@@ -718,53 +718,53 @@ function hr(e, t, n, r) {
|
|
|
718
718
|
tabComponent: r
|
|
719
719
|
} : null;
|
|
720
720
|
}
|
|
721
|
-
function
|
|
721
|
+
function hr(e, t, n, r = null, i = []) {
|
|
722
722
|
if (e) for (let [a, o] of Object.entries(e)) {
|
|
723
|
-
let e =
|
|
723
|
+
let e = mr(o, V(t, a), V(n, a), r);
|
|
724
724
|
e && i.push(e);
|
|
725
725
|
}
|
|
726
726
|
return i;
|
|
727
727
|
}
|
|
728
|
-
function
|
|
729
|
-
let s = H(t)?.getPanelSchema?.(e, t, n, a), c = s ? [
|
|
730
|
-
return
|
|
728
|
+
function gr(e, t, n, r, i, a = null, o = null) {
|
|
729
|
+
let s = H(t)?.getPanelSchema?.(e, t, n, a), c = s ? [mr(s, V(n, s.name), V(r, s.name), o)] : [];
|
|
730
|
+
return hr(t?.panels, n, i, o, c), c;
|
|
731
731
|
}
|
|
732
732
|
//#endregion
|
|
733
733
|
//#region src/utils/schema/data.js
|
|
734
|
-
function
|
|
734
|
+
function _r(e, { type: t, schema: n, callback: r = !0, default: i, context: a } = {}) {
|
|
735
735
|
let o = t && j(t), s = n ? P(e) ? je(n, e, () => void 0) : n[e] : void 0;
|
|
736
|
-
if (s === void 0 && i !== void 0) return r && F(i) && !
|
|
737
|
-
if (
|
|
738
|
-
if (r && F(s) && (s = s(a)), o && s != null && !
|
|
739
|
-
let t =
|
|
736
|
+
if (s === void 0 && i !== void 0) return r && F(i) && !Yn(o, i) && (i = i(a)), i;
|
|
737
|
+
if (Yn(o, s)) return s;
|
|
738
|
+
if (r && F(s) && (s = s(a)), o && s != null && !Yn(o, s)) for (let e of o) {
|
|
739
|
+
let t = Xn(e, s);
|
|
740
740
|
if (t !== s) return t;
|
|
741
741
|
}
|
|
742
742
|
return s;
|
|
743
743
|
}
|
|
744
|
-
function
|
|
745
|
-
return
|
|
744
|
+
function vr(e, t) {
|
|
745
|
+
return _r("if", {
|
|
746
746
|
type: Boolean,
|
|
747
747
|
schema: e,
|
|
748
748
|
context: t,
|
|
749
749
|
default: !0
|
|
750
|
-
}) && (!vn(e) || !!pn(e) || _n(e, (e, n) =>
|
|
750
|
+
}) && (!vn(e) || !!pn(e) || _n(e, (e, n) => vr(e, t.createChildContext(e, n))));
|
|
751
751
|
}
|
|
752
|
-
function
|
|
752
|
+
function yr(e) {
|
|
753
753
|
return F(e) ? e() : e;
|
|
754
754
|
}
|
|
755
755
|
function br(e, t) {
|
|
756
756
|
let n = e.default === void 0 ? H(e)?.defaultValue : e.default;
|
|
757
|
-
return F(n) ? n(
|
|
757
|
+
return F(n) ? n(yr(t)) : M(n);
|
|
758
758
|
}
|
|
759
759
|
function xr(e, t) {
|
|
760
760
|
let n = e.exclude === void 0 ? H(e)?.excludeValue : e.exclude;
|
|
761
|
-
return F(n) ? n(
|
|
761
|
+
return F(n) ? n(yr(t)) : !!n;
|
|
762
762
|
}
|
|
763
763
|
function Sr(e, t) {
|
|
764
|
-
return !!H(e)?.ignoreMissingValue?.(
|
|
764
|
+
return !!H(e)?.ignoreMissingValue?.(yr(t));
|
|
765
765
|
}
|
|
766
766
|
function Cr(e, t, n, r) {
|
|
767
|
-
return !(n in t) || !!H(e)?.treatNullAsMissing?.(
|
|
767
|
+
return !(n in t) || !!H(e)?.treatNullAsMissing?.(yr(r)) && t[n] === null;
|
|
768
768
|
}
|
|
769
769
|
function wr(e) {
|
|
770
770
|
return !!H(e)?.valueFromDataSchema && !!(e.data || e.dataPath);
|
|
@@ -779,7 +779,7 @@ function Dr(e, t = {}, n, { dataPath: r = null, rootData: i = t, shouldProcess:
|
|
|
779
779
|
return Mr(e, t, {
|
|
780
780
|
dataPath: r,
|
|
781
781
|
before: ({ schema: e, data: t, name: r, dataPath: a }) => {
|
|
782
|
-
let o = () => new
|
|
782
|
+
let o = () => new G(n, {
|
|
783
783
|
schema: e,
|
|
784
784
|
name: r,
|
|
785
785
|
data: t,
|
|
@@ -797,7 +797,7 @@ function Dr(e, t = {}, n, { dataPath: r = null, rootData: i = t, shouldProcess:
|
|
|
797
797
|
});
|
|
798
798
|
}
|
|
799
799
|
function Or(e, t, n, r, { component: i = null, rootData: a = i?.rootData, getOptions: o = null } = {}) {
|
|
800
|
-
let s = () => new
|
|
800
|
+
let s = () => new G(i, () => {
|
|
801
801
|
let i = {
|
|
802
802
|
schema: e,
|
|
803
803
|
get value() {
|
|
@@ -813,13 +813,13 @@ function Or(e, t, n, r, { component: i = null, rootData: a = i?.rootData, getOpt
|
|
|
813
813
|
enumerable: !0
|
|
814
814
|
}), i;
|
|
815
815
|
}), { compute: c } = e;
|
|
816
|
-
if (c &&
|
|
816
|
+
if (c && _r("if", {
|
|
817
817
|
type: Boolean,
|
|
818
818
|
schema: e,
|
|
819
|
-
context:
|
|
819
|
+
context: yr(s),
|
|
820
820
|
default: !0
|
|
821
821
|
})) {
|
|
822
|
-
let e = c(
|
|
822
|
+
let e = c(yr(s));
|
|
823
823
|
if (e !== void 0) return e;
|
|
824
824
|
}
|
|
825
825
|
return kr(e, t, n, s);
|
|
@@ -830,22 +830,22 @@ function kr(e, t, n, r) {
|
|
|
830
830
|
function Ar(e, t, n) {
|
|
831
831
|
if (n.schemaOnly) {
|
|
832
832
|
let n = {}, { idKey: r = "id", orderKey: i } = e, a = t[r];
|
|
833
|
-
return a !== void 0 && (n[r] = a),
|
|
833
|
+
return a !== void 0 && (n[r] = a), er(e) && (n.type = t.type), i && (n[i] = t[i]), n;
|
|
834
834
|
}
|
|
835
835
|
return { ...t };
|
|
836
836
|
}
|
|
837
|
-
function jr(e, t, n, r, { component: i, rootData: a, schemaOnly: o, target: s,
|
|
837
|
+
function jr(e, t, n, r, { component: i, rootData: a, schemaOnly: o, target: s, shouldCallProcess: c = !0 } = {}) {
|
|
838
838
|
let l = {
|
|
839
839
|
component: i,
|
|
840
840
|
rootData: a,
|
|
841
841
|
schemaOnly: o,
|
|
842
842
|
target: s
|
|
843
|
-
}, u = Ar(t, n, l), d = new
|
|
843
|
+
}, u = Ar(t, n, l), d = new Kn();
|
|
844
844
|
return Mr(e, n, {
|
|
845
845
|
dataPath: r,
|
|
846
846
|
processedData: u,
|
|
847
847
|
before: ({ schema: e, data: t, name: n, dataPath: r, processedData: a }) => {
|
|
848
|
-
let o =
|
|
848
|
+
let o = kr(e, t, n, () => new G(i, {
|
|
849
849
|
schema: e,
|
|
850
850
|
name: n,
|
|
851
851
|
data: t,
|
|
@@ -859,7 +859,7 @@ function jr(e, t, n, r, { component: i, rootData: a, schemaOnly: o, target: s, s
|
|
|
859
859
|
a[n] = o;
|
|
860
860
|
},
|
|
861
861
|
after: ({ schema: e, data: t, name: n, dataPath: r, processedData: a }) => {
|
|
862
|
-
let { wrapPrimitives: o, process: s } = e, u = a[n], f = () => new
|
|
862
|
+
let { wrapPrimitives: o, process: s } = e, u = a[n], f = () => new G(i, {
|
|
863
863
|
schema: e,
|
|
864
864
|
value: u,
|
|
865
865
|
name: n,
|
|
@@ -870,7 +870,7 @@ function jr(e, t, n, r, { component: i, rootData: a, schemaOnly: o, target: s, s
|
|
|
870
870
|
});
|
|
871
871
|
o && P(u) && (u = u.map((e) => e[o]));
|
|
872
872
|
let p = H(e)?.processValue;
|
|
873
|
-
p && (u = p(
|
|
873
|
+
p && (u = p(yr(f), d)), s && c && (u = s(yr(f))), (!s || c) && xr(e, f) ? delete a[n] : a[n] = u;
|
|
874
874
|
},
|
|
875
875
|
options: l
|
|
876
876
|
}), d.process(t, u, l);
|
|
@@ -884,7 +884,7 @@ function Mr(e, t, { dataPath: n = null, componentPath: r = "", processedData: i
|
|
|
884
884
|
options: u
|
|
885
885
|
}, f = (e, t) => e == null ? null : V(e, t), p = (e, r) => {
|
|
886
886
|
if (e) for (let [p, h] of Object.entries(e)) {
|
|
887
|
-
let e =
|
|
887
|
+
let e = An(h), g = e && p !== a ? f(n, p) : n, _ = {
|
|
888
888
|
schema: h,
|
|
889
889
|
data: t,
|
|
890
890
|
name: p,
|
|
@@ -893,11 +893,11 @@ function Mr(e, t, { dataPath: n = null, componentPath: r = "", processedData: i
|
|
|
893
893
|
processedData: i
|
|
894
894
|
};
|
|
895
895
|
if (c(_)) {
|
|
896
|
-
if (l &&
|
|
896
|
+
if (l && Ln(h)) {
|
|
897
897
|
m(h.panels, _.componentPath);
|
|
898
898
|
continue;
|
|
899
899
|
}
|
|
900
|
-
if (!
|
|
900
|
+
if (!wn(h)) {
|
|
901
901
|
if (!e) Mr(h, t, {
|
|
902
902
|
...d,
|
|
903
903
|
dataPath: n,
|
|
@@ -907,13 +907,13 @@ function Mr(e, t, { dataPath: n = null, componentPath: r = "", processedData: i
|
|
|
907
907
|
else {
|
|
908
908
|
let { wrapPrimitives: e } = h, n = (n, r = null) => {
|
|
909
909
|
e && !I(n) && (n = { [e]: n });
|
|
910
|
-
let a = r === null ? g : f(g, r), o = r === null ? _.componentPath : V(_.componentPath, r), s = new
|
|
910
|
+
let a = r === null ? g : f(g, r), o = r === null ? _.componentPath : V(_.componentPath, r), s = new G(u.component, {
|
|
911
911
|
schema: h,
|
|
912
912
|
data: t,
|
|
913
913
|
dataPath: g,
|
|
914
914
|
name: p,
|
|
915
915
|
rootData: u.rootData
|
|
916
|
-
}), c =
|
|
916
|
+
}), c = lr((H(h)?.getFormSchemasForProcessing || or)(h, s), n);
|
|
917
917
|
if (c) {
|
|
918
918
|
let t = i ? Ar(h, n, u) : null;
|
|
919
919
|
return Mr(c, n, {
|
|
@@ -926,7 +926,7 @@ function Mr(e, t, { dataPath: n = null, componentPath: r = "", processedData: i
|
|
|
926
926
|
}
|
|
927
927
|
return { ...n };
|
|
928
928
|
};
|
|
929
|
-
if (o?.(_),
|
|
929
|
+
if (o?.(_), $n(h)) {
|
|
930
930
|
let e = i ? i[p] : t[p];
|
|
931
931
|
e != null && (e = P(e) ? i ? e.map(n) : e.forEach(n) : n(e), i && (i[p] = e));
|
|
932
932
|
}
|
|
@@ -945,10 +945,10 @@ function Mr(e, t, { dataPath: n = null, componentPath: r = "", processedData: i
|
|
|
945
945
|
componentPath: V(r, a),
|
|
946
946
|
processedData: i
|
|
947
947
|
};
|
|
948
|
-
c(e) && !
|
|
948
|
+
c(e) && !wn(o) && p(o.components, e.componentPath);
|
|
949
949
|
}
|
|
950
950
|
};
|
|
951
|
-
return p(F(e.components) ?
|
|
951
|
+
return p(F(e.components) ? ur(e, t, new G(u.component, {
|
|
952
952
|
schema: e,
|
|
953
953
|
data: t,
|
|
954
954
|
dataPath: n,
|
|
@@ -991,22 +991,28 @@ function Ir(e, t, n) {
|
|
|
991
991
|
return t;
|
|
992
992
|
}
|
|
993
993
|
function Lr(e, t) {
|
|
994
|
-
return
|
|
994
|
+
return Gn(t, (t) => Pr(e, t));
|
|
995
995
|
}
|
|
996
996
|
//#endregion
|
|
997
997
|
//#region src/mixins/ValueMixin.js
|
|
998
998
|
var Rr = { computed: { value: {
|
|
999
999
|
get() {
|
|
1000
|
-
let e =
|
|
1001
|
-
|
|
1000
|
+
let e = kr(this.schema, this.data, this.name, () => G.createForSchema(this, {
|
|
1001
|
+
schema: this.schema,
|
|
1002
|
+
name: this.name,
|
|
1003
|
+
data: this.data,
|
|
1004
|
+
dataPath: this.dataPath,
|
|
1005
|
+
rootData: this.rootData
|
|
1006
|
+
})), { format: t } = this.schema;
|
|
1007
|
+
return F(t) ? t(new G(this, { value: e })) : e;
|
|
1002
1008
|
},
|
|
1003
1009
|
set(e) {
|
|
1004
1010
|
let { parse: t } = this.schema;
|
|
1005
|
-
t && (e = t(new
|
|
1011
|
+
t && (e = t(new G(this, { value: e }))), this.parsedValue = e, this.data[this.name] = e;
|
|
1006
1012
|
}
|
|
1007
1013
|
} } }, K = { computed: {
|
|
1008
1014
|
context() {
|
|
1009
|
-
return new
|
|
1015
|
+
return new G(this, { nested: this.nested });
|
|
1010
1016
|
},
|
|
1011
1017
|
parentData() {
|
|
1012
1018
|
let e = $t(this.rootData, this.dataPath, this.nested);
|
|
@@ -1101,7 +1107,7 @@ var Br = {
|
|
|
1101
1107
|
//#region src/utils/schema/validation.js
|
|
1102
1108
|
function $r(e, t) {
|
|
1103
1109
|
let n = { ...H(e)?.getTypeValidations?.(e, t) };
|
|
1104
|
-
|
|
1110
|
+
_r("required", {
|
|
1105
1111
|
type: Boolean,
|
|
1106
1112
|
schema: e,
|
|
1107
1113
|
context: t
|
|
@@ -1121,7 +1127,7 @@ function ei(e, t) {
|
|
|
1121
1127
|
return n;
|
|
1122
1128
|
}
|
|
1123
1129
|
function ti(e, t, { dataPath: n = "", component: r = null, rootData: i = t } = {}) {
|
|
1124
|
-
let a = null, o = ({ schema: e, data: t, name: n, dataPath: a }) => new
|
|
1130
|
+
let a = null, o = ({ schema: e, data: t, name: n, dataPath: a }) => new G(r, {
|
|
1125
1131
|
schema: e,
|
|
1126
1132
|
value: n == null ? void 0 : t[n],
|
|
1127
1133
|
name: n,
|
|
@@ -1131,7 +1137,7 @@ function ti(e, t, { dataPath: n = "", component: r = null, rootData: i = t } = {
|
|
|
1131
1137
|
});
|
|
1132
1138
|
return Mr(e, t, {
|
|
1133
1139
|
dataPath: n,
|
|
1134
|
-
shouldProcess: (e) =>
|
|
1140
|
+
shouldProcess: (e) => vr(e.schema, o(e)),
|
|
1135
1141
|
shouldSkipSourcesWithResource: !0,
|
|
1136
1142
|
before: (e) => {
|
|
1137
1143
|
let { schema: t, data: n, name: r, dataPath: i } = e, s = o(e), c = n[r], { format: l } = t;
|
|
@@ -1302,6 +1308,9 @@ var ai = {
|
|
|
1302
1308
|
name() {
|
|
1303
1309
|
return this.schema.name;
|
|
1304
1310
|
},
|
|
1311
|
+
formModel() {
|
|
1312
|
+
return (this.dialogComponent ?? this.routeComponent).formModel;
|
|
1313
|
+
},
|
|
1305
1314
|
type() {
|
|
1306
1315
|
return this.schema.type;
|
|
1307
1316
|
},
|
|
@@ -1382,12 +1391,15 @@ var ai = {
|
|
|
1382
1391
|
}
|
|
1383
1392
|
},
|
|
1384
1393
|
created() {
|
|
1385
|
-
this._register(!0), this.setupSchemaFields();
|
|
1394
|
+
this._register(!0), this.setupSchemaFields(), this.warnAboutUncomputedValue();
|
|
1386
1395
|
},
|
|
1387
1396
|
unmounted() {
|
|
1388
1397
|
this._register(!1);
|
|
1389
1398
|
},
|
|
1390
1399
|
methods: {
|
|
1400
|
+
warnAboutUncomputedValue() {
|
|
1401
|
+
this.schema.compute && !this.formModel.hasComputedValueEntry(this.componentPath) && console.warn(`The value of the component at '${this.componentPath}' isn't computed, as its data isn't part of a form model.`);
|
|
1402
|
+
},
|
|
1391
1403
|
_register(e) {
|
|
1392
1404
|
this.$emit("update:component", e ? this : null), this._registerWithSchemaComponent(e, this.componentPath);
|
|
1393
1405
|
},
|
|
@@ -1471,14 +1483,14 @@ async function ci(e, t = si) {
|
|
|
1471
1483
|
})) : I(n) && (n = Object.fromEntries(await qe(Object.entries(n), async ([e, n]) => [e, await t(n, !0)]))), n;
|
|
1472
1484
|
}
|
|
1473
1485
|
async function li(e) {
|
|
1474
|
-
return ci(e, async (e, t) => (e = await si(e, t), !e.name &&
|
|
1486
|
+
return ci(e, async (e, t) => (e = await si(e, t), !e.name && Tn(e) && (e = {
|
|
1475
1487
|
...e,
|
|
1476
1488
|
name: xe(e.label),
|
|
1477
1489
|
items: await ci(e.items)
|
|
1478
1490
|
}), e));
|
|
1479
1491
|
}
|
|
1480
1492
|
function ui(e) {
|
|
1481
|
-
return Object.fromEntries(Object.entries(e).reduce((e, [t, n]) => (
|
|
1493
|
+
return Object.fromEntries(Object.entries(e).reduce((e, [t, n]) => (Tn(n) ? e.push(...Object.entries(n.items)) : e.push([t, n]), e), []));
|
|
1482
1494
|
}
|
|
1483
1495
|
async function di(e) {
|
|
1484
1496
|
let { component: t } = e;
|
|
@@ -1503,19 +1515,19 @@ function mi(e, t, n = null, r = 0, i = 1) {
|
|
|
1503
1515
|
let i = [], o = (t, a, o) => {
|
|
1504
1516
|
i.push(hi(e, t, a, n, r + o));
|
|
1505
1517
|
};
|
|
1506
|
-
return hn(t, o), mn(
|
|
1518
|
+
return hn(t, o), mn(Pn(t), o), Promise.all(i);
|
|
1507
1519
|
}
|
|
1508
1520
|
}
|
|
1509
1521
|
}
|
|
1510
1522
|
function hi(e, t, n, r = null, i = 0) {
|
|
1511
|
-
return _i(e, t), Promise.all([qe(
|
|
1523
|
+
return _i(e, t), Promise.all([qe(Pn(t), (t) => mi(e, t, r, i)), H(t)?.processSchema?.(e, t, n, r, i)]);
|
|
1512
1524
|
}
|
|
1513
1525
|
async function gi(e, t, n, r, i = "") {
|
|
1514
1526
|
_i(t, n), yi(t, n, r, i);
|
|
1515
1527
|
let a = [];
|
|
1516
|
-
if (
|
|
1517
|
-
else if (
|
|
1518
|
-
else throw Error(`Invalid view schema: '${
|
|
1528
|
+
if (xn(n)) await wi(t, n), await mi(t, n, a);
|
|
1529
|
+
else if (Tn(n)) a = await Promise.all(Object.entries(n.items).map(async ([r, i]) => gi(e, t, i, r, n.fullPath)));
|
|
1530
|
+
else throw Error(`Invalid view schema: '${En(n)}'`);
|
|
1519
1531
|
return {
|
|
1520
1532
|
path: n.fullPath,
|
|
1521
1533
|
children: a,
|
|
@@ -1533,7 +1545,7 @@ function _i(e, t) {
|
|
|
1533
1545
|
function vi(e, t) {
|
|
1534
1546
|
hn(t, (t) => {
|
|
1535
1547
|
_i(e, t);
|
|
1536
|
-
let n =
|
|
1548
|
+
let n = or(t);
|
|
1537
1549
|
for (let t of Object.values(n)) vi(e, t);
|
|
1538
1550
|
});
|
|
1539
1551
|
}
|
|
@@ -1548,15 +1560,15 @@ async function bi(e, t, n) {
|
|
|
1548
1560
|
}, r, n, s), r;
|
|
1549
1561
|
}
|
|
1550
1562
|
async function xi(e, t, n = null, r = 0, i = 1) {
|
|
1551
|
-
if (t = await si(t, !0), !
|
|
1563
|
+
if (t = await si(t, !0), !bn(t)) throw Error(`Invalid form schema: '${En(t)}'`);
|
|
1552
1564
|
return _i(e, t), await wi(e, t), await mi(e, t, n, r, i), t;
|
|
1553
1565
|
}
|
|
1554
1566
|
async function Si(e, t) {
|
|
1555
|
-
if (t = await si(t, !0), !
|
|
1567
|
+
if (t = await si(t, !0), !Sn(t)) throw Error(`Invalid tab schema: '${En(t)}'`);
|
|
1556
1568
|
return _i(e, t), t;
|
|
1557
1569
|
}
|
|
1558
1570
|
async function Ci(e, t) {
|
|
1559
|
-
if (t = await si(t, !0), !
|
|
1571
|
+
if (t = await si(t, !0), !Cn(t)) throw Error(`Invalid panel schema: '${En(t)}'`);
|
|
1560
1572
|
return _i(e, t), t;
|
|
1561
1573
|
}
|
|
1562
1574
|
async function wi(e, t) {
|
|
@@ -1592,7 +1604,7 @@ function Ei(e, t) {
|
|
|
1592
1604
|
//#endregion
|
|
1593
1605
|
//#region src/mixins/DitoMixin.js
|
|
1594
1606
|
var Di = {
|
|
1595
|
-
mixins: [
|
|
1607
|
+
mixins: [Hn],
|
|
1596
1608
|
inject: [
|
|
1597
1609
|
"api",
|
|
1598
1610
|
"$verbs",
|
|
@@ -1648,7 +1660,7 @@ var Di = {
|
|
|
1648
1660
|
return this.api.locale;
|
|
1649
1661
|
},
|
|
1650
1662
|
context() {
|
|
1651
|
-
return new
|
|
1663
|
+
return new G(this, { nested: !1 });
|
|
1652
1664
|
},
|
|
1653
1665
|
rootComponent() {
|
|
1654
1666
|
return this.$root.$refs.root;
|
|
@@ -1746,7 +1758,7 @@ var Di = {
|
|
|
1746
1758
|
this.getChildStore(e, t), this.removeStore(e);
|
|
1747
1759
|
},
|
|
1748
1760
|
getSchemaValue(e, { type: t, default: n, schema: r = this.schema, context: i = this.context, callback: a = !0 } = {}) {
|
|
1749
|
-
return
|
|
1761
|
+
return _r(e, {
|
|
1750
1762
|
type: t,
|
|
1751
1763
|
schema: r,
|
|
1752
1764
|
context: i,
|
|
@@ -1760,12 +1772,14 @@ var Di = {
|
|
|
1760
1772
|
type: [String, Object]
|
|
1761
1773
|
}) || R(t || e.name) : R(t) || "";
|
|
1762
1774
|
},
|
|
1763
|
-
getButtonAttributes(e, t = null) {
|
|
1764
|
-
let
|
|
1775
|
+
getButtonAttributes(e, t = null, n = null) {
|
|
1776
|
+
let r = n ? null : `${R(e)}${t ? ` ${t}` : ""}`;
|
|
1765
1777
|
return {
|
|
1766
1778
|
class: `dito-button--${e}`,
|
|
1767
|
-
|
|
1768
|
-
|
|
1779
|
+
...r && {
|
|
1780
|
+
title: r,
|
|
1781
|
+
"aria-label": r
|
|
1782
|
+
}
|
|
1769
1783
|
};
|
|
1770
1784
|
},
|
|
1771
1785
|
getQueryLink(e) {
|
|
@@ -1775,7 +1789,7 @@ var Di = {
|
|
|
1775
1789
|
};
|
|
1776
1790
|
},
|
|
1777
1791
|
shouldRenderSchema(e = null) {
|
|
1778
|
-
return
|
|
1792
|
+
return vr(e, this.context);
|
|
1779
1793
|
},
|
|
1780
1794
|
shouldShowSchema(e = null) {
|
|
1781
1795
|
return this.getSchemaValue("visible", {
|
|
@@ -1911,7 +1925,7 @@ var Di = {
|
|
|
1911
1925
|
emitEvent(e, { context: t = null, parent: n = null } = {}) {
|
|
1912
1926
|
let r = this.hasListeners(e), i = n?.hasListeners(e);
|
|
1913
1927
|
if (r || i) {
|
|
1914
|
-
let a = (n) => n.emit(e, t =
|
|
1928
|
+
let a = (n) => n.emit(e, t = G.get(this, t)), o = (e) => i && e !== !1 ? a(n).then(() => e) : e, s = () => r ? a(this).then(o) : o(void 0);
|
|
1915
1929
|
return ["load", "change"].includes(e) ? this.$nextTick(s) : s();
|
|
1916
1930
|
}
|
|
1917
1931
|
},
|
|
@@ -4143,7 +4157,7 @@ var xo = class {
|
|
|
4143
4157
|
derivedValueDataPaths = null;
|
|
4144
4158
|
constructor({ component: e, getSchema: t, getData: n, getSourceSchema: r = null }) {
|
|
4145
4159
|
this.component = e, this.getSchema = t, this.getData = n, this.getSourceSchema = r, this.rootScope = m(!0), this.rootScope.run(() => {
|
|
4146
|
-
me([t, n], ([e, t]) => this.initializeData(e, t),
|
|
4160
|
+
me([t, n], ([e, t]) => this.initializeData(e, t), To), this.dataEntries = a(() => this.getDataEntries()), me(() => this.dataEntries.value.computedValueEntries, (e) => this.updateComputedValueRecords(e), To), me(() => this.dataEntries.value.entriesWithMissingValues, (e) => this.setDefaultValues(e), To), r && me(n, () => this.takeProcessedDataSnapshot().catch(console.error), To);
|
|
4147
4161
|
});
|
|
4148
4162
|
}
|
|
4149
4163
|
get dataPath() {
|
|
@@ -4185,12 +4199,12 @@ var xo = class {
|
|
|
4185
4199
|
}
|
|
4186
4200
|
getProcessedDataForDirtyCheck() {
|
|
4187
4201
|
let e = this.getSchema(), t = this.getData();
|
|
4188
|
-
return t && !
|
|
4202
|
+
return t && !dr(e) ? jr(e, this.getSourceSchema(), t, this.dataPath, {
|
|
4189
4203
|
component: this.component.mainSchemaComponent ?? this.component,
|
|
4190
4204
|
rootData: this.rootData,
|
|
4191
4205
|
schemaOnly: !0,
|
|
4192
4206
|
target: "clipboard",
|
|
4193
|
-
|
|
4207
|
+
shouldCallProcess: !1
|
|
4194
4208
|
}) : null;
|
|
4195
4209
|
}
|
|
4196
4210
|
async applyCleanChanges(e) {
|
|
@@ -4208,7 +4222,7 @@ var xo = class {
|
|
|
4208
4222
|
this.pendingLoads.add(e), e.finally(() => this.pendingLoads.delete(e));
|
|
4209
4223
|
}
|
|
4210
4224
|
initializeData(e, t) {
|
|
4211
|
-
t && !
|
|
4225
|
+
t && !dr(e) && Dr(e, t, this.component, {
|
|
4212
4226
|
dataPath: this.dataPath,
|
|
4213
4227
|
rootData: this.rootData,
|
|
4214
4228
|
shouldSkipSourcesWithResource: !0,
|
|
@@ -4217,13 +4231,13 @@ var xo = class {
|
|
|
4217
4231
|
}
|
|
4218
4232
|
getDataEntries() {
|
|
4219
4233
|
let e = this.getSchema(), t = this.getData(), n = /* @__PURE__ */ new Map(), r = [];
|
|
4220
|
-
return t && !
|
|
4234
|
+
return t && !dr(e) && Mr(e, t, {
|
|
4221
4235
|
dataPath: this.dataPath,
|
|
4222
4236
|
componentPath: this.componentPath,
|
|
4223
4237
|
shouldProcess: (e) => this.isEntryShown(e),
|
|
4224
4238
|
shouldSkipSourcesWithResource: !0,
|
|
4225
4239
|
before: (e) => {
|
|
4226
|
-
|
|
4240
|
+
Do(e.schema) && n.set(e.componentPath, e), this.shouldSetDefaultValue(e) && r.push(e);
|
|
4227
4241
|
},
|
|
4228
4242
|
options: {
|
|
4229
4243
|
component: this.component,
|
|
@@ -4235,7 +4249,7 @@ var xo = class {
|
|
|
4235
4249
|
};
|
|
4236
4250
|
}
|
|
4237
4251
|
isEntryShown(e) {
|
|
4238
|
-
return e.schema.if === void 0 ||
|
|
4252
|
+
return e.schema.if === void 0 || _r("if", {
|
|
4239
4253
|
type: Boolean,
|
|
4240
4254
|
schema: e.schema,
|
|
4241
4255
|
context: this.createEntryContext(e),
|
|
@@ -4268,27 +4282,40 @@ var xo = class {
|
|
|
4268
4282
|
let t = this.rootScope.run(() => m());
|
|
4269
4283
|
return t.run(() => {
|
|
4270
4284
|
let t = a(() => this.isEntryCurrent(e));
|
|
4271
|
-
if (e.schema.compute && me(() => t.value ?
|
|
4285
|
+
if (e.schema.compute && me(() => t.value ? this.getComputedValueResult(e) : null, (t) => {
|
|
4272
4286
|
t && this.writeComputedValue(e, t.value);
|
|
4273
|
-
},
|
|
4287
|
+
}, To), wr(e.schema)) {
|
|
4274
4288
|
let n = this.createDataSchemaResolver(e.schema, e);
|
|
4275
4289
|
me(() => t.value && !n.isLoading ? { value: n.value } : null, (t) => {
|
|
4276
4290
|
t && this.writeComputedValue(e, t.value);
|
|
4277
|
-
},
|
|
4291
|
+
}, To);
|
|
4278
4292
|
}
|
|
4279
4293
|
}), t;
|
|
4280
4294
|
}
|
|
4295
|
+
hasComputedValueEntry(e) {
|
|
4296
|
+
return this.dataEntries.value.computedValueEntries.has(e);
|
|
4297
|
+
}
|
|
4281
4298
|
isEntryCurrent({ componentPath: e, schema: t, data: n }) {
|
|
4282
4299
|
let r = this.dataEntries.value.computedValueEntries.get(e);
|
|
4283
4300
|
return r?.schema === t && r.data === n;
|
|
4284
4301
|
}
|
|
4285
|
-
|
|
4302
|
+
getComputedValueResult(e) {
|
|
4286
4303
|
let { schema: t, data: n, name: r, dataPath: i } = e;
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4304
|
+
try {
|
|
4305
|
+
return { value: Or(t, n, r, i, {
|
|
4306
|
+
component: this.component.mainSchemaComponent ?? this.component,
|
|
4307
|
+
rootData: this.rootData,
|
|
4308
|
+
getOptions: t.options ? () => this.getLoadedOptions(e) : null
|
|
4309
|
+
}) };
|
|
4310
|
+
} catch (e) {
|
|
4311
|
+
if (e === Eo) return null;
|
|
4312
|
+
throw e;
|
|
4313
|
+
}
|
|
4314
|
+
}
|
|
4315
|
+
getLoadedOptions(e) {
|
|
4316
|
+
let t = this.getOptions(e);
|
|
4317
|
+
if (t === void 0) throw Eo;
|
|
4318
|
+
return t;
|
|
4292
4319
|
}
|
|
4293
4320
|
getOptions(e) {
|
|
4294
4321
|
return this.getOptionsResolver(e).value;
|
|
@@ -4311,10 +4338,10 @@ var xo = class {
|
|
|
4311
4338
|
N(t, n[r]) || (this.derivedValueDataPaths?.add(this.getRelativeDataPath(e)), n[r] = t);
|
|
4312
4339
|
}
|
|
4313
4340
|
getRelativeDataPath({ schema: e, name: t, dataPath: n }) {
|
|
4314
|
-
return (
|
|
4341
|
+
return (An(e) ? B(n) : [...B(n), t]).slice(B(this.dataPath).length).join("/");
|
|
4315
4342
|
}
|
|
4316
4343
|
createEntryContext({ schema: e, data: t, name: n, dataPath: r }) {
|
|
4317
|
-
return
|
|
4344
|
+
return G.createForSchema(this.component, {
|
|
4318
4345
|
schema: e,
|
|
4319
4346
|
name: n,
|
|
4320
4347
|
data: t,
|
|
@@ -4342,14 +4369,17 @@ function Co(e, t, n) {
|
|
|
4342
4369
|
for (let i of /* @__PURE__ */ new Set([...Object.keys(t), ...Object.keys(n)])) i in n ? r[i] = Co(e[i], t[i], n[i]) : delete r[i];
|
|
4343
4370
|
return r;
|
|
4344
4371
|
}
|
|
4345
|
-
var wo = Symbol("notFound")
|
|
4346
|
-
|
|
4372
|
+
var wo = Symbol("notFound"), To = {
|
|
4373
|
+
immediate: !0,
|
|
4374
|
+
flush: "post"
|
|
4375
|
+
}, Eo = Symbol("optionsNotLoaded");
|
|
4376
|
+
function Do(e) {
|
|
4347
4377
|
return !!e.compute || wr(e);
|
|
4348
4378
|
}
|
|
4349
4379
|
//#endregion
|
|
4350
4380
|
//#region src/components/DitoView.vue?vue&type=template&lang.js
|
|
4351
|
-
var
|
|
4352
|
-
function
|
|
4381
|
+
var Oo = ["data-resource"];
|
|
4382
|
+
function ko(e, n, r, i, a, o) {
|
|
4353
4383
|
let u = w("DitoRouterView"), d = w("DitoSchema");
|
|
4354
4384
|
return e.user && e.shouldRenderSchema(e.viewSchema) ? (x(), l(t, { key: 0 }, [e.isLastRoute ? (x(), l("div", {
|
|
4355
4385
|
key: 1,
|
|
@@ -4371,12 +4401,12 @@ function Do(e, n, r, i, a, o) {
|
|
|
4371
4401
|
"meta",
|
|
4372
4402
|
"store",
|
|
4373
4403
|
"disabled"
|
|
4374
|
-
]))], 8,
|
|
4404
|
+
]))], 8, Oo)) : (x(), s(u, {
|
|
4375
4405
|
key: 0,
|
|
4376
4406
|
routeLevel: e.routeLevel + 1
|
|
4377
4407
|
}, null, 8, ["routeLevel"]))], 64)) : c("", !0);
|
|
4378
4408
|
}
|
|
4379
|
-
var
|
|
4409
|
+
var Ao = /*#__PURE__*/ X(Y.component("DitoView", {
|
|
4380
4410
|
mixins: [vo],
|
|
4381
4411
|
provide() {
|
|
4382
4412
|
return {
|
|
@@ -4401,7 +4431,7 @@ var Oo = /*#__PURE__*/ X(Y.component("DitoView", {
|
|
|
4401
4431
|
return !0;
|
|
4402
4432
|
},
|
|
4403
4433
|
isSingleComponentView() {
|
|
4404
|
-
return
|
|
4434
|
+
return Dn(this.schema);
|
|
4405
4435
|
},
|
|
4406
4436
|
mainComponent() {
|
|
4407
4437
|
return this.mainSchemaComponent?.getComponentByDataPath(this.name);
|
|
@@ -4451,10 +4481,10 @@ var Oo = /*#__PURE__*/ X(Y.component("DitoView", {
|
|
|
4451
4481
|
this.isLoading = !!e;
|
|
4452
4482
|
}
|
|
4453
4483
|
}
|
|
4454
|
-
}), [["render",
|
|
4484
|
+
}), [["render", ko]]);
|
|
4455
4485
|
//#endregion
|
|
4456
4486
|
//#region ../../node_modules/@vueuse/integrations/dist/useFocusTrap.js
|
|
4457
|
-
function
|
|
4487
|
+
function jo(e, t = {}) {
|
|
4458
4488
|
let n, { immediate: r, ...i } = t, o = ae(!1), s = ae(!1), c = (e) => n && n.activate(e), l = (e) => n && n.deactivate(e), u = () => {
|
|
4459
4489
|
n && (n.pause(), s.value = !0);
|
|
4460
4490
|
}, d = () => {
|
|
@@ -4493,16 +4523,16 @@ function ko(e, t = {}) {
|
|
|
4493
4523
|
}
|
|
4494
4524
|
//#endregion
|
|
4495
4525
|
//#region ../../node_modules/@vueuse/integrations/dist/useFocusTrap/component.js
|
|
4496
|
-
var
|
|
4497
|
-
let n = ae(), r = re(
|
|
4526
|
+
var Mo = /* #__PURE__ */ p((e, { slots: t }) => {
|
|
4527
|
+
let n = ae(), r = re(jo(n, e.options));
|
|
4498
4528
|
return () => {
|
|
4499
4529
|
if (t.default) return g(e.as || "div", { ref: n }, t.default(r));
|
|
4500
4530
|
};
|
|
4501
4531
|
}, {
|
|
4502
4532
|
name: "UseFocusTrap",
|
|
4503
4533
|
props: ["as", "options"]
|
|
4504
|
-
}),
|
|
4505
|
-
function
|
|
4534
|
+
}), No = ["aria-label"];
|
|
4535
|
+
function Po(e, t, n, r, i, a) {
|
|
4506
4536
|
let o = w("DitoButtons"), s = w("DitoSchema"), c = w("UseFocusTrap");
|
|
4507
4537
|
return x(), l("div", {
|
|
4508
4538
|
class: "dito-dialog",
|
|
@@ -4535,11 +4565,11 @@ function Mo(e, t, n, r, i, a) {
|
|
|
4535
4565
|
_: 1
|
|
4536
4566
|
}, 8, ["schema", "data"])], 32)]),
|
|
4537
4567
|
_: 1
|
|
4538
|
-
}, 8, ["options"])], 44,
|
|
4568
|
+
}, 8, ["options"])], 44, No);
|
|
4539
4569
|
}
|
|
4540
|
-
var
|
|
4570
|
+
var Fo = /*#__PURE__*/ X(Y.component("DitoDialog", {
|
|
4541
4571
|
mixins: [mo],
|
|
4542
|
-
components: { UseFocusTrap:
|
|
4572
|
+
components: { UseFocusTrap: Mo },
|
|
4543
4573
|
emits: ["remove"],
|
|
4544
4574
|
provide() {
|
|
4545
4575
|
return { $dialogComponent: () => this };
|
|
@@ -4585,7 +4615,7 @@ var No = /*#__PURE__*/ X(Y.component("DitoDialog", {
|
|
|
4585
4615
|
};
|
|
4586
4616
|
},
|
|
4587
4617
|
buttonSchemas() {
|
|
4588
|
-
return Object.fromEntries(Object.entries(
|
|
4618
|
+
return Object.fromEntries(Object.entries(pr(this.buttons)).map(([e, t]) => (e === "cancel" && !t.events && (t = {
|
|
4589
4619
|
...t,
|
|
4590
4620
|
events: { click: () => this.cancel() }
|
|
4591
4621
|
}), [e, t])));
|
|
@@ -4645,15 +4675,15 @@ var No = /*#__PURE__*/ X(Y.component("DitoDialog", {
|
|
|
4645
4675
|
this.settings.clickToClose && this.close();
|
|
4646
4676
|
}
|
|
4647
4677
|
}
|
|
4648
|
-
}), [["render",
|
|
4678
|
+
}), [["render", Po]]), Io = [
|
|
4649
4679
|
"data-agent-browser",
|
|
4650
4680
|
"data-agent-platform",
|
|
4651
4681
|
"data-agent-version"
|
|
4652
|
-
],
|
|
4682
|
+
], Lo = {
|
|
4653
4683
|
key: 0,
|
|
4654
4684
|
class: "dito-drag-overlay"
|
|
4655
4685
|
};
|
|
4656
|
-
function
|
|
4686
|
+
function Ro(e, n, a, o, d, p) {
|
|
4657
4687
|
let m = w("DitoDialog"), h = w("DitoNavigation"), g = w("DitoHeader"), _ = w("DitoRouterView"), ee = w("DitoAccount"), v = w("DitoSidebar"), te = w("DitoNotifications"), ne = ie("resize");
|
|
4658
4688
|
return x(), l("div", {
|
|
4659
4689
|
class: "dito-root",
|
|
@@ -4662,7 +4692,7 @@ function Io(e, n, a, o, d, p) {
|
|
|
4662
4692
|
"data-agent-version": e.appState.agent.versionNumber
|
|
4663
4693
|
}, [
|
|
4664
4694
|
f(r, { name: "dito-drag" }, {
|
|
4665
|
-
default: O(() => [e.isDraggingFiles ? (x(), l("div",
|
|
4695
|
+
default: O(() => [e.isDraggingFiles ? (x(), l("div", Lo)) : c("", !0)]),
|
|
4666
4696
|
_: 1
|
|
4667
4697
|
}),
|
|
4668
4698
|
f(i, { name: "dito-dialog" }, {
|
|
@@ -4698,13 +4728,13 @@ function Io(e, n, a, o, d, p) {
|
|
|
4698
4728
|
_: 1
|
|
4699
4729
|
}),
|
|
4700
4730
|
f(te, { ref: "notifications" }, null, 512)
|
|
4701
|
-
], 8,
|
|
4731
|
+
], 8, Io);
|
|
4702
4732
|
}
|
|
4703
4733
|
//#endregion
|
|
4704
4734
|
//#region src/components/DitoRoot.vue
|
|
4705
|
-
var
|
|
4735
|
+
var zo = Y.component("DitoRoot", {
|
|
4706
4736
|
mixins: [mo],
|
|
4707
|
-
components: { DitoDialog:
|
|
4737
|
+
components: { DitoDialog: Fo },
|
|
4708
4738
|
provide() {
|
|
4709
4739
|
return { $views: () => this.resolvedViews };
|
|
4710
4740
|
},
|
|
@@ -4833,7 +4863,7 @@ var Lo = Y.component("DitoRoot", {
|
|
|
4833
4863
|
type: "dialog",
|
|
4834
4864
|
components: e
|
|
4835
4865
|
}, o, 0), o.length > 0) throw Error("Dialogs do not support components that produce routes");
|
|
4836
|
-
let s = `dialog-${++
|
|
4866
|
+
let s = `dialog-${++Bo}`;
|
|
4837
4867
|
this.dialogs[s] = {
|
|
4838
4868
|
components: e,
|
|
4839
4869
|
buttons: t,
|
|
@@ -4931,8 +4961,8 @@ var Lo = Y.component("DitoRoot", {
|
|
|
4931
4961
|
} catch (e) {
|
|
4932
4962
|
return e.request || console.error(e), this.login();
|
|
4933
4963
|
}
|
|
4934
|
-
let e = await qe(Object.entries(this.resolvedViews), ([e, t]) => gi(
|
|
4935
|
-
this.removeRoutes?.(), this.removeRoutes =
|
|
4964
|
+
let e = await qe(Object.entries(this.resolvedViews), ([e, t]) => gi(Ao, this.api, t, e)), { fullPath: t } = this.$route;
|
|
4965
|
+
this.removeRoutes?.(), this.removeRoutes = Vo(this.$router, [{
|
|
4936
4966
|
name: "root",
|
|
4937
4967
|
path: "/",
|
|
4938
4968
|
components: {}
|
|
@@ -4942,37 +4972,37 @@ var Lo = Y.component("DitoRoot", {
|
|
|
4942
4972
|
this.pageWidth = e;
|
|
4943
4973
|
}
|
|
4944
4974
|
}
|
|
4945
|
-
}),
|
|
4946
|
-
function
|
|
4975
|
+
}), Bo = 0;
|
|
4976
|
+
function Vo(e, t) {
|
|
4947
4977
|
let n = [];
|
|
4948
4978
|
for (let r of t) n.push(e.addRoute(r));
|
|
4949
4979
|
return () => {
|
|
4950
4980
|
for (let e of n) e();
|
|
4951
4981
|
};
|
|
4952
4982
|
}
|
|
4953
|
-
var
|
|
4983
|
+
var Ho = /*#__PURE__*/ X(zo, [["render", Ro]]), Uo = { class: "dito-menu__item" }, Wo = [
|
|
4954
4984
|
"href",
|
|
4955
4985
|
"aria-current",
|
|
4956
4986
|
"onClick"
|
|
4957
4987
|
];
|
|
4958
|
-
function
|
|
4988
|
+
function Go(e, n, r, i, a, o) {
|
|
4959
4989
|
let d = w("DitoMenu", !0), f = ie("resize");
|
|
4960
4990
|
return k((x(), l("ul", {
|
|
4961
4991
|
class: "dito-menu",
|
|
4962
4992
|
style: b({ "--width": e.width ? `${e.width}px` : null })
|
|
4963
|
-
}, [(x(!0), l(t, null, S(e.items, (n) => (x(), l("li",
|
|
4993
|
+
}, [(x(!0), l(t, null, S(e.items, (n) => (x(), l("li", Uo, [e.shouldShowItem(n) ? (x(), l(t, { key: 0 }, [u("a", {
|
|
4964
4994
|
class: y(["dito-menu__link", { "dito-menu__link--active": e.isActiveItem(n) }]),
|
|
4965
4995
|
href: e.getItemHref(n),
|
|
4966
4996
|
"aria-current": e.isActiveItem(n) ? "page" : null,
|
|
4967
4997
|
onClick: A((t) => e.onClickItem(n), ["prevent", "stop"])
|
|
4968
|
-
}, E(e.getLabel(n)), 11,
|
|
4998
|
+
}, E(e.getLabel(n)), 11, Wo), n.items ? (x(), s(d, {
|
|
4969
4999
|
key: 0,
|
|
4970
5000
|
class: "dito-menu__sub",
|
|
4971
5001
|
items: n.items,
|
|
4972
5002
|
path: e.getItemPath(n, !1)
|
|
4973
5003
|
}, null, 8, ["items", "path"])) : c("", !0)], 64)) : c("", !0)]))), 256))], 4)), [[f, e.onResize]]);
|
|
4974
5004
|
}
|
|
4975
|
-
var
|
|
5005
|
+
var Ko = /*#__PURE__*/ X(Y.component("DitoMenu", {
|
|
4976
5006
|
props: {
|
|
4977
5007
|
items: {
|
|
4978
5008
|
type: [Object, Array],
|
|
@@ -5012,23 +5042,23 @@ var Wo = /*#__PURE__*/ X(Y.component("DitoMenu", {
|
|
|
5012
5042
|
});
|
|
5013
5043
|
}
|
|
5014
5044
|
}
|
|
5015
|
-
}), [["render",
|
|
5045
|
+
}), [["render", Go]]), qo = {
|
|
5016
5046
|
class: "dito-trail",
|
|
5017
5047
|
"aria-label": "Breadcrumb"
|
|
5018
|
-
},
|
|
5048
|
+
}, Jo = [
|
|
5019
5049
|
"aria-current",
|
|
5020
5050
|
"href",
|
|
5021
5051
|
"onClick"
|
|
5022
5052
|
];
|
|
5023
|
-
function
|
|
5024
|
-
return x(), l("div",
|
|
5053
|
+
function Yo(e, n, r, i, a, o) {
|
|
5054
|
+
return x(), l("div", qo, [u("ul", null, [(x(!0), l(t, null, S(e.trail, (t) => (x(), l("li", null, [u("a", {
|
|
5025
5055
|
class: y(["dito-trail__link", { "dito-trail__link--active": t.path === e.$route.path }]),
|
|
5026
5056
|
"aria-current": t.path === e.$route.path ? "page" : null,
|
|
5027
5057
|
href: e.getComponentHref(t),
|
|
5028
5058
|
onClick: A((n) => e.onClickComponent(t), ["prevent", "stop"])
|
|
5029
|
-
}, [u("span", { class: y(["dito-trail__text", { "dito-trail__text--dirty": t.isDirty }]) }, E(t.breadcrumb), 3)], 10,
|
|
5059
|
+
}, [u("span", { class: y(["dito-trail__text", { "dito-trail__text--dirty": t.isDirty }]) }, E(t.breadcrumb), 3)], 10, Jo)]))), 256))]), C(e.$slots, "default")]);
|
|
5030
5060
|
}
|
|
5031
|
-
var
|
|
5061
|
+
var Xo = /*#__PURE__*/ X(Y.component("DitoTrail", {
|
|
5032
5062
|
computed: { trail() {
|
|
5033
5063
|
return this.appState.routeComponents.filter((e) => !e.isLeavingRoute);
|
|
5034
5064
|
} },
|
|
@@ -5047,8 +5077,8 @@ var Jo = /*#__PURE__*/ X(Y.component("DitoTrail", {
|
|
|
5047
5077
|
});
|
|
5048
5078
|
}
|
|
5049
5079
|
}
|
|
5050
|
-
}), [["render",
|
|
5051
|
-
function
|
|
5080
|
+
}), [["render", Yo]]), Zo = ["aria-busy"];
|
|
5081
|
+
function Qo(e, t, n, r, i, a) {
|
|
5052
5082
|
let o = w("DitoSpinner"), d = w("DitoTrail");
|
|
5053
5083
|
return x(), l("nav", {
|
|
5054
5084
|
class: "dito-header",
|
|
@@ -5064,9 +5094,9 @@ function Xo(e, t, n, r, i, a) {
|
|
|
5064
5094
|
}),
|
|
5065
5095
|
t[0] ||= u("div", { class: "dito-header__teleport" }, null, -1),
|
|
5066
5096
|
C(e.$slots, "default")
|
|
5067
|
-
], 8,
|
|
5097
|
+
], 8, Zo);
|
|
5068
5098
|
}
|
|
5069
|
-
var
|
|
5099
|
+
var $o = /*#__PURE__*/ X(Y.component("DitoHeader", { props: {
|
|
5070
5100
|
spinner: {
|
|
5071
5101
|
type: Object,
|
|
5072
5102
|
default: null
|
|
@@ -5075,13 +5105,13 @@ var Zo = /*#__PURE__*/ X(Y.component("DitoHeader", { props: {
|
|
|
5075
5105
|
type: Boolean,
|
|
5076
5106
|
default: !1
|
|
5077
5107
|
}
|
|
5078
|
-
} }), [["render",
|
|
5108
|
+
} }), [["render", Qo]]), es = {
|
|
5079
5109
|
class: "dito-navigation dito-scroll-parent",
|
|
5080
5110
|
"aria-label": "Main navigation"
|
|
5081
5111
|
};
|
|
5082
|
-
function
|
|
5112
|
+
function ts(e, t, n, r, i, a) {
|
|
5083
5113
|
let o = w("RouterLink"), s = w("DitoMenu");
|
|
5084
|
-
return x(), l("nav",
|
|
5114
|
+
return x(), l("nav", es, [u("h1", null, [f(o, {
|
|
5085
5115
|
class: "dito-link",
|
|
5086
5116
|
to: "/"
|
|
5087
5117
|
}, {
|
|
@@ -5092,13 +5122,13 @@ function $o(e, t, n, r, i, a) {
|
|
|
5092
5122
|
items: e.views
|
|
5093
5123
|
}, null, 8, ["items"])]);
|
|
5094
5124
|
}
|
|
5095
|
-
var
|
|
5125
|
+
var ns = /*#__PURE__*/ X(Y.component("DitoNavigation", {}), [["render", ts]]), rs = {
|
|
5096
5126
|
class: "dito-notifications",
|
|
5097
5127
|
"aria-live": "polite"
|
|
5098
|
-
},
|
|
5099
|
-
function
|
|
5128
|
+
}, is = { class: "dito-notifications__inner" };
|
|
5129
|
+
function as(e, t, n, r, i, a) {
|
|
5100
5130
|
let o = w("VueNotifications");
|
|
5101
|
-
return x(), l("div",
|
|
5131
|
+
return x(), l("div", rs, [t[0] ||= u("div", { class: "dito-header" }, [u("span")], -1), u("div", is, [f(o, {
|
|
5102
5132
|
ref: "notifications",
|
|
5103
5133
|
classes: "dito-notification",
|
|
5104
5134
|
dangerouslySetInnerHtml: !0,
|
|
@@ -5106,7 +5136,7 @@ function rs(e, t, n, r, i, a) {
|
|
|
5106
5136
|
width: ""
|
|
5107
5137
|
}, null, 512)])]);
|
|
5108
5138
|
}
|
|
5109
|
-
var
|
|
5139
|
+
var os = /*#__PURE__*/ X(Y.component("DitoNotifications", {
|
|
5110
5140
|
notifications() {
|
|
5111
5141
|
return this.isMounted && this.$refs.notifications;
|
|
5112
5142
|
},
|
|
@@ -5140,12 +5170,12 @@ var is = /*#__PURE__*/ X(Y.component("DitoNotifications", {
|
|
|
5140
5170
|
this.notifications.destroyAll();
|
|
5141
5171
|
}
|
|
5142
5172
|
}
|
|
5143
|
-
}), [["render",
|
|
5144
|
-
function
|
|
5173
|
+
}), [["render", as]]), ss = { class: "dito-header" };
|
|
5174
|
+
function cs(e, t, n, r, i, a) {
|
|
5145
5175
|
let o = ie("resize");
|
|
5146
|
-
return k((x(), l("aside", { class: y(["dito-sidebar dito-scroll-parent", e.classes]) }, [u("nav",
|
|
5176
|
+
return k((x(), l("aside", { class: y(["dito-sidebar dito-scroll-parent", e.classes]) }, [u("nav", ss, [C(e.$slots, "default")]), t[0] ||= u("div", { class: "dito-sidebar__teleport dito-scroll" }, null, -1)], 2)), [[o, e.onResizeSidebar]]);
|
|
5147
5177
|
}
|
|
5148
|
-
var
|
|
5178
|
+
var ls = /*#__PURE__*/ X(Y.component("DitoSidebar", {
|
|
5149
5179
|
data() {
|
|
5150
5180
|
return { sidebarWidth: 0 };
|
|
5151
5181
|
},
|
|
@@ -5159,7 +5189,7 @@ var ss = /*#__PURE__*/ X(Y.component("DitoSidebar", {
|
|
|
5159
5189
|
methods: { onResizeSidebar({ contentRect: { width: e } }) {
|
|
5160
5190
|
this.sidebarWidth = e;
|
|
5161
5191
|
} }
|
|
5162
|
-
}), [["render",
|
|
5192
|
+
}), [["render", cs]]), us = {
|
|
5163
5193
|
mixins: [mo],
|
|
5164
5194
|
data() {
|
|
5165
5195
|
return { pulldown: {
|
|
@@ -5196,9 +5226,9 @@ var ss = /*#__PURE__*/ X(Y.component("DitoSidebar", {
|
|
|
5196
5226
|
this.pulldown.open = e, this.pulldown.startTime = e ? Date.now() : 0, e && (this.pulldown.handlers = this.domOn(document, this.pulldown.events));
|
|
5197
5227
|
}
|
|
5198
5228
|
}
|
|
5199
|
-
},
|
|
5200
|
-
function
|
|
5201
|
-
return x(), l("div",
|
|
5229
|
+
}, ds = { class: "dito-account" }, fs = ["onMousedown", "onMouseup"];
|
|
5230
|
+
function ps(e, n, r, i, a, o) {
|
|
5231
|
+
return x(), l("div", ds, [u("a", v({ role: "button" }, e.pulldownTriggerAttributes, { onMousedown: n[0] ||= A((t) => e.onPulldownMouseDown(), ["stop"]) }), [u("span", null, E(e.user.username), 1)], 16), u("ul", {
|
|
5202
5232
|
class: y(["dito-pulldown", { "dito-pulldown--open": e.pulldown.open }]),
|
|
5203
5233
|
role: "menu"
|
|
5204
5234
|
}, [(x(!0), l(t, null, S(e.items, (t, n) => (x(), l("li", null, [u("a", {
|
|
@@ -5206,10 +5236,10 @@ function ds(e, n, r, i, a, o) {
|
|
|
5206
5236
|
role: "menuitem",
|
|
5207
5237
|
onMousedown: A((t) => e.onPulldownMouseDown(n), ["stop"]),
|
|
5208
5238
|
onMouseup: (t) => e.onPulldownMouseUp(n)
|
|
5209
|
-
}, E(t), 41,
|
|
5239
|
+
}, E(t), 41, fs)]))), 256))], 2)]);
|
|
5210
5240
|
}
|
|
5211
|
-
var
|
|
5212
|
-
mixins: [
|
|
5241
|
+
var ms = /*#__PURE__*/ X(Y.component("DitoAccount", {
|
|
5242
|
+
mixins: [us],
|
|
5213
5243
|
data() {
|
|
5214
5244
|
return { items: {
|
|
5215
5245
|
settings: "Settings",
|
|
@@ -5224,10 +5254,10 @@ var fs = /*#__PURE__*/ X(Y.component("DitoAccount", {
|
|
|
5224
5254
|
case "settings": console.info("TODO: Implement Settings");
|
|
5225
5255
|
}
|
|
5226
5256
|
} }
|
|
5227
|
-
}), [["render",
|
|
5257
|
+
}), [["render", ps]]);
|
|
5228
5258
|
//#endregion
|
|
5229
5259
|
//#region src/components/DitoSpinner.vue?vue&type=template&lang.js
|
|
5230
|
-
function
|
|
5260
|
+
function hs(e, t, n, r, i, a) {
|
|
5231
5261
|
return k((x(), l("div", {
|
|
5232
5262
|
class: "dito-spinner",
|
|
5233
5263
|
role: "status",
|
|
@@ -5243,7 +5273,7 @@ function ps(e, t, n, r, i, a) {
|
|
|
5243
5273
|
u("div", { class: "dito-spinner__pulse dito-spinner__pulse3" }, null, -1)
|
|
5244
5274
|
]], 4)), [[D, e.loading]]);
|
|
5245
5275
|
}
|
|
5246
|
-
var
|
|
5276
|
+
var gs = /*#__PURE__*/ X(Y.component("DitoSpinner", { props: {
|
|
5247
5277
|
loading: {
|
|
5248
5278
|
type: Boolean,
|
|
5249
5279
|
default: !0
|
|
@@ -5260,10 +5290,10 @@ var ms = /*#__PURE__*/ X(Y.component("DitoSpinner", { props: {
|
|
|
5260
5290
|
type: String,
|
|
5261
5291
|
default: null
|
|
5262
5292
|
}
|
|
5263
|
-
} }), [["render",
|
|
5293
|
+
} }), [["render", hs]]);
|
|
5264
5294
|
//#endregion
|
|
5265
5295
|
//#region src/components/DitoAffix.vue?vue&type=template&lang.js
|
|
5266
|
-
function
|
|
5296
|
+
function _s(e, t, n, r, i, a) {
|
|
5267
5297
|
let o = w("DitoSpinner"), l = w("DitoIcon");
|
|
5268
5298
|
return e.item.type === "text" ? (x(), s(T(e.item.as || "div"), { key: 0 }, {
|
|
5269
5299
|
default: O(() => [d(E(e.item.text), 1)]),
|
|
@@ -5281,9 +5311,9 @@ function hs(e, t, n, r, i, a) {
|
|
|
5281
5311
|
disabled: e.item.disabled
|
|
5282
5312
|
}, null, 8, ["name", "disabled"])) : e.item.type === "component" ? (x(), s(T(e.item.component), ne(v({ key: 4 }, e.item.props)), null, 16)) : c("", !0);
|
|
5283
5313
|
}
|
|
5284
|
-
var
|
|
5314
|
+
var vs = /*#__PURE__*/ X(Y.component("DitoAffix", {
|
|
5285
5315
|
components: {
|
|
5286
|
-
DitoSpinner:
|
|
5316
|
+
DitoSpinner: gs,
|
|
5287
5317
|
DitoIcon: ka
|
|
5288
5318
|
},
|
|
5289
5319
|
props: {
|
|
@@ -5299,8 +5329,8 @@ var gs = /*#__PURE__*/ X(Y.component("DitoAffix", {
|
|
|
5299
5329
|
computed: { context() {
|
|
5300
5330
|
return this.parentContext;
|
|
5301
5331
|
} }
|
|
5302
|
-
}), [["render",
|
|
5303
|
-
function
|
|
5332
|
+
}), [["render", _s]]), ys = ["disabled"], bs = ["data-info"];
|
|
5333
|
+
function xs(e, n, r, i, a, o) {
|
|
5304
5334
|
let u = w("DitoAffix");
|
|
5305
5335
|
return e.hasContent ? (x(), l("div", {
|
|
5306
5336
|
key: 0,
|
|
@@ -5327,17 +5357,17 @@ function ys(e, n, r, i, a, o) {
|
|
|
5327
5357
|
disabled: e.disabled,
|
|
5328
5358
|
onClick: n[0] ||= A((t) => e.$emit("clear"), ["stop"]),
|
|
5329
5359
|
onMousedown: n[1] ||= A(() => {}, ["stop"])
|
|
5330
|
-
}, null, 40,
|
|
5360
|
+
}, null, 40, ys)) : c("", !0),
|
|
5331
5361
|
C(e.$slots, "append"),
|
|
5332
5362
|
e.inlineInfo ? (x(), l("div", {
|
|
5333
5363
|
key: 1,
|
|
5334
5364
|
class: "dito-info",
|
|
5335
5365
|
"data-info": e.inlineInfo
|
|
5336
|
-
}, null, 8,
|
|
5366
|
+
}, null, 8, bs)) : c("", !0)
|
|
5337
5367
|
], 2)) : c("", !0);
|
|
5338
5368
|
}
|
|
5339
5369
|
var Z = /*#__PURE__*/ X(Y.component("DitoAffixes", {
|
|
5340
|
-
components: { DitoAffix:
|
|
5370
|
+
components: { DitoAffix: vs },
|
|
5341
5371
|
emits: ["clear"],
|
|
5342
5372
|
props: {
|
|
5343
5373
|
items: {
|
|
@@ -5394,7 +5424,7 @@ var Z = /*#__PURE__*/ X(Y.component("DitoAffixes", {
|
|
|
5394
5424
|
});
|
|
5395
5425
|
},
|
|
5396
5426
|
visibleItems() {
|
|
5397
|
-
return this.processedItems.filter((e) =>
|
|
5427
|
+
return this.processedItems.filter((e) => vr(e, this.context));
|
|
5398
5428
|
},
|
|
5399
5429
|
classes() {
|
|
5400
5430
|
let e = "dito-affixes";
|
|
@@ -5415,11 +5445,11 @@ var Z = /*#__PURE__*/ X(Y.component("DitoAffixes", {
|
|
|
5415
5445
|
[`${t}--ellipsis`]: this.mode === "ellipsis" && ["text", "html"].includes(e.type)
|
|
5416
5446
|
}, e.class];
|
|
5417
5447
|
} }
|
|
5418
|
-
}), [["render",
|
|
5448
|
+
}), [["render", xs]]), Ss = {
|
|
5419
5449
|
key: 1,
|
|
5420
5450
|
class: "dito-label__inner"
|
|
5421
|
-
},
|
|
5422
|
-
function
|
|
5451
|
+
}, Cs = ["for", "innerHTML"], ws = ["data-info"];
|
|
5452
|
+
function Ts(e, t, n, r, i, a) {
|
|
5423
5453
|
let o = w("DitoAffixes");
|
|
5424
5454
|
return e.text || e.collapsible ? (x(), s(T(e.collapsible ? "button" : "div"), v({
|
|
5425
5455
|
key: 0,
|
|
@@ -5429,7 +5459,7 @@ function Cs(e, t, n, r, i, a) {
|
|
|
5429
5459
|
default: O(() => [e.collapsible ? (x(), l("div", {
|
|
5430
5460
|
key: 0,
|
|
5431
5461
|
class: y(["dito-chevron", { "dito-chevron--open": !e.collapsed }])
|
|
5432
|
-
}, null, 2)) : c("", !0), e.text || e.prefixes.length > 0 || e.suffixes.length > 0 ? (x(), l("div",
|
|
5462
|
+
}, null, 2)) : c("", !0), e.text || e.prefixes.length > 0 || e.suffixes.length > 0 ? (x(), l("div", Ss, [
|
|
5433
5463
|
f(o, {
|
|
5434
5464
|
items: e.prefixes,
|
|
5435
5465
|
position: "prefix",
|
|
@@ -5439,7 +5469,7 @@ function Cs(e, t, n, r, i, a) {
|
|
|
5439
5469
|
key: 0,
|
|
5440
5470
|
for: e.htmlFor,
|
|
5441
5471
|
innerHTML: e.text
|
|
5442
|
-
}, null, 8,
|
|
5472
|
+
}, null, 8, Cs)) : c("", !0),
|
|
5443
5473
|
f(o, {
|
|
5444
5474
|
items: e.suffixes,
|
|
5445
5475
|
mode: "ellipsis",
|
|
@@ -5450,12 +5480,12 @@ function Cs(e, t, n, r, i, a) {
|
|
|
5450
5480
|
key: 1,
|
|
5451
5481
|
class: "dito-info",
|
|
5452
5482
|
"data-info": e.info
|
|
5453
|
-
}, null, 8,
|
|
5483
|
+
}, null, 8, ws)) : c("", !0)
|
|
5454
5484
|
])) : c("", !0)]),
|
|
5455
5485
|
_: 1
|
|
5456
5486
|
}, 16, ["type", "class"])) : c("", !0);
|
|
5457
5487
|
}
|
|
5458
|
-
var
|
|
5488
|
+
var Es = /*#__PURE__*/ X(Y.component("DitoLabel", {
|
|
5459
5489
|
components: { DitoAffixes: Z },
|
|
5460
5490
|
emits: ["open"],
|
|
5461
5491
|
props: {
|
|
@@ -5504,8 +5534,8 @@ var ws = /*#__PURE__*/ X(Y.component("DitoLabel", {
|
|
|
5504
5534
|
methods: { onClick() {
|
|
5505
5535
|
this.appState.activeLabel = this, this.$emit("open", this.collapsed);
|
|
5506
5536
|
} }
|
|
5507
|
-
}), [["render",
|
|
5508
|
-
getItemFormSchema:
|
|
5537
|
+
}), [["render", Ts]]), Ds = { methods: {
|
|
5538
|
+
getItemFormSchema: ur,
|
|
5509
5539
|
getItemUid: Lr,
|
|
5510
5540
|
getItemId(e, t, n = null) {
|
|
5511
5541
|
return this.isTransient && n !== null ? String(n) : Pr(e, t);
|
|
@@ -5527,9 +5557,9 @@ var ws = /*#__PURE__*/ X(Y.component("DitoLabel", {
|
|
|
5527
5557
|
getItemLabel(e, t, { index: n = null, extended: r = !1, asObject: i = !1 } = {}) {
|
|
5528
5558
|
let { itemLabel: a } = e;
|
|
5529
5559
|
if (!t || !r && a === !1) return null;
|
|
5530
|
-
let o, s = () => o ??= this.getItemDataPath(e, n), c, l = () => c ??= this.getLabel(
|
|
5560
|
+
let o, s = () => o ??= this.getItemDataPath(e, n), c, l = () => c ??= this.getLabel(ur(e, t, this.context)), u, d, f;
|
|
5531
5561
|
if (F(a)) {
|
|
5532
|
-
let e = a.call(this, new
|
|
5562
|
+
let e = a.call(this, new G(this, {
|
|
5533
5563
|
nested: !1,
|
|
5534
5564
|
data: t,
|
|
5535
5565
|
value: t,
|
|
@@ -5544,11 +5574,11 @@ var ws = /*#__PURE__*/ X(Y.component("DitoLabel", {
|
|
|
5544
5574
|
I(e) ? {text: u, prefix: d, suffix: f} = e : u = e, r = !1;
|
|
5545
5575
|
} else if (L(a) && !(a in t)) u = a;
|
|
5546
5576
|
else {
|
|
5547
|
-
let { columns: n } = e, r = t[L(a) && a ||
|
|
5577
|
+
let { columns: n } = e, r = t[L(a) && a || In(e) && n && Object.keys(n)[0] || "name"];
|
|
5548
5578
|
u = L(r) || He(r) ? r : null;
|
|
5549
5579
|
}
|
|
5550
5580
|
let p = !!u;
|
|
5551
|
-
if (u ??= (r = !0,
|
|
5581
|
+
if (u ??= (r = !0, In(e) && n !== null ? `${n + 1}` : ""), r) {
|
|
5552
5582
|
let e = l();
|
|
5553
5583
|
e && (u = `${e} ${p ? `'${u}'` : u}`);
|
|
5554
5584
|
}
|
|
@@ -5558,11 +5588,11 @@ var ws = /*#__PURE__*/ X(Y.component("DitoLabel", {
|
|
|
5558
5588
|
suffix: f
|
|
5559
5589
|
} : null : u;
|
|
5560
5590
|
}
|
|
5561
|
-
} },
|
|
5591
|
+
} }, Os = {
|
|
5562
5592
|
key: 0,
|
|
5563
5593
|
class: "dito-schema-header"
|
|
5564
5594
|
};
|
|
5565
|
-
function
|
|
5595
|
+
function ks(e, i, a, o, d, p) {
|
|
5566
5596
|
let m = w("DitoPanels"), h = w("DitoLabel"), g = w("DitoTabs"), _ = w("DitoClipboard"), ee = w("DitoPane"), te = w("TransitionHeight");
|
|
5567
5597
|
return x(), l(t, null, [
|
|
5568
5598
|
C(e.$slots, "prepend"),
|
|
@@ -5591,7 +5621,7 @@ function Ds(e, i, a, o, d, p) {
|
|
|
5591
5621
|
key: 1,
|
|
5592
5622
|
to: e.headerTeleport,
|
|
5593
5623
|
disabled: !e.headerTeleport
|
|
5594
|
-
}, [e.active ? (x(), l("div",
|
|
5624
|
+
}, [e.active ? (x(), l("div", Os, [
|
|
5595
5625
|
e.hasLabel ? (x(), s(h, {
|
|
5596
5626
|
key: 0,
|
|
5597
5627
|
label: e.label,
|
|
@@ -5701,8 +5731,8 @@ function Ds(e, i, a, o, d, p) {
|
|
|
5701
5731
|
}
|
|
5702
5732
|
//#endregion
|
|
5703
5733
|
//#region src/components/DitoSchema.vue
|
|
5704
|
-
var
|
|
5705
|
-
mixins: [K,
|
|
5734
|
+
var As = Y.component("DitoSchema", {
|
|
5735
|
+
mixins: [K, Ds],
|
|
5706
5736
|
components: { TransitionHeight: co },
|
|
5707
5737
|
inheritAttrs: !1,
|
|
5708
5738
|
provide() {
|
|
@@ -5818,10 +5848,10 @@ var Os = Y.component("DitoSchema", {
|
|
|
5818
5848
|
return this.hasOwnData ? null : this.parentComponent.schemaComponent;
|
|
5819
5849
|
},
|
|
5820
5850
|
panelEntries() {
|
|
5821
|
-
return
|
|
5851
|
+
return hr(this.schema.panels, this.dataPath, this.componentPath);
|
|
5822
5852
|
},
|
|
5823
5853
|
tabs() {
|
|
5824
|
-
return
|
|
5854
|
+
return fr(this.schema.tabs);
|
|
5825
5855
|
},
|
|
5826
5856
|
renderedTabs() {
|
|
5827
5857
|
return this.tabs && this.data ? Object.fromEntries(Object.entries(this.tabs).filter(([, e]) => this.shouldRenderSchema(e))) : this.tabs;
|
|
@@ -5897,7 +5927,7 @@ var Os = Y.component("DitoSchema", {
|
|
|
5897
5927
|
return !!this.tabs;
|
|
5898
5928
|
},
|
|
5899
5929
|
isTopLevelSchema() {
|
|
5900
|
-
return !
|
|
5930
|
+
return !Cn(this.schema) && !this.inlined;
|
|
5901
5931
|
},
|
|
5902
5932
|
hasTopLevelTabs() {
|
|
5903
5933
|
return this.hasTabs && this.isTopLevelSchema;
|
|
@@ -5939,7 +5969,7 @@ var Os = Y.component("DitoSchema", {
|
|
|
5939
5969
|
schema: {
|
|
5940
5970
|
immediate: !0,
|
|
5941
5971
|
handler(e) {
|
|
5942
|
-
|
|
5972
|
+
dr(e) || this.setupSchema();
|
|
5943
5973
|
}
|
|
5944
5974
|
},
|
|
5945
5975
|
routeTab: {
|
|
@@ -6076,7 +6106,7 @@ var Os = Y.component("DitoSchema", {
|
|
|
6076
6106
|
for (let t of e) t.isForm ? o = t : s.push(t);
|
|
6077
6107
|
return !0;
|
|
6078
6108
|
});
|
|
6079
|
-
if (
|
|
6109
|
+
if (js(s).forEach((e, r) => {
|
|
6080
6110
|
e.showValidationErrors(a, n && t && !o && r === 0);
|
|
6081
6111
|
}), o) {
|
|
6082
6112
|
let r = Object.fromEntries(Object.entries(e).filter(([e]) => e === o.dataPath || e.startsWith(`${o.dataPath}/`)));
|
|
@@ -6160,24 +6190,24 @@ var Os = Y.component("DitoSchema", {
|
|
|
6160
6190
|
return z(t).startsWith(this.dataPath) ? this._getEntriesByDataPath(e, t) : this._getEntriesByName(e, t);
|
|
6161
6191
|
},
|
|
6162
6192
|
_getEntriesByDataPath(e, t) {
|
|
6163
|
-
return
|
|
6193
|
+
return js(e[z(t)] || []);
|
|
6164
6194
|
},
|
|
6165
6195
|
_getEntriesByName(e, t) {
|
|
6166
|
-
return
|
|
6196
|
+
return js(e[V(this.dataPath, t)] || []);
|
|
6167
6197
|
}
|
|
6168
6198
|
}
|
|
6169
6199
|
});
|
|
6170
|
-
function
|
|
6171
|
-
return e.length > 1 ? [...e].sort(
|
|
6200
|
+
function js(e) {
|
|
6201
|
+
return e.length > 1 ? [...e].sort(Ms) : e;
|
|
6172
6202
|
}
|
|
6173
|
-
function
|
|
6203
|
+
function Ms(e, t) {
|
|
6174
6204
|
let n = e.$el, r = t.$el;
|
|
6175
6205
|
return !n || !r || n === r ? 0 : n.compareDocumentPosition(r) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
|
|
6176
6206
|
}
|
|
6177
|
-
var
|
|
6207
|
+
var Ns = /*#__PURE__*/ X(As, [["render", ks]]);
|
|
6178
6208
|
//#endregion
|
|
6179
6209
|
//#region src/components/DitoSchemaInlined.vue?vue&type=template&lang.js
|
|
6180
|
-
function
|
|
6210
|
+
function Ps(e, t, n, r, i, a) {
|
|
6181
6211
|
let o = w("DitoEditButtons"), l = w("DitoSchema");
|
|
6182
6212
|
return x(), s(l, {
|
|
6183
6213
|
class: "dito-schema-inlined",
|
|
@@ -6248,7 +6278,7 @@ function Ms(e, t, n, r, i, a) {
|
|
|
6248
6278
|
"accumulatedBasis"
|
|
6249
6279
|
]);
|
|
6250
6280
|
}
|
|
6251
|
-
var
|
|
6281
|
+
var Fs = /*#__PURE__*/ X(Y.component("DitoSchemaInlined", {
|
|
6252
6282
|
emits: ["delete"],
|
|
6253
6283
|
props: {
|
|
6254
6284
|
schema: {
|
|
@@ -6330,24 +6360,24 @@ var Ns = /*#__PURE__*/ X(Y.component("DitoSchemaInlined", {
|
|
|
6330
6360
|
},
|
|
6331
6361
|
computed: {
|
|
6332
6362
|
isCompact() {
|
|
6333
|
-
return
|
|
6363
|
+
return On(this.schema);
|
|
6334
6364
|
},
|
|
6335
6365
|
hasLabel() {
|
|
6336
6366
|
return !this.isCompact && !!this.label;
|
|
6337
6367
|
}
|
|
6338
6368
|
}
|
|
6339
|
-
}), [["render",
|
|
6369
|
+
}), [["render", Ps]]), Is = [
|
|
6340
6370
|
"id",
|
|
6341
6371
|
"role",
|
|
6342
6372
|
"aria-labelledby"
|
|
6343
|
-
],
|
|
6373
|
+
], Ls = {
|
|
6344
6374
|
key: 0,
|
|
6345
6375
|
class: "dito-pane__break"
|
|
6346
|
-
},
|
|
6376
|
+
}, Rs = {
|
|
6347
6377
|
key: 2,
|
|
6348
6378
|
class: "dito-pane__break"
|
|
6349
6379
|
};
|
|
6350
|
-
function
|
|
6380
|
+
function zs(e, n, r, i, a, o) {
|
|
6351
6381
|
let u = w("DitoContainer"), d = ie("resize");
|
|
6352
6382
|
return e.isPopulated && e.componentSchemas.length > 0 ? k((x(), l("div", {
|
|
6353
6383
|
key: 0,
|
|
@@ -6356,7 +6386,7 @@ function Ls(e, n, r, i, a, o) {
|
|
|
6356
6386
|
role: e.tab ? "tabpanel" : null,
|
|
6357
6387
|
"aria-labelledby": e.tabId
|
|
6358
6388
|
}, [(x(!0), l(t, null, S(e.componentSchemas, ({ schema: n, dataPath: r, nestedDataPath: i, nested: a, store: o }, d) => (x(), l(t, null, [
|
|
6359
|
-
["before", "both"].includes(n.break) ? (x(), l("span",
|
|
6389
|
+
["before", "both"].includes(n.break) ? (x(), l("span", Ls)) : c("", !0),
|
|
6360
6390
|
e.shouldRenderComponent(n, a, r) ? (x(), s(u, {
|
|
6361
6391
|
ref_for: !0,
|
|
6362
6392
|
ref: "containers",
|
|
@@ -6389,10 +6419,10 @@ function Ls(e, n, r, i, a, o) {
|
|
|
6389
6419
|
"verticalLabels",
|
|
6390
6420
|
"accumulatedBasis"
|
|
6391
6421
|
])) : c("", !0),
|
|
6392
|
-
["after", "both"].includes(n.break) ? (x(), l("span",
|
|
6393
|
-
], 64))), 256))], 10,
|
|
6422
|
+
["after", "both"].includes(n.break) ? (x(), l("span", Rs)) : c("", !0)
|
|
6423
|
+
], 64))), 256))], 10, Is)), [[d, e.onResizePane]]) : c("", !0);
|
|
6394
6424
|
}
|
|
6395
|
-
var
|
|
6425
|
+
var Bs = /*#__PURE__*/ X(Y.component("DitoPane", {
|
|
6396
6426
|
mixins: [K],
|
|
6397
6427
|
provide() {
|
|
6398
6428
|
return { $tabComponent: () => this.tabComponent };
|
|
@@ -6483,7 +6513,7 @@ var Rs = /*#__PURE__*/ X(Y.component("DitoPane", {
|
|
|
6483
6513
|
...n,
|
|
6484
6514
|
name: t
|
|
6485
6515
|
};
|
|
6486
|
-
let r =
|
|
6516
|
+
let r = An(n), i = V(this.dataPath, t), a = r && !e ? i : this.dataPath;
|
|
6487
6517
|
return {
|
|
6488
6518
|
schema: n,
|
|
6489
6519
|
dataPath: a,
|
|
@@ -6534,7 +6564,7 @@ var Rs = /*#__PURE__*/ X(Y.component("DitoPane", {
|
|
|
6534
6564
|
},
|
|
6535
6565
|
methods: {
|
|
6536
6566
|
shouldRenderComponent(e, t, n) {
|
|
6537
|
-
return
|
|
6567
|
+
return vr(e, G.createForSchema(this, {
|
|
6538
6568
|
schema: e,
|
|
6539
6569
|
name: e.name,
|
|
6540
6570
|
nested: t,
|
|
@@ -6565,10 +6595,10 @@ var Rs = /*#__PURE__*/ X(Y.component("DitoPane", {
|
|
|
6565
6595
|
return !!this.verticalLabelsByIndices[e];
|
|
6566
6596
|
}
|
|
6567
6597
|
}
|
|
6568
|
-
}), [["render",
|
|
6598
|
+
}), [["render", zs]]);
|
|
6569
6599
|
//#endregion
|
|
6570
6600
|
//#region src/utils/math.js
|
|
6571
|
-
function
|
|
6601
|
+
function Vs(e) {
|
|
6572
6602
|
let t = L(e) && e.match(/^\s*([+-]?\d+)\s*\/\s*([+-]?\d+)\s*$/);
|
|
6573
6603
|
if (t) {
|
|
6574
6604
|
let [, e, n] = t;
|
|
@@ -6578,7 +6608,7 @@ function zs(e) {
|
|
|
6578
6608
|
}
|
|
6579
6609
|
//#endregion
|
|
6580
6610
|
//#region src/components/DitoContainer.vue?vue&type=template&lang.js
|
|
6581
|
-
function
|
|
6611
|
+
function Hs(e, t, r, i, a, o) {
|
|
6582
6612
|
let u = w("DitoPanels"), d = w("DitoLabel"), p = w("DitoErrors");
|
|
6583
6613
|
return k((x(), l("div", {
|
|
6584
6614
|
class: y(["dito-container", e.containerClasses]),
|
|
@@ -6645,7 +6675,7 @@ function Bs(e, t, r, i, a, o) {
|
|
|
6645
6675
|
f(p, { errors: e.errors }, null, 8, ["errors"])
|
|
6646
6676
|
], 6)), [[D, e.componentVisible]]);
|
|
6647
6677
|
}
|
|
6648
|
-
var
|
|
6678
|
+
var Us = /*#__PURE__*/ X(Y.component("DitoContainer", {
|
|
6649
6679
|
mixins: [Rr, K],
|
|
6650
6680
|
props: {
|
|
6651
6681
|
schema: {
|
|
@@ -6705,7 +6735,7 @@ var Vs = /*#__PURE__*/ X(Y.component("DitoContainer", {
|
|
|
6705
6735
|
},
|
|
6706
6736
|
computed: {
|
|
6707
6737
|
context() {
|
|
6708
|
-
return new
|
|
6738
|
+
return new G(this.component ?? this, { nested: this.nested });
|
|
6709
6739
|
},
|
|
6710
6740
|
name() {
|
|
6711
6741
|
return this.schema.name;
|
|
@@ -6723,7 +6753,7 @@ var Vs = /*#__PURE__*/ X(Y.component("DitoContainer", {
|
|
|
6723
6753
|
return this.type === "label";
|
|
6724
6754
|
},
|
|
6725
6755
|
hasLabel() {
|
|
6726
|
-
return
|
|
6756
|
+
return jn(this.schema, this.generateLabels);
|
|
6727
6757
|
},
|
|
6728
6758
|
label() {
|
|
6729
6759
|
return this.hasLabel ? this.getLabel(this.schema) : null;
|
|
@@ -6775,7 +6805,7 @@ var Vs = /*#__PURE__*/ X(Y.component("DitoContainer", {
|
|
|
6775
6805
|
null,
|
|
6776
6806
|
"auto",
|
|
6777
6807
|
"fill"
|
|
6778
|
-
].includes(e) ? "auto" : /%$/.test(e) ? parseFloat(e) / 100 : /[a-z]/.test(e) ? e :
|
|
6808
|
+
].includes(e) ? "auto" : /%$/.test(e) ? parseFloat(e) / 100 : /[a-z]/.test(e) ? e : Vs(e);
|
|
6779
6809
|
},
|
|
6780
6810
|
combinedBasis() {
|
|
6781
6811
|
let { accumulatedBasis: e, flexBasis: t } = this;
|
|
@@ -6789,7 +6819,7 @@ var Vs = /*#__PURE__*/ X(Y.component("DitoContainer", {
|
|
|
6789
6819
|
[`${t}--single`]: this.single,
|
|
6790
6820
|
[`${t}--compact`]: this.compact,
|
|
6791
6821
|
[`${t}--label-vertical`]: this.verticalLabels,
|
|
6792
|
-
[`${t}--omit-spacing`]:
|
|
6822
|
+
[`${t}--omit-spacing`]: Mn(this.schema),
|
|
6793
6823
|
...L(e) ? { [e]: !0 } : e
|
|
6794
6824
|
};
|
|
6795
6825
|
},
|
|
@@ -6815,7 +6845,7 @@ var Vs = /*#__PURE__*/ X(Y.component("DitoContainer", {
|
|
|
6815
6845
|
};
|
|
6816
6846
|
},
|
|
6817
6847
|
panelEntries() {
|
|
6818
|
-
return
|
|
6848
|
+
return gr(this.api, this.schema, this.dataPath, this.nested ? this.componentPath : this.parentComponent.componentPath, this.componentPath, this.$refs.component, this.tabComponent);
|
|
6819
6849
|
}
|
|
6820
6850
|
},
|
|
6821
6851
|
methods: {
|
|
@@ -6830,18 +6860,18 @@ var Vs = /*#__PURE__*/ X(Y.component("DitoContainer", {
|
|
|
6830
6860
|
this.errors = e;
|
|
6831
6861
|
}
|
|
6832
6862
|
}
|
|
6833
|
-
}), [["render",
|
|
6863
|
+
}), [["render", Hs]]), Ws = {
|
|
6834
6864
|
class: "dito-tabs",
|
|
6835
6865
|
role: "tablist"
|
|
6836
|
-
},
|
|
6866
|
+
}, Gs = [
|
|
6837
6867
|
"id",
|
|
6838
6868
|
"aria-selected",
|
|
6839
6869
|
"aria-controls",
|
|
6840
6870
|
"tabindex",
|
|
6841
6871
|
"onClick"
|
|
6842
6872
|
];
|
|
6843
|
-
function
|
|
6844
|
-
return x(), l("div",
|
|
6873
|
+
function Ks(e, n, r, i, a, o) {
|
|
6874
|
+
return x(), l("div", Ws, [(x(!0), l(t, null, S(e.tabs, (t, n) => (x(), l("a", {
|
|
6845
6875
|
class: y(["dito-tabs__link", { "dito-tabs__link--active": e.modelValue === n }]),
|
|
6846
6876
|
id: e.getTabId(n),
|
|
6847
6877
|
key: n,
|
|
@@ -6850,9 +6880,9 @@ function Ws(e, n, r, i, a, o) {
|
|
|
6850
6880
|
"aria-controls": e.getTabPanelId(n),
|
|
6851
6881
|
tabindex: e.modelValue === n ? 0 : -1,
|
|
6852
6882
|
onClick: (t) => e.$emit("update:modelValue", n)
|
|
6853
|
-
}, E(e.getLabel(t, n)), 11,
|
|
6883
|
+
}, E(e.getLabel(t, n)), 11, Gs))), 128))]);
|
|
6854
6884
|
}
|
|
6855
|
-
var
|
|
6885
|
+
var qs = /*#__PURE__*/ X(Y.component("DitoTabs", {
|
|
6856
6886
|
emits: ["update:modelValue"],
|
|
6857
6887
|
props: {
|
|
6858
6888
|
tabs: {
|
|
@@ -6872,10 +6902,10 @@ var Gs = /*#__PURE__*/ X(Y.component("DitoTabs", {
|
|
|
6872
6902
|
return `${this.schemaComponent.componentPath}-tabpanel-${e}`;
|
|
6873
6903
|
}
|
|
6874
6904
|
}
|
|
6875
|
-
}), [["render",
|
|
6905
|
+
}), [["render", Ks]]);
|
|
6876
6906
|
//#endregion
|
|
6877
6907
|
//#region src/components/DitoPanel.vue?vue&type=template&lang.js
|
|
6878
|
-
function
|
|
6908
|
+
function Js(e, t, n, r, i, a) {
|
|
6879
6909
|
let o = w("DitoButtons"), l = w("DitoSchema");
|
|
6880
6910
|
return e.shouldRenderSchema(e.panelSchema) ? k((x(), s(T(e.panelTag), {
|
|
6881
6911
|
key: 0,
|
|
@@ -6943,7 +6973,7 @@ function Ks(e, t, n, r, i, a) {
|
|
|
6943
6973
|
_: 1
|
|
6944
6974
|
}, 40, ["aria-label"])), [[D, e.visible && (!e.panelTabComponent || e.panelTabComponent.visible)]]) : c("", !0);
|
|
6945
6975
|
}
|
|
6946
|
-
var
|
|
6976
|
+
var Ys = /*#__PURE__*/ X(Y.component("DitoPanel", {
|
|
6947
6977
|
mixins: [K, _o],
|
|
6948
6978
|
provide() {
|
|
6949
6979
|
return {
|
|
@@ -6993,7 +7023,7 @@ var qs = /*#__PURE__*/ X(Y.component("DitoPanel", {
|
|
|
6993
7023
|
return !0;
|
|
6994
7024
|
},
|
|
6995
7025
|
context() {
|
|
6996
|
-
return new
|
|
7026
|
+
return new G(this, {
|
|
6997
7027
|
nested: !1,
|
|
6998
7028
|
data: this.panelData,
|
|
6999
7029
|
dataPath: this.panelDataPath
|
|
@@ -7009,10 +7039,10 @@ var qs = /*#__PURE__*/ X(Y.component("DitoPanel", {
|
|
|
7009
7039
|
return this.panelTabComponent;
|
|
7010
7040
|
},
|
|
7011
7041
|
buttonSchemas() {
|
|
7012
|
-
return
|
|
7042
|
+
return pr(this.schema.buttons);
|
|
7013
7043
|
},
|
|
7014
7044
|
panelButtonSchemas() {
|
|
7015
|
-
return
|
|
7045
|
+
return pr(this.schema.panelButtons);
|
|
7016
7046
|
},
|
|
7017
7047
|
hasOwnData() {
|
|
7018
7048
|
return !!this.ownData;
|
|
@@ -7059,13 +7089,13 @@ var qs = /*#__PURE__*/ X(Y.component("DitoPanel", {
|
|
|
7059
7089
|
methods: { _register(e, t = this.componentPath) {
|
|
7060
7090
|
this.schemaComponent._registerPanel(this, e, t);
|
|
7061
7091
|
} }
|
|
7062
|
-
}), [["render",
|
|
7092
|
+
}), [["render", Js]]), Xs = {
|
|
7063
7093
|
key: 0,
|
|
7064
7094
|
class: "dito-panels"
|
|
7065
7095
|
};
|
|
7066
|
-
function
|
|
7096
|
+
function Zs(e, n, r, i, a, o) {
|
|
7067
7097
|
let u = w("DitoPanel");
|
|
7068
|
-
return e.panels.length > 0 ? (x(), l("div",
|
|
7098
|
+
return e.panels.length > 0 ? (x(), l("div", Xs, [(x(!0), l(t, null, S(e.panels, ({ schema: n, dataPath: r, componentPath: i, tabComponent: a }) => (x(), l(t, null, [e.shouldRenderSchema(n) ? (x(), s(u, {
|
|
7069
7099
|
key: e.getPanelKey(r, a),
|
|
7070
7100
|
schema: n,
|
|
7071
7101
|
dataPath: r,
|
|
@@ -7086,7 +7116,7 @@ function Ys(e, n, r, i, a, o) {
|
|
|
7086
7116
|
"panelTabComponent"
|
|
7087
7117
|
])) : c("", !0)], 64))), 256))])) : c("", !0);
|
|
7088
7118
|
}
|
|
7089
|
-
var
|
|
7119
|
+
var Qs = /*#__PURE__*/ X(Y.component("DitoPanels", {
|
|
7090
7120
|
mixins: [K],
|
|
7091
7121
|
props: {
|
|
7092
7122
|
panels: {
|
|
@@ -7116,16 +7146,16 @@ var Xs = /*#__PURE__*/ X(Y.component("DitoPanels", {
|
|
|
7116
7146
|
methods: { getPanelKey(e, t) {
|
|
7117
7147
|
return t ? `${t.tab}_${e}` : e;
|
|
7118
7148
|
} }
|
|
7119
|
-
}), [["render",
|
|
7149
|
+
}), [["render", Zs]]), $s = {
|
|
7120
7150
|
key: 0,
|
|
7121
7151
|
class: "dito-buttons"
|
|
7122
|
-
},
|
|
7152
|
+
}, ec = {
|
|
7123
7153
|
key: 0,
|
|
7124
7154
|
class: "dito-container"
|
|
7125
7155
|
};
|
|
7126
|
-
function
|
|
7156
|
+
function tc(e, n, r, i, a, o) {
|
|
7127
7157
|
let u = w("DitoContainer"), d = w("DitoVnode");
|
|
7128
|
-
return e.buttonSchemas || e.hasSlotContent(e.$slots.default) ? (x(), l("div",
|
|
7158
|
+
return e.buttonSchemas || e.hasSlotContent(e.$slots.default) ? (x(), l("div", $s, [(x(!0), l(t, null, S(e.buttonSchemas, (n, r) => (x(), l(t, null, [e.shouldRenderSchema(n) ? (x(), s(u, {
|
|
7129
7159
|
key: r,
|
|
7130
7160
|
schema: n,
|
|
7131
7161
|
dataPath: r,
|
|
@@ -7142,9 +7172,9 @@ function $s(e, n, r, i, a, o) {
|
|
|
7142
7172
|
"nested",
|
|
7143
7173
|
"store",
|
|
7144
7174
|
"disabled"
|
|
7145
|
-
])) : c("", !0)], 64))), 256)), (x(!0), l(t, null, S(e.$slots.default?.(), (n) => (x(), l(t, null, [e.hasVNodeContent(n) ? (x(), l("div",
|
|
7175
|
+
])) : c("", !0)], 64))), 256)), (x(!0), l(t, null, S(e.$slots.default?.(), (n) => (x(), l(t, null, [e.hasVNodeContent(n) ? (x(), l("div", ec, [f(d, { vnode: n }, null, 8, ["vnode"])])) : c("", !0)], 64))), 256))])) : c("", !0);
|
|
7146
7176
|
}
|
|
7147
|
-
var
|
|
7177
|
+
var nc = /*#__PURE__*/ X(Y.component("DitoButtons", {
|
|
7148
7178
|
mixins: [K],
|
|
7149
7179
|
provide: { $tabComponent: () => null },
|
|
7150
7180
|
props: {
|
|
@@ -7194,8 +7224,8 @@ var ec = /*#__PURE__*/ X(Y.component("DitoButtons", {
|
|
|
7194
7224
|
hasSlotContent: Fi,
|
|
7195
7225
|
hasVNodeContent: Pi
|
|
7196
7226
|
}
|
|
7197
|
-
}), [["render",
|
|
7198
|
-
function
|
|
7227
|
+
}), [["render", tc]]), rc = ["disabled"];
|
|
7228
|
+
function ic(e, t, n, r, i, a) {
|
|
7199
7229
|
let o = w("RouterLink"), u = w("DitoCreateButton"), d = w("DitoButtons");
|
|
7200
7230
|
return x(), s(d, {
|
|
7201
7231
|
class: "dito-edit-buttons dito-buttons--round",
|
|
@@ -7248,7 +7278,7 @@ function nc(e, t, n, r, i, a) {
|
|
|
7248
7278
|
class: "dito-button",
|
|
7249
7279
|
type: "button",
|
|
7250
7280
|
disabled: e.isDeletableDisabled
|
|
7251
|
-
}, e.getButtonAttributes(e.verbs.delete), { onClick: t[0] ||= (t) => e.$emit("delete") }), null, 16,
|
|
7281
|
+
}, e.getButtonAttributes(e.verbs.delete), { onClick: t[0] ||= (t) => e.$emit("delete") }), null, 16, rc)) : c("", !0)
|
|
7252
7282
|
]),
|
|
7253
7283
|
_: 1
|
|
7254
7284
|
}, 8, [
|
|
@@ -7260,7 +7290,7 @@ function nc(e, t, n, r, i, a) {
|
|
|
7260
7290
|
"nested"
|
|
7261
7291
|
]);
|
|
7262
7292
|
}
|
|
7263
|
-
var
|
|
7293
|
+
var ac = /*#__PURE__*/ X(Y.component("DitoEditButtons", {
|
|
7264
7294
|
mixins: [K],
|
|
7265
7295
|
emits: ["delete"],
|
|
7266
7296
|
props: {
|
|
@@ -7351,21 +7381,21 @@ var rc = /*#__PURE__*/ X(Y.component("DitoEditButtons", {
|
|
|
7351
7381
|
default: !0
|
|
7352
7382
|
});
|
|
7353
7383
|
} }
|
|
7354
|
-
}), [["render",
|
|
7355
|
-
function
|
|
7356
|
-
return x(), l("div",
|
|
7384
|
+
}), [["render", ic]]), oc = { class: "dito-create-button" }, sc = ["type", "disabled"], cc = ["disabled"], lc = ["onMousedown", "onMouseup"];
|
|
7385
|
+
function uc(e, n, r, i, a, o) {
|
|
7386
|
+
return x(), l("div", oc, [e.creatableForm ? (x(), l("button", v({
|
|
7357
7387
|
key: 0,
|
|
7358
7388
|
class: "dito-button",
|
|
7359
7389
|
type: e.isInlined ? "button" : "submit",
|
|
7360
7390
|
disabled: e.disabled
|
|
7361
|
-
}, e.getButtonAttributes(e.verb, e.formLabel), { onClick: n[0] ||= (t) => e.createItem(e.creatableForm) }), E(e.text), 17,
|
|
7391
|
+
}, e.getButtonAttributes(e.verb, e.formLabel, e.text), { onClick: n[0] ||= (t) => e.createItem(e.creatableForm) }), E(e.text), 17, sc)) : e.creatableForms ? (x(), l(t, { key: 1 }, [u("button", v({
|
|
7362
7392
|
class: "dito-button",
|
|
7363
7393
|
type: "button",
|
|
7364
7394
|
disabled: e.disabled
|
|
7365
7395
|
}, {
|
|
7366
7396
|
...e.pulldownTriggerAttributes,
|
|
7367
|
-
...e.getButtonAttributes(e.verb)
|
|
7368
|
-
}, { onMousedown: n[1] ||= A((t) => e.onPulldownMouseDown(), ["stop"]) }), E(e.text), 17,
|
|
7397
|
+
...e.getButtonAttributes(e.verb, null, e.text)
|
|
7398
|
+
}, { onMousedown: n[1] ||= A((t) => e.onPulldownMouseDown(), ["stop"]) }), E(e.text), 17, cc), u("ul", {
|
|
7369
7399
|
class: y(["dito-pulldown", { "dito-pulldown--open": e.pulldown.open }]),
|
|
7370
7400
|
role: "menu"
|
|
7371
7401
|
}, [(x(!0), l(t, null, S(e.creatableForms, (t, n) => k((x(), l("li", null, [u("a", {
|
|
@@ -7373,10 +7403,10 @@ function cc(e, n, r, i, a, o) {
|
|
|
7373
7403
|
role: "menuitem",
|
|
7374
7404
|
onMousedown: A((t) => e.onPulldownMouseDown(n), ["stop"]),
|
|
7375
7405
|
onMouseup: (t) => e.onPulldownMouseUp(n)
|
|
7376
|
-
}, E(e.getLabel(t)), 43,
|
|
7406
|
+
}, E(e.getLabel(t)), 43, lc)], 512)), [[D, e.shouldShowSchema(t)]])), 256))], 2)], 64)) : c("", !0)]);
|
|
7377
7407
|
}
|
|
7378
|
-
var
|
|
7379
|
-
mixins: [K,
|
|
7408
|
+
var dc = /*#__PURE__*/ X(Y.component("DitoCreateButton", {
|
|
7409
|
+
mixins: [K, us],
|
|
7380
7410
|
props: {
|
|
7381
7411
|
schema: {
|
|
7382
7412
|
type: Object,
|
|
@@ -7425,7 +7455,7 @@ var lc = /*#__PURE__*/ X(Y.component("DitoCreateButton", {
|
|
|
7425
7455
|
},
|
|
7426
7456
|
computed: {
|
|
7427
7457
|
forms() {
|
|
7428
|
-
return
|
|
7458
|
+
return or(this.insertIndex == null ? this.schema : this.sourceSchema || this.schema, this.context);
|
|
7429
7459
|
},
|
|
7430
7460
|
creatableForms() {
|
|
7431
7461
|
let e = Object.entries(this.forms).filter(([, e]) => this.isFormCreatable(e));
|
|
@@ -7443,7 +7473,7 @@ var lc = /*#__PURE__*/ X(Y.component("DitoCreateButton", {
|
|
|
7443
7473
|
}) : null;
|
|
7444
7474
|
},
|
|
7445
7475
|
isInlined() {
|
|
7446
|
-
return
|
|
7476
|
+
return kn(this.schema);
|
|
7447
7477
|
}
|
|
7448
7478
|
},
|
|
7449
7479
|
methods: {
|
|
@@ -7472,27 +7502,27 @@ var lc = /*#__PURE__*/ X(Y.component("DitoCreateButton", {
|
|
|
7472
7502
|
this.createItem(this.forms[e], e), this.setPulldownOpen(!1);
|
|
7473
7503
|
}
|
|
7474
7504
|
}
|
|
7475
|
-
}), [["render",
|
|
7505
|
+
}), [["render", uc]]), fc = {
|
|
7476
7506
|
key: 0,
|
|
7477
7507
|
class: "dito-clipboard dito-buttons dito-buttons--round"
|
|
7478
|
-
},
|
|
7479
|
-
function
|
|
7480
|
-
return e.clipboard ? (x(), l("div",
|
|
7508
|
+
}, pc = ["disabled"], mc = ["disabled"];
|
|
7509
|
+
function hc(e, t, n, r, i, a) {
|
|
7510
|
+
return e.clipboard ? (x(), l("div", fc, [u("button", {
|
|
7481
7511
|
class: "dito-button dito-button--copy",
|
|
7482
7512
|
ref: "copyData",
|
|
7483
7513
|
type: "button",
|
|
7484
7514
|
title: "Copy Data",
|
|
7485
7515
|
disabled: !e.copyEnabled,
|
|
7486
7516
|
onClick: t[0] ||= (...t) => e.onCopy && e.onCopy(...t)
|
|
7487
|
-
}, null, 8,
|
|
7517
|
+
}, null, 8, pc), u("button", {
|
|
7488
7518
|
class: "dito-button dito-button--paste",
|
|
7489
7519
|
type: "button",
|
|
7490
7520
|
title: "Paste Data",
|
|
7491
7521
|
disabled: !e.pasteEnabled,
|
|
7492
7522
|
onClick: t[1] ||= (...t) => e.onPaste && e.onPaste(...t)
|
|
7493
|
-
}, null, 8,
|
|
7523
|
+
}, null, 8, mc)])) : c("", !0);
|
|
7494
7524
|
}
|
|
7495
|
-
var
|
|
7525
|
+
var gc = /*#__PURE__*/ X(Y.component("DitoClipboard", {
|
|
7496
7526
|
mixins: [mo],
|
|
7497
7527
|
props: {
|
|
7498
7528
|
clipboard: {
|
|
@@ -7516,11 +7546,11 @@ var mc = /*#__PURE__*/ X(Y.component("DitoClipboard", {
|
|
|
7516
7546
|
},
|
|
7517
7547
|
copyData() {
|
|
7518
7548
|
let { copy: e } = this.clipboardOptions;
|
|
7519
|
-
return e ? (t) => e.call(this, new
|
|
7549
|
+
return e ? (t) => e.call(this, new G(this, { clipboardData: t })) : (e) => M(e);
|
|
7520
7550
|
},
|
|
7521
7551
|
pasteData() {
|
|
7522
7552
|
let { paste: e } = this.clipboardOptions;
|
|
7523
|
-
return e ? (t) => e.call(this, new
|
|
7553
|
+
return e ? (t) => e.call(this, new G(this, { clipboardData: t })) : (e) => e;
|
|
7524
7554
|
}
|
|
7525
7555
|
},
|
|
7526
7556
|
watch: {
|
|
@@ -7589,18 +7619,18 @@ var mc = /*#__PURE__*/ X(Y.component("DitoClipboard", {
|
|
|
7589
7619
|
}
|
|
7590
7620
|
}
|
|
7591
7621
|
}
|
|
7592
|
-
}), [["render",
|
|
7622
|
+
}), [["render", hc]]);
|
|
7593
7623
|
//#endregion
|
|
7594
7624
|
//#region src/components/DitoRouterView.vue
|
|
7595
|
-
function
|
|
7625
|
+
function _c({ routeLevel: e }) {
|
|
7596
7626
|
return g(ge, null, { default: ({ Component: t, route: n }) => t ? g(t, { key: n.matched[e]?.path }) : null });
|
|
7597
7627
|
}
|
|
7598
|
-
|
|
7628
|
+
_c.props = { routeLevel: {
|
|
7599
7629
|
type: Number,
|
|
7600
7630
|
required: !0
|
|
7601
7631
|
} };
|
|
7602
|
-
var
|
|
7603
|
-
mixins: [
|
|
7632
|
+
var vc = Y.component("DitoRouterView", _c), yc = {
|
|
7633
|
+
mixins: [Ds, {
|
|
7604
7634
|
data() {
|
|
7605
7635
|
return { isLoading: !1 };
|
|
7606
7636
|
},
|
|
@@ -7828,7 +7858,7 @@ var gc = Y.component("DitoRouterView", hc), _c = {
|
|
|
7828
7858
|
});
|
|
7829
7859
|
},
|
|
7830
7860
|
async emitButtonEvent(e, t, { notify: n, error: r }) {
|
|
7831
|
-
let i = new
|
|
7861
|
+
let i = new G(e, {
|
|
7832
7862
|
nested: !1,
|
|
7833
7863
|
data: this.data,
|
|
7834
7864
|
itemLabel: this.itemLabel,
|
|
@@ -7840,16 +7870,16 @@ var gc = Y.component("DitoRouterView", hc), _c = {
|
|
|
7840
7870
|
};
|
|
7841
7871
|
//#endregion
|
|
7842
7872
|
//#region src/utils/path.js
|
|
7843
|
-
function
|
|
7873
|
+
function bc(e) {
|
|
7844
7874
|
return new URL(`file:${e}`).pathname;
|
|
7845
7875
|
}
|
|
7846
7876
|
//#endregion
|
|
7847
7877
|
//#region src/components/DitoForm.vue?vue&type=template&lang.js
|
|
7848
|
-
var
|
|
7878
|
+
var xc = ["data-resource"], Sc = {
|
|
7849
7879
|
type: "submit",
|
|
7850
7880
|
disabled: ""
|
|
7851
7881
|
};
|
|
7852
|
-
function
|
|
7882
|
+
function Cc(e, t, n, r, i, a) {
|
|
7853
7883
|
let o = w("DitoRouterView"), d = w("DitoButtons"), p = w("DitoSchema"), m = w("DitoFormInner");
|
|
7854
7884
|
return x(), l("div", {
|
|
7855
7885
|
class: y(["dito-form dito-scroll-parent", { "dito-form-nested": e.isNestedRoute }]),
|
|
@@ -7861,7 +7891,7 @@ function xc(e, t, n, r, i, a) {
|
|
|
7861
7891
|
nested: e.isNestedRoute,
|
|
7862
7892
|
label: e.itemLabel
|
|
7863
7893
|
}, {
|
|
7864
|
-
default: O(() => [k(u("button",
|
|
7894
|
+
default: O(() => [k(u("button", Sc, null, 512), [[D, !1]]), f(p, {
|
|
7865
7895
|
schema: e.schema,
|
|
7866
7896
|
dataPath: e.dataPath,
|
|
7867
7897
|
data: e.data,
|
|
@@ -7903,10 +7933,10 @@ function xc(e, t, n, r, i, a) {
|
|
|
7903
7933
|
"scrollable"
|
|
7904
7934
|
])]),
|
|
7905
7935
|
_: 1
|
|
7906
|
-
}, 8, ["nested", "label"]), [[D, e.isActiveRoute]])], 10,
|
|
7936
|
+
}, 8, ["nested", "label"]), [[D, e.isActiveRoute]])], 10, xc);
|
|
7907
7937
|
}
|
|
7908
|
-
var
|
|
7909
|
-
mixins: [vo,
|
|
7938
|
+
var wc = /*#__PURE__*/ X(Y.component("DitoForm", {
|
|
7939
|
+
mixins: [vo, yc],
|
|
7910
7940
|
data() {
|
|
7911
7941
|
return {
|
|
7912
7942
|
createdData: null,
|
|
@@ -7931,7 +7961,7 @@ var Sc = /*#__PURE__*/ X(Y.component("DitoForm", {
|
|
|
7931
7961
|
return this.getItemFormSchema(this.sourceSchema, this.data || (this.creationType ? { type: this.creationType } : null), this.context);
|
|
7932
7962
|
},
|
|
7933
7963
|
buttonSchemas() {
|
|
7934
|
-
return
|
|
7964
|
+
return pr(be({
|
|
7935
7965
|
cancel: {
|
|
7936
7966
|
type: "button",
|
|
7937
7967
|
events: { click: () => this.cancel() }
|
|
@@ -7991,7 +8021,7 @@ var Sc = /*#__PURE__*/ X(Y.component("DitoForm", {
|
|
|
7991
8021
|
let e = this.isLeavingRoute ? null : this.parentRouteComponent.data;
|
|
7992
8022
|
if (!e) return null;
|
|
7993
8023
|
let t = B(this.getDataPathFrom(this.parentRouteComponent)), n = this.routeRecord.path.split("/"), r = n.slice(n.length - t.length), i = t[t.length - 1];
|
|
7994
|
-
|
|
8024
|
+
Fn(this.sourceSchema) && i === "create" && t.length--;
|
|
7995
8025
|
let a = null;
|
|
7996
8026
|
for (let n = 0, i = t.length; n < i && e; n++) {
|
|
7997
8027
|
let o = t[n];
|
|
@@ -8032,7 +8062,7 @@ var Sc = /*#__PURE__*/ X(Y.component("DitoForm", {
|
|
|
8032
8062
|
sourceItem: {
|
|
8033
8063
|
immediate: !0,
|
|
8034
8064
|
handler(e) {
|
|
8035
|
-
this.isTransient && (this.isMutating || (this.clonedData = M(e)), e === null && !this.isCreating &&
|
|
8065
|
+
this.isTransient && (this.isMutating || (this.clonedData = M(e)), e === null && !this.isCreating && Fn(this.sourceSchema) && this.$router.push({ path: `${this.path}/create` }));
|
|
8036
8066
|
}
|
|
8037
8067
|
},
|
|
8038
8068
|
isCreating(e) {
|
|
@@ -8058,7 +8088,7 @@ var Sc = /*#__PURE__*/ X(Y.component("DitoForm", {
|
|
|
8058
8088
|
return this.api.denormalizePath(this.path.slice((e.isView ? 0 : e.path.length) + 1));
|
|
8059
8089
|
},
|
|
8060
8090
|
getResource(e) {
|
|
8061
|
-
let t =
|
|
8091
|
+
let t = yc.methods.getResource.call(this, e);
|
|
8062
8092
|
return Ei(this.itemId, t) || t;
|
|
8063
8093
|
},
|
|
8064
8094
|
setupData() {
|
|
@@ -8072,7 +8102,7 @@ var Sc = /*#__PURE__*/ X(Y.component("DitoForm", {
|
|
|
8072
8102
|
return !1;
|
|
8073
8103
|
},
|
|
8074
8104
|
addSourceData(e) {
|
|
8075
|
-
return
|
|
8105
|
+
return Fn(this.sourceSchema) ? this.setSourceData(e) : !!this.sourceData?.push(e);
|
|
8076
8106
|
},
|
|
8077
8107
|
clearData() {
|
|
8078
8108
|
this.setData(null);
|
|
@@ -8143,7 +8173,7 @@ var Sc = /*#__PURE__*/ X(Y.component("DitoForm", {
|
|
|
8143
8173
|
else if (this.isCreating) {
|
|
8144
8174
|
let e = this.getItemId(this.schema, this.data);
|
|
8145
8175
|
this.$router.replace({
|
|
8146
|
-
path:
|
|
8176
|
+
path: bc(`${this.path}/../${e}`),
|
|
8147
8177
|
hash: this.$route.hash
|
|
8148
8178
|
});
|
|
8149
8179
|
}
|
|
@@ -8163,16 +8193,16 @@ var Sc = /*#__PURE__*/ X(Y.component("DitoForm", {
|
|
|
8163
8193
|
return c;
|
|
8164
8194
|
}
|
|
8165
8195
|
}
|
|
8166
|
-
}), [["render",
|
|
8167
|
-
function
|
|
8168
|
-
return e.nested ? (x(), l("div",
|
|
8196
|
+
}), [["render", Cc]]), Tc = { key: 0 }, Ec = ["aria-label"];
|
|
8197
|
+
function Dc(e, t, n, r, i, a) {
|
|
8198
|
+
return e.nested ? (x(), l("div", Tc, [C(e.$slots, "default")])) : (x(), l("form", {
|
|
8169
8199
|
key: 1,
|
|
8170
8200
|
class: "dito-scroll-parent",
|
|
8171
8201
|
"aria-label": e.label,
|
|
8172
8202
|
onSubmit: t[0] ||= A(() => {}, ["prevent"])
|
|
8173
|
-
}, [C(e.$slots, "default")], 40,
|
|
8203
|
+
}, [C(e.$slots, "default")], 40, Ec));
|
|
8174
8204
|
}
|
|
8175
|
-
var
|
|
8205
|
+
var Oc = /*#__PURE__*/ X(Y.component("DitoFormInner", { props: {
|
|
8176
8206
|
nested: {
|
|
8177
8207
|
type: Boolean,
|
|
8178
8208
|
default: !1
|
|
@@ -8181,15 +8211,15 @@ var Ec = /*#__PURE__*/ X(Y.component("DitoFormInner", { props: {
|
|
|
8181
8211
|
type: String,
|
|
8182
8212
|
default: null
|
|
8183
8213
|
}
|
|
8184
|
-
} }), [["render",
|
|
8214
|
+
} }), [["render", Dc]]), kc = Y.component("DitoFormNested", { extends: wc }), Ac = {
|
|
8185
8215
|
key: 0,
|
|
8186
8216
|
class: "dito-errors",
|
|
8187
8217
|
role: "alert"
|
|
8188
8218
|
};
|
|
8189
|
-
function
|
|
8190
|
-
return e.errors ? (x(), l("div",
|
|
8219
|
+
function jc(e, n, r, i, a, o) {
|
|
8220
|
+
return e.errors ? (x(), l("div", Ac, [u("ul", null, [(x(!0), l(t, null, S(e.errors, (e) => (x(), l("li", null, E(e), 1))), 256))])])) : c("", !0);
|
|
8191
8221
|
}
|
|
8192
|
-
var
|
|
8222
|
+
var Mc = /*#__PURE__*/ X(Y.component("DitoErrors", {
|
|
8193
8223
|
props: { errors: {
|
|
8194
8224
|
type: Array,
|
|
8195
8225
|
default: null
|
|
@@ -8222,14 +8252,14 @@ var Ac = /*#__PURE__*/ X(Y.component("DitoErrors", {
|
|
|
8222
8252
|
zIndex: 1
|
|
8223
8253
|
}), e.popper.addEventListener("mousedown", () => e.hide()), e.show());
|
|
8224
8254
|
} }
|
|
8225
|
-
}), [["render",
|
|
8255
|
+
}), [["render", jc]]), Nc = { class: "dito-scopes" }, Pc = [
|
|
8226
8256
|
"aria-pressed",
|
|
8227
8257
|
"title",
|
|
8228
8258
|
"onClick"
|
|
8229
8259
|
];
|
|
8230
|
-
function
|
|
8260
|
+
function Fc(e, n, r, i, a, o) {
|
|
8231
8261
|
let c = w("RouterLink");
|
|
8232
|
-
return x(), l("div",
|
|
8262
|
+
return x(), l("div", Nc, [(x(!0), l(t, null, S(e.scopes, (t, n) => (x(), s(c, {
|
|
8233
8263
|
key: n,
|
|
8234
8264
|
to: e.getScopeLink(t),
|
|
8235
8265
|
custom: ""
|
|
@@ -8240,11 +8270,11 @@ function Nc(e, n, r, i, a, o) {
|
|
|
8240
8270
|
"aria-pressed": t.name === e.query.scope,
|
|
8241
8271
|
title: t.hint || e.getLabel(t),
|
|
8242
8272
|
onClick: n
|
|
8243
|
-
}, E(e.getLabel(t)), 11,
|
|
8273
|
+
}, E(e.getLabel(t)), 11, Pc)]),
|
|
8244
8274
|
_: 2
|
|
8245
8275
|
}, 1032, ["to"]))), 128))]);
|
|
8246
8276
|
}
|
|
8247
|
-
var
|
|
8277
|
+
var Ic = /*#__PURE__*/ X(Y.component("DitoScopes", {
|
|
8248
8278
|
props: {
|
|
8249
8279
|
query: {
|
|
8250
8280
|
type: Object,
|
|
@@ -8262,10 +8292,10 @@ var Pc = /*#__PURE__*/ X(Y.component("DitoScopes", {
|
|
|
8262
8292
|
};
|
|
8263
8293
|
return t.page &&= 0, this.getQueryLink(t);
|
|
8264
8294
|
} }
|
|
8265
|
-
}), [["render",
|
|
8295
|
+
}), [["render", Fc]]);
|
|
8266
8296
|
//#endregion
|
|
8267
8297
|
//#region src/components/DitoPagination.vue?vue&type=template&lang.js
|
|
8268
|
-
function
|
|
8298
|
+
function Lc(e, t, n, r, i, a) {
|
|
8269
8299
|
let o = w("Pagination");
|
|
8270
8300
|
return x(), s(o, {
|
|
8271
8301
|
page: e.page,
|
|
@@ -8278,7 +8308,7 @@ function Fc(e, t, n, r, i, a) {
|
|
|
8278
8308
|
"total"
|
|
8279
8309
|
]);
|
|
8280
8310
|
}
|
|
8281
|
-
var
|
|
8311
|
+
var Rc = /*#__PURE__*/ X(Y.component("DitoPagination", {
|
|
8282
8312
|
components: { Pagination: to },
|
|
8283
8313
|
props: {
|
|
8284
8314
|
query: {
|
|
@@ -8305,7 +8335,7 @@ var Ic = /*#__PURE__*/ X(Y.component("DitoPagination", {
|
|
|
8305
8335
|
}));
|
|
8306
8336
|
}
|
|
8307
8337
|
} }
|
|
8308
|
-
}), [["render",
|
|
8338
|
+
}), [["render", Lc]]), zc = {
|
|
8309
8339
|
data() {
|
|
8310
8340
|
return { isDragging: !1 };
|
|
8311
8341
|
},
|
|
@@ -8331,23 +8361,23 @@ var Ic = /*#__PURE__*/ X(Y.component("DitoPagination", {
|
|
|
8331
8361
|
this.isDragging = !1, e !== t && this.onChange();
|
|
8332
8362
|
}
|
|
8333
8363
|
}
|
|
8334
|
-
},
|
|
8364
|
+
}, Bc = ["id", "data-path"], Vc = {
|
|
8335
8365
|
key: 0,
|
|
8336
8366
|
class: "dito-tree-header"
|
|
8337
|
-
},
|
|
8367
|
+
}, Hc = ["aria-label", "aria-expanded"], Uc = ["innerHTML"], Wc = {
|
|
8338
8368
|
key: 1,
|
|
8339
8369
|
class: "dito-tree-info"
|
|
8340
|
-
},
|
|
8370
|
+
}, Gc = {
|
|
8341
8371
|
key: 1,
|
|
8342
8372
|
class: "dito-tree-leaf"
|
|
8343
|
-
},
|
|
8373
|
+
}, Kc = ["innerHTML"], qc = {
|
|
8344
8374
|
key: 2,
|
|
8345
8375
|
class: "dito-buttons dito-buttons--small"
|
|
8346
|
-
},
|
|
8376
|
+
}, Jc = {
|
|
8347
8377
|
key: 1,
|
|
8348
8378
|
class: "dito-properties"
|
|
8349
8379
|
};
|
|
8350
|
-
function
|
|
8380
|
+
function Yc(e, n, r, i, a, o) {
|
|
8351
8381
|
let d = w("DitoLabel"), p = w("DitoTableCell"), m = w("DitoTreeItem", !0), h = w("DitoDraggable");
|
|
8352
8382
|
return x(), l("div", {
|
|
8353
8383
|
class: y(["dito-tree-item", {
|
|
@@ -8358,7 +8388,7 @@ function qc(e, n, r, i, a, o) {
|
|
|
8358
8388
|
style: b(e.level > 0 && { "--level": e.level }),
|
|
8359
8389
|
"data-path": e.path
|
|
8360
8390
|
}, [
|
|
8361
|
-
e.label ? (x(), l("div",
|
|
8391
|
+
e.label ? (x(), l("div", Vc, [e.numEntries ? (x(), l("div", {
|
|
8362
8392
|
key: 0,
|
|
8363
8393
|
class: "dito-tree-branch",
|
|
8364
8394
|
role: "button",
|
|
@@ -8375,12 +8405,12 @@ function qc(e, n, r, i, a, o) {
|
|
|
8375
8405
|
u("div", {
|
|
8376
8406
|
class: "dito-tree-label",
|
|
8377
8407
|
innerHTML: e.label
|
|
8378
|
-
}, null, 8,
|
|
8379
|
-
e.details ? (x(), l("div",
|
|
8380
|
-
], 40,
|
|
8408
|
+
}, null, 8, Uc),
|
|
8409
|
+
e.details ? (x(), l("div", Wc, E(e.details), 1)) : c("", !0)
|
|
8410
|
+
], 40, Hc)) : (x(), l("div", Gc, [u("div", {
|
|
8381
8411
|
class: "dito-tree-label",
|
|
8382
8412
|
innerHTML: e.label
|
|
8383
|
-
}, null, 8,
|
|
8413
|
+
}, null, 8, Kc)])), e.hasEditButtons ? (x(), l("div", qc, [
|
|
8384
8414
|
e.draggable ? (x(), l("a", v({
|
|
8385
8415
|
key: 0,
|
|
8386
8416
|
class: "dito-button"
|
|
@@ -8396,7 +8426,7 @@ function qc(e, n, r, i, a, o) {
|
|
|
8396
8426
|
type: "button"
|
|
8397
8427
|
}, e.getButtonAttributes(e.verbs.delete), { onClick: n[3] ||= (...t) => e.onDelete && e.onDelete(...t) }), null, 16)) : c("", !0)
|
|
8398
8428
|
])) : c("", !0)])) : c("", !0),
|
|
8399
|
-
e.properties ? k((x(), l("table",
|
|
8429
|
+
e.properties ? k((x(), l("table", Jc, [(x(!0), l(t, null, S(e.properties, (t) => (x(), l("tr", null, [u("td", null, [t.label === !1 ? c("", !0) : (x(), s(d, {
|
|
8400
8430
|
key: 0,
|
|
8401
8431
|
label: e.getLabel(t)
|
|
8402
8432
|
}, null, 8, ["label"]))]), f(p, {
|
|
@@ -8451,10 +8481,10 @@ function qc(e, n, r, i, a, o) {
|
|
|
8451
8481
|
"draggable",
|
|
8452
8482
|
"modelValue"
|
|
8453
8483
|
])), [[D, e.opened]]) : c("", !0)
|
|
8454
|
-
], 14,
|
|
8484
|
+
], 14, Bc);
|
|
8455
8485
|
}
|
|
8456
|
-
var
|
|
8457
|
-
mixins: [
|
|
8486
|
+
var Xc = /*#__PURE__*/ X(Y.component("DitoTreeItem", {
|
|
8487
|
+
mixins: [Ds, zc],
|
|
8458
8488
|
emits: ["update:data"],
|
|
8459
8489
|
inject: ["container"],
|
|
8460
8490
|
props: {
|
|
@@ -8519,7 +8549,7 @@ var Jc = /*#__PURE__*/ X(Y.component("DitoTreeItem", {
|
|
|
8519
8549
|
};
|
|
8520
8550
|
},
|
|
8521
8551
|
properties() {
|
|
8522
|
-
return
|
|
8552
|
+
return fr(this.schema.properties);
|
|
8523
8553
|
},
|
|
8524
8554
|
childrenSchema() {
|
|
8525
8555
|
return this.schema.children;
|
|
@@ -8580,14 +8610,14 @@ var Jc = /*#__PURE__*/ X(Y.component("DitoTreeItem", {
|
|
|
8580
8610
|
type: Boolean,
|
|
8581
8611
|
default: !1,
|
|
8582
8612
|
get(e) {
|
|
8583
|
-
return e &&
|
|
8613
|
+
return e && $n(this.schema);
|
|
8584
8614
|
}
|
|
8585
8615
|
}),
|
|
8586
8616
|
editable: q("editable", {
|
|
8587
8617
|
type: Boolean,
|
|
8588
8618
|
default: !1,
|
|
8589
8619
|
get(e) {
|
|
8590
|
-
return e &&
|
|
8620
|
+
return e && $n(this.schema);
|
|
8591
8621
|
}
|
|
8592
8622
|
}),
|
|
8593
8623
|
deletable: q("deletable", {
|
|
@@ -8613,17 +8643,17 @@ var Jc = /*#__PURE__*/ X(Y.component("DitoTreeItem", {
|
|
|
8613
8643
|
this.container.onChange();
|
|
8614
8644
|
},
|
|
8615
8645
|
onEndDrag(e) {
|
|
8616
|
-
|
|
8646
|
+
zc.methods.onEndDrag.call(this, e);
|
|
8617
8647
|
let { item: t } = e;
|
|
8618
8648
|
t.classList.contains("dito-tree-item--active") && this.$nextTick(() => {
|
|
8619
8649
|
this.editPath(e.item.dataset.path);
|
|
8620
8650
|
});
|
|
8621
8651
|
}
|
|
8622
8652
|
}
|
|
8623
|
-
}), [["render",
|
|
8624
|
-
function
|
|
8653
|
+
}), [["render", Yc]]), Zc = { class: "dito-table-head" }, Qc = ["aria-sort", "onClick"], $c = { key: 1 }, el = { key: 0 };
|
|
8654
|
+
function tl(e, n, r, i, a, o) {
|
|
8625
8655
|
let d = w("RouterLink");
|
|
8626
|
-
return x(), l("thead",
|
|
8656
|
+
return x(), l("thead", Zc, [u("tr", null, [(x(!0), l(t, null, S(e.columns, (r) => (x(), l(t, null, [e.shouldRenderSchema(r) ? (x(), l("th", {
|
|
8627
8657
|
key: 0,
|
|
8628
8658
|
scope: "col",
|
|
8629
8659
|
class: y(e.getColumnClass(r))
|
|
@@ -8637,11 +8667,11 @@ function $c(e, n, r, i, a, o) {
|
|
|
8637
8667
|
type: "button",
|
|
8638
8668
|
"aria-sort": e.getSortState(r),
|
|
8639
8669
|
onClick: t
|
|
8640
|
-
}, [n[0] ||= u("div", { class: "dito-button__order-arrows" }, null, -1), u("span", null, E(e.getLabel(r)), 1)], 10,
|
|
8670
|
+
}, [n[0] ||= u("div", { class: "dito-button__order-arrows" }, null, -1), u("span", null, E(e.getLabel(r)), 1)], 10, Qc)]),
|
|
8641
8671
|
_: 2
|
|
8642
|
-
}, 1032, ["to"])) : (x(), l("span",
|
|
8672
|
+
}, 1032, ["to"])) : (x(), l("span", $c, E(e.getLabel(r)), 1))], 2)) : c("", !0)], 64))), 256)), e.hasEditButtons ? (x(), l("th", el, [...n[1] ||= [u("span", null, null, -1)]])) : c("", !0)])]);
|
|
8643
8673
|
}
|
|
8644
|
-
var
|
|
8674
|
+
var nl = /*#__PURE__*/ X(Y.component("DitoTableHead", {
|
|
8645
8675
|
props: {
|
|
8646
8676
|
query: {
|
|
8647
8677
|
type: Object,
|
|
@@ -8684,8 +8714,8 @@ var el = /*#__PURE__*/ X(Y.component("DitoTableHead", {
|
|
|
8684
8714
|
});
|
|
8685
8715
|
}
|
|
8686
8716
|
}
|
|
8687
|
-
}), [["render",
|
|
8688
|
-
function
|
|
8717
|
+
}), [["render", tl]]), rl = ["innerHTML"];
|
|
8718
|
+
function il(e, t, n, r, i, a) {
|
|
8689
8719
|
return x(), l("td", {
|
|
8690
8720
|
class: y(e.cell.class),
|
|
8691
8721
|
style: b(e.cell.style)
|
|
@@ -8709,9 +8739,9 @@ function nl(e, t, n, r, i, a) {
|
|
|
8709
8739
|
])) : (x(), l("span", {
|
|
8710
8740
|
key: 1,
|
|
8711
8741
|
innerHTML: e.renderCell(e.data)
|
|
8712
|
-
}, null, 8,
|
|
8742
|
+
}, null, 8, rl))], 6);
|
|
8713
8743
|
}
|
|
8714
|
-
var
|
|
8744
|
+
var al = /*#__PURE__*/ X(Y.component("DitoTableCell", {
|
|
8715
8745
|
mixins: [K],
|
|
8716
8746
|
props: {
|
|
8717
8747
|
cell: {
|
|
@@ -8749,30 +8779,30 @@ var rl = /*#__PURE__*/ X(Y.component("DitoTableCell", {
|
|
|
8749
8779
|
},
|
|
8750
8780
|
methods: { renderCell(e) {
|
|
8751
8781
|
let { name: t, render: n } = this.cell, r = e[t];
|
|
8752
|
-
return n ? n.call(this, new
|
|
8782
|
+
return n ? n.call(this, new G(this, {
|
|
8753
8783
|
name: t,
|
|
8754
8784
|
value: r,
|
|
8755
8785
|
data: e,
|
|
8756
8786
|
dataPath: V(this.dataPath, t)
|
|
8757
8787
|
})) : De(r);
|
|
8758
8788
|
} }
|
|
8759
|
-
}), [["render",
|
|
8789
|
+
}), [["render", il]]), ol = { class: "dito-upload-file" }, sl = { class: "dito-thumbnail__inner" }, cl = ["src"], ll = {
|
|
8760
8790
|
key: 1,
|
|
8761
8791
|
class: "dito-thumbnail__type"
|
|
8762
8792
|
};
|
|
8763
|
-
function
|
|
8764
|
-
return x(), l("div",
|
|
8793
|
+
function ul(e, t, n, r, i, a) {
|
|
8794
|
+
return x(), l("div", ol, [e.thumbnail ? (x(), l("div", {
|
|
8765
8795
|
key: 0,
|
|
8766
8796
|
class: y(["dito-thumbnail", `dito-thumbnail--${e.thumbnail}`])
|
|
8767
|
-
}, [u("div",
|
|
8797
|
+
}, [u("div", sl, [e.source ? (x(), l("img", {
|
|
8768
8798
|
key: 0,
|
|
8769
8799
|
src: e.source,
|
|
8770
8800
|
crossorigin: "anonymous"
|
|
8771
|
-
}, null, 8,
|
|
8801
|
+
}, null, 8, cl)) : (x(), l("div", ll, [u("span", null, E(e.type), 1)]))])], 2)) : c("", !0), u("span", null, E(e.file.name), 1)]);
|
|
8772
8802
|
}
|
|
8773
8803
|
//#endregion
|
|
8774
8804
|
//#region src/components/DitoUploadFile.vue
|
|
8775
|
-
var
|
|
8805
|
+
var dl = Y.component("DitoUploadFile", {
|
|
8776
8806
|
props: {
|
|
8777
8807
|
file: {
|
|
8778
8808
|
type: Object,
|
|
@@ -8792,7 +8822,7 @@ var ll = Y.component("DitoUploadFile", {
|
|
|
8792
8822
|
},
|
|
8793
8823
|
computed: {
|
|
8794
8824
|
type() {
|
|
8795
|
-
return
|
|
8825
|
+
return fl[this.file.type] || this.file.name.split(".").pop().toUpperCase();
|
|
8796
8826
|
},
|
|
8797
8827
|
source() {
|
|
8798
8828
|
return this.uploadUrl || this.thumbnailUrl;
|
|
@@ -8809,7 +8839,7 @@ var ll = Y.component("DitoUploadFile", {
|
|
|
8809
8839
|
} else this.uploadUrl = null;
|
|
8810
8840
|
}
|
|
8811
8841
|
} }
|
|
8812
|
-
}),
|
|
8842
|
+
}), fl = {
|
|
8813
8843
|
"text/plain": "TXT",
|
|
8814
8844
|
"text/html": "HTML",
|
|
8815
8845
|
"text/css": "CSS",
|
|
@@ -8824,12 +8854,12 @@ var ll = Y.component("DitoUploadFile", {
|
|
|
8824
8854
|
"application/xml": "XML",
|
|
8825
8855
|
"application/pdf": "PDF",
|
|
8826
8856
|
"application/zip": "ZIP"
|
|
8827
|
-
},
|
|
8857
|
+
}, pl = /*#__PURE__*/ X(dl, [["render", ul]]);
|
|
8828
8858
|
//#endregion
|
|
8829
8859
|
//#region ../../node_modules/@vueuse/integrations/dist/useSortable.js
|
|
8830
|
-
function
|
|
8860
|
+
function ml(e, t, n = {}) {
|
|
8831
8861
|
let r, { document: i = tt, watchElement: a = !1, ...o } = n, s = { onUpdate: (e) => {
|
|
8832
|
-
|
|
8862
|
+
_l(t, e.oldIndex, e.newIndex, e);
|
|
8833
8863
|
} }, c = () => {
|
|
8834
8864
|
r?.destroy(), r = void 0;
|
|
8835
8865
|
}, l = (e) => {
|
|
@@ -8859,15 +8889,15 @@ function fl(e, t, n = {}) {
|
|
|
8859
8889
|
option: d
|
|
8860
8890
|
};
|
|
8861
8891
|
}
|
|
8862
|
-
function
|
|
8892
|
+
function hl(e, t, n) {
|
|
8863
8893
|
let r = e.children[n];
|
|
8864
8894
|
e.insertBefore(t, r);
|
|
8865
8895
|
}
|
|
8866
|
-
function
|
|
8896
|
+
function gl(e) {
|
|
8867
8897
|
e.parentNode && e.parentNode.removeChild(e);
|
|
8868
8898
|
}
|
|
8869
|
-
function
|
|
8870
|
-
r != null && (
|
|
8899
|
+
function _l(e, t, n, r = null) {
|
|
8900
|
+
r != null && (gl(r.item), hl(r.from, r.item, t));
|
|
8871
8901
|
let i = _(e), a = i ? [...se(e)] : se(e);
|
|
8872
8902
|
if (n >= 0 && n < a.length) {
|
|
8873
8903
|
let r = a.splice(t, 1)[0];
|
|
@@ -8878,8 +8908,8 @@ function hl(e, t, n, r = null) {
|
|
|
8878
8908
|
}
|
|
8879
8909
|
//#endregion
|
|
8880
8910
|
//#region ../../node_modules/@vueuse/integrations/dist/useSortable/component.js
|
|
8881
|
-
var
|
|
8882
|
-
let n = ot(e, "modelValue"), r = ae(), i = re(
|
|
8911
|
+
var vl = /* #__PURE__ */ p((e, { slots: t }) => {
|
|
8912
|
+
let n = ot(e, "modelValue"), r = ae(), i = re(ml(r, n, e.options));
|
|
8883
8913
|
return () => {
|
|
8884
8914
|
if (t.default) return g(e.as || "div", { ref: r }, t.default(i));
|
|
8885
8915
|
};
|
|
@@ -8893,7 +8923,7 @@ var gl = /* #__PURE__ */ p((e, { slots: t }) => {
|
|
|
8893
8923
|
});
|
|
8894
8924
|
//#endregion
|
|
8895
8925
|
//#region src/components/DitoDraggable.vue?vue&type=template&lang.js
|
|
8896
|
-
function
|
|
8926
|
+
function yl(e, t, n, r, i, a) {
|
|
8897
8927
|
let o = w("UseSortable");
|
|
8898
8928
|
return e.draggable ? (x(), s(o, {
|
|
8899
8929
|
key: 0,
|
|
@@ -8919,9 +8949,9 @@ function _l(e, t, n, r, i, a) {
|
|
|
8919
8949
|
_: 3
|
|
8920
8950
|
}));
|
|
8921
8951
|
}
|
|
8922
|
-
var
|
|
8952
|
+
var bl = /*#__PURE__*/ X(Y.component("DitoDraggable", {
|
|
8923
8953
|
mixins: [mo],
|
|
8924
|
-
components: { UseSortable:
|
|
8954
|
+
components: { UseSortable: vl },
|
|
8925
8955
|
emits: ["update:modelValue"],
|
|
8926
8956
|
props: {
|
|
8927
8957
|
modelValue: {
|
|
@@ -8962,55 +8992,55 @@ var vl = /*#__PURE__*/ X(Y.component("DitoDraggable", {
|
|
|
8962
8992
|
this.isDragging = !1, this.mouseEvents?.remove(), this.mouseEvents = null;
|
|
8963
8993
|
}
|
|
8964
8994
|
}
|
|
8965
|
-
}), [["render",
|
|
8995
|
+
}), [["render", yl]]);
|
|
8966
8996
|
//#endregion
|
|
8967
8997
|
//#region src/components/DitoVNode.vue
|
|
8968
|
-
function
|
|
8998
|
+
function xl({ vnode: e }) {
|
|
8969
8999
|
return e;
|
|
8970
9000
|
}
|
|
8971
|
-
|
|
9001
|
+
xl.props = { vnode: {
|
|
8972
9002
|
type: Object,
|
|
8973
9003
|
required: !0
|
|
8974
9004
|
} };
|
|
8975
|
-
var
|
|
8976
|
-
DitoAccount: () =>
|
|
8977
|
-
DitoAffix: () =>
|
|
9005
|
+
var Sl = Y.component("DitoVnode", xl), Cl = /* @__PURE__ */ Ht({
|
|
9006
|
+
DitoAccount: () => ms,
|
|
9007
|
+
DitoAffix: () => vs,
|
|
8978
9008
|
DitoAffixes: () => Z,
|
|
8979
|
-
DitoButtons: () =>
|
|
8980
|
-
DitoClipboard: () =>
|
|
8981
|
-
DitoContainer: () =>
|
|
8982
|
-
DitoCreateButton: () =>
|
|
8983
|
-
DitoDialog: () =>
|
|
8984
|
-
DitoDraggable: () =>
|
|
8985
|
-
DitoEditButtons: () =>
|
|
8986
|
-
DitoErrors: () =>
|
|
8987
|
-
DitoForm: () =>
|
|
8988
|
-
DitoFormInner: () =>
|
|
8989
|
-
DitoFormNested: () =>
|
|
8990
|
-
DitoHeader: () =>
|
|
8991
|
-
DitoLabel: () =>
|
|
8992
|
-
DitoMenu: () =>
|
|
8993
|
-
DitoNavigation: () =>
|
|
8994
|
-
DitoNotifications: () =>
|
|
8995
|
-
DitoPagination: () =>
|
|
8996
|
-
DitoPane: () =>
|
|
8997
|
-
DitoPanel: () =>
|
|
8998
|
-
DitoPanels: () =>
|
|
8999
|
-
DitoRoot: () =>
|
|
9000
|
-
DitoRouterView: () =>
|
|
9001
|
-
DitoSchema: () =>
|
|
9002
|
-
DitoSchemaInlined: () =>
|
|
9003
|
-
DitoScopes: () =>
|
|
9004
|
-
DitoSidebar: () =>
|
|
9005
|
-
DitoSpinner: () =>
|
|
9006
|
-
DitoTableCell: () =>
|
|
9007
|
-
DitoTableHead: () =>
|
|
9008
|
-
DitoTabs: () =>
|
|
9009
|
-
DitoTrail: () =>
|
|
9010
|
-
DitoTreeItem: () =>
|
|
9011
|
-
DitoUploadFile: () =>
|
|
9012
|
-
DitoVNode: () =>
|
|
9013
|
-
DitoView: () =>
|
|
9009
|
+
DitoButtons: () => nc,
|
|
9010
|
+
DitoClipboard: () => gc,
|
|
9011
|
+
DitoContainer: () => Us,
|
|
9012
|
+
DitoCreateButton: () => dc,
|
|
9013
|
+
DitoDialog: () => Fo,
|
|
9014
|
+
DitoDraggable: () => bl,
|
|
9015
|
+
DitoEditButtons: () => ac,
|
|
9016
|
+
DitoErrors: () => Mc,
|
|
9017
|
+
DitoForm: () => wc,
|
|
9018
|
+
DitoFormInner: () => Oc,
|
|
9019
|
+
DitoFormNested: () => kc,
|
|
9020
|
+
DitoHeader: () => $o,
|
|
9021
|
+
DitoLabel: () => Es,
|
|
9022
|
+
DitoMenu: () => Ko,
|
|
9023
|
+
DitoNavigation: () => ns,
|
|
9024
|
+
DitoNotifications: () => os,
|
|
9025
|
+
DitoPagination: () => Rc,
|
|
9026
|
+
DitoPane: () => Bs,
|
|
9027
|
+
DitoPanel: () => Ys,
|
|
9028
|
+
DitoPanels: () => Qs,
|
|
9029
|
+
DitoRoot: () => Ho,
|
|
9030
|
+
DitoRouterView: () => vc,
|
|
9031
|
+
DitoSchema: () => Ns,
|
|
9032
|
+
DitoSchemaInlined: () => Fs,
|
|
9033
|
+
DitoScopes: () => Ic,
|
|
9034
|
+
DitoSidebar: () => ls,
|
|
9035
|
+
DitoSpinner: () => gs,
|
|
9036
|
+
DitoTableCell: () => al,
|
|
9037
|
+
DitoTableHead: () => nl,
|
|
9038
|
+
DitoTabs: () => qs,
|
|
9039
|
+
DitoTrail: () => Xo,
|
|
9040
|
+
DitoTreeItem: () => Xc,
|
|
9041
|
+
DitoUploadFile: () => pl,
|
|
9042
|
+
DitoVNode: () => Sl,
|
|
9043
|
+
DitoView: () => Ao
|
|
9014
9044
|
}), Q = {
|
|
9015
9045
|
extends: Y,
|
|
9016
9046
|
mixins: [ai],
|
|
@@ -9029,19 +9059,19 @@ var bl = Y.component("DitoVnode", yl), xl = /* @__PURE__ */ Ht({
|
|
|
9029
9059
|
component: Y.component,
|
|
9030
9060
|
get: dn,
|
|
9031
9061
|
register(e, t = {}) {
|
|
9032
|
-
e = j(e),
|
|
9062
|
+
e = j(e), wl(t) && console.warn(`Type '${e[0]}': The \`getValidations()\` method isn't supported anymore, use the static \`getTypeValidations(schema, context)\` option instead.`);
|
|
9033
9063
|
let n = this.component(`DitoType${xe(e[0], !0)}`, t);
|
|
9034
9064
|
for (let t of e) un(t, n);
|
|
9035
9065
|
return n;
|
|
9036
9066
|
}
|
|
9037
9067
|
};
|
|
9038
|
-
function
|
|
9068
|
+
function wl(e) {
|
|
9039
9069
|
return [e, ...e.mixins ?? []].some(({ methods: e }) => !!e?.getValidations);
|
|
9040
9070
|
}
|
|
9041
9071
|
//#endregion
|
|
9042
9072
|
//#region src/types/DitoTypeButton.vue?vue&type=template&lang.js
|
|
9043
|
-
var
|
|
9044
|
-
function
|
|
9073
|
+
var Tl = ["data-info"];
|
|
9074
|
+
function El(e, t, n, r, i, a) {
|
|
9045
9075
|
let o = w("DitoAffixes"), u = w("DitoButton");
|
|
9046
9076
|
return x(), s(u, v({
|
|
9047
9077
|
class: ["dito-button", e.buttonClass],
|
|
@@ -9077,7 +9107,7 @@ function wl(e, t, n, r, i, a) {
|
|
|
9077
9107
|
key: 1,
|
|
9078
9108
|
class: "dito-info",
|
|
9079
9109
|
"data-info": e.info
|
|
9080
|
-
}, null, 8,
|
|
9110
|
+
}, null, 8, Tl)) : c("", !0)]),
|
|
9081
9111
|
_: 1
|
|
9082
9112
|
}, 16, [
|
|
9083
9113
|
"id",
|
|
@@ -9088,7 +9118,7 @@ function wl(e, t, n, r, i, a) {
|
|
|
9088
9118
|
"class"
|
|
9089
9119
|
]);
|
|
9090
9120
|
}
|
|
9091
|
-
var
|
|
9121
|
+
var Dl = /*#__PURE__*/ X(Q.register(["button", "submit"], {
|
|
9092
9122
|
components: {
|
|
9093
9123
|
DitoAffixes: Z,
|
|
9094
9124
|
DitoButton: Vi
|
|
@@ -9154,16 +9184,16 @@ var Tl = /*#__PURE__*/ X(Q.register(["button", "submit"], {
|
|
|
9154
9184
|
}
|
|
9155
9185
|
}
|
|
9156
9186
|
}
|
|
9157
|
-
}), [["render",
|
|
9158
|
-
function
|
|
9159
|
-
return x(), l("div",
|
|
9187
|
+
}), [["render", El]]), Ol = { class: "dito-checkbox" }, kl = ["id"];
|
|
9188
|
+
function Al(e, t, n, r, i, a) {
|
|
9189
|
+
return x(), l("div", Ol, [k(u("input", v({
|
|
9160
9190
|
id: e.componentPath,
|
|
9161
9191
|
ref: "element",
|
|
9162
9192
|
"onUpdate:modelValue": t[0] ||= (t) => e.value = t,
|
|
9163
9193
|
type: "checkbox"
|
|
9164
|
-
}, e.attributes), null, 16,
|
|
9194
|
+
}, e.attributes), null, 16, kl), [[le, e.value]])]);
|
|
9165
9195
|
}
|
|
9166
|
-
var
|
|
9196
|
+
var jl = /*#__PURE__*/ X(Q.register("checkbox", { nativeField: !0 }), [["render", Al]]), Ml = {
|
|
9167
9197
|
computed: {
|
|
9168
9198
|
multiple() {
|
|
9169
9199
|
return Tr(this.schema);
|
|
@@ -9191,9 +9221,6 @@ var kl = /*#__PURE__*/ X(Q.register("checkbox", { nativeField: !0 }), [["render"
|
|
|
9191
9221
|
selectedOption() {
|
|
9192
9222
|
return this.getOptionForValue(this.selectedValue);
|
|
9193
9223
|
},
|
|
9194
|
-
formModel() {
|
|
9195
|
-
return (this.dialogComponent ?? this.routeComponent).formModel;
|
|
9196
|
-
},
|
|
9197
9224
|
optionsResolver() {
|
|
9198
9225
|
return this.formModel.getOptionsResolver({
|
|
9199
9226
|
schema: this.schema,
|
|
@@ -9258,11 +9285,11 @@ var kl = /*#__PURE__*/ X(Q.register("checkbox", { nativeField: !0 }), [["render"
|
|
|
9258
9285
|
type: Boolean,
|
|
9259
9286
|
default: !1,
|
|
9260
9287
|
get(e) {
|
|
9261
|
-
return e &&
|
|
9288
|
+
return e && rr(this.schema, this.context);
|
|
9262
9289
|
}
|
|
9263
9290
|
}),
|
|
9264
9291
|
editPath() {
|
|
9265
|
-
return this.editable && this.selectedValue ?
|
|
9292
|
+
return this.editable && this.selectedValue ? ar(this.schema, this.selectedValue, this.context) : null;
|
|
9266
9293
|
},
|
|
9267
9294
|
groupByLabel() {
|
|
9268
9295
|
return this.groupBy ? "label" : null;
|
|
@@ -9314,7 +9341,7 @@ var kl = /*#__PURE__*/ X(Q.register("checkbox", { nativeField: !0 }), [["render"
|
|
|
9314
9341
|
for (let i of e) if (r) {
|
|
9315
9342
|
let e = t(i.options, n, null);
|
|
9316
9343
|
if (e) return e;
|
|
9317
|
-
} else if (this.optionEquals ? this.optionEquals(new
|
|
9344
|
+
} else if (this.optionEquals ? this.optionEquals(new G(this, {
|
|
9318
9345
|
value: n,
|
|
9319
9346
|
option: i
|
|
9320
9347
|
})) : n === this.getValueForOption(i)) return i;
|
|
@@ -9324,11 +9351,11 @@ var kl = /*#__PURE__*/ X(Q.register("checkbox", { nativeField: !0 }), [["render"
|
|
|
9324
9351
|
getValueForOption(e) {
|
|
9325
9352
|
if (this.shouldSetTemporaryId(e)) return oe(e);
|
|
9326
9353
|
let { optionValue: t } = this;
|
|
9327
|
-
return L(t) ? e?.[t] ?? null : F(t) ? t(new
|
|
9354
|
+
return L(t) ? e?.[t] ?? null : F(t) ? t(new G(this, { option: e })) : e;
|
|
9328
9355
|
},
|
|
9329
9356
|
getLabelForOption(e) {
|
|
9330
9357
|
let { optionLabel: t } = this;
|
|
9331
|
-
return L(t) ? e?.[t] : F(t) ? t(new
|
|
9358
|
+
return L(t) ? e?.[t] : F(t) ? t(new G(this, { option: e })) : R(`${e}`);
|
|
9332
9359
|
}
|
|
9333
9360
|
},
|
|
9334
9361
|
processValue({ schema: e, value: t, dataPath: n }, r) {
|
|
@@ -9340,23 +9367,23 @@ var kl = /*#__PURE__*/ X(Q.register("checkbox", { nativeField: !0 }), [["render"
|
|
|
9340
9367
|
}
|
|
9341
9368
|
return t;
|
|
9342
9369
|
}
|
|
9343
|
-
},
|
|
9344
|
-
function
|
|
9370
|
+
}, Nl = ["id", "aria-label"], Pl = { class: "dito-checkbox" }, Fl = ["value"];
|
|
9371
|
+
function Il(e, n, r, i, a, o) {
|
|
9345
9372
|
return x(), l("ul", {
|
|
9346
9373
|
class: y(["dito-checkboxes", `dito-layout--${e.schema.layout || "vertical"}`]),
|
|
9347
9374
|
id: e.componentPath,
|
|
9348
9375
|
role: "group",
|
|
9349
9376
|
"aria-label": e.label
|
|
9350
|
-
}, [(x(!0), l(t, null, S(e.options, (t) => (x(), l("li", null, [u("label", null, [u("div",
|
|
9377
|
+
}, [(x(!0), l(t, null, S(e.options, (t) => (x(), l("li", null, [u("label", null, [u("div", Pl, [k(u("input", v({
|
|
9351
9378
|
ref_for: !0,
|
|
9352
9379
|
ref: "element",
|
|
9353
9380
|
"onUpdate:modelValue": n[0] ||= (t) => e.selectedOptions = t,
|
|
9354
9381
|
type: "checkbox",
|
|
9355
9382
|
value: e.getValueForOption(t)
|
|
9356
|
-
}, { ref_for: !0 }, e.attributes), null, 16,
|
|
9383
|
+
}, { ref_for: !0 }, e.attributes), null, 16, Fl), [[le, e.selectedOptions]]), u("span", null, E(e.getLabelForOption(t)), 1)])])]))), 256))], 10, Nl);
|
|
9357
9384
|
}
|
|
9358
|
-
var
|
|
9359
|
-
mixins: [
|
|
9385
|
+
var Ll = /*#__PURE__*/ X(Q.register("checkboxes", {
|
|
9386
|
+
mixins: [Ml],
|
|
9360
9387
|
nativeField: !0,
|
|
9361
9388
|
defaultValue: [],
|
|
9362
9389
|
defaultWidth: "auto",
|
|
@@ -9374,22 +9401,22 @@ var Fl = /*#__PURE__*/ X(Q.register("checkboxes", {
|
|
|
9374
9401
|
}
|
|
9375
9402
|
}
|
|
9376
9403
|
}
|
|
9377
|
-
}), [["render",
|
|
9404
|
+
}), [["render", Il]]), Rl = ["id"], zl = {
|
|
9378
9405
|
class: "dito-code__editor",
|
|
9379
9406
|
ref: "editor"
|
|
9380
9407
|
};
|
|
9381
|
-
function
|
|
9408
|
+
function Bl(e, t, n, r, i, a) {
|
|
9382
9409
|
return x(), l("div", {
|
|
9383
9410
|
class: "dito-code",
|
|
9384
9411
|
id: e.componentPath,
|
|
9385
9412
|
style: b(e.style)
|
|
9386
|
-
}, [u("div",
|
|
9413
|
+
}, [u("div", zl, null, 512), e.resizable ? (x(), l("div", {
|
|
9387
9414
|
key: 0,
|
|
9388
9415
|
class: "dito-resize",
|
|
9389
9416
|
onMousedown: t[0] ||= A((...t) => e.onDragResize && e.onDragResize(...t), ["stop", "prevent"])
|
|
9390
|
-
}, null, 32)) : c("", !0)], 12,
|
|
9417
|
+
}, null, 32)) : c("", !0)], 12, Rl);
|
|
9391
9418
|
}
|
|
9392
|
-
var
|
|
9419
|
+
var Vl = /*#__PURE__*/ X(Q.register("code", {
|
|
9393
9420
|
mixins: [mo],
|
|
9394
9421
|
data() {
|
|
9395
9422
|
return { height: null };
|
|
@@ -9464,11 +9491,11 @@ var zl = /*#__PURE__*/ X(Q.register("code", {
|
|
|
9464
9491
|
});
|
|
9465
9492
|
}
|
|
9466
9493
|
}
|
|
9467
|
-
}), [["render",
|
|
9494
|
+
}), [["render", Bl]]), Hl = {
|
|
9468
9495
|
key: 0,
|
|
9469
9496
|
class: "dito-color__preview"
|
|
9470
9497
|
};
|
|
9471
|
-
function
|
|
9498
|
+
function Ul(e, t, n, r, i, a) {
|
|
9472
9499
|
let o = w("DitoAffixes"), d = w("DitoInput"), p = w("SketchPicker"), m = w("DitoTrigger");
|
|
9473
9500
|
return x(), s(m, {
|
|
9474
9501
|
class: "dito-color",
|
|
@@ -9506,7 +9533,7 @@ function Vl(e, t, n, r, i, a) {
|
|
|
9506
9533
|
parentContext: e.context,
|
|
9507
9534
|
onClear: e.clear
|
|
9508
9535
|
}, {
|
|
9509
|
-
append: O(() => [e.value ? (x(), l("div",
|
|
9536
|
+
append: O(() => [e.value ? (x(), l("div", Hl, [u("div", { style: b({ background: `#${e.hexValue || "00000000"}` }) }, null, 4)])) : c("", !0)]),
|
|
9510
9537
|
_: 1
|
|
9511
9538
|
}, 8, [
|
|
9512
9539
|
"items",
|
|
@@ -9540,7 +9567,7 @@ function Vl(e, t, n, r, i, a) {
|
|
|
9540
9567
|
}
|
|
9541
9568
|
//#endregion
|
|
9542
9569
|
//#region src/types/DitoTypeColor.vue
|
|
9543
|
-
var
|
|
9570
|
+
var Wl = Q.register("color", {
|
|
9544
9571
|
components: {
|
|
9545
9572
|
DitoTrigger: wa,
|
|
9546
9573
|
DitoInput: Da,
|
|
@@ -9564,7 +9591,7 @@ var Hl = Q.register("color", {
|
|
|
9564
9591
|
set(e) {
|
|
9565
9592
|
this.convertedValue = null;
|
|
9566
9593
|
let { value: t } = this;
|
|
9567
|
-
(!t || e.toHex8String() !== dt(t).toHex8String()) && (this.value =
|
|
9594
|
+
(!t || e.toHex8String() !== dt(t).toHex8String()) && (this.value = Kl(e, this.colorFormat));
|
|
9568
9595
|
}
|
|
9569
9596
|
},
|
|
9570
9597
|
hexValue: {
|
|
@@ -9574,7 +9601,7 @@ var Hl = Q.register("color", {
|
|
|
9574
9601
|
},
|
|
9575
9602
|
set(e) {
|
|
9576
9603
|
if (dt(e).isValid()) {
|
|
9577
|
-
let t =
|
|
9604
|
+
let t = Gl(e, this.colorFormat);
|
|
9578
9605
|
this.canUpdateValue ? this.value = t : this.convertedValue = t;
|
|
9579
9606
|
}
|
|
9580
9607
|
}
|
|
@@ -9620,10 +9647,10 @@ var Hl = Q.register("color", {
|
|
|
9620
9647
|
}
|
|
9621
9648
|
}
|
|
9622
9649
|
});
|
|
9623
|
-
function
|
|
9624
|
-
return
|
|
9650
|
+
function Gl(e, t) {
|
|
9651
|
+
return Kl(dt(e), t);
|
|
9625
9652
|
}
|
|
9626
|
-
function
|
|
9653
|
+
function Kl(e, t) {
|
|
9627
9654
|
switch (t) {
|
|
9628
9655
|
case "rgb": return e.toRgb();
|
|
9629
9656
|
case "prgb": return e.toPercentageRgb();
|
|
@@ -9636,25 +9663,25 @@ function Wl(e, t) {
|
|
|
9636
9663
|
default: return e.getAlpha() < 1 ? `#${e.toHex8()}` : `#${e.toHex()}`;
|
|
9637
9664
|
}
|
|
9638
9665
|
}
|
|
9639
|
-
var
|
|
9666
|
+
var ql = /*#__PURE__*/ X(Wl, [["render", Ul]]);
|
|
9640
9667
|
//#endregion
|
|
9641
9668
|
//#region src/types/DitoTypeComponent.vue?vue&type=template&lang.js
|
|
9642
|
-
function
|
|
9669
|
+
function Jl(e, t, n, r, i, a) {
|
|
9643
9670
|
return x(), s(T(e.schema.component), ne(h(e.$props)), null, 16);
|
|
9644
9671
|
}
|
|
9645
|
-
var
|
|
9672
|
+
var Yl = /*#__PURE__*/ X(Q.register("component", {
|
|
9646
9673
|
defaultValue: () => void 0,
|
|
9647
9674
|
ignoreMissingValue: ({ schema: e }) => !("default" in e),
|
|
9648
9675
|
async processSchema(e, t) {
|
|
9649
9676
|
await di(t);
|
|
9650
9677
|
}
|
|
9651
|
-
}), [["render",
|
|
9678
|
+
}), [["render", Jl]]), Xl = [
|
|
9652
9679
|
"id",
|
|
9653
9680
|
"name",
|
|
9654
9681
|
"value",
|
|
9655
9682
|
"disabled"
|
|
9656
9683
|
];
|
|
9657
|
-
function
|
|
9684
|
+
function Zl(e, t, n, r, i, a) {
|
|
9658
9685
|
return x(), l("input", {
|
|
9659
9686
|
class: "dito-text dito-input",
|
|
9660
9687
|
id: e.componentPath,
|
|
@@ -9664,9 +9691,9 @@ function Yl(e, t, n, r, i, a) {
|
|
|
9664
9691
|
value: e.value,
|
|
9665
9692
|
disabled: e.disabled,
|
|
9666
9693
|
readonly: !0
|
|
9667
|
-
}, null, 8,
|
|
9694
|
+
}, null, 8, Xl);
|
|
9668
9695
|
}
|
|
9669
|
-
var
|
|
9696
|
+
var Ql = /*#__PURE__*/ X(Q.register([
|
|
9670
9697
|
"computed",
|
|
9671
9698
|
"data",
|
|
9672
9699
|
"hidden"
|
|
@@ -9674,10 +9701,10 @@ var Xl = /*#__PURE__*/ X(Q.register([
|
|
|
9674
9701
|
defaultValue: () => void 0,
|
|
9675
9702
|
defaultVisible: !1,
|
|
9676
9703
|
valueFromDataSchema: !0
|
|
9677
|
-
}), [["render",
|
|
9678
|
-
function
|
|
9704
|
+
}), [["render", Zl]]), $l = { class: "dito-date" };
|
|
9705
|
+
function eu(e, t, n, r, i, a) {
|
|
9679
9706
|
let o = w("DitoAffixes");
|
|
9680
|
-
return x(), l("div",
|
|
9707
|
+
return x(), l("div", $l, [(x(), s(T(e.getComponent(e.type)), v({
|
|
9681
9708
|
id: e.componentPath,
|
|
9682
9709
|
ref: "element",
|
|
9683
9710
|
modelValue: e.dateValue,
|
|
@@ -9723,7 +9750,7 @@ function Ql(e, t, n, r, i, a) {
|
|
|
9723
9750
|
"format"
|
|
9724
9751
|
]))]);
|
|
9725
9752
|
}
|
|
9726
|
-
var
|
|
9753
|
+
var tu = /*#__PURE__*/ X(Q.register([
|
|
9727
9754
|
"date",
|
|
9728
9755
|
"datetime",
|
|
9729
9756
|
"time"
|
|
@@ -9763,10 +9790,10 @@ var $l = /*#__PURE__*/ X(Q.register([
|
|
|
9763
9790
|
processValue({ schema: e, value: t }) {
|
|
9764
9791
|
return Ie(t) ? e.type === "date" ? ke(t) : t.toISOString() : t;
|
|
9765
9792
|
}
|
|
9766
|
-
}), [["render",
|
|
9793
|
+
}), [["render", eu]]);
|
|
9767
9794
|
//#endregion
|
|
9768
9795
|
//#region src/utils/route.js
|
|
9769
|
-
function
|
|
9796
|
+
function nu(e) {
|
|
9770
9797
|
let t = e ? P(e) ? e : Object.entries(e) : [];
|
|
9771
9798
|
return new URLSearchParams(t.reduce((e, [t, n]) => {
|
|
9772
9799
|
if (P(n)) for (let r of n) e.push([t, r ?? ""]);
|
|
@@ -9774,19 +9801,19 @@ function eu(e) {
|
|
|
9774
9801
|
return e;
|
|
9775
9802
|
}, [])).toString().replaceAll(/%(?:21|24|28|29|2C|2F|3A|3B|3D|3F|40)/g, decodeURIComponent);
|
|
9776
9803
|
}
|
|
9777
|
-
function
|
|
9804
|
+
function ru({ path: e, query: t, hash: n }) {
|
|
9778
9805
|
let { location: r } = window;
|
|
9779
|
-
history.replaceState(history.state, null, `${r.origin}${e ?? r.pathname}?${t ?
|
|
9806
|
+
history.replaceState(history.state, null, `${r.origin}${e ?? r.pathname}?${t ? nu(t) : r.search.slice(1)}${n ?? r.hash}`);
|
|
9780
9807
|
}
|
|
9781
9808
|
//#endregion
|
|
9782
9809
|
//#region src/mixins/SourceMixin.js
|
|
9783
|
-
var
|
|
9810
|
+
var iu = {
|
|
9784
9811
|
mixins: [
|
|
9785
|
-
|
|
9786
|
-
|
|
9812
|
+
Ds,
|
|
9813
|
+
yc,
|
|
9787
9814
|
go
|
|
9788
9815
|
],
|
|
9789
|
-
defaultValue: (e) =>
|
|
9816
|
+
defaultValue: (e) => In(e.schema) ? [] : null,
|
|
9790
9817
|
excludeValue: (e) => !!e.schema.resource,
|
|
9791
9818
|
provide() {
|
|
9792
9819
|
return { $sourceComponent: () => this };
|
|
@@ -9799,10 +9826,10 @@ var nu = {
|
|
|
9799
9826
|
return this;
|
|
9800
9827
|
},
|
|
9801
9828
|
isObjectSource() {
|
|
9802
|
-
return
|
|
9829
|
+
return Fn(this.type);
|
|
9803
9830
|
},
|
|
9804
9831
|
isListSource() {
|
|
9805
|
-
return
|
|
9832
|
+
return In(this.type);
|
|
9806
9833
|
},
|
|
9807
9834
|
hasData() {
|
|
9808
9835
|
return !!this.value;
|
|
@@ -9870,15 +9897,15 @@ var nu = {
|
|
|
9870
9897
|
...n != null && { page: n },
|
|
9871
9898
|
...r != null && { type: r },
|
|
9872
9899
|
...e
|
|
9873
|
-
}, N(e, this.$route.query) ||
|
|
9900
|
+
}, N(e, this.$route.query) || ru({ query: e }), e;
|
|
9874
9901
|
}
|
|
9875
9902
|
}),
|
|
9876
9903
|
total: ii("total"),
|
|
9877
9904
|
columns() {
|
|
9878
|
-
return
|
|
9905
|
+
return fr(this.schema.columns);
|
|
9879
9906
|
},
|
|
9880
9907
|
scopes() {
|
|
9881
|
-
return
|
|
9908
|
+
return fr(this.schema.scopes);
|
|
9882
9909
|
},
|
|
9883
9910
|
defaultScope() {
|
|
9884
9911
|
let e = null;
|
|
@@ -9905,22 +9932,22 @@ var nu = {
|
|
|
9905
9932
|
};
|
|
9906
9933
|
},
|
|
9907
9934
|
forms() {
|
|
9908
|
-
return Object.values(
|
|
9935
|
+
return Object.values(or(this.schema, this.context));
|
|
9909
9936
|
},
|
|
9910
9937
|
view() {
|
|
9911
|
-
return
|
|
9938
|
+
return nr(this.schema, this.context);
|
|
9912
9939
|
},
|
|
9913
9940
|
linksToView() {
|
|
9914
9941
|
return !!this.view;
|
|
9915
9942
|
},
|
|
9916
9943
|
buttonSchemas() {
|
|
9917
|
-
return
|
|
9944
|
+
return pr(this.schema.buttons);
|
|
9918
9945
|
},
|
|
9919
9946
|
isCompact() {
|
|
9920
|
-
return this.forms.every(
|
|
9947
|
+
return this.forms.every(On);
|
|
9921
9948
|
},
|
|
9922
9949
|
isInlined() {
|
|
9923
|
-
return
|
|
9950
|
+
return kn(this.schema);
|
|
9924
9951
|
},
|
|
9925
9952
|
paginate: q("paginate", { type: Number }),
|
|
9926
9953
|
render: q("render", {
|
|
@@ -9934,7 +9961,7 @@ var nu = {
|
|
|
9934
9961
|
type: Boolean,
|
|
9935
9962
|
default: !1,
|
|
9936
9963
|
get(e) {
|
|
9937
|
-
return e &&
|
|
9964
|
+
return e && $n(this.schema) ? !this.isObjectSource || !this.value : !1;
|
|
9938
9965
|
}
|
|
9939
9966
|
}),
|
|
9940
9967
|
editable: q("editable", {
|
|
@@ -9977,7 +10004,7 @@ var nu = {
|
|
|
9977
10004
|
default: 1
|
|
9978
10005
|
}),
|
|
9979
10006
|
createPath() {
|
|
9980
|
-
return this.creatable ?
|
|
10007
|
+
return this.creatable ? ir(this.schema, this.context) || this.path : null;
|
|
9981
10008
|
}
|
|
9982
10009
|
},
|
|
9983
10010
|
watch: {
|
|
@@ -10015,11 +10042,11 @@ var nu = {
|
|
|
10015
10042
|
this.query = this.$route.query, this.ensureData();
|
|
10016
10043
|
},
|
|
10017
10044
|
clearData() {
|
|
10018
|
-
this.total = 0, this.
|
|
10045
|
+
this.total = 0, this.setLoadedValue(null);
|
|
10019
10046
|
},
|
|
10020
10047
|
setData(e) {
|
|
10021
10048
|
if (this.isListSource && P(e)) this.setLoadedListItems(e);
|
|
10022
|
-
else if (!e || this.isObjectSource && I(e)) this.
|
|
10049
|
+
else if (!e || this.isObjectSource && I(e)) this.setLoadedValue(e);
|
|
10023
10050
|
else if (!this.unwrapListData(e) && I(e) && this.isInView) return this.viewComponent.setData(e);
|
|
10024
10051
|
return this.value;
|
|
10025
10052
|
},
|
|
@@ -10034,7 +10061,12 @@ var nu = {
|
|
|
10034
10061
|
if (this.isListResults(e)) return this.total = e.total, this.setLoadedListItems(e.results), this.value;
|
|
10035
10062
|
},
|
|
10036
10063
|
setLoadedListItems(e) {
|
|
10037
|
-
this.
|
|
10064
|
+
this.setLoadedValue(Ir(this.sourceSchema, e, this.paginationRange));
|
|
10065
|
+
},
|
|
10066
|
+
setLoadedValue(e) {
|
|
10067
|
+
this.formModel.applyCleanChanges(() => {
|
|
10068
|
+
this.value = e;
|
|
10069
|
+
}).catch(console.error);
|
|
10038
10070
|
},
|
|
10039
10071
|
createItem(e, t, n = null) {
|
|
10040
10072
|
let r = this.createData(e, t);
|
|
@@ -10114,7 +10146,7 @@ var nu = {
|
|
|
10114
10146
|
},
|
|
10115
10147
|
async processSchema(e, t, n, r, i, a = !1, o = !1, s = null) {
|
|
10116
10148
|
yi(e, t, n);
|
|
10117
|
-
let c =
|
|
10149
|
+
let c = kn(t);
|
|
10118
10150
|
if (c && t.resource) throw Error(`Nested ${this.isListSource ? "lists" : this.isObjectSource ? "objects" : "schema"} cannot load data from their own resources`);
|
|
10119
10151
|
let l = `id${i + 1}`, u = {
|
|
10120
10152
|
api: e,
|
|
@@ -10125,16 +10157,16 @@ var nu = {
|
|
|
10125
10157
|
nested: a,
|
|
10126
10158
|
param: l
|
|
10127
10159
|
}, f = await bi(e, t, i);
|
|
10128
|
-
if (s && await s(f, i + 1),
|
|
10160
|
+
if (s && await s(f, i + 1), $n(t) && !c) {
|
|
10129
10161
|
let e = i === 0 ? "" : t.path, n = {
|
|
10130
|
-
path:
|
|
10162
|
+
path: ou(e, In(t) ? l : null),
|
|
10131
10163
|
component: Y.component(a ? "DitoFormNested" : "DitoForm"),
|
|
10132
10164
|
meta: d
|
|
10133
10165
|
};
|
|
10134
|
-
|
|
10166
|
+
Fn(t) && r.push({
|
|
10135
10167
|
...n,
|
|
10136
|
-
path:
|
|
10137
|
-
}), e &&
|
|
10168
|
+
path: ou(e, l)
|
|
10169
|
+
}), e && In(t) && r.push({
|
|
10138
10170
|
path: e,
|
|
10139
10171
|
redirect: ".",
|
|
10140
10172
|
meta: u
|
|
@@ -10151,18 +10183,18 @@ var nu = {
|
|
|
10151
10183
|
}
|
|
10152
10184
|
},
|
|
10153
10185
|
processValue({ schema: e, value: t, dataPath: n }, r) {
|
|
10154
|
-
return r.addSource(n, e),
|
|
10186
|
+
return r.addSource(n, e), $n(e) ? t : au(t);
|
|
10155
10187
|
}
|
|
10156
10188
|
};
|
|
10157
|
-
function
|
|
10189
|
+
function au(e) {
|
|
10158
10190
|
return P(e) ? e.map((e) => I(e) ? { ...e } : e) : I(e) ? { ...e } : e;
|
|
10159
10191
|
}
|
|
10160
|
-
function
|
|
10192
|
+
function ou(e, t) {
|
|
10161
10193
|
return t ? e ? `${e}/:${t}` : `:${t}` : e;
|
|
10162
10194
|
}
|
|
10163
10195
|
//#endregion
|
|
10164
10196
|
//#region src/utils/filter.js
|
|
10165
|
-
var
|
|
10197
|
+
var su = {
|
|
10166
10198
|
text(e) {
|
|
10167
10199
|
let t = [
|
|
10168
10200
|
{
|
|
@@ -10213,7 +10245,7 @@ var au = {
|
|
|
10213
10245
|
};
|
|
10214
10246
|
}
|
|
10215
10247
|
};
|
|
10216
|
-
function
|
|
10248
|
+
function cu(e, t, n, r) {
|
|
10217
10249
|
let { sticky: i, ...a } = t, o = {
|
|
10218
10250
|
type: "panel",
|
|
10219
10251
|
label: "Filters",
|
|
@@ -10221,17 +10253,17 @@ function ou(e, t, n, r) {
|
|
|
10221
10253
|
disabled: !1,
|
|
10222
10254
|
sticky: i,
|
|
10223
10255
|
data() {
|
|
10224
|
-
return
|
|
10256
|
+
return hu(o, r.value);
|
|
10225
10257
|
},
|
|
10226
|
-
components:
|
|
10227
|
-
buttons:
|
|
10228
|
-
panelButtons:
|
|
10258
|
+
components: fu(a),
|
|
10259
|
+
buttons: lu(!1),
|
|
10260
|
+
panelButtons: lu(!0),
|
|
10229
10261
|
events: { change() {
|
|
10230
10262
|
this.applyFilters();
|
|
10231
10263
|
} },
|
|
10232
10264
|
computed: {
|
|
10233
10265
|
filters() {
|
|
10234
|
-
return
|
|
10266
|
+
return mu(this.schema, this.data);
|
|
10235
10267
|
},
|
|
10236
10268
|
hasFilters() {
|
|
10237
10269
|
return this.filters.length > 0;
|
|
@@ -10252,7 +10284,7 @@ function ou(e, t, n, r) {
|
|
|
10252
10284
|
};
|
|
10253
10285
|
return vi(e, o), o;
|
|
10254
10286
|
}
|
|
10255
|
-
function
|
|
10287
|
+
function lu(e) {
|
|
10256
10288
|
return {
|
|
10257
10289
|
clear: {
|
|
10258
10290
|
type: "button",
|
|
@@ -10272,16 +10304,16 @@ function su(e) {
|
|
|
10272
10304
|
}
|
|
10273
10305
|
};
|
|
10274
10306
|
}
|
|
10275
|
-
function
|
|
10307
|
+
function uu(e) {
|
|
10276
10308
|
return `$${e}`;
|
|
10277
10309
|
}
|
|
10278
|
-
function
|
|
10310
|
+
function du(e) {
|
|
10279
10311
|
return e.startsWith("$") ? e.slice(1) : null;
|
|
10280
10312
|
}
|
|
10281
|
-
function
|
|
10313
|
+
function fu(e) {
|
|
10282
10314
|
let t = {};
|
|
10283
|
-
for (let n of Object.values(
|
|
10284
|
-
let { filter: e, width: r, ...i } = n, a = e ?
|
|
10315
|
+
for (let n of Object.values(fr(e) || {})) {
|
|
10316
|
+
let { filter: e, width: r, ...i } = n, a = e ? su[e]?.(n) : n.components;
|
|
10285
10317
|
if (a) {
|
|
10286
10318
|
i.type = "form", i.components = {};
|
|
10287
10319
|
for (let [e, t] of Object.entries(a)) if (t) {
|
|
@@ -10292,7 +10324,7 @@ function uu(e) {
|
|
|
10292
10324
|
placeholder: n
|
|
10293
10325
|
};
|
|
10294
10326
|
}
|
|
10295
|
-
t[
|
|
10327
|
+
t[uu(n.name)] = {
|
|
10296
10328
|
label: i.label ?? R(n.name),
|
|
10297
10329
|
type: "object",
|
|
10298
10330
|
width: r,
|
|
@@ -10304,21 +10336,21 @@ function uu(e) {
|
|
|
10304
10336
|
}
|
|
10305
10337
|
return t;
|
|
10306
10338
|
}
|
|
10307
|
-
function
|
|
10339
|
+
function pu(e, t) {
|
|
10308
10340
|
return e.components[t]?.form?.components;
|
|
10309
10341
|
}
|
|
10310
|
-
function
|
|
10342
|
+
function mu(e, t) {
|
|
10311
10343
|
let n = [];
|
|
10312
10344
|
for (let r in t) {
|
|
10313
10345
|
let i = t[r];
|
|
10314
10346
|
if (i) {
|
|
10315
|
-
let t = Object.keys(
|
|
10316
|
-
t.some((e) => e !== null) && n.push(`${
|
|
10347
|
+
let t = Object.keys(pu(e, r)).map((e) => i[e] ?? null);
|
|
10348
|
+
t.some((e) => e !== null) && n.push(`${du(r)}:${t.map(JSON.stringify).join(",")}`);
|
|
10317
10349
|
}
|
|
10318
10350
|
}
|
|
10319
10351
|
return n;
|
|
10320
10352
|
}
|
|
10321
|
-
function
|
|
10353
|
+
function hu(e, t) {
|
|
10322
10354
|
let n = {};
|
|
10323
10355
|
if (t) for (let e of j(t.filter)) {
|
|
10324
10356
|
let [, t, r] = e.match(/^(\w+):(.*)$/);
|
|
@@ -10328,9 +10360,9 @@ function pu(e, t) {
|
|
|
10328
10360
|
}
|
|
10329
10361
|
let r = {};
|
|
10330
10362
|
for (let t in e.components) {
|
|
10331
|
-
let i = {}, a = n[
|
|
10363
|
+
let i = {}, a = n[du(t)];
|
|
10332
10364
|
if (a) {
|
|
10333
|
-
let n =
|
|
10365
|
+
let n = pu(e, t);
|
|
10334
10366
|
if (n) {
|
|
10335
10367
|
let e = 0;
|
|
10336
10368
|
for (let t in n) i[t] = a[e++];
|
|
@@ -10342,17 +10374,17 @@ function pu(e, t) {
|
|
|
10342
10374
|
}
|
|
10343
10375
|
//#endregion
|
|
10344
10376
|
//#region src/types/DitoTypeList.vue?vue&type=template&lang.js
|
|
10345
|
-
var
|
|
10377
|
+
var gu = ["id", "aria-label"], _u = {
|
|
10346
10378
|
key: 0,
|
|
10347
10379
|
class: "dito-list__header"
|
|
10348
|
-
},
|
|
10380
|
+
}, vu = {
|
|
10349
10381
|
key: 1,
|
|
10350
10382
|
class: "dito-spacer"
|
|
10351
|
-
},
|
|
10383
|
+
}, yu = ["id"], bu = { key: 1 }, xu = ["innerHTML"], Su = ["innerHTML"], Cu = {
|
|
10352
10384
|
key: 2,
|
|
10353
10385
|
class: "dito-table__buttons"
|
|
10354
|
-
},
|
|
10355
|
-
function
|
|
10386
|
+
}, wu = { key: 1 }, Tu = ["colspan"];
|
|
10387
|
+
function Eu(e, n, r, i, a, o) {
|
|
10356
10388
|
let d = w("DitoScopes"), p = w("DitoPagination"), m = w("DitoTableHead"), h = w("DitoTableCell"), g = w("DitoSchemaInlined"), _ = w("DitoEditButtons"), ee = w("DitoDraggable");
|
|
10357
10389
|
return e.isReady ? (x(), l("div", {
|
|
10358
10390
|
key: 0,
|
|
@@ -10361,11 +10393,11 @@ function wu(e, n, r, i, a, o) {
|
|
|
10361
10393
|
role: "region",
|
|
10362
10394
|
"aria-label": e.label || e.labelize(e.schema.name)
|
|
10363
10395
|
}, [
|
|
10364
|
-
e.scopes || e.hasPagination ? (x(), l("div",
|
|
10396
|
+
e.scopes || e.hasPagination ? (x(), l("div", _u, [e.scopes ? (x(), s(d, {
|
|
10365
10397
|
key: 0,
|
|
10366
10398
|
query: e.query,
|
|
10367
10399
|
scopes: e.scopes
|
|
10368
|
-
}, null, 8, ["query", "scopes"])) : e.hasPagination ? (x(), l("div",
|
|
10400
|
+
}, null, 8, ["query", "scopes"])) : e.hasPagination ? (x(), l("div", vu)) : c("", !0), e.hasPagination ? (x(), s(p, {
|
|
10369
10401
|
key: 2,
|
|
10370
10402
|
query: e.query,
|
|
10371
10403
|
limit: e.paginate,
|
|
@@ -10421,7 +10453,7 @@ function wu(e, n, r, i, a, o) {
|
|
|
10421
10453
|
"meta",
|
|
10422
10454
|
"store",
|
|
10423
10455
|
"disabled"
|
|
10424
|
-
])) : c("", !0)], 64))), 256)) : (x(), l("td",
|
|
10456
|
+
])) : c("", !0)], 64))), 256)) : (x(), l("td", bu, [e.isInlined ? (x(), s(g, {
|
|
10425
10457
|
key: 0,
|
|
10426
10458
|
label: e.getItemLabel(e.schema, n, {
|
|
10427
10459
|
index: r,
|
|
@@ -10467,10 +10499,10 @@ function wu(e, n, r, i, a, o) {
|
|
|
10467
10499
|
}, null, 8, ["dataPath", "data"])) : e.render ? (x(), l("span", {
|
|
10468
10500
|
key: 2,
|
|
10469
10501
|
innerHTML: e.render(e.getContext(n, r))
|
|
10470
|
-
}, null, 8,
|
|
10502
|
+
}, null, 8, xu)) : (x(), l("span", {
|
|
10471
10503
|
key: 3,
|
|
10472
10504
|
innerHTML: e.getItemLabel(e.schema, n, { index: r })
|
|
10473
|
-
}, null, 8,
|
|
10505
|
+
}, null, 8, Su))])), e.hasCellEditButtons ? (x(), l("td", Cu, [f(_, {
|
|
10474
10506
|
nested: "",
|
|
10475
10507
|
schema: e.getItemFormSchema(e.schema, n, e.context),
|
|
10476
10508
|
dataPath: e.getDataPath(r),
|
|
@@ -10495,14 +10527,14 @@ function wu(e, n, r, i, a, o) {
|
|
|
10495
10527
|
"editable",
|
|
10496
10528
|
"editPath",
|
|
10497
10529
|
"onDelete"
|
|
10498
|
-
])])) : c("", !0)], 8,
|
|
10530
|
+
])])) : c("", !0)], 8, yu))), 128))]),
|
|
10499
10531
|
_: 1
|
|
10500
10532
|
}, 8, [
|
|
10501
10533
|
"options",
|
|
10502
10534
|
"draggable",
|
|
10503
10535
|
"modelValue"
|
|
10504
10536
|
]),
|
|
10505
|
-
e.hasListButtons && !e.single ? (x(), l("tfoot",
|
|
10537
|
+
e.hasListButtons && !e.single ? (x(), l("tfoot", wu, [u("tr", null, [u("td", {
|
|
10506
10538
|
class: "dito-table__buttons",
|
|
10507
10539
|
colspan: e.numColumns
|
|
10508
10540
|
}, [f(_, {
|
|
@@ -10527,7 +10559,7 @@ function wu(e, n, r, i, a, o) {
|
|
|
10527
10559
|
"disabled",
|
|
10528
10560
|
"creatable",
|
|
10529
10561
|
"createPath"
|
|
10530
|
-
])], 8,
|
|
10562
|
+
])], 8, Tu)])])) : c("", !0)
|
|
10531
10563
|
], 2),
|
|
10532
10564
|
e.hasListButtons && e.single ? (x(), s(_, {
|
|
10533
10565
|
key: 1,
|
|
@@ -10552,16 +10584,16 @@ function wu(e, n, r, i, a, o) {
|
|
|
10552
10584
|
"creatable",
|
|
10553
10585
|
"createPath"
|
|
10554
10586
|
])) : c("", !0)
|
|
10555
|
-
], 8,
|
|
10587
|
+
], 8, gu)) : c("", !0);
|
|
10556
10588
|
}
|
|
10557
|
-
var
|
|
10558
|
-
mixins: [
|
|
10589
|
+
var Du = /*#__PURE__*/ X(Q.register("list", {
|
|
10590
|
+
mixins: [iu, zc],
|
|
10559
10591
|
getSourceType(e) {
|
|
10560
10592
|
return e;
|
|
10561
10593
|
},
|
|
10562
10594
|
getPanelSchema(e, t, n, r) {
|
|
10563
10595
|
let { filters: i } = t;
|
|
10564
|
-
if (i) return
|
|
10596
|
+
if (i) return cu(e, i, n, a({
|
|
10565
10597
|
get() {
|
|
10566
10598
|
return r.query;
|
|
10567
10599
|
},
|
|
@@ -10602,7 +10634,7 @@ var Tu = /*#__PURE__*/ X(Q.register("list", {
|
|
|
10602
10634
|
getEditPath(e, t) {
|
|
10603
10635
|
if (this.editable) {
|
|
10604
10636
|
let n = this.getItemId(this.schema, e, t);
|
|
10605
|
-
return
|
|
10637
|
+
return ar(this.schema, n, this.context) || `${this.path}/${n}`;
|
|
10606
10638
|
}
|
|
10607
10639
|
return null;
|
|
10608
10640
|
},
|
|
@@ -10610,7 +10642,7 @@ var Tu = /*#__PURE__*/ X(Q.register("list", {
|
|
|
10610
10642
|
return `dito-cell--${Me(e.name)}`;
|
|
10611
10643
|
},
|
|
10612
10644
|
getContext(e, t) {
|
|
10613
|
-
return new
|
|
10645
|
+
return new G(this, {
|
|
10614
10646
|
data: e,
|
|
10615
10647
|
value: e,
|
|
10616
10648
|
index: t,
|
|
@@ -10626,26 +10658,26 @@ var Tu = /*#__PURE__*/ X(Q.register("list", {
|
|
|
10626
10658
|
await Promise.all([
|
|
10627
10659
|
di(t),
|
|
10628
10660
|
fi(t.columns),
|
|
10629
|
-
|
|
10661
|
+
iu.processSchema(e, t, n, r, i, a, o, s)
|
|
10630
10662
|
]);
|
|
10631
10663
|
}
|
|
10632
|
-
}), [["render",
|
|
10664
|
+
}), [["render", Eu]]);
|
|
10633
10665
|
//#endregion
|
|
10634
10666
|
//#region src/types/DitoTypeLabel.vue?vue&type=template&lang.js
|
|
10635
|
-
function
|
|
10667
|
+
function Ou(e, t, n, r, i, a) {
|
|
10636
10668
|
let o = w("DitoLabel");
|
|
10637
10669
|
return x(), s(o, {
|
|
10638
10670
|
class: "dito-label-component",
|
|
10639
10671
|
label: e.value
|
|
10640
10672
|
}, null, 8, ["label"]);
|
|
10641
10673
|
}
|
|
10642
|
-
var
|
|
10674
|
+
var ku = /*#__PURE__*/ X(Q.register("label", {
|
|
10643
10675
|
excludeValue: !0,
|
|
10644
10676
|
generateLabel: !1
|
|
10645
|
-
}), [["render",
|
|
10677
|
+
}), [["render", Ou]]);
|
|
10646
10678
|
//#endregion
|
|
10647
10679
|
//#region ../../node_modules/prosemirror-model/dist/index.js
|
|
10648
|
-
function
|
|
10680
|
+
function Au(e, t, n) {
|
|
10649
10681
|
for (let r = 0;; r++) {
|
|
10650
10682
|
if (r == e.childCount || r == t.childCount) return e.childCount == t.childCount ? null : n;
|
|
10651
10683
|
let i = e.child(r), a = t.child(r);
|
|
@@ -10657,16 +10689,16 @@ function Ou(e, t, n) {
|
|
|
10657
10689
|
if (i.isText && i.text != a.text) {
|
|
10658
10690
|
let e = i.text, t = a.text, r = 0;
|
|
10659
10691
|
for (; e[r] == t[r]; r++) n++;
|
|
10660
|
-
return r && r < e.length && r < t.length &&
|
|
10692
|
+
return r && r < e.length && r < t.length && Nu(e.charCodeAt(r - 1)) && Mu(e.charCodeAt(r)) && n--, n;
|
|
10661
10693
|
}
|
|
10662
10694
|
if (i.content.size || a.content.size) {
|
|
10663
|
-
let e =
|
|
10695
|
+
let e = Au(i.content, a.content, n + 1);
|
|
10664
10696
|
if (e != null) return e;
|
|
10665
10697
|
}
|
|
10666
10698
|
n += i.nodeSize;
|
|
10667
10699
|
}
|
|
10668
10700
|
}
|
|
10669
|
-
function
|
|
10701
|
+
function ju(e, t, n, r) {
|
|
10670
10702
|
for (let i = e.childCount, a = t.childCount;;) {
|
|
10671
10703
|
if (i == 0 || a == 0) return i == a ? null : {
|
|
10672
10704
|
a: n,
|
|
@@ -10684,22 +10716,22 @@ function ku(e, t, n, r) {
|
|
|
10684
10716
|
if (o.isText && o.text != s.text) {
|
|
10685
10717
|
let e = o.text, t = s.text, i = e.length, a = t.length;
|
|
10686
10718
|
for (; i > 0 && a > 0 && e[i - 1] == t[a - 1];) i--, a--, n--, r--;
|
|
10687
|
-
return i && a && i < e.length &&
|
|
10719
|
+
return i && a && i < e.length && Nu(e.charCodeAt(i - 1)) && Mu(e.charCodeAt(i)) && (n++, r++), {
|
|
10688
10720
|
a: n,
|
|
10689
10721
|
b: r
|
|
10690
10722
|
};
|
|
10691
10723
|
}
|
|
10692
10724
|
if (o.content.size || s.content.size) {
|
|
10693
|
-
let e =
|
|
10725
|
+
let e = ju(o.content, s.content, n - 1, r - 1);
|
|
10694
10726
|
if (e) return e;
|
|
10695
10727
|
}
|
|
10696
10728
|
n -= c, r -= c;
|
|
10697
10729
|
}
|
|
10698
10730
|
}
|
|
10699
|
-
function
|
|
10731
|
+
function Mu(e) {
|
|
10700
10732
|
return e >= 56320 && e < 57344;
|
|
10701
10733
|
}
|
|
10702
|
-
function
|
|
10734
|
+
function Nu(e) {
|
|
10703
10735
|
return e >= 55296 && e < 56320;
|
|
10704
10736
|
}
|
|
10705
10737
|
var $ = class e {
|
|
@@ -10786,18 +10818,18 @@ var $ = class e {
|
|
|
10786
10818
|
}
|
|
10787
10819
|
}
|
|
10788
10820
|
findDiffStart(e, t = 0) {
|
|
10789
|
-
return
|
|
10821
|
+
return Au(this, e, t);
|
|
10790
10822
|
}
|
|
10791
10823
|
findDiffEnd(e, t = this.size, n = e.size) {
|
|
10792
|
-
return
|
|
10824
|
+
return ju(this, e, t, n);
|
|
10793
10825
|
}
|
|
10794
10826
|
findIndex(e) {
|
|
10795
|
-
if (e == 0) return
|
|
10796
|
-
if (e == this.size) return
|
|
10827
|
+
if (e == 0) return Fu(0, e);
|
|
10828
|
+
if (e == this.size) return Fu(this.content.length, e);
|
|
10797
10829
|
if (e > this.size || e < 0) throw RangeError(`Position ${e} outside of fragment (${this})`);
|
|
10798
10830
|
for (let t = 0, n = 0;; t++) {
|
|
10799
10831
|
let r = this.child(t), i = n + r.nodeSize;
|
|
10800
|
-
if (i >= e) return i == e ?
|
|
10832
|
+
if (i >= e) return i == e ? Fu(t + 1, i) : Fu(t, n);
|
|
10801
10833
|
n = i;
|
|
10802
10834
|
}
|
|
10803
10835
|
}
|
|
@@ -10833,28 +10865,28 @@ var $ = class e {
|
|
|
10833
10865
|
}
|
|
10834
10866
|
};
|
|
10835
10867
|
$.empty = new $([], 0);
|
|
10836
|
-
var
|
|
10868
|
+
var Pu = {
|
|
10837
10869
|
index: 0,
|
|
10838
10870
|
offset: 0
|
|
10839
10871
|
};
|
|
10840
|
-
function
|
|
10841
|
-
return
|
|
10872
|
+
function Fu(e, t) {
|
|
10873
|
+
return Pu.index = e, Pu.offset = t, Pu;
|
|
10842
10874
|
}
|
|
10843
|
-
function
|
|
10875
|
+
function Iu(e, t) {
|
|
10844
10876
|
if (e === t) return !0;
|
|
10845
10877
|
if (!(e && typeof e == "object") || !(t && typeof t == "object")) return !1;
|
|
10846
10878
|
let n = Array.isArray(e);
|
|
10847
10879
|
if (Array.isArray(t) != n) return !1;
|
|
10848
10880
|
if (n) {
|
|
10849
10881
|
if (e.length != t.length) return !1;
|
|
10850
|
-
for (let n = 0; n < e.length; n++) if (!
|
|
10882
|
+
for (let n = 0; n < e.length; n++) if (!Iu(e[n], t[n])) return !1;
|
|
10851
10883
|
} else {
|
|
10852
|
-
for (let n in e) if (!(n in t) || !
|
|
10884
|
+
for (let n in e) if (!(n in t) || !Iu(e[n], t[n])) return !1;
|
|
10853
10885
|
for (let n in t) if (!(n in e)) return !1;
|
|
10854
10886
|
}
|
|
10855
10887
|
return !0;
|
|
10856
10888
|
}
|
|
10857
|
-
var
|
|
10889
|
+
var Lu = class e {
|
|
10858
10890
|
constructor(e, t) {
|
|
10859
10891
|
this.type = e, this.attrs = t;
|
|
10860
10892
|
}
|
|
@@ -10878,7 +10910,7 @@ var Fu = class e {
|
|
|
10878
10910
|
return !1;
|
|
10879
10911
|
}
|
|
10880
10912
|
eq(e) {
|
|
10881
|
-
return this == e || this.type == e.type &&
|
|
10913
|
+
return this == e || this.type == e.type && Iu(this.attrs, e.attrs);
|
|
10882
10914
|
}
|
|
10883
10915
|
toJSON() {
|
|
10884
10916
|
let e = { type: this.type.name };
|
|
@@ -10907,8 +10939,8 @@ var Fu = class e {
|
|
|
10907
10939
|
return n.sort((e, t) => e.type.rank - t.type.rank), n;
|
|
10908
10940
|
}
|
|
10909
10941
|
};
|
|
10910
|
-
|
|
10911
|
-
var
|
|
10942
|
+
Lu.none = [];
|
|
10943
|
+
var Ru = class extends Error {}, zu = class e {
|
|
10912
10944
|
constructor(e, t, n) {
|
|
10913
10945
|
this.content = e, this.openStart = t, this.openEnd = n;
|
|
10914
10946
|
}
|
|
@@ -10916,11 +10948,11 @@ var Iu = class extends Error {}, Lu = class e {
|
|
|
10916
10948
|
return this.content.size - this.openStart - this.openEnd;
|
|
10917
10949
|
}
|
|
10918
10950
|
insertAt(t, n) {
|
|
10919
|
-
let r =
|
|
10951
|
+
let r = Vu(this.content, t + this.openStart, n, this.openStart + 1, this.openEnd + 1);
|
|
10920
10952
|
return r && new e(r, this.openStart, this.openEnd);
|
|
10921
10953
|
}
|
|
10922
10954
|
removeBetween(t, n) {
|
|
10923
|
-
return new e(
|
|
10955
|
+
return new e(Bu(this.content, t + this.openStart, n + this.openStart), this.openStart, this.openEnd);
|
|
10924
10956
|
}
|
|
10925
10957
|
eq(e) {
|
|
10926
10958
|
return this.content.eq(e.content) && this.openStart == e.openStart && this.openEnd == e.openEnd;
|
|
@@ -10946,73 +10978,73 @@ var Iu = class extends Error {}, Lu = class e {
|
|
|
10946
10978
|
return new e(t, r, i);
|
|
10947
10979
|
}
|
|
10948
10980
|
};
|
|
10949
|
-
|
|
10950
|
-
function
|
|
10981
|
+
zu.empty = new zu($.empty, 0, 0);
|
|
10982
|
+
function Bu(e, t, n) {
|
|
10951
10983
|
let { index: r, offset: i } = e.findIndex(t), a = e.maybeChild(r), { index: o, offset: s } = e.findIndex(n);
|
|
10952
10984
|
if (i == t || a.isText) {
|
|
10953
10985
|
if (s != n && !e.child(o).isText) throw RangeError("Removing non-flat range");
|
|
10954
10986
|
return e.cut(0, t).append(e.cut(n));
|
|
10955
10987
|
}
|
|
10956
10988
|
if (r != o) throw RangeError("Removing non-flat range");
|
|
10957
|
-
return e.replaceChild(r, a.copy(
|
|
10989
|
+
return e.replaceChild(r, a.copy(Bu(a.content, t - i - 1, n - i - 1)));
|
|
10958
10990
|
}
|
|
10959
|
-
function
|
|
10991
|
+
function Vu(e, t, n, r, i, a) {
|
|
10960
10992
|
let { index: o, offset: s } = e.findIndex(t), c = e.maybeChild(o);
|
|
10961
10993
|
if (s == t || c.isText) return a && r <= 0 && i <= 0 && !a.canReplace(o, o, n) ? null : e.cut(0, t).append(n).append(e.cut(t));
|
|
10962
|
-
let l =
|
|
10994
|
+
let l = Vu(c.content, t - s - 1, n, o == 0 ? r - 1 : 0, o == e.childCount - 1 ? i - 1 : 0, c);
|
|
10963
10995
|
return l && e.replaceChild(o, c.copy(l));
|
|
10964
10996
|
}
|
|
10965
|
-
function
|
|
10966
|
-
if (n.openStart > e.depth) throw new
|
|
10967
|
-
if (e.depth - n.openStart != t.depth - n.openEnd) throw new
|
|
10968
|
-
return
|
|
10997
|
+
function Hu(e, t, n) {
|
|
10998
|
+
if (n.openStart > e.depth) throw new Ru("Inserted content deeper than insertion position");
|
|
10999
|
+
if (e.depth - n.openStart != t.depth - n.openEnd) throw new Ru("Inconsistent open depths");
|
|
11000
|
+
return Uu(e, t, n, 0);
|
|
10969
11001
|
}
|
|
10970
|
-
function
|
|
11002
|
+
function Uu(e, t, n, r) {
|
|
10971
11003
|
let i = e.index(r), a = e.node(r);
|
|
10972
11004
|
if (i == t.index(r) && r < e.depth - n.openStart) {
|
|
10973
|
-
let o =
|
|
11005
|
+
let o = Uu(e, t, n, r + 1);
|
|
10974
11006
|
return a.copy(a.content.replaceChild(i, o));
|
|
10975
11007
|
}
|
|
10976
|
-
if (!n.content.size) return
|
|
11008
|
+
if (!n.content.size) return Ju(a, Xu(e, t, r));
|
|
10977
11009
|
if (!n.openStart && !n.openEnd && e.depth == r && t.depth == r) {
|
|
10978
11010
|
let r = e.parent, i = r.content;
|
|
10979
|
-
return
|
|
11011
|
+
return Ju(r, i.cut(0, e.parentOffset).append(n.content).append(i.cut(t.parentOffset)));
|
|
10980
11012
|
}
|
|
10981
11013
|
{
|
|
10982
|
-
let { start: i, end: o } =
|
|
10983
|
-
return
|
|
11014
|
+
let { start: i, end: o } = Zu(n, e);
|
|
11015
|
+
return Ju(a, Yu(e, i, o, t, r));
|
|
10984
11016
|
}
|
|
10985
11017
|
}
|
|
10986
|
-
function
|
|
10987
|
-
if (!t.type.compatibleContent(e.type)) throw new
|
|
11018
|
+
function Wu(e, t) {
|
|
11019
|
+
if (!t.type.compatibleContent(e.type)) throw new Ru("Cannot join " + t.type.name + " onto " + e.type.name);
|
|
10988
11020
|
}
|
|
10989
|
-
function
|
|
11021
|
+
function Gu(e, t, n) {
|
|
10990
11022
|
let r = e.node(n);
|
|
10991
|
-
return
|
|
11023
|
+
return Wu(r, t.node(n)), r;
|
|
10992
11024
|
}
|
|
10993
|
-
function
|
|
11025
|
+
function Ku(e, t) {
|
|
10994
11026
|
let n = t.length - 1;
|
|
10995
11027
|
n >= 0 && e.isText && e.sameMarkup(t[n]) ? t[n] = e.withText(t[n].text + e.text) : t.push(e);
|
|
10996
11028
|
}
|
|
10997
|
-
function
|
|
11029
|
+
function qu(e, t, n, r) {
|
|
10998
11030
|
let i = (t || e).node(n), a = 0, o = t ? t.index(n) : i.childCount;
|
|
10999
|
-
e && (a = e.index(n), e.depth > n ? a++ : e.textOffset && (
|
|
11000
|
-
for (let e = a; e < o; e++)
|
|
11001
|
-
t && t.depth == n && t.textOffset &&
|
|
11031
|
+
e && (a = e.index(n), e.depth > n ? a++ : e.textOffset && (Ku(e.nodeAfter, r), a++));
|
|
11032
|
+
for (let e = a; e < o; e++) Ku(i.child(e), r);
|
|
11033
|
+
t && t.depth == n && t.textOffset && Ku(t.nodeBefore, r);
|
|
11002
11034
|
}
|
|
11003
|
-
function
|
|
11004
|
-
if (!e.type.validContent(t)) throw new
|
|
11035
|
+
function Ju(e, t) {
|
|
11036
|
+
if (!e.type.validContent(t)) throw new Ru("Invalid content for node " + e.type.name);
|
|
11005
11037
|
return e.copy(t);
|
|
11006
11038
|
}
|
|
11007
|
-
function
|
|
11008
|
-
let a = e.depth > i &&
|
|
11009
|
-
return
|
|
11039
|
+
function Yu(e, t, n, r, i) {
|
|
11040
|
+
let a = e.depth > i && Gu(e, t, i + 1), o = r.depth > i && Gu(n, r, i + 1), s = [];
|
|
11041
|
+
return qu(null, e, i, s), a && o && t.index(i) == n.index(i) ? (Wu(a, o), Ku(Ju(a, Yu(e, t, n, r, i + 1)), s)) : (a && Ku(Ju(a, Xu(e, t, i + 1)), s), qu(t, n, i, s), o && Ku(Ju(o, Xu(n, r, i + 1)), s)), qu(r, null, i, s), new $(s);
|
|
11010
11042
|
}
|
|
11011
|
-
function
|
|
11043
|
+
function Xu(e, t, n) {
|
|
11012
11044
|
let r = [];
|
|
11013
|
-
return
|
|
11045
|
+
return qu(null, e, n, r), e.depth > n && Ku(Ju(Gu(e, t, n + 1), Xu(e, t, n + 1)), r), qu(t, null, n, r), new $(r);
|
|
11014
11046
|
}
|
|
11015
|
-
function
|
|
11047
|
+
function Zu(e, t) {
|
|
11016
11048
|
let n = t.depth - e.openStart, r = t.node(n).copy(e.content);
|
|
11017
11049
|
for (let e = n - 1; e >= 0; e--) r = t.node(e).copy($.from(r));
|
|
11018
11050
|
return {
|
|
@@ -11020,7 +11052,7 @@ function Yu(e, t) {
|
|
|
11020
11052
|
end: r.resolveNoCache(r.content.size - e.openEnd - n)
|
|
11021
11053
|
};
|
|
11022
11054
|
}
|
|
11023
|
-
var
|
|
11055
|
+
var Qu = class e {
|
|
11024
11056
|
constructor(e, t, n) {
|
|
11025
11057
|
this.pos = e, this.path = t, this.parentOffset = n, this.depth = t.length / 3 - 1;
|
|
11026
11058
|
}
|
|
@@ -11077,7 +11109,7 @@ var Xu = class e {
|
|
|
11077
11109
|
}
|
|
11078
11110
|
marks() {
|
|
11079
11111
|
let e = this.parent, t = this.index();
|
|
11080
|
-
if (e.content.size == 0) return
|
|
11112
|
+
if (e.content.size == 0) return Lu.none;
|
|
11081
11113
|
if (this.textOffset) return e.child(t).marks;
|
|
11082
11114
|
let n = e.maybeChild(t - 1), r = e.maybeChild(t);
|
|
11083
11115
|
if (!n) {
|
|
@@ -11101,7 +11133,7 @@ var Xu = class e {
|
|
|
11101
11133
|
}
|
|
11102
11134
|
blockRange(e = this, t) {
|
|
11103
11135
|
if (e.pos < this.pos) return e.blockRange(this);
|
|
11104
|
-
for (let n = this.depth - (this.parent.inlineContent || this.pos == e.pos ? 1 : 0); n >= 0; n--) if (e.pos <= this.end(n) && (!t || t(this.node(n)))) return new
|
|
11136
|
+
for (let n = this.depth - (this.parent.inlineContent || this.pos == e.pos ? 1 : 0); n >= 0; n--) if (e.pos <= this.end(n) && (!t || t(this.node(n)))) return new nd(this, e, n);
|
|
11105
11137
|
return null;
|
|
11106
11138
|
}
|
|
11107
11139
|
sameParent(e) {
|
|
@@ -11129,20 +11161,20 @@ var Xu = class e {
|
|
|
11129
11161
|
return new e(n, r, a);
|
|
11130
11162
|
}
|
|
11131
11163
|
static resolveCached(t, n) {
|
|
11132
|
-
let r =
|
|
11164
|
+
let r = td.get(t);
|
|
11133
11165
|
if (r) for (let e = 0; e < r.elts.length; e++) {
|
|
11134
11166
|
let t = r.elts[e];
|
|
11135
11167
|
if (t.pos == n) return t;
|
|
11136
11168
|
}
|
|
11137
|
-
else
|
|
11169
|
+
else td.set(t, r = new $u());
|
|
11138
11170
|
let i = r.elts[r.i] = e.resolve(t, n);
|
|
11139
|
-
return r.i = (r.i + 1) %
|
|
11171
|
+
return r.i = (r.i + 1) % ed, i;
|
|
11140
11172
|
}
|
|
11141
|
-
},
|
|
11173
|
+
}, $u = class {
|
|
11142
11174
|
constructor() {
|
|
11143
11175
|
this.elts = [], this.i = 0;
|
|
11144
11176
|
}
|
|
11145
|
-
},
|
|
11177
|
+
}, ed = 12, td = /* @__PURE__ */ new WeakMap(), nd = class {
|
|
11146
11178
|
constructor(e, t, n) {
|
|
11147
11179
|
this.$from = e, this.$to = t, this.depth = n;
|
|
11148
11180
|
}
|
|
@@ -11161,8 +11193,8 @@ var Xu = class e {
|
|
|
11161
11193
|
get endIndex() {
|
|
11162
11194
|
return this.$to.indexAfter(this.depth);
|
|
11163
11195
|
}
|
|
11164
|
-
},
|
|
11165
|
-
constructor(e, t, n, r =
|
|
11196
|
+
}, rd = Object.create(null), id = class e {
|
|
11197
|
+
constructor(e, t, n, r = Lu.none) {
|
|
11166
11198
|
this.type = e, this.attrs = t, this.marks = r, this.content = n || $.empty;
|
|
11167
11199
|
}
|
|
11168
11200
|
get children() {
|
|
@@ -11208,7 +11240,7 @@ var Xu = class e {
|
|
|
11208
11240
|
return this.hasMarkup(e.type, e.attrs, e.marks);
|
|
11209
11241
|
}
|
|
11210
11242
|
hasMarkup(e, t, n) {
|
|
11211
|
-
return this.type == e &&
|
|
11243
|
+
return this.type == e && Iu(this.attrs, t || e.defaultAttrs || rd) && Lu.sameSet(this.marks, n || Lu.none);
|
|
11212
11244
|
}
|
|
11213
11245
|
copy(t = null) {
|
|
11214
11246
|
return t == this.content ? this : new e(this.type, this.attrs, t, this.marks);
|
|
@@ -11220,12 +11252,12 @@ var Xu = class e {
|
|
|
11220
11252
|
return e == 0 && t == this.content.size ? this : this.copy(this.content.cut(e, t));
|
|
11221
11253
|
}
|
|
11222
11254
|
slice(e, t = this.content.size, n = !1) {
|
|
11223
|
-
if (e == t) return
|
|
11255
|
+
if (e == t) return zu.empty;
|
|
11224
11256
|
let r = this.resolve(e), i = this.resolve(t), a = n ? 0 : r.sharedDepth(t), o = r.start(a);
|
|
11225
|
-
return new
|
|
11257
|
+
return new zu(r.node(a).content.cut(r.pos - o, i.pos - o), r.depth - a, i.depth - a);
|
|
11226
11258
|
}
|
|
11227
11259
|
replace(e, t, n) {
|
|
11228
|
-
return
|
|
11260
|
+
return Hu(this.resolve(e), this.resolve(t), n);
|
|
11229
11261
|
}
|
|
11230
11262
|
nodeAt(e) {
|
|
11231
11263
|
for (let t = this;;) {
|
|
@@ -11263,10 +11295,10 @@ var Xu = class e {
|
|
|
11263
11295
|
};
|
|
11264
11296
|
}
|
|
11265
11297
|
resolve(e) {
|
|
11266
|
-
return
|
|
11298
|
+
return Qu.resolveCached(this, e);
|
|
11267
11299
|
}
|
|
11268
11300
|
resolveNoCache(e) {
|
|
11269
|
-
return
|
|
11301
|
+
return Qu.resolve(this, e);
|
|
11270
11302
|
}
|
|
11271
11303
|
rangeHasMark(e, t, n) {
|
|
11272
11304
|
let r = !1;
|
|
@@ -11296,7 +11328,7 @@ var Xu = class e {
|
|
|
11296
11328
|
toString() {
|
|
11297
11329
|
if (this.type.spec.toDebugString) return this.type.spec.toDebugString(this);
|
|
11298
11330
|
let e = this.type.name;
|
|
11299
|
-
return this.content.size && (e += "(" + this.content.toStringInner() + ")"),
|
|
11331
|
+
return this.content.size && (e += "(" + this.content.toStringInner() + ")"), ad(this.marks, e);
|
|
11300
11332
|
}
|
|
11301
11333
|
contentMatchAt(e) {
|
|
11302
11334
|
let t = this.type.contentMatch.matchFragment(this.content, 0, e);
|
|
@@ -11318,13 +11350,13 @@ var Xu = class e {
|
|
|
11318
11350
|
return e.content.size ? this.canReplace(this.childCount, this.childCount, e.content) : this.type.compatibleContent(e.type);
|
|
11319
11351
|
}
|
|
11320
11352
|
check() {
|
|
11321
|
-
this.type.checkContent(this.content),
|
|
11322
|
-
let e =
|
|
11353
|
+
this.type.checkContent(this.content), od(this.type.attrs, this.attrs, "node", this.type.name);
|
|
11354
|
+
let e = Lu.none;
|
|
11323
11355
|
for (let t = 0; t < this.marks.length; t++) {
|
|
11324
11356
|
let n = this.marks[t];
|
|
11325
|
-
|
|
11357
|
+
od(n.type.attrs, n.attrs, "mark", n.type.name), e = n.addToSet(e);
|
|
11326
11358
|
}
|
|
11327
|
-
if (!
|
|
11359
|
+
if (!Lu.sameSet(e, this.marks)) throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((e) => e.type.name)}`);
|
|
11328
11360
|
this.content.forEach((e) => e.check());
|
|
11329
11361
|
}
|
|
11330
11362
|
toJSON() {
|
|
@@ -11350,26 +11382,26 @@ var Xu = class e {
|
|
|
11350
11382
|
return e.nodeType(t.type).create(t.attrs, r, n);
|
|
11351
11383
|
}
|
|
11352
11384
|
};
|
|
11353
|
-
|
|
11354
|
-
function
|
|
11385
|
+
id.prototype.text = void 0;
|
|
11386
|
+
function ad(e, t) {
|
|
11355
11387
|
for (let n = e.length - 1; n >= 0; n--) t = e[n].type.name + "(" + t + ")";
|
|
11356
11388
|
return t;
|
|
11357
11389
|
}
|
|
11358
|
-
function
|
|
11390
|
+
function od(e, t, n, r) {
|
|
11359
11391
|
for (let i in t) if (!(i in e)) throw RangeError(`Unsupported attribute ${i} for ${n} of type ${r}`);
|
|
11360
11392
|
for (let n in e) e[n].validate && e[n].validate(t[n]);
|
|
11361
11393
|
}
|
|
11362
|
-
var
|
|
11394
|
+
var sd = class e {
|
|
11363
11395
|
constructor(e) {
|
|
11364
11396
|
this.validEnd = e, this.next = [], this.wrapCache = [];
|
|
11365
11397
|
}
|
|
11366
11398
|
static parse(t, n) {
|
|
11367
|
-
let r = new
|
|
11399
|
+
let r = new cd(t, n);
|
|
11368
11400
|
if (r.next == null) return e.empty;
|
|
11369
|
-
let i =
|
|
11401
|
+
let i = ld(r);
|
|
11370
11402
|
r.next && r.err("Unexpected trailing text");
|
|
11371
|
-
let a =
|
|
11372
|
-
return
|
|
11403
|
+
let a = yd(gd(i));
|
|
11404
|
+
return bd(a, r), a;
|
|
11373
11405
|
}
|
|
11374
11406
|
matchType(e) {
|
|
11375
11407
|
for (let t = 0; t < this.next.length; t++) if (this.next[t].type == e) return this.next[t].next;
|
|
@@ -11460,8 +11492,8 @@ var ad = class e {
|
|
|
11460
11492
|
}).join("\n");
|
|
11461
11493
|
}
|
|
11462
11494
|
};
|
|
11463
|
-
|
|
11464
|
-
var
|
|
11495
|
+
sd.empty = new sd(!0);
|
|
11496
|
+
var cd = class {
|
|
11465
11497
|
constructor(e, t) {
|
|
11466
11498
|
this.string = e, this.nodeTypes = t, this.inline = null, this.pos = 0, this.tokens = e.split(/\s*(?=\b|\W|$)/), this.tokens[this.tokens.length - 1] == "" && this.tokens.pop(), this.tokens[0] == "" && this.tokens.shift();
|
|
11467
11499
|
}
|
|
@@ -11475,28 +11507,28 @@ var od = class {
|
|
|
11475
11507
|
throw SyntaxError(e + " (in content expression '" + this.string + "')");
|
|
11476
11508
|
}
|
|
11477
11509
|
};
|
|
11478
|
-
function
|
|
11510
|
+
function ld(e) {
|
|
11479
11511
|
let t = [];
|
|
11480
11512
|
do
|
|
11481
|
-
t.push(
|
|
11513
|
+
t.push(ud(e));
|
|
11482
11514
|
while (e.eat("|"));
|
|
11483
11515
|
return t.length == 1 ? t[0] : {
|
|
11484
11516
|
type: "choice",
|
|
11485
11517
|
exprs: t
|
|
11486
11518
|
};
|
|
11487
11519
|
}
|
|
11488
|
-
function
|
|
11520
|
+
function ud(e) {
|
|
11489
11521
|
let t = [];
|
|
11490
11522
|
do
|
|
11491
|
-
t.push(
|
|
11523
|
+
t.push(dd(e));
|
|
11492
11524
|
while (e.next && e.next != ")" && e.next != "|");
|
|
11493
11525
|
return t.length == 1 ? t[0] : {
|
|
11494
11526
|
type: "seq",
|
|
11495
11527
|
exprs: t
|
|
11496
11528
|
};
|
|
11497
11529
|
}
|
|
11498
|
-
function
|
|
11499
|
-
let t =
|
|
11530
|
+
function dd(e) {
|
|
11531
|
+
let t = hd(e);
|
|
11500
11532
|
for (;;) if (e.eat("+")) t = {
|
|
11501
11533
|
type: "plus",
|
|
11502
11534
|
expr: t
|
|
@@ -11509,25 +11541,25 @@ function ld(e) {
|
|
|
11509
11541
|
type: "opt",
|
|
11510
11542
|
expr: t
|
|
11511
11543
|
};
|
|
11512
|
-
else if (e.eat("{")) t =
|
|
11544
|
+
else if (e.eat("{")) t = pd(e, t);
|
|
11513
11545
|
else break;
|
|
11514
11546
|
return t;
|
|
11515
11547
|
}
|
|
11516
|
-
function
|
|
11548
|
+
function fd(e) {
|
|
11517
11549
|
/\D/.test(e.next) && e.err("Expected number, got '" + e.next + "'");
|
|
11518
11550
|
let t = Number(e.next);
|
|
11519
11551
|
return e.pos++, t;
|
|
11520
11552
|
}
|
|
11521
|
-
function
|
|
11522
|
-
let n =
|
|
11523
|
-
return e.eat(",") && (r = e.next == "}" ? -1 :
|
|
11553
|
+
function pd(e, t) {
|
|
11554
|
+
let n = fd(e), r = n;
|
|
11555
|
+
return e.eat(",") && (r = e.next == "}" ? -1 : fd(e)), e.eat("}") || e.err("Unclosed braced range"), {
|
|
11524
11556
|
type: "range",
|
|
11525
11557
|
min: n,
|
|
11526
11558
|
max: r,
|
|
11527
11559
|
expr: t
|
|
11528
11560
|
};
|
|
11529
11561
|
}
|
|
11530
|
-
function
|
|
11562
|
+
function md(e, t) {
|
|
11531
11563
|
let n = e.nodeTypes, r = n[t];
|
|
11532
11564
|
if (r) return [r];
|
|
11533
11565
|
let i = [];
|
|
@@ -11537,14 +11569,14 @@ function fd(e, t) {
|
|
|
11537
11569
|
}
|
|
11538
11570
|
return i.length == 0 && e.err("No node type or group '" + t + "' found"), i;
|
|
11539
11571
|
}
|
|
11540
|
-
function
|
|
11572
|
+
function hd(e) {
|
|
11541
11573
|
if (e.eat("(")) {
|
|
11542
|
-
let t =
|
|
11574
|
+
let t = ld(e);
|
|
11543
11575
|
return e.eat(")") || e.err("Missing closing paren"), t;
|
|
11544
11576
|
}
|
|
11545
11577
|
if (/\W/.test(e.next)) e.err("Unexpected token '" + e.next + "'");
|
|
11546
11578
|
else {
|
|
11547
|
-
let t =
|
|
11579
|
+
let t = md(e, e.next).map((t) => (e.inline == null ? e.inline = t.isInline : e.inline != t.isInline && e.err("Mixing inline and block content"), {
|
|
11548
11580
|
type: "name",
|
|
11549
11581
|
value: t
|
|
11550
11582
|
}));
|
|
@@ -11554,7 +11586,7 @@ function pd(e) {
|
|
|
11554
11586
|
};
|
|
11555
11587
|
}
|
|
11556
11588
|
}
|
|
11557
|
-
function
|
|
11589
|
+
function gd(e) {
|
|
11558
11590
|
let t = [[]];
|
|
11559
11591
|
return i(a(e, 0), n()), t;
|
|
11560
11592
|
function n() {
|
|
@@ -11600,12 +11632,12 @@ function md(e) {
|
|
|
11600
11632
|
else throw Error("Unknown expr type");
|
|
11601
11633
|
}
|
|
11602
11634
|
}
|
|
11603
|
-
function
|
|
11635
|
+
function _d(e, t) {
|
|
11604
11636
|
return t - e;
|
|
11605
11637
|
}
|
|
11606
|
-
function
|
|
11638
|
+
function vd(e, t) {
|
|
11607
11639
|
let n = [];
|
|
11608
|
-
return r(t), n.sort(
|
|
11640
|
+
return r(t), n.sort(_d);
|
|
11609
11641
|
function r(t) {
|
|
11610
11642
|
let i = e[t];
|
|
11611
11643
|
if (i.length == 1 && !i[0].term) return r(i[0].to);
|
|
@@ -11616,9 +11648,9 @@ function gd(e, t) {
|
|
|
11616
11648
|
}
|
|
11617
11649
|
}
|
|
11618
11650
|
}
|
|
11619
|
-
function
|
|
11651
|
+
function yd(e) {
|
|
11620
11652
|
let t = Object.create(null);
|
|
11621
|
-
return n(
|
|
11653
|
+
return n(vd(e, 0));
|
|
11622
11654
|
function n(r) {
|
|
11623
11655
|
let i = [];
|
|
11624
11656
|
r.forEach((t) => {
|
|
@@ -11626,14 +11658,14 @@ function _d(e) {
|
|
|
11626
11658
|
if (!t) return;
|
|
11627
11659
|
let r;
|
|
11628
11660
|
for (let e = 0; e < i.length; e++) i[e][0] == t && (r = i[e][1]);
|
|
11629
|
-
|
|
11661
|
+
vd(e, n).forEach((e) => {
|
|
11630
11662
|
r || i.push([t, r = []]), r.indexOf(e) == -1 && r.push(e);
|
|
11631
11663
|
});
|
|
11632
11664
|
});
|
|
11633
11665
|
});
|
|
11634
|
-
let a = t[r.join(",")] = new
|
|
11666
|
+
let a = t[r.join(",")] = new sd(r.indexOf(e.length - 1) > -1);
|
|
11635
11667
|
for (let e = 0; e < i.length; e++) {
|
|
11636
|
-
let r = i[e][1].sort(
|
|
11668
|
+
let r = i[e][1].sort(_d);
|
|
11637
11669
|
a.next.push({
|
|
11638
11670
|
type: i[e][0],
|
|
11639
11671
|
next: t[r.join(",")] || n(r)
|
|
@@ -11642,7 +11674,7 @@ function _d(e) {
|
|
|
11642
11674
|
return a;
|
|
11643
11675
|
}
|
|
11644
11676
|
}
|
|
11645
|
-
function
|
|
11677
|
+
function bd(e, t) {
|
|
11646
11678
|
for (let n = 0, r = [e]; n < r.length; n++) {
|
|
11647
11679
|
let e = r[n], i = !e.validEnd, a = [];
|
|
11648
11680
|
for (let t = 0; t < e.next.length; t++) {
|
|
@@ -11654,27 +11686,27 @@ function vd(e, t) {
|
|
|
11654
11686
|
}
|
|
11655
11687
|
//#endregion
|
|
11656
11688
|
//#region src/types/DitoTypeMarkup.vue?vue&type=template&lang.js
|
|
11657
|
-
var
|
|
11689
|
+
var xd = ["id"], Sd = {
|
|
11658
11690
|
key: 0,
|
|
11659
11691
|
class: "dito-buttons dito-buttons--toolbar"
|
|
11660
|
-
},
|
|
11692
|
+
}, Cd = { class: "dito-buttons__group" }, wd = [
|
|
11661
11693
|
"aria-label",
|
|
11662
11694
|
"aria-pressed",
|
|
11663
11695
|
"onClick"
|
|
11664
11696
|
];
|
|
11665
|
-
function
|
|
11697
|
+
function Td(e, n, r, i, a, o) {
|
|
11666
11698
|
let s = w("DitoIcon"), u = w("EditorContent");
|
|
11667
11699
|
return x(), l("div", {
|
|
11668
11700
|
class: "dito-markup",
|
|
11669
11701
|
id: e.componentPath
|
|
11670
11702
|
}, [
|
|
11671
|
-
e.groupedButtons.length > 0 ? (x(), l("div",
|
|
11703
|
+
e.groupedButtons.length > 0 ? (x(), l("div", Sd, [(x(!0), l(t, null, S(e.groupedButtons, (e) => (x(), l("div", Cd, [(x(!0), l(t, null, S(e, ({ id: e, label: t, icon: n, isActive: r, onClick: i }) => (x(), l("button", {
|
|
11672
11704
|
class: y(["dito-button", { "dito-button--active": r }]),
|
|
11673
11705
|
key: e,
|
|
11674
11706
|
"aria-label": t,
|
|
11675
11707
|
"aria-pressed": r,
|
|
11676
11708
|
onClick: i
|
|
11677
|
-
}, [f(s, { name: n }, null, 8, ["name"])], 10,
|
|
11709
|
+
}, [f(s, { name: n }, null, 8, ["name"])], 10, wd))), 128))]))), 256))])) : c("", !0),
|
|
11678
11710
|
f(u, {
|
|
11679
11711
|
class: "dito-markup-editor",
|
|
11680
11712
|
ref: "editor",
|
|
@@ -11686,11 +11718,11 @@ function Cd(e, n, r, i, a, o) {
|
|
|
11686
11718
|
class: "dito-resize",
|
|
11687
11719
|
onMousedown: n[0] ||= A((...t) => e.onDragResize && e.onDragResize(...t), ["stop", "prevent"])
|
|
11688
11720
|
}, null, 32)) : c("", !0)
|
|
11689
|
-
], 8,
|
|
11721
|
+
], 8, xd);
|
|
11690
11722
|
}
|
|
11691
11723
|
//#endregion
|
|
11692
11724
|
//#region src/types/DitoTypeMarkup.vue
|
|
11693
|
-
var
|
|
11725
|
+
var Ed = Q.register("markup", {
|
|
11694
11726
|
mixins: [mo],
|
|
11695
11727
|
components: {
|
|
11696
11728
|
EditorContent: pt,
|
|
@@ -11784,7 +11816,7 @@ var wd = Q.register("markup", {
|
|
|
11784
11816
|
i > 0 && t.type.name === "paragraph" && r.push(e.state.schema.nodes.hardBreak.create()), t.type.name === "paragraph" ? t.content.forEach((e) => r.push(e)) : r.push(t);
|
|
11785
11817
|
});
|
|
11786
11818
|
let i = e.state.schema.nodes.paragraph.create(null, $.from(r));
|
|
11787
|
-
return e.dispatch(e.state.tr.replaceSelection(new
|
|
11819
|
+
return e.dispatch(e.state.tr.replaceSelection(new zu($.from(i), 0, 0))), !0;
|
|
11788
11820
|
} } : {}
|
|
11789
11821
|
};
|
|
11790
11822
|
},
|
|
@@ -11814,12 +11846,14 @@ var wd = Q.register("markup", {
|
|
|
11814
11846
|
},
|
|
11815
11847
|
created() {
|
|
11816
11848
|
let e = !1, t = !1, n = () => this.onFocus(), r = () => {
|
|
11817
|
-
o(), this.onBlur();
|
|
11849
|
+
o(), this.onBlur(), s();
|
|
11818
11850
|
}, i = () => {
|
|
11819
11851
|
a(), this.onInput();
|
|
11820
11852
|
}, a = Ce(() => o(), 100), o = () => {
|
|
11821
11853
|
let n = this.editor.getHTML(), r = this.hardBreak ? n.replace(/^<p>(.*?)<\/p>$/s, "$1") : n;
|
|
11822
|
-
r !== this.value && (e = !0, t = !0, this.value = r),
|
|
11854
|
+
r !== this.value && (e = !0, t = !0, this.value = r), this.focused || s();
|
|
11855
|
+
}, s = () => {
|
|
11856
|
+
e && (e = !1, this.onChange());
|
|
11823
11857
|
};
|
|
11824
11858
|
this.$watch("value", (e) => {
|
|
11825
11859
|
if (t) t = !1;
|
|
@@ -11905,11 +11939,11 @@ var wd = Q.register("markup", {
|
|
|
11905
11939
|
e.italic && bt,
|
|
11906
11940
|
e.underline && Tt,
|
|
11907
11941
|
e.strike && St,
|
|
11908
|
-
e.small &&
|
|
11942
|
+
e.small && Dd,
|
|
11909
11943
|
e.code && yt,
|
|
11910
11944
|
e.subscript && wt,
|
|
11911
11945
|
e.superscript && Ct,
|
|
11912
|
-
e.link &&
|
|
11946
|
+
e.link && Od,
|
|
11913
11947
|
t.blockquote && Et,
|
|
11914
11948
|
t.codeBlock && Dt,
|
|
11915
11949
|
t.heading && kt.configure({ levels: t.heading }),
|
|
@@ -11981,7 +12015,7 @@ var wd = Q.register("markup", {
|
|
|
11981
12015
|
this.editor.commands.blur();
|
|
11982
12016
|
}
|
|
11983
12017
|
}
|
|
11984
|
-
}),
|
|
12018
|
+
}), Dd = mt.create({
|
|
11985
12019
|
name: "small",
|
|
11986
12020
|
parseHTML() {
|
|
11987
12021
|
return [{ tag: "small" }];
|
|
@@ -11996,7 +12030,7 @@ var wd = Q.register("markup", {
|
|
|
11996
12030
|
unsetSmall: () => ({ commands: e }) => e.unsetMark(this.name)
|
|
11997
12031
|
};
|
|
11998
12032
|
}
|
|
11999
|
-
}),
|
|
12033
|
+
}), Od = xt.extend({
|
|
12000
12034
|
inclusive: !1,
|
|
12001
12035
|
addAttributes() {
|
|
12002
12036
|
return {
|
|
@@ -12020,10 +12054,10 @@ var wd = Q.register("markup", {
|
|
|
12020
12054
|
0
|
|
12021
12055
|
];
|
|
12022
12056
|
}
|
|
12023
|
-
}),
|
|
12024
|
-
function
|
|
12057
|
+
}), kd = /*#__PURE__*/ X(Ed, [["render", Td]]), Ad = { class: "dito-multiselect" }, jd = { class: "dito-multiselect__inner" };
|
|
12058
|
+
function Md(e, t, n, r, i, a) {
|
|
12025
12059
|
let o = w("DitoAffixes"), d = w("VueMultiselect"), p = w("DitoEditButtons");
|
|
12026
|
-
return x(), l("div",
|
|
12060
|
+
return x(), l("div", Ad, [u("div", jd, [
|
|
12027
12061
|
f(o, {
|
|
12028
12062
|
items: e.schema.prefix,
|
|
12029
12063
|
position: "prefix",
|
|
@@ -12126,8 +12160,8 @@ function Ad(e, t, n, r, i, a) {
|
|
|
12126
12160
|
"editPath"
|
|
12127
12161
|
])) : c("", !0)]);
|
|
12128
12162
|
}
|
|
12129
|
-
var
|
|
12130
|
-
mixins: [
|
|
12163
|
+
var Nd = /*#__PURE__*/ X(Q.register("multiselect", {
|
|
12164
|
+
mixins: [Ml],
|
|
12131
12165
|
components: {
|
|
12132
12166
|
DitoAffixes: Z,
|
|
12133
12167
|
VueMultiselect: zt
|
|
@@ -12218,7 +12252,7 @@ var jd = /*#__PURE__*/ X(Q.register("multiselect", {
|
|
|
12218
12252
|
},
|
|
12219
12253
|
async loadSearchedOptions(e) {
|
|
12220
12254
|
try {
|
|
12221
|
-
return await this.optionsResolver.waitForValue(), await this.searchFilter(new
|
|
12255
|
+
return await this.optionsResolver.waitForValue(), await this.searchFilter(new G(this, { searchTerm: e }));
|
|
12222
12256
|
} catch (e) {
|
|
12223
12257
|
return this.addError(e.message || e), null;
|
|
12224
12258
|
}
|
|
@@ -12235,13 +12269,13 @@ var jd = /*#__PURE__*/ X(Q.register("multiselect", {
|
|
|
12235
12269
|
}
|
|
12236
12270
|
}
|
|
12237
12271
|
}
|
|
12238
|
-
}), [["render",
|
|
12272
|
+
}), [["render", Md]]), Pd = {
|
|
12239
12273
|
getTypeValidations(e, t) {
|
|
12240
|
-
let n = e.type === "integer", r = (n) =>
|
|
12274
|
+
let n = e.type === "integer", r = (n) => _r(n, {
|
|
12241
12275
|
type: Number,
|
|
12242
12276
|
schema: e,
|
|
12243
12277
|
context: t
|
|
12244
|
-
}), i = (e, t) => n && e != null ? t(e) : e, a =
|
|
12278
|
+
}), i = (e, t) => n && e != null ? t(e) : e, a = _r("range", {
|
|
12245
12279
|
type: Array,
|
|
12246
12280
|
schema: e,
|
|
12247
12281
|
context: t
|
|
@@ -12301,7 +12335,7 @@ var jd = /*#__PURE__*/ X(Q.register("multiselect", {
|
|
|
12301
12335
|
};
|
|
12302
12336
|
//#endregion
|
|
12303
12337
|
//#region src/types/DitoTypeNumber.vue?vue&type=template&lang.js
|
|
12304
|
-
function
|
|
12338
|
+
function Fd(e, t, n, r, i, a) {
|
|
12305
12339
|
let o = w("DitoAffixes"), c = w("DitoInput");
|
|
12306
12340
|
return x(), s(c, v({
|
|
12307
12341
|
class: "dito-number",
|
|
@@ -12352,8 +12386,8 @@ function Nd(e, t, n, r, i, a) {
|
|
|
12352
12386
|
"step"
|
|
12353
12387
|
]);
|
|
12354
12388
|
}
|
|
12355
|
-
var
|
|
12356
|
-
mixins: [
|
|
12389
|
+
var Id = /*#__PURE__*/ X(Q.register(["number", "integer"], {
|
|
12390
|
+
mixins: [Pd],
|
|
12357
12391
|
components: {
|
|
12358
12392
|
DitoInput: Da,
|
|
12359
12393
|
DitoAffixes: Z
|
|
@@ -12363,17 +12397,17 @@ var Pd = /*#__PURE__*/ X(Q.register(["number", "integer"], {
|
|
|
12363
12397
|
computed: { isInteger() {
|
|
12364
12398
|
return this.type === "integer";
|
|
12365
12399
|
} }
|
|
12366
|
-
}), [["render",
|
|
12400
|
+
}), [["render", Fd]]), Ld = ["id"], Rd = {
|
|
12367
12401
|
key: 0,
|
|
12368
12402
|
class: "dito-object-content"
|
|
12369
|
-
},
|
|
12370
|
-
function
|
|
12403
|
+
}, zd = ["innerHTML"], Bd = ["innerHTML"];
|
|
12404
|
+
function Vd(e, t, n, r, i, a) {
|
|
12371
12405
|
let o = w("DitoSchemaInlined"), u = w("DitoEditButtons");
|
|
12372
12406
|
return e.isReady ? (x(), l("div", {
|
|
12373
12407
|
key: 0,
|
|
12374
12408
|
class: "dito-object",
|
|
12375
12409
|
id: e.componentPath
|
|
12376
|
-
}, [e.objectData ? (x(), l("div",
|
|
12410
|
+
}, [e.objectData ? (x(), l("div", Rd, [e.isInlined ? (x(), s(o, {
|
|
12377
12411
|
key: 0,
|
|
12378
12412
|
label: e.objectLabel,
|
|
12379
12413
|
schema: e.getItemFormSchema(e.schema, e.objectData, e.context),
|
|
@@ -12407,10 +12441,10 @@ function zd(e, t, n, r, i, a) {
|
|
|
12407
12441
|
}, null, 8, ["dataPath", "data"])) : e.render ? (x(), l("span", {
|
|
12408
12442
|
key: 2,
|
|
12409
12443
|
innerHTML: e.render(e.getContext())
|
|
12410
|
-
}, null, 8,
|
|
12444
|
+
}, null, 8, zd)) : (x(), l("span", {
|
|
12411
12445
|
key: 3,
|
|
12412
12446
|
innerHTML: e.getItemLabel(e.schema, e.objectData)
|
|
12413
|
-
}, null, 8,
|
|
12447
|
+
}, null, 8, Bd))])) : c("", !0), f(u, {
|
|
12414
12448
|
buttons: e.buttonSchemas,
|
|
12415
12449
|
schema: e.schema,
|
|
12416
12450
|
dataPath: e.dataPath,
|
|
@@ -12439,10 +12473,10 @@ function zd(e, t, n, r, i, a) {
|
|
|
12439
12473
|
"editable",
|
|
12440
12474
|
"editPath",
|
|
12441
12475
|
"deletable"
|
|
12442
|
-
])], 8,
|
|
12476
|
+
])], 8, Ld)) : c("", !0);
|
|
12443
12477
|
}
|
|
12444
|
-
var
|
|
12445
|
-
mixins: [
|
|
12478
|
+
var Hd = /*#__PURE__*/ X(Q.register("object", {
|
|
12479
|
+
mixins: [iu],
|
|
12446
12480
|
getSourceType(e) {
|
|
12447
12481
|
return e;
|
|
12448
12482
|
},
|
|
@@ -12450,12 +12484,12 @@ var Bd = /*#__PURE__*/ X(Q.register("object", {
|
|
|
12450
12484
|
return this.collapsible ? this.getItemLabel(this.schema, this.objectData, { asObject: !0 }) : null;
|
|
12451
12485
|
} },
|
|
12452
12486
|
methods: { getContext() {
|
|
12453
|
-
return new
|
|
12487
|
+
return new G(this, { data: this.objectData });
|
|
12454
12488
|
} },
|
|
12455
12489
|
async processSchema(e, t, n, r, i, a = !1, o = !1, s = null) {
|
|
12456
|
-
await Promise.all([di(t),
|
|
12490
|
+
await Promise.all([di(t), iu.processSchema(e, t, n, r, i, a, o, s)]);
|
|
12457
12491
|
}
|
|
12458
|
-
}), [["render",
|
|
12492
|
+
}), [["render", Vd]]), Ud = Q.register("panel", {
|
|
12459
12493
|
defaultNested: !1,
|
|
12460
12494
|
generateLabel: !1,
|
|
12461
12495
|
omitSpacing: !0,
|
|
@@ -12468,22 +12502,22 @@ var Bd = /*#__PURE__*/ X(Q.register("object", {
|
|
|
12468
12502
|
render() {
|
|
12469
12503
|
return null;
|
|
12470
12504
|
}
|
|
12471
|
-
}),
|
|
12505
|
+
}), Wd = [
|
|
12472
12506
|
"id",
|
|
12473
12507
|
"value",
|
|
12474
12508
|
"max"
|
|
12475
12509
|
];
|
|
12476
|
-
function
|
|
12510
|
+
function Gd(e, t, n, r, i, a) {
|
|
12477
12511
|
return x(), l("progress", v({
|
|
12478
12512
|
class: "dito-progress",
|
|
12479
12513
|
id: e.componentPath,
|
|
12480
12514
|
ref: "element",
|
|
12481
12515
|
value: e.progressValue,
|
|
12482
12516
|
max: e.progressMax
|
|
12483
|
-
}, e.attributes), null, 16,
|
|
12517
|
+
}, e.attributes), null, 16, Wd);
|
|
12484
12518
|
}
|
|
12485
|
-
var
|
|
12486
|
-
mixins: [
|
|
12519
|
+
var Kd = /*#__PURE__*/ X(Q.register("progress", {
|
|
12520
|
+
mixins: [Pd],
|
|
12487
12521
|
computed: {
|
|
12488
12522
|
progressValue() {
|
|
12489
12523
|
let { value: e, range: t, step: n } = this;
|
|
@@ -12494,8 +12528,8 @@ var Wd = /*#__PURE__*/ X(Q.register("progress", {
|
|
|
12494
12528
|
return e ? e[1] - e[0] : null;
|
|
12495
12529
|
}
|
|
12496
12530
|
}
|
|
12497
|
-
}), [["render",
|
|
12498
|
-
function
|
|
12531
|
+
}), [["render", Gd]]), qd = ["id", "aria-label"], Jd = ["value"];
|
|
12532
|
+
function Yd(e, n, r, i, a, o) {
|
|
12499
12533
|
return x(), l("ul", {
|
|
12500
12534
|
class: y(["dito-radio-buttons", `dito-layout--${e.schema.layout || "vertical"}`]),
|
|
12501
12535
|
id: e.componentPath,
|
|
@@ -12508,16 +12542,16 @@ function qd(e, n, r, i, a, o) {
|
|
|
12508
12542
|
"onUpdate:modelValue": n[0] ||= (t) => e.selectedValue = t,
|
|
12509
12543
|
type: "radio",
|
|
12510
12544
|
value: e.getValueForOption(t)
|
|
12511
|
-
}, { ref_for: !0 }, e.attributes), null, 16,
|
|
12545
|
+
}, { ref_for: !0 }, e.attributes), null, 16, Jd), [[de, e.selectedValue]]), d(E(e.getLabelForOption(t)), 1)])]))), 256))], 10, qd);
|
|
12512
12546
|
}
|
|
12513
|
-
var
|
|
12514
|
-
mixins: [
|
|
12547
|
+
var Xd = /*#__PURE__*/ X(Q.register("radio", {
|
|
12548
|
+
mixins: [Ml],
|
|
12515
12549
|
nativeField: !0,
|
|
12516
12550
|
defaultWidth: "auto"
|
|
12517
|
-
}), [["render",
|
|
12551
|
+
}), [["render", Yd]]);
|
|
12518
12552
|
//#endregion
|
|
12519
12553
|
//#region src/types/DitoTypeSection.vue?vue&type=template&lang.js
|
|
12520
|
-
function
|
|
12554
|
+
function Zd(e, t, n, r, i, a) {
|
|
12521
12555
|
let o = w("DitoSchemaInlined");
|
|
12522
12556
|
return x(), l("div", { class: y(["dito-section", { "dito-section--labelled": e.hasLabel }]) }, [f(o, {
|
|
12523
12557
|
class: "dito-section__schema",
|
|
@@ -12548,7 +12582,7 @@ function Yd(e, t, n, r, i, a) {
|
|
|
12548
12582
|
"labelNode"
|
|
12549
12583
|
])], 2);
|
|
12550
12584
|
}
|
|
12551
|
-
var
|
|
12585
|
+
var Qd = /*#__PURE__*/ X(Q.register("section", {
|
|
12552
12586
|
mixins: [go],
|
|
12553
12587
|
defaultValue: ({ schema: e }) => e.nested ? {} : void 0,
|
|
12554
12588
|
ignoreMissingValue: ({ schema: e }) => !e.nested && !("default" in e),
|
|
@@ -12575,7 +12609,7 @@ var Xd = /*#__PURE__*/ X(Q.register("section", {
|
|
|
12575
12609
|
})
|
|
12576
12610
|
},
|
|
12577
12611
|
methods: {
|
|
12578
|
-
getItemFormSchema:
|
|
12612
|
+
getItemFormSchema: ur,
|
|
12579
12613
|
async navigateToComponent(e, t, n) {
|
|
12580
12614
|
let { mainSchemaComponent: r } = this, i = this.dataPath ? `${this.dataPath}/` : "", a = z(e), o = a.startsWith(i) ? B(a.slice(i.length))[0] : null;
|
|
12581
12615
|
return !!r && yn(r.schema, o) && r.navigateToComponent(e, t, n);
|
|
@@ -12584,10 +12618,10 @@ var Xd = /*#__PURE__*/ X(Q.register("section", {
|
|
|
12584
12618
|
async processSchema(e, t, n, r, i) {
|
|
12585
12619
|
await mi(e, t, r, i);
|
|
12586
12620
|
}
|
|
12587
|
-
}), [["render",
|
|
12588
|
-
function
|
|
12621
|
+
}), [["render", Zd]]), $d = { class: "dito-select" }, ef = { class: "dito-select__inner" }, tf = ["id"], nf = ["label"], rf = ["value"], af = ["value"], of = ["value"];
|
|
12622
|
+
function sf(e, n, r, i, a, o) {
|
|
12589
12623
|
let d = w("DitoAffixes"), p = w("DitoEditButtons");
|
|
12590
|
-
return x(), l("div",
|
|
12624
|
+
return x(), l("div", $d, [u("div", ef, [
|
|
12591
12625
|
f(d, {
|
|
12592
12626
|
items: e.schema.prefix,
|
|
12593
12627
|
position: "prefix",
|
|
@@ -12610,13 +12644,13 @@ function af(e, n, r, i, a, o) {
|
|
|
12610
12644
|
}), [e.populate ? (x(!0), l(t, { key: 0 }, S(e.options, (n) => (x(), l(t, null, [e.groupBy ? (x(), l("optgroup", {
|
|
12611
12645
|
key: 0,
|
|
12612
12646
|
label: n[e.groupByLabel]
|
|
12613
|
-
}, [(x(!0), l(t, null, S(n[e.groupByOptions], (t) => (x(), l("option", { value: e.getValueForOption(t) }, E(e.getLabelForOption(t)), 9,
|
|
12647
|
+
}, [(x(!0), l(t, null, S(n[e.groupByOptions], (t) => (x(), l("option", { value: e.getValueForOption(t) }, E(e.getLabelForOption(t)), 9, rf))), 256))], 8, nf)) : (x(), l("option", {
|
|
12614
12648
|
key: 1,
|
|
12615
12649
|
value: e.getValueForOption(n)
|
|
12616
|
-
}, E(e.getLabelForOption(n)), 9,
|
|
12650
|
+
}, E(e.getLabelForOption(n)), 9, af))], 64))), 256)) : e.selectedOption ? (x(), l("option", {
|
|
12617
12651
|
key: 1,
|
|
12618
12652
|
value: e.selectedValue
|
|
12619
|
-
}, E(e.getLabelForOption(e.selectedOption)), 9,
|
|
12653
|
+
}, E(e.getLabelForOption(e.selectedOption)), 9, of)) : c("", !0)], 16, tf), [[fe, e.selectedValue]]),
|
|
12620
12654
|
f(d, {
|
|
12621
12655
|
items: e.schema.suffix,
|
|
12622
12656
|
position: "suffix",
|
|
@@ -12655,22 +12689,22 @@ function af(e, n, r, i, a, o) {
|
|
|
12655
12689
|
"editPath"
|
|
12656
12690
|
])) : c("", !0)]);
|
|
12657
12691
|
}
|
|
12658
|
-
var
|
|
12659
|
-
mixins: [
|
|
12692
|
+
var cf = /*#__PURE__*/ X(Q.register("select", {
|
|
12693
|
+
mixins: [Ml],
|
|
12660
12694
|
components: { DitoAffixes: Z },
|
|
12661
12695
|
nativeField: !0,
|
|
12662
12696
|
data() {
|
|
12663
12697
|
return { populate: !0 };
|
|
12664
12698
|
}
|
|
12665
|
-
}), [["render",
|
|
12699
|
+
}), [["render", sf]]), lf = { class: "dito-slider" }, uf = [
|
|
12666
12700
|
"id",
|
|
12667
12701
|
"min",
|
|
12668
12702
|
"max",
|
|
12669
12703
|
"step"
|
|
12670
12704
|
];
|
|
12671
|
-
function
|
|
12705
|
+
function df(e, t, n, r, i, a) {
|
|
12672
12706
|
let o = w("DitoInput");
|
|
12673
|
-
return x(), l("div",
|
|
12707
|
+
return x(), l("div", lf, [k(u("input", v({
|
|
12674
12708
|
class: "dito-range",
|
|
12675
12709
|
id: e.componentPath,
|
|
12676
12710
|
ref: "element",
|
|
@@ -12680,7 +12714,7 @@ function lf(e, t, n, r, i, a) {
|
|
|
12680
12714
|
min: e.min,
|
|
12681
12715
|
max: e.max,
|
|
12682
12716
|
step: e.stepValue
|
|
12683
|
-
}), null, 16,
|
|
12717
|
+
}), null, 16, uf), [[pe, e.inputValue]]), e.input ? (x(), s(o, v({
|
|
12684
12718
|
key: 0,
|
|
12685
12719
|
class: "dito-number",
|
|
12686
12720
|
modelValue: e.inputValue,
|
|
@@ -12697,28 +12731,28 @@ function lf(e, t, n, r, i, a) {
|
|
|
12697
12731
|
"step"
|
|
12698
12732
|
])) : c("", !0)]);
|
|
12699
12733
|
}
|
|
12700
|
-
var
|
|
12701
|
-
mixins: [
|
|
12734
|
+
var ff = /*#__PURE__*/ X(Q.register("slider", {
|
|
12735
|
+
mixins: [Pd],
|
|
12702
12736
|
components: { DitoInput: Da },
|
|
12703
12737
|
nativeField: !0,
|
|
12704
12738
|
computed: { input: q("input", {
|
|
12705
12739
|
type: Boolean,
|
|
12706
12740
|
default: !0
|
|
12707
12741
|
}) }
|
|
12708
|
-
}), [["render",
|
|
12742
|
+
}), [["render", df]]);
|
|
12709
12743
|
//#endregion
|
|
12710
12744
|
//#region src/types/DitoTypeSpacer.vue?vue&type=template&lang.js
|
|
12711
|
-
function
|
|
12745
|
+
function pf(e, t, n, r, i, a) {
|
|
12712
12746
|
return null;
|
|
12713
12747
|
}
|
|
12714
|
-
var
|
|
12748
|
+
var mf = /*#__PURE__*/ X(Q.register("spacer", {
|
|
12715
12749
|
defaultValue: () => void 0,
|
|
12716
12750
|
excludeValue: !0,
|
|
12717
12751
|
generateLabel: !1
|
|
12718
|
-
}), [["render",
|
|
12752
|
+
}), [["render", pf]]);
|
|
12719
12753
|
//#endregion
|
|
12720
12754
|
//#region src/types/DitoTypeSwitch.vue?vue&type=template&lang.js
|
|
12721
|
-
function
|
|
12755
|
+
function hf(e, t, n, r, i, a) {
|
|
12722
12756
|
let o = w("DitoSwitch");
|
|
12723
12757
|
return x(), s(o, v({
|
|
12724
12758
|
class: "dito-switch",
|
|
@@ -12733,14 +12767,14 @@ function pf(e, t, n, r, i, a) {
|
|
|
12733
12767
|
"labels"
|
|
12734
12768
|
]);
|
|
12735
12769
|
}
|
|
12736
|
-
var
|
|
12770
|
+
var gf = /*#__PURE__*/ X(Q.register("switch", {
|
|
12737
12771
|
defaultValue: !1,
|
|
12738
12772
|
defaultWidth: "auto",
|
|
12739
12773
|
components: { DitoSwitch: oo },
|
|
12740
12774
|
computed: { labels() {
|
|
12741
12775
|
return this.schema.labels;
|
|
12742
12776
|
} }
|
|
12743
|
-
}), [["render",
|
|
12777
|
+
}), [["render", hf]]), _f = {
|
|
12744
12778
|
computed: { trim: q("trim", {
|
|
12745
12779
|
type: Boolean,
|
|
12746
12780
|
default: !1
|
|
@@ -12752,7 +12786,7 @@ var mf = /*#__PURE__*/ X(Q.register("switch", {
|
|
|
12752
12786
|
};
|
|
12753
12787
|
//#endregion
|
|
12754
12788
|
//#region src/types/DitoTypeText.vue?vue&type=template&lang.js
|
|
12755
|
-
function
|
|
12789
|
+
function vf(e, t, n, r, i, a) {
|
|
12756
12790
|
let o = w("DitoAffixes"), c = w("DitoInput");
|
|
12757
12791
|
return x(), s(c, v({
|
|
12758
12792
|
class: "dito-text",
|
|
@@ -12799,7 +12833,7 @@ function gf(e, t, n, r, i, a) {
|
|
|
12799
12833
|
}
|
|
12800
12834
|
//#endregion
|
|
12801
12835
|
//#region src/types/DitoTypeText.vue
|
|
12802
|
-
var
|
|
12836
|
+
var yf = "****************", bf = /*#__PURE__*/ X(Q.register([
|
|
12803
12837
|
"text",
|
|
12804
12838
|
"email",
|
|
12805
12839
|
"url",
|
|
@@ -12809,7 +12843,7 @@ var _f = "****************", vf = /*#__PURE__*/ X(Q.register([
|
|
|
12809
12843
|
"password",
|
|
12810
12844
|
"creditcard"
|
|
12811
12845
|
], {
|
|
12812
|
-
mixins: [
|
|
12846
|
+
mixins: [_f],
|
|
12813
12847
|
components: {
|
|
12814
12848
|
DitoInput: Da,
|
|
12815
12849
|
DitoAffixes: Z
|
|
@@ -12838,15 +12872,15 @@ var _f = "****************", vf = /*#__PURE__*/ X(Q.register([
|
|
|
12838
12872
|
},
|
|
12839
12873
|
inputValue: {
|
|
12840
12874
|
get() {
|
|
12841
|
-
return this.type === "password" && this.value === void 0 && !this.focused ?
|
|
12875
|
+
return this.type === "password" && this.value === void 0 && !this.focused ? yf : this.value;
|
|
12842
12876
|
},
|
|
12843
12877
|
set(e) {
|
|
12844
12878
|
this.value = e;
|
|
12845
12879
|
}
|
|
12846
12880
|
}
|
|
12847
12881
|
}
|
|
12848
|
-
}), [["render",
|
|
12849
|
-
function
|
|
12882
|
+
}), [["render", vf]]), xf = ["id", "rows"];
|
|
12883
|
+
function Sf(e, t, n, r, i, a) {
|
|
12850
12884
|
return k((x(), l("textarea", v({
|
|
12851
12885
|
class: "dito-textarea dito-input",
|
|
12852
12886
|
id: e.componentPath,
|
|
@@ -12855,10 +12889,10 @@ function bf(e, t, n, r, i, a) {
|
|
|
12855
12889
|
}, e.attributes, {
|
|
12856
12890
|
rows: e.lines,
|
|
12857
12891
|
class: { "dito-textarea--resizable": e.resizable }
|
|
12858
|
-
}), null, 16,
|
|
12892
|
+
}), null, 16, xf)), [[pe, e.value]]);
|
|
12859
12893
|
}
|
|
12860
|
-
var
|
|
12861
|
-
mixins: [
|
|
12894
|
+
var Cf = /*#__PURE__*/ X(Q.register("textarea", {
|
|
12895
|
+
mixins: [_f],
|
|
12862
12896
|
nativeField: !0,
|
|
12863
12897
|
textField: !0,
|
|
12864
12898
|
computed: {
|
|
@@ -12870,17 +12904,17 @@ var xf = /*#__PURE__*/ X(Q.register("textarea", {
|
|
|
12870
12904
|
default: !1
|
|
12871
12905
|
})
|
|
12872
12906
|
}
|
|
12873
|
-
}), [["render",
|
|
12907
|
+
}), [["render", Sf]]), wf = { class: "dito-tree-list" }, Tf = { class: "dito-tree-panel" }, Ef = {
|
|
12874
12908
|
key: 0,
|
|
12875
12909
|
class: "dito-tree-form-container"
|
|
12876
12910
|
};
|
|
12877
|
-
function
|
|
12911
|
+
function Df(e, t, n, r, i, a) {
|
|
12878
12912
|
let o = w("DitoScopes"), d = w("DitoTreeItem"), p = w("DitoRouterView");
|
|
12879
|
-
return x(), l("div",
|
|
12913
|
+
return x(), l("div", wf, [e.scopes ? (x(), s(o, {
|
|
12880
12914
|
key: 0,
|
|
12881
12915
|
query: e.query,
|
|
12882
12916
|
scopes: e.scopes
|
|
12883
|
-
}, null, 8, ["query", "scopes"])) : c("", !0), u("div",
|
|
12917
|
+
}, null, 8, ["query", "scopes"])) : c("", !0), u("div", Tf, [f(d, {
|
|
12884
12918
|
schema: e.treeSchema,
|
|
12885
12919
|
dataPath: e.treeDataPath,
|
|
12886
12920
|
data: e.treeData,
|
|
@@ -12892,10 +12926,10 @@ function Tf(e, t, n, r, i, a) {
|
|
|
12892
12926
|
"dataPath",
|
|
12893
12927
|
"data",
|
|
12894
12928
|
"draggable"
|
|
12895
|
-
]), e.editPath && e.hasEditableForms ? (x(), l("div",
|
|
12929
|
+
]), e.editPath && e.hasEditableForms ? (x(), l("div", Ef, [f(p, { routeLevel: e.routeComponent.routeLevel + 1 }, null, 8, ["routeLevel"])])) : c("", !0)])]);
|
|
12896
12930
|
}
|
|
12897
|
-
var
|
|
12898
|
-
mixins: [
|
|
12931
|
+
var Of = /*#__PURE__*/ X(Q.register(["tree-list", "tree-object"], {
|
|
12932
|
+
mixins: [iu],
|
|
12899
12933
|
provide() {
|
|
12900
12934
|
return { container: this };
|
|
12901
12935
|
},
|
|
@@ -12923,7 +12957,7 @@ var Ef = /*#__PURE__*/ X(Q.register(["tree-list", "tree-object"], {
|
|
|
12923
12957
|
} } : this.schema;
|
|
12924
12958
|
},
|
|
12925
12959
|
hasEditableForms() {
|
|
12926
|
-
let e = (t) =>
|
|
12960
|
+
let e = (t) => $n(t) && (this.getSchemaValue("editable", {
|
|
12927
12961
|
type: Boolean,
|
|
12928
12962
|
default: !1,
|
|
12929
12963
|
schema: t
|
|
@@ -12932,14 +12966,14 @@ var Ef = /*#__PURE__*/ X(Q.register(["tree-list", "tree-object"], {
|
|
|
12932
12966
|
}
|
|
12933
12967
|
},
|
|
12934
12968
|
async processSchema(e, t, n, r, i, a = !0, o = !1, s = null) {
|
|
12935
|
-
await Promise.all([fi(t.properties),
|
|
12969
|
+
await Promise.all([fi(t.properties), iu.processSchema(e, t, n, r, i, a, o, (n, r) => {
|
|
12936
12970
|
let { children: i } = t;
|
|
12937
12971
|
if (i) return i.type = "tree-list", this.processSchema(e, i, i.name, n, r, a, !0, s);
|
|
12938
12972
|
})]);
|
|
12939
12973
|
},
|
|
12940
12974
|
getFormSchemasForProcessing(e, t) {
|
|
12941
12975
|
let { children: n } = e;
|
|
12942
|
-
return
|
|
12976
|
+
return or(e, t, n ? (e) => ({
|
|
12943
12977
|
...e,
|
|
12944
12978
|
components: {
|
|
12945
12979
|
...e.components,
|
|
@@ -12947,7 +12981,7 @@ var Ef = /*#__PURE__*/ X(Q.register(["tree-list", "tree-object"], {
|
|
|
12947
12981
|
}
|
|
12948
12982
|
}) : null);
|
|
12949
12983
|
}
|
|
12950
|
-
}), [["render",
|
|
12984
|
+
}), [["render", Df]]), kf = [
|
|
12951
12985
|
"",
|
|
12952
12986
|
"k",
|
|
12953
12987
|
"M",
|
|
@@ -12958,41 +12992,41 @@ var Ef = /*#__PURE__*/ X(Q.register(["tree-list", "tree-object"], {
|
|
|
12958
12992
|
"Z",
|
|
12959
12993
|
"Y"
|
|
12960
12994
|
];
|
|
12961
|
-
function
|
|
12962
|
-
let n =
|
|
12963
|
-
a >= n && i <
|
|
12964
|
-
let o =
|
|
12995
|
+
function Af(e, { base: t = 10 } = {}) {
|
|
12996
|
+
let n = Mf(t), r = Math.abs(e), i = Math.min(r >= 1 ? Math.floor(Math.log(r) / Math.log(n)) : 0, kf.length - 1), a = Nf(r, n, i);
|
|
12997
|
+
a >= n && i < kf.length - 1 && (a = Nf(r, n, ++i));
|
|
12998
|
+
let o = kf[i], s = o ? t === 10 ? `${o}B` : `${o.toUpperCase()}iB` : "B";
|
|
12965
12999
|
return `${e < 0 ? "-" : ""}${a} ${s}`;
|
|
12966
13000
|
}
|
|
12967
|
-
function
|
|
13001
|
+
function jf(e, { base: t = 10 } = {}) {
|
|
12968
13002
|
let [, n, r] = String(e).match(/^([\d.,]*)\s*(\D*)$/) || [], i = parseFloat(n?.replace(",", "."));
|
|
12969
13003
|
if (!isFinite(i)) throw Error(`Can't interpret file size: ${e}`);
|
|
12970
|
-
let a =
|
|
13004
|
+
let a = Mf(/^[kmgtpezy]ib?$/i.test(r) ? 2 : t), o = r.replace(/^bits?$/, "b").match(/^([KMGTPEZY]?)b$/);
|
|
12971
13005
|
if (o) {
|
|
12972
|
-
let e =
|
|
13006
|
+
let e = kf.indexOf(o[1].replace("K", "k"));
|
|
12973
13007
|
return Math.round(i * a ** e / 8);
|
|
12974
13008
|
}
|
|
12975
|
-
let s =
|
|
13009
|
+
let s = kf.findIndex((e) => e.toLowerCase() === r.toLowerCase().replace(/^(bytes?|b)$/, "").replace(/^(\w)(i?b|i)$/, "$1"));
|
|
12976
13010
|
if (s >= 0) return Math.round(i * a ** s);
|
|
12977
13011
|
throw Error(`Invalid file size unit: ${r}`);
|
|
12978
13012
|
}
|
|
12979
|
-
function
|
|
13013
|
+
function Mf(e) {
|
|
12980
13014
|
return e === 10 ? 1e3 : 1024;
|
|
12981
13015
|
}
|
|
12982
|
-
function
|
|
13016
|
+
function Nf(e, t, n) {
|
|
12983
13017
|
let r = n > 0 ? 100 : 1;
|
|
12984
13018
|
return Math.round(e / t ** n * r) / r;
|
|
12985
13019
|
}
|
|
12986
13020
|
//#endregion
|
|
12987
13021
|
//#region src/types/DitoTypeUpload.vue?vue&type=template&lang.js
|
|
12988
|
-
var
|
|
13022
|
+
var Pf = { class: "dito-upload" }, Ff = { class: "dito-table dito-table--separators dito-table--background" }, If = ["innerHTML"], Lf = { key: 1 }, Rf = [
|
|
12989
13023
|
"download",
|
|
12990
13024
|
"href",
|
|
12991
13025
|
"onClick"
|
|
12992
|
-
],
|
|
12993
|
-
function
|
|
13026
|
+
], zf = { key: 2 }, Bf = { class: "dito-upload__size" }, Vf = { class: "dito-upload__status" }, Hf = { class: "dito-table__buttons" }, Uf = { class: "dito-buttons dito-buttons--round" }, Wf = ["title"], Gf = ["onClick"], Kf = { key: 0 }, qf = { colspan: 4 }, Jf = { class: "dito-upload-footer" }, Yf = ["value"], Xf = { class: "dito-buttons dito-buttons--round" }, Zf = ["title"];
|
|
13027
|
+
function Qf(e, n, r, i, a, o) {
|
|
12994
13028
|
let s = w("VueUpload"), p = w("DitoUploadFile"), m = w("DitoDraggable");
|
|
12995
|
-
return x(), l("div",
|
|
13029
|
+
return x(), l("div", Pf, [f(s, {
|
|
12996
13030
|
class: "dito-upload__input",
|
|
12997
13031
|
ref: "upload",
|
|
12998
13032
|
modelValue: e.uploads,
|
|
@@ -13022,7 +13056,7 @@ function Xf(e, n, r, i, a, o) {
|
|
|
13022
13056
|
"drop",
|
|
13023
13057
|
"onInputFilter",
|
|
13024
13058
|
"onInputFile"
|
|
13025
|
-
]), u("table",
|
|
13059
|
+
]), u("table", Ff, [
|
|
13026
13060
|
n[5] ||= u("thead", { class: "dito-table-head" }, [u("tr", null, [
|
|
13027
13061
|
u("th", { scope: "col" }, [u("span", null, "File")]),
|
|
13028
13062
|
u("th", { scope: "col" }, [u("span", null, "Size")]),
|
|
@@ -13040,7 +13074,7 @@ function Xf(e, n, r, i, a, o) {
|
|
|
13040
13074
|
e.render ? (x(), l("td", {
|
|
13041
13075
|
key: 0,
|
|
13042
13076
|
innerHTML: e.renderFile(r, i)
|
|
13043
|
-
}, null, 8,
|
|
13077
|
+
}, null, 8, If)) : e.downloadUrls[i] ? (x(), l("td", Lf, [u("a", {
|
|
13044
13078
|
download: r.name,
|
|
13045
13079
|
href: e.downloadUrls[i],
|
|
13046
13080
|
target: "_blank",
|
|
@@ -13053,7 +13087,7 @@ function Xf(e, n, r, i, a, o) {
|
|
|
13053
13087
|
"file",
|
|
13054
13088
|
"thumbnail",
|
|
13055
13089
|
"thumbnailUrl"
|
|
13056
|
-
])], 8,
|
|
13090
|
+
])], 8, Rf)])) : (x(), l("td", zf, [f(p, {
|
|
13057
13091
|
file: r,
|
|
13058
13092
|
thumbnail: e.thumbnails,
|
|
13059
13093
|
thumbnailUrl: e.thumbnailUrls[i]
|
|
@@ -13062,15 +13096,15 @@ function Xf(e, n, r, i, a, o) {
|
|
|
13062
13096
|
"thumbnail",
|
|
13063
13097
|
"thumbnailUrl"
|
|
13064
13098
|
])])),
|
|
13065
|
-
u("td",
|
|
13066
|
-
u("td",
|
|
13067
|
-
u("td",
|
|
13099
|
+
u("td", Bf, E(e.formatFileSize(r.size)), 1),
|
|
13100
|
+
u("td", Vf, [r.upload ? (x(), l(t, { key: 0 }, [r.upload.error ? (x(), l(t, { key: 0 }, [d("Error: " + E(r.upload.error), 1)], 64)) : r.upload.active ? (x(), l(t, { key: 1 }, [d("Uploading...")], 64)) : r.upload.success ? (x(), l(t, { key: 2 }, [d("Uploaded")], 64)) : c("", !0)], 64)) : (x(), l(t, { key: 1 }, [d("Stored")], 64))]),
|
|
13101
|
+
u("td", Hf, [u("div", Uf, [
|
|
13068
13102
|
e.multiple ? c("", !0) : (x(), l("button", {
|
|
13069
13103
|
key: 0,
|
|
13070
13104
|
class: "dito-button dito-button--upload",
|
|
13071
13105
|
title: e.uploadTitle,
|
|
13072
13106
|
onClick: n[1] ||= (...t) => e.onClickUpload && e.onClickUpload(...t)
|
|
13073
|
-
}, null, 8,
|
|
13107
|
+
}, null, 8, Wf)),
|
|
13074
13108
|
e.draggable ? (x(), l("a", v({
|
|
13075
13109
|
key: 1,
|
|
13076
13110
|
class: "dito-button"
|
|
@@ -13079,7 +13113,7 @@ function Xf(e, n, r, i, a, o) {
|
|
|
13079
13113
|
key: 2,
|
|
13080
13114
|
class: "dito-button",
|
|
13081
13115
|
type: "button"
|
|
13082
|
-
}, { ref_for: !0 }, e.getButtonAttributes(e.verbs.delete), { onClick: (t) => e.deleteFile(r, i) }), null, 16,
|
|
13116
|
+
}, { ref_for: !0 }, e.getButtonAttributes(e.verbs.delete), { onClick: (t) => e.deleteFile(r, i) }), null, 16, Gf)) : c("", !0)
|
|
13083
13117
|
])])
|
|
13084
13118
|
]))), 128)) : c("", !0)]),
|
|
13085
13119
|
_: 1
|
|
@@ -13088,12 +13122,12 @@ function Xf(e, n, r, i, a, o) {
|
|
|
13088
13122
|
"options",
|
|
13089
13123
|
"draggable"
|
|
13090
13124
|
]),
|
|
13091
|
-
e.multiple || e.isUploadActive || !e.hasFiles ? (x(), l("tfoot",
|
|
13125
|
+
e.multiple || e.isUploadActive || !e.hasFiles ? (x(), l("tfoot", Kf, [u("tr", null, [u("td", qf, [u("div", Jf, [e.isUploadActive ? (x(), l("progress", {
|
|
13092
13126
|
key: 0,
|
|
13093
13127
|
class: "dito-progress",
|
|
13094
13128
|
value: e.uploadProgress,
|
|
13095
13129
|
max: "100"
|
|
13096
|
-
}, null, 8,
|
|
13130
|
+
}, null, 8, Yf)) : c("", !0), u("div", Xf, [e.isUploadActive ? (x(), l("button", {
|
|
13097
13131
|
key: 0,
|
|
13098
13132
|
class: "dito-button",
|
|
13099
13133
|
type: "button",
|
|
@@ -13103,13 +13137,13 @@ function Xf(e, n, r, i, a, o) {
|
|
|
13103
13137
|
class: "dito-button dito-button--upload",
|
|
13104
13138
|
title: e.uploadTitle,
|
|
13105
13139
|
onClick: n[4] ||= (...t) => e.onClickUpload && e.onClickUpload(...t)
|
|
13106
|
-
}, null, 8,
|
|
13140
|
+
}, null, 8, Zf)) : c("", !0)])])])])])) : c("", !0)
|
|
13107
13141
|
])]);
|
|
13108
13142
|
}
|
|
13109
13143
|
//#endregion
|
|
13110
13144
|
//#region src/types/DitoTypeUpload.vue
|
|
13111
|
-
var
|
|
13112
|
-
mixins: [
|
|
13145
|
+
var $f = Q.register("upload", {
|
|
13146
|
+
mixins: [zc],
|
|
13113
13147
|
components: { VueUpload: Bt },
|
|
13114
13148
|
data() {
|
|
13115
13149
|
return { uploads: [] };
|
|
@@ -13122,7 +13156,7 @@ var Zf = Q.register("upload", {
|
|
|
13122
13156
|
return this.multiple ? "Upload Files" : "Upload File";
|
|
13123
13157
|
},
|
|
13124
13158
|
files() {
|
|
13125
|
-
return
|
|
13159
|
+
return ep(this.value);
|
|
13126
13160
|
},
|
|
13127
13161
|
downloadUrls() {
|
|
13128
13162
|
return this.files.map((e, t) => this.getDownloadUrl(e, t));
|
|
@@ -13149,7 +13183,7 @@ var Zf = Q.register("upload", {
|
|
|
13149
13183
|
maxSize: q("maxSize", {
|
|
13150
13184
|
type: [String, Number],
|
|
13151
13185
|
get(e) {
|
|
13152
|
-
return e ?
|
|
13186
|
+
return e ? jf(e) : void 0;
|
|
13153
13187
|
}
|
|
13154
13188
|
}),
|
|
13155
13189
|
draggable: q("draggable", {
|
|
@@ -13205,9 +13239,9 @@ var Zf = Q.register("upload", {
|
|
|
13205
13239
|
});
|
|
13206
13240
|
} },
|
|
13207
13241
|
methods: {
|
|
13208
|
-
formatFileSize:
|
|
13242
|
+
formatFileSize: Af,
|
|
13209
13243
|
getFileContext(e, t) {
|
|
13210
|
-
return this.multiple ? new
|
|
13244
|
+
return this.multiple ? new G(this, {
|
|
13211
13245
|
value: e,
|
|
13212
13246
|
data: this.files,
|
|
13213
13247
|
index: t,
|
|
@@ -13278,7 +13312,7 @@ var Zf = Q.register("upload", {
|
|
|
13278
13312
|
extension: `Unsupported file-type: ${e.name}`,
|
|
13279
13313
|
network: "Network error encountered during upload",
|
|
13280
13314
|
server: "Server error occurred during upload",
|
|
13281
|
-
size: `File is too large: ${
|
|
13315
|
+
size: `File is too large: ${Af(e.size)}`,
|
|
13282
13316
|
timeout: "Timeout occurred during upload"
|
|
13283
13317
|
}[n] || `Unknown File Upload Error: '${n}'`;
|
|
13284
13318
|
this.notify({
|
|
@@ -13310,57 +13344,57 @@ var Zf = Q.register("upload", {
|
|
|
13310
13344
|
}
|
|
13311
13345
|
},
|
|
13312
13346
|
processValue({ schema: e, value: t }) {
|
|
13313
|
-
let n =
|
|
13347
|
+
let n = ep(t).map(({ upload: e, ...t }) => !e || e.success ? t : null).filter((e) => e);
|
|
13314
13348
|
return e.multiple ? n : n[0] || null;
|
|
13315
13349
|
}
|
|
13316
13350
|
});
|
|
13317
|
-
function
|
|
13351
|
+
function ep(e) {
|
|
13318
13352
|
return e ? j(e) : [];
|
|
13319
13353
|
}
|
|
13320
|
-
var
|
|
13321
|
-
DitoDitoTypeComponent: () =>
|
|
13322
|
-
DitoTypeButton: () =>
|
|
13323
|
-
DitoTypeCheckbox: () =>
|
|
13324
|
-
DitoTypeCheckboxes: () =>
|
|
13325
|
-
DitoTypeCode: () =>
|
|
13326
|
-
DitoTypeColor: () =>
|
|
13327
|
-
DitoTypeComputed: () =>
|
|
13328
|
-
DitoTypeDate: () =>
|
|
13329
|
-
DitoTypeLabel: () =>
|
|
13330
|
-
DitoTypeList: () =>
|
|
13331
|
-
DitoTypeMarkup: () =>
|
|
13332
|
-
DitoTypeMultiselect: () =>
|
|
13333
|
-
DitoTypeNumber: () =>
|
|
13334
|
-
DitoTypeObject: () =>
|
|
13335
|
-
DitoTypePanel: () =>
|
|
13336
|
-
DitoTypeProgress: () =>
|
|
13337
|
-
DitoTypeRadio: () =>
|
|
13338
|
-
DitoTypeSection: () =>
|
|
13339
|
-
DitoTypeSelect: () =>
|
|
13340
|
-
DitoTypeSlider: () =>
|
|
13341
|
-
DitoTypeSpacer: () =>
|
|
13342
|
-
DitoTypeSwitch: () =>
|
|
13343
|
-
DitoTypeText: () =>
|
|
13344
|
-
DitoTypeTextarea: () =>
|
|
13345
|
-
DitoTypeTreeList: () =>
|
|
13346
|
-
DitoTypeUpload: () =>
|
|
13347
|
-
}),
|
|
13354
|
+
var tp = /*#__PURE__*/ X($f, [["render", Qf]]), np = /* @__PURE__ */ Ht({
|
|
13355
|
+
DitoDitoTypeComponent: () => Yl,
|
|
13356
|
+
DitoTypeButton: () => Dl,
|
|
13357
|
+
DitoTypeCheckbox: () => jl,
|
|
13358
|
+
DitoTypeCheckboxes: () => Ll,
|
|
13359
|
+
DitoTypeCode: () => Vl,
|
|
13360
|
+
DitoTypeColor: () => ql,
|
|
13361
|
+
DitoTypeComputed: () => Ql,
|
|
13362
|
+
DitoTypeDate: () => tu,
|
|
13363
|
+
DitoTypeLabel: () => ku,
|
|
13364
|
+
DitoTypeList: () => Du,
|
|
13365
|
+
DitoTypeMarkup: () => kd,
|
|
13366
|
+
DitoTypeMultiselect: () => Nd,
|
|
13367
|
+
DitoTypeNumber: () => Id,
|
|
13368
|
+
DitoTypeObject: () => Hd,
|
|
13369
|
+
DitoTypePanel: () => Ud,
|
|
13370
|
+
DitoTypeProgress: () => Kd,
|
|
13371
|
+
DitoTypeRadio: () => Xd,
|
|
13372
|
+
DitoTypeSection: () => Qd,
|
|
13373
|
+
DitoTypeSelect: () => cf,
|
|
13374
|
+
DitoTypeSlider: () => ff,
|
|
13375
|
+
DitoTypeSpacer: () => mf,
|
|
13376
|
+
DitoTypeSwitch: () => gf,
|
|
13377
|
+
DitoTypeText: () => bf,
|
|
13378
|
+
DitoTypeTextarea: () => Cf,
|
|
13379
|
+
DitoTypeTreeList: () => Of,
|
|
13380
|
+
DitoTypeUpload: () => tp
|
|
13381
|
+
}), rp = {
|
|
13348
13382
|
mounted(e, t) {
|
|
13349
|
-
|
|
13383
|
+
ip(e, t.value, t.arg);
|
|
13350
13384
|
},
|
|
13351
13385
|
unmounted(e, t) {
|
|
13352
|
-
|
|
13386
|
+
ap(e, t.value, t.arg);
|
|
13353
13387
|
}
|
|
13354
13388
|
};
|
|
13355
|
-
function
|
|
13356
|
-
|
|
13389
|
+
function ip(e, t, n) {
|
|
13390
|
+
cp.getObserver(n).observe(e, t);
|
|
13357
13391
|
}
|
|
13358
|
-
function
|
|
13359
|
-
|
|
13392
|
+
function ap(e, t, n) {
|
|
13393
|
+
cp.getObserver(n).unobserve(e, t);
|
|
13360
13394
|
}
|
|
13361
|
-
var
|
|
13395
|
+
var op = typeof ResizeObserver < "u", sp = {}, cp = class e {
|
|
13362
13396
|
constructor(e, t) {
|
|
13363
|
-
this.key = e, this.options = t, this.observer =
|
|
13397
|
+
this.key = e, this.options = t, this.observer = op ? new ResizeObserver((e) => this.handle(e)) : null, this.handlersByNode = /* @__PURE__ */ new WeakMap(), this.nodeCount = 0;
|
|
13364
13398
|
}
|
|
13365
13399
|
observe(e, t) {
|
|
13366
13400
|
let n = this.handlersByNode.get(e);
|
|
@@ -13368,7 +13402,7 @@ var ip = typeof ResizeObserver < "u", ap = {}, op = class e {
|
|
|
13368
13402
|
}
|
|
13369
13403
|
unobserve(e, t) {
|
|
13370
13404
|
let n = this.handlersByNode.get(e);
|
|
13371
|
-
n?.delete(t) && n.size === 0 && (this.handlersByNode.delete(e), this.observer?.unobserve(e), --this.nodeCount === 0 && delete
|
|
13405
|
+
n?.delete(t) && n.size === 0 && (this.handlersByNode.delete(e), this.observer?.unobserve(e), --this.nodeCount === 0 && delete sp[this.key]);
|
|
13372
13406
|
}
|
|
13373
13407
|
handle(e) {
|
|
13374
13408
|
for (let t of e) {
|
|
@@ -13387,14 +13421,14 @@ var ip = typeof ResizeObserver < "u", ap = {}, op = class e {
|
|
|
13387
13421
|
}
|
|
13388
13422
|
static getObserver({ box: t = "content-box" } = {}) {
|
|
13389
13423
|
let n = { box: t }, r = JSON.stringify(n);
|
|
13390
|
-
return
|
|
13424
|
+
return sp[r] ||= new e(r, n), sp[r];
|
|
13391
13425
|
}
|
|
13392
|
-
},
|
|
13426
|
+
}, lp = class extends Error {
|
|
13393
13427
|
constructor(e) {
|
|
13394
13428
|
super(`Request failed with status code: ${e.status} (${e.statusText})`), this.response = e;
|
|
13395
13429
|
}
|
|
13396
13430
|
};
|
|
13397
|
-
async function
|
|
13431
|
+
async function up(e, { url: t, method: n = "get", query: r = null, headers: i = null, data: a = null, signal: o = null, timeout: s = e.timeout ?? null }) {
|
|
13398
13432
|
let c = e.isApiUrl(t), l = [o, s && AbortSignal.timeout(s)];
|
|
13399
13433
|
o = AbortSignal.any(l.filter(Boolean));
|
|
13400
13434
|
let u = await fetch(e.getApiUrl({
|
|
@@ -13410,23 +13444,23 @@ async function cp(e, { url: t, method: n = "get", query: r = null, headers: i =
|
|
|
13410
13444
|
credentials: c && e.cors?.credentials ? "include" : "same-origin",
|
|
13411
13445
|
signal: o
|
|
13412
13446
|
});
|
|
13413
|
-
if (u.headers.get("Content-Type")?.includes("application/json") && (u.data = await u.json()), !u.ok) throw new
|
|
13447
|
+
if (u.headers.get("Content-Type")?.includes("application/json") && (u.data = await u.json()), !u.ok) throw new lp(u);
|
|
13414
13448
|
return u;
|
|
13415
13449
|
}
|
|
13416
|
-
function
|
|
13450
|
+
function dp(e, t) {
|
|
13417
13451
|
return !Ne(t) || t.startsWith(e.url);
|
|
13418
13452
|
}
|
|
13419
|
-
function
|
|
13420
|
-
!t.startsWith(e.url) && !Ne(t) && (t =
|
|
13421
|
-
let r =
|
|
13453
|
+
function fp(e, { url: t, query: n }) {
|
|
13454
|
+
!t.startsWith(e.url) && !Ne(t) && (t = pp(e.url, t));
|
|
13455
|
+
let r = nu(n);
|
|
13422
13456
|
return r ? `${t}${t.includes("?") ? "&" : "?"}${r}` : t;
|
|
13423
13457
|
}
|
|
13424
|
-
function
|
|
13458
|
+
function pp(e, t) {
|
|
13425
13459
|
return `${e.replace(/\/+$/, "")}/${t.replace(/^\/+/, "")}`;
|
|
13426
13460
|
}
|
|
13427
13461
|
//#endregion
|
|
13428
13462
|
//#region src/verbs.js
|
|
13429
|
-
var
|
|
13463
|
+
var mp = [
|
|
13430
13464
|
"create",
|
|
13431
13465
|
"created",
|
|
13432
13466
|
"save",
|
|
@@ -13451,9 +13485,9 @@ var fp = [
|
|
|
13451
13485
|
"dragged",
|
|
13452
13486
|
"login",
|
|
13453
13487
|
"logged in"
|
|
13454
|
-
].reduce((e, t) => (e[t] = t, e), {}),
|
|
13488
|
+
].reduce((e, t) => (e[t] = t, e), {}), hp = class {
|
|
13455
13489
|
constructor(e, { dito: t = {}, api: n, views: r = {}, ...i } = {}) {
|
|
13456
|
-
this.el = e, this.api = n = be({ base: "/" }, t.api, n), this.options = i, n.locale ||= "en-US", n.formats = be({}, Te, n.formats), n.request ||= (e) =>
|
|
13490
|
+
this.el = e, this.api = n = be({ base: "/" }, t.api, n), this.options = i, n.locale ||= "en-US", n.formats = be({}, Te, n.formats), n.request ||= (e) => up(n, e), n.getApiUrl ||= (e) => fp(n, e), n.isApiUrl ||= (e) => dp(n, e), n.normalizePath ||= n.normalizePaths ? Me : (e) => e, n.denormalizePath ||= n.normalizePaths ? xe : (e) => e, n.defaults ||= {};
|
|
13457
13491
|
let a = J(n.users, { type: "collection" }) || {};
|
|
13458
13492
|
a.login = J(a.login || "login", {
|
|
13459
13493
|
method: "post",
|
|
@@ -13489,14 +13523,14 @@ var fp = [
|
|
|
13489
13523
|
}, L(e) && (e = document.querySelector(e));
|
|
13490
13524
|
let s = this.app = o({
|
|
13491
13525
|
components: {
|
|
13492
|
-
DitoRoot:
|
|
13526
|
+
DitoRoot: Ho,
|
|
13493
13527
|
VueNotifications: ye,
|
|
13494
|
-
...
|
|
13495
|
-
...
|
|
13528
|
+
...Cl,
|
|
13529
|
+
...np
|
|
13496
13530
|
},
|
|
13497
13531
|
provide: {
|
|
13498
13532
|
api: n,
|
|
13499
|
-
$verbs: () =>
|
|
13533
|
+
$verbs: () => mp,
|
|
13500
13534
|
$views: () => {},
|
|
13501
13535
|
$isPopulated: () => !0,
|
|
13502
13536
|
$parentComponent: () => null,
|
|
@@ -13510,7 +13544,7 @@ var fp = [
|
|
|
13510
13544
|
$panelComponent: () => null,
|
|
13511
13545
|
$tabComponent: () => null
|
|
13512
13546
|
},
|
|
13513
|
-
render: () => g(
|
|
13547
|
+
render: () => g(Ho, {
|
|
13514
13548
|
ref: "root",
|
|
13515
13549
|
class: t.settings.rootClass,
|
|
13516
13550
|
unresolvedViews: r,
|
|
@@ -13520,7 +13554,7 @@ var fp = [
|
|
|
13520
13554
|
s.config.errorHandler = console.error, s.use(ye, {
|
|
13521
13555
|
componentName: "VueNotifications",
|
|
13522
13556
|
name: "notify"
|
|
13523
|
-
}), s.directive("resize",
|
|
13557
|
+
}), s.directive("resize", rp), s.use(_e({
|
|
13524
13558
|
routes: [{
|
|
13525
13559
|
name: "catch-all",
|
|
13526
13560
|
path: "/:_(.*)",
|
|
@@ -13536,4 +13570,4 @@ var fp = [
|
|
|
13536
13570
|
}
|
|
13537
13571
|
};
|
|
13538
13572
|
//#endregion
|
|
13539
|
-
export {
|
|
13573
|
+
export { hp as default };
|