@farris/ui-vue 1.7.2-beta.1 → 1.7.2-beta.2
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/components/avatar/index.esm.js +155 -148
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +1 -1
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +226 -224
- package/components/calendar/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +225 -223
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +76 -71
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +169 -167
- package/components/comment/index.umd.cjs +6 -6
- package/components/component/index.esm.js +3691 -3043
- package/components/component/index.umd.cjs +2 -2
- package/components/condition/index.esm.js +2015 -1352
- package/components/condition/index.umd.cjs +2 -2
- package/components/data-grid/index.esm.js +407 -430
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3082 -3196
- package/components/data-view/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +3364 -2713
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +66 -64
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1176 -524
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +182 -180
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/dynamic-view/index.esm.js +531 -455
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +2352 -1700
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +8 -3
- package/components/expression-editor/index.umd.cjs +2 -2
- package/components/filter-bar/index.esm.js +422 -413
- package/components/filter-bar/index.umd.cjs +2 -2
- package/components/filter-condition-editor/index.esm.js +8 -3
- package/components/filter-condition-editor/index.umd.cjs +1 -1
- package/components/image/index.esm.js +363 -354
- package/components/image/index.umd.cjs +2 -2
- package/components/language-textbox/index.esm.js +189 -187
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/list-view/index.esm.js +388 -389
- package/components/list-view/index.umd.cjs +5 -5
- package/components/mapping-editor/index.esm.js +1465 -1488
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +180 -173
- package/components/number-range/index.umd.cjs +1 -1
- package/components/order/index.esm.js +815 -811
- package/components/order/index.umd.cjs +5 -5
- package/components/property-panel/index.esm.js +429 -420
- package/components/property-panel/index.umd.cjs +3 -3
- package/components/query-solution/index.esm.js +4746 -4085
- package/components/query-solution/index.umd.cjs +7 -7
- package/components/schema-selector/index.esm.js +1401 -1402
- package/components/schema-selector/index.umd.cjs +5 -5
- package/components/section/index.esm.js +102 -100
- package/components/section/index.umd.cjs +2 -2
- package/components/sort-condition-editor/index.esm.js +8 -3
- package/components/sort-condition-editor/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +537 -538
- package/components/transfer/index.umd.cjs +5 -5
- package/components/tree-grid/index.esm.js +280 -283
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +200 -202
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +533 -519
- package/components/uploader/index.umd.cjs +2 -2
- package/designer/data-grid/index.esm.js +3806 -3905
- package/designer/data-grid/index.umd.cjs +9 -9
- package/designer/drawer/index.esm.js +188 -186
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dynamic-form/index.esm.js +1562 -1073
- package/designer/dynamic-form/index.umd.cjs +2 -2
- package/designer/farris-designer.all.esm.js +9793 -8613
- package/designer/farris-designer.all.umd.cjs +8 -8
- package/designer/list-view/index.esm.js +564 -564
- package/designer/list-view/index.umd.cjs +6 -6
- package/designer/radio-group/index.esm.js +236 -229
- package/designer/radio-group/index.umd.cjs +1 -1
- package/designer/response-layout-editor/index.esm.js +178 -171
- package/designer/response-layout-editor/index.umd.cjs +1 -1
- package/designer/tabs/index.esm.js +3154 -2508
- package/designer/tabs/index.umd.cjs +2 -2
- package/designer/time-picker/index.esm.js +193 -186
- package/designer/time-picker/index.umd.cjs +1 -1
- package/designer/tree-grid/index.esm.js +444 -447
- package/designer/tree-grid/index.umd.cjs +1 -1
- package/farris.all.esm.js +60126 -59649
- package/farris.all.umd.cjs +30 -30
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/components.d.ts +1 -1
- package/types/condition/src/composition/condition-value/dropdown-value.d.ts +4 -0
- package/types/data-grid/index.d.ts +2 -5
- package/types/data-grid/src/data-grid.component.d.ts +1 -2
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/appearance/use-cell-position.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +0 -4
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +2 -2
- package/types/data-view/composition/visualization/use-visual-data-bound.d.ts +2 -3
- package/types/data-view/composition/visualization/use-visual-data-row.d.ts +1 -2
- package/types/designer-canvas/src/composition/dg-control.d.ts +24 -0
- package/types/dynamic-form/designer.d.ts +0 -1
- package/types/dynamic-form/index.d.ts +4 -3
- package/types/dynamic-form/src/designer/dynamic-form.design.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form.design.props.d.ts +14 -0
- package/types/dynamic-form/src/designer/use-dynamic-form-rules.d.ts +2 -0
- package/types/dynamic-form/src/dynamic-form.component.d.ts +8 -0
- package/types/dynamic-form/src/response-form.props.d.ts +13 -1
- package/types/dynamic-form/src/schema/response-form-schema-resolver.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +1 -0
- package/types/dynamic-resolver/src/types.d.ts +1 -0
- package/types/dynamic-view/index.d.ts +43 -3
- package/types/dynamic-view/src/components/maps.d.ts +6 -6
- package/types/dynamic-view/src/composition/index.d.ts +5 -0
- package/types/dynamic-view/src/composition/use-utils.d.ts +12 -0
- package/types/dynamic-view/src/dynamic-view.component.d.ts +6 -6
- package/types/language-textbox/index.d.ts +3 -3
- package/types/language-textbox/src/components/language-contents.component.d.ts +1 -1
- package/types/language-textbox/src/language-textbox.component.d.ts +1 -1
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +1 -1
- package/types/lookup/src/components/popup-container.component.d.ts +3 -3
- package/types/property-panel/src/property-panel.component.d.ts +3 -3
- package/types/tree-grid/src/components/data/data-area.component.d.ts +2 -2
- package/types/tree-grid/src/tree-grid.props.d.ts +0 -1
- package/types/tree-view/src/components/data/tree-area.component.d.ts +1 -1
- package/types/tree-view/src/tree-view.props.d.ts +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { resolveAppearance as te, createPropsResolver as J } from "../../components/dynamic-resolver/index.esm.js";
|
|
2
2
|
import { getCustomStyle as xe, getMaxZIndex as Fe, withInstall as Pe } from "../../components/common/index.esm.js";
|
|
3
|
-
import { ref as E, computed as D, defineComponent as re, watch as _, onMounted as oe, watchEffect as $e, createVNode as
|
|
3
|
+
import { ref as E, computed as D, defineComponent as re, watch as _, onMounted as oe, watchEffect as $e, createVNode as m, Teleport as Re, Transition as Z, withModifiers as W, withDirectives as De, vShow as Ee, Fragment as ne, nextTick as Me, inject as G } from "vue";
|
|
4
4
|
import je, { responseToolbarProps as Oe } from "../../components/response-toolbar/index.esm.js";
|
|
5
5
|
import { isPlainObject as Y, cloneDeep as K } from "lodash-es";
|
|
6
6
|
import { LocaleService as ee } from "../../components/locale/index.esm.js";
|
|
7
|
-
import { UseTemplateDragAndDropRules as Ie, DgControl as Be, useDragulaCommonRule as
|
|
8
|
-
import { commonToolbarItemDesignProps as
|
|
7
|
+
import { UseTemplateDragAndDropRules as Ie, DgControl as Be, useDragulaCommonRule as Ne, setPositionOfButtonGroup as He, useDesignerComponent as Le, FDesignerInnerItem as ze, canvasChanged as Ae } from "../../components/designer-canvas/index.esm.js";
|
|
8
|
+
import { commonToolbarItemDesignProps as qe, FResponseToolbarDesign as ie, FResponseToolbarItemDesign as Ve } from "../response-toolbar/index.esm.js";
|
|
9
9
|
import { BaseControlProperty as _e } from "../../components/property-panel/index.esm.js";
|
|
10
10
|
const ae = /* @__PURE__ */ new Map([
|
|
11
11
|
["appearance", te]
|
|
@@ -236,7 +236,7 @@ function ue(e, t) {
|
|
|
236
236
|
}
|
|
237
237
|
return s;
|
|
238
238
|
}
|
|
239
|
-
function
|
|
239
|
+
function b(a) {
|
|
240
240
|
const { properties: u, title: v, required: i } = a;
|
|
241
241
|
if (i && Array.isArray(i)) {
|
|
242
242
|
const n = i.reduce((s, d) => (s[d] = u[d].type === "object" && u[d].properties ? o(u[d]) : K(u[d].default), s), {});
|
|
@@ -253,7 +253,7 @@ function ue(e, t) {
|
|
|
253
253
|
function k(a, u = {}, v) {
|
|
254
254
|
const i = e[a];
|
|
255
255
|
if (i) {
|
|
256
|
-
let n =
|
|
256
|
+
let n = b(i);
|
|
257
257
|
const s = t[a];
|
|
258
258
|
return n = s ? s({ getSchemaByType: k }, n, u, v) : n, r != null && r.appendIdentifyForNewControl && r.appendIdentifyForNewControl(n), n;
|
|
259
259
|
}
|
|
@@ -263,7 +263,7 @@ function ue(e, t) {
|
|
|
263
263
|
const v = o(u);
|
|
264
264
|
return Object.keys(v).reduce((i, n) => (Object.prototype.hasOwnProperty.call(a, n) && (i[n] && Y(i[n]) && Y(a[n] || !a[n]) ? Object.assign(i[n], a[n] || {}) : i[n] = a[n]), i), v), v;
|
|
265
265
|
}
|
|
266
|
-
function
|
|
266
|
+
function g(a, u) {
|
|
267
267
|
return Object.keys(a).filter((i) => a[i] != null).reduce((i, n) => {
|
|
268
268
|
if (u.has(n)) {
|
|
269
269
|
const s = u.get(n);
|
|
@@ -280,7 +280,7 @@ function ue(e, t) {
|
|
|
280
280
|
}
|
|
281
281
|
function x(a, u, v = /* @__PURE__ */ new Map()) {
|
|
282
282
|
const i = C(a, u);
|
|
283
|
-
return
|
|
283
|
+
return g(i, v);
|
|
284
284
|
}
|
|
285
285
|
function f(a) {
|
|
286
286
|
var v;
|
|
@@ -301,7 +301,7 @@ function ue(e, t) {
|
|
|
301
301
|
function y(a) {
|
|
302
302
|
r = a;
|
|
303
303
|
}
|
|
304
|
-
return { getSchemaByType: k, resolveSchemaWithDefaultValue: f, resolveSchemaToProps: x, mappingSchemaToProps:
|
|
304
|
+
return { getSchemaByType: k, resolveSchemaWithDefaultValue: f, resolveSchemaToProps: x, mappingSchemaToProps: g, setDesignerContext: y };
|
|
305
305
|
}
|
|
306
306
|
const de = {}, fe = {}, { resolveSchemaWithDefaultValue: et, resolveSchemaToProps: tt, mappingSchemaToProps: rt } = ue(de, fe);
|
|
307
307
|
function ot(e = {}) {
|
|
@@ -327,7 +327,7 @@ function ot(e = {}) {
|
|
|
327
327
|
["getProperty", r]
|
|
328
328
|
]);
|
|
329
329
|
Object.keys(e).reduce((f, y) => (f.set(y, e[y]), f), o);
|
|
330
|
-
function
|
|
330
|
+
function b(f, y) {
|
|
331
331
|
const a = f;
|
|
332
332
|
return typeof y == "number" ? [{ target: a, operator: "length", param: null, value: Number(y) }] : typeof y == "boolean" ? [{ target: a, operator: "getProperty", param: f, value: !!y }] : typeof y == "object" ? Object.keys(y).map((u) => {
|
|
333
333
|
if (u === "length")
|
|
@@ -338,7 +338,7 @@ function ot(e = {}) {
|
|
|
338
338
|
}
|
|
339
339
|
function k(f) {
|
|
340
340
|
return Object.keys(f).reduce((a, u) => {
|
|
341
|
-
const v =
|
|
341
|
+
const v = b(u, f[u]);
|
|
342
342
|
return a.push(...v), a;
|
|
343
343
|
}, []);
|
|
344
344
|
}
|
|
@@ -349,11 +349,11 @@ function ot(e = {}) {
|
|
|
349
349
|
}
|
|
350
350
|
return !1;
|
|
351
351
|
}
|
|
352
|
-
function
|
|
352
|
+
function g(f, y) {
|
|
353
353
|
return k(f).reduce((v, i) => v && C(i, y), !0);
|
|
354
354
|
}
|
|
355
355
|
function x(f, y) {
|
|
356
|
-
const a = Object.keys(f), u = a.includes("allOf"), v = a.includes("anyOf"), i = u || v, d = (i ? f[i ? u ? "allOf" : "anyOf" : "allOf"] : [f]).map((S) =>
|
|
356
|
+
const a = Object.keys(f), u = a.includes("allOf"), v = a.includes("anyOf"), i = u || v, d = (i ? f[i ? u ? "allOf" : "anyOf" : "allOf"] : [f]).map((S) => g(S, y));
|
|
357
357
|
return u ? !d.includes(!1) : d.includes(!0);
|
|
358
358
|
}
|
|
359
359
|
return { parseValueSchema: x };
|
|
@@ -424,12 +424,17 @@ const nt = {
|
|
|
424
424
|
"discussion-list": { type: "discussion-list", name: "评论列表" },
|
|
425
425
|
comment: { type: "comment", name: "评论区" },
|
|
426
426
|
"rich-text-editor": { type: "rich-text-editor", name: "富文本", icon: "rich-text-box" },
|
|
427
|
-
calendar: { type: "calendar", name: "日历", icon: "date-picker" }
|
|
427
|
+
calendar: { type: "calendar", name: "日历", icon: "date-picker" },
|
|
428
|
+
wizard: { type: "wizard", name: "向导", icon: "wizard" },
|
|
429
|
+
"wizard-page": { type: "wizard-page", name: "向导页", icon: "wizard" },
|
|
430
|
+
"wizard-page-detail": { type: "wizard-page-detail", name: "向导详情", icon: "wizard" },
|
|
431
|
+
step: { type: "step", name: "步骤条", icon: "step" },
|
|
432
|
+
"dynamic-form": { type: "dynamic-form", name: "动态表单" }
|
|
428
433
|
}, lt = {
|
|
429
434
|
convertFrom: (e, t, r) => {
|
|
430
|
-
var
|
|
435
|
+
var b;
|
|
431
436
|
const o = e.editor && e.editor[t] ? e.editor[t] : e[t];
|
|
432
|
-
return ((
|
|
437
|
+
return ((b = st[o]) == null ? void 0 : b.name) || o;
|
|
433
438
|
}
|
|
434
439
|
}, ct = {
|
|
435
440
|
convertTo: (e, t, r, o) => {
|
|
@@ -464,6 +469,8 @@ const nt = {
|
|
|
464
469
|
return e.formatter.customFormat;
|
|
465
470
|
if (t === "type")
|
|
466
471
|
return e.formatter.type || "none";
|
|
472
|
+
if (t === "customFormat")
|
|
473
|
+
return e.formmater.customFormat;
|
|
467
474
|
}
|
|
468
475
|
return "none";
|
|
469
476
|
}
|
|
@@ -485,38 +492,26 @@ const nt = {
|
|
|
485
492
|
]), t === "enableType" && r === "custom" && (e.command.enable = !0, e.command.commands = [
|
|
486
493
|
{
|
|
487
494
|
value: "add",
|
|
488
|
-
text:
|
|
489
|
-
en: "add",
|
|
490
|
-
"zh-CHS": "增加",
|
|
491
|
-
"zh-CHT": "增加"
|
|
492
|
-
},
|
|
495
|
+
text: "增加",
|
|
493
496
|
type: "link"
|
|
494
497
|
},
|
|
495
498
|
{
|
|
496
499
|
value: "edit",
|
|
497
|
-
text:
|
|
498
|
-
en: "edit",
|
|
499
|
-
"zh-CHS": "编辑",
|
|
500
|
-
"zh-CHT": "編輯"
|
|
501
|
-
},
|
|
500
|
+
text: "编辑",
|
|
502
501
|
type: "danger"
|
|
503
502
|
},
|
|
504
503
|
{
|
|
505
504
|
value: "remove",
|
|
506
|
-
text:
|
|
507
|
-
en: "remove",
|
|
508
|
-
"zh-CHS": "删除",
|
|
509
|
-
"zh-CHT": "刪除"
|
|
510
|
-
},
|
|
505
|
+
text: "删除",
|
|
511
506
|
type: "remove"
|
|
512
507
|
}
|
|
513
508
|
]), t === "enableType" && r === "unable" && (e.command.enable = !1);
|
|
514
509
|
},
|
|
515
510
|
convertFrom: (e, t, r) => {
|
|
516
|
-
var o,
|
|
511
|
+
var o, b;
|
|
517
512
|
if (e.command) {
|
|
518
513
|
if (t === "enableType") {
|
|
519
|
-
const k = (
|
|
514
|
+
const k = (b = (o = e.command) == null ? void 0 : o.commands) == null ? void 0 : b.find((C) => C.command === "edit" && C.type === "primary");
|
|
520
515
|
return e.command.enable ? k ? "default" : "custom" : "unable";
|
|
521
516
|
}
|
|
522
517
|
if (t === "commands")
|
|
@@ -525,6 +520,8 @@ const nt = {
|
|
|
525
520
|
return e.command.formatter;
|
|
526
521
|
if (t === "count")
|
|
527
522
|
return e.command.count;
|
|
523
|
+
if (t === "columnWidth")
|
|
524
|
+
return e.command.columnWidth || 150;
|
|
528
525
|
}
|
|
529
526
|
return "";
|
|
530
527
|
}
|
|
@@ -543,7 +540,7 @@ const nt = {
|
|
|
543
540
|
}
|
|
544
541
|
return "";
|
|
545
542
|
}
|
|
546
|
-
},
|
|
543
|
+
}, mt = {
|
|
547
544
|
convertTo: (e, t, r, o) => {
|
|
548
545
|
e.summary ? e.summary[t] = r : e.summary = {
|
|
549
546
|
[t]: r
|
|
@@ -552,8 +549,11 @@ const nt = {
|
|
|
552
549
|
groupFields: []
|
|
553
550
|
});
|
|
554
551
|
},
|
|
555
|
-
convertFrom: (e, t, r) =>
|
|
556
|
-
|
|
552
|
+
convertFrom: (e, t, r) => {
|
|
553
|
+
var o;
|
|
554
|
+
return t === "customSummaryStyle" ? e.summary.customSummaryStyle : t === "position" ? ((o = e.summary) == null ? void 0 : o[t]) || "bottom" : e.summary && t === "enable" ? e.summary.enable : e.type === "data-grid-column" ? e.enableSummary === void 0 ? !1 : e.enableSummary : "";
|
|
555
|
+
}
|
|
556
|
+
}, pt = {
|
|
557
557
|
convertTo: (e, t, r, o) => {
|
|
558
558
|
e.group ? e.group[t] = r : e.group = {
|
|
559
559
|
[t]: r
|
|
@@ -571,7 +571,7 @@ const nt = {
|
|
|
571
571
|
return e.group.showSummary;
|
|
572
572
|
}
|
|
573
573
|
}
|
|
574
|
-
},
|
|
574
|
+
}, gt = {
|
|
575
575
|
convertFrom: (e, t) => e.binding ? e.binding.path : "",
|
|
576
576
|
convertTo: (e, t, r) => {
|
|
577
577
|
if (r && r.length > 0) {
|
|
@@ -579,11 +579,11 @@ const nt = {
|
|
|
579
579
|
e.binding || (e.binding = {}), e.binding.type = "Form", e.binding.path = o.bindingField, e.binding.field = o.id, e.binding.fullPath = o.path, e.path = o.bindingPath;
|
|
580
580
|
}
|
|
581
581
|
}
|
|
582
|
-
},
|
|
582
|
+
}, bt = {
|
|
583
583
|
convertTo: (e, t, r, o) => {
|
|
584
|
-
e.pagination || (e.pagination = {}), e.pagination[t] = r;
|
|
584
|
+
e.pagination || (e.pagination = {}), t === "sizeLimits" ? e.pagination.sizeLimits = r.split(",") : e.pagination[t] = r;
|
|
585
585
|
},
|
|
586
|
-
convertFrom: (e, t, r) => e.pagination ? e.pagination[t] : e[t]
|
|
586
|
+
convertFrom: (e, t, r) => e.pagination ? t === "sizeLimits" ? e.pagination.sizeLimits.join(",") : e.pagination[t] : e[t]
|
|
587
587
|
}, vt = {
|
|
588
588
|
convertTo: (e, t, r, o) => {
|
|
589
589
|
e.rowNumber || (e.rowNumber = {}), e.rowNumber[t] = r;
|
|
@@ -594,8 +594,8 @@ const nt = {
|
|
|
594
594
|
e.selection || (e.selection = {}), e.selection[t] = r;
|
|
595
595
|
},
|
|
596
596
|
convertFrom: (e, t, r) => {
|
|
597
|
-
var o,
|
|
598
|
-
return t === "showCheckbox" ? (o = e.selection) != null && o.multiSelect ? !0 : (
|
|
597
|
+
var o, b;
|
|
598
|
+
return t === "showCheckbox" ? (o = e.selection) != null && o.multiSelect ? !0 : (b = e.selection) == null ? void 0 : b.showCheckbox : e.selection ? e.selection[t] : e[t];
|
|
599
599
|
}
|
|
600
600
|
}, ht = {
|
|
601
601
|
convertFrom: (e, t, r) => e[t] && e[t].length ? `共 ${e[t].length} 项` : ""
|
|
@@ -611,19 +611,19 @@ const nt = {
|
|
|
611
611
|
convertFrom: (e, t, r) => e.size ? e.size[t] : e[t]
|
|
612
612
|
}, Tt = {
|
|
613
613
|
convertFrom: (e, t, r) => {
|
|
614
|
-
var o,
|
|
615
|
-
return (o = e.formatter) != null && o.data && t === "formatterEnumData" && !e.formatterEnumData ? (
|
|
614
|
+
var o, b;
|
|
615
|
+
return (o = e.formatter) != null && o.data && t === "formatterEnumData" && !e.formatterEnumData ? (b = e.formatter) == null ? void 0 : b.data : e.formatterEnumData;
|
|
616
616
|
}
|
|
617
617
|
}, kt = {
|
|
618
618
|
convertTo: (e, t, r, o) => {
|
|
619
619
|
e.sort || (e.sort = {}), e.sort[t] = r;
|
|
620
620
|
},
|
|
621
621
|
convertFrom: (e, t, r) => {
|
|
622
|
-
var o,
|
|
622
|
+
var o, b;
|
|
623
623
|
if (t === "mode")
|
|
624
624
|
return ((o = e.sort) == null ? void 0 : o.mode) || "client";
|
|
625
625
|
if (t === "multiSort")
|
|
626
|
-
return !!((
|
|
626
|
+
return !!((b = e.sort) != null && b.multiSort);
|
|
627
627
|
}
|
|
628
628
|
}, St = {
|
|
629
629
|
convertTo: (e, t, r, o) => {
|
|
@@ -646,6 +646,8 @@ const nt = {
|
|
|
646
646
|
return e.rowOption.customRowStyle;
|
|
647
647
|
if (t === "customCellStyle")
|
|
648
648
|
return e.rowOption.customCellStyle;
|
|
649
|
+
if (t === "height")
|
|
650
|
+
return e.rowOption.height;
|
|
649
651
|
}
|
|
650
652
|
return "";
|
|
651
653
|
}
|
|
@@ -662,7 +664,7 @@ const nt = {
|
|
|
662
664
|
},
|
|
663
665
|
convertFrom: (e, t, r) => t === "columnTemplate" ? e.columnTemplate : t === "columnTemplateType" ? e.columnTemplateType ? e.columnTemplateType || "default" : e.columnTemplate && !e.onClickLinkCommand ? "custom" : e.columnTemplate && e.onClickLinkCommand ? "hyperlink" : "default" : ""
|
|
664
666
|
};
|
|
665
|
-
function
|
|
667
|
+
function me(e, t, r) {
|
|
666
668
|
const o = /* @__PURE__ */ new Map([
|
|
667
669
|
["/converter/appearance.converter", nt],
|
|
668
670
|
["/converter/buttons.converter", it],
|
|
@@ -673,11 +675,11 @@ function pe(e, t, r) {
|
|
|
673
675
|
["/converter/change-formatter.converter", ut],
|
|
674
676
|
["/converter/column-command.converter", dt],
|
|
675
677
|
["/converter/column-option.converter", ft],
|
|
676
|
-
["/converter/summary.converter",
|
|
677
|
-
["/converter/group.converter",
|
|
678
|
+
["/converter/summary.converter", mt],
|
|
679
|
+
["/converter/group.converter", pt],
|
|
678
680
|
["/converter/form-group-label.converter", wt],
|
|
679
|
-
["/converter/field-selector.converter",
|
|
680
|
-
["/converter/pagination.converter",
|
|
681
|
+
["/converter/field-selector.converter", gt],
|
|
682
|
+
["/converter/pagination.converter", bt],
|
|
681
683
|
["/converter/row-number.converter", vt],
|
|
682
684
|
["/converter/grid-selection.converter", yt],
|
|
683
685
|
["/converter/size.converter", Ct],
|
|
@@ -686,7 +688,7 @@ function pe(e, t, r) {
|
|
|
686
688
|
["/converter/grid-filter.converter", St],
|
|
687
689
|
["/converter/row-option.converter", xt],
|
|
688
690
|
["/converter/change-formatter-type.converter", Ft]
|
|
689
|
-
]),
|
|
691
|
+
]), b = /* @__PURE__ */ new Map([
|
|
690
692
|
["string", { type: "input-group", enableClear: !1 }],
|
|
691
693
|
["boolean", {
|
|
692
694
|
type: "combo-list",
|
|
@@ -714,7 +716,7 @@ function pe(e, t, r) {
|
|
|
714
716
|
function C(i, n) {
|
|
715
717
|
return () => k.parseValueSchema(i, n);
|
|
716
718
|
}
|
|
717
|
-
function
|
|
719
|
+
function g(i, n, s) {
|
|
718
720
|
return i.includes("visible") && n.visible !== void 0 ? typeof n.visible == "boolean" ? () => !!n.visible : n.visible === void 0 ? !0 : C(n.visible, s) : () => !0;
|
|
719
721
|
}
|
|
720
722
|
function x(i, n, s) {
|
|
@@ -726,24 +728,24 @@ function pe(e, t, r) {
|
|
|
726
728
|
}
|
|
727
729
|
function y(i, n, s, d, h, S = "", R = "") {
|
|
728
730
|
return Object.keys(i).map((T) => {
|
|
729
|
-
const M = E(1), l = T, c = i[T],
|
|
730
|
-
j.readonly = j.readonly === void 0 ?
|
|
731
|
-
const
|
|
731
|
+
const M = E(1), l = T, c = i[T], p = Object.keys(c), O = c.title, F = c.type, B = b.get(F) || { type: "input-group", enableClear: !1 }, j = c.editor ? Object.assign({}, B, c.editor) : Object.assign({}, B), z = g(p, c, n), L = x(p, c, n);
|
|
732
|
+
j.readonly = j.readonly === void 0 ? L() : j.readonly;
|
|
733
|
+
const A = c.type === "cascade" ? y(c.properties, n, s, d, h, S, R) : [], q = !0;
|
|
732
734
|
let w = f(c, R);
|
|
733
735
|
const $ = D({
|
|
734
736
|
get() {
|
|
735
737
|
if (M.value) {
|
|
736
738
|
if (["class", "style"].find((Se) => Se === l) && !w && (w = o.get("/converter/appearance.converter") || null), w && w.convertFrom)
|
|
737
739
|
return w.convertFrom(s, T, h, S);
|
|
738
|
-
const
|
|
739
|
-
return Object.prototype.hasOwnProperty.call(c, "defaultValue") && (
|
|
740
|
+
const H = s[T];
|
|
741
|
+
return Object.prototype.hasOwnProperty.call(c, "defaultValue") && (H === void 0 || typeof H == "string" && H === "") ? c.type === "boolean" ? c.defaultValue : c.defaultValue || "" : H;
|
|
740
742
|
}
|
|
741
743
|
return null;
|
|
742
744
|
},
|
|
743
|
-
set(
|
|
744
|
-
M.value += 1, w && w.convertTo ? (w.convertTo(d, T,
|
|
745
|
+
set(H) {
|
|
746
|
+
M.value += 1, w && w.convertTo ? (w.convertTo(d, T, H, h, S), w.convertTo(s, T, H, h, S)) : (d[T] = H, s[T] = H);
|
|
745
747
|
}
|
|
746
|
-
}), { refreshPanelAfterChanged:
|
|
748
|
+
}), { refreshPanelAfterChanged: N, description: I, isExpand: Te, parentPropertyID: ke } = c, X = { propertyID: l, propertyName: O, propertyType: F, propertyValue: $, editor: j, visible: z, readonly: L, cascadeConfig: A, hideCascadeTitle: q, refreshPanelAfterChanged: N, description: I, isExpand: Te, parentPropertyID: ke };
|
|
747
749
|
return n[l] = X, X;
|
|
748
750
|
});
|
|
749
751
|
}
|
|
@@ -757,11 +759,11 @@ function pe(e, t, r) {
|
|
|
757
759
|
function u(i, n, s, d, h = "") {
|
|
758
760
|
const S = n.$ref.schema, R = n.$ref.converter, P = s[S], T = P.type, M = r(P), l = {}, c = e[T];
|
|
759
761
|
if (c && c.categories) {
|
|
760
|
-
const
|
|
761
|
-
R && Object.keys(
|
|
762
|
-
|
|
762
|
+
const p = c.categories[i], O = p == null ? void 0 : p.title;
|
|
763
|
+
R && Object.keys(p.properties).forEach((j) => {
|
|
764
|
+
p.properties[j].$converter = R;
|
|
763
765
|
});
|
|
764
|
-
const F = (
|
|
766
|
+
const F = (p == null ? void 0 : p.properties) || {}, B = y(F, l, M, P, d, h);
|
|
765
767
|
return { categoryId: i, categoryName: O, properties: B };
|
|
766
768
|
}
|
|
767
769
|
return { categoryId: i, categoryName: "", properties: [] };
|
|
@@ -772,13 +774,13 @@ function pe(e, t, r) {
|
|
|
772
774
|
if (!(T && Object.keys(T).length > 0) && s && s.getPropConfig && (T = s.getPropConfig(d)), T && T.categories) {
|
|
773
775
|
const l = [];
|
|
774
776
|
return Object.keys(T.categories).map((c) => {
|
|
775
|
-
const
|
|
776
|
-
if (
|
|
777
|
-
l.push(u(c,
|
|
777
|
+
const p = T.categories[c];
|
|
778
|
+
if (p.$ref) {
|
|
779
|
+
l.push(u(c, p, i, n, d));
|
|
778
780
|
return;
|
|
779
781
|
}
|
|
780
|
-
const O =
|
|
781
|
-
l.push({ categoryId: c, categoryName: O, tabId: F, tabName: B, hide: j, properties:
|
|
782
|
+
const O = p == null ? void 0 : p.title, F = p == null ? void 0 : p.tabId, B = p == null ? void 0 : p.tabName, j = p == null ? void 0 : p.hide, z = p == null ? void 0 : p.hideTitle, L = y(p.properties || {}, P, R, i, n, d, p.$converter), { setPropertyRelates: A } = p, q = p == null ? void 0 : p.parentPropertyID;
|
|
783
|
+
l.push({ categoryId: c, categoryName: O, tabId: F, tabName: B, hide: j, properties: L, hideTitle: z, setPropertyRelates: A, parentPropertyID: q });
|
|
782
784
|
}), l;
|
|
783
785
|
}
|
|
784
786
|
return [];
|
|
@@ -789,13 +791,13 @@ function pe(e, t, r) {
|
|
|
789
791
|
propertyConverterMap: o
|
|
790
792
|
};
|
|
791
793
|
}
|
|
792
|
-
const
|
|
793
|
-
pe
|
|
794
|
-
const
|
|
795
|
-
|
|
796
|
-
function $t(e, t, r = /* @__PURE__ */ new Map(), o = (C,
|
|
797
|
-
return de[t.title] = t, fe[t.title] = o,
|
|
798
|
-
if (!
|
|
794
|
+
const pe = {}, ge = {};
|
|
795
|
+
me(pe, ge, et);
|
|
796
|
+
const be = {}, ve = {}, { resolveSchemaWithDefaultValue: Pt } = ue(be, ve), ye = {}, he = {};
|
|
797
|
+
me(ye, he, Pt);
|
|
798
|
+
function $t(e, t, r = /* @__PURE__ */ new Map(), o = (C, g, x, f) => g, b = {}, k = (C) => C) {
|
|
799
|
+
return de[t.title] = t, fe[t.title] = o, pe[t.title] = b, ge[t.title] = k, be[t.title] = t, ve[t.title] = o, ye[t.title] = b, he[t.title] = k, (C = {}, g = !0) => {
|
|
800
|
+
if (!g)
|
|
799
801
|
return rt(C, r);
|
|
800
802
|
const x = tt(C, t, r), f = Object.keys(e).reduce((y, a) => (y[a] = e[a].default, y), {});
|
|
801
803
|
return Object.assign(f, x);
|
|
@@ -808,7 +810,7 @@ function Rt(e, t) {
|
|
|
808
810
|
if (r.id === t)
|
|
809
811
|
return r;
|
|
810
812
|
if (r.children) {
|
|
811
|
-
const o = r.children.find((
|
|
813
|
+
const o = r.children.find((b) => b.id === t);
|
|
812
814
|
if (o)
|
|
813
815
|
return o;
|
|
814
816
|
}
|
|
@@ -817,10 +819,10 @@ function Rt(e, t) {
|
|
|
817
819
|
}
|
|
818
820
|
function Dt() {
|
|
819
821
|
function e(t, r) {
|
|
820
|
-
const { footerToolbar: o, headerToolbar:
|
|
822
|
+
const { footerToolbar: o, headerToolbar: b } = t, k = ((o == null ? void 0 : o.buttons) || []).concat((b == null ? void 0 : b.buttons) || []);
|
|
821
823
|
if (!k || k.length < 1)
|
|
822
824
|
return null;
|
|
823
|
-
const [C,
|
|
825
|
+
const [C, g] = r.payloads, x = Rt(k, g);
|
|
824
826
|
return x ? x.onClick || x.click : null;
|
|
825
827
|
}
|
|
826
828
|
return {
|
|
@@ -895,13 +897,13 @@ const jt = /* @__PURE__ */ re({
|
|
|
895
897
|
emits: ["afterClose", "update:modelValue", "click"],
|
|
896
898
|
setup(e, t) {
|
|
897
899
|
Mt();
|
|
898
|
-
const r = E(e.modelValue), o = E(e.buttons),
|
|
900
|
+
const r = E(e.modelValue), o = E(e.buttons), b = E(!1), k = D(() => ({
|
|
899
901
|
"f-utils-absolute-all f-drawer": !0,
|
|
900
902
|
// 在某个DOM内部打开抽屉
|
|
901
903
|
"f-drawer-inline": typeof e.host == "string" ? e.host !== "body" : document.querySelector(e.host) !== document.body
|
|
902
904
|
})), C = D(() => ({
|
|
903
905
|
opacity: e.transparent ? 0 : 1
|
|
904
|
-
})),
|
|
906
|
+
})), g = D(() => {
|
|
905
907
|
const l = {};
|
|
906
908
|
return e.maskClass && e.maskClass.split(" ").forEach((c) => {
|
|
907
909
|
l[c] = !0;
|
|
@@ -968,23 +970,23 @@ const jt = /* @__PURE__ */ re({
|
|
|
968
970
|
async function s(l, c) {
|
|
969
971
|
l.handle && await l.handle(c, n) && t.emit("closed", c);
|
|
970
972
|
}
|
|
971
|
-
const d = (l, c) =>
|
|
973
|
+
const d = (l, c) => m(je, {
|
|
972
974
|
class: c,
|
|
973
975
|
alignment: "right",
|
|
974
976
|
items: l,
|
|
975
977
|
onClick: i
|
|
976
978
|
}, null);
|
|
977
979
|
function h() {
|
|
978
|
-
var l, c,
|
|
980
|
+
var l, c, p, O;
|
|
979
981
|
if ((c = (l = e.footerToolbar) == null ? void 0 : l.buttons) != null && c.length && (e.footerToolbar.visible === void 0 || e.footerToolbar.visible)) {
|
|
980
982
|
const F = {
|
|
981
983
|
"f-utils-fill": !0
|
|
982
984
|
};
|
|
983
|
-
return (O = (
|
|
985
|
+
return (O = (p = e.footerToolbar) == null ? void 0 : p.appearance) != null && O.class && (F[e.footerToolbar.appearance.class] = !0), d(e.footerToolbar.buttons, F);
|
|
984
986
|
}
|
|
985
987
|
return o.value && !!o.value.length && o.value.map((F) => {
|
|
986
988
|
const B = E(F.disabled);
|
|
987
|
-
return
|
|
989
|
+
return m("button", {
|
|
988
990
|
id: F.id,
|
|
989
991
|
type: "button",
|
|
990
992
|
disabled: B.value,
|
|
@@ -992,7 +994,7 @@ const jt = /* @__PURE__ */ re({
|
|
|
992
994
|
onClick: (j) => {
|
|
993
995
|
s(F, j);
|
|
994
996
|
}
|
|
995
|
-
}, [!!F.iconClass &&
|
|
997
|
+
}, [!!F.iconClass && m("i", {
|
|
996
998
|
class: F.iconClass
|
|
997
999
|
}, null), F.text]);
|
|
998
1000
|
});
|
|
@@ -1001,18 +1003,18 @@ const jt = /* @__PURE__ */ re({
|
|
|
1001
1003
|
return e.footerTemplate && typeof e.footerTemplate == "function" ? e.footerTemplate() : t.slots.footerTemplate ? t.slots.footerTemplate() : h();
|
|
1002
1004
|
}
|
|
1003
1005
|
function R() {
|
|
1004
|
-
var c,
|
|
1006
|
+
var c, p;
|
|
1005
1007
|
const l = {
|
|
1006
1008
|
"f-utils-fill": !0
|
|
1007
1009
|
};
|
|
1008
|
-
return (
|
|
1010
|
+
return (p = (c = e.headerToolbar) == null ? void 0 : c.appearance) != null && p.class && (l[e.headerToolbar.appearance.class] = !0), e.headerTemplate && typeof e.headerTemplate == "function" ? e.headerTemplate() : t.slots.headerTemplate ? t.slots.headerTemplate() : m(ne, null, [m("div", {
|
|
1009
1011
|
class: "f-drawer-title",
|
|
1010
1012
|
title: e.title
|
|
1011
|
-
}, [e.title]), e.headerToolbar && (e.headerToolbar.visible === void 0 || e.headerToolbar.visible) &&
|
|
1013
|
+
}, [e.title]), e.headerToolbar && (e.headerToolbar.visible === void 0 || e.headerToolbar.visible) && m("div", {
|
|
1012
1014
|
class: "f-utils-fill-flex-row mx-2 col-7"
|
|
1013
|
-
}, [d(e.headerToolbar.buttons || [], l)]), e.showClose &&
|
|
1015
|
+
}, [d(e.headerToolbar.buttons || [], l)]), e.showClose && m("div", {
|
|
1014
1016
|
class: "f-drawer-close"
|
|
1015
|
-
}, [
|
|
1017
|
+
}, [m("span", {
|
|
1016
1018
|
class: "f-icon f-icon-close",
|
|
1017
1019
|
onClick: W((O) => {
|
|
1018
1020
|
v();
|
|
@@ -1027,10 +1029,10 @@ const jt = /* @__PURE__ */ re({
|
|
|
1027
1029
|
};
|
|
1028
1030
|
}
|
|
1029
1031
|
function M() {
|
|
1030
|
-
return
|
|
1032
|
+
return b.value ? !0 : typeof e.host == "string" ? e.host === "body" ? !0 : !!document.querySelector(e.host) : !!e.host;
|
|
1031
1033
|
}
|
|
1032
|
-
return
|
|
1033
|
-
|
|
1034
|
+
return b.value = M(), oe(() => {
|
|
1035
|
+
b.value = M();
|
|
1034
1036
|
}), $e(() => {
|
|
1035
1037
|
r.value && T();
|
|
1036
1038
|
}), t.expose({
|
|
@@ -1040,40 +1042,40 @@ const jt = /* @__PURE__ */ re({
|
|
|
1040
1042
|
close: () => {
|
|
1041
1043
|
v();
|
|
1042
1044
|
}
|
|
1043
|
-
}), () =>
|
|
1045
|
+
}), () => b.value ? m(Re, {
|
|
1044
1046
|
to: e.host
|
|
1045
1047
|
}, {
|
|
1046
|
-
default: () => [
|
|
1048
|
+
default: () => [m("div", {
|
|
1047
1049
|
class: k.value,
|
|
1048
1050
|
id: e.id,
|
|
1049
1051
|
style: P.value
|
|
1050
|
-
}, [
|
|
1052
|
+
}, [m(Z, {
|
|
1051
1053
|
name: "f-drawer-mask",
|
|
1052
1054
|
appear: !0
|
|
1053
1055
|
}, {
|
|
1054
|
-
default: () => [r.value &&
|
|
1055
|
-
class:
|
|
1056
|
+
default: () => [r.value && m("div", {
|
|
1057
|
+
class: g.value,
|
|
1056
1058
|
style: C.value,
|
|
1057
1059
|
onClick: W((l) => {
|
|
1058
1060
|
e.allowClickMaskToClose && v();
|
|
1059
1061
|
}, ["stop"])
|
|
1060
1062
|
}, null)]
|
|
1061
|
-
}),
|
|
1063
|
+
}), m(Z, {
|
|
1062
1064
|
name: u.value
|
|
1063
1065
|
}, {
|
|
1064
1066
|
default: () => {
|
|
1065
1067
|
var l, c;
|
|
1066
|
-
return [De(
|
|
1068
|
+
return [De(m("div", {
|
|
1067
1069
|
class: x.value,
|
|
1068
1070
|
style: a.value
|
|
1069
|
-
}, [
|
|
1071
|
+
}, [m("div", {
|
|
1070
1072
|
class: "f-drawer-container"
|
|
1071
|
-
}, [e.showHeader &&
|
|
1073
|
+
}, [e.showHeader && m("div", {
|
|
1072
1074
|
class: "f-drawer-header align-items-center"
|
|
1073
|
-
}, [R()]),
|
|
1075
|
+
}, [R()]), m("div", {
|
|
1074
1076
|
class: "f-drawer-body f-utils-fill",
|
|
1075
1077
|
style: "overflow: auto;"
|
|
1076
|
-
}, [(c = (l = t.slots).default) == null ? void 0 : c.call(l)]), e.showFooter &&
|
|
1078
|
+
}, [(c = (l = t.slots).default) == null ? void 0 : c.call(l)]), e.showFooter && m("div", {
|
|
1077
1079
|
class: "f-drawer-footer px-2",
|
|
1078
1080
|
style: {
|
|
1079
1081
|
height: e.footerHeight + "px"
|
|
@@ -1273,28 +1275,28 @@ class Ot extends _e {
|
|
|
1273
1275
|
label: "beforeClose",
|
|
1274
1276
|
name: "关闭前事件"
|
|
1275
1277
|
}
|
|
1276
|
-
],
|
|
1278
|
+
], b = r.eventsEditorUtils.formProperties(t, r.viewModelId, o);
|
|
1277
1279
|
return {
|
|
1278
1280
|
title: "事件",
|
|
1279
1281
|
hideTitle: !0,
|
|
1280
|
-
properties: r.createBaseEventProperty(
|
|
1282
|
+
properties: r.createBaseEventProperty(b),
|
|
1281
1283
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
1282
1284
|
refreshPanelAfterChanged: !0,
|
|
1283
1285
|
tabId: "commands",
|
|
1284
1286
|
tabName: "交互",
|
|
1285
|
-
setPropertyRelates(C,
|
|
1287
|
+
setPropertyRelates(C, g) {
|
|
1286
1288
|
const x = C.propertyValue;
|
|
1287
|
-
delete
|
|
1289
|
+
delete g[r.viewModelId], x && r.eventsEditorUtils.saveRelatedParameters(g, r.viewModelId, x.events, x);
|
|
1288
1290
|
const f = r.designViewModelUtils.getDgViewModel(r.viewModelId);
|
|
1289
|
-
f && r.designViewModelField && f.changeField(r.designViewModelField.id, { valueChanging:
|
|
1291
|
+
f && r.designViewModelField && f.changeField(r.designViewModelField.id, { valueChanging: g.fieldValueChanging, valueChanged: g.fieldValueChanged });
|
|
1290
1292
|
}
|
|
1291
1293
|
};
|
|
1292
1294
|
}
|
|
1293
1295
|
}
|
|
1294
1296
|
function It(e, t, r) {
|
|
1295
1297
|
const o = new Ie();
|
|
1296
|
-
function
|
|
1297
|
-
if (!
|
|
1298
|
+
function b(n) {
|
|
1299
|
+
if (!Ne().basalDragulaRuleForContainer(n, r))
|
|
1298
1300
|
return !1;
|
|
1299
1301
|
const { canAccept: d } = o.getTemplateRule(e, r);
|
|
1300
1302
|
return d;
|
|
@@ -1305,7 +1307,7 @@ function It(e, t, r) {
|
|
|
1305
1307
|
function C() {
|
|
1306
1308
|
return !1;
|
|
1307
1309
|
}
|
|
1308
|
-
function
|
|
1310
|
+
function g() {
|
|
1309
1311
|
return !0;
|
|
1310
1312
|
}
|
|
1311
1313
|
function x() {
|
|
@@ -1320,7 +1322,7 @@ function It(e, t, r) {
|
|
|
1320
1322
|
}
|
|
1321
1323
|
function a() {
|
|
1322
1324
|
e.designerItemElementRef.value && Me(() => {
|
|
1323
|
-
|
|
1325
|
+
He(t.value);
|
|
1324
1326
|
});
|
|
1325
1327
|
}
|
|
1326
1328
|
function u(n) {
|
|
@@ -1354,10 +1356,10 @@ function It(e, t, r) {
|
|
|
1354
1356
|
}
|
|
1355
1357
|
}
|
|
1356
1358
|
return {
|
|
1357
|
-
canAccepts:
|
|
1359
|
+
canAccepts: b,
|
|
1358
1360
|
checkCanDeleteComponent: k,
|
|
1359
1361
|
checkCanMoveComponent: C,
|
|
1360
|
-
hideNestedPaddingInDesginerView:
|
|
1362
|
+
hideNestedPaddingInDesginerView: g,
|
|
1361
1363
|
getStyles: x,
|
|
1362
1364
|
getPropsConfig: f,
|
|
1363
1365
|
getDraggableDesignItemElement: y,
|
|
@@ -1370,7 +1372,7 @@ const we = Object.assign({}, Q, {
|
|
|
1370
1372
|
footerContentType: { type: String, default: "toolbar" },
|
|
1371
1373
|
customHeader: { type: Boolean, default: !1 },
|
|
1372
1374
|
showWrapperInCanvas: { type: Boolean, default: !1 }
|
|
1373
|
-
}), Bt = "https://json-schema.org/draft/2020-12/schema",
|
|
1375
|
+
}), Bt = "https://json-schema.org/draft/2020-12/schema", Nt = "https://farris-design.gitee.io/section-toolbar-item.schema.json", Ht = "drawer-toolbar-item", Lt = "A Farris Toolbar Item Component", zt = "object", At = {
|
|
1374
1376
|
id: {
|
|
1375
1377
|
description: "The unique identifier for a Response Toolbar",
|
|
1376
1378
|
type: "string"
|
|
@@ -1438,21 +1440,21 @@ const we = Object.assign({}, Q, {
|
|
|
1438
1440
|
type: "boolean",
|
|
1439
1441
|
default: !1
|
|
1440
1442
|
}
|
|
1441
|
-
},
|
|
1443
|
+
}, qt = [
|
|
1442
1444
|
"id",
|
|
1443
1445
|
"type",
|
|
1444
1446
|
"text"
|
|
1445
|
-
],
|
|
1447
|
+
], Vt = {
|
|
1446
1448
|
onClick: "点击事件"
|
|
1447
1449
|
}, _t = {
|
|
1448
1450
|
$schema: Bt,
|
|
1449
|
-
$id:
|
|
1450
|
-
title:
|
|
1451
|
-
description:
|
|
1452
|
-
type:
|
|
1453
|
-
properties:
|
|
1454
|
-
required:
|
|
1455
|
-
events:
|
|
1451
|
+
$id: Nt,
|
|
1452
|
+
title: Ht,
|
|
1453
|
+
description: Lt,
|
|
1454
|
+
type: zt,
|
|
1455
|
+
properties: At,
|
|
1456
|
+
required: qt,
|
|
1457
|
+
events: Vt
|
|
1456
1458
|
}, Wt = "https://json-schema.org/draft/2020-12/schema", Ut = "https://farris-design.gitee.io/section-toolbar.schema.json", Gt = "drawer-toolbar", Zt = "A Farris Toolbar Component", Jt = "object", Qt = {
|
|
1457
1459
|
id: {
|
|
1458
1460
|
description: "The unique identifier for a Section Toolbar",
|
|
@@ -1507,9 +1509,9 @@ const we = Object.assign({}, Q, {
|
|
|
1507
1509
|
properties: Qt,
|
|
1508
1510
|
required: Xt,
|
|
1509
1511
|
events: Yt
|
|
1510
|
-
}, er = Object.assign({},
|
|
1512
|
+
}, er = Object.assign({}, qe), tr = J(er, _t, void 0, ce), rr = Object.assign({}, Oe, {
|
|
1511
1513
|
componentId: { type: String, default: "" }
|
|
1512
|
-
}),
|
|
1514
|
+
}), V = J(
|
|
1513
1515
|
rr,
|
|
1514
1516
|
Kt,
|
|
1515
1517
|
We,
|
|
@@ -1518,27 +1520,27 @@ const we = Object.assign({}, Q, {
|
|
|
1518
1520
|
name: "FDrawerDesign",
|
|
1519
1521
|
props: we,
|
|
1520
1522
|
setup(e, t) {
|
|
1521
|
-
const r = E(), o = E(),
|
|
1522
|
-
|
|
1523
|
-
id:
|
|
1523
|
+
const r = E(), o = E(), b = e.id + "_footer-toolbar", k = e.id + "_header-toolbar", C = G("designer-host-service"), g = G("design-item-context"), x = It(g, o, C), f = Le(r, g, x);
|
|
1524
|
+
g.schema.footerToolbar = g.schema.footerToolbar || {
|
|
1525
|
+
id: b,
|
|
1524
1526
|
type: "drawer-toolbar",
|
|
1525
1527
|
buttons: []
|
|
1526
1528
|
};
|
|
1527
|
-
const y = E(
|
|
1528
|
-
_(() =>
|
|
1529
|
-
y.value =
|
|
1529
|
+
const y = E(g.schema.footerToolbar), a = E(V(y.value));
|
|
1530
|
+
_(() => g.schema.footerToolbar, () => {
|
|
1531
|
+
y.value = g.schema.footerToolbar, a.value = V(y.value);
|
|
1530
1532
|
}, {
|
|
1531
1533
|
deep: !0
|
|
1532
1534
|
});
|
|
1533
1535
|
const u = G("design-item-context"), v = D(() => [...a.value.items]);
|
|
1534
|
-
|
|
1536
|
+
g.schema.headerToolbar = g.schema.headerToolbar || {
|
|
1535
1537
|
id: k,
|
|
1536
1538
|
type: "drawer-toolbar",
|
|
1537
1539
|
buttons: []
|
|
1538
1540
|
};
|
|
1539
|
-
const i = E(
|
|
1540
|
-
_(() =>
|
|
1541
|
-
i.value =
|
|
1541
|
+
const i = E(g.schema.headerToolbar), n = E(V(i.value));
|
|
1542
|
+
_(() => g.schema.headerToolbar, () => {
|
|
1543
|
+
i.value = g.schema.headerToolbar, n.value = V(i.value);
|
|
1542
1544
|
}, {
|
|
1543
1545
|
deep: !0
|
|
1544
1546
|
});
|
|
@@ -1546,7 +1548,7 @@ const we = Object.assign({}, Q, {
|
|
|
1546
1548
|
oe(() => {
|
|
1547
1549
|
r.value.componentInstance = f;
|
|
1548
1550
|
}), t.expose(f.value);
|
|
1549
|
-
const d = E(e.modelValue ||
|
|
1551
|
+
const d = E(e.modelValue || g.schema.showWrapperInCanvas);
|
|
1550
1552
|
_(() => e.modelValue, () => {
|
|
1551
1553
|
d.value = e.modelValue;
|
|
1552
1554
|
});
|
|
@@ -1554,9 +1556,9 @@ const we = Object.assign({}, Q, {
|
|
|
1554
1556
|
const w = ["f-drawer-wrapper", `f-drawer-wrapper-${e.position}`, e.wrapperClass];
|
|
1555
1557
|
return d.value || w.push("d-none"), w;
|
|
1556
1558
|
}), S = D(() => {
|
|
1557
|
-
const w = e.width, $ = e.height,
|
|
1559
|
+
const w = e.width, $ = e.height, N = typeof w == "string" ? w : typeof w == "number" ? `${w}px` : "20%", I = typeof $ == "string" ? $ : typeof $ == "number" ? `${$}px` : "20%";
|
|
1558
1560
|
return {
|
|
1559
|
-
width:
|
|
1561
|
+
width: N,
|
|
1560
1562
|
height: I,
|
|
1561
1563
|
backgroundColor: e.backgroundColor,
|
|
1562
1564
|
maxWidth: "100%"
|
|
@@ -1567,34 +1569,34 @@ const we = Object.assign({}, Q, {
|
|
|
1567
1569
|
top: "down",
|
|
1568
1570
|
bottom: "up"
|
|
1569
1571
|
}[e.position] ?? "right"}`), T = () => {
|
|
1570
|
-
d.value = !1,
|
|
1572
|
+
d.value = !1, g.schema.showWrapperInCanvas = !1;
|
|
1571
1573
|
}, M = () => {
|
|
1572
|
-
d.value = !0,
|
|
1573
|
-
}, l = () =>
|
|
1574
|
+
d.value = !0, g.schema.showWrapperInCanvas = !0;
|
|
1575
|
+
}, l = () => m("div", {
|
|
1574
1576
|
class: R.value,
|
|
1575
1577
|
onClick: M
|
|
1576
|
-
}, [t.slots.button ? t.slots.button() :
|
|
1578
|
+
}, [t.slots.button ? t.slots.button() : m("div", {
|
|
1577
1579
|
class: "f-drawer-entry-icon"
|
|
1578
|
-
}, [
|
|
1580
|
+
}, [m("span", {
|
|
1579
1581
|
class: `f-icon ${P.value}`
|
|
1580
1582
|
}, null)])]), c = D(() => ({
|
|
1581
1583
|
opacity: e.transparent ? 0 : 1
|
|
1582
|
-
})),
|
|
1584
|
+
})), p = () => m(Z, {
|
|
1583
1585
|
name: "f-drawer-mask",
|
|
1584
1586
|
appear: !0
|
|
1585
1587
|
}, {
|
|
1586
|
-
default: () => [d.value &&
|
|
1588
|
+
default: () => [d.value && m("div", {
|
|
1587
1589
|
class: "f-drawer-mask",
|
|
1588
1590
|
style: c.value,
|
|
1589
1591
|
onClick: W(T, ["stop"])
|
|
1590
1592
|
}, null)]
|
|
1591
1593
|
});
|
|
1592
|
-
function O(w, $,
|
|
1593
|
-
|
|
1594
|
+
function O(w, $, N, I) {
|
|
1595
|
+
g && g.setupContext && g.setupContext.emit("selectionChange", w, $, N, I);
|
|
1594
1596
|
}
|
|
1595
|
-
const F = (w, $,
|
|
1596
|
-
modelValue:
|
|
1597
|
-
"onUpdate:modelValue": (I) =>
|
|
1597
|
+
const F = (w, $, N) => m(ze, {
|
|
1598
|
+
modelValue: N,
|
|
1599
|
+
"onUpdate:modelValue": (I) => N = I,
|
|
1598
1600
|
canAdd: !1,
|
|
1599
1601
|
class: "w-100 position-relative",
|
|
1600
1602
|
childType: "drawer-toolbar-item",
|
|
@@ -1604,83 +1606,83 @@ const we = Object.assign({}, Q, {
|
|
|
1604
1606
|
componentId: e.componentId,
|
|
1605
1607
|
onSelectionChange: O
|
|
1606
1608
|
}, {
|
|
1607
|
-
default: () => [
|
|
1609
|
+
default: () => [m(ie, {
|
|
1608
1610
|
customClass: "w-100",
|
|
1609
1611
|
items: $,
|
|
1610
1612
|
componentId: e.componentId
|
|
1611
1613
|
}, null)]
|
|
1612
|
-
}), B = () =>
|
|
1614
|
+
}), B = () => m("div", {
|
|
1613
1615
|
class: "f-drawer-close"
|
|
1614
|
-
}, [
|
|
1616
|
+
}, [m("span", {
|
|
1615
1617
|
class: "f-icon f-icon-close",
|
|
1616
1618
|
onClick: W(T, ["stop"])
|
|
1617
|
-
}, null)]), j = () => e.showHeader ?
|
|
1619
|
+
}, null)]), j = () => e.showHeader ? m("div", {
|
|
1618
1620
|
class: "f-drawer-header align-items-center"
|
|
1619
|
-
}, [e.customHeader ?
|
|
1621
|
+
}, [e.customHeader ? m("div", {
|
|
1620
1622
|
class: "w-100 h-100",
|
|
1621
1623
|
innerHTML: e.headerTemplate
|
|
1622
|
-
}, null) :
|
|
1624
|
+
}, null) : m(ne, null, [m("div", {
|
|
1623
1625
|
class: "f-drawer-title"
|
|
1624
|
-
}, [t.slots.title ? t.slots.title() : e.title]),
|
|
1626
|
+
}, [t.slots.title ? t.slots.title() : e.title]), m("div", {
|
|
1625
1627
|
class: "mx-2 col-7"
|
|
1626
|
-
}, [F(k, s.value, i.value)]),
|
|
1628
|
+
}, [F(k, s.value, i.value)]), m("div", {
|
|
1627
1629
|
class: "f-drawer-header-right"
|
|
1628
1630
|
}, [e.showClose && B()])])]) : null;
|
|
1629
|
-
function
|
|
1631
|
+
function z(w) {
|
|
1630
1632
|
w && (w.preventDefault(), w.stopPropagation()), f.value.onRemoveComponent(C);
|
|
1631
|
-
const $ = u == null ? void 0 : u.parent,
|
|
1633
|
+
const $ = u == null ? void 0 : u.parent, N = (I) => I.id === g.schema.id;
|
|
1632
1634
|
if ($ && $.schema.contents) {
|
|
1633
|
-
const I = $.schema.contents.findIndex(
|
|
1634
|
-
$.schema.contents.splice(I, 1),
|
|
1635
|
+
const I = $.schema.contents.findIndex(N);
|
|
1636
|
+
$.schema.contents.splice(I, 1), Ae.value++, t.emit("selectionChange");
|
|
1635
1637
|
}
|
|
1636
1638
|
}
|
|
1637
|
-
const
|
|
1639
|
+
const L = () => m("div", {
|
|
1638
1640
|
class: "component-btn-group"
|
|
1639
|
-
}, [
|
|
1641
|
+
}, [m("div", null, [m("div", {
|
|
1640
1642
|
class: "btn component-settings-button",
|
|
1641
1643
|
title: "删除",
|
|
1642
|
-
onClick:
|
|
1643
|
-
}, [
|
|
1644
|
+
onClick: z
|
|
1645
|
+
}, [m("i", {
|
|
1644
1646
|
class: "f-icon f-icon-yxs_delete"
|
|
1645
|
-
}, null)]),
|
|
1647
|
+
}, null)]), m("div", {
|
|
1646
1648
|
class: "btn component-settings-button",
|
|
1647
1649
|
title: "关闭抽屉",
|
|
1648
1650
|
onClick: T
|
|
1649
|
-
}, [
|
|
1651
|
+
}, [m("i", {
|
|
1650
1652
|
class: "f-icon f-icon-close"
|
|
1651
|
-
}, null)])])]),
|
|
1653
|
+
}, null)])])]), A = () => {
|
|
1652
1654
|
var w, $;
|
|
1653
|
-
return
|
|
1655
|
+
return m("div", {
|
|
1654
1656
|
class: h.value,
|
|
1655
1657
|
style: S.value
|
|
1656
|
-
}, [
|
|
1658
|
+
}, [m("div", {
|
|
1657
1659
|
class: "f-drawer-container position-relative",
|
|
1658
1660
|
ref: o
|
|
1659
|
-
}, [
|
|
1661
|
+
}, [L(), j(), m("div", {
|
|
1660
1662
|
class: "f-drawer-body drag-container d-block",
|
|
1661
|
-
"data-dragref": `${
|
|
1663
|
+
"data-dragref": `${g.schema.id}-container`,
|
|
1662
1664
|
ref: r,
|
|
1663
1665
|
style: "overflow: auto;",
|
|
1664
|
-
id:
|
|
1665
|
-
}, [($ = (w = t.slots).default) == null ? void 0 : $.call(w)]), e.showFooter &&
|
|
1666
|
+
id: g.schema.id
|
|
1667
|
+
}, [($ = (w = t.slots).default) == null ? void 0 : $.call(w)]), e.showFooter && m("div", {
|
|
1666
1668
|
class: "f-drawer-footer px-2 border-top",
|
|
1667
1669
|
style: {
|
|
1668
1670
|
height: e.footerHeight + "px"
|
|
1669
1671
|
}
|
|
1670
|
-
}, [e.footerContentType === "toolbar" && F(
|
|
1672
|
+
}, [e.footerContentType === "toolbar" && F(b, v.value, y.value), e.footerContentType === "html" && m("div", {
|
|
1671
1673
|
class: "w-100 h-100",
|
|
1672
1674
|
innerHTML: e.footerTemplate
|
|
1673
1675
|
}, null)])])]);
|
|
1674
|
-
},
|
|
1676
|
+
}, q = () => m("div", {
|
|
1675
1677
|
class: "f-drawer f-drawer-inline"
|
|
1676
|
-
}, [
|
|
1677
|
-
return () =>
|
|
1678
|
+
}, [p(), A()]);
|
|
1679
|
+
return () => m("div", null, [q(), l()]);
|
|
1678
1680
|
}
|
|
1679
1681
|
});
|
|
1680
1682
|
function or() {
|
|
1681
1683
|
function e(t, r) {
|
|
1682
1684
|
const o = {};
|
|
1683
|
-
return o.beforeClose = (
|
|
1685
|
+
return o.beforeClose = (b) => r.call("beforeClose", t, [t]), o;
|
|
1684
1686
|
}
|
|
1685
1687
|
return {
|
|
1686
1688
|
resolve: e
|
|
@@ -1691,12 +1693,12 @@ U.register = (e, t, r, o) => {
|
|
|
1691
1693
|
e.drawer = jt, t.drawer = Ce, o.drawer = { eventHandlerResolver: Et, callbackResolver: nr };
|
|
1692
1694
|
};
|
|
1693
1695
|
U.registerDesigner = (e, t, r) => {
|
|
1694
|
-
e.drawer = U, t.drawer = Ce, e["drawer-toolbar-item"] =
|
|
1696
|
+
e.drawer = U, t.drawer = Ce, e["drawer-toolbar-item"] = Ve, t["drawer-toolbar-item"] = tr, e["drawer-toolbar"] = ie, t["drawer-toolbar"] = V;
|
|
1695
1697
|
};
|
|
1696
|
-
const
|
|
1698
|
+
const pr = Pe(U);
|
|
1697
1699
|
export {
|
|
1698
1700
|
nr as callbackResolver,
|
|
1699
|
-
|
|
1701
|
+
pr as default,
|
|
1700
1702
|
Q as drawerProps,
|
|
1701
1703
|
Et as eventHandlerResolver,
|
|
1702
1704
|
Ce as propsResolver
|