@ditojs/admin 3.1.3 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dito-admin.es.js +935 -910
- package/dist/dito-admin.umd.js +5 -5
- package/package.json +5 -5
- package/src/mixins/TypeMixin.js +16 -0
- package/src/mixins/ValueMixin.js +12 -4
- 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, () => G.createForSchema(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;
|
|
@@ -1385,12 +1391,15 @@ var ai = {
|
|
|
1385
1391
|
}
|
|
1386
1392
|
},
|
|
1387
1393
|
created() {
|
|
1388
|
-
this._register(!0), this.setupSchemaFields();
|
|
1394
|
+
this._register(!0), this.setupSchemaFields(), this.warnAboutUncomputedValue();
|
|
1389
1395
|
},
|
|
1390
1396
|
unmounted() {
|
|
1391
1397
|
this._register(!1);
|
|
1392
1398
|
},
|
|
1393
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
|
+
},
|
|
1394
1403
|
_register(e) {
|
|
1395
1404
|
this.$emit("update:component", e ? this : null), this._registerWithSchemaComponent(e, this.componentPath);
|
|
1396
1405
|
},
|
|
@@ -1474,14 +1483,14 @@ async function ci(e, t = si) {
|
|
|
1474
1483
|
})) : I(n) && (n = Object.fromEntries(await qe(Object.entries(n), async ([e, n]) => [e, await t(n, !0)]))), n;
|
|
1475
1484
|
}
|
|
1476
1485
|
async function li(e) {
|
|
1477
|
-
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 = {
|
|
1478
1487
|
...e,
|
|
1479
1488
|
name: xe(e.label),
|
|
1480
1489
|
items: await ci(e.items)
|
|
1481
1490
|
}), e));
|
|
1482
1491
|
}
|
|
1483
1492
|
function ui(e) {
|
|
1484
|
-
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), []));
|
|
1485
1494
|
}
|
|
1486
1495
|
async function di(e) {
|
|
1487
1496
|
let { component: t } = e;
|
|
@@ -1506,19 +1515,19 @@ function mi(e, t, n = null, r = 0, i = 1) {
|
|
|
1506
1515
|
let i = [], o = (t, a, o) => {
|
|
1507
1516
|
i.push(hi(e, t, a, n, r + o));
|
|
1508
1517
|
};
|
|
1509
|
-
return hn(t, o), mn(
|
|
1518
|
+
return hn(t, o), mn(Pn(t), o), Promise.all(i);
|
|
1510
1519
|
}
|
|
1511
1520
|
}
|
|
1512
1521
|
}
|
|
1513
1522
|
function hi(e, t, n, r = null, i = 0) {
|
|
1514
|
-
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)]);
|
|
1515
1524
|
}
|
|
1516
1525
|
async function gi(e, t, n, r, i = "") {
|
|
1517
1526
|
_i(t, n), yi(t, n, r, i);
|
|
1518
1527
|
let a = [];
|
|
1519
|
-
if (
|
|
1520
|
-
else if (
|
|
1521
|
-
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)}'`);
|
|
1522
1531
|
return {
|
|
1523
1532
|
path: n.fullPath,
|
|
1524
1533
|
children: a,
|
|
@@ -1536,7 +1545,7 @@ function _i(e, t) {
|
|
|
1536
1545
|
function vi(e, t) {
|
|
1537
1546
|
hn(t, (t) => {
|
|
1538
1547
|
_i(e, t);
|
|
1539
|
-
let n =
|
|
1548
|
+
let n = or(t);
|
|
1540
1549
|
for (let t of Object.values(n)) vi(e, t);
|
|
1541
1550
|
});
|
|
1542
1551
|
}
|
|
@@ -1551,15 +1560,15 @@ async function bi(e, t, n) {
|
|
|
1551
1560
|
}, r, n, s), r;
|
|
1552
1561
|
}
|
|
1553
1562
|
async function xi(e, t, n = null, r = 0, i = 1) {
|
|
1554
|
-
if (t = await si(t, !0), !
|
|
1563
|
+
if (t = await si(t, !0), !bn(t)) throw Error(`Invalid form schema: '${En(t)}'`);
|
|
1555
1564
|
return _i(e, t), await wi(e, t), await mi(e, t, n, r, i), t;
|
|
1556
1565
|
}
|
|
1557
1566
|
async function Si(e, t) {
|
|
1558
|
-
if (t = await si(t, !0), !
|
|
1567
|
+
if (t = await si(t, !0), !Sn(t)) throw Error(`Invalid tab schema: '${En(t)}'`);
|
|
1559
1568
|
return _i(e, t), t;
|
|
1560
1569
|
}
|
|
1561
1570
|
async function Ci(e, t) {
|
|
1562
|
-
if (t = await si(t, !0), !
|
|
1571
|
+
if (t = await si(t, !0), !Cn(t)) throw Error(`Invalid panel schema: '${En(t)}'`);
|
|
1563
1572
|
return _i(e, t), t;
|
|
1564
1573
|
}
|
|
1565
1574
|
async function wi(e, t) {
|
|
@@ -1595,7 +1604,7 @@ function Ei(e, t) {
|
|
|
1595
1604
|
//#endregion
|
|
1596
1605
|
//#region src/mixins/DitoMixin.js
|
|
1597
1606
|
var Di = {
|
|
1598
|
-
mixins: [
|
|
1607
|
+
mixins: [Hn],
|
|
1599
1608
|
inject: [
|
|
1600
1609
|
"api",
|
|
1601
1610
|
"$verbs",
|
|
@@ -1651,7 +1660,7 @@ var Di = {
|
|
|
1651
1660
|
return this.api.locale;
|
|
1652
1661
|
},
|
|
1653
1662
|
context() {
|
|
1654
|
-
return new
|
|
1663
|
+
return new G(this, { nested: !1 });
|
|
1655
1664
|
},
|
|
1656
1665
|
rootComponent() {
|
|
1657
1666
|
return this.$root.$refs.root;
|
|
@@ -1749,7 +1758,7 @@ var Di = {
|
|
|
1749
1758
|
this.getChildStore(e, t), this.removeStore(e);
|
|
1750
1759
|
},
|
|
1751
1760
|
getSchemaValue(e, { type: t, default: n, schema: r = this.schema, context: i = this.context, callback: a = !0 } = {}) {
|
|
1752
|
-
return
|
|
1761
|
+
return _r(e, {
|
|
1753
1762
|
type: t,
|
|
1754
1763
|
schema: r,
|
|
1755
1764
|
context: i,
|
|
@@ -1780,7 +1789,7 @@ var Di = {
|
|
|
1780
1789
|
};
|
|
1781
1790
|
},
|
|
1782
1791
|
shouldRenderSchema(e = null) {
|
|
1783
|
-
return
|
|
1792
|
+
return vr(e, this.context);
|
|
1784
1793
|
},
|
|
1785
1794
|
shouldShowSchema(e = null) {
|
|
1786
1795
|
return this.getSchemaValue("visible", {
|
|
@@ -1916,7 +1925,7 @@ var Di = {
|
|
|
1916
1925
|
emitEvent(e, { context: t = null, parent: n = null } = {}) {
|
|
1917
1926
|
let r = this.hasListeners(e), i = n?.hasListeners(e);
|
|
1918
1927
|
if (r || i) {
|
|
1919
|
-
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);
|
|
1920
1929
|
return ["load", "change"].includes(e) ? this.$nextTick(s) : s();
|
|
1921
1930
|
}
|
|
1922
1931
|
},
|
|
@@ -4148,7 +4157,7 @@ var xo = class {
|
|
|
4148
4157
|
derivedValueDataPaths = null;
|
|
4149
4158
|
constructor({ component: e, getSchema: t, getData: n, getSourceSchema: r = null }) {
|
|
4150
4159
|
this.component = e, this.getSchema = t, this.getData = n, this.getSourceSchema = r, this.rootScope = m(!0), this.rootScope.run(() => {
|
|
4151
|
-
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);
|
|
4152
4161
|
});
|
|
4153
4162
|
}
|
|
4154
4163
|
get dataPath() {
|
|
@@ -4190,12 +4199,12 @@ var xo = class {
|
|
|
4190
4199
|
}
|
|
4191
4200
|
getProcessedDataForDirtyCheck() {
|
|
4192
4201
|
let e = this.getSchema(), t = this.getData();
|
|
4193
|
-
return t && !
|
|
4202
|
+
return t && !dr(e) ? jr(e, this.getSourceSchema(), t, this.dataPath, {
|
|
4194
4203
|
component: this.component.mainSchemaComponent ?? this.component,
|
|
4195
4204
|
rootData: this.rootData,
|
|
4196
4205
|
schemaOnly: !0,
|
|
4197
4206
|
target: "clipboard",
|
|
4198
|
-
|
|
4207
|
+
shouldCallProcess: !1
|
|
4199
4208
|
}) : null;
|
|
4200
4209
|
}
|
|
4201
4210
|
async applyCleanChanges(e) {
|
|
@@ -4213,7 +4222,7 @@ var xo = class {
|
|
|
4213
4222
|
this.pendingLoads.add(e), e.finally(() => this.pendingLoads.delete(e));
|
|
4214
4223
|
}
|
|
4215
4224
|
initializeData(e, t) {
|
|
4216
|
-
t && !
|
|
4225
|
+
t && !dr(e) && Dr(e, t, this.component, {
|
|
4217
4226
|
dataPath: this.dataPath,
|
|
4218
4227
|
rootData: this.rootData,
|
|
4219
4228
|
shouldSkipSourcesWithResource: !0,
|
|
@@ -4222,13 +4231,13 @@ var xo = class {
|
|
|
4222
4231
|
}
|
|
4223
4232
|
getDataEntries() {
|
|
4224
4233
|
let e = this.getSchema(), t = this.getData(), n = /* @__PURE__ */ new Map(), r = [];
|
|
4225
|
-
return t && !
|
|
4234
|
+
return t && !dr(e) && Mr(e, t, {
|
|
4226
4235
|
dataPath: this.dataPath,
|
|
4227
4236
|
componentPath: this.componentPath,
|
|
4228
4237
|
shouldProcess: (e) => this.isEntryShown(e),
|
|
4229
4238
|
shouldSkipSourcesWithResource: !0,
|
|
4230
4239
|
before: (e) => {
|
|
4231
|
-
|
|
4240
|
+
Do(e.schema) && n.set(e.componentPath, e), this.shouldSetDefaultValue(e) && r.push(e);
|
|
4232
4241
|
},
|
|
4233
4242
|
options: {
|
|
4234
4243
|
component: this.component,
|
|
@@ -4240,7 +4249,7 @@ var xo = class {
|
|
|
4240
4249
|
};
|
|
4241
4250
|
}
|
|
4242
4251
|
isEntryShown(e) {
|
|
4243
|
-
return e.schema.if === void 0 ||
|
|
4252
|
+
return e.schema.if === void 0 || _r("if", {
|
|
4244
4253
|
type: Boolean,
|
|
4245
4254
|
schema: e.schema,
|
|
4246
4255
|
context: this.createEntryContext(e),
|
|
@@ -4273,27 +4282,40 @@ var xo = class {
|
|
|
4273
4282
|
let t = this.rootScope.run(() => m());
|
|
4274
4283
|
return t.run(() => {
|
|
4275
4284
|
let t = a(() => this.isEntryCurrent(e));
|
|
4276
|
-
if (e.schema.compute && me(() => t.value ?
|
|
4285
|
+
if (e.schema.compute && me(() => t.value ? this.getComputedValueResult(e) : null, (t) => {
|
|
4277
4286
|
t && this.writeComputedValue(e, t.value);
|
|
4278
|
-
},
|
|
4287
|
+
}, To), wr(e.schema)) {
|
|
4279
4288
|
let n = this.createDataSchemaResolver(e.schema, e);
|
|
4280
4289
|
me(() => t.value && !n.isLoading ? { value: n.value } : null, (t) => {
|
|
4281
4290
|
t && this.writeComputedValue(e, t.value);
|
|
4282
|
-
},
|
|
4291
|
+
}, To);
|
|
4283
4292
|
}
|
|
4284
4293
|
}), t;
|
|
4285
4294
|
}
|
|
4295
|
+
hasComputedValueEntry(e) {
|
|
4296
|
+
return this.dataEntries.value.computedValueEntries.has(e);
|
|
4297
|
+
}
|
|
4286
4298
|
isEntryCurrent({ componentPath: e, schema: t, data: n }) {
|
|
4287
4299
|
let r = this.dataEntries.value.computedValueEntries.get(e);
|
|
4288
4300
|
return r?.schema === t && r.data === n;
|
|
4289
4301
|
}
|
|
4290
|
-
|
|
4302
|
+
getComputedValueResult(e) {
|
|
4291
4303
|
let { schema: t, data: n, name: r, dataPath: i } = e;
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
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;
|
|
4297
4319
|
}
|
|
4298
4320
|
getOptions(e) {
|
|
4299
4321
|
return this.getOptionsResolver(e).value;
|
|
@@ -4316,10 +4338,10 @@ var xo = class {
|
|
|
4316
4338
|
N(t, n[r]) || (this.derivedValueDataPaths?.add(this.getRelativeDataPath(e)), n[r] = t);
|
|
4317
4339
|
}
|
|
4318
4340
|
getRelativeDataPath({ schema: e, name: t, dataPath: n }) {
|
|
4319
|
-
return (
|
|
4341
|
+
return (An(e) ? B(n) : [...B(n), t]).slice(B(this.dataPath).length).join("/");
|
|
4320
4342
|
}
|
|
4321
4343
|
createEntryContext({ schema: e, data: t, name: n, dataPath: r }) {
|
|
4322
|
-
return
|
|
4344
|
+
return G.createForSchema(this.component, {
|
|
4323
4345
|
schema: e,
|
|
4324
4346
|
name: n,
|
|
4325
4347
|
data: t,
|
|
@@ -4347,14 +4369,17 @@ function Co(e, t, n) {
|
|
|
4347
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];
|
|
4348
4370
|
return r;
|
|
4349
4371
|
}
|
|
4350
|
-
var wo = Symbol("notFound")
|
|
4351
|
-
|
|
4372
|
+
var wo = Symbol("notFound"), To = {
|
|
4373
|
+
immediate: !0,
|
|
4374
|
+
flush: "post"
|
|
4375
|
+
}, Eo = Symbol("optionsNotLoaded");
|
|
4376
|
+
function Do(e) {
|
|
4352
4377
|
return !!e.compute || wr(e);
|
|
4353
4378
|
}
|
|
4354
4379
|
//#endregion
|
|
4355
4380
|
//#region src/components/DitoView.vue?vue&type=template&lang.js
|
|
4356
|
-
var
|
|
4357
|
-
function
|
|
4381
|
+
var Oo = ["data-resource"];
|
|
4382
|
+
function ko(e, n, r, i, a, o) {
|
|
4358
4383
|
let u = w("DitoRouterView"), d = w("DitoSchema");
|
|
4359
4384
|
return e.user && e.shouldRenderSchema(e.viewSchema) ? (x(), l(t, { key: 0 }, [e.isLastRoute ? (x(), l("div", {
|
|
4360
4385
|
key: 1,
|
|
@@ -4376,12 +4401,12 @@ function Do(e, n, r, i, a, o) {
|
|
|
4376
4401
|
"meta",
|
|
4377
4402
|
"store",
|
|
4378
4403
|
"disabled"
|
|
4379
|
-
]))], 8,
|
|
4404
|
+
]))], 8, Oo)) : (x(), s(u, {
|
|
4380
4405
|
key: 0,
|
|
4381
4406
|
routeLevel: e.routeLevel + 1
|
|
4382
4407
|
}, null, 8, ["routeLevel"]))], 64)) : c("", !0);
|
|
4383
4408
|
}
|
|
4384
|
-
var
|
|
4409
|
+
var Ao = /*#__PURE__*/ X(Y.component("DitoView", {
|
|
4385
4410
|
mixins: [vo],
|
|
4386
4411
|
provide() {
|
|
4387
4412
|
return {
|
|
@@ -4406,7 +4431,7 @@ var Oo = /*#__PURE__*/ X(Y.component("DitoView", {
|
|
|
4406
4431
|
return !0;
|
|
4407
4432
|
},
|
|
4408
4433
|
isSingleComponentView() {
|
|
4409
|
-
return
|
|
4434
|
+
return Dn(this.schema);
|
|
4410
4435
|
},
|
|
4411
4436
|
mainComponent() {
|
|
4412
4437
|
return this.mainSchemaComponent?.getComponentByDataPath(this.name);
|
|
@@ -4456,10 +4481,10 @@ var Oo = /*#__PURE__*/ X(Y.component("DitoView", {
|
|
|
4456
4481
|
this.isLoading = !!e;
|
|
4457
4482
|
}
|
|
4458
4483
|
}
|
|
4459
|
-
}), [["render",
|
|
4484
|
+
}), [["render", ko]]);
|
|
4460
4485
|
//#endregion
|
|
4461
4486
|
//#region ../../node_modules/@vueuse/integrations/dist/useFocusTrap.js
|
|
4462
|
-
function
|
|
4487
|
+
function jo(e, t = {}) {
|
|
4463
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 = () => {
|
|
4464
4489
|
n && (n.pause(), s.value = !0);
|
|
4465
4490
|
}, d = () => {
|
|
@@ -4498,16 +4523,16 @@ function ko(e, t = {}) {
|
|
|
4498
4523
|
}
|
|
4499
4524
|
//#endregion
|
|
4500
4525
|
//#region ../../node_modules/@vueuse/integrations/dist/useFocusTrap/component.js
|
|
4501
|
-
var
|
|
4502
|
-
let n = ae(), r = re(
|
|
4526
|
+
var Mo = /* #__PURE__ */ p((e, { slots: t }) => {
|
|
4527
|
+
let n = ae(), r = re(jo(n, e.options));
|
|
4503
4528
|
return () => {
|
|
4504
4529
|
if (t.default) return g(e.as || "div", { ref: n }, t.default(r));
|
|
4505
4530
|
};
|
|
4506
4531
|
}, {
|
|
4507
4532
|
name: "UseFocusTrap",
|
|
4508
4533
|
props: ["as", "options"]
|
|
4509
|
-
}),
|
|
4510
|
-
function
|
|
4534
|
+
}), No = ["aria-label"];
|
|
4535
|
+
function Po(e, t, n, r, i, a) {
|
|
4511
4536
|
let o = w("DitoButtons"), s = w("DitoSchema"), c = w("UseFocusTrap");
|
|
4512
4537
|
return x(), l("div", {
|
|
4513
4538
|
class: "dito-dialog",
|
|
@@ -4540,11 +4565,11 @@ function Mo(e, t, n, r, i, a) {
|
|
|
4540
4565
|
_: 1
|
|
4541
4566
|
}, 8, ["schema", "data"])], 32)]),
|
|
4542
4567
|
_: 1
|
|
4543
|
-
}, 8, ["options"])], 44,
|
|
4568
|
+
}, 8, ["options"])], 44, No);
|
|
4544
4569
|
}
|
|
4545
|
-
var
|
|
4570
|
+
var Fo = /*#__PURE__*/ X(Y.component("DitoDialog", {
|
|
4546
4571
|
mixins: [mo],
|
|
4547
|
-
components: { UseFocusTrap:
|
|
4572
|
+
components: { UseFocusTrap: Mo },
|
|
4548
4573
|
emits: ["remove"],
|
|
4549
4574
|
provide() {
|
|
4550
4575
|
return { $dialogComponent: () => this };
|
|
@@ -4590,7 +4615,7 @@ var No = /*#__PURE__*/ X(Y.component("DitoDialog", {
|
|
|
4590
4615
|
};
|
|
4591
4616
|
},
|
|
4592
4617
|
buttonSchemas() {
|
|
4593
|
-
return Object.fromEntries(Object.entries(
|
|
4618
|
+
return Object.fromEntries(Object.entries(pr(this.buttons)).map(([e, t]) => (e === "cancel" && !t.events && (t = {
|
|
4594
4619
|
...t,
|
|
4595
4620
|
events: { click: () => this.cancel() }
|
|
4596
4621
|
}), [e, t])));
|
|
@@ -4650,15 +4675,15 @@ var No = /*#__PURE__*/ X(Y.component("DitoDialog", {
|
|
|
4650
4675
|
this.settings.clickToClose && this.close();
|
|
4651
4676
|
}
|
|
4652
4677
|
}
|
|
4653
|
-
}), [["render",
|
|
4678
|
+
}), [["render", Po]]), Io = [
|
|
4654
4679
|
"data-agent-browser",
|
|
4655
4680
|
"data-agent-platform",
|
|
4656
4681
|
"data-agent-version"
|
|
4657
|
-
],
|
|
4682
|
+
], Lo = {
|
|
4658
4683
|
key: 0,
|
|
4659
4684
|
class: "dito-drag-overlay"
|
|
4660
4685
|
};
|
|
4661
|
-
function
|
|
4686
|
+
function Ro(e, n, a, o, d, p) {
|
|
4662
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");
|
|
4663
4688
|
return x(), l("div", {
|
|
4664
4689
|
class: "dito-root",
|
|
@@ -4667,7 +4692,7 @@ function Io(e, n, a, o, d, p) {
|
|
|
4667
4692
|
"data-agent-version": e.appState.agent.versionNumber
|
|
4668
4693
|
}, [
|
|
4669
4694
|
f(r, { name: "dito-drag" }, {
|
|
4670
|
-
default: O(() => [e.isDraggingFiles ? (x(), l("div",
|
|
4695
|
+
default: O(() => [e.isDraggingFiles ? (x(), l("div", Lo)) : c("", !0)]),
|
|
4671
4696
|
_: 1
|
|
4672
4697
|
}),
|
|
4673
4698
|
f(i, { name: "dito-dialog" }, {
|
|
@@ -4703,13 +4728,13 @@ function Io(e, n, a, o, d, p) {
|
|
|
4703
4728
|
_: 1
|
|
4704
4729
|
}),
|
|
4705
4730
|
f(te, { ref: "notifications" }, null, 512)
|
|
4706
|
-
], 8,
|
|
4731
|
+
], 8, Io);
|
|
4707
4732
|
}
|
|
4708
4733
|
//#endregion
|
|
4709
4734
|
//#region src/components/DitoRoot.vue
|
|
4710
|
-
var
|
|
4735
|
+
var zo = Y.component("DitoRoot", {
|
|
4711
4736
|
mixins: [mo],
|
|
4712
|
-
components: { DitoDialog:
|
|
4737
|
+
components: { DitoDialog: Fo },
|
|
4713
4738
|
provide() {
|
|
4714
4739
|
return { $views: () => this.resolvedViews };
|
|
4715
4740
|
},
|
|
@@ -4838,7 +4863,7 @@ var Lo = Y.component("DitoRoot", {
|
|
|
4838
4863
|
type: "dialog",
|
|
4839
4864
|
components: e
|
|
4840
4865
|
}, o, 0), o.length > 0) throw Error("Dialogs do not support components that produce routes");
|
|
4841
|
-
let s = `dialog-${++
|
|
4866
|
+
let s = `dialog-${++Bo}`;
|
|
4842
4867
|
this.dialogs[s] = {
|
|
4843
4868
|
components: e,
|
|
4844
4869
|
buttons: t,
|
|
@@ -4936,8 +4961,8 @@ var Lo = Y.component("DitoRoot", {
|
|
|
4936
4961
|
} catch (e) {
|
|
4937
4962
|
return e.request || console.error(e), this.login();
|
|
4938
4963
|
}
|
|
4939
|
-
let e = await qe(Object.entries(this.resolvedViews), ([e, t]) => gi(
|
|
4940
|
-
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, [{
|
|
4941
4966
|
name: "root",
|
|
4942
4967
|
path: "/",
|
|
4943
4968
|
components: {}
|
|
@@ -4947,37 +4972,37 @@ var Lo = Y.component("DitoRoot", {
|
|
|
4947
4972
|
this.pageWidth = e;
|
|
4948
4973
|
}
|
|
4949
4974
|
}
|
|
4950
|
-
}),
|
|
4951
|
-
function
|
|
4975
|
+
}), Bo = 0;
|
|
4976
|
+
function Vo(e, t) {
|
|
4952
4977
|
let n = [];
|
|
4953
4978
|
for (let r of t) n.push(e.addRoute(r));
|
|
4954
4979
|
return () => {
|
|
4955
4980
|
for (let e of n) e();
|
|
4956
4981
|
};
|
|
4957
4982
|
}
|
|
4958
|
-
var
|
|
4983
|
+
var Ho = /*#__PURE__*/ X(zo, [["render", Ro]]), Uo = { class: "dito-menu__item" }, Wo = [
|
|
4959
4984
|
"href",
|
|
4960
4985
|
"aria-current",
|
|
4961
4986
|
"onClick"
|
|
4962
4987
|
];
|
|
4963
|
-
function
|
|
4988
|
+
function Go(e, n, r, i, a, o) {
|
|
4964
4989
|
let d = w("DitoMenu", !0), f = ie("resize");
|
|
4965
4990
|
return k((x(), l("ul", {
|
|
4966
4991
|
class: "dito-menu",
|
|
4967
4992
|
style: b({ "--width": e.width ? `${e.width}px` : null })
|
|
4968
|
-
}, [(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", {
|
|
4969
4994
|
class: y(["dito-menu__link", { "dito-menu__link--active": e.isActiveItem(n) }]),
|
|
4970
4995
|
href: e.getItemHref(n),
|
|
4971
4996
|
"aria-current": e.isActiveItem(n) ? "page" : null,
|
|
4972
4997
|
onClick: A((t) => e.onClickItem(n), ["prevent", "stop"])
|
|
4973
|
-
}, E(e.getLabel(n)), 11,
|
|
4998
|
+
}, E(e.getLabel(n)), 11, Wo), n.items ? (x(), s(d, {
|
|
4974
4999
|
key: 0,
|
|
4975
5000
|
class: "dito-menu__sub",
|
|
4976
5001
|
items: n.items,
|
|
4977
5002
|
path: e.getItemPath(n, !1)
|
|
4978
5003
|
}, null, 8, ["items", "path"])) : c("", !0)], 64)) : c("", !0)]))), 256))], 4)), [[f, e.onResize]]);
|
|
4979
5004
|
}
|
|
4980
|
-
var
|
|
5005
|
+
var Ko = /*#__PURE__*/ X(Y.component("DitoMenu", {
|
|
4981
5006
|
props: {
|
|
4982
5007
|
items: {
|
|
4983
5008
|
type: [Object, Array],
|
|
@@ -5017,23 +5042,23 @@ var Wo = /*#__PURE__*/ X(Y.component("DitoMenu", {
|
|
|
5017
5042
|
});
|
|
5018
5043
|
}
|
|
5019
5044
|
}
|
|
5020
|
-
}), [["render",
|
|
5045
|
+
}), [["render", Go]]), qo = {
|
|
5021
5046
|
class: "dito-trail",
|
|
5022
5047
|
"aria-label": "Breadcrumb"
|
|
5023
|
-
},
|
|
5048
|
+
}, Jo = [
|
|
5024
5049
|
"aria-current",
|
|
5025
5050
|
"href",
|
|
5026
5051
|
"onClick"
|
|
5027
5052
|
];
|
|
5028
|
-
function
|
|
5029
|
-
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", {
|
|
5030
5055
|
class: y(["dito-trail__link", { "dito-trail__link--active": t.path === e.$route.path }]),
|
|
5031
5056
|
"aria-current": t.path === e.$route.path ? "page" : null,
|
|
5032
5057
|
href: e.getComponentHref(t),
|
|
5033
5058
|
onClick: A((n) => e.onClickComponent(t), ["prevent", "stop"])
|
|
5034
|
-
}, [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")]);
|
|
5035
5060
|
}
|
|
5036
|
-
var
|
|
5061
|
+
var Xo = /*#__PURE__*/ X(Y.component("DitoTrail", {
|
|
5037
5062
|
computed: { trail() {
|
|
5038
5063
|
return this.appState.routeComponents.filter((e) => !e.isLeavingRoute);
|
|
5039
5064
|
} },
|
|
@@ -5052,8 +5077,8 @@ var Jo = /*#__PURE__*/ X(Y.component("DitoTrail", {
|
|
|
5052
5077
|
});
|
|
5053
5078
|
}
|
|
5054
5079
|
}
|
|
5055
|
-
}), [["render",
|
|
5056
|
-
function
|
|
5080
|
+
}), [["render", Yo]]), Zo = ["aria-busy"];
|
|
5081
|
+
function Qo(e, t, n, r, i, a) {
|
|
5057
5082
|
let o = w("DitoSpinner"), d = w("DitoTrail");
|
|
5058
5083
|
return x(), l("nav", {
|
|
5059
5084
|
class: "dito-header",
|
|
@@ -5069,9 +5094,9 @@ function Xo(e, t, n, r, i, a) {
|
|
|
5069
5094
|
}),
|
|
5070
5095
|
t[0] ||= u("div", { class: "dito-header__teleport" }, null, -1),
|
|
5071
5096
|
C(e.$slots, "default")
|
|
5072
|
-
], 8,
|
|
5097
|
+
], 8, Zo);
|
|
5073
5098
|
}
|
|
5074
|
-
var
|
|
5099
|
+
var $o = /*#__PURE__*/ X(Y.component("DitoHeader", { props: {
|
|
5075
5100
|
spinner: {
|
|
5076
5101
|
type: Object,
|
|
5077
5102
|
default: null
|
|
@@ -5080,13 +5105,13 @@ var Zo = /*#__PURE__*/ X(Y.component("DitoHeader", { props: {
|
|
|
5080
5105
|
type: Boolean,
|
|
5081
5106
|
default: !1
|
|
5082
5107
|
}
|
|
5083
|
-
} }), [["render",
|
|
5108
|
+
} }), [["render", Qo]]), es = {
|
|
5084
5109
|
class: "dito-navigation dito-scroll-parent",
|
|
5085
5110
|
"aria-label": "Main navigation"
|
|
5086
5111
|
};
|
|
5087
|
-
function
|
|
5112
|
+
function ts(e, t, n, r, i, a) {
|
|
5088
5113
|
let o = w("RouterLink"), s = w("DitoMenu");
|
|
5089
|
-
return x(), l("nav",
|
|
5114
|
+
return x(), l("nav", es, [u("h1", null, [f(o, {
|
|
5090
5115
|
class: "dito-link",
|
|
5091
5116
|
to: "/"
|
|
5092
5117
|
}, {
|
|
@@ -5097,13 +5122,13 @@ function $o(e, t, n, r, i, a) {
|
|
|
5097
5122
|
items: e.views
|
|
5098
5123
|
}, null, 8, ["items"])]);
|
|
5099
5124
|
}
|
|
5100
|
-
var
|
|
5125
|
+
var ns = /*#__PURE__*/ X(Y.component("DitoNavigation", {}), [["render", ts]]), rs = {
|
|
5101
5126
|
class: "dito-notifications",
|
|
5102
5127
|
"aria-live": "polite"
|
|
5103
|
-
},
|
|
5104
|
-
function
|
|
5128
|
+
}, is = { class: "dito-notifications__inner" };
|
|
5129
|
+
function as(e, t, n, r, i, a) {
|
|
5105
5130
|
let o = w("VueNotifications");
|
|
5106
|
-
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, {
|
|
5107
5132
|
ref: "notifications",
|
|
5108
5133
|
classes: "dito-notification",
|
|
5109
5134
|
dangerouslySetInnerHtml: !0,
|
|
@@ -5111,7 +5136,7 @@ function rs(e, t, n, r, i, a) {
|
|
|
5111
5136
|
width: ""
|
|
5112
5137
|
}, null, 512)])]);
|
|
5113
5138
|
}
|
|
5114
|
-
var
|
|
5139
|
+
var os = /*#__PURE__*/ X(Y.component("DitoNotifications", {
|
|
5115
5140
|
notifications() {
|
|
5116
5141
|
return this.isMounted && this.$refs.notifications;
|
|
5117
5142
|
},
|
|
@@ -5145,12 +5170,12 @@ var is = /*#__PURE__*/ X(Y.component("DitoNotifications", {
|
|
|
5145
5170
|
this.notifications.destroyAll();
|
|
5146
5171
|
}
|
|
5147
5172
|
}
|
|
5148
|
-
}), [["render",
|
|
5149
|
-
function
|
|
5173
|
+
}), [["render", as]]), ss = { class: "dito-header" };
|
|
5174
|
+
function cs(e, t, n, r, i, a) {
|
|
5150
5175
|
let o = ie("resize");
|
|
5151
|
-
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]]);
|
|
5152
5177
|
}
|
|
5153
|
-
var
|
|
5178
|
+
var ls = /*#__PURE__*/ X(Y.component("DitoSidebar", {
|
|
5154
5179
|
data() {
|
|
5155
5180
|
return { sidebarWidth: 0 };
|
|
5156
5181
|
},
|
|
@@ -5164,7 +5189,7 @@ var ss = /*#__PURE__*/ X(Y.component("DitoSidebar", {
|
|
|
5164
5189
|
methods: { onResizeSidebar({ contentRect: { width: e } }) {
|
|
5165
5190
|
this.sidebarWidth = e;
|
|
5166
5191
|
} }
|
|
5167
|
-
}), [["render",
|
|
5192
|
+
}), [["render", cs]]), us = {
|
|
5168
5193
|
mixins: [mo],
|
|
5169
5194
|
data() {
|
|
5170
5195
|
return { pulldown: {
|
|
@@ -5201,9 +5226,9 @@ var ss = /*#__PURE__*/ X(Y.component("DitoSidebar", {
|
|
|
5201
5226
|
this.pulldown.open = e, this.pulldown.startTime = e ? Date.now() : 0, e && (this.pulldown.handlers = this.domOn(document, this.pulldown.events));
|
|
5202
5227
|
}
|
|
5203
5228
|
}
|
|
5204
|
-
},
|
|
5205
|
-
function
|
|
5206
|
-
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", {
|
|
5207
5232
|
class: y(["dito-pulldown", { "dito-pulldown--open": e.pulldown.open }]),
|
|
5208
5233
|
role: "menu"
|
|
5209
5234
|
}, [(x(!0), l(t, null, S(e.items, (t, n) => (x(), l("li", null, [u("a", {
|
|
@@ -5211,10 +5236,10 @@ function ds(e, n, r, i, a, o) {
|
|
|
5211
5236
|
role: "menuitem",
|
|
5212
5237
|
onMousedown: A((t) => e.onPulldownMouseDown(n), ["stop"]),
|
|
5213
5238
|
onMouseup: (t) => e.onPulldownMouseUp(n)
|
|
5214
|
-
}, E(t), 41,
|
|
5239
|
+
}, E(t), 41, fs)]))), 256))], 2)]);
|
|
5215
5240
|
}
|
|
5216
|
-
var
|
|
5217
|
-
mixins: [
|
|
5241
|
+
var ms = /*#__PURE__*/ X(Y.component("DitoAccount", {
|
|
5242
|
+
mixins: [us],
|
|
5218
5243
|
data() {
|
|
5219
5244
|
return { items: {
|
|
5220
5245
|
settings: "Settings",
|
|
@@ -5229,10 +5254,10 @@ var fs = /*#__PURE__*/ X(Y.component("DitoAccount", {
|
|
|
5229
5254
|
case "settings": console.info("TODO: Implement Settings");
|
|
5230
5255
|
}
|
|
5231
5256
|
} }
|
|
5232
|
-
}), [["render",
|
|
5257
|
+
}), [["render", ps]]);
|
|
5233
5258
|
//#endregion
|
|
5234
5259
|
//#region src/components/DitoSpinner.vue?vue&type=template&lang.js
|
|
5235
|
-
function
|
|
5260
|
+
function hs(e, t, n, r, i, a) {
|
|
5236
5261
|
return k((x(), l("div", {
|
|
5237
5262
|
class: "dito-spinner",
|
|
5238
5263
|
role: "status",
|
|
@@ -5248,7 +5273,7 @@ function ps(e, t, n, r, i, a) {
|
|
|
5248
5273
|
u("div", { class: "dito-spinner__pulse dito-spinner__pulse3" }, null, -1)
|
|
5249
5274
|
]], 4)), [[D, e.loading]]);
|
|
5250
5275
|
}
|
|
5251
|
-
var
|
|
5276
|
+
var gs = /*#__PURE__*/ X(Y.component("DitoSpinner", { props: {
|
|
5252
5277
|
loading: {
|
|
5253
5278
|
type: Boolean,
|
|
5254
5279
|
default: !0
|
|
@@ -5265,10 +5290,10 @@ var ms = /*#__PURE__*/ X(Y.component("DitoSpinner", { props: {
|
|
|
5265
5290
|
type: String,
|
|
5266
5291
|
default: null
|
|
5267
5292
|
}
|
|
5268
|
-
} }), [["render",
|
|
5293
|
+
} }), [["render", hs]]);
|
|
5269
5294
|
//#endregion
|
|
5270
5295
|
//#region src/components/DitoAffix.vue?vue&type=template&lang.js
|
|
5271
|
-
function
|
|
5296
|
+
function _s(e, t, n, r, i, a) {
|
|
5272
5297
|
let o = w("DitoSpinner"), l = w("DitoIcon");
|
|
5273
5298
|
return e.item.type === "text" ? (x(), s(T(e.item.as || "div"), { key: 0 }, {
|
|
5274
5299
|
default: O(() => [d(E(e.item.text), 1)]),
|
|
@@ -5286,9 +5311,9 @@ function hs(e, t, n, r, i, a) {
|
|
|
5286
5311
|
disabled: e.item.disabled
|
|
5287
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);
|
|
5288
5313
|
}
|
|
5289
|
-
var
|
|
5314
|
+
var vs = /*#__PURE__*/ X(Y.component("DitoAffix", {
|
|
5290
5315
|
components: {
|
|
5291
|
-
DitoSpinner:
|
|
5316
|
+
DitoSpinner: gs,
|
|
5292
5317
|
DitoIcon: ka
|
|
5293
5318
|
},
|
|
5294
5319
|
props: {
|
|
@@ -5304,8 +5329,8 @@ var gs = /*#__PURE__*/ X(Y.component("DitoAffix", {
|
|
|
5304
5329
|
computed: { context() {
|
|
5305
5330
|
return this.parentContext;
|
|
5306
5331
|
} }
|
|
5307
|
-
}), [["render",
|
|
5308
|
-
function
|
|
5332
|
+
}), [["render", _s]]), ys = ["disabled"], bs = ["data-info"];
|
|
5333
|
+
function xs(e, n, r, i, a, o) {
|
|
5309
5334
|
let u = w("DitoAffix");
|
|
5310
5335
|
return e.hasContent ? (x(), l("div", {
|
|
5311
5336
|
key: 0,
|
|
@@ -5332,17 +5357,17 @@ function ys(e, n, r, i, a, o) {
|
|
|
5332
5357
|
disabled: e.disabled,
|
|
5333
5358
|
onClick: n[0] ||= A((t) => e.$emit("clear"), ["stop"]),
|
|
5334
5359
|
onMousedown: n[1] ||= A(() => {}, ["stop"])
|
|
5335
|
-
}, null, 40,
|
|
5360
|
+
}, null, 40, ys)) : c("", !0),
|
|
5336
5361
|
C(e.$slots, "append"),
|
|
5337
5362
|
e.inlineInfo ? (x(), l("div", {
|
|
5338
5363
|
key: 1,
|
|
5339
5364
|
class: "dito-info",
|
|
5340
5365
|
"data-info": e.inlineInfo
|
|
5341
|
-
}, null, 8,
|
|
5366
|
+
}, null, 8, bs)) : c("", !0)
|
|
5342
5367
|
], 2)) : c("", !0);
|
|
5343
5368
|
}
|
|
5344
5369
|
var Z = /*#__PURE__*/ X(Y.component("DitoAffixes", {
|
|
5345
|
-
components: { DitoAffix:
|
|
5370
|
+
components: { DitoAffix: vs },
|
|
5346
5371
|
emits: ["clear"],
|
|
5347
5372
|
props: {
|
|
5348
5373
|
items: {
|
|
@@ -5399,7 +5424,7 @@ var Z = /*#__PURE__*/ X(Y.component("DitoAffixes", {
|
|
|
5399
5424
|
});
|
|
5400
5425
|
},
|
|
5401
5426
|
visibleItems() {
|
|
5402
|
-
return this.processedItems.filter((e) =>
|
|
5427
|
+
return this.processedItems.filter((e) => vr(e, this.context));
|
|
5403
5428
|
},
|
|
5404
5429
|
classes() {
|
|
5405
5430
|
let e = "dito-affixes";
|
|
@@ -5420,11 +5445,11 @@ var Z = /*#__PURE__*/ X(Y.component("DitoAffixes", {
|
|
|
5420
5445
|
[`${t}--ellipsis`]: this.mode === "ellipsis" && ["text", "html"].includes(e.type)
|
|
5421
5446
|
}, e.class];
|
|
5422
5447
|
} }
|
|
5423
|
-
}), [["render",
|
|
5448
|
+
}), [["render", xs]]), Ss = {
|
|
5424
5449
|
key: 1,
|
|
5425
5450
|
class: "dito-label__inner"
|
|
5426
|
-
},
|
|
5427
|
-
function
|
|
5451
|
+
}, Cs = ["for", "innerHTML"], ws = ["data-info"];
|
|
5452
|
+
function Ts(e, t, n, r, i, a) {
|
|
5428
5453
|
let o = w("DitoAffixes");
|
|
5429
5454
|
return e.text || e.collapsible ? (x(), s(T(e.collapsible ? "button" : "div"), v({
|
|
5430
5455
|
key: 0,
|
|
@@ -5434,7 +5459,7 @@ function Cs(e, t, n, r, i, a) {
|
|
|
5434
5459
|
default: O(() => [e.collapsible ? (x(), l("div", {
|
|
5435
5460
|
key: 0,
|
|
5436
5461
|
class: y(["dito-chevron", { "dito-chevron--open": !e.collapsed }])
|
|
5437
|
-
}, 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, [
|
|
5438
5463
|
f(o, {
|
|
5439
5464
|
items: e.prefixes,
|
|
5440
5465
|
position: "prefix",
|
|
@@ -5444,7 +5469,7 @@ function Cs(e, t, n, r, i, a) {
|
|
|
5444
5469
|
key: 0,
|
|
5445
5470
|
for: e.htmlFor,
|
|
5446
5471
|
innerHTML: e.text
|
|
5447
|
-
}, null, 8,
|
|
5472
|
+
}, null, 8, Cs)) : c("", !0),
|
|
5448
5473
|
f(o, {
|
|
5449
5474
|
items: e.suffixes,
|
|
5450
5475
|
mode: "ellipsis",
|
|
@@ -5455,12 +5480,12 @@ function Cs(e, t, n, r, i, a) {
|
|
|
5455
5480
|
key: 1,
|
|
5456
5481
|
class: "dito-info",
|
|
5457
5482
|
"data-info": e.info
|
|
5458
|
-
}, null, 8,
|
|
5483
|
+
}, null, 8, ws)) : c("", !0)
|
|
5459
5484
|
])) : c("", !0)]),
|
|
5460
5485
|
_: 1
|
|
5461
5486
|
}, 16, ["type", "class"])) : c("", !0);
|
|
5462
5487
|
}
|
|
5463
|
-
var
|
|
5488
|
+
var Es = /*#__PURE__*/ X(Y.component("DitoLabel", {
|
|
5464
5489
|
components: { DitoAffixes: Z },
|
|
5465
5490
|
emits: ["open"],
|
|
5466
5491
|
props: {
|
|
@@ -5509,8 +5534,8 @@ var ws = /*#__PURE__*/ X(Y.component("DitoLabel", {
|
|
|
5509
5534
|
methods: { onClick() {
|
|
5510
5535
|
this.appState.activeLabel = this, this.$emit("open", this.collapsed);
|
|
5511
5536
|
} }
|
|
5512
|
-
}), [["render",
|
|
5513
|
-
getItemFormSchema:
|
|
5537
|
+
}), [["render", Ts]]), Ds = { methods: {
|
|
5538
|
+
getItemFormSchema: ur,
|
|
5514
5539
|
getItemUid: Lr,
|
|
5515
5540
|
getItemId(e, t, n = null) {
|
|
5516
5541
|
return this.isTransient && n !== null ? String(n) : Pr(e, t);
|
|
@@ -5532,9 +5557,9 @@ var ws = /*#__PURE__*/ X(Y.component("DitoLabel", {
|
|
|
5532
5557
|
getItemLabel(e, t, { index: n = null, extended: r = !1, asObject: i = !1 } = {}) {
|
|
5533
5558
|
let { itemLabel: a } = e;
|
|
5534
5559
|
if (!t || !r && a === !1) return null;
|
|
5535
|
-
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;
|
|
5536
5561
|
if (F(a)) {
|
|
5537
|
-
let e = a.call(this, new
|
|
5562
|
+
let e = a.call(this, new G(this, {
|
|
5538
5563
|
nested: !1,
|
|
5539
5564
|
data: t,
|
|
5540
5565
|
value: t,
|
|
@@ -5549,11 +5574,11 @@ var ws = /*#__PURE__*/ X(Y.component("DitoLabel", {
|
|
|
5549
5574
|
I(e) ? {text: u, prefix: d, suffix: f} = e : u = e, r = !1;
|
|
5550
5575
|
} else if (L(a) && !(a in t)) u = a;
|
|
5551
5576
|
else {
|
|
5552
|
-
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"];
|
|
5553
5578
|
u = L(r) || He(r) ? r : null;
|
|
5554
5579
|
}
|
|
5555
5580
|
let p = !!u;
|
|
5556
|
-
if (u ??= (r = !0,
|
|
5581
|
+
if (u ??= (r = !0, In(e) && n !== null ? `${n + 1}` : ""), r) {
|
|
5557
5582
|
let e = l();
|
|
5558
5583
|
e && (u = `${e} ${p ? `'${u}'` : u}`);
|
|
5559
5584
|
}
|
|
@@ -5563,11 +5588,11 @@ var ws = /*#__PURE__*/ X(Y.component("DitoLabel", {
|
|
|
5563
5588
|
suffix: f
|
|
5564
5589
|
} : null : u;
|
|
5565
5590
|
}
|
|
5566
|
-
} },
|
|
5591
|
+
} }, Os = {
|
|
5567
5592
|
key: 0,
|
|
5568
5593
|
class: "dito-schema-header"
|
|
5569
5594
|
};
|
|
5570
|
-
function
|
|
5595
|
+
function ks(e, i, a, o, d, p) {
|
|
5571
5596
|
let m = w("DitoPanels"), h = w("DitoLabel"), g = w("DitoTabs"), _ = w("DitoClipboard"), ee = w("DitoPane"), te = w("TransitionHeight");
|
|
5572
5597
|
return x(), l(t, null, [
|
|
5573
5598
|
C(e.$slots, "prepend"),
|
|
@@ -5596,7 +5621,7 @@ function Ds(e, i, a, o, d, p) {
|
|
|
5596
5621
|
key: 1,
|
|
5597
5622
|
to: e.headerTeleport,
|
|
5598
5623
|
disabled: !e.headerTeleport
|
|
5599
|
-
}, [e.active ? (x(), l("div",
|
|
5624
|
+
}, [e.active ? (x(), l("div", Os, [
|
|
5600
5625
|
e.hasLabel ? (x(), s(h, {
|
|
5601
5626
|
key: 0,
|
|
5602
5627
|
label: e.label,
|
|
@@ -5706,8 +5731,8 @@ function Ds(e, i, a, o, d, p) {
|
|
|
5706
5731
|
}
|
|
5707
5732
|
//#endregion
|
|
5708
5733
|
//#region src/components/DitoSchema.vue
|
|
5709
|
-
var
|
|
5710
|
-
mixins: [K,
|
|
5734
|
+
var As = Y.component("DitoSchema", {
|
|
5735
|
+
mixins: [K, Ds],
|
|
5711
5736
|
components: { TransitionHeight: co },
|
|
5712
5737
|
inheritAttrs: !1,
|
|
5713
5738
|
provide() {
|
|
@@ -5823,10 +5848,10 @@ var Os = Y.component("DitoSchema", {
|
|
|
5823
5848
|
return this.hasOwnData ? null : this.parentComponent.schemaComponent;
|
|
5824
5849
|
},
|
|
5825
5850
|
panelEntries() {
|
|
5826
|
-
return
|
|
5851
|
+
return hr(this.schema.panels, this.dataPath, this.componentPath);
|
|
5827
5852
|
},
|
|
5828
5853
|
tabs() {
|
|
5829
|
-
return
|
|
5854
|
+
return fr(this.schema.tabs);
|
|
5830
5855
|
},
|
|
5831
5856
|
renderedTabs() {
|
|
5832
5857
|
return this.tabs && this.data ? Object.fromEntries(Object.entries(this.tabs).filter(([, e]) => this.shouldRenderSchema(e))) : this.tabs;
|
|
@@ -5902,7 +5927,7 @@ var Os = Y.component("DitoSchema", {
|
|
|
5902
5927
|
return !!this.tabs;
|
|
5903
5928
|
},
|
|
5904
5929
|
isTopLevelSchema() {
|
|
5905
|
-
return !
|
|
5930
|
+
return !Cn(this.schema) && !this.inlined;
|
|
5906
5931
|
},
|
|
5907
5932
|
hasTopLevelTabs() {
|
|
5908
5933
|
return this.hasTabs && this.isTopLevelSchema;
|
|
@@ -5944,7 +5969,7 @@ var Os = Y.component("DitoSchema", {
|
|
|
5944
5969
|
schema: {
|
|
5945
5970
|
immediate: !0,
|
|
5946
5971
|
handler(e) {
|
|
5947
|
-
|
|
5972
|
+
dr(e) || this.setupSchema();
|
|
5948
5973
|
}
|
|
5949
5974
|
},
|
|
5950
5975
|
routeTab: {
|
|
@@ -6081,7 +6106,7 @@ var Os = Y.component("DitoSchema", {
|
|
|
6081
6106
|
for (let t of e) t.isForm ? o = t : s.push(t);
|
|
6082
6107
|
return !0;
|
|
6083
6108
|
});
|
|
6084
|
-
if (
|
|
6109
|
+
if (js(s).forEach((e, r) => {
|
|
6085
6110
|
e.showValidationErrors(a, n && t && !o && r === 0);
|
|
6086
6111
|
}), o) {
|
|
6087
6112
|
let r = Object.fromEntries(Object.entries(e).filter(([e]) => e === o.dataPath || e.startsWith(`${o.dataPath}/`)));
|
|
@@ -6165,24 +6190,24 @@ var Os = Y.component("DitoSchema", {
|
|
|
6165
6190
|
return z(t).startsWith(this.dataPath) ? this._getEntriesByDataPath(e, t) : this._getEntriesByName(e, t);
|
|
6166
6191
|
},
|
|
6167
6192
|
_getEntriesByDataPath(e, t) {
|
|
6168
|
-
return
|
|
6193
|
+
return js(e[z(t)] || []);
|
|
6169
6194
|
},
|
|
6170
6195
|
_getEntriesByName(e, t) {
|
|
6171
|
-
return
|
|
6196
|
+
return js(e[V(this.dataPath, t)] || []);
|
|
6172
6197
|
}
|
|
6173
6198
|
}
|
|
6174
6199
|
});
|
|
6175
|
-
function
|
|
6176
|
-
return e.length > 1 ? [...e].sort(
|
|
6200
|
+
function js(e) {
|
|
6201
|
+
return e.length > 1 ? [...e].sort(Ms) : e;
|
|
6177
6202
|
}
|
|
6178
|
-
function
|
|
6203
|
+
function Ms(e, t) {
|
|
6179
6204
|
let n = e.$el, r = t.$el;
|
|
6180
6205
|
return !n || !r || n === r ? 0 : n.compareDocumentPosition(r) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
|
|
6181
6206
|
}
|
|
6182
|
-
var
|
|
6207
|
+
var Ns = /*#__PURE__*/ X(As, [["render", ks]]);
|
|
6183
6208
|
//#endregion
|
|
6184
6209
|
//#region src/components/DitoSchemaInlined.vue?vue&type=template&lang.js
|
|
6185
|
-
function
|
|
6210
|
+
function Ps(e, t, n, r, i, a) {
|
|
6186
6211
|
let o = w("DitoEditButtons"), l = w("DitoSchema");
|
|
6187
6212
|
return x(), s(l, {
|
|
6188
6213
|
class: "dito-schema-inlined",
|
|
@@ -6253,7 +6278,7 @@ function Ms(e, t, n, r, i, a) {
|
|
|
6253
6278
|
"accumulatedBasis"
|
|
6254
6279
|
]);
|
|
6255
6280
|
}
|
|
6256
|
-
var
|
|
6281
|
+
var Fs = /*#__PURE__*/ X(Y.component("DitoSchemaInlined", {
|
|
6257
6282
|
emits: ["delete"],
|
|
6258
6283
|
props: {
|
|
6259
6284
|
schema: {
|
|
@@ -6335,24 +6360,24 @@ var Ns = /*#__PURE__*/ X(Y.component("DitoSchemaInlined", {
|
|
|
6335
6360
|
},
|
|
6336
6361
|
computed: {
|
|
6337
6362
|
isCompact() {
|
|
6338
|
-
return
|
|
6363
|
+
return On(this.schema);
|
|
6339
6364
|
},
|
|
6340
6365
|
hasLabel() {
|
|
6341
6366
|
return !this.isCompact && !!this.label;
|
|
6342
6367
|
}
|
|
6343
6368
|
}
|
|
6344
|
-
}), [["render",
|
|
6369
|
+
}), [["render", Ps]]), Is = [
|
|
6345
6370
|
"id",
|
|
6346
6371
|
"role",
|
|
6347
6372
|
"aria-labelledby"
|
|
6348
|
-
],
|
|
6373
|
+
], Ls = {
|
|
6349
6374
|
key: 0,
|
|
6350
6375
|
class: "dito-pane__break"
|
|
6351
|
-
},
|
|
6376
|
+
}, Rs = {
|
|
6352
6377
|
key: 2,
|
|
6353
6378
|
class: "dito-pane__break"
|
|
6354
6379
|
};
|
|
6355
|
-
function
|
|
6380
|
+
function zs(e, n, r, i, a, o) {
|
|
6356
6381
|
let u = w("DitoContainer"), d = ie("resize");
|
|
6357
6382
|
return e.isPopulated && e.componentSchemas.length > 0 ? k((x(), l("div", {
|
|
6358
6383
|
key: 0,
|
|
@@ -6361,7 +6386,7 @@ function Ls(e, n, r, i, a, o) {
|
|
|
6361
6386
|
role: e.tab ? "tabpanel" : null,
|
|
6362
6387
|
"aria-labelledby": e.tabId
|
|
6363
6388
|
}, [(x(!0), l(t, null, S(e.componentSchemas, ({ schema: n, dataPath: r, nestedDataPath: i, nested: a, store: o }, d) => (x(), l(t, null, [
|
|
6364
|
-
["before", "both"].includes(n.break) ? (x(), l("span",
|
|
6389
|
+
["before", "both"].includes(n.break) ? (x(), l("span", Ls)) : c("", !0),
|
|
6365
6390
|
e.shouldRenderComponent(n, a, r) ? (x(), s(u, {
|
|
6366
6391
|
ref_for: !0,
|
|
6367
6392
|
ref: "containers",
|
|
@@ -6394,10 +6419,10 @@ function Ls(e, n, r, i, a, o) {
|
|
|
6394
6419
|
"verticalLabels",
|
|
6395
6420
|
"accumulatedBasis"
|
|
6396
6421
|
])) : c("", !0),
|
|
6397
|
-
["after", "both"].includes(n.break) ? (x(), l("span",
|
|
6398
|
-
], 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);
|
|
6399
6424
|
}
|
|
6400
|
-
var
|
|
6425
|
+
var Bs = /*#__PURE__*/ X(Y.component("DitoPane", {
|
|
6401
6426
|
mixins: [K],
|
|
6402
6427
|
provide() {
|
|
6403
6428
|
return { $tabComponent: () => this.tabComponent };
|
|
@@ -6488,7 +6513,7 @@ var Rs = /*#__PURE__*/ X(Y.component("DitoPane", {
|
|
|
6488
6513
|
...n,
|
|
6489
6514
|
name: t
|
|
6490
6515
|
};
|
|
6491
|
-
let r =
|
|
6516
|
+
let r = An(n), i = V(this.dataPath, t), a = r && !e ? i : this.dataPath;
|
|
6492
6517
|
return {
|
|
6493
6518
|
schema: n,
|
|
6494
6519
|
dataPath: a,
|
|
@@ -6539,7 +6564,7 @@ var Rs = /*#__PURE__*/ X(Y.component("DitoPane", {
|
|
|
6539
6564
|
},
|
|
6540
6565
|
methods: {
|
|
6541
6566
|
shouldRenderComponent(e, t, n) {
|
|
6542
|
-
return
|
|
6567
|
+
return vr(e, G.createForSchema(this, {
|
|
6543
6568
|
schema: e,
|
|
6544
6569
|
name: e.name,
|
|
6545
6570
|
nested: t,
|
|
@@ -6570,10 +6595,10 @@ var Rs = /*#__PURE__*/ X(Y.component("DitoPane", {
|
|
|
6570
6595
|
return !!this.verticalLabelsByIndices[e];
|
|
6571
6596
|
}
|
|
6572
6597
|
}
|
|
6573
|
-
}), [["render",
|
|
6598
|
+
}), [["render", zs]]);
|
|
6574
6599
|
//#endregion
|
|
6575
6600
|
//#region src/utils/math.js
|
|
6576
|
-
function
|
|
6601
|
+
function Vs(e) {
|
|
6577
6602
|
let t = L(e) && e.match(/^\s*([+-]?\d+)\s*\/\s*([+-]?\d+)\s*$/);
|
|
6578
6603
|
if (t) {
|
|
6579
6604
|
let [, e, n] = t;
|
|
@@ -6583,7 +6608,7 @@ function zs(e) {
|
|
|
6583
6608
|
}
|
|
6584
6609
|
//#endregion
|
|
6585
6610
|
//#region src/components/DitoContainer.vue?vue&type=template&lang.js
|
|
6586
|
-
function
|
|
6611
|
+
function Hs(e, t, r, i, a, o) {
|
|
6587
6612
|
let u = w("DitoPanels"), d = w("DitoLabel"), p = w("DitoErrors");
|
|
6588
6613
|
return k((x(), l("div", {
|
|
6589
6614
|
class: y(["dito-container", e.containerClasses]),
|
|
@@ -6650,7 +6675,7 @@ function Bs(e, t, r, i, a, o) {
|
|
|
6650
6675
|
f(p, { errors: e.errors }, null, 8, ["errors"])
|
|
6651
6676
|
], 6)), [[D, e.componentVisible]]);
|
|
6652
6677
|
}
|
|
6653
|
-
var
|
|
6678
|
+
var Us = /*#__PURE__*/ X(Y.component("DitoContainer", {
|
|
6654
6679
|
mixins: [Rr, K],
|
|
6655
6680
|
props: {
|
|
6656
6681
|
schema: {
|
|
@@ -6710,7 +6735,7 @@ var Vs = /*#__PURE__*/ X(Y.component("DitoContainer", {
|
|
|
6710
6735
|
},
|
|
6711
6736
|
computed: {
|
|
6712
6737
|
context() {
|
|
6713
|
-
return new
|
|
6738
|
+
return new G(this.component ?? this, { nested: this.nested });
|
|
6714
6739
|
},
|
|
6715
6740
|
name() {
|
|
6716
6741
|
return this.schema.name;
|
|
@@ -6728,7 +6753,7 @@ var Vs = /*#__PURE__*/ X(Y.component("DitoContainer", {
|
|
|
6728
6753
|
return this.type === "label";
|
|
6729
6754
|
},
|
|
6730
6755
|
hasLabel() {
|
|
6731
|
-
return
|
|
6756
|
+
return jn(this.schema, this.generateLabels);
|
|
6732
6757
|
},
|
|
6733
6758
|
label() {
|
|
6734
6759
|
return this.hasLabel ? this.getLabel(this.schema) : null;
|
|
@@ -6780,7 +6805,7 @@ var Vs = /*#__PURE__*/ X(Y.component("DitoContainer", {
|
|
|
6780
6805
|
null,
|
|
6781
6806
|
"auto",
|
|
6782
6807
|
"fill"
|
|
6783
|
-
].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);
|
|
6784
6809
|
},
|
|
6785
6810
|
combinedBasis() {
|
|
6786
6811
|
let { accumulatedBasis: e, flexBasis: t } = this;
|
|
@@ -6794,7 +6819,7 @@ var Vs = /*#__PURE__*/ X(Y.component("DitoContainer", {
|
|
|
6794
6819
|
[`${t}--single`]: this.single,
|
|
6795
6820
|
[`${t}--compact`]: this.compact,
|
|
6796
6821
|
[`${t}--label-vertical`]: this.verticalLabels,
|
|
6797
|
-
[`${t}--omit-spacing`]:
|
|
6822
|
+
[`${t}--omit-spacing`]: Mn(this.schema),
|
|
6798
6823
|
...L(e) ? { [e]: !0 } : e
|
|
6799
6824
|
};
|
|
6800
6825
|
},
|
|
@@ -6820,7 +6845,7 @@ var Vs = /*#__PURE__*/ X(Y.component("DitoContainer", {
|
|
|
6820
6845
|
};
|
|
6821
6846
|
},
|
|
6822
6847
|
panelEntries() {
|
|
6823
|
-
return
|
|
6848
|
+
return gr(this.api, this.schema, this.dataPath, this.nested ? this.componentPath : this.parentComponent.componentPath, this.componentPath, this.$refs.component, this.tabComponent);
|
|
6824
6849
|
}
|
|
6825
6850
|
},
|
|
6826
6851
|
methods: {
|
|
@@ -6835,18 +6860,18 @@ var Vs = /*#__PURE__*/ X(Y.component("DitoContainer", {
|
|
|
6835
6860
|
this.errors = e;
|
|
6836
6861
|
}
|
|
6837
6862
|
}
|
|
6838
|
-
}), [["render",
|
|
6863
|
+
}), [["render", Hs]]), Ws = {
|
|
6839
6864
|
class: "dito-tabs",
|
|
6840
6865
|
role: "tablist"
|
|
6841
|
-
},
|
|
6866
|
+
}, Gs = [
|
|
6842
6867
|
"id",
|
|
6843
6868
|
"aria-selected",
|
|
6844
6869
|
"aria-controls",
|
|
6845
6870
|
"tabindex",
|
|
6846
6871
|
"onClick"
|
|
6847
6872
|
];
|
|
6848
|
-
function
|
|
6849
|
-
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", {
|
|
6850
6875
|
class: y(["dito-tabs__link", { "dito-tabs__link--active": e.modelValue === n }]),
|
|
6851
6876
|
id: e.getTabId(n),
|
|
6852
6877
|
key: n,
|
|
@@ -6855,9 +6880,9 @@ function Ws(e, n, r, i, a, o) {
|
|
|
6855
6880
|
"aria-controls": e.getTabPanelId(n),
|
|
6856
6881
|
tabindex: e.modelValue === n ? 0 : -1,
|
|
6857
6882
|
onClick: (t) => e.$emit("update:modelValue", n)
|
|
6858
|
-
}, E(e.getLabel(t, n)), 11,
|
|
6883
|
+
}, E(e.getLabel(t, n)), 11, Gs))), 128))]);
|
|
6859
6884
|
}
|
|
6860
|
-
var
|
|
6885
|
+
var qs = /*#__PURE__*/ X(Y.component("DitoTabs", {
|
|
6861
6886
|
emits: ["update:modelValue"],
|
|
6862
6887
|
props: {
|
|
6863
6888
|
tabs: {
|
|
@@ -6877,10 +6902,10 @@ var Gs = /*#__PURE__*/ X(Y.component("DitoTabs", {
|
|
|
6877
6902
|
return `${this.schemaComponent.componentPath}-tabpanel-${e}`;
|
|
6878
6903
|
}
|
|
6879
6904
|
}
|
|
6880
|
-
}), [["render",
|
|
6905
|
+
}), [["render", Ks]]);
|
|
6881
6906
|
//#endregion
|
|
6882
6907
|
//#region src/components/DitoPanel.vue?vue&type=template&lang.js
|
|
6883
|
-
function
|
|
6908
|
+
function Js(e, t, n, r, i, a) {
|
|
6884
6909
|
let o = w("DitoButtons"), l = w("DitoSchema");
|
|
6885
6910
|
return e.shouldRenderSchema(e.panelSchema) ? k((x(), s(T(e.panelTag), {
|
|
6886
6911
|
key: 0,
|
|
@@ -6948,7 +6973,7 @@ function Ks(e, t, n, r, i, a) {
|
|
|
6948
6973
|
_: 1
|
|
6949
6974
|
}, 40, ["aria-label"])), [[D, e.visible && (!e.panelTabComponent || e.panelTabComponent.visible)]]) : c("", !0);
|
|
6950
6975
|
}
|
|
6951
|
-
var
|
|
6976
|
+
var Ys = /*#__PURE__*/ X(Y.component("DitoPanel", {
|
|
6952
6977
|
mixins: [K, _o],
|
|
6953
6978
|
provide() {
|
|
6954
6979
|
return {
|
|
@@ -6998,7 +7023,7 @@ var qs = /*#__PURE__*/ X(Y.component("DitoPanel", {
|
|
|
6998
7023
|
return !0;
|
|
6999
7024
|
},
|
|
7000
7025
|
context() {
|
|
7001
|
-
return new
|
|
7026
|
+
return new G(this, {
|
|
7002
7027
|
nested: !1,
|
|
7003
7028
|
data: this.panelData,
|
|
7004
7029
|
dataPath: this.panelDataPath
|
|
@@ -7014,10 +7039,10 @@ var qs = /*#__PURE__*/ X(Y.component("DitoPanel", {
|
|
|
7014
7039
|
return this.panelTabComponent;
|
|
7015
7040
|
},
|
|
7016
7041
|
buttonSchemas() {
|
|
7017
|
-
return
|
|
7042
|
+
return pr(this.schema.buttons);
|
|
7018
7043
|
},
|
|
7019
7044
|
panelButtonSchemas() {
|
|
7020
|
-
return
|
|
7045
|
+
return pr(this.schema.panelButtons);
|
|
7021
7046
|
},
|
|
7022
7047
|
hasOwnData() {
|
|
7023
7048
|
return !!this.ownData;
|
|
@@ -7064,13 +7089,13 @@ var qs = /*#__PURE__*/ X(Y.component("DitoPanel", {
|
|
|
7064
7089
|
methods: { _register(e, t = this.componentPath) {
|
|
7065
7090
|
this.schemaComponent._registerPanel(this, e, t);
|
|
7066
7091
|
} }
|
|
7067
|
-
}), [["render",
|
|
7092
|
+
}), [["render", Js]]), Xs = {
|
|
7068
7093
|
key: 0,
|
|
7069
7094
|
class: "dito-panels"
|
|
7070
7095
|
};
|
|
7071
|
-
function
|
|
7096
|
+
function Zs(e, n, r, i, a, o) {
|
|
7072
7097
|
let u = w("DitoPanel");
|
|
7073
|
-
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, {
|
|
7074
7099
|
key: e.getPanelKey(r, a),
|
|
7075
7100
|
schema: n,
|
|
7076
7101
|
dataPath: r,
|
|
@@ -7091,7 +7116,7 @@ function Ys(e, n, r, i, a, o) {
|
|
|
7091
7116
|
"panelTabComponent"
|
|
7092
7117
|
])) : c("", !0)], 64))), 256))])) : c("", !0);
|
|
7093
7118
|
}
|
|
7094
|
-
var
|
|
7119
|
+
var Qs = /*#__PURE__*/ X(Y.component("DitoPanels", {
|
|
7095
7120
|
mixins: [K],
|
|
7096
7121
|
props: {
|
|
7097
7122
|
panels: {
|
|
@@ -7121,16 +7146,16 @@ var Xs = /*#__PURE__*/ X(Y.component("DitoPanels", {
|
|
|
7121
7146
|
methods: { getPanelKey(e, t) {
|
|
7122
7147
|
return t ? `${t.tab}_${e}` : e;
|
|
7123
7148
|
} }
|
|
7124
|
-
}), [["render",
|
|
7149
|
+
}), [["render", Zs]]), $s = {
|
|
7125
7150
|
key: 0,
|
|
7126
7151
|
class: "dito-buttons"
|
|
7127
|
-
},
|
|
7152
|
+
}, ec = {
|
|
7128
7153
|
key: 0,
|
|
7129
7154
|
class: "dito-container"
|
|
7130
7155
|
};
|
|
7131
|
-
function
|
|
7156
|
+
function tc(e, n, r, i, a, o) {
|
|
7132
7157
|
let u = w("DitoContainer"), d = w("DitoVnode");
|
|
7133
|
-
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, {
|
|
7134
7159
|
key: r,
|
|
7135
7160
|
schema: n,
|
|
7136
7161
|
dataPath: r,
|
|
@@ -7147,9 +7172,9 @@ function $s(e, n, r, i, a, o) {
|
|
|
7147
7172
|
"nested",
|
|
7148
7173
|
"store",
|
|
7149
7174
|
"disabled"
|
|
7150
|
-
])) : 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);
|
|
7151
7176
|
}
|
|
7152
|
-
var
|
|
7177
|
+
var nc = /*#__PURE__*/ X(Y.component("DitoButtons", {
|
|
7153
7178
|
mixins: [K],
|
|
7154
7179
|
provide: { $tabComponent: () => null },
|
|
7155
7180
|
props: {
|
|
@@ -7199,8 +7224,8 @@ var ec = /*#__PURE__*/ X(Y.component("DitoButtons", {
|
|
|
7199
7224
|
hasSlotContent: Fi,
|
|
7200
7225
|
hasVNodeContent: Pi
|
|
7201
7226
|
}
|
|
7202
|
-
}), [["render",
|
|
7203
|
-
function
|
|
7227
|
+
}), [["render", tc]]), rc = ["disabled"];
|
|
7228
|
+
function ic(e, t, n, r, i, a) {
|
|
7204
7229
|
let o = w("RouterLink"), u = w("DitoCreateButton"), d = w("DitoButtons");
|
|
7205
7230
|
return x(), s(d, {
|
|
7206
7231
|
class: "dito-edit-buttons dito-buttons--round",
|
|
@@ -7253,7 +7278,7 @@ function nc(e, t, n, r, i, a) {
|
|
|
7253
7278
|
class: "dito-button",
|
|
7254
7279
|
type: "button",
|
|
7255
7280
|
disabled: e.isDeletableDisabled
|
|
7256
|
-
}, 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)
|
|
7257
7282
|
]),
|
|
7258
7283
|
_: 1
|
|
7259
7284
|
}, 8, [
|
|
@@ -7265,7 +7290,7 @@ function nc(e, t, n, r, i, a) {
|
|
|
7265
7290
|
"nested"
|
|
7266
7291
|
]);
|
|
7267
7292
|
}
|
|
7268
|
-
var
|
|
7293
|
+
var ac = /*#__PURE__*/ X(Y.component("DitoEditButtons", {
|
|
7269
7294
|
mixins: [K],
|
|
7270
7295
|
emits: ["delete"],
|
|
7271
7296
|
props: {
|
|
@@ -7356,21 +7381,21 @@ var rc = /*#__PURE__*/ X(Y.component("DitoEditButtons", {
|
|
|
7356
7381
|
default: !0
|
|
7357
7382
|
});
|
|
7358
7383
|
} }
|
|
7359
|
-
}), [["render",
|
|
7360
|
-
function
|
|
7361
|
-
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({
|
|
7362
7387
|
key: 0,
|
|
7363
7388
|
class: "dito-button",
|
|
7364
7389
|
type: e.isInlined ? "button" : "submit",
|
|
7365
7390
|
disabled: e.disabled
|
|
7366
|
-
}, e.getButtonAttributes(e.verb, e.formLabel, e.text), { 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({
|
|
7367
7392
|
class: "dito-button",
|
|
7368
7393
|
type: "button",
|
|
7369
7394
|
disabled: e.disabled
|
|
7370
7395
|
}, {
|
|
7371
7396
|
...e.pulldownTriggerAttributes,
|
|
7372
7397
|
...e.getButtonAttributes(e.verb, null, e.text)
|
|
7373
|
-
}, { onMousedown: n[1] ||= A((t) => e.onPulldownMouseDown(), ["stop"]) }), E(e.text), 17,
|
|
7398
|
+
}, { onMousedown: n[1] ||= A((t) => e.onPulldownMouseDown(), ["stop"]) }), E(e.text), 17, cc), u("ul", {
|
|
7374
7399
|
class: y(["dito-pulldown", { "dito-pulldown--open": e.pulldown.open }]),
|
|
7375
7400
|
role: "menu"
|
|
7376
7401
|
}, [(x(!0), l(t, null, S(e.creatableForms, (t, n) => k((x(), l("li", null, [u("a", {
|
|
@@ -7378,10 +7403,10 @@ function cc(e, n, r, i, a, o) {
|
|
|
7378
7403
|
role: "menuitem",
|
|
7379
7404
|
onMousedown: A((t) => e.onPulldownMouseDown(n), ["stop"]),
|
|
7380
7405
|
onMouseup: (t) => e.onPulldownMouseUp(n)
|
|
7381
|
-
}, E(e.getLabel(t)), 43,
|
|
7406
|
+
}, E(e.getLabel(t)), 43, lc)], 512)), [[D, e.shouldShowSchema(t)]])), 256))], 2)], 64)) : c("", !0)]);
|
|
7382
7407
|
}
|
|
7383
|
-
var
|
|
7384
|
-
mixins: [K,
|
|
7408
|
+
var dc = /*#__PURE__*/ X(Y.component("DitoCreateButton", {
|
|
7409
|
+
mixins: [K, us],
|
|
7385
7410
|
props: {
|
|
7386
7411
|
schema: {
|
|
7387
7412
|
type: Object,
|
|
@@ -7430,7 +7455,7 @@ var lc = /*#__PURE__*/ X(Y.component("DitoCreateButton", {
|
|
|
7430
7455
|
},
|
|
7431
7456
|
computed: {
|
|
7432
7457
|
forms() {
|
|
7433
|
-
return
|
|
7458
|
+
return or(this.insertIndex == null ? this.schema : this.sourceSchema || this.schema, this.context);
|
|
7434
7459
|
},
|
|
7435
7460
|
creatableForms() {
|
|
7436
7461
|
let e = Object.entries(this.forms).filter(([, e]) => this.isFormCreatable(e));
|
|
@@ -7448,7 +7473,7 @@ var lc = /*#__PURE__*/ X(Y.component("DitoCreateButton", {
|
|
|
7448
7473
|
}) : null;
|
|
7449
7474
|
},
|
|
7450
7475
|
isInlined() {
|
|
7451
|
-
return
|
|
7476
|
+
return kn(this.schema);
|
|
7452
7477
|
}
|
|
7453
7478
|
},
|
|
7454
7479
|
methods: {
|
|
@@ -7477,27 +7502,27 @@ var lc = /*#__PURE__*/ X(Y.component("DitoCreateButton", {
|
|
|
7477
7502
|
this.createItem(this.forms[e], e), this.setPulldownOpen(!1);
|
|
7478
7503
|
}
|
|
7479
7504
|
}
|
|
7480
|
-
}), [["render",
|
|
7505
|
+
}), [["render", uc]]), fc = {
|
|
7481
7506
|
key: 0,
|
|
7482
7507
|
class: "dito-clipboard dito-buttons dito-buttons--round"
|
|
7483
|
-
},
|
|
7484
|
-
function
|
|
7485
|
-
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", {
|
|
7486
7511
|
class: "dito-button dito-button--copy",
|
|
7487
7512
|
ref: "copyData",
|
|
7488
7513
|
type: "button",
|
|
7489
7514
|
title: "Copy Data",
|
|
7490
7515
|
disabled: !e.copyEnabled,
|
|
7491
7516
|
onClick: t[0] ||= (...t) => e.onCopy && e.onCopy(...t)
|
|
7492
|
-
}, null, 8,
|
|
7517
|
+
}, null, 8, pc), u("button", {
|
|
7493
7518
|
class: "dito-button dito-button--paste",
|
|
7494
7519
|
type: "button",
|
|
7495
7520
|
title: "Paste Data",
|
|
7496
7521
|
disabled: !e.pasteEnabled,
|
|
7497
7522
|
onClick: t[1] ||= (...t) => e.onPaste && e.onPaste(...t)
|
|
7498
|
-
}, null, 8,
|
|
7523
|
+
}, null, 8, mc)])) : c("", !0);
|
|
7499
7524
|
}
|
|
7500
|
-
var
|
|
7525
|
+
var gc = /*#__PURE__*/ X(Y.component("DitoClipboard", {
|
|
7501
7526
|
mixins: [mo],
|
|
7502
7527
|
props: {
|
|
7503
7528
|
clipboard: {
|
|
@@ -7521,11 +7546,11 @@ var mc = /*#__PURE__*/ X(Y.component("DitoClipboard", {
|
|
|
7521
7546
|
},
|
|
7522
7547
|
copyData() {
|
|
7523
7548
|
let { copy: e } = this.clipboardOptions;
|
|
7524
|
-
return e ? (t) => e.call(this, new
|
|
7549
|
+
return e ? (t) => e.call(this, new G(this, { clipboardData: t })) : (e) => M(e);
|
|
7525
7550
|
},
|
|
7526
7551
|
pasteData() {
|
|
7527
7552
|
let { paste: e } = this.clipboardOptions;
|
|
7528
|
-
return e ? (t) => e.call(this, new
|
|
7553
|
+
return e ? (t) => e.call(this, new G(this, { clipboardData: t })) : (e) => e;
|
|
7529
7554
|
}
|
|
7530
7555
|
},
|
|
7531
7556
|
watch: {
|
|
@@ -7594,18 +7619,18 @@ var mc = /*#__PURE__*/ X(Y.component("DitoClipboard", {
|
|
|
7594
7619
|
}
|
|
7595
7620
|
}
|
|
7596
7621
|
}
|
|
7597
|
-
}), [["render",
|
|
7622
|
+
}), [["render", hc]]);
|
|
7598
7623
|
//#endregion
|
|
7599
7624
|
//#region src/components/DitoRouterView.vue
|
|
7600
|
-
function
|
|
7625
|
+
function _c({ routeLevel: e }) {
|
|
7601
7626
|
return g(ge, null, { default: ({ Component: t, route: n }) => t ? g(t, { key: n.matched[e]?.path }) : null });
|
|
7602
7627
|
}
|
|
7603
|
-
|
|
7628
|
+
_c.props = { routeLevel: {
|
|
7604
7629
|
type: Number,
|
|
7605
7630
|
required: !0
|
|
7606
7631
|
} };
|
|
7607
|
-
var
|
|
7608
|
-
mixins: [
|
|
7632
|
+
var vc = Y.component("DitoRouterView", _c), yc = {
|
|
7633
|
+
mixins: [Ds, {
|
|
7609
7634
|
data() {
|
|
7610
7635
|
return { isLoading: !1 };
|
|
7611
7636
|
},
|
|
@@ -7833,7 +7858,7 @@ var gc = Y.component("DitoRouterView", hc), _c = {
|
|
|
7833
7858
|
});
|
|
7834
7859
|
},
|
|
7835
7860
|
async emitButtonEvent(e, t, { notify: n, error: r }) {
|
|
7836
|
-
let i = new
|
|
7861
|
+
let i = new G(e, {
|
|
7837
7862
|
nested: !1,
|
|
7838
7863
|
data: this.data,
|
|
7839
7864
|
itemLabel: this.itemLabel,
|
|
@@ -7845,16 +7870,16 @@ var gc = Y.component("DitoRouterView", hc), _c = {
|
|
|
7845
7870
|
};
|
|
7846
7871
|
//#endregion
|
|
7847
7872
|
//#region src/utils/path.js
|
|
7848
|
-
function
|
|
7873
|
+
function bc(e) {
|
|
7849
7874
|
return new URL(`file:${e}`).pathname;
|
|
7850
7875
|
}
|
|
7851
7876
|
//#endregion
|
|
7852
7877
|
//#region src/components/DitoForm.vue?vue&type=template&lang.js
|
|
7853
|
-
var
|
|
7878
|
+
var xc = ["data-resource"], Sc = {
|
|
7854
7879
|
type: "submit",
|
|
7855
7880
|
disabled: ""
|
|
7856
7881
|
};
|
|
7857
|
-
function
|
|
7882
|
+
function Cc(e, t, n, r, i, a) {
|
|
7858
7883
|
let o = w("DitoRouterView"), d = w("DitoButtons"), p = w("DitoSchema"), m = w("DitoFormInner");
|
|
7859
7884
|
return x(), l("div", {
|
|
7860
7885
|
class: y(["dito-form dito-scroll-parent", { "dito-form-nested": e.isNestedRoute }]),
|
|
@@ -7866,7 +7891,7 @@ function xc(e, t, n, r, i, a) {
|
|
|
7866
7891
|
nested: e.isNestedRoute,
|
|
7867
7892
|
label: e.itemLabel
|
|
7868
7893
|
}, {
|
|
7869
|
-
default: O(() => [k(u("button",
|
|
7894
|
+
default: O(() => [k(u("button", Sc, null, 512), [[D, !1]]), f(p, {
|
|
7870
7895
|
schema: e.schema,
|
|
7871
7896
|
dataPath: e.dataPath,
|
|
7872
7897
|
data: e.data,
|
|
@@ -7908,10 +7933,10 @@ function xc(e, t, n, r, i, a) {
|
|
|
7908
7933
|
"scrollable"
|
|
7909
7934
|
])]),
|
|
7910
7935
|
_: 1
|
|
7911
|
-
}, 8, ["nested", "label"]), [[D, e.isActiveRoute]])], 10,
|
|
7936
|
+
}, 8, ["nested", "label"]), [[D, e.isActiveRoute]])], 10, xc);
|
|
7912
7937
|
}
|
|
7913
|
-
var
|
|
7914
|
-
mixins: [vo,
|
|
7938
|
+
var wc = /*#__PURE__*/ X(Y.component("DitoForm", {
|
|
7939
|
+
mixins: [vo, yc],
|
|
7915
7940
|
data() {
|
|
7916
7941
|
return {
|
|
7917
7942
|
createdData: null,
|
|
@@ -7936,7 +7961,7 @@ var Sc = /*#__PURE__*/ X(Y.component("DitoForm", {
|
|
|
7936
7961
|
return this.getItemFormSchema(this.sourceSchema, this.data || (this.creationType ? { type: this.creationType } : null), this.context);
|
|
7937
7962
|
},
|
|
7938
7963
|
buttonSchemas() {
|
|
7939
|
-
return
|
|
7964
|
+
return pr(be({
|
|
7940
7965
|
cancel: {
|
|
7941
7966
|
type: "button",
|
|
7942
7967
|
events: { click: () => this.cancel() }
|
|
@@ -7996,7 +8021,7 @@ var Sc = /*#__PURE__*/ X(Y.component("DitoForm", {
|
|
|
7996
8021
|
let e = this.isLeavingRoute ? null : this.parentRouteComponent.data;
|
|
7997
8022
|
if (!e) return null;
|
|
7998
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];
|
|
7999
|
-
|
|
8024
|
+
Fn(this.sourceSchema) && i === "create" && t.length--;
|
|
8000
8025
|
let a = null;
|
|
8001
8026
|
for (let n = 0, i = t.length; n < i && e; n++) {
|
|
8002
8027
|
let o = t[n];
|
|
@@ -8037,7 +8062,7 @@ var Sc = /*#__PURE__*/ X(Y.component("DitoForm", {
|
|
|
8037
8062
|
sourceItem: {
|
|
8038
8063
|
immediate: !0,
|
|
8039
8064
|
handler(e) {
|
|
8040
|
-
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` }));
|
|
8041
8066
|
}
|
|
8042
8067
|
},
|
|
8043
8068
|
isCreating(e) {
|
|
@@ -8063,7 +8088,7 @@ var Sc = /*#__PURE__*/ X(Y.component("DitoForm", {
|
|
|
8063
8088
|
return this.api.denormalizePath(this.path.slice((e.isView ? 0 : e.path.length) + 1));
|
|
8064
8089
|
},
|
|
8065
8090
|
getResource(e) {
|
|
8066
|
-
let t =
|
|
8091
|
+
let t = yc.methods.getResource.call(this, e);
|
|
8067
8092
|
return Ei(this.itemId, t) || t;
|
|
8068
8093
|
},
|
|
8069
8094
|
setupData() {
|
|
@@ -8077,7 +8102,7 @@ var Sc = /*#__PURE__*/ X(Y.component("DitoForm", {
|
|
|
8077
8102
|
return !1;
|
|
8078
8103
|
},
|
|
8079
8104
|
addSourceData(e) {
|
|
8080
|
-
return
|
|
8105
|
+
return Fn(this.sourceSchema) ? this.setSourceData(e) : !!this.sourceData?.push(e);
|
|
8081
8106
|
},
|
|
8082
8107
|
clearData() {
|
|
8083
8108
|
this.setData(null);
|
|
@@ -8148,7 +8173,7 @@ var Sc = /*#__PURE__*/ X(Y.component("DitoForm", {
|
|
|
8148
8173
|
else if (this.isCreating) {
|
|
8149
8174
|
let e = this.getItemId(this.schema, this.data);
|
|
8150
8175
|
this.$router.replace({
|
|
8151
|
-
path:
|
|
8176
|
+
path: bc(`${this.path}/../${e}`),
|
|
8152
8177
|
hash: this.$route.hash
|
|
8153
8178
|
});
|
|
8154
8179
|
}
|
|
@@ -8168,16 +8193,16 @@ var Sc = /*#__PURE__*/ X(Y.component("DitoForm", {
|
|
|
8168
8193
|
return c;
|
|
8169
8194
|
}
|
|
8170
8195
|
}
|
|
8171
|
-
}), [["render",
|
|
8172
|
-
function
|
|
8173
|
-
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", {
|
|
8174
8199
|
key: 1,
|
|
8175
8200
|
class: "dito-scroll-parent",
|
|
8176
8201
|
"aria-label": e.label,
|
|
8177
8202
|
onSubmit: t[0] ||= A(() => {}, ["prevent"])
|
|
8178
|
-
}, [C(e.$slots, "default")], 40,
|
|
8203
|
+
}, [C(e.$slots, "default")], 40, Ec));
|
|
8179
8204
|
}
|
|
8180
|
-
var
|
|
8205
|
+
var Oc = /*#__PURE__*/ X(Y.component("DitoFormInner", { props: {
|
|
8181
8206
|
nested: {
|
|
8182
8207
|
type: Boolean,
|
|
8183
8208
|
default: !1
|
|
@@ -8186,15 +8211,15 @@ var Ec = /*#__PURE__*/ X(Y.component("DitoFormInner", { props: {
|
|
|
8186
8211
|
type: String,
|
|
8187
8212
|
default: null
|
|
8188
8213
|
}
|
|
8189
|
-
} }), [["render",
|
|
8214
|
+
} }), [["render", Dc]]), kc = Y.component("DitoFormNested", { extends: wc }), Ac = {
|
|
8190
8215
|
key: 0,
|
|
8191
8216
|
class: "dito-errors",
|
|
8192
8217
|
role: "alert"
|
|
8193
8218
|
};
|
|
8194
|
-
function
|
|
8195
|
-
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);
|
|
8196
8221
|
}
|
|
8197
|
-
var
|
|
8222
|
+
var Mc = /*#__PURE__*/ X(Y.component("DitoErrors", {
|
|
8198
8223
|
props: { errors: {
|
|
8199
8224
|
type: Array,
|
|
8200
8225
|
default: null
|
|
@@ -8227,14 +8252,14 @@ var Ac = /*#__PURE__*/ X(Y.component("DitoErrors", {
|
|
|
8227
8252
|
zIndex: 1
|
|
8228
8253
|
}), e.popper.addEventListener("mousedown", () => e.hide()), e.show());
|
|
8229
8254
|
} }
|
|
8230
|
-
}), [["render",
|
|
8255
|
+
}), [["render", jc]]), Nc = { class: "dito-scopes" }, Pc = [
|
|
8231
8256
|
"aria-pressed",
|
|
8232
8257
|
"title",
|
|
8233
8258
|
"onClick"
|
|
8234
8259
|
];
|
|
8235
|
-
function
|
|
8260
|
+
function Fc(e, n, r, i, a, o) {
|
|
8236
8261
|
let c = w("RouterLink");
|
|
8237
|
-
return x(), l("div",
|
|
8262
|
+
return x(), l("div", Nc, [(x(!0), l(t, null, S(e.scopes, (t, n) => (x(), s(c, {
|
|
8238
8263
|
key: n,
|
|
8239
8264
|
to: e.getScopeLink(t),
|
|
8240
8265
|
custom: ""
|
|
@@ -8245,11 +8270,11 @@ function Nc(e, n, r, i, a, o) {
|
|
|
8245
8270
|
"aria-pressed": t.name === e.query.scope,
|
|
8246
8271
|
title: t.hint || e.getLabel(t),
|
|
8247
8272
|
onClick: n
|
|
8248
|
-
}, E(e.getLabel(t)), 11,
|
|
8273
|
+
}, E(e.getLabel(t)), 11, Pc)]),
|
|
8249
8274
|
_: 2
|
|
8250
8275
|
}, 1032, ["to"]))), 128))]);
|
|
8251
8276
|
}
|
|
8252
|
-
var
|
|
8277
|
+
var Ic = /*#__PURE__*/ X(Y.component("DitoScopes", {
|
|
8253
8278
|
props: {
|
|
8254
8279
|
query: {
|
|
8255
8280
|
type: Object,
|
|
@@ -8267,10 +8292,10 @@ var Pc = /*#__PURE__*/ X(Y.component("DitoScopes", {
|
|
|
8267
8292
|
};
|
|
8268
8293
|
return t.page &&= 0, this.getQueryLink(t);
|
|
8269
8294
|
} }
|
|
8270
|
-
}), [["render",
|
|
8295
|
+
}), [["render", Fc]]);
|
|
8271
8296
|
//#endregion
|
|
8272
8297
|
//#region src/components/DitoPagination.vue?vue&type=template&lang.js
|
|
8273
|
-
function
|
|
8298
|
+
function Lc(e, t, n, r, i, a) {
|
|
8274
8299
|
let o = w("Pagination");
|
|
8275
8300
|
return x(), s(o, {
|
|
8276
8301
|
page: e.page,
|
|
@@ -8283,7 +8308,7 @@ function Fc(e, t, n, r, i, a) {
|
|
|
8283
8308
|
"total"
|
|
8284
8309
|
]);
|
|
8285
8310
|
}
|
|
8286
|
-
var
|
|
8311
|
+
var Rc = /*#__PURE__*/ X(Y.component("DitoPagination", {
|
|
8287
8312
|
components: { Pagination: to },
|
|
8288
8313
|
props: {
|
|
8289
8314
|
query: {
|
|
@@ -8310,7 +8335,7 @@ var Ic = /*#__PURE__*/ X(Y.component("DitoPagination", {
|
|
|
8310
8335
|
}));
|
|
8311
8336
|
}
|
|
8312
8337
|
} }
|
|
8313
|
-
}), [["render",
|
|
8338
|
+
}), [["render", Lc]]), zc = {
|
|
8314
8339
|
data() {
|
|
8315
8340
|
return { isDragging: !1 };
|
|
8316
8341
|
},
|
|
@@ -8336,23 +8361,23 @@ var Ic = /*#__PURE__*/ X(Y.component("DitoPagination", {
|
|
|
8336
8361
|
this.isDragging = !1, e !== t && this.onChange();
|
|
8337
8362
|
}
|
|
8338
8363
|
}
|
|
8339
|
-
},
|
|
8364
|
+
}, Bc = ["id", "data-path"], Vc = {
|
|
8340
8365
|
key: 0,
|
|
8341
8366
|
class: "dito-tree-header"
|
|
8342
|
-
},
|
|
8367
|
+
}, Hc = ["aria-label", "aria-expanded"], Uc = ["innerHTML"], Wc = {
|
|
8343
8368
|
key: 1,
|
|
8344
8369
|
class: "dito-tree-info"
|
|
8345
|
-
},
|
|
8370
|
+
}, Gc = {
|
|
8346
8371
|
key: 1,
|
|
8347
8372
|
class: "dito-tree-leaf"
|
|
8348
|
-
},
|
|
8373
|
+
}, Kc = ["innerHTML"], qc = {
|
|
8349
8374
|
key: 2,
|
|
8350
8375
|
class: "dito-buttons dito-buttons--small"
|
|
8351
|
-
},
|
|
8376
|
+
}, Jc = {
|
|
8352
8377
|
key: 1,
|
|
8353
8378
|
class: "dito-properties"
|
|
8354
8379
|
};
|
|
8355
|
-
function
|
|
8380
|
+
function Yc(e, n, r, i, a, o) {
|
|
8356
8381
|
let d = w("DitoLabel"), p = w("DitoTableCell"), m = w("DitoTreeItem", !0), h = w("DitoDraggable");
|
|
8357
8382
|
return x(), l("div", {
|
|
8358
8383
|
class: y(["dito-tree-item", {
|
|
@@ -8363,7 +8388,7 @@ function qc(e, n, r, i, a, o) {
|
|
|
8363
8388
|
style: b(e.level > 0 && { "--level": e.level }),
|
|
8364
8389
|
"data-path": e.path
|
|
8365
8390
|
}, [
|
|
8366
|
-
e.label ? (x(), l("div",
|
|
8391
|
+
e.label ? (x(), l("div", Vc, [e.numEntries ? (x(), l("div", {
|
|
8367
8392
|
key: 0,
|
|
8368
8393
|
class: "dito-tree-branch",
|
|
8369
8394
|
role: "button",
|
|
@@ -8380,12 +8405,12 @@ function qc(e, n, r, i, a, o) {
|
|
|
8380
8405
|
u("div", {
|
|
8381
8406
|
class: "dito-tree-label",
|
|
8382
8407
|
innerHTML: e.label
|
|
8383
|
-
}, null, 8,
|
|
8384
|
-
e.details ? (x(), l("div",
|
|
8385
|
-
], 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", {
|
|
8386
8411
|
class: "dito-tree-label",
|
|
8387
8412
|
innerHTML: e.label
|
|
8388
|
-
}, null, 8,
|
|
8413
|
+
}, null, 8, Kc)])), e.hasEditButtons ? (x(), l("div", qc, [
|
|
8389
8414
|
e.draggable ? (x(), l("a", v({
|
|
8390
8415
|
key: 0,
|
|
8391
8416
|
class: "dito-button"
|
|
@@ -8401,7 +8426,7 @@ function qc(e, n, r, i, a, o) {
|
|
|
8401
8426
|
type: "button"
|
|
8402
8427
|
}, e.getButtonAttributes(e.verbs.delete), { onClick: n[3] ||= (...t) => e.onDelete && e.onDelete(...t) }), null, 16)) : c("", !0)
|
|
8403
8428
|
])) : c("", !0)])) : c("", !0),
|
|
8404
|
-
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, {
|
|
8405
8430
|
key: 0,
|
|
8406
8431
|
label: e.getLabel(t)
|
|
8407
8432
|
}, null, 8, ["label"]))]), f(p, {
|
|
@@ -8456,10 +8481,10 @@ function qc(e, n, r, i, a, o) {
|
|
|
8456
8481
|
"draggable",
|
|
8457
8482
|
"modelValue"
|
|
8458
8483
|
])), [[D, e.opened]]) : c("", !0)
|
|
8459
|
-
], 14,
|
|
8484
|
+
], 14, Bc);
|
|
8460
8485
|
}
|
|
8461
|
-
var
|
|
8462
|
-
mixins: [
|
|
8486
|
+
var Xc = /*#__PURE__*/ X(Y.component("DitoTreeItem", {
|
|
8487
|
+
mixins: [Ds, zc],
|
|
8463
8488
|
emits: ["update:data"],
|
|
8464
8489
|
inject: ["container"],
|
|
8465
8490
|
props: {
|
|
@@ -8524,7 +8549,7 @@ var Jc = /*#__PURE__*/ X(Y.component("DitoTreeItem", {
|
|
|
8524
8549
|
};
|
|
8525
8550
|
},
|
|
8526
8551
|
properties() {
|
|
8527
|
-
return
|
|
8552
|
+
return fr(this.schema.properties);
|
|
8528
8553
|
},
|
|
8529
8554
|
childrenSchema() {
|
|
8530
8555
|
return this.schema.children;
|
|
@@ -8585,14 +8610,14 @@ var Jc = /*#__PURE__*/ X(Y.component("DitoTreeItem", {
|
|
|
8585
8610
|
type: Boolean,
|
|
8586
8611
|
default: !1,
|
|
8587
8612
|
get(e) {
|
|
8588
|
-
return e &&
|
|
8613
|
+
return e && $n(this.schema);
|
|
8589
8614
|
}
|
|
8590
8615
|
}),
|
|
8591
8616
|
editable: q("editable", {
|
|
8592
8617
|
type: Boolean,
|
|
8593
8618
|
default: !1,
|
|
8594
8619
|
get(e) {
|
|
8595
|
-
return e &&
|
|
8620
|
+
return e && $n(this.schema);
|
|
8596
8621
|
}
|
|
8597
8622
|
}),
|
|
8598
8623
|
deletable: q("deletable", {
|
|
@@ -8618,17 +8643,17 @@ var Jc = /*#__PURE__*/ X(Y.component("DitoTreeItem", {
|
|
|
8618
8643
|
this.container.onChange();
|
|
8619
8644
|
},
|
|
8620
8645
|
onEndDrag(e) {
|
|
8621
|
-
|
|
8646
|
+
zc.methods.onEndDrag.call(this, e);
|
|
8622
8647
|
let { item: t } = e;
|
|
8623
8648
|
t.classList.contains("dito-tree-item--active") && this.$nextTick(() => {
|
|
8624
8649
|
this.editPath(e.item.dataset.path);
|
|
8625
8650
|
});
|
|
8626
8651
|
}
|
|
8627
8652
|
}
|
|
8628
|
-
}), [["render",
|
|
8629
|
-
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) {
|
|
8630
8655
|
let d = w("RouterLink");
|
|
8631
|
-
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", {
|
|
8632
8657
|
key: 0,
|
|
8633
8658
|
scope: "col",
|
|
8634
8659
|
class: y(e.getColumnClass(r))
|
|
@@ -8642,11 +8667,11 @@ function $c(e, n, r, i, a, o) {
|
|
|
8642
8667
|
type: "button",
|
|
8643
8668
|
"aria-sort": e.getSortState(r),
|
|
8644
8669
|
onClick: t
|
|
8645
|
-
}, [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)]),
|
|
8646
8671
|
_: 2
|
|
8647
|
-
}, 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)])]);
|
|
8648
8673
|
}
|
|
8649
|
-
var
|
|
8674
|
+
var nl = /*#__PURE__*/ X(Y.component("DitoTableHead", {
|
|
8650
8675
|
props: {
|
|
8651
8676
|
query: {
|
|
8652
8677
|
type: Object,
|
|
@@ -8689,8 +8714,8 @@ var el = /*#__PURE__*/ X(Y.component("DitoTableHead", {
|
|
|
8689
8714
|
});
|
|
8690
8715
|
}
|
|
8691
8716
|
}
|
|
8692
|
-
}), [["render",
|
|
8693
|
-
function
|
|
8717
|
+
}), [["render", tl]]), rl = ["innerHTML"];
|
|
8718
|
+
function il(e, t, n, r, i, a) {
|
|
8694
8719
|
return x(), l("td", {
|
|
8695
8720
|
class: y(e.cell.class),
|
|
8696
8721
|
style: b(e.cell.style)
|
|
@@ -8714,9 +8739,9 @@ function nl(e, t, n, r, i, a) {
|
|
|
8714
8739
|
])) : (x(), l("span", {
|
|
8715
8740
|
key: 1,
|
|
8716
8741
|
innerHTML: e.renderCell(e.data)
|
|
8717
|
-
}, null, 8,
|
|
8742
|
+
}, null, 8, rl))], 6);
|
|
8718
8743
|
}
|
|
8719
|
-
var
|
|
8744
|
+
var al = /*#__PURE__*/ X(Y.component("DitoTableCell", {
|
|
8720
8745
|
mixins: [K],
|
|
8721
8746
|
props: {
|
|
8722
8747
|
cell: {
|
|
@@ -8754,30 +8779,30 @@ var rl = /*#__PURE__*/ X(Y.component("DitoTableCell", {
|
|
|
8754
8779
|
},
|
|
8755
8780
|
methods: { renderCell(e) {
|
|
8756
8781
|
let { name: t, render: n } = this.cell, r = e[t];
|
|
8757
|
-
return n ? n.call(this, new
|
|
8782
|
+
return n ? n.call(this, new G(this, {
|
|
8758
8783
|
name: t,
|
|
8759
8784
|
value: r,
|
|
8760
8785
|
data: e,
|
|
8761
8786
|
dataPath: V(this.dataPath, t)
|
|
8762
8787
|
})) : De(r);
|
|
8763
8788
|
} }
|
|
8764
|
-
}), [["render",
|
|
8789
|
+
}), [["render", il]]), ol = { class: "dito-upload-file" }, sl = { class: "dito-thumbnail__inner" }, cl = ["src"], ll = {
|
|
8765
8790
|
key: 1,
|
|
8766
8791
|
class: "dito-thumbnail__type"
|
|
8767
8792
|
};
|
|
8768
|
-
function
|
|
8769
|
-
return x(), l("div",
|
|
8793
|
+
function ul(e, t, n, r, i, a) {
|
|
8794
|
+
return x(), l("div", ol, [e.thumbnail ? (x(), l("div", {
|
|
8770
8795
|
key: 0,
|
|
8771
8796
|
class: y(["dito-thumbnail", `dito-thumbnail--${e.thumbnail}`])
|
|
8772
|
-
}, [u("div",
|
|
8797
|
+
}, [u("div", sl, [e.source ? (x(), l("img", {
|
|
8773
8798
|
key: 0,
|
|
8774
8799
|
src: e.source,
|
|
8775
8800
|
crossorigin: "anonymous"
|
|
8776
|
-
}, 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)]);
|
|
8777
8802
|
}
|
|
8778
8803
|
//#endregion
|
|
8779
8804
|
//#region src/components/DitoUploadFile.vue
|
|
8780
|
-
var
|
|
8805
|
+
var dl = Y.component("DitoUploadFile", {
|
|
8781
8806
|
props: {
|
|
8782
8807
|
file: {
|
|
8783
8808
|
type: Object,
|
|
@@ -8797,7 +8822,7 @@ var ll = Y.component("DitoUploadFile", {
|
|
|
8797
8822
|
},
|
|
8798
8823
|
computed: {
|
|
8799
8824
|
type() {
|
|
8800
|
-
return
|
|
8825
|
+
return fl[this.file.type] || this.file.name.split(".").pop().toUpperCase();
|
|
8801
8826
|
},
|
|
8802
8827
|
source() {
|
|
8803
8828
|
return this.uploadUrl || this.thumbnailUrl;
|
|
@@ -8814,7 +8839,7 @@ var ll = Y.component("DitoUploadFile", {
|
|
|
8814
8839
|
} else this.uploadUrl = null;
|
|
8815
8840
|
}
|
|
8816
8841
|
} }
|
|
8817
|
-
}),
|
|
8842
|
+
}), fl = {
|
|
8818
8843
|
"text/plain": "TXT",
|
|
8819
8844
|
"text/html": "HTML",
|
|
8820
8845
|
"text/css": "CSS",
|
|
@@ -8829,12 +8854,12 @@ var ll = Y.component("DitoUploadFile", {
|
|
|
8829
8854
|
"application/xml": "XML",
|
|
8830
8855
|
"application/pdf": "PDF",
|
|
8831
8856
|
"application/zip": "ZIP"
|
|
8832
|
-
},
|
|
8857
|
+
}, pl = /*#__PURE__*/ X(dl, [["render", ul]]);
|
|
8833
8858
|
//#endregion
|
|
8834
8859
|
//#region ../../node_modules/@vueuse/integrations/dist/useSortable.js
|
|
8835
|
-
function
|
|
8860
|
+
function ml(e, t, n = {}) {
|
|
8836
8861
|
let r, { document: i = tt, watchElement: a = !1, ...o } = n, s = { onUpdate: (e) => {
|
|
8837
|
-
|
|
8862
|
+
_l(t, e.oldIndex, e.newIndex, e);
|
|
8838
8863
|
} }, c = () => {
|
|
8839
8864
|
r?.destroy(), r = void 0;
|
|
8840
8865
|
}, l = (e) => {
|
|
@@ -8864,15 +8889,15 @@ function fl(e, t, n = {}) {
|
|
|
8864
8889
|
option: d
|
|
8865
8890
|
};
|
|
8866
8891
|
}
|
|
8867
|
-
function
|
|
8892
|
+
function hl(e, t, n) {
|
|
8868
8893
|
let r = e.children[n];
|
|
8869
8894
|
e.insertBefore(t, r);
|
|
8870
8895
|
}
|
|
8871
|
-
function
|
|
8896
|
+
function gl(e) {
|
|
8872
8897
|
e.parentNode && e.parentNode.removeChild(e);
|
|
8873
8898
|
}
|
|
8874
|
-
function
|
|
8875
|
-
r != null && (
|
|
8899
|
+
function _l(e, t, n, r = null) {
|
|
8900
|
+
r != null && (gl(r.item), hl(r.from, r.item, t));
|
|
8876
8901
|
let i = _(e), a = i ? [...se(e)] : se(e);
|
|
8877
8902
|
if (n >= 0 && n < a.length) {
|
|
8878
8903
|
let r = a.splice(t, 1)[0];
|
|
@@ -8883,8 +8908,8 @@ function hl(e, t, n, r = null) {
|
|
|
8883
8908
|
}
|
|
8884
8909
|
//#endregion
|
|
8885
8910
|
//#region ../../node_modules/@vueuse/integrations/dist/useSortable/component.js
|
|
8886
|
-
var
|
|
8887
|
-
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));
|
|
8888
8913
|
return () => {
|
|
8889
8914
|
if (t.default) return g(e.as || "div", { ref: r }, t.default(i));
|
|
8890
8915
|
};
|
|
@@ -8898,7 +8923,7 @@ var gl = /* #__PURE__ */ p((e, { slots: t }) => {
|
|
|
8898
8923
|
});
|
|
8899
8924
|
//#endregion
|
|
8900
8925
|
//#region src/components/DitoDraggable.vue?vue&type=template&lang.js
|
|
8901
|
-
function
|
|
8926
|
+
function yl(e, t, n, r, i, a) {
|
|
8902
8927
|
let o = w("UseSortable");
|
|
8903
8928
|
return e.draggable ? (x(), s(o, {
|
|
8904
8929
|
key: 0,
|
|
@@ -8924,9 +8949,9 @@ function _l(e, t, n, r, i, a) {
|
|
|
8924
8949
|
_: 3
|
|
8925
8950
|
}));
|
|
8926
8951
|
}
|
|
8927
|
-
var
|
|
8952
|
+
var bl = /*#__PURE__*/ X(Y.component("DitoDraggable", {
|
|
8928
8953
|
mixins: [mo],
|
|
8929
|
-
components: { UseSortable:
|
|
8954
|
+
components: { UseSortable: vl },
|
|
8930
8955
|
emits: ["update:modelValue"],
|
|
8931
8956
|
props: {
|
|
8932
8957
|
modelValue: {
|
|
@@ -8967,55 +8992,55 @@ var vl = /*#__PURE__*/ X(Y.component("DitoDraggable", {
|
|
|
8967
8992
|
this.isDragging = !1, this.mouseEvents?.remove(), this.mouseEvents = null;
|
|
8968
8993
|
}
|
|
8969
8994
|
}
|
|
8970
|
-
}), [["render",
|
|
8995
|
+
}), [["render", yl]]);
|
|
8971
8996
|
//#endregion
|
|
8972
8997
|
//#region src/components/DitoVNode.vue
|
|
8973
|
-
function
|
|
8998
|
+
function xl({ vnode: e }) {
|
|
8974
8999
|
return e;
|
|
8975
9000
|
}
|
|
8976
|
-
|
|
9001
|
+
xl.props = { vnode: {
|
|
8977
9002
|
type: Object,
|
|
8978
9003
|
required: !0
|
|
8979
9004
|
} };
|
|
8980
|
-
var
|
|
8981
|
-
DitoAccount: () =>
|
|
8982
|
-
DitoAffix: () =>
|
|
9005
|
+
var Sl = Y.component("DitoVnode", xl), Cl = /* @__PURE__ */ Ht({
|
|
9006
|
+
DitoAccount: () => ms,
|
|
9007
|
+
DitoAffix: () => vs,
|
|
8983
9008
|
DitoAffixes: () => Z,
|
|
8984
|
-
DitoButtons: () =>
|
|
8985
|
-
DitoClipboard: () =>
|
|
8986
|
-
DitoContainer: () =>
|
|
8987
|
-
DitoCreateButton: () =>
|
|
8988
|
-
DitoDialog: () =>
|
|
8989
|
-
DitoDraggable: () =>
|
|
8990
|
-
DitoEditButtons: () =>
|
|
8991
|
-
DitoErrors: () =>
|
|
8992
|
-
DitoForm: () =>
|
|
8993
|
-
DitoFormInner: () =>
|
|
8994
|
-
DitoFormNested: () =>
|
|
8995
|
-
DitoHeader: () =>
|
|
8996
|
-
DitoLabel: () =>
|
|
8997
|
-
DitoMenu: () =>
|
|
8998
|
-
DitoNavigation: () =>
|
|
8999
|
-
DitoNotifications: () =>
|
|
9000
|
-
DitoPagination: () =>
|
|
9001
|
-
DitoPane: () =>
|
|
9002
|
-
DitoPanel: () =>
|
|
9003
|
-
DitoPanels: () =>
|
|
9004
|
-
DitoRoot: () =>
|
|
9005
|
-
DitoRouterView: () =>
|
|
9006
|
-
DitoSchema: () =>
|
|
9007
|
-
DitoSchemaInlined: () =>
|
|
9008
|
-
DitoScopes: () =>
|
|
9009
|
-
DitoSidebar: () =>
|
|
9010
|
-
DitoSpinner: () =>
|
|
9011
|
-
DitoTableCell: () =>
|
|
9012
|
-
DitoTableHead: () =>
|
|
9013
|
-
DitoTabs: () =>
|
|
9014
|
-
DitoTrail: () =>
|
|
9015
|
-
DitoTreeItem: () =>
|
|
9016
|
-
DitoUploadFile: () =>
|
|
9017
|
-
DitoVNode: () =>
|
|
9018
|
-
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
|
|
9019
9044
|
}), Q = {
|
|
9020
9045
|
extends: Y,
|
|
9021
9046
|
mixins: [ai],
|
|
@@ -9034,19 +9059,19 @@ var bl = Y.component("DitoVnode", yl), xl = /* @__PURE__ */ Ht({
|
|
|
9034
9059
|
component: Y.component,
|
|
9035
9060
|
get: dn,
|
|
9036
9061
|
register(e, t = {}) {
|
|
9037
|
-
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.`);
|
|
9038
9063
|
let n = this.component(`DitoType${xe(e[0], !0)}`, t);
|
|
9039
9064
|
for (let t of e) un(t, n);
|
|
9040
9065
|
return n;
|
|
9041
9066
|
}
|
|
9042
9067
|
};
|
|
9043
|
-
function
|
|
9068
|
+
function wl(e) {
|
|
9044
9069
|
return [e, ...e.mixins ?? []].some(({ methods: e }) => !!e?.getValidations);
|
|
9045
9070
|
}
|
|
9046
9071
|
//#endregion
|
|
9047
9072
|
//#region src/types/DitoTypeButton.vue?vue&type=template&lang.js
|
|
9048
|
-
var
|
|
9049
|
-
function
|
|
9073
|
+
var Tl = ["data-info"];
|
|
9074
|
+
function El(e, t, n, r, i, a) {
|
|
9050
9075
|
let o = w("DitoAffixes"), u = w("DitoButton");
|
|
9051
9076
|
return x(), s(u, v({
|
|
9052
9077
|
class: ["dito-button", e.buttonClass],
|
|
@@ -9082,7 +9107,7 @@ function wl(e, t, n, r, i, a) {
|
|
|
9082
9107
|
key: 1,
|
|
9083
9108
|
class: "dito-info",
|
|
9084
9109
|
"data-info": e.info
|
|
9085
|
-
}, null, 8,
|
|
9110
|
+
}, null, 8, Tl)) : c("", !0)]),
|
|
9086
9111
|
_: 1
|
|
9087
9112
|
}, 16, [
|
|
9088
9113
|
"id",
|
|
@@ -9093,7 +9118,7 @@ function wl(e, t, n, r, i, a) {
|
|
|
9093
9118
|
"class"
|
|
9094
9119
|
]);
|
|
9095
9120
|
}
|
|
9096
|
-
var
|
|
9121
|
+
var Dl = /*#__PURE__*/ X(Q.register(["button", "submit"], {
|
|
9097
9122
|
components: {
|
|
9098
9123
|
DitoAffixes: Z,
|
|
9099
9124
|
DitoButton: Vi
|
|
@@ -9159,16 +9184,16 @@ var Tl = /*#__PURE__*/ X(Q.register(["button", "submit"], {
|
|
|
9159
9184
|
}
|
|
9160
9185
|
}
|
|
9161
9186
|
}
|
|
9162
|
-
}), [["render",
|
|
9163
|
-
function
|
|
9164
|
-
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({
|
|
9165
9190
|
id: e.componentPath,
|
|
9166
9191
|
ref: "element",
|
|
9167
9192
|
"onUpdate:modelValue": t[0] ||= (t) => e.value = t,
|
|
9168
9193
|
type: "checkbox"
|
|
9169
|
-
}, e.attributes), null, 16,
|
|
9194
|
+
}, e.attributes), null, 16, kl), [[le, e.value]])]);
|
|
9170
9195
|
}
|
|
9171
|
-
var
|
|
9196
|
+
var jl = /*#__PURE__*/ X(Q.register("checkbox", { nativeField: !0 }), [["render", Al]]), Ml = {
|
|
9172
9197
|
computed: {
|
|
9173
9198
|
multiple() {
|
|
9174
9199
|
return Tr(this.schema);
|
|
@@ -9260,11 +9285,11 @@ var kl = /*#__PURE__*/ X(Q.register("checkbox", { nativeField: !0 }), [["render"
|
|
|
9260
9285
|
type: Boolean,
|
|
9261
9286
|
default: !1,
|
|
9262
9287
|
get(e) {
|
|
9263
|
-
return e &&
|
|
9288
|
+
return e && rr(this.schema, this.context);
|
|
9264
9289
|
}
|
|
9265
9290
|
}),
|
|
9266
9291
|
editPath() {
|
|
9267
|
-
return this.editable && this.selectedValue ?
|
|
9292
|
+
return this.editable && this.selectedValue ? ar(this.schema, this.selectedValue, this.context) : null;
|
|
9268
9293
|
},
|
|
9269
9294
|
groupByLabel() {
|
|
9270
9295
|
return this.groupBy ? "label" : null;
|
|
@@ -9316,7 +9341,7 @@ var kl = /*#__PURE__*/ X(Q.register("checkbox", { nativeField: !0 }), [["render"
|
|
|
9316
9341
|
for (let i of e) if (r) {
|
|
9317
9342
|
let e = t(i.options, n, null);
|
|
9318
9343
|
if (e) return e;
|
|
9319
|
-
} else if (this.optionEquals ? this.optionEquals(new
|
|
9344
|
+
} else if (this.optionEquals ? this.optionEquals(new G(this, {
|
|
9320
9345
|
value: n,
|
|
9321
9346
|
option: i
|
|
9322
9347
|
})) : n === this.getValueForOption(i)) return i;
|
|
@@ -9326,11 +9351,11 @@ var kl = /*#__PURE__*/ X(Q.register("checkbox", { nativeField: !0 }), [["render"
|
|
|
9326
9351
|
getValueForOption(e) {
|
|
9327
9352
|
if (this.shouldSetTemporaryId(e)) return oe(e);
|
|
9328
9353
|
let { optionValue: t } = this;
|
|
9329
|
-
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;
|
|
9330
9355
|
},
|
|
9331
9356
|
getLabelForOption(e) {
|
|
9332
9357
|
let { optionLabel: t } = this;
|
|
9333
|
-
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}`);
|
|
9334
9359
|
}
|
|
9335
9360
|
},
|
|
9336
9361
|
processValue({ schema: e, value: t, dataPath: n }, r) {
|
|
@@ -9342,23 +9367,23 @@ var kl = /*#__PURE__*/ X(Q.register("checkbox", { nativeField: !0 }), [["render"
|
|
|
9342
9367
|
}
|
|
9343
9368
|
return t;
|
|
9344
9369
|
}
|
|
9345
|
-
},
|
|
9346
|
-
function
|
|
9370
|
+
}, Nl = ["id", "aria-label"], Pl = { class: "dito-checkbox" }, Fl = ["value"];
|
|
9371
|
+
function Il(e, n, r, i, a, o) {
|
|
9347
9372
|
return x(), l("ul", {
|
|
9348
9373
|
class: y(["dito-checkboxes", `dito-layout--${e.schema.layout || "vertical"}`]),
|
|
9349
9374
|
id: e.componentPath,
|
|
9350
9375
|
role: "group",
|
|
9351
9376
|
"aria-label": e.label
|
|
9352
|
-
}, [(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({
|
|
9353
9378
|
ref_for: !0,
|
|
9354
9379
|
ref: "element",
|
|
9355
9380
|
"onUpdate:modelValue": n[0] ||= (t) => e.selectedOptions = t,
|
|
9356
9381
|
type: "checkbox",
|
|
9357
9382
|
value: e.getValueForOption(t)
|
|
9358
|
-
}, { 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);
|
|
9359
9384
|
}
|
|
9360
|
-
var
|
|
9361
|
-
mixins: [
|
|
9385
|
+
var Ll = /*#__PURE__*/ X(Q.register("checkboxes", {
|
|
9386
|
+
mixins: [Ml],
|
|
9362
9387
|
nativeField: !0,
|
|
9363
9388
|
defaultValue: [],
|
|
9364
9389
|
defaultWidth: "auto",
|
|
@@ -9376,22 +9401,22 @@ var Fl = /*#__PURE__*/ X(Q.register("checkboxes", {
|
|
|
9376
9401
|
}
|
|
9377
9402
|
}
|
|
9378
9403
|
}
|
|
9379
|
-
}), [["render",
|
|
9404
|
+
}), [["render", Il]]), Rl = ["id"], zl = {
|
|
9380
9405
|
class: "dito-code__editor",
|
|
9381
9406
|
ref: "editor"
|
|
9382
9407
|
};
|
|
9383
|
-
function
|
|
9408
|
+
function Bl(e, t, n, r, i, a) {
|
|
9384
9409
|
return x(), l("div", {
|
|
9385
9410
|
class: "dito-code",
|
|
9386
9411
|
id: e.componentPath,
|
|
9387
9412
|
style: b(e.style)
|
|
9388
|
-
}, [u("div",
|
|
9413
|
+
}, [u("div", zl, null, 512), e.resizable ? (x(), l("div", {
|
|
9389
9414
|
key: 0,
|
|
9390
9415
|
class: "dito-resize",
|
|
9391
9416
|
onMousedown: t[0] ||= A((...t) => e.onDragResize && e.onDragResize(...t), ["stop", "prevent"])
|
|
9392
|
-
}, null, 32)) : c("", !0)], 12,
|
|
9417
|
+
}, null, 32)) : c("", !0)], 12, Rl);
|
|
9393
9418
|
}
|
|
9394
|
-
var
|
|
9419
|
+
var Vl = /*#__PURE__*/ X(Q.register("code", {
|
|
9395
9420
|
mixins: [mo],
|
|
9396
9421
|
data() {
|
|
9397
9422
|
return { height: null };
|
|
@@ -9466,11 +9491,11 @@ var zl = /*#__PURE__*/ X(Q.register("code", {
|
|
|
9466
9491
|
});
|
|
9467
9492
|
}
|
|
9468
9493
|
}
|
|
9469
|
-
}), [["render",
|
|
9494
|
+
}), [["render", Bl]]), Hl = {
|
|
9470
9495
|
key: 0,
|
|
9471
9496
|
class: "dito-color__preview"
|
|
9472
9497
|
};
|
|
9473
|
-
function
|
|
9498
|
+
function Ul(e, t, n, r, i, a) {
|
|
9474
9499
|
let o = w("DitoAffixes"), d = w("DitoInput"), p = w("SketchPicker"), m = w("DitoTrigger");
|
|
9475
9500
|
return x(), s(m, {
|
|
9476
9501
|
class: "dito-color",
|
|
@@ -9508,7 +9533,7 @@ function Vl(e, t, n, r, i, a) {
|
|
|
9508
9533
|
parentContext: e.context,
|
|
9509
9534
|
onClear: e.clear
|
|
9510
9535
|
}, {
|
|
9511
|
-
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)]),
|
|
9512
9537
|
_: 1
|
|
9513
9538
|
}, 8, [
|
|
9514
9539
|
"items",
|
|
@@ -9542,7 +9567,7 @@ function Vl(e, t, n, r, i, a) {
|
|
|
9542
9567
|
}
|
|
9543
9568
|
//#endregion
|
|
9544
9569
|
//#region src/types/DitoTypeColor.vue
|
|
9545
|
-
var
|
|
9570
|
+
var Wl = Q.register("color", {
|
|
9546
9571
|
components: {
|
|
9547
9572
|
DitoTrigger: wa,
|
|
9548
9573
|
DitoInput: Da,
|
|
@@ -9566,7 +9591,7 @@ var Hl = Q.register("color", {
|
|
|
9566
9591
|
set(e) {
|
|
9567
9592
|
this.convertedValue = null;
|
|
9568
9593
|
let { value: t } = this;
|
|
9569
|
-
(!t || e.toHex8String() !== dt(t).toHex8String()) && (this.value =
|
|
9594
|
+
(!t || e.toHex8String() !== dt(t).toHex8String()) && (this.value = Kl(e, this.colorFormat));
|
|
9570
9595
|
}
|
|
9571
9596
|
},
|
|
9572
9597
|
hexValue: {
|
|
@@ -9576,7 +9601,7 @@ var Hl = Q.register("color", {
|
|
|
9576
9601
|
},
|
|
9577
9602
|
set(e) {
|
|
9578
9603
|
if (dt(e).isValid()) {
|
|
9579
|
-
let t =
|
|
9604
|
+
let t = Gl(e, this.colorFormat);
|
|
9580
9605
|
this.canUpdateValue ? this.value = t : this.convertedValue = t;
|
|
9581
9606
|
}
|
|
9582
9607
|
}
|
|
@@ -9622,10 +9647,10 @@ var Hl = Q.register("color", {
|
|
|
9622
9647
|
}
|
|
9623
9648
|
}
|
|
9624
9649
|
});
|
|
9625
|
-
function
|
|
9626
|
-
return
|
|
9650
|
+
function Gl(e, t) {
|
|
9651
|
+
return Kl(dt(e), t);
|
|
9627
9652
|
}
|
|
9628
|
-
function
|
|
9653
|
+
function Kl(e, t) {
|
|
9629
9654
|
switch (t) {
|
|
9630
9655
|
case "rgb": return e.toRgb();
|
|
9631
9656
|
case "prgb": return e.toPercentageRgb();
|
|
@@ -9638,25 +9663,25 @@ function Wl(e, t) {
|
|
|
9638
9663
|
default: return e.getAlpha() < 1 ? `#${e.toHex8()}` : `#${e.toHex()}`;
|
|
9639
9664
|
}
|
|
9640
9665
|
}
|
|
9641
|
-
var
|
|
9666
|
+
var ql = /*#__PURE__*/ X(Wl, [["render", Ul]]);
|
|
9642
9667
|
//#endregion
|
|
9643
9668
|
//#region src/types/DitoTypeComponent.vue?vue&type=template&lang.js
|
|
9644
|
-
function
|
|
9669
|
+
function Jl(e, t, n, r, i, a) {
|
|
9645
9670
|
return x(), s(T(e.schema.component), ne(h(e.$props)), null, 16);
|
|
9646
9671
|
}
|
|
9647
|
-
var
|
|
9672
|
+
var Yl = /*#__PURE__*/ X(Q.register("component", {
|
|
9648
9673
|
defaultValue: () => void 0,
|
|
9649
9674
|
ignoreMissingValue: ({ schema: e }) => !("default" in e),
|
|
9650
9675
|
async processSchema(e, t) {
|
|
9651
9676
|
await di(t);
|
|
9652
9677
|
}
|
|
9653
|
-
}), [["render",
|
|
9678
|
+
}), [["render", Jl]]), Xl = [
|
|
9654
9679
|
"id",
|
|
9655
9680
|
"name",
|
|
9656
9681
|
"value",
|
|
9657
9682
|
"disabled"
|
|
9658
9683
|
];
|
|
9659
|
-
function
|
|
9684
|
+
function Zl(e, t, n, r, i, a) {
|
|
9660
9685
|
return x(), l("input", {
|
|
9661
9686
|
class: "dito-text dito-input",
|
|
9662
9687
|
id: e.componentPath,
|
|
@@ -9666,9 +9691,9 @@ function Yl(e, t, n, r, i, a) {
|
|
|
9666
9691
|
value: e.value,
|
|
9667
9692
|
disabled: e.disabled,
|
|
9668
9693
|
readonly: !0
|
|
9669
|
-
}, null, 8,
|
|
9694
|
+
}, null, 8, Xl);
|
|
9670
9695
|
}
|
|
9671
|
-
var
|
|
9696
|
+
var Ql = /*#__PURE__*/ X(Q.register([
|
|
9672
9697
|
"computed",
|
|
9673
9698
|
"data",
|
|
9674
9699
|
"hidden"
|
|
@@ -9676,10 +9701,10 @@ var Xl = /*#__PURE__*/ X(Q.register([
|
|
|
9676
9701
|
defaultValue: () => void 0,
|
|
9677
9702
|
defaultVisible: !1,
|
|
9678
9703
|
valueFromDataSchema: !0
|
|
9679
|
-
}), [["render",
|
|
9680
|
-
function
|
|
9704
|
+
}), [["render", Zl]]), $l = { class: "dito-date" };
|
|
9705
|
+
function eu(e, t, n, r, i, a) {
|
|
9681
9706
|
let o = w("DitoAffixes");
|
|
9682
|
-
return x(), l("div",
|
|
9707
|
+
return x(), l("div", $l, [(x(), s(T(e.getComponent(e.type)), v({
|
|
9683
9708
|
id: e.componentPath,
|
|
9684
9709
|
ref: "element",
|
|
9685
9710
|
modelValue: e.dateValue,
|
|
@@ -9725,7 +9750,7 @@ function Ql(e, t, n, r, i, a) {
|
|
|
9725
9750
|
"format"
|
|
9726
9751
|
]))]);
|
|
9727
9752
|
}
|
|
9728
|
-
var
|
|
9753
|
+
var tu = /*#__PURE__*/ X(Q.register([
|
|
9729
9754
|
"date",
|
|
9730
9755
|
"datetime",
|
|
9731
9756
|
"time"
|
|
@@ -9765,10 +9790,10 @@ var $l = /*#__PURE__*/ X(Q.register([
|
|
|
9765
9790
|
processValue({ schema: e, value: t }) {
|
|
9766
9791
|
return Ie(t) ? e.type === "date" ? ke(t) : t.toISOString() : t;
|
|
9767
9792
|
}
|
|
9768
|
-
}), [["render",
|
|
9793
|
+
}), [["render", eu]]);
|
|
9769
9794
|
//#endregion
|
|
9770
9795
|
//#region src/utils/route.js
|
|
9771
|
-
function
|
|
9796
|
+
function nu(e) {
|
|
9772
9797
|
let t = e ? P(e) ? e : Object.entries(e) : [];
|
|
9773
9798
|
return new URLSearchParams(t.reduce((e, [t, n]) => {
|
|
9774
9799
|
if (P(n)) for (let r of n) e.push([t, r ?? ""]);
|
|
@@ -9776,19 +9801,19 @@ function eu(e) {
|
|
|
9776
9801
|
return e;
|
|
9777
9802
|
}, [])).toString().replaceAll(/%(?:21|24|28|29|2C|2F|3A|3B|3D|3F|40)/g, decodeURIComponent);
|
|
9778
9803
|
}
|
|
9779
|
-
function
|
|
9804
|
+
function ru({ path: e, query: t, hash: n }) {
|
|
9780
9805
|
let { location: r } = window;
|
|
9781
|
-
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}`);
|
|
9782
9807
|
}
|
|
9783
9808
|
//#endregion
|
|
9784
9809
|
//#region src/mixins/SourceMixin.js
|
|
9785
|
-
var
|
|
9810
|
+
var iu = {
|
|
9786
9811
|
mixins: [
|
|
9787
|
-
|
|
9788
|
-
|
|
9812
|
+
Ds,
|
|
9813
|
+
yc,
|
|
9789
9814
|
go
|
|
9790
9815
|
],
|
|
9791
|
-
defaultValue: (e) =>
|
|
9816
|
+
defaultValue: (e) => In(e.schema) ? [] : null,
|
|
9792
9817
|
excludeValue: (e) => !!e.schema.resource,
|
|
9793
9818
|
provide() {
|
|
9794
9819
|
return { $sourceComponent: () => this };
|
|
@@ -9801,10 +9826,10 @@ var nu = {
|
|
|
9801
9826
|
return this;
|
|
9802
9827
|
},
|
|
9803
9828
|
isObjectSource() {
|
|
9804
|
-
return
|
|
9829
|
+
return Fn(this.type);
|
|
9805
9830
|
},
|
|
9806
9831
|
isListSource() {
|
|
9807
|
-
return
|
|
9832
|
+
return In(this.type);
|
|
9808
9833
|
},
|
|
9809
9834
|
hasData() {
|
|
9810
9835
|
return !!this.value;
|
|
@@ -9872,15 +9897,15 @@ var nu = {
|
|
|
9872
9897
|
...n != null && { page: n },
|
|
9873
9898
|
...r != null && { type: r },
|
|
9874
9899
|
...e
|
|
9875
|
-
}, N(e, this.$route.query) ||
|
|
9900
|
+
}, N(e, this.$route.query) || ru({ query: e }), e;
|
|
9876
9901
|
}
|
|
9877
9902
|
}),
|
|
9878
9903
|
total: ii("total"),
|
|
9879
9904
|
columns() {
|
|
9880
|
-
return
|
|
9905
|
+
return fr(this.schema.columns);
|
|
9881
9906
|
},
|
|
9882
9907
|
scopes() {
|
|
9883
|
-
return
|
|
9908
|
+
return fr(this.schema.scopes);
|
|
9884
9909
|
},
|
|
9885
9910
|
defaultScope() {
|
|
9886
9911
|
let e = null;
|
|
@@ -9907,22 +9932,22 @@ var nu = {
|
|
|
9907
9932
|
};
|
|
9908
9933
|
},
|
|
9909
9934
|
forms() {
|
|
9910
|
-
return Object.values(
|
|
9935
|
+
return Object.values(or(this.schema, this.context));
|
|
9911
9936
|
},
|
|
9912
9937
|
view() {
|
|
9913
|
-
return
|
|
9938
|
+
return nr(this.schema, this.context);
|
|
9914
9939
|
},
|
|
9915
9940
|
linksToView() {
|
|
9916
9941
|
return !!this.view;
|
|
9917
9942
|
},
|
|
9918
9943
|
buttonSchemas() {
|
|
9919
|
-
return
|
|
9944
|
+
return pr(this.schema.buttons);
|
|
9920
9945
|
},
|
|
9921
9946
|
isCompact() {
|
|
9922
|
-
return this.forms.every(
|
|
9947
|
+
return this.forms.every(On);
|
|
9923
9948
|
},
|
|
9924
9949
|
isInlined() {
|
|
9925
|
-
return
|
|
9950
|
+
return kn(this.schema);
|
|
9926
9951
|
},
|
|
9927
9952
|
paginate: q("paginate", { type: Number }),
|
|
9928
9953
|
render: q("render", {
|
|
@@ -9936,7 +9961,7 @@ var nu = {
|
|
|
9936
9961
|
type: Boolean,
|
|
9937
9962
|
default: !1,
|
|
9938
9963
|
get(e) {
|
|
9939
|
-
return e &&
|
|
9964
|
+
return e && $n(this.schema) ? !this.isObjectSource || !this.value : !1;
|
|
9940
9965
|
}
|
|
9941
9966
|
}),
|
|
9942
9967
|
editable: q("editable", {
|
|
@@ -9979,7 +10004,7 @@ var nu = {
|
|
|
9979
10004
|
default: 1
|
|
9980
10005
|
}),
|
|
9981
10006
|
createPath() {
|
|
9982
|
-
return this.creatable ?
|
|
10007
|
+
return this.creatable ? ir(this.schema, this.context) || this.path : null;
|
|
9983
10008
|
}
|
|
9984
10009
|
},
|
|
9985
10010
|
watch: {
|
|
@@ -10121,7 +10146,7 @@ var nu = {
|
|
|
10121
10146
|
},
|
|
10122
10147
|
async processSchema(e, t, n, r, i, a = !1, o = !1, s = null) {
|
|
10123
10148
|
yi(e, t, n);
|
|
10124
|
-
let c =
|
|
10149
|
+
let c = kn(t);
|
|
10125
10150
|
if (c && t.resource) throw Error(`Nested ${this.isListSource ? "lists" : this.isObjectSource ? "objects" : "schema"} cannot load data from their own resources`);
|
|
10126
10151
|
let l = `id${i + 1}`, u = {
|
|
10127
10152
|
api: e,
|
|
@@ -10132,16 +10157,16 @@ var nu = {
|
|
|
10132
10157
|
nested: a,
|
|
10133
10158
|
param: l
|
|
10134
10159
|
}, f = await bi(e, t, i);
|
|
10135
|
-
if (s && await s(f, i + 1),
|
|
10160
|
+
if (s && await s(f, i + 1), $n(t) && !c) {
|
|
10136
10161
|
let e = i === 0 ? "" : t.path, n = {
|
|
10137
|
-
path:
|
|
10162
|
+
path: ou(e, In(t) ? l : null),
|
|
10138
10163
|
component: Y.component(a ? "DitoFormNested" : "DitoForm"),
|
|
10139
10164
|
meta: d
|
|
10140
10165
|
};
|
|
10141
|
-
|
|
10166
|
+
Fn(t) && r.push({
|
|
10142
10167
|
...n,
|
|
10143
|
-
path:
|
|
10144
|
-
}), e &&
|
|
10168
|
+
path: ou(e, l)
|
|
10169
|
+
}), e && In(t) && r.push({
|
|
10145
10170
|
path: e,
|
|
10146
10171
|
redirect: ".",
|
|
10147
10172
|
meta: u
|
|
@@ -10158,18 +10183,18 @@ var nu = {
|
|
|
10158
10183
|
}
|
|
10159
10184
|
},
|
|
10160
10185
|
processValue({ schema: e, value: t, dataPath: n }, r) {
|
|
10161
|
-
return r.addSource(n, e),
|
|
10186
|
+
return r.addSource(n, e), $n(e) ? t : au(t);
|
|
10162
10187
|
}
|
|
10163
10188
|
};
|
|
10164
|
-
function
|
|
10189
|
+
function au(e) {
|
|
10165
10190
|
return P(e) ? e.map((e) => I(e) ? { ...e } : e) : I(e) ? { ...e } : e;
|
|
10166
10191
|
}
|
|
10167
|
-
function
|
|
10192
|
+
function ou(e, t) {
|
|
10168
10193
|
return t ? e ? `${e}/:${t}` : `:${t}` : e;
|
|
10169
10194
|
}
|
|
10170
10195
|
//#endregion
|
|
10171
10196
|
//#region src/utils/filter.js
|
|
10172
|
-
var
|
|
10197
|
+
var su = {
|
|
10173
10198
|
text(e) {
|
|
10174
10199
|
let t = [
|
|
10175
10200
|
{
|
|
@@ -10220,7 +10245,7 @@ var au = {
|
|
|
10220
10245
|
};
|
|
10221
10246
|
}
|
|
10222
10247
|
};
|
|
10223
|
-
function
|
|
10248
|
+
function cu(e, t, n, r) {
|
|
10224
10249
|
let { sticky: i, ...a } = t, o = {
|
|
10225
10250
|
type: "panel",
|
|
10226
10251
|
label: "Filters",
|
|
@@ -10228,17 +10253,17 @@ function ou(e, t, n, r) {
|
|
|
10228
10253
|
disabled: !1,
|
|
10229
10254
|
sticky: i,
|
|
10230
10255
|
data() {
|
|
10231
|
-
return
|
|
10256
|
+
return hu(o, r.value);
|
|
10232
10257
|
},
|
|
10233
|
-
components:
|
|
10234
|
-
buttons:
|
|
10235
|
-
panelButtons:
|
|
10258
|
+
components: fu(a),
|
|
10259
|
+
buttons: lu(!1),
|
|
10260
|
+
panelButtons: lu(!0),
|
|
10236
10261
|
events: { change() {
|
|
10237
10262
|
this.applyFilters();
|
|
10238
10263
|
} },
|
|
10239
10264
|
computed: {
|
|
10240
10265
|
filters() {
|
|
10241
|
-
return
|
|
10266
|
+
return mu(this.schema, this.data);
|
|
10242
10267
|
},
|
|
10243
10268
|
hasFilters() {
|
|
10244
10269
|
return this.filters.length > 0;
|
|
@@ -10259,7 +10284,7 @@ function ou(e, t, n, r) {
|
|
|
10259
10284
|
};
|
|
10260
10285
|
return vi(e, o), o;
|
|
10261
10286
|
}
|
|
10262
|
-
function
|
|
10287
|
+
function lu(e) {
|
|
10263
10288
|
return {
|
|
10264
10289
|
clear: {
|
|
10265
10290
|
type: "button",
|
|
@@ -10279,16 +10304,16 @@ function su(e) {
|
|
|
10279
10304
|
}
|
|
10280
10305
|
};
|
|
10281
10306
|
}
|
|
10282
|
-
function
|
|
10307
|
+
function uu(e) {
|
|
10283
10308
|
return `$${e}`;
|
|
10284
10309
|
}
|
|
10285
|
-
function
|
|
10310
|
+
function du(e) {
|
|
10286
10311
|
return e.startsWith("$") ? e.slice(1) : null;
|
|
10287
10312
|
}
|
|
10288
|
-
function
|
|
10313
|
+
function fu(e) {
|
|
10289
10314
|
let t = {};
|
|
10290
|
-
for (let n of Object.values(
|
|
10291
|
-
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;
|
|
10292
10317
|
if (a) {
|
|
10293
10318
|
i.type = "form", i.components = {};
|
|
10294
10319
|
for (let [e, t] of Object.entries(a)) if (t) {
|
|
@@ -10299,7 +10324,7 @@ function uu(e) {
|
|
|
10299
10324
|
placeholder: n
|
|
10300
10325
|
};
|
|
10301
10326
|
}
|
|
10302
|
-
t[
|
|
10327
|
+
t[uu(n.name)] = {
|
|
10303
10328
|
label: i.label ?? R(n.name),
|
|
10304
10329
|
type: "object",
|
|
10305
10330
|
width: r,
|
|
@@ -10311,21 +10336,21 @@ function uu(e) {
|
|
|
10311
10336
|
}
|
|
10312
10337
|
return t;
|
|
10313
10338
|
}
|
|
10314
|
-
function
|
|
10339
|
+
function pu(e, t) {
|
|
10315
10340
|
return e.components[t]?.form?.components;
|
|
10316
10341
|
}
|
|
10317
|
-
function
|
|
10342
|
+
function mu(e, t) {
|
|
10318
10343
|
let n = [];
|
|
10319
10344
|
for (let r in t) {
|
|
10320
10345
|
let i = t[r];
|
|
10321
10346
|
if (i) {
|
|
10322
|
-
let t = Object.keys(
|
|
10323
|
-
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(",")}`);
|
|
10324
10349
|
}
|
|
10325
10350
|
}
|
|
10326
10351
|
return n;
|
|
10327
10352
|
}
|
|
10328
|
-
function
|
|
10353
|
+
function hu(e, t) {
|
|
10329
10354
|
let n = {};
|
|
10330
10355
|
if (t) for (let e of j(t.filter)) {
|
|
10331
10356
|
let [, t, r] = e.match(/^(\w+):(.*)$/);
|
|
@@ -10335,9 +10360,9 @@ function pu(e, t) {
|
|
|
10335
10360
|
}
|
|
10336
10361
|
let r = {};
|
|
10337
10362
|
for (let t in e.components) {
|
|
10338
|
-
let i = {}, a = n[
|
|
10363
|
+
let i = {}, a = n[du(t)];
|
|
10339
10364
|
if (a) {
|
|
10340
|
-
let n =
|
|
10365
|
+
let n = pu(e, t);
|
|
10341
10366
|
if (n) {
|
|
10342
10367
|
let e = 0;
|
|
10343
10368
|
for (let t in n) i[t] = a[e++];
|
|
@@ -10349,17 +10374,17 @@ function pu(e, t) {
|
|
|
10349
10374
|
}
|
|
10350
10375
|
//#endregion
|
|
10351
10376
|
//#region src/types/DitoTypeList.vue?vue&type=template&lang.js
|
|
10352
|
-
var
|
|
10377
|
+
var gu = ["id", "aria-label"], _u = {
|
|
10353
10378
|
key: 0,
|
|
10354
10379
|
class: "dito-list__header"
|
|
10355
|
-
},
|
|
10380
|
+
}, vu = {
|
|
10356
10381
|
key: 1,
|
|
10357
10382
|
class: "dito-spacer"
|
|
10358
|
-
},
|
|
10383
|
+
}, yu = ["id"], bu = { key: 1 }, xu = ["innerHTML"], Su = ["innerHTML"], Cu = {
|
|
10359
10384
|
key: 2,
|
|
10360
10385
|
class: "dito-table__buttons"
|
|
10361
|
-
},
|
|
10362
|
-
function
|
|
10386
|
+
}, wu = { key: 1 }, Tu = ["colspan"];
|
|
10387
|
+
function Eu(e, n, r, i, a, o) {
|
|
10363
10388
|
let d = w("DitoScopes"), p = w("DitoPagination"), m = w("DitoTableHead"), h = w("DitoTableCell"), g = w("DitoSchemaInlined"), _ = w("DitoEditButtons"), ee = w("DitoDraggable");
|
|
10364
10389
|
return e.isReady ? (x(), l("div", {
|
|
10365
10390
|
key: 0,
|
|
@@ -10368,11 +10393,11 @@ function wu(e, n, r, i, a, o) {
|
|
|
10368
10393
|
role: "region",
|
|
10369
10394
|
"aria-label": e.label || e.labelize(e.schema.name)
|
|
10370
10395
|
}, [
|
|
10371
|
-
e.scopes || e.hasPagination ? (x(), l("div",
|
|
10396
|
+
e.scopes || e.hasPagination ? (x(), l("div", _u, [e.scopes ? (x(), s(d, {
|
|
10372
10397
|
key: 0,
|
|
10373
10398
|
query: e.query,
|
|
10374
10399
|
scopes: e.scopes
|
|
10375
|
-
}, 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, {
|
|
10376
10401
|
key: 2,
|
|
10377
10402
|
query: e.query,
|
|
10378
10403
|
limit: e.paginate,
|
|
@@ -10428,7 +10453,7 @@ function wu(e, n, r, i, a, o) {
|
|
|
10428
10453
|
"meta",
|
|
10429
10454
|
"store",
|
|
10430
10455
|
"disabled"
|
|
10431
|
-
])) : c("", !0)], 64))), 256)) : (x(), l("td",
|
|
10456
|
+
])) : c("", !0)], 64))), 256)) : (x(), l("td", bu, [e.isInlined ? (x(), s(g, {
|
|
10432
10457
|
key: 0,
|
|
10433
10458
|
label: e.getItemLabel(e.schema, n, {
|
|
10434
10459
|
index: r,
|
|
@@ -10474,10 +10499,10 @@ function wu(e, n, r, i, a, o) {
|
|
|
10474
10499
|
}, null, 8, ["dataPath", "data"])) : e.render ? (x(), l("span", {
|
|
10475
10500
|
key: 2,
|
|
10476
10501
|
innerHTML: e.render(e.getContext(n, r))
|
|
10477
|
-
}, null, 8,
|
|
10502
|
+
}, null, 8, xu)) : (x(), l("span", {
|
|
10478
10503
|
key: 3,
|
|
10479
10504
|
innerHTML: e.getItemLabel(e.schema, n, { index: r })
|
|
10480
|
-
}, null, 8,
|
|
10505
|
+
}, null, 8, Su))])), e.hasCellEditButtons ? (x(), l("td", Cu, [f(_, {
|
|
10481
10506
|
nested: "",
|
|
10482
10507
|
schema: e.getItemFormSchema(e.schema, n, e.context),
|
|
10483
10508
|
dataPath: e.getDataPath(r),
|
|
@@ -10502,14 +10527,14 @@ function wu(e, n, r, i, a, o) {
|
|
|
10502
10527
|
"editable",
|
|
10503
10528
|
"editPath",
|
|
10504
10529
|
"onDelete"
|
|
10505
|
-
])])) : c("", !0)], 8,
|
|
10530
|
+
])])) : c("", !0)], 8, yu))), 128))]),
|
|
10506
10531
|
_: 1
|
|
10507
10532
|
}, 8, [
|
|
10508
10533
|
"options",
|
|
10509
10534
|
"draggable",
|
|
10510
10535
|
"modelValue"
|
|
10511
10536
|
]),
|
|
10512
|
-
e.hasListButtons && !e.single ? (x(), l("tfoot",
|
|
10537
|
+
e.hasListButtons && !e.single ? (x(), l("tfoot", wu, [u("tr", null, [u("td", {
|
|
10513
10538
|
class: "dito-table__buttons",
|
|
10514
10539
|
colspan: e.numColumns
|
|
10515
10540
|
}, [f(_, {
|
|
@@ -10534,7 +10559,7 @@ function wu(e, n, r, i, a, o) {
|
|
|
10534
10559
|
"disabled",
|
|
10535
10560
|
"creatable",
|
|
10536
10561
|
"createPath"
|
|
10537
|
-
])], 8,
|
|
10562
|
+
])], 8, Tu)])])) : c("", !0)
|
|
10538
10563
|
], 2),
|
|
10539
10564
|
e.hasListButtons && e.single ? (x(), s(_, {
|
|
10540
10565
|
key: 1,
|
|
@@ -10559,16 +10584,16 @@ function wu(e, n, r, i, a, o) {
|
|
|
10559
10584
|
"creatable",
|
|
10560
10585
|
"createPath"
|
|
10561
10586
|
])) : c("", !0)
|
|
10562
|
-
], 8,
|
|
10587
|
+
], 8, gu)) : c("", !0);
|
|
10563
10588
|
}
|
|
10564
|
-
var
|
|
10565
|
-
mixins: [
|
|
10589
|
+
var Du = /*#__PURE__*/ X(Q.register("list", {
|
|
10590
|
+
mixins: [iu, zc],
|
|
10566
10591
|
getSourceType(e) {
|
|
10567
10592
|
return e;
|
|
10568
10593
|
},
|
|
10569
10594
|
getPanelSchema(e, t, n, r) {
|
|
10570
10595
|
let { filters: i } = t;
|
|
10571
|
-
if (i) return
|
|
10596
|
+
if (i) return cu(e, i, n, a({
|
|
10572
10597
|
get() {
|
|
10573
10598
|
return r.query;
|
|
10574
10599
|
},
|
|
@@ -10609,7 +10634,7 @@ var Tu = /*#__PURE__*/ X(Q.register("list", {
|
|
|
10609
10634
|
getEditPath(e, t) {
|
|
10610
10635
|
if (this.editable) {
|
|
10611
10636
|
let n = this.getItemId(this.schema, e, t);
|
|
10612
|
-
return
|
|
10637
|
+
return ar(this.schema, n, this.context) || `${this.path}/${n}`;
|
|
10613
10638
|
}
|
|
10614
10639
|
return null;
|
|
10615
10640
|
},
|
|
@@ -10617,7 +10642,7 @@ var Tu = /*#__PURE__*/ X(Q.register("list", {
|
|
|
10617
10642
|
return `dito-cell--${Me(e.name)}`;
|
|
10618
10643
|
},
|
|
10619
10644
|
getContext(e, t) {
|
|
10620
|
-
return new
|
|
10645
|
+
return new G(this, {
|
|
10621
10646
|
data: e,
|
|
10622
10647
|
value: e,
|
|
10623
10648
|
index: t,
|
|
@@ -10633,26 +10658,26 @@ var Tu = /*#__PURE__*/ X(Q.register("list", {
|
|
|
10633
10658
|
await Promise.all([
|
|
10634
10659
|
di(t),
|
|
10635
10660
|
fi(t.columns),
|
|
10636
|
-
|
|
10661
|
+
iu.processSchema(e, t, n, r, i, a, o, s)
|
|
10637
10662
|
]);
|
|
10638
10663
|
}
|
|
10639
|
-
}), [["render",
|
|
10664
|
+
}), [["render", Eu]]);
|
|
10640
10665
|
//#endregion
|
|
10641
10666
|
//#region src/types/DitoTypeLabel.vue?vue&type=template&lang.js
|
|
10642
|
-
function
|
|
10667
|
+
function Ou(e, t, n, r, i, a) {
|
|
10643
10668
|
let o = w("DitoLabel");
|
|
10644
10669
|
return x(), s(o, {
|
|
10645
10670
|
class: "dito-label-component",
|
|
10646
10671
|
label: e.value
|
|
10647
10672
|
}, null, 8, ["label"]);
|
|
10648
10673
|
}
|
|
10649
|
-
var
|
|
10674
|
+
var ku = /*#__PURE__*/ X(Q.register("label", {
|
|
10650
10675
|
excludeValue: !0,
|
|
10651
10676
|
generateLabel: !1
|
|
10652
|
-
}), [["render",
|
|
10677
|
+
}), [["render", Ou]]);
|
|
10653
10678
|
//#endregion
|
|
10654
10679
|
//#region ../../node_modules/prosemirror-model/dist/index.js
|
|
10655
|
-
function
|
|
10680
|
+
function Au(e, t, n) {
|
|
10656
10681
|
for (let r = 0;; r++) {
|
|
10657
10682
|
if (r == e.childCount || r == t.childCount) return e.childCount == t.childCount ? null : n;
|
|
10658
10683
|
let i = e.child(r), a = t.child(r);
|
|
@@ -10664,16 +10689,16 @@ function Ou(e, t, n) {
|
|
|
10664
10689
|
if (i.isText && i.text != a.text) {
|
|
10665
10690
|
let e = i.text, t = a.text, r = 0;
|
|
10666
10691
|
for (; e[r] == t[r]; r++) n++;
|
|
10667
|
-
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;
|
|
10668
10693
|
}
|
|
10669
10694
|
if (i.content.size || a.content.size) {
|
|
10670
|
-
let e =
|
|
10695
|
+
let e = Au(i.content, a.content, n + 1);
|
|
10671
10696
|
if (e != null) return e;
|
|
10672
10697
|
}
|
|
10673
10698
|
n += i.nodeSize;
|
|
10674
10699
|
}
|
|
10675
10700
|
}
|
|
10676
|
-
function
|
|
10701
|
+
function ju(e, t, n, r) {
|
|
10677
10702
|
for (let i = e.childCount, a = t.childCount;;) {
|
|
10678
10703
|
if (i == 0 || a == 0) return i == a ? null : {
|
|
10679
10704
|
a: n,
|
|
@@ -10691,22 +10716,22 @@ function ku(e, t, n, r) {
|
|
|
10691
10716
|
if (o.isText && o.text != s.text) {
|
|
10692
10717
|
let e = o.text, t = s.text, i = e.length, a = t.length;
|
|
10693
10718
|
for (; i > 0 && a > 0 && e[i - 1] == t[a - 1];) i--, a--, n--, r--;
|
|
10694
|
-
return i && a && i < e.length &&
|
|
10719
|
+
return i && a && i < e.length && Nu(e.charCodeAt(i - 1)) && Mu(e.charCodeAt(i)) && (n++, r++), {
|
|
10695
10720
|
a: n,
|
|
10696
10721
|
b: r
|
|
10697
10722
|
};
|
|
10698
10723
|
}
|
|
10699
10724
|
if (o.content.size || s.content.size) {
|
|
10700
|
-
let e =
|
|
10725
|
+
let e = ju(o.content, s.content, n - 1, r - 1);
|
|
10701
10726
|
if (e) return e;
|
|
10702
10727
|
}
|
|
10703
10728
|
n -= c, r -= c;
|
|
10704
10729
|
}
|
|
10705
10730
|
}
|
|
10706
|
-
function
|
|
10731
|
+
function Mu(e) {
|
|
10707
10732
|
return e >= 56320 && e < 57344;
|
|
10708
10733
|
}
|
|
10709
|
-
function
|
|
10734
|
+
function Nu(e) {
|
|
10710
10735
|
return e >= 55296 && e < 56320;
|
|
10711
10736
|
}
|
|
10712
10737
|
var $ = class e {
|
|
@@ -10793,18 +10818,18 @@ var $ = class e {
|
|
|
10793
10818
|
}
|
|
10794
10819
|
}
|
|
10795
10820
|
findDiffStart(e, t = 0) {
|
|
10796
|
-
return
|
|
10821
|
+
return Au(this, e, t);
|
|
10797
10822
|
}
|
|
10798
10823
|
findDiffEnd(e, t = this.size, n = e.size) {
|
|
10799
|
-
return
|
|
10824
|
+
return ju(this, e, t, n);
|
|
10800
10825
|
}
|
|
10801
10826
|
findIndex(e) {
|
|
10802
|
-
if (e == 0) return
|
|
10803
|
-
if (e == this.size) return
|
|
10827
|
+
if (e == 0) return Fu(0, e);
|
|
10828
|
+
if (e == this.size) return Fu(this.content.length, e);
|
|
10804
10829
|
if (e > this.size || e < 0) throw RangeError(`Position ${e} outside of fragment (${this})`);
|
|
10805
10830
|
for (let t = 0, n = 0;; t++) {
|
|
10806
10831
|
let r = this.child(t), i = n + r.nodeSize;
|
|
10807
|
-
if (i >= e) return i == e ?
|
|
10832
|
+
if (i >= e) return i == e ? Fu(t + 1, i) : Fu(t, n);
|
|
10808
10833
|
n = i;
|
|
10809
10834
|
}
|
|
10810
10835
|
}
|
|
@@ -10840,28 +10865,28 @@ var $ = class e {
|
|
|
10840
10865
|
}
|
|
10841
10866
|
};
|
|
10842
10867
|
$.empty = new $([], 0);
|
|
10843
|
-
var
|
|
10868
|
+
var Pu = {
|
|
10844
10869
|
index: 0,
|
|
10845
10870
|
offset: 0
|
|
10846
10871
|
};
|
|
10847
|
-
function
|
|
10848
|
-
return
|
|
10872
|
+
function Fu(e, t) {
|
|
10873
|
+
return Pu.index = e, Pu.offset = t, Pu;
|
|
10849
10874
|
}
|
|
10850
|
-
function
|
|
10875
|
+
function Iu(e, t) {
|
|
10851
10876
|
if (e === t) return !0;
|
|
10852
10877
|
if (!(e && typeof e == "object") || !(t && typeof t == "object")) return !1;
|
|
10853
10878
|
let n = Array.isArray(e);
|
|
10854
10879
|
if (Array.isArray(t) != n) return !1;
|
|
10855
10880
|
if (n) {
|
|
10856
10881
|
if (e.length != t.length) return !1;
|
|
10857
|
-
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;
|
|
10858
10883
|
} else {
|
|
10859
|
-
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;
|
|
10860
10885
|
for (let n in t) if (!(n in e)) return !1;
|
|
10861
10886
|
}
|
|
10862
10887
|
return !0;
|
|
10863
10888
|
}
|
|
10864
|
-
var
|
|
10889
|
+
var Lu = class e {
|
|
10865
10890
|
constructor(e, t) {
|
|
10866
10891
|
this.type = e, this.attrs = t;
|
|
10867
10892
|
}
|
|
@@ -10885,7 +10910,7 @@ var Fu = class e {
|
|
|
10885
10910
|
return !1;
|
|
10886
10911
|
}
|
|
10887
10912
|
eq(e) {
|
|
10888
|
-
return this == e || this.type == e.type &&
|
|
10913
|
+
return this == e || this.type == e.type && Iu(this.attrs, e.attrs);
|
|
10889
10914
|
}
|
|
10890
10915
|
toJSON() {
|
|
10891
10916
|
let e = { type: this.type.name };
|
|
@@ -10914,8 +10939,8 @@ var Fu = class e {
|
|
|
10914
10939
|
return n.sort((e, t) => e.type.rank - t.type.rank), n;
|
|
10915
10940
|
}
|
|
10916
10941
|
};
|
|
10917
|
-
|
|
10918
|
-
var
|
|
10942
|
+
Lu.none = [];
|
|
10943
|
+
var Ru = class extends Error {}, zu = class e {
|
|
10919
10944
|
constructor(e, t, n) {
|
|
10920
10945
|
this.content = e, this.openStart = t, this.openEnd = n;
|
|
10921
10946
|
}
|
|
@@ -10923,11 +10948,11 @@ var Iu = class extends Error {}, Lu = class e {
|
|
|
10923
10948
|
return this.content.size - this.openStart - this.openEnd;
|
|
10924
10949
|
}
|
|
10925
10950
|
insertAt(t, n) {
|
|
10926
|
-
let r =
|
|
10951
|
+
let r = Vu(this.content, t + this.openStart, n, this.openStart + 1, this.openEnd + 1);
|
|
10927
10952
|
return r && new e(r, this.openStart, this.openEnd);
|
|
10928
10953
|
}
|
|
10929
10954
|
removeBetween(t, n) {
|
|
10930
|
-
return new e(
|
|
10955
|
+
return new e(Bu(this.content, t + this.openStart, n + this.openStart), this.openStart, this.openEnd);
|
|
10931
10956
|
}
|
|
10932
10957
|
eq(e) {
|
|
10933
10958
|
return this.content.eq(e.content) && this.openStart == e.openStart && this.openEnd == e.openEnd;
|
|
@@ -10953,73 +10978,73 @@ var Iu = class extends Error {}, Lu = class e {
|
|
|
10953
10978
|
return new e(t, r, i);
|
|
10954
10979
|
}
|
|
10955
10980
|
};
|
|
10956
|
-
|
|
10957
|
-
function
|
|
10981
|
+
zu.empty = new zu($.empty, 0, 0);
|
|
10982
|
+
function Bu(e, t, n) {
|
|
10958
10983
|
let { index: r, offset: i } = e.findIndex(t), a = e.maybeChild(r), { index: o, offset: s } = e.findIndex(n);
|
|
10959
10984
|
if (i == t || a.isText) {
|
|
10960
10985
|
if (s != n && !e.child(o).isText) throw RangeError("Removing non-flat range");
|
|
10961
10986
|
return e.cut(0, t).append(e.cut(n));
|
|
10962
10987
|
}
|
|
10963
10988
|
if (r != o) throw RangeError("Removing non-flat range");
|
|
10964
|
-
return e.replaceChild(r, a.copy(
|
|
10989
|
+
return e.replaceChild(r, a.copy(Bu(a.content, t - i - 1, n - i - 1)));
|
|
10965
10990
|
}
|
|
10966
|
-
function
|
|
10991
|
+
function Vu(e, t, n, r, i, a) {
|
|
10967
10992
|
let { index: o, offset: s } = e.findIndex(t), c = e.maybeChild(o);
|
|
10968
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));
|
|
10969
|
-
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);
|
|
10970
10995
|
return l && e.replaceChild(o, c.copy(l));
|
|
10971
10996
|
}
|
|
10972
|
-
function
|
|
10973
|
-
if (n.openStart > e.depth) throw new
|
|
10974
|
-
if (e.depth - n.openStart != t.depth - n.openEnd) throw new
|
|
10975
|
-
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);
|
|
10976
11001
|
}
|
|
10977
|
-
function
|
|
11002
|
+
function Uu(e, t, n, r) {
|
|
10978
11003
|
let i = e.index(r), a = e.node(r);
|
|
10979
11004
|
if (i == t.index(r) && r < e.depth - n.openStart) {
|
|
10980
|
-
let o =
|
|
11005
|
+
let o = Uu(e, t, n, r + 1);
|
|
10981
11006
|
return a.copy(a.content.replaceChild(i, o));
|
|
10982
11007
|
}
|
|
10983
|
-
if (!n.content.size) return
|
|
11008
|
+
if (!n.content.size) return Ju(a, Xu(e, t, r));
|
|
10984
11009
|
if (!n.openStart && !n.openEnd && e.depth == r && t.depth == r) {
|
|
10985
11010
|
let r = e.parent, i = r.content;
|
|
10986
|
-
return
|
|
11011
|
+
return Ju(r, i.cut(0, e.parentOffset).append(n.content).append(i.cut(t.parentOffset)));
|
|
10987
11012
|
}
|
|
10988
11013
|
{
|
|
10989
|
-
let { start: i, end: o } =
|
|
10990
|
-
return
|
|
11014
|
+
let { start: i, end: o } = Zu(n, e);
|
|
11015
|
+
return Ju(a, Yu(e, i, o, t, r));
|
|
10991
11016
|
}
|
|
10992
11017
|
}
|
|
10993
|
-
function
|
|
10994
|
-
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);
|
|
10995
11020
|
}
|
|
10996
|
-
function
|
|
11021
|
+
function Gu(e, t, n) {
|
|
10997
11022
|
let r = e.node(n);
|
|
10998
|
-
return
|
|
11023
|
+
return Wu(r, t.node(n)), r;
|
|
10999
11024
|
}
|
|
11000
|
-
function
|
|
11025
|
+
function Ku(e, t) {
|
|
11001
11026
|
let n = t.length - 1;
|
|
11002
11027
|
n >= 0 && e.isText && e.sameMarkup(t[n]) ? t[n] = e.withText(t[n].text + e.text) : t.push(e);
|
|
11003
11028
|
}
|
|
11004
|
-
function
|
|
11029
|
+
function qu(e, t, n, r) {
|
|
11005
11030
|
let i = (t || e).node(n), a = 0, o = t ? t.index(n) : i.childCount;
|
|
11006
|
-
e && (a = e.index(n), e.depth > n ? a++ : e.textOffset && (
|
|
11007
|
-
for (let e = a; e < o; e++)
|
|
11008
|
-
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);
|
|
11009
11034
|
}
|
|
11010
|
-
function
|
|
11011
|
-
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);
|
|
11012
11037
|
return e.copy(t);
|
|
11013
11038
|
}
|
|
11014
|
-
function
|
|
11015
|
-
let a = e.depth > i &&
|
|
11016
|
-
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);
|
|
11017
11042
|
}
|
|
11018
|
-
function
|
|
11043
|
+
function Xu(e, t, n) {
|
|
11019
11044
|
let r = [];
|
|
11020
|
-
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);
|
|
11021
11046
|
}
|
|
11022
|
-
function
|
|
11047
|
+
function Zu(e, t) {
|
|
11023
11048
|
let n = t.depth - e.openStart, r = t.node(n).copy(e.content);
|
|
11024
11049
|
for (let e = n - 1; e >= 0; e--) r = t.node(e).copy($.from(r));
|
|
11025
11050
|
return {
|
|
@@ -11027,7 +11052,7 @@ function Yu(e, t) {
|
|
|
11027
11052
|
end: r.resolveNoCache(r.content.size - e.openEnd - n)
|
|
11028
11053
|
};
|
|
11029
11054
|
}
|
|
11030
|
-
var
|
|
11055
|
+
var Qu = class e {
|
|
11031
11056
|
constructor(e, t, n) {
|
|
11032
11057
|
this.pos = e, this.path = t, this.parentOffset = n, this.depth = t.length / 3 - 1;
|
|
11033
11058
|
}
|
|
@@ -11084,7 +11109,7 @@ var Xu = class e {
|
|
|
11084
11109
|
}
|
|
11085
11110
|
marks() {
|
|
11086
11111
|
let e = this.parent, t = this.index();
|
|
11087
|
-
if (e.content.size == 0) return
|
|
11112
|
+
if (e.content.size == 0) return Lu.none;
|
|
11088
11113
|
if (this.textOffset) return e.child(t).marks;
|
|
11089
11114
|
let n = e.maybeChild(t - 1), r = e.maybeChild(t);
|
|
11090
11115
|
if (!n) {
|
|
@@ -11108,7 +11133,7 @@ var Xu = class e {
|
|
|
11108
11133
|
}
|
|
11109
11134
|
blockRange(e = this, t) {
|
|
11110
11135
|
if (e.pos < this.pos) return e.blockRange(this);
|
|
11111
|
-
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);
|
|
11112
11137
|
return null;
|
|
11113
11138
|
}
|
|
11114
11139
|
sameParent(e) {
|
|
@@ -11136,20 +11161,20 @@ var Xu = class e {
|
|
|
11136
11161
|
return new e(n, r, a);
|
|
11137
11162
|
}
|
|
11138
11163
|
static resolveCached(t, n) {
|
|
11139
|
-
let r =
|
|
11164
|
+
let r = td.get(t);
|
|
11140
11165
|
if (r) for (let e = 0; e < r.elts.length; e++) {
|
|
11141
11166
|
let t = r.elts[e];
|
|
11142
11167
|
if (t.pos == n) return t;
|
|
11143
11168
|
}
|
|
11144
|
-
else
|
|
11169
|
+
else td.set(t, r = new $u());
|
|
11145
11170
|
let i = r.elts[r.i] = e.resolve(t, n);
|
|
11146
|
-
return r.i = (r.i + 1) %
|
|
11171
|
+
return r.i = (r.i + 1) % ed, i;
|
|
11147
11172
|
}
|
|
11148
|
-
},
|
|
11173
|
+
}, $u = class {
|
|
11149
11174
|
constructor() {
|
|
11150
11175
|
this.elts = [], this.i = 0;
|
|
11151
11176
|
}
|
|
11152
|
-
},
|
|
11177
|
+
}, ed = 12, td = /* @__PURE__ */ new WeakMap(), nd = class {
|
|
11153
11178
|
constructor(e, t, n) {
|
|
11154
11179
|
this.$from = e, this.$to = t, this.depth = n;
|
|
11155
11180
|
}
|
|
@@ -11168,8 +11193,8 @@ var Xu = class e {
|
|
|
11168
11193
|
get endIndex() {
|
|
11169
11194
|
return this.$to.indexAfter(this.depth);
|
|
11170
11195
|
}
|
|
11171
|
-
},
|
|
11172
|
-
constructor(e, t, n, r =
|
|
11196
|
+
}, rd = Object.create(null), id = class e {
|
|
11197
|
+
constructor(e, t, n, r = Lu.none) {
|
|
11173
11198
|
this.type = e, this.attrs = t, this.marks = r, this.content = n || $.empty;
|
|
11174
11199
|
}
|
|
11175
11200
|
get children() {
|
|
@@ -11215,7 +11240,7 @@ var Xu = class e {
|
|
|
11215
11240
|
return this.hasMarkup(e.type, e.attrs, e.marks);
|
|
11216
11241
|
}
|
|
11217
11242
|
hasMarkup(e, t, n) {
|
|
11218
|
-
return this.type == e &&
|
|
11243
|
+
return this.type == e && Iu(this.attrs, t || e.defaultAttrs || rd) && Lu.sameSet(this.marks, n || Lu.none);
|
|
11219
11244
|
}
|
|
11220
11245
|
copy(t = null) {
|
|
11221
11246
|
return t == this.content ? this : new e(this.type, this.attrs, t, this.marks);
|
|
@@ -11227,12 +11252,12 @@ var Xu = class e {
|
|
|
11227
11252
|
return e == 0 && t == this.content.size ? this : this.copy(this.content.cut(e, t));
|
|
11228
11253
|
}
|
|
11229
11254
|
slice(e, t = this.content.size, n = !1) {
|
|
11230
|
-
if (e == t) return
|
|
11255
|
+
if (e == t) return zu.empty;
|
|
11231
11256
|
let r = this.resolve(e), i = this.resolve(t), a = n ? 0 : r.sharedDepth(t), o = r.start(a);
|
|
11232
|
-
return new
|
|
11257
|
+
return new zu(r.node(a).content.cut(r.pos - o, i.pos - o), r.depth - a, i.depth - a);
|
|
11233
11258
|
}
|
|
11234
11259
|
replace(e, t, n) {
|
|
11235
|
-
return
|
|
11260
|
+
return Hu(this.resolve(e), this.resolve(t), n);
|
|
11236
11261
|
}
|
|
11237
11262
|
nodeAt(e) {
|
|
11238
11263
|
for (let t = this;;) {
|
|
@@ -11270,10 +11295,10 @@ var Xu = class e {
|
|
|
11270
11295
|
};
|
|
11271
11296
|
}
|
|
11272
11297
|
resolve(e) {
|
|
11273
|
-
return
|
|
11298
|
+
return Qu.resolveCached(this, e);
|
|
11274
11299
|
}
|
|
11275
11300
|
resolveNoCache(e) {
|
|
11276
|
-
return
|
|
11301
|
+
return Qu.resolve(this, e);
|
|
11277
11302
|
}
|
|
11278
11303
|
rangeHasMark(e, t, n) {
|
|
11279
11304
|
let r = !1;
|
|
@@ -11303,7 +11328,7 @@ var Xu = class e {
|
|
|
11303
11328
|
toString() {
|
|
11304
11329
|
if (this.type.spec.toDebugString) return this.type.spec.toDebugString(this);
|
|
11305
11330
|
let e = this.type.name;
|
|
11306
|
-
return this.content.size && (e += "(" + this.content.toStringInner() + ")"),
|
|
11331
|
+
return this.content.size && (e += "(" + this.content.toStringInner() + ")"), ad(this.marks, e);
|
|
11307
11332
|
}
|
|
11308
11333
|
contentMatchAt(e) {
|
|
11309
11334
|
let t = this.type.contentMatch.matchFragment(this.content, 0, e);
|
|
@@ -11325,13 +11350,13 @@ var Xu = class e {
|
|
|
11325
11350
|
return e.content.size ? this.canReplace(this.childCount, this.childCount, e.content) : this.type.compatibleContent(e.type);
|
|
11326
11351
|
}
|
|
11327
11352
|
check() {
|
|
11328
|
-
this.type.checkContent(this.content),
|
|
11329
|
-
let e =
|
|
11353
|
+
this.type.checkContent(this.content), od(this.type.attrs, this.attrs, "node", this.type.name);
|
|
11354
|
+
let e = Lu.none;
|
|
11330
11355
|
for (let t = 0; t < this.marks.length; t++) {
|
|
11331
11356
|
let n = this.marks[t];
|
|
11332
|
-
|
|
11357
|
+
od(n.type.attrs, n.attrs, "mark", n.type.name), e = n.addToSet(e);
|
|
11333
11358
|
}
|
|
11334
|
-
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)}`);
|
|
11335
11360
|
this.content.forEach((e) => e.check());
|
|
11336
11361
|
}
|
|
11337
11362
|
toJSON() {
|
|
@@ -11357,26 +11382,26 @@ var Xu = class e {
|
|
|
11357
11382
|
return e.nodeType(t.type).create(t.attrs, r, n);
|
|
11358
11383
|
}
|
|
11359
11384
|
};
|
|
11360
|
-
|
|
11361
|
-
function
|
|
11385
|
+
id.prototype.text = void 0;
|
|
11386
|
+
function ad(e, t) {
|
|
11362
11387
|
for (let n = e.length - 1; n >= 0; n--) t = e[n].type.name + "(" + t + ")";
|
|
11363
11388
|
return t;
|
|
11364
11389
|
}
|
|
11365
|
-
function
|
|
11390
|
+
function od(e, t, n, r) {
|
|
11366
11391
|
for (let i in t) if (!(i in e)) throw RangeError(`Unsupported attribute ${i} for ${n} of type ${r}`);
|
|
11367
11392
|
for (let n in e) e[n].validate && e[n].validate(t[n]);
|
|
11368
11393
|
}
|
|
11369
|
-
var
|
|
11394
|
+
var sd = class e {
|
|
11370
11395
|
constructor(e) {
|
|
11371
11396
|
this.validEnd = e, this.next = [], this.wrapCache = [];
|
|
11372
11397
|
}
|
|
11373
11398
|
static parse(t, n) {
|
|
11374
|
-
let r = new
|
|
11399
|
+
let r = new cd(t, n);
|
|
11375
11400
|
if (r.next == null) return e.empty;
|
|
11376
|
-
let i =
|
|
11401
|
+
let i = ld(r);
|
|
11377
11402
|
r.next && r.err("Unexpected trailing text");
|
|
11378
|
-
let a =
|
|
11379
|
-
return
|
|
11403
|
+
let a = yd(gd(i));
|
|
11404
|
+
return bd(a, r), a;
|
|
11380
11405
|
}
|
|
11381
11406
|
matchType(e) {
|
|
11382
11407
|
for (let t = 0; t < this.next.length; t++) if (this.next[t].type == e) return this.next[t].next;
|
|
@@ -11467,8 +11492,8 @@ var ad = class e {
|
|
|
11467
11492
|
}).join("\n");
|
|
11468
11493
|
}
|
|
11469
11494
|
};
|
|
11470
|
-
|
|
11471
|
-
var
|
|
11495
|
+
sd.empty = new sd(!0);
|
|
11496
|
+
var cd = class {
|
|
11472
11497
|
constructor(e, t) {
|
|
11473
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();
|
|
11474
11499
|
}
|
|
@@ -11482,28 +11507,28 @@ var od = class {
|
|
|
11482
11507
|
throw SyntaxError(e + " (in content expression '" + this.string + "')");
|
|
11483
11508
|
}
|
|
11484
11509
|
};
|
|
11485
|
-
function
|
|
11510
|
+
function ld(e) {
|
|
11486
11511
|
let t = [];
|
|
11487
11512
|
do
|
|
11488
|
-
t.push(
|
|
11513
|
+
t.push(ud(e));
|
|
11489
11514
|
while (e.eat("|"));
|
|
11490
11515
|
return t.length == 1 ? t[0] : {
|
|
11491
11516
|
type: "choice",
|
|
11492
11517
|
exprs: t
|
|
11493
11518
|
};
|
|
11494
11519
|
}
|
|
11495
|
-
function
|
|
11520
|
+
function ud(e) {
|
|
11496
11521
|
let t = [];
|
|
11497
11522
|
do
|
|
11498
|
-
t.push(
|
|
11523
|
+
t.push(dd(e));
|
|
11499
11524
|
while (e.next && e.next != ")" && e.next != "|");
|
|
11500
11525
|
return t.length == 1 ? t[0] : {
|
|
11501
11526
|
type: "seq",
|
|
11502
11527
|
exprs: t
|
|
11503
11528
|
};
|
|
11504
11529
|
}
|
|
11505
|
-
function
|
|
11506
|
-
let t =
|
|
11530
|
+
function dd(e) {
|
|
11531
|
+
let t = hd(e);
|
|
11507
11532
|
for (;;) if (e.eat("+")) t = {
|
|
11508
11533
|
type: "plus",
|
|
11509
11534
|
expr: t
|
|
@@ -11516,25 +11541,25 @@ function ld(e) {
|
|
|
11516
11541
|
type: "opt",
|
|
11517
11542
|
expr: t
|
|
11518
11543
|
};
|
|
11519
|
-
else if (e.eat("{")) t =
|
|
11544
|
+
else if (e.eat("{")) t = pd(e, t);
|
|
11520
11545
|
else break;
|
|
11521
11546
|
return t;
|
|
11522
11547
|
}
|
|
11523
|
-
function
|
|
11548
|
+
function fd(e) {
|
|
11524
11549
|
/\D/.test(e.next) && e.err("Expected number, got '" + e.next + "'");
|
|
11525
11550
|
let t = Number(e.next);
|
|
11526
11551
|
return e.pos++, t;
|
|
11527
11552
|
}
|
|
11528
|
-
function
|
|
11529
|
-
let n =
|
|
11530
|
-
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"), {
|
|
11531
11556
|
type: "range",
|
|
11532
11557
|
min: n,
|
|
11533
11558
|
max: r,
|
|
11534
11559
|
expr: t
|
|
11535
11560
|
};
|
|
11536
11561
|
}
|
|
11537
|
-
function
|
|
11562
|
+
function md(e, t) {
|
|
11538
11563
|
let n = e.nodeTypes, r = n[t];
|
|
11539
11564
|
if (r) return [r];
|
|
11540
11565
|
let i = [];
|
|
@@ -11544,14 +11569,14 @@ function fd(e, t) {
|
|
|
11544
11569
|
}
|
|
11545
11570
|
return i.length == 0 && e.err("No node type or group '" + t + "' found"), i;
|
|
11546
11571
|
}
|
|
11547
|
-
function
|
|
11572
|
+
function hd(e) {
|
|
11548
11573
|
if (e.eat("(")) {
|
|
11549
|
-
let t =
|
|
11574
|
+
let t = ld(e);
|
|
11550
11575
|
return e.eat(")") || e.err("Missing closing paren"), t;
|
|
11551
11576
|
}
|
|
11552
11577
|
if (/\W/.test(e.next)) e.err("Unexpected token '" + e.next + "'");
|
|
11553
11578
|
else {
|
|
11554
|
-
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"), {
|
|
11555
11580
|
type: "name",
|
|
11556
11581
|
value: t
|
|
11557
11582
|
}));
|
|
@@ -11561,7 +11586,7 @@ function pd(e) {
|
|
|
11561
11586
|
};
|
|
11562
11587
|
}
|
|
11563
11588
|
}
|
|
11564
|
-
function
|
|
11589
|
+
function gd(e) {
|
|
11565
11590
|
let t = [[]];
|
|
11566
11591
|
return i(a(e, 0), n()), t;
|
|
11567
11592
|
function n() {
|
|
@@ -11607,12 +11632,12 @@ function md(e) {
|
|
|
11607
11632
|
else throw Error("Unknown expr type");
|
|
11608
11633
|
}
|
|
11609
11634
|
}
|
|
11610
|
-
function
|
|
11635
|
+
function _d(e, t) {
|
|
11611
11636
|
return t - e;
|
|
11612
11637
|
}
|
|
11613
|
-
function
|
|
11638
|
+
function vd(e, t) {
|
|
11614
11639
|
let n = [];
|
|
11615
|
-
return r(t), n.sort(
|
|
11640
|
+
return r(t), n.sort(_d);
|
|
11616
11641
|
function r(t) {
|
|
11617
11642
|
let i = e[t];
|
|
11618
11643
|
if (i.length == 1 && !i[0].term) return r(i[0].to);
|
|
@@ -11623,9 +11648,9 @@ function gd(e, t) {
|
|
|
11623
11648
|
}
|
|
11624
11649
|
}
|
|
11625
11650
|
}
|
|
11626
|
-
function
|
|
11651
|
+
function yd(e) {
|
|
11627
11652
|
let t = Object.create(null);
|
|
11628
|
-
return n(
|
|
11653
|
+
return n(vd(e, 0));
|
|
11629
11654
|
function n(r) {
|
|
11630
11655
|
let i = [];
|
|
11631
11656
|
r.forEach((t) => {
|
|
@@ -11633,14 +11658,14 @@ function _d(e) {
|
|
|
11633
11658
|
if (!t) return;
|
|
11634
11659
|
let r;
|
|
11635
11660
|
for (let e = 0; e < i.length; e++) i[e][0] == t && (r = i[e][1]);
|
|
11636
|
-
|
|
11661
|
+
vd(e, n).forEach((e) => {
|
|
11637
11662
|
r || i.push([t, r = []]), r.indexOf(e) == -1 && r.push(e);
|
|
11638
11663
|
});
|
|
11639
11664
|
});
|
|
11640
11665
|
});
|
|
11641
|
-
let a = t[r.join(",")] = new
|
|
11666
|
+
let a = t[r.join(",")] = new sd(r.indexOf(e.length - 1) > -1);
|
|
11642
11667
|
for (let e = 0; e < i.length; e++) {
|
|
11643
|
-
let r = i[e][1].sort(
|
|
11668
|
+
let r = i[e][1].sort(_d);
|
|
11644
11669
|
a.next.push({
|
|
11645
11670
|
type: i[e][0],
|
|
11646
11671
|
next: t[r.join(",")] || n(r)
|
|
@@ -11649,7 +11674,7 @@ function _d(e) {
|
|
|
11649
11674
|
return a;
|
|
11650
11675
|
}
|
|
11651
11676
|
}
|
|
11652
|
-
function
|
|
11677
|
+
function bd(e, t) {
|
|
11653
11678
|
for (let n = 0, r = [e]; n < r.length; n++) {
|
|
11654
11679
|
let e = r[n], i = !e.validEnd, a = [];
|
|
11655
11680
|
for (let t = 0; t < e.next.length; t++) {
|
|
@@ -11661,27 +11686,27 @@ function vd(e, t) {
|
|
|
11661
11686
|
}
|
|
11662
11687
|
//#endregion
|
|
11663
11688
|
//#region src/types/DitoTypeMarkup.vue?vue&type=template&lang.js
|
|
11664
|
-
var
|
|
11689
|
+
var xd = ["id"], Sd = {
|
|
11665
11690
|
key: 0,
|
|
11666
11691
|
class: "dito-buttons dito-buttons--toolbar"
|
|
11667
|
-
},
|
|
11692
|
+
}, Cd = { class: "dito-buttons__group" }, wd = [
|
|
11668
11693
|
"aria-label",
|
|
11669
11694
|
"aria-pressed",
|
|
11670
11695
|
"onClick"
|
|
11671
11696
|
];
|
|
11672
|
-
function
|
|
11697
|
+
function Td(e, n, r, i, a, o) {
|
|
11673
11698
|
let s = w("DitoIcon"), u = w("EditorContent");
|
|
11674
11699
|
return x(), l("div", {
|
|
11675
11700
|
class: "dito-markup",
|
|
11676
11701
|
id: e.componentPath
|
|
11677
11702
|
}, [
|
|
11678
|
-
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", {
|
|
11679
11704
|
class: y(["dito-button", { "dito-button--active": r }]),
|
|
11680
11705
|
key: e,
|
|
11681
11706
|
"aria-label": t,
|
|
11682
11707
|
"aria-pressed": r,
|
|
11683
11708
|
onClick: i
|
|
11684
|
-
}, [f(s, { name: n }, null, 8, ["name"])], 10,
|
|
11709
|
+
}, [f(s, { name: n }, null, 8, ["name"])], 10, wd))), 128))]))), 256))])) : c("", !0),
|
|
11685
11710
|
f(u, {
|
|
11686
11711
|
class: "dito-markup-editor",
|
|
11687
11712
|
ref: "editor",
|
|
@@ -11693,11 +11718,11 @@ function Cd(e, n, r, i, a, o) {
|
|
|
11693
11718
|
class: "dito-resize",
|
|
11694
11719
|
onMousedown: n[0] ||= A((...t) => e.onDragResize && e.onDragResize(...t), ["stop", "prevent"])
|
|
11695
11720
|
}, null, 32)) : c("", !0)
|
|
11696
|
-
], 8,
|
|
11721
|
+
], 8, xd);
|
|
11697
11722
|
}
|
|
11698
11723
|
//#endregion
|
|
11699
11724
|
//#region src/types/DitoTypeMarkup.vue
|
|
11700
|
-
var
|
|
11725
|
+
var Ed = Q.register("markup", {
|
|
11701
11726
|
mixins: [mo],
|
|
11702
11727
|
components: {
|
|
11703
11728
|
EditorContent: pt,
|
|
@@ -11791,7 +11816,7 @@ var wd = Q.register("markup", {
|
|
|
11791
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);
|
|
11792
11817
|
});
|
|
11793
11818
|
let i = e.state.schema.nodes.paragraph.create(null, $.from(r));
|
|
11794
|
-
return e.dispatch(e.state.tr.replaceSelection(new
|
|
11819
|
+
return e.dispatch(e.state.tr.replaceSelection(new zu($.from(i), 0, 0))), !0;
|
|
11795
11820
|
} } : {}
|
|
11796
11821
|
};
|
|
11797
11822
|
},
|
|
@@ -11914,11 +11939,11 @@ var wd = Q.register("markup", {
|
|
|
11914
11939
|
e.italic && bt,
|
|
11915
11940
|
e.underline && Tt,
|
|
11916
11941
|
e.strike && St,
|
|
11917
|
-
e.small &&
|
|
11942
|
+
e.small && Dd,
|
|
11918
11943
|
e.code && yt,
|
|
11919
11944
|
e.subscript && wt,
|
|
11920
11945
|
e.superscript && Ct,
|
|
11921
|
-
e.link &&
|
|
11946
|
+
e.link && Od,
|
|
11922
11947
|
t.blockquote && Et,
|
|
11923
11948
|
t.codeBlock && Dt,
|
|
11924
11949
|
t.heading && kt.configure({ levels: t.heading }),
|
|
@@ -11990,7 +12015,7 @@ var wd = Q.register("markup", {
|
|
|
11990
12015
|
this.editor.commands.blur();
|
|
11991
12016
|
}
|
|
11992
12017
|
}
|
|
11993
|
-
}),
|
|
12018
|
+
}), Dd = mt.create({
|
|
11994
12019
|
name: "small",
|
|
11995
12020
|
parseHTML() {
|
|
11996
12021
|
return [{ tag: "small" }];
|
|
@@ -12005,7 +12030,7 @@ var wd = Q.register("markup", {
|
|
|
12005
12030
|
unsetSmall: () => ({ commands: e }) => e.unsetMark(this.name)
|
|
12006
12031
|
};
|
|
12007
12032
|
}
|
|
12008
|
-
}),
|
|
12033
|
+
}), Od = xt.extend({
|
|
12009
12034
|
inclusive: !1,
|
|
12010
12035
|
addAttributes() {
|
|
12011
12036
|
return {
|
|
@@ -12029,10 +12054,10 @@ var wd = Q.register("markup", {
|
|
|
12029
12054
|
0
|
|
12030
12055
|
];
|
|
12031
12056
|
}
|
|
12032
|
-
}),
|
|
12033
|
-
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) {
|
|
12034
12059
|
let o = w("DitoAffixes"), d = w("VueMultiselect"), p = w("DitoEditButtons");
|
|
12035
|
-
return x(), l("div",
|
|
12060
|
+
return x(), l("div", Ad, [u("div", jd, [
|
|
12036
12061
|
f(o, {
|
|
12037
12062
|
items: e.schema.prefix,
|
|
12038
12063
|
position: "prefix",
|
|
@@ -12135,8 +12160,8 @@ function Ad(e, t, n, r, i, a) {
|
|
|
12135
12160
|
"editPath"
|
|
12136
12161
|
])) : c("", !0)]);
|
|
12137
12162
|
}
|
|
12138
|
-
var
|
|
12139
|
-
mixins: [
|
|
12163
|
+
var Nd = /*#__PURE__*/ X(Q.register("multiselect", {
|
|
12164
|
+
mixins: [Ml],
|
|
12140
12165
|
components: {
|
|
12141
12166
|
DitoAffixes: Z,
|
|
12142
12167
|
VueMultiselect: zt
|
|
@@ -12227,7 +12252,7 @@ var jd = /*#__PURE__*/ X(Q.register("multiselect", {
|
|
|
12227
12252
|
},
|
|
12228
12253
|
async loadSearchedOptions(e) {
|
|
12229
12254
|
try {
|
|
12230
|
-
return await this.optionsResolver.waitForValue(), await this.searchFilter(new
|
|
12255
|
+
return await this.optionsResolver.waitForValue(), await this.searchFilter(new G(this, { searchTerm: e }));
|
|
12231
12256
|
} catch (e) {
|
|
12232
12257
|
return this.addError(e.message || e), null;
|
|
12233
12258
|
}
|
|
@@ -12244,13 +12269,13 @@ var jd = /*#__PURE__*/ X(Q.register("multiselect", {
|
|
|
12244
12269
|
}
|
|
12245
12270
|
}
|
|
12246
12271
|
}
|
|
12247
|
-
}), [["render",
|
|
12272
|
+
}), [["render", Md]]), Pd = {
|
|
12248
12273
|
getTypeValidations(e, t) {
|
|
12249
|
-
let n = e.type === "integer", r = (n) =>
|
|
12274
|
+
let n = e.type === "integer", r = (n) => _r(n, {
|
|
12250
12275
|
type: Number,
|
|
12251
12276
|
schema: e,
|
|
12252
12277
|
context: t
|
|
12253
|
-
}), i = (e, t) => n && e != null ? t(e) : e, a =
|
|
12278
|
+
}), i = (e, t) => n && e != null ? t(e) : e, a = _r("range", {
|
|
12254
12279
|
type: Array,
|
|
12255
12280
|
schema: e,
|
|
12256
12281
|
context: t
|
|
@@ -12310,7 +12335,7 @@ var jd = /*#__PURE__*/ X(Q.register("multiselect", {
|
|
|
12310
12335
|
};
|
|
12311
12336
|
//#endregion
|
|
12312
12337
|
//#region src/types/DitoTypeNumber.vue?vue&type=template&lang.js
|
|
12313
|
-
function
|
|
12338
|
+
function Fd(e, t, n, r, i, a) {
|
|
12314
12339
|
let o = w("DitoAffixes"), c = w("DitoInput");
|
|
12315
12340
|
return x(), s(c, v({
|
|
12316
12341
|
class: "dito-number",
|
|
@@ -12361,8 +12386,8 @@ function Nd(e, t, n, r, i, a) {
|
|
|
12361
12386
|
"step"
|
|
12362
12387
|
]);
|
|
12363
12388
|
}
|
|
12364
|
-
var
|
|
12365
|
-
mixins: [
|
|
12389
|
+
var Id = /*#__PURE__*/ X(Q.register(["number", "integer"], {
|
|
12390
|
+
mixins: [Pd],
|
|
12366
12391
|
components: {
|
|
12367
12392
|
DitoInput: Da,
|
|
12368
12393
|
DitoAffixes: Z
|
|
@@ -12372,17 +12397,17 @@ var Pd = /*#__PURE__*/ X(Q.register(["number", "integer"], {
|
|
|
12372
12397
|
computed: { isInteger() {
|
|
12373
12398
|
return this.type === "integer";
|
|
12374
12399
|
} }
|
|
12375
|
-
}), [["render",
|
|
12400
|
+
}), [["render", Fd]]), Ld = ["id"], Rd = {
|
|
12376
12401
|
key: 0,
|
|
12377
12402
|
class: "dito-object-content"
|
|
12378
|
-
},
|
|
12379
|
-
function
|
|
12403
|
+
}, zd = ["innerHTML"], Bd = ["innerHTML"];
|
|
12404
|
+
function Vd(e, t, n, r, i, a) {
|
|
12380
12405
|
let o = w("DitoSchemaInlined"), u = w("DitoEditButtons");
|
|
12381
12406
|
return e.isReady ? (x(), l("div", {
|
|
12382
12407
|
key: 0,
|
|
12383
12408
|
class: "dito-object",
|
|
12384
12409
|
id: e.componentPath
|
|
12385
|
-
}, [e.objectData ? (x(), l("div",
|
|
12410
|
+
}, [e.objectData ? (x(), l("div", Rd, [e.isInlined ? (x(), s(o, {
|
|
12386
12411
|
key: 0,
|
|
12387
12412
|
label: e.objectLabel,
|
|
12388
12413
|
schema: e.getItemFormSchema(e.schema, e.objectData, e.context),
|
|
@@ -12416,10 +12441,10 @@ function zd(e, t, n, r, i, a) {
|
|
|
12416
12441
|
}, null, 8, ["dataPath", "data"])) : e.render ? (x(), l("span", {
|
|
12417
12442
|
key: 2,
|
|
12418
12443
|
innerHTML: e.render(e.getContext())
|
|
12419
|
-
}, null, 8,
|
|
12444
|
+
}, null, 8, zd)) : (x(), l("span", {
|
|
12420
12445
|
key: 3,
|
|
12421
12446
|
innerHTML: e.getItemLabel(e.schema, e.objectData)
|
|
12422
|
-
}, null, 8,
|
|
12447
|
+
}, null, 8, Bd))])) : c("", !0), f(u, {
|
|
12423
12448
|
buttons: e.buttonSchemas,
|
|
12424
12449
|
schema: e.schema,
|
|
12425
12450
|
dataPath: e.dataPath,
|
|
@@ -12448,10 +12473,10 @@ function zd(e, t, n, r, i, a) {
|
|
|
12448
12473
|
"editable",
|
|
12449
12474
|
"editPath",
|
|
12450
12475
|
"deletable"
|
|
12451
|
-
])], 8,
|
|
12476
|
+
])], 8, Ld)) : c("", !0);
|
|
12452
12477
|
}
|
|
12453
|
-
var
|
|
12454
|
-
mixins: [
|
|
12478
|
+
var Hd = /*#__PURE__*/ X(Q.register("object", {
|
|
12479
|
+
mixins: [iu],
|
|
12455
12480
|
getSourceType(e) {
|
|
12456
12481
|
return e;
|
|
12457
12482
|
},
|
|
@@ -12459,12 +12484,12 @@ var Bd = /*#__PURE__*/ X(Q.register("object", {
|
|
|
12459
12484
|
return this.collapsible ? this.getItemLabel(this.schema, this.objectData, { asObject: !0 }) : null;
|
|
12460
12485
|
} },
|
|
12461
12486
|
methods: { getContext() {
|
|
12462
|
-
return new
|
|
12487
|
+
return new G(this, { data: this.objectData });
|
|
12463
12488
|
} },
|
|
12464
12489
|
async processSchema(e, t, n, r, i, a = !1, o = !1, s = null) {
|
|
12465
|
-
await Promise.all([di(t),
|
|
12490
|
+
await Promise.all([di(t), iu.processSchema(e, t, n, r, i, a, o, s)]);
|
|
12466
12491
|
}
|
|
12467
|
-
}), [["render",
|
|
12492
|
+
}), [["render", Vd]]), Ud = Q.register("panel", {
|
|
12468
12493
|
defaultNested: !1,
|
|
12469
12494
|
generateLabel: !1,
|
|
12470
12495
|
omitSpacing: !0,
|
|
@@ -12477,22 +12502,22 @@ var Bd = /*#__PURE__*/ X(Q.register("object", {
|
|
|
12477
12502
|
render() {
|
|
12478
12503
|
return null;
|
|
12479
12504
|
}
|
|
12480
|
-
}),
|
|
12505
|
+
}), Wd = [
|
|
12481
12506
|
"id",
|
|
12482
12507
|
"value",
|
|
12483
12508
|
"max"
|
|
12484
12509
|
];
|
|
12485
|
-
function
|
|
12510
|
+
function Gd(e, t, n, r, i, a) {
|
|
12486
12511
|
return x(), l("progress", v({
|
|
12487
12512
|
class: "dito-progress",
|
|
12488
12513
|
id: e.componentPath,
|
|
12489
12514
|
ref: "element",
|
|
12490
12515
|
value: e.progressValue,
|
|
12491
12516
|
max: e.progressMax
|
|
12492
|
-
}, e.attributes), null, 16,
|
|
12517
|
+
}, e.attributes), null, 16, Wd);
|
|
12493
12518
|
}
|
|
12494
|
-
var
|
|
12495
|
-
mixins: [
|
|
12519
|
+
var Kd = /*#__PURE__*/ X(Q.register("progress", {
|
|
12520
|
+
mixins: [Pd],
|
|
12496
12521
|
computed: {
|
|
12497
12522
|
progressValue() {
|
|
12498
12523
|
let { value: e, range: t, step: n } = this;
|
|
@@ -12503,8 +12528,8 @@ var Wd = /*#__PURE__*/ X(Q.register("progress", {
|
|
|
12503
12528
|
return e ? e[1] - e[0] : null;
|
|
12504
12529
|
}
|
|
12505
12530
|
}
|
|
12506
|
-
}), [["render",
|
|
12507
|
-
function
|
|
12531
|
+
}), [["render", Gd]]), qd = ["id", "aria-label"], Jd = ["value"];
|
|
12532
|
+
function Yd(e, n, r, i, a, o) {
|
|
12508
12533
|
return x(), l("ul", {
|
|
12509
12534
|
class: y(["dito-radio-buttons", `dito-layout--${e.schema.layout || "vertical"}`]),
|
|
12510
12535
|
id: e.componentPath,
|
|
@@ -12517,16 +12542,16 @@ function qd(e, n, r, i, a, o) {
|
|
|
12517
12542
|
"onUpdate:modelValue": n[0] ||= (t) => e.selectedValue = t,
|
|
12518
12543
|
type: "radio",
|
|
12519
12544
|
value: e.getValueForOption(t)
|
|
12520
|
-
}, { 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);
|
|
12521
12546
|
}
|
|
12522
|
-
var
|
|
12523
|
-
mixins: [
|
|
12547
|
+
var Xd = /*#__PURE__*/ X(Q.register("radio", {
|
|
12548
|
+
mixins: [Ml],
|
|
12524
12549
|
nativeField: !0,
|
|
12525
12550
|
defaultWidth: "auto"
|
|
12526
|
-
}), [["render",
|
|
12551
|
+
}), [["render", Yd]]);
|
|
12527
12552
|
//#endregion
|
|
12528
12553
|
//#region src/types/DitoTypeSection.vue?vue&type=template&lang.js
|
|
12529
|
-
function
|
|
12554
|
+
function Zd(e, t, n, r, i, a) {
|
|
12530
12555
|
let o = w("DitoSchemaInlined");
|
|
12531
12556
|
return x(), l("div", { class: y(["dito-section", { "dito-section--labelled": e.hasLabel }]) }, [f(o, {
|
|
12532
12557
|
class: "dito-section__schema",
|
|
@@ -12557,7 +12582,7 @@ function Yd(e, t, n, r, i, a) {
|
|
|
12557
12582
|
"labelNode"
|
|
12558
12583
|
])], 2);
|
|
12559
12584
|
}
|
|
12560
|
-
var
|
|
12585
|
+
var Qd = /*#__PURE__*/ X(Q.register("section", {
|
|
12561
12586
|
mixins: [go],
|
|
12562
12587
|
defaultValue: ({ schema: e }) => e.nested ? {} : void 0,
|
|
12563
12588
|
ignoreMissingValue: ({ schema: e }) => !e.nested && !("default" in e),
|
|
@@ -12584,7 +12609,7 @@ var Xd = /*#__PURE__*/ X(Q.register("section", {
|
|
|
12584
12609
|
})
|
|
12585
12610
|
},
|
|
12586
12611
|
methods: {
|
|
12587
|
-
getItemFormSchema:
|
|
12612
|
+
getItemFormSchema: ur,
|
|
12588
12613
|
async navigateToComponent(e, t, n) {
|
|
12589
12614
|
let { mainSchemaComponent: r } = this, i = this.dataPath ? `${this.dataPath}/` : "", a = z(e), o = a.startsWith(i) ? B(a.slice(i.length))[0] : null;
|
|
12590
12615
|
return !!r && yn(r.schema, o) && r.navigateToComponent(e, t, n);
|
|
@@ -12593,10 +12618,10 @@ var Xd = /*#__PURE__*/ X(Q.register("section", {
|
|
|
12593
12618
|
async processSchema(e, t, n, r, i) {
|
|
12594
12619
|
await mi(e, t, r, i);
|
|
12595
12620
|
}
|
|
12596
|
-
}), [["render",
|
|
12597
|
-
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) {
|
|
12598
12623
|
let d = w("DitoAffixes"), p = w("DitoEditButtons");
|
|
12599
|
-
return x(), l("div",
|
|
12624
|
+
return x(), l("div", $d, [u("div", ef, [
|
|
12600
12625
|
f(d, {
|
|
12601
12626
|
items: e.schema.prefix,
|
|
12602
12627
|
position: "prefix",
|
|
@@ -12619,13 +12644,13 @@ function af(e, n, r, i, a, o) {
|
|
|
12619
12644
|
}), [e.populate ? (x(!0), l(t, { key: 0 }, S(e.options, (n) => (x(), l(t, null, [e.groupBy ? (x(), l("optgroup", {
|
|
12620
12645
|
key: 0,
|
|
12621
12646
|
label: n[e.groupByLabel]
|
|
12622
|
-
}, [(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", {
|
|
12623
12648
|
key: 1,
|
|
12624
12649
|
value: e.getValueForOption(n)
|
|
12625
|
-
}, E(e.getLabelForOption(n)), 9,
|
|
12650
|
+
}, E(e.getLabelForOption(n)), 9, af))], 64))), 256)) : e.selectedOption ? (x(), l("option", {
|
|
12626
12651
|
key: 1,
|
|
12627
12652
|
value: e.selectedValue
|
|
12628
|
-
}, E(e.getLabelForOption(e.selectedOption)), 9,
|
|
12653
|
+
}, E(e.getLabelForOption(e.selectedOption)), 9, of)) : c("", !0)], 16, tf), [[fe, e.selectedValue]]),
|
|
12629
12654
|
f(d, {
|
|
12630
12655
|
items: e.schema.suffix,
|
|
12631
12656
|
position: "suffix",
|
|
@@ -12664,22 +12689,22 @@ function af(e, n, r, i, a, o) {
|
|
|
12664
12689
|
"editPath"
|
|
12665
12690
|
])) : c("", !0)]);
|
|
12666
12691
|
}
|
|
12667
|
-
var
|
|
12668
|
-
mixins: [
|
|
12692
|
+
var cf = /*#__PURE__*/ X(Q.register("select", {
|
|
12693
|
+
mixins: [Ml],
|
|
12669
12694
|
components: { DitoAffixes: Z },
|
|
12670
12695
|
nativeField: !0,
|
|
12671
12696
|
data() {
|
|
12672
12697
|
return { populate: !0 };
|
|
12673
12698
|
}
|
|
12674
|
-
}), [["render",
|
|
12699
|
+
}), [["render", sf]]), lf = { class: "dito-slider" }, uf = [
|
|
12675
12700
|
"id",
|
|
12676
12701
|
"min",
|
|
12677
12702
|
"max",
|
|
12678
12703
|
"step"
|
|
12679
12704
|
];
|
|
12680
|
-
function
|
|
12705
|
+
function df(e, t, n, r, i, a) {
|
|
12681
12706
|
let o = w("DitoInput");
|
|
12682
|
-
return x(), l("div",
|
|
12707
|
+
return x(), l("div", lf, [k(u("input", v({
|
|
12683
12708
|
class: "dito-range",
|
|
12684
12709
|
id: e.componentPath,
|
|
12685
12710
|
ref: "element",
|
|
@@ -12689,7 +12714,7 @@ function lf(e, t, n, r, i, a) {
|
|
|
12689
12714
|
min: e.min,
|
|
12690
12715
|
max: e.max,
|
|
12691
12716
|
step: e.stepValue
|
|
12692
|
-
}), null, 16,
|
|
12717
|
+
}), null, 16, uf), [[pe, e.inputValue]]), e.input ? (x(), s(o, v({
|
|
12693
12718
|
key: 0,
|
|
12694
12719
|
class: "dito-number",
|
|
12695
12720
|
modelValue: e.inputValue,
|
|
@@ -12706,28 +12731,28 @@ function lf(e, t, n, r, i, a) {
|
|
|
12706
12731
|
"step"
|
|
12707
12732
|
])) : c("", !0)]);
|
|
12708
12733
|
}
|
|
12709
|
-
var
|
|
12710
|
-
mixins: [
|
|
12734
|
+
var ff = /*#__PURE__*/ X(Q.register("slider", {
|
|
12735
|
+
mixins: [Pd],
|
|
12711
12736
|
components: { DitoInput: Da },
|
|
12712
12737
|
nativeField: !0,
|
|
12713
12738
|
computed: { input: q("input", {
|
|
12714
12739
|
type: Boolean,
|
|
12715
12740
|
default: !0
|
|
12716
12741
|
}) }
|
|
12717
|
-
}), [["render",
|
|
12742
|
+
}), [["render", df]]);
|
|
12718
12743
|
//#endregion
|
|
12719
12744
|
//#region src/types/DitoTypeSpacer.vue?vue&type=template&lang.js
|
|
12720
|
-
function
|
|
12745
|
+
function pf(e, t, n, r, i, a) {
|
|
12721
12746
|
return null;
|
|
12722
12747
|
}
|
|
12723
|
-
var
|
|
12748
|
+
var mf = /*#__PURE__*/ X(Q.register("spacer", {
|
|
12724
12749
|
defaultValue: () => void 0,
|
|
12725
12750
|
excludeValue: !0,
|
|
12726
12751
|
generateLabel: !1
|
|
12727
|
-
}), [["render",
|
|
12752
|
+
}), [["render", pf]]);
|
|
12728
12753
|
//#endregion
|
|
12729
12754
|
//#region src/types/DitoTypeSwitch.vue?vue&type=template&lang.js
|
|
12730
|
-
function
|
|
12755
|
+
function hf(e, t, n, r, i, a) {
|
|
12731
12756
|
let o = w("DitoSwitch");
|
|
12732
12757
|
return x(), s(o, v({
|
|
12733
12758
|
class: "dito-switch",
|
|
@@ -12742,14 +12767,14 @@ function pf(e, t, n, r, i, a) {
|
|
|
12742
12767
|
"labels"
|
|
12743
12768
|
]);
|
|
12744
12769
|
}
|
|
12745
|
-
var
|
|
12770
|
+
var gf = /*#__PURE__*/ X(Q.register("switch", {
|
|
12746
12771
|
defaultValue: !1,
|
|
12747
12772
|
defaultWidth: "auto",
|
|
12748
12773
|
components: { DitoSwitch: oo },
|
|
12749
12774
|
computed: { labels() {
|
|
12750
12775
|
return this.schema.labels;
|
|
12751
12776
|
} }
|
|
12752
|
-
}), [["render",
|
|
12777
|
+
}), [["render", hf]]), _f = {
|
|
12753
12778
|
computed: { trim: q("trim", {
|
|
12754
12779
|
type: Boolean,
|
|
12755
12780
|
default: !1
|
|
@@ -12761,7 +12786,7 @@ var mf = /*#__PURE__*/ X(Q.register("switch", {
|
|
|
12761
12786
|
};
|
|
12762
12787
|
//#endregion
|
|
12763
12788
|
//#region src/types/DitoTypeText.vue?vue&type=template&lang.js
|
|
12764
|
-
function
|
|
12789
|
+
function vf(e, t, n, r, i, a) {
|
|
12765
12790
|
let o = w("DitoAffixes"), c = w("DitoInput");
|
|
12766
12791
|
return x(), s(c, v({
|
|
12767
12792
|
class: "dito-text",
|
|
@@ -12808,7 +12833,7 @@ function gf(e, t, n, r, i, a) {
|
|
|
12808
12833
|
}
|
|
12809
12834
|
//#endregion
|
|
12810
12835
|
//#region src/types/DitoTypeText.vue
|
|
12811
|
-
var
|
|
12836
|
+
var yf = "****************", bf = /*#__PURE__*/ X(Q.register([
|
|
12812
12837
|
"text",
|
|
12813
12838
|
"email",
|
|
12814
12839
|
"url",
|
|
@@ -12818,7 +12843,7 @@ var _f = "****************", vf = /*#__PURE__*/ X(Q.register([
|
|
|
12818
12843
|
"password",
|
|
12819
12844
|
"creditcard"
|
|
12820
12845
|
], {
|
|
12821
|
-
mixins: [
|
|
12846
|
+
mixins: [_f],
|
|
12822
12847
|
components: {
|
|
12823
12848
|
DitoInput: Da,
|
|
12824
12849
|
DitoAffixes: Z
|
|
@@ -12847,15 +12872,15 @@ var _f = "****************", vf = /*#__PURE__*/ X(Q.register([
|
|
|
12847
12872
|
},
|
|
12848
12873
|
inputValue: {
|
|
12849
12874
|
get() {
|
|
12850
|
-
return this.type === "password" && this.value === void 0 && !this.focused ?
|
|
12875
|
+
return this.type === "password" && this.value === void 0 && !this.focused ? yf : this.value;
|
|
12851
12876
|
},
|
|
12852
12877
|
set(e) {
|
|
12853
12878
|
this.value = e;
|
|
12854
12879
|
}
|
|
12855
12880
|
}
|
|
12856
12881
|
}
|
|
12857
|
-
}), [["render",
|
|
12858
|
-
function
|
|
12882
|
+
}), [["render", vf]]), xf = ["id", "rows"];
|
|
12883
|
+
function Sf(e, t, n, r, i, a) {
|
|
12859
12884
|
return k((x(), l("textarea", v({
|
|
12860
12885
|
class: "dito-textarea dito-input",
|
|
12861
12886
|
id: e.componentPath,
|
|
@@ -12864,10 +12889,10 @@ function bf(e, t, n, r, i, a) {
|
|
|
12864
12889
|
}, e.attributes, {
|
|
12865
12890
|
rows: e.lines,
|
|
12866
12891
|
class: { "dito-textarea--resizable": e.resizable }
|
|
12867
|
-
}), null, 16,
|
|
12892
|
+
}), null, 16, xf)), [[pe, e.value]]);
|
|
12868
12893
|
}
|
|
12869
|
-
var
|
|
12870
|
-
mixins: [
|
|
12894
|
+
var Cf = /*#__PURE__*/ X(Q.register("textarea", {
|
|
12895
|
+
mixins: [_f],
|
|
12871
12896
|
nativeField: !0,
|
|
12872
12897
|
textField: !0,
|
|
12873
12898
|
computed: {
|
|
@@ -12879,17 +12904,17 @@ var xf = /*#__PURE__*/ X(Q.register("textarea", {
|
|
|
12879
12904
|
default: !1
|
|
12880
12905
|
})
|
|
12881
12906
|
}
|
|
12882
|
-
}), [["render",
|
|
12907
|
+
}), [["render", Sf]]), wf = { class: "dito-tree-list" }, Tf = { class: "dito-tree-panel" }, Ef = {
|
|
12883
12908
|
key: 0,
|
|
12884
12909
|
class: "dito-tree-form-container"
|
|
12885
12910
|
};
|
|
12886
|
-
function
|
|
12911
|
+
function Df(e, t, n, r, i, a) {
|
|
12887
12912
|
let o = w("DitoScopes"), d = w("DitoTreeItem"), p = w("DitoRouterView");
|
|
12888
|
-
return x(), l("div",
|
|
12913
|
+
return x(), l("div", wf, [e.scopes ? (x(), s(o, {
|
|
12889
12914
|
key: 0,
|
|
12890
12915
|
query: e.query,
|
|
12891
12916
|
scopes: e.scopes
|
|
12892
|
-
}, null, 8, ["query", "scopes"])) : c("", !0), u("div",
|
|
12917
|
+
}, null, 8, ["query", "scopes"])) : c("", !0), u("div", Tf, [f(d, {
|
|
12893
12918
|
schema: e.treeSchema,
|
|
12894
12919
|
dataPath: e.treeDataPath,
|
|
12895
12920
|
data: e.treeData,
|
|
@@ -12901,10 +12926,10 @@ function Tf(e, t, n, r, i, a) {
|
|
|
12901
12926
|
"dataPath",
|
|
12902
12927
|
"data",
|
|
12903
12928
|
"draggable"
|
|
12904
|
-
]), 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)])]);
|
|
12905
12930
|
}
|
|
12906
|
-
var
|
|
12907
|
-
mixins: [
|
|
12931
|
+
var Of = /*#__PURE__*/ X(Q.register(["tree-list", "tree-object"], {
|
|
12932
|
+
mixins: [iu],
|
|
12908
12933
|
provide() {
|
|
12909
12934
|
return { container: this };
|
|
12910
12935
|
},
|
|
@@ -12932,7 +12957,7 @@ var Ef = /*#__PURE__*/ X(Q.register(["tree-list", "tree-object"], {
|
|
|
12932
12957
|
} } : this.schema;
|
|
12933
12958
|
},
|
|
12934
12959
|
hasEditableForms() {
|
|
12935
|
-
let e = (t) =>
|
|
12960
|
+
let e = (t) => $n(t) && (this.getSchemaValue("editable", {
|
|
12936
12961
|
type: Boolean,
|
|
12937
12962
|
default: !1,
|
|
12938
12963
|
schema: t
|
|
@@ -12941,14 +12966,14 @@ var Ef = /*#__PURE__*/ X(Q.register(["tree-list", "tree-object"], {
|
|
|
12941
12966
|
}
|
|
12942
12967
|
},
|
|
12943
12968
|
async processSchema(e, t, n, r, i, a = !0, o = !1, s = null) {
|
|
12944
|
-
await Promise.all([fi(t.properties),
|
|
12969
|
+
await Promise.all([fi(t.properties), iu.processSchema(e, t, n, r, i, a, o, (n, r) => {
|
|
12945
12970
|
let { children: i } = t;
|
|
12946
12971
|
if (i) return i.type = "tree-list", this.processSchema(e, i, i.name, n, r, a, !0, s);
|
|
12947
12972
|
})]);
|
|
12948
12973
|
},
|
|
12949
12974
|
getFormSchemasForProcessing(e, t) {
|
|
12950
12975
|
let { children: n } = e;
|
|
12951
|
-
return
|
|
12976
|
+
return or(e, t, n ? (e) => ({
|
|
12952
12977
|
...e,
|
|
12953
12978
|
components: {
|
|
12954
12979
|
...e.components,
|
|
@@ -12956,7 +12981,7 @@ var Ef = /*#__PURE__*/ X(Q.register(["tree-list", "tree-object"], {
|
|
|
12956
12981
|
}
|
|
12957
12982
|
}) : null);
|
|
12958
12983
|
}
|
|
12959
|
-
}), [["render",
|
|
12984
|
+
}), [["render", Df]]), kf = [
|
|
12960
12985
|
"",
|
|
12961
12986
|
"k",
|
|
12962
12987
|
"M",
|
|
@@ -12967,41 +12992,41 @@ var Ef = /*#__PURE__*/ X(Q.register(["tree-list", "tree-object"], {
|
|
|
12967
12992
|
"Z",
|
|
12968
12993
|
"Y"
|
|
12969
12994
|
];
|
|
12970
|
-
function
|
|
12971
|
-
let n =
|
|
12972
|
-
a >= n && i <
|
|
12973
|
-
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";
|
|
12974
12999
|
return `${e < 0 ? "-" : ""}${a} ${s}`;
|
|
12975
13000
|
}
|
|
12976
|
-
function
|
|
13001
|
+
function jf(e, { base: t = 10 } = {}) {
|
|
12977
13002
|
let [, n, r] = String(e).match(/^([\d.,]*)\s*(\D*)$/) || [], i = parseFloat(n?.replace(",", "."));
|
|
12978
13003
|
if (!isFinite(i)) throw Error(`Can't interpret file size: ${e}`);
|
|
12979
|
-
let a =
|
|
13004
|
+
let a = Mf(/^[kmgtpezy]ib?$/i.test(r) ? 2 : t), o = r.replace(/^bits?$/, "b").match(/^([KMGTPEZY]?)b$/);
|
|
12980
13005
|
if (o) {
|
|
12981
|
-
let e =
|
|
13006
|
+
let e = kf.indexOf(o[1].replace("K", "k"));
|
|
12982
13007
|
return Math.round(i * a ** e / 8);
|
|
12983
13008
|
}
|
|
12984
|
-
let s =
|
|
13009
|
+
let s = kf.findIndex((e) => e.toLowerCase() === r.toLowerCase().replace(/^(bytes?|b)$/, "").replace(/^(\w)(i?b|i)$/, "$1"));
|
|
12985
13010
|
if (s >= 0) return Math.round(i * a ** s);
|
|
12986
13011
|
throw Error(`Invalid file size unit: ${r}`);
|
|
12987
13012
|
}
|
|
12988
|
-
function
|
|
13013
|
+
function Mf(e) {
|
|
12989
13014
|
return e === 10 ? 1e3 : 1024;
|
|
12990
13015
|
}
|
|
12991
|
-
function
|
|
13016
|
+
function Nf(e, t, n) {
|
|
12992
13017
|
let r = n > 0 ? 100 : 1;
|
|
12993
13018
|
return Math.round(e / t ** n * r) / r;
|
|
12994
13019
|
}
|
|
12995
13020
|
//#endregion
|
|
12996
13021
|
//#region src/types/DitoTypeUpload.vue?vue&type=template&lang.js
|
|
12997
|
-
var
|
|
13022
|
+
var Pf = { class: "dito-upload" }, Ff = { class: "dito-table dito-table--separators dito-table--background" }, If = ["innerHTML"], Lf = { key: 1 }, Rf = [
|
|
12998
13023
|
"download",
|
|
12999
13024
|
"href",
|
|
13000
13025
|
"onClick"
|
|
13001
|
-
],
|
|
13002
|
-
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) {
|
|
13003
13028
|
let s = w("VueUpload"), p = w("DitoUploadFile"), m = w("DitoDraggable");
|
|
13004
|
-
return x(), l("div",
|
|
13029
|
+
return x(), l("div", Pf, [f(s, {
|
|
13005
13030
|
class: "dito-upload__input",
|
|
13006
13031
|
ref: "upload",
|
|
13007
13032
|
modelValue: e.uploads,
|
|
@@ -13031,7 +13056,7 @@ function Xf(e, n, r, i, a, o) {
|
|
|
13031
13056
|
"drop",
|
|
13032
13057
|
"onInputFilter",
|
|
13033
13058
|
"onInputFile"
|
|
13034
|
-
]), u("table",
|
|
13059
|
+
]), u("table", Ff, [
|
|
13035
13060
|
n[5] ||= u("thead", { class: "dito-table-head" }, [u("tr", null, [
|
|
13036
13061
|
u("th", { scope: "col" }, [u("span", null, "File")]),
|
|
13037
13062
|
u("th", { scope: "col" }, [u("span", null, "Size")]),
|
|
@@ -13049,7 +13074,7 @@ function Xf(e, n, r, i, a, o) {
|
|
|
13049
13074
|
e.render ? (x(), l("td", {
|
|
13050
13075
|
key: 0,
|
|
13051
13076
|
innerHTML: e.renderFile(r, i)
|
|
13052
|
-
}, null, 8,
|
|
13077
|
+
}, null, 8, If)) : e.downloadUrls[i] ? (x(), l("td", Lf, [u("a", {
|
|
13053
13078
|
download: r.name,
|
|
13054
13079
|
href: e.downloadUrls[i],
|
|
13055
13080
|
target: "_blank",
|
|
@@ -13062,7 +13087,7 @@ function Xf(e, n, r, i, a, o) {
|
|
|
13062
13087
|
"file",
|
|
13063
13088
|
"thumbnail",
|
|
13064
13089
|
"thumbnailUrl"
|
|
13065
|
-
])], 8,
|
|
13090
|
+
])], 8, Rf)])) : (x(), l("td", zf, [f(p, {
|
|
13066
13091
|
file: r,
|
|
13067
13092
|
thumbnail: e.thumbnails,
|
|
13068
13093
|
thumbnailUrl: e.thumbnailUrls[i]
|
|
@@ -13071,15 +13096,15 @@ function Xf(e, n, r, i, a, o) {
|
|
|
13071
13096
|
"thumbnail",
|
|
13072
13097
|
"thumbnailUrl"
|
|
13073
13098
|
])])),
|
|
13074
|
-
u("td",
|
|
13075
|
-
u("td",
|
|
13076
|
-
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, [
|
|
13077
13102
|
e.multiple ? c("", !0) : (x(), l("button", {
|
|
13078
13103
|
key: 0,
|
|
13079
13104
|
class: "dito-button dito-button--upload",
|
|
13080
13105
|
title: e.uploadTitle,
|
|
13081
13106
|
onClick: n[1] ||= (...t) => e.onClickUpload && e.onClickUpload(...t)
|
|
13082
|
-
}, null, 8,
|
|
13107
|
+
}, null, 8, Wf)),
|
|
13083
13108
|
e.draggable ? (x(), l("a", v({
|
|
13084
13109
|
key: 1,
|
|
13085
13110
|
class: "dito-button"
|
|
@@ -13088,7 +13113,7 @@ function Xf(e, n, r, i, a, o) {
|
|
|
13088
13113
|
key: 2,
|
|
13089
13114
|
class: "dito-button",
|
|
13090
13115
|
type: "button"
|
|
13091
|
-
}, { 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)
|
|
13092
13117
|
])])
|
|
13093
13118
|
]))), 128)) : c("", !0)]),
|
|
13094
13119
|
_: 1
|
|
@@ -13097,12 +13122,12 @@ function Xf(e, n, r, i, a, o) {
|
|
|
13097
13122
|
"options",
|
|
13098
13123
|
"draggable"
|
|
13099
13124
|
]),
|
|
13100
|
-
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", {
|
|
13101
13126
|
key: 0,
|
|
13102
13127
|
class: "dito-progress",
|
|
13103
13128
|
value: e.uploadProgress,
|
|
13104
13129
|
max: "100"
|
|
13105
|
-
}, null, 8,
|
|
13130
|
+
}, null, 8, Yf)) : c("", !0), u("div", Xf, [e.isUploadActive ? (x(), l("button", {
|
|
13106
13131
|
key: 0,
|
|
13107
13132
|
class: "dito-button",
|
|
13108
13133
|
type: "button",
|
|
@@ -13112,13 +13137,13 @@ function Xf(e, n, r, i, a, o) {
|
|
|
13112
13137
|
class: "dito-button dito-button--upload",
|
|
13113
13138
|
title: e.uploadTitle,
|
|
13114
13139
|
onClick: n[4] ||= (...t) => e.onClickUpload && e.onClickUpload(...t)
|
|
13115
|
-
}, null, 8,
|
|
13140
|
+
}, null, 8, Zf)) : c("", !0)])])])])])) : c("", !0)
|
|
13116
13141
|
])]);
|
|
13117
13142
|
}
|
|
13118
13143
|
//#endregion
|
|
13119
13144
|
//#region src/types/DitoTypeUpload.vue
|
|
13120
|
-
var
|
|
13121
|
-
mixins: [
|
|
13145
|
+
var $f = Q.register("upload", {
|
|
13146
|
+
mixins: [zc],
|
|
13122
13147
|
components: { VueUpload: Bt },
|
|
13123
13148
|
data() {
|
|
13124
13149
|
return { uploads: [] };
|
|
@@ -13131,7 +13156,7 @@ var Zf = Q.register("upload", {
|
|
|
13131
13156
|
return this.multiple ? "Upload Files" : "Upload File";
|
|
13132
13157
|
},
|
|
13133
13158
|
files() {
|
|
13134
|
-
return
|
|
13159
|
+
return ep(this.value);
|
|
13135
13160
|
},
|
|
13136
13161
|
downloadUrls() {
|
|
13137
13162
|
return this.files.map((e, t) => this.getDownloadUrl(e, t));
|
|
@@ -13158,7 +13183,7 @@ var Zf = Q.register("upload", {
|
|
|
13158
13183
|
maxSize: q("maxSize", {
|
|
13159
13184
|
type: [String, Number],
|
|
13160
13185
|
get(e) {
|
|
13161
|
-
return e ?
|
|
13186
|
+
return e ? jf(e) : void 0;
|
|
13162
13187
|
}
|
|
13163
13188
|
}),
|
|
13164
13189
|
draggable: q("draggable", {
|
|
@@ -13214,9 +13239,9 @@ var Zf = Q.register("upload", {
|
|
|
13214
13239
|
});
|
|
13215
13240
|
} },
|
|
13216
13241
|
methods: {
|
|
13217
|
-
formatFileSize:
|
|
13242
|
+
formatFileSize: Af,
|
|
13218
13243
|
getFileContext(e, t) {
|
|
13219
|
-
return this.multiple ? new
|
|
13244
|
+
return this.multiple ? new G(this, {
|
|
13220
13245
|
value: e,
|
|
13221
13246
|
data: this.files,
|
|
13222
13247
|
index: t,
|
|
@@ -13287,7 +13312,7 @@ var Zf = Q.register("upload", {
|
|
|
13287
13312
|
extension: `Unsupported file-type: ${e.name}`,
|
|
13288
13313
|
network: "Network error encountered during upload",
|
|
13289
13314
|
server: "Server error occurred during upload",
|
|
13290
|
-
size: `File is too large: ${
|
|
13315
|
+
size: `File is too large: ${Af(e.size)}`,
|
|
13291
13316
|
timeout: "Timeout occurred during upload"
|
|
13292
13317
|
}[n] || `Unknown File Upload Error: '${n}'`;
|
|
13293
13318
|
this.notify({
|
|
@@ -13319,57 +13344,57 @@ var Zf = Q.register("upload", {
|
|
|
13319
13344
|
}
|
|
13320
13345
|
},
|
|
13321
13346
|
processValue({ schema: e, value: t }) {
|
|
13322
|
-
let n =
|
|
13347
|
+
let n = ep(t).map(({ upload: e, ...t }) => !e || e.success ? t : null).filter((e) => e);
|
|
13323
13348
|
return e.multiple ? n : n[0] || null;
|
|
13324
13349
|
}
|
|
13325
13350
|
});
|
|
13326
|
-
function
|
|
13351
|
+
function ep(e) {
|
|
13327
13352
|
return e ? j(e) : [];
|
|
13328
13353
|
}
|
|
13329
|
-
var
|
|
13330
|
-
DitoDitoTypeComponent: () =>
|
|
13331
|
-
DitoTypeButton: () =>
|
|
13332
|
-
DitoTypeCheckbox: () =>
|
|
13333
|
-
DitoTypeCheckboxes: () =>
|
|
13334
|
-
DitoTypeCode: () =>
|
|
13335
|
-
DitoTypeColor: () =>
|
|
13336
|
-
DitoTypeComputed: () =>
|
|
13337
|
-
DitoTypeDate: () =>
|
|
13338
|
-
DitoTypeLabel: () =>
|
|
13339
|
-
DitoTypeList: () =>
|
|
13340
|
-
DitoTypeMarkup: () =>
|
|
13341
|
-
DitoTypeMultiselect: () =>
|
|
13342
|
-
DitoTypeNumber: () =>
|
|
13343
|
-
DitoTypeObject: () =>
|
|
13344
|
-
DitoTypePanel: () =>
|
|
13345
|
-
DitoTypeProgress: () =>
|
|
13346
|
-
DitoTypeRadio: () =>
|
|
13347
|
-
DitoTypeSection: () =>
|
|
13348
|
-
DitoTypeSelect: () =>
|
|
13349
|
-
DitoTypeSlider: () =>
|
|
13350
|
-
DitoTypeSpacer: () =>
|
|
13351
|
-
DitoTypeSwitch: () =>
|
|
13352
|
-
DitoTypeText: () =>
|
|
13353
|
-
DitoTypeTextarea: () =>
|
|
13354
|
-
DitoTypeTreeList: () =>
|
|
13355
|
-
DitoTypeUpload: () =>
|
|
13356
|
-
}),
|
|
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 = {
|
|
13357
13382
|
mounted(e, t) {
|
|
13358
|
-
|
|
13383
|
+
ip(e, t.value, t.arg);
|
|
13359
13384
|
},
|
|
13360
13385
|
unmounted(e, t) {
|
|
13361
|
-
|
|
13386
|
+
ap(e, t.value, t.arg);
|
|
13362
13387
|
}
|
|
13363
13388
|
};
|
|
13364
|
-
function
|
|
13365
|
-
|
|
13389
|
+
function ip(e, t, n) {
|
|
13390
|
+
cp.getObserver(n).observe(e, t);
|
|
13366
13391
|
}
|
|
13367
|
-
function
|
|
13368
|
-
|
|
13392
|
+
function ap(e, t, n) {
|
|
13393
|
+
cp.getObserver(n).unobserve(e, t);
|
|
13369
13394
|
}
|
|
13370
|
-
var
|
|
13395
|
+
var op = typeof ResizeObserver < "u", sp = {}, cp = class e {
|
|
13371
13396
|
constructor(e, t) {
|
|
13372
|
-
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;
|
|
13373
13398
|
}
|
|
13374
13399
|
observe(e, t) {
|
|
13375
13400
|
let n = this.handlersByNode.get(e);
|
|
@@ -13377,7 +13402,7 @@ var ip = typeof ResizeObserver < "u", ap = {}, op = class e {
|
|
|
13377
13402
|
}
|
|
13378
13403
|
unobserve(e, t) {
|
|
13379
13404
|
let n = this.handlersByNode.get(e);
|
|
13380
|
-
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]);
|
|
13381
13406
|
}
|
|
13382
13407
|
handle(e) {
|
|
13383
13408
|
for (let t of e) {
|
|
@@ -13396,14 +13421,14 @@ var ip = typeof ResizeObserver < "u", ap = {}, op = class e {
|
|
|
13396
13421
|
}
|
|
13397
13422
|
static getObserver({ box: t = "content-box" } = {}) {
|
|
13398
13423
|
let n = { box: t }, r = JSON.stringify(n);
|
|
13399
|
-
return
|
|
13424
|
+
return sp[r] ||= new e(r, n), sp[r];
|
|
13400
13425
|
}
|
|
13401
|
-
},
|
|
13426
|
+
}, lp = class extends Error {
|
|
13402
13427
|
constructor(e) {
|
|
13403
13428
|
super(`Request failed with status code: ${e.status} (${e.statusText})`), this.response = e;
|
|
13404
13429
|
}
|
|
13405
13430
|
};
|
|
13406
|
-
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 }) {
|
|
13407
13432
|
let c = e.isApiUrl(t), l = [o, s && AbortSignal.timeout(s)];
|
|
13408
13433
|
o = AbortSignal.any(l.filter(Boolean));
|
|
13409
13434
|
let u = await fetch(e.getApiUrl({
|
|
@@ -13419,23 +13444,23 @@ async function cp(e, { url: t, method: n = "get", query: r = null, headers: i =
|
|
|
13419
13444
|
credentials: c && e.cors?.credentials ? "include" : "same-origin",
|
|
13420
13445
|
signal: o
|
|
13421
13446
|
});
|
|
13422
|
-
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);
|
|
13423
13448
|
return u;
|
|
13424
13449
|
}
|
|
13425
|
-
function
|
|
13450
|
+
function dp(e, t) {
|
|
13426
13451
|
return !Ne(t) || t.startsWith(e.url);
|
|
13427
13452
|
}
|
|
13428
|
-
function
|
|
13429
|
-
!t.startsWith(e.url) && !Ne(t) && (t =
|
|
13430
|
-
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);
|
|
13431
13456
|
return r ? `${t}${t.includes("?") ? "&" : "?"}${r}` : t;
|
|
13432
13457
|
}
|
|
13433
|
-
function
|
|
13458
|
+
function pp(e, t) {
|
|
13434
13459
|
return `${e.replace(/\/+$/, "")}/${t.replace(/^\/+/, "")}`;
|
|
13435
13460
|
}
|
|
13436
13461
|
//#endregion
|
|
13437
13462
|
//#region src/verbs.js
|
|
13438
|
-
var
|
|
13463
|
+
var mp = [
|
|
13439
13464
|
"create",
|
|
13440
13465
|
"created",
|
|
13441
13466
|
"save",
|
|
@@ -13460,9 +13485,9 @@ var fp = [
|
|
|
13460
13485
|
"dragged",
|
|
13461
13486
|
"login",
|
|
13462
13487
|
"logged in"
|
|
13463
|
-
].reduce((e, t) => (e[t] = t, e), {}),
|
|
13488
|
+
].reduce((e, t) => (e[t] = t, e), {}), hp = class {
|
|
13464
13489
|
constructor(e, { dito: t = {}, api: n, views: r = {}, ...i } = {}) {
|
|
13465
|
-
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 ||= {};
|
|
13466
13491
|
let a = J(n.users, { type: "collection" }) || {};
|
|
13467
13492
|
a.login = J(a.login || "login", {
|
|
13468
13493
|
method: "post",
|
|
@@ -13498,14 +13523,14 @@ var fp = [
|
|
|
13498
13523
|
}, L(e) && (e = document.querySelector(e));
|
|
13499
13524
|
let s = this.app = o({
|
|
13500
13525
|
components: {
|
|
13501
|
-
DitoRoot:
|
|
13526
|
+
DitoRoot: Ho,
|
|
13502
13527
|
VueNotifications: ye,
|
|
13503
|
-
...
|
|
13504
|
-
...
|
|
13528
|
+
...Cl,
|
|
13529
|
+
...np
|
|
13505
13530
|
},
|
|
13506
13531
|
provide: {
|
|
13507
13532
|
api: n,
|
|
13508
|
-
$verbs: () =>
|
|
13533
|
+
$verbs: () => mp,
|
|
13509
13534
|
$views: () => {},
|
|
13510
13535
|
$isPopulated: () => !0,
|
|
13511
13536
|
$parentComponent: () => null,
|
|
@@ -13519,7 +13544,7 @@ var fp = [
|
|
|
13519
13544
|
$panelComponent: () => null,
|
|
13520
13545
|
$tabComponent: () => null
|
|
13521
13546
|
},
|
|
13522
|
-
render: () => g(
|
|
13547
|
+
render: () => g(Ho, {
|
|
13523
13548
|
ref: "root",
|
|
13524
13549
|
class: t.settings.rootClass,
|
|
13525
13550
|
unresolvedViews: r,
|
|
@@ -13529,7 +13554,7 @@ var fp = [
|
|
|
13529
13554
|
s.config.errorHandler = console.error, s.use(ye, {
|
|
13530
13555
|
componentName: "VueNotifications",
|
|
13531
13556
|
name: "notify"
|
|
13532
|
-
}), s.directive("resize",
|
|
13557
|
+
}), s.directive("resize", rp), s.use(_e({
|
|
13533
13558
|
routes: [{
|
|
13534
13559
|
name: "catch-all",
|
|
13535
13560
|
path: "/:_(.*)",
|
|
@@ -13545,4 +13570,4 @@ var fp = [
|
|
|
13545
13570
|
}
|
|
13546
13571
|
};
|
|
13547
13572
|
//#endregion
|
|
13548
|
-
export {
|
|
13573
|
+
export { hp as default };
|