@farris/ui-vue 1.6.5-beta.7 → 1.6.5
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/accordion/index.esm.js +65 -65
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +360 -361
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +524 -520
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +134 -134
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +192 -192
- package/components/capsule/index.umd.cjs +1 -1
- package/components/code-editor/index.esm.js +8 -8
- package/components/code-editor/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +72 -72
- package/components/collection-property-editor/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +291 -289
- package/components/color-picker/index.umd.cjs +1 -1
- package/components/combo-list/index.esm.js +190 -181
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +113 -112
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +3 -1
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +309 -309
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1125 -1124
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +472 -472
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +99 -99
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3387 -3321
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +1604 -1601
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +1082 -1079
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/discussion-editor/index.esm.js +973 -1040
- package/components/discussion-editor/index.umd.cjs +6 -6
- package/components/dropdown/index.esm.js +335 -330
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +177 -177
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +6 -6
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +344 -344
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +644 -644
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +1773 -1760
- package/components/expression-editor/index.umd.cjs +4 -4
- package/components/fieldset/index.esm.js +55 -55
- package/components/fieldset/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +879 -869
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-condition-editor/index.esm.js +1091 -1077
- package/components/filter-condition-editor/index.umd.cjs +3 -3
- package/components/flow-canvas/index.esm.js +215 -215
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/html-template/index.esm.js +164 -164
- package/components/html-template/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +198 -198
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/json-editor/index.esm.js +64 -64
- package/components/json-editor/index.umd.cjs +1 -1
- package/components/language-textbox/index.esm.js +140 -140
- package/components/language-textbox/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +111 -111
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +90 -90
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +139 -141
- package/components/list-view/index.umd.cjs +3 -3
- package/components/locale/index.esm.js +833 -901
- package/components/locale/index.umd.cjs +6 -6
- package/components/lookup/index.esm.js +1352 -1351
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +1387 -1383
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/menu-lookup/index.esm.js +1059 -1127
- package/components/menu-lookup/index.umd.cjs +6 -6
- package/components/message-box/index.esm.js +217 -217
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +283 -283
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +106 -106
- package/components/nav/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +194 -194
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +463 -462
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +883 -876
- package/components/order/index.umd.cjs +4 -4
- package/components/page-footer/index.esm.js +94 -94
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +942 -939
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +82 -82
- package/components/pagination/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +59 -57
- package/components/popover/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +113 -113
- package/components/progress/index.umd.cjs +2 -2
- package/components/property-editor/index.esm.js +151 -150
- package/components/property-editor/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +739 -739
- package/components/property-panel/index.umd.cjs +2 -2
- package/components/query-solution/index.esm.js +4142 -4190
- package/components/query-solution/index.umd.cjs +6 -6
- package/components/radio-button/index.esm.js +182 -182
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +106 -106
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +535 -535
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +1456 -1443
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +779 -776
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +1875 -1866
- package/components/schema-selector/index.umd.cjs +7 -7
- package/components/search-box/index.esm.js +151 -147
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +1236 -1233
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +163 -163
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/sort-condition-editor/index.esm.js +1097 -1083
- package/components/sort-condition-editor/index.umd.cjs +3 -3
- package/components/splitter/index.esm.js +3 -3
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +133 -133
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +103 -98
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +1596 -1593
- package/components/tabs/index.umd.cjs +2 -2
- package/components/tags/index.esm.js +93 -93
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +138 -138
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +684 -684
- package/components/textarea/index.umd.cjs +2 -2
- package/components/time-picker/index.esm.js +935 -929
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/tooltip/index.esm.js +173 -171
- package/components/tooltip/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +190 -192
- package/components/transfer/index.umd.cjs +4 -4
- package/components/tree-grid/index.esm.js +124 -124
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2363 -2278
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +170 -170
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +196 -196
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +227 -227
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +9 -9
- package/components/weather/index.umd.cjs +2 -2
- package/designer/button-edit/index.esm.js +353 -353
- package/designer/button-edit/index.umd.cjs +1 -1
- package/designer/checkbox/index.esm.js +7 -3
- package/designer/checkbox/index.umd.cjs +1 -1
- package/designer/checkbox-group/index.esm.js +38 -33
- package/designer/checkbox-group/index.umd.cjs +1 -1
- package/designer/data-grid/index.esm.js +3562 -3536
- package/designer/data-grid/index.umd.cjs +6 -6
- package/designer/data-view/index.esm.js +3 -3
- package/designer/data-view/index.umd.cjs +3 -3
- package/designer/farris-designer.all.esm.js +4203 -4193
- package/designer/farris-designer.all.umd.cjs +9 -9
- package/designer/input-group/index.esm.js +97 -97
- package/designer/input-group/index.umd.cjs +1 -1
- package/designer/list-view/index.esm.js +1868 -1854
- package/designer/list-view/index.umd.cjs +8 -8
- package/designer/radio-group/index.esm.js +954 -949
- package/designer/radio-group/index.umd.cjs +1 -1
- package/farris.all.esm.js +16195 -16126
- package/farris.all.umd.cjs +30 -30
- package/locales/data-grid/ui/en.json +2 -2
- package/locales/designer/en.json +7 -6
- package/locales/designer/zh-CHS.json +2 -1
- package/locales/designer/zh-CHT.json +2 -1
- package/locales/ui/en.json +7 -6
- package/locales/ui/zh-CHS.json +2 -1
- package/locales/ui/zh-CHT.json +2 -1
- package/package.json +1 -1
- package/types/combo-list/src/property-config/combo-list.property-config.d.ts +0 -6
- package/types/data-view/composition/types.d.ts +10 -4
- package/types/lookup/src/composition/use-dialog.d.ts +2 -0
- package/types/lookup/src/composition/use-input-change.d.ts +1 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ref as E, computed as W, defineComponent as
|
|
1
|
+
import { ref as E, computed as W, defineComponent as Z, watch as re, createVNode as w, createTextVNode as V, inject as oe, onMounted as ie } from "vue";
|
|
2
2
|
import { createPropsResolver as ae, getSchemaByTypeForDesigner as ce } from "../dynamic-resolver/index.esm.js";
|
|
3
|
-
import {
|
|
3
|
+
import { cloneDeep as Q, isPlainObject as X } from "lodash-es";
|
|
4
4
|
function H(e, t) {
|
|
5
5
|
let n;
|
|
6
6
|
function l(c) {
|
|
7
|
-
const { properties: o, title: i, ignore: r } = c, a = r && Array.isArray(r), u = Object.keys(o).reduce((m, h) => ((!a || !r.find((O) => O === h)) && (m[h] = o[h].type === "object" && o[h].properties ? l(o[h]) :
|
|
7
|
+
const { properties: o, title: i, ignore: r } = c, a = r && Array.isArray(r), u = Object.keys(o).reduce((m, h) => ((!a || !r.find((O) => O === h)) && (m[h] = o[h].type === "object" && o[h].properties ? l(o[h]) : Q(o[h].default)), m), {});
|
|
8
8
|
if (i && (!a || !r.find((m) => m === "id"))) {
|
|
9
9
|
const m = i.toLowerCase().replace(/-/g, "_");
|
|
10
10
|
u.id = `${m}_${Math.random().toString().slice(2, 6)}`;
|
|
@@ -14,7 +14,7 @@ function H(e, t) {
|
|
|
14
14
|
function y(c) {
|
|
15
15
|
const { properties: o, title: i, required: r } = c;
|
|
16
16
|
if (r && Array.isArray(r)) {
|
|
17
|
-
const a = r.reduce((u, m) => (u[m] = o[m].type === "object" && o[m].properties ? l(o[m]) :
|
|
17
|
+
const a = r.reduce((u, m) => (u[m] = o[m].type === "object" && o[m].properties ? l(o[m]) : Q(o[m].default), u), {});
|
|
18
18
|
if (i && r.find((u) => u === "id")) {
|
|
19
19
|
const u = i.toLowerCase().replace(/-/g, "_");
|
|
20
20
|
a.id = `${u}_${Math.random().toString().slice(2, 6)}`;
|
|
@@ -38,7 +38,7 @@ function H(e, t) {
|
|
|
38
38
|
const i = l(o);
|
|
39
39
|
return Object.keys(i).reduce((r, a) => (Object.prototype.hasOwnProperty.call(c, a) && (r[a] && X(r[a]) && X(c[a] || !c[a]) ? Object.assign(r[a], c[a] || {}) : r[a] = c[a]), r), i), i;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function F(c, o) {
|
|
42
42
|
return Object.keys(c).filter((r) => c[r] != null).reduce((r, a) => {
|
|
43
43
|
if (o.has(a)) {
|
|
44
44
|
const u = o.get(a);
|
|
@@ -53,9 +53,9 @@ function H(e, t) {
|
|
|
53
53
|
return r;
|
|
54
54
|
}, {});
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function P(c, o, i = /* @__PURE__ */ new Map()) {
|
|
57
57
|
const r = N(c, o);
|
|
58
|
-
return
|
|
58
|
+
return F(r, i);
|
|
59
59
|
}
|
|
60
60
|
function p(c) {
|
|
61
61
|
var i;
|
|
@@ -76,9 +76,9 @@ function H(e, t) {
|
|
|
76
76
|
function d(c) {
|
|
77
77
|
n = c;
|
|
78
78
|
}
|
|
79
|
-
return { getSchemaByType: k, resolveSchemaWithDefaultValue: p, resolveSchemaToProps:
|
|
79
|
+
return { getSchemaByType: k, resolveSchemaWithDefaultValue: p, resolveSchemaToProps: P, mappingSchemaToProps: F, setDesignerContext: d };
|
|
80
80
|
}
|
|
81
|
-
const le = {}, se = {}, { resolveSchemaWithDefaultValue: ue } = H(le, se);
|
|
81
|
+
const le = {}, se = {}, { getSchemaByType: ct, resolveSchemaWithDefaultValue: ue, resolveSchemaToProps: lt, mappingSchemaToProps: st, setDesignerContext: ut } = H(le, se);
|
|
82
82
|
function fe(e = {}) {
|
|
83
83
|
function t(p, d, c, o) {
|
|
84
84
|
if (typeof c == "number")
|
|
@@ -124,14 +124,14 @@ function fe(e = {}) {
|
|
|
124
124
|
}
|
|
125
125
|
return !1;
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function F(p, d) {
|
|
128
128
|
return k(p).reduce((i, r) => i && N(r, d), !0);
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
const c = Object.keys(p), o = c.includes("allOf"), i = c.includes("anyOf"), r = o || i, m = (r ? p[r ? o ? "allOf" : "anyOf" : "allOf"] : [p]).map((O) =>
|
|
130
|
+
function P(p, d) {
|
|
131
|
+
const c = Object.keys(p), o = c.includes("allOf"), i = c.includes("anyOf"), r = o || i, m = (r ? p[r ? o ? "allOf" : "anyOf" : "allOf"] : [p]).map((O) => F(O, d));
|
|
132
132
|
return o ? !m.includes(!1) : m.includes(!0);
|
|
133
133
|
}
|
|
134
|
-
return { parseValueSchema:
|
|
134
|
+
return { parseValueSchema: P };
|
|
135
135
|
}
|
|
136
136
|
const pe = {
|
|
137
137
|
convertTo: (e, t, n, l) => {
|
|
@@ -277,7 +277,7 @@ const pe = {
|
|
|
277
277
|
});
|
|
278
278
|
},
|
|
279
279
|
convertFrom: (e, t, n) => e.summary && t === "enable" ? e.summary.enable : e.type === "data-grid-column" ? e.enableSummary === void 0 ? !1 : e.enableSummary : ""
|
|
280
|
-
},
|
|
280
|
+
}, Te = {
|
|
281
281
|
convertTo: (e, t, n, l) => {
|
|
282
282
|
e.group ? e.group[t] = n : e.group = {
|
|
283
283
|
[t]: n
|
|
@@ -295,7 +295,7 @@ const pe = {
|
|
|
295
295
|
return e.group.showSummary;
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
|
-
},
|
|
298
|
+
}, Fe = {
|
|
299
299
|
convertFrom: (e, t) => e.binding ? e.binding.path : "",
|
|
300
300
|
convertTo: (e, t, n) => {
|
|
301
301
|
if (n && n.length > 0) {
|
|
@@ -308,12 +308,12 @@ const pe = {
|
|
|
308
308
|
e.pagination || (e.pagination = {}), e.pagination[t] = n;
|
|
309
309
|
},
|
|
310
310
|
convertFrom: (e, t, n) => e.pagination ? e.pagination[t] : e[t]
|
|
311
|
-
},
|
|
311
|
+
}, Pe = {
|
|
312
312
|
convertTo: (e, t, n, l) => {
|
|
313
313
|
e.rowNumber || (e.rowNumber = {}), e.rowNumber[t] = n;
|
|
314
314
|
},
|
|
315
315
|
convertFrom: (e, t, n) => e.rowNumber ? e.rowNumber[t] : e[t]
|
|
316
|
-
},
|
|
316
|
+
}, De = {
|
|
317
317
|
convertTo: (e, t, n, l) => {
|
|
318
318
|
e.selection || (e.selection = {}), e.selection[t] = n;
|
|
319
319
|
},
|
|
@@ -358,7 +358,7 @@ const pe = {
|
|
|
358
358
|
if (t === "mode")
|
|
359
359
|
return ((l = e.filter) == null ? void 0 : l.mode) || "client";
|
|
360
360
|
}
|
|
361
|
-
},
|
|
361
|
+
}, $e = {
|
|
362
362
|
convertTo: (e, t, n, l) => {
|
|
363
363
|
e.rowOption ? e.rowOption[t] = n : e.rowOption = {
|
|
364
364
|
[t]: n
|
|
@@ -386,17 +386,17 @@ function I(e, t, n) {
|
|
|
386
386
|
["/converter/column-command.converter", ye],
|
|
387
387
|
["/converter/column-option.converter", he],
|
|
388
388
|
["/converter/summary.converter", Se],
|
|
389
|
-
["/converter/group.converter",
|
|
389
|
+
["/converter/group.converter", Te],
|
|
390
390
|
["/converter/form-group-label.converter", Oe],
|
|
391
|
-
["/converter/field-selector.converter",
|
|
391
|
+
["/converter/field-selector.converter", Fe],
|
|
392
392
|
["/converter/pagination.converter", Ne],
|
|
393
|
-
["/converter/row-number.converter",
|
|
394
|
-
["/converter/grid-selection.converter",
|
|
393
|
+
["/converter/row-number.converter", Pe],
|
|
394
|
+
["/converter/grid-selection.converter", De],
|
|
395
395
|
["/converter/size.converter", Me],
|
|
396
396
|
["/converter/change-formatter-enum.converter", we],
|
|
397
397
|
["/converter/grid-sort.converter", Ee],
|
|
398
398
|
["/converter/grid-filter.converter", je],
|
|
399
|
-
["/converter/row-option.converter",
|
|
399
|
+
["/converter/row-option.converter", $e]
|
|
400
400
|
]), y = /* @__PURE__ */ new Map([
|
|
401
401
|
["string", { type: "input-group", enableClear: !1 }],
|
|
402
402
|
["boolean", {
|
|
@@ -425,52 +425,52 @@ function I(e, t, n) {
|
|
|
425
425
|
function N(r, a) {
|
|
426
426
|
return () => k.parseValueSchema(r, a);
|
|
427
427
|
}
|
|
428
|
-
function
|
|
428
|
+
function F(r, a, u) {
|
|
429
429
|
return r.includes("visible") && a.visible !== void 0 ? typeof a.visible == "boolean" ? () => !!a.visible : a.visible === void 0 ? !0 : N(a.visible, u) : () => !0;
|
|
430
430
|
}
|
|
431
|
-
function
|
|
431
|
+
function P(r, a, u) {
|
|
432
432
|
return r.includes("readonly") && a.readonly !== void 0 ? typeof a.readonly == "boolean" ? () => !!a.readonly : N(a.readonly, u) : () => !1;
|
|
433
433
|
}
|
|
434
434
|
function p(r, a) {
|
|
435
435
|
const u = r.$converter || a;
|
|
436
436
|
return typeof u == "string" && u && l.has(u) ? l.get(u) || null : u || null;
|
|
437
437
|
}
|
|
438
|
-
function d(r, a, u, m, h, O = "",
|
|
438
|
+
function d(r, a, u, m, h, O = "", B = "") {
|
|
439
439
|
return Object.keys(r).map((S) => {
|
|
440
|
-
const R = E(1), A = S, f = r[S], M = Object.keys(f), q = f.title, s = f.type, b = y.get(s) || { type: "input-group", enableClear: !1 }, v = f.editor ? Object.assign({}, b, f.editor) : Object.assign({}, b), g =
|
|
441
|
-
v.readonly = v.readonly === void 0 ?
|
|
442
|
-
const
|
|
443
|
-
let
|
|
440
|
+
const R = E(1), A = S, f = r[S], M = Object.keys(f), q = f.title, s = f.type, b = y.get(s) || { type: "input-group", enableClear: !1 }, v = f.editor ? Object.assign({}, b, f.editor) : Object.assign({}, b), g = F(M, f, a), T = P(M, f, a);
|
|
441
|
+
v.readonly = v.readonly === void 0 ? T() : v.readonly;
|
|
442
|
+
const $ = f.type === "cascade" ? d(f.properties, a, u, m, h, O, B) : [], L = !0;
|
|
443
|
+
let D = p(f, B);
|
|
444
444
|
const z = W({
|
|
445
445
|
get() {
|
|
446
446
|
if (R.value) {
|
|
447
|
-
if (["class", "style"].find((ne) => ne === A) && !
|
|
448
|
-
return
|
|
447
|
+
if (["class", "style"].find((ne) => ne === A) && !D && (D = l.get("/converter/appearance.converter") || null), D && D.convertFrom)
|
|
448
|
+
return D.convertFrom(u, S, h, O);
|
|
449
449
|
const _ = u[S];
|
|
450
450
|
return Object.prototype.hasOwnProperty.call(f, "defaultValue") && (_ === void 0 || typeof _ == "string" && _ === "") ? f.type === "boolean" ? f.defaultValue : f.defaultValue || "" : _;
|
|
451
451
|
}
|
|
452
452
|
return null;
|
|
453
453
|
},
|
|
454
454
|
set(_) {
|
|
455
|
-
R.value += 1,
|
|
455
|
+
R.value += 1, D && D.convertTo ? (D.convertTo(m, S, _, h, O), D.convertTo(u, S, _, h, O)) : (m[S] = _, u[S] = _);
|
|
456
456
|
}
|
|
457
|
-
}), { refreshPanelAfterChanged: G, description: K, isExpand: ee, parentPropertyID: te } = f,
|
|
458
|
-
return a[A] =
|
|
457
|
+
}), { refreshPanelAfterChanged: G, description: K, isExpand: ee, parentPropertyID: te } = f, J = { propertyID: A, propertyName: q, propertyType: s, propertyValue: z, editor: v, visible: g, readonly: T, cascadeConfig: $, hideCascadeTitle: L, refreshPanelAfterChanged: G, description: K, isExpand: ee, parentPropertyID: te };
|
|
458
|
+
return a[A] = J, J;
|
|
459
459
|
});
|
|
460
460
|
}
|
|
461
461
|
function c(r, a, u = {}) {
|
|
462
462
|
const m = {}, h = e[r];
|
|
463
|
-
return h && h.categories ? Object.keys(h.categories).map((
|
|
464
|
-
const j = h.categories[
|
|
465
|
-
return { categoryId:
|
|
463
|
+
return h && h.categories ? Object.keys(h.categories).map((B) => {
|
|
464
|
+
const j = h.categories[B], S = j == null ? void 0 : j.title, R = d(j.properties || {}, m, {}, u, a);
|
|
465
|
+
return { categoryId: B, categoryName: S, properties: R };
|
|
466
466
|
}) : [];
|
|
467
467
|
}
|
|
468
468
|
function o(r, a, u, m, h = "") {
|
|
469
|
-
const O = a.$ref.schema,
|
|
469
|
+
const O = a.$ref.schema, B = a.$ref.converter, j = u[O], S = j.type, R = n(j), A = {}, f = e[S];
|
|
470
470
|
if (f && f.categories) {
|
|
471
471
|
const M = f.categories[r], q = M == null ? void 0 : M.title;
|
|
472
|
-
|
|
473
|
-
M.properties[v].$converter =
|
|
472
|
+
B && Object.keys(M.properties).forEach((v) => {
|
|
473
|
+
M.properties[v].$converter = B;
|
|
474
474
|
});
|
|
475
475
|
const s = (M == null ? void 0 : M.properties) || {}, b = d(s, A, R, j, m, h);
|
|
476
476
|
return { categoryId: r, categoryName: q, properties: b };
|
|
@@ -478,7 +478,7 @@ function I(e, t, n) {
|
|
|
478
478
|
return { categoryId: r, categoryName: "", properties: [] };
|
|
479
479
|
}
|
|
480
480
|
function i(r, a, u, m, h) {
|
|
481
|
-
const O = r.type,
|
|
481
|
+
const O = r.type, B = n(r), j = {};
|
|
482
482
|
let S = h || e[O];
|
|
483
483
|
if (S && Object.keys(S).length === 0 && u && u.getPropConfig && (S = u.getPropConfig(m)), S && S.categories) {
|
|
484
484
|
const R = [];
|
|
@@ -488,8 +488,8 @@ function I(e, t, n) {
|
|
|
488
488
|
R.push(o(A, f, r, a, m));
|
|
489
489
|
return;
|
|
490
490
|
}
|
|
491
|
-
const M = f == null ? void 0 : f.title, q = f == null ? void 0 : f.tabId, s = f == null ? void 0 : f.tabName, b = f == null ? void 0 : f.hide, v = f == null ? void 0 : f.hideTitle, g = d(f.properties || {}, j,
|
|
492
|
-
R.push({ categoryId: A, categoryName: M, tabId: q, tabName: s, hide: b, properties: g, hideTitle: v, setPropertyRelates:
|
|
491
|
+
const M = f == null ? void 0 : f.title, q = f == null ? void 0 : f.tabId, s = f == null ? void 0 : f.tabName, b = f == null ? void 0 : f.hide, v = f == null ? void 0 : f.hideTitle, g = d(f.properties || {}, j, B, r, a, m, f.$converter), { setPropertyRelates: T } = f, $ = f == null ? void 0 : f.parentPropertyID;
|
|
492
|
+
R.push({ categoryId: A, categoryName: M, tabId: q, tabName: s, hide: b, properties: g, hideTitle: v, setPropertyRelates: T, parentPropertyID: $ });
|
|
493
493
|
}), R;
|
|
494
494
|
}
|
|
495
495
|
return [];
|
|
@@ -500,9 +500,9 @@ function I(e, t, n) {
|
|
|
500
500
|
propertyConverterMap: l
|
|
501
501
|
};
|
|
502
502
|
}
|
|
503
|
-
const
|
|
504
|
-
I(
|
|
505
|
-
const Ae = {}, ze = {}, { resolveSchemaWithDefaultValue: _e } = H(Ae, ze), qe = {}, Le = {};
|
|
503
|
+
const Be = {}, Re = {};
|
|
504
|
+
I(Be, Re, ue);
|
|
505
|
+
const Ae = {}, ze = {}, { getSchemaByType: ft, resolveSchemaWithDefaultValue: _e, resolveSchemaToProps: pt, mappingSchemaToProps: vt, setDesignerContext: dt } = H(Ae, ze), qe = {}, Le = {};
|
|
506
506
|
I(qe, Le, _e);
|
|
507
507
|
function We(e, t) {
|
|
508
508
|
return { customClass: t.class, customStyle: t.style };
|
|
@@ -513,7 +513,7 @@ const Ge = /* @__PURE__ */ new Map([
|
|
|
513
513
|
function Ue(e, t, n) {
|
|
514
514
|
return t;
|
|
515
515
|
}
|
|
516
|
-
const
|
|
516
|
+
const Ce = "https://json-schema.org/draft/2020-12/schema", Je = "https://farris-design.gitee.io/nav.schema.json", Qe = "nav", Xe = "A Farris Component", Ye = "object", Ze = {
|
|
517
517
|
id: {
|
|
518
518
|
description: "The unique identifier for a nav",
|
|
519
519
|
type: "string"
|
|
@@ -609,12 +609,12 @@ const Je = "https://json-schema.org/draft/2020-12/schema", Qe = "https://farris-
|
|
|
609
609
|
"id",
|
|
610
610
|
"type"
|
|
611
611
|
], He = {
|
|
612
|
-
$schema:
|
|
613
|
-
$id:
|
|
614
|
-
title:
|
|
615
|
-
description:
|
|
616
|
-
type:
|
|
617
|
-
properties:
|
|
612
|
+
$schema: Ce,
|
|
613
|
+
$id: Je,
|
|
614
|
+
title: Qe,
|
|
615
|
+
description: Xe,
|
|
616
|
+
type: Ye,
|
|
617
|
+
properties: Ze,
|
|
618
618
|
required: Ve
|
|
619
619
|
}, xe = "nav", Ie = "A Farris Component", Ke = "object", et = {
|
|
620
620
|
basic: {
|
|
@@ -703,7 +703,7 @@ const Je = "https://json-schema.org/draft/2020-12/schema", Qe = "https://farris-
|
|
|
703
703
|
description: Ie,
|
|
704
704
|
type: Ke,
|
|
705
705
|
categories: et
|
|
706
|
-
},
|
|
706
|
+
}, C = {
|
|
707
707
|
/** 当前激活的id */
|
|
708
708
|
activeNavId: { Type: String, default: "1" },
|
|
709
709
|
/** 导航文本字段 */
|
|
@@ -748,9 +748,9 @@ const Je = "https://json-schema.org/draft/2020-12/schema", Qe = "https://farris-
|
|
|
748
748
|
},
|
|
749
749
|
/** 徽标值字段 */
|
|
750
750
|
valueField: { Type: String, default: "num" }
|
|
751
|
-
},
|
|
751
|
+
}, Y = ae(C, He, Ge, Ue, tt), U = /* @__PURE__ */ Z({
|
|
752
752
|
name: "FNav",
|
|
753
|
-
props:
|
|
753
|
+
props: C,
|
|
754
754
|
emits: ["nav", "update:activeNavId"],
|
|
755
755
|
setup(e, t) {
|
|
756
756
|
const n = E(e.activeNavId), l = E(e.navData), y = E(e.horizontal), k = E(e.navPicking), N = W(() => ({
|
|
@@ -759,20 +759,20 @@ const Je = "https://json-schema.org/draft/2020-12/schema", Qe = "https://farris-
|
|
|
759
759
|
re(() => e.activeNavId, (o, i) => {
|
|
760
760
|
o !== i && (n.value = o);
|
|
761
761
|
});
|
|
762
|
-
const
|
|
762
|
+
const F = W({
|
|
763
763
|
get() {
|
|
764
764
|
return l.value;
|
|
765
765
|
},
|
|
766
766
|
set(o) {
|
|
767
767
|
l.value = o, d();
|
|
768
768
|
}
|
|
769
|
-
}),
|
|
769
|
+
}), P = W({
|
|
770
770
|
get() {
|
|
771
771
|
return n.value;
|
|
772
772
|
},
|
|
773
773
|
set(o) {
|
|
774
|
-
if (n.value = o, n.value &&
|
|
775
|
-
const i =
|
|
774
|
+
if (n.value = o, n.value && F && F.value.length) {
|
|
775
|
+
const i = F.value.find((r) => r.id === n.value);
|
|
776
776
|
i && t.emit("nav", i);
|
|
777
777
|
}
|
|
778
778
|
}
|
|
@@ -785,8 +785,8 @@ const Je = "https://json-schema.org/draft/2020-12/schema", Qe = "https://farris-
|
|
|
785
785
|
}
|
|
786
786
|
});
|
|
787
787
|
function d() {
|
|
788
|
-
if (
|
|
789
|
-
const o =
|
|
788
|
+
if (F.value && F.value.length && !n.value) {
|
|
789
|
+
const o = F.value.find((i) => !i.disable);
|
|
790
790
|
o && (n.value = o.id);
|
|
791
791
|
}
|
|
792
792
|
}
|
|
@@ -801,9 +801,9 @@ const Je = "https://json-schema.org/draft/2020-12/schema", Qe = "https://farris-
|
|
|
801
801
|
class: ["farris-nav", {
|
|
802
802
|
"farris-nav-vertical": !p.value
|
|
803
803
|
}]
|
|
804
|
-
}, [(o =
|
|
804
|
+
}, [(o = F.value) == null ? void 0 : o.map((i) => w("div", {
|
|
805
805
|
class: ["farris-nav-item", {
|
|
806
|
-
active: i[e.idField] ===
|
|
806
|
+
active: i[e.idField] === P.value
|
|
807
807
|
}, {
|
|
808
808
|
disabled: i[e.disableField]
|
|
809
809
|
}],
|
|
@@ -829,10 +829,10 @@ function nt(e, t, n) {
|
|
|
829
829
|
var q;
|
|
830
830
|
const l = "", y = "", k = E();
|
|
831
831
|
let N;
|
|
832
|
-
function
|
|
832
|
+
function F() {
|
|
833
833
|
return (t == null ? void 0 : t.schema.componentType) !== "frame";
|
|
834
834
|
}
|
|
835
|
-
function
|
|
835
|
+
function P() {
|
|
836
836
|
return !1;
|
|
837
837
|
}
|
|
838
838
|
function p() {
|
|
@@ -850,15 +850,15 @@ function nt(e, t, n) {
|
|
|
850
850
|
return v || null;
|
|
851
851
|
}
|
|
852
852
|
function o(s = t) {
|
|
853
|
-
var
|
|
853
|
+
var T;
|
|
854
854
|
const { componentInstance: b, designerItemElementRef: v } = s;
|
|
855
855
|
if (!b || !b.value)
|
|
856
856
|
return null;
|
|
857
857
|
const { getCustomButtons: g } = b.value;
|
|
858
|
-
return b.value.canMove || g && ((
|
|
858
|
+
return b.value.canMove || g && ((T = g()) != null && T.length) ? v : o(s.parent);
|
|
859
859
|
}
|
|
860
860
|
function i(s) {
|
|
861
|
-
return
|
|
861
|
+
return !!n;
|
|
862
862
|
}
|
|
863
863
|
function r() {
|
|
864
864
|
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
@@ -872,19 +872,19 @@ function nt(e, t, n) {
|
|
|
872
872
|
function m(s, b) {
|
|
873
873
|
const { componentType: v } = s;
|
|
874
874
|
let g = ce(v, s, b);
|
|
875
|
-
const
|
|
876
|
-
return g && !g.id && g.type === v && (g.id = `${
|
|
875
|
+
const T = v.toLowerCase().replace(/-/g, "_");
|
|
876
|
+
return g && !g.id && g.type === v && (g.id = `${T}_${Math.random().toString().slice(2, 6)}`), g;
|
|
877
877
|
}
|
|
878
878
|
function h(s) {
|
|
879
879
|
}
|
|
880
880
|
function O(...s) {
|
|
881
881
|
}
|
|
882
|
-
function
|
|
882
|
+
function B(s) {
|
|
883
883
|
if (!s)
|
|
884
884
|
return;
|
|
885
885
|
const b = t == null ? void 0 : t.schema, { formSchemaUtils: v } = s;
|
|
886
886
|
if (b && v.getExpressions().length) {
|
|
887
|
-
const g = v.getExpressions().findIndex((
|
|
887
|
+
const g = v.getExpressions().findIndex((T) => T.target === b.id);
|
|
888
888
|
g > -1 && v.getExpressions().splice(g, 1);
|
|
889
889
|
}
|
|
890
890
|
}
|
|
@@ -895,13 +895,13 @@ function nt(e, t, n) {
|
|
|
895
895
|
v.removeCommunicationInComponent(b);
|
|
896
896
|
}
|
|
897
897
|
function S(s) {
|
|
898
|
-
|
|
898
|
+
B(s), j(s), t != null && t.schema.contents && t.schema.contents.map((b) => {
|
|
899
899
|
let v = b.id;
|
|
900
900
|
b.type === "component-ref" && (v = b.component);
|
|
901
901
|
const g = e.value.querySelectorAll(`#${v}-design-item`);
|
|
902
|
-
g != null && g.length && Array.from(g).map((
|
|
903
|
-
var
|
|
904
|
-
(
|
|
902
|
+
g != null && g.length && Array.from(g).map((T) => {
|
|
903
|
+
var $;
|
|
904
|
+
($ = T == null ? void 0 : T.componentInstance) != null && $.value.onRemoveComponent && T.componentInstance.value.onRemoveComponent(s);
|
|
905
905
|
});
|
|
906
906
|
});
|
|
907
907
|
}
|
|
@@ -914,8 +914,8 @@ function nt(e, t, n) {
|
|
|
914
914
|
!N && s && (N = s.formSchemaUtils);
|
|
915
915
|
let b = "";
|
|
916
916
|
{
|
|
917
|
-
const { text:
|
|
918
|
-
b =
|
|
917
|
+
const { text: T, title: $, label: L, mainTitle: D, name: z, type: G } = t.schema;
|
|
918
|
+
b = T || $ || L || D || z || ((g = x[G]) == null ? void 0 : g.name);
|
|
919
919
|
}
|
|
920
920
|
b && N.getControlBasicInfoMap().set(t.schema.id, {
|
|
921
921
|
componentTitle: b,
|
|
@@ -923,16 +923,16 @@ function nt(e, t, n) {
|
|
|
923
923
|
});
|
|
924
924
|
}
|
|
925
925
|
function f(s) {
|
|
926
|
-
var
|
|
926
|
+
var T;
|
|
927
927
|
const { changeObject: b } = s, { propertyID: v, propertyValue: g } = b;
|
|
928
|
-
if (["text", "title", "label", "name", "mainTitle"].includes((
|
|
929
|
-
const
|
|
928
|
+
if (["text", "title", "label", "name", "mainTitle"].includes((T = s == null ? void 0 : s.changeObject) == null ? void 0 : T.propertyID) && v && g && (A(), N)) {
|
|
929
|
+
const $ = N.getControlBasicInfoMap(), L = $.keys().toArray().filter((D) => {
|
|
930
930
|
var z, G;
|
|
931
|
-
return ((z =
|
|
931
|
+
return ((z = $.get(D)) == null ? void 0 : z.reliedComponentId) === ((G = t == null ? void 0 : t.schema) == null ? void 0 : G.id);
|
|
932
932
|
});
|
|
933
|
-
L != null && L.length && L.forEach((
|
|
934
|
-
const z =
|
|
935
|
-
z[0] = g,
|
|
933
|
+
L != null && L.length && L.forEach((D) => {
|
|
934
|
+
const z = $.get(D).parentPathName.split(" > ");
|
|
935
|
+
z[0] = g, $.get(D).parentPathName = z.join(" > ");
|
|
936
936
|
});
|
|
937
937
|
}
|
|
938
938
|
}
|
|
@@ -940,8 +940,8 @@ function nt(e, t, n) {
|
|
|
940
940
|
f(s);
|
|
941
941
|
}
|
|
942
942
|
return k.value = {
|
|
943
|
-
canMove:
|
|
944
|
-
canSelectParent:
|
|
943
|
+
canMove: F(),
|
|
944
|
+
canSelectParent: P(),
|
|
945
945
|
canDelete: p(),
|
|
946
946
|
canNested: !d(),
|
|
947
947
|
contents: t == null ? void 0 : t.schema.contents,
|
|
@@ -968,18 +968,18 @@ function nt(e, t, n) {
|
|
|
968
968
|
updateContextSchema: t == null ? void 0 : t.updateContextSchema
|
|
969
969
|
}, k;
|
|
970
970
|
}
|
|
971
|
-
const rt = /* @__PURE__ */
|
|
971
|
+
const rt = /* @__PURE__ */ Z({
|
|
972
972
|
name: "FNavDesign",
|
|
973
|
-
props:
|
|
973
|
+
props: C,
|
|
974
974
|
emits: ["nav"],
|
|
975
975
|
setup(e, t) {
|
|
976
976
|
const n = E(e.activeNavId), l = E(e.navData), y = E(e.horizontal);
|
|
977
977
|
E(e.navPicking);
|
|
978
|
-
const k = E(), N = oe("design-item-context"),
|
|
978
|
+
const k = E(), N = oe("design-item-context"), F = nt(k, N);
|
|
979
979
|
ie(() => {
|
|
980
|
-
k.value.componentInstance =
|
|
981
|
-
}), t.expose(
|
|
982
|
-
const
|
|
980
|
+
k.value.componentInstance = F;
|
|
981
|
+
}), t.expose(F.value);
|
|
982
|
+
const P = W({
|
|
983
983
|
get() {
|
|
984
984
|
return l.value;
|
|
985
985
|
},
|
|
@@ -991,8 +991,8 @@ const rt = /* @__PURE__ */ C({
|
|
|
991
991
|
return n.value;
|
|
992
992
|
},
|
|
993
993
|
set(i) {
|
|
994
|
-
if (n.value = i, n.value &&
|
|
995
|
-
const r =
|
|
994
|
+
if (n.value = i, n.value && P && P.value.length) {
|
|
995
|
+
const r = P.value.find((a) => a.id === n.value);
|
|
996
996
|
r && t.emit("nav", r);
|
|
997
997
|
}
|
|
998
998
|
}
|
|
@@ -1005,8 +1005,8 @@ const rt = /* @__PURE__ */ C({
|
|
|
1005
1005
|
}
|
|
1006
1006
|
});
|
|
1007
1007
|
function c() {
|
|
1008
|
-
if (
|
|
1009
|
-
const i =
|
|
1008
|
+
if (P.value && P.value.length && !n.value) {
|
|
1009
|
+
const i = P.value.find((r) => !r.disable);
|
|
1010
1010
|
i && (n.value = i.id);
|
|
1011
1011
|
}
|
|
1012
1012
|
}
|
|
@@ -1020,7 +1020,7 @@ const rt = /* @__PURE__ */ C({
|
|
|
1020
1020
|
class: ["farris-nav", {
|
|
1021
1021
|
"farris-nav-vertical": !d.value
|
|
1022
1022
|
}]
|
|
1023
|
-
}, [(i =
|
|
1023
|
+
}, [(i = P.value) == null ? void 0 : i.map((r) => w("div", {
|
|
1024
1024
|
class: ["farris-nav-item", {
|
|
1025
1025
|
active: r.id === p.value
|
|
1026
1026
|
}, {
|
|
@@ -1040,20 +1040,20 @@ const rt = /* @__PURE__ */ C({
|
|
|
1040
1040
|
}, [e.maxNum, V("+")])])])])]))]);
|
|
1041
1041
|
};
|
|
1042
1042
|
}
|
|
1043
|
-
}),
|
|
1043
|
+
}), mt = {
|
|
1044
1044
|
install(e) {
|
|
1045
1045
|
e.component(U.name, U);
|
|
1046
1046
|
},
|
|
1047
1047
|
register(e, t, n, l) {
|
|
1048
|
-
e.nav = U, t.nav =
|
|
1048
|
+
e.nav = U, t.nav = Y;
|
|
1049
1049
|
},
|
|
1050
1050
|
registerDesigner(e, t, n) {
|
|
1051
|
-
e.nav = rt, t.nav =
|
|
1051
|
+
e.nav = rt, t.nav = Y;
|
|
1052
1052
|
}
|
|
1053
1053
|
};
|
|
1054
1054
|
export {
|
|
1055
1055
|
U as FNav,
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1056
|
+
mt as default,
|
|
1057
|
+
C as navProps,
|
|
1058
|
+
Y as propsResolver
|
|
1059
1059
|
};
|