@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,21 +1,21 @@
|
|
|
1
|
-
import { ref as O, computed as F, defineComponent as
|
|
2
|
-
import {
|
|
1
|
+
import { ref as O, computed as F, defineComponent as J, watch as Q, createVNode as B, Fragment as fe, inject as pe, onMounted as de } from "vue";
|
|
2
|
+
import { cloneDeep as X, isPlainObject as Y } from "lodash-es";
|
|
3
3
|
import { getSchemaByTypeForDesigner as ge } from "../dynamic-resolver/index.esm.js";
|
|
4
4
|
import { withInstall as ve } from "../common/index.esm.js";
|
|
5
|
-
function
|
|
5
|
+
function Z(e, t) {
|
|
6
6
|
let r;
|
|
7
7
|
function i(s) {
|
|
8
|
-
const { properties: a, title: g, ignore: n } = s, o = n && Array.isArray(n), u = Object.keys(a).reduce((c, m) => ((!o || !n.find((T) => T === m)) && (c[m] = a[m].type === "object" && a[m].properties ? i(a[m]) :
|
|
8
|
+
const { properties: a, title: g, ignore: n } = s, o = n && Array.isArray(n), u = Object.keys(a).reduce((c, m) => ((!o || !n.find((T) => T === m)) && (c[m] = a[m].type === "object" && a[m].properties ? i(a[m]) : X(a[m].default)), c), {});
|
|
9
9
|
if (g && (!o || !n.find((c) => c === "id"))) {
|
|
10
10
|
const c = g.toLowerCase().replace(/-/g, "_");
|
|
11
11
|
u.id = `${c}_${Math.random().toString().slice(2, 6)}`;
|
|
12
12
|
}
|
|
13
13
|
return u;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function y(s) {
|
|
16
16
|
const { properties: a, title: g, required: n } = s;
|
|
17
17
|
if (n && Array.isArray(n)) {
|
|
18
|
-
const o = n.reduce((u, c) => (u[c] = a[c].type === "object" && a[c].properties ? i(a[c]) :
|
|
18
|
+
const o = n.reduce((u, c) => (u[c] = a[c].type === "object" && a[c].properties ? i(a[c]) : X(a[c].default), u), {});
|
|
19
19
|
if (g && n.find((u) => u === "id")) {
|
|
20
20
|
const u = g.toLowerCase().replace(/-/g, "_");
|
|
21
21
|
o.id = `${u}_${Math.random().toString().slice(2, 6)}`;
|
|
@@ -29,7 +29,7 @@ function x(e, t) {
|
|
|
29
29
|
function P(s, a = {}, g) {
|
|
30
30
|
const n = e[s];
|
|
31
31
|
if (n) {
|
|
32
|
-
let o =
|
|
32
|
+
let o = y(n);
|
|
33
33
|
const u = t[s];
|
|
34
34
|
return o = u ? u({ getSchemaByType: P }, o, a, g) : o, r != null && r.appendIdentifyForNewControl && r.appendIdentifyForNewControl(o), o;
|
|
35
35
|
}
|
|
@@ -79,7 +79,7 @@ function x(e, t) {
|
|
|
79
79
|
}
|
|
80
80
|
return { getSchemaByType: P, resolveSchemaWithDefaultValue: l, resolveSchemaToProps: j, mappingSchemaToProps: k, setDesignerContext: d };
|
|
81
81
|
}
|
|
82
|
-
const V = {}, H = {}, { resolveSchemaWithDefaultValue: me, resolveSchemaToProps:
|
|
82
|
+
const V = {}, H = {}, { getSchemaByType: bt, resolveSchemaWithDefaultValue: me, resolveSchemaToProps: ye, mappingSchemaToProps: be, setDesignerContext: ht } = Z(V, H);
|
|
83
83
|
function he(e = {}) {
|
|
84
84
|
function t(l, d, s, a) {
|
|
85
85
|
if (typeof s == "number")
|
|
@@ -103,7 +103,7 @@ function he(e = {}) {
|
|
|
103
103
|
["getProperty", r]
|
|
104
104
|
]);
|
|
105
105
|
Object.keys(e).reduce((l, d) => (l.set(d, e[d]), l), i);
|
|
106
|
-
function
|
|
106
|
+
function y(l, d) {
|
|
107
107
|
const s = l;
|
|
108
108
|
return typeof d == "number" ? [{ target: s, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: s, operator: "getProperty", param: l, value: !!d }] : typeof d == "object" ? Object.keys(d).map((a) => {
|
|
109
109
|
if (a === "length")
|
|
@@ -114,7 +114,7 @@ function he(e = {}) {
|
|
|
114
114
|
}
|
|
115
115
|
function P(l) {
|
|
116
116
|
return Object.keys(l).reduce((s, a) => {
|
|
117
|
-
const g =
|
|
117
|
+
const g = y(a, l[a]);
|
|
118
118
|
return s.push(...g), s;
|
|
119
119
|
}, []);
|
|
120
120
|
}
|
|
@@ -195,16 +195,16 @@ const Se = {
|
|
|
195
195
|
"language-textbox": { type: "language-textbox", name: "多语输入框" }
|
|
196
196
|
}, Te = {
|
|
197
197
|
convertFrom: (e, t, r) => {
|
|
198
|
-
var
|
|
198
|
+
var y;
|
|
199
199
|
const i = e.editor && e.editor[t] ? e.editor[t] : e[t];
|
|
200
|
-
return ((
|
|
200
|
+
return ((y = I[i]) == null ? void 0 : y.name) || i;
|
|
201
201
|
}
|
|
202
|
-
},
|
|
202
|
+
}, $e = {
|
|
203
203
|
convertTo: (e, t, r, i) => {
|
|
204
204
|
e[t] = e[t];
|
|
205
205
|
},
|
|
206
206
|
convertFrom: (e, t, r) => e.editor ? r.getRealEditorType(e.editor.type) : ""
|
|
207
|
-
},
|
|
207
|
+
}, we = {
|
|
208
208
|
convertTo: (e, t, r, i) => {
|
|
209
209
|
(e.type === "data-grid-column" || e.type === "tree-grid-column") && (e.formatter ? e.formatter[t] = r : e.formatter = {
|
|
210
210
|
[t]: r
|
|
@@ -319,8 +319,8 @@ const Se = {
|
|
|
319
319
|
e.selection || (e.selection = {}), e.selection[t] = r;
|
|
320
320
|
},
|
|
321
321
|
convertFrom: (e, t, r) => {
|
|
322
|
-
var i,
|
|
323
|
-
return t === "showCheckbox" ? (i = e.selection) != null && i.multiSelect ? !0 : (
|
|
322
|
+
var i, y;
|
|
323
|
+
return t === "showCheckbox" ? (i = e.selection) != null && i.multiSelect ? !0 : (y = e.selection) == null ? void 0 : y.showCheckbox : e.selection ? e.selection[t] : e[t];
|
|
324
324
|
}
|
|
325
325
|
}, Ce = {
|
|
326
326
|
convertFrom: (e, t, r) => e[t] && e[t].length ? `共 ${e[t].length} 项` : ""
|
|
@@ -336,19 +336,19 @@ const Se = {
|
|
|
336
336
|
convertFrom: (e, t, r) => e.size ? e.size[t] : e[t]
|
|
337
337
|
}, We = {
|
|
338
338
|
convertFrom: (e, t, r) => {
|
|
339
|
-
var i,
|
|
340
|
-
return (i = e.formatter) != null && i.data && t === "formatterEnumData" && !e.formatterEnumData ? (
|
|
339
|
+
var i, y;
|
|
340
|
+
return (i = e.formatter) != null && i.data && t === "formatterEnumData" && !e.formatterEnumData ? (y = e.formatter) == null ? void 0 : y.data : e.formatterEnumData;
|
|
341
341
|
}
|
|
342
342
|
}, Ae = {
|
|
343
343
|
convertTo: (e, t, r, i) => {
|
|
344
344
|
e.sort || (e.sort = {}), e.sort[t] = r;
|
|
345
345
|
},
|
|
346
346
|
convertFrom: (e, t, r) => {
|
|
347
|
-
var i,
|
|
347
|
+
var i, y;
|
|
348
348
|
if (t === "mode")
|
|
349
349
|
return ((i = e.sort) == null ? void 0 : i.mode) || "client";
|
|
350
350
|
if (t === "multiSort")
|
|
351
|
-
return !!((
|
|
351
|
+
return !!((y = e.sort) != null && y.multiSort);
|
|
352
352
|
}
|
|
353
353
|
}, Le = {
|
|
354
354
|
convertTo: (e, t, r, i) => {
|
|
@@ -382,8 +382,8 @@ function K(e, t, r) {
|
|
|
382
382
|
["/converter/property-editor.converter", Pe],
|
|
383
383
|
["/converter/items-count.converter", Ce],
|
|
384
384
|
["/converter/type.converter", Te],
|
|
385
|
-
["/converter/change-editor.converter",
|
|
386
|
-
["/converter/change-formatter.converter",
|
|
385
|
+
["/converter/change-editor.converter", $e],
|
|
386
|
+
["/converter/change-formatter.converter", we],
|
|
387
387
|
["/converter/column-command.converter", Oe],
|
|
388
388
|
["/converter/column-option.converter", Fe],
|
|
389
389
|
["/converter/summary.converter", je],
|
|
@@ -398,7 +398,7 @@ function K(e, t, r) {
|
|
|
398
398
|
["/converter/grid-sort.converter", Ae],
|
|
399
399
|
["/converter/grid-filter.converter", Le],
|
|
400
400
|
["/converter/row-option.converter", ze]
|
|
401
|
-
]),
|
|
401
|
+
]), y = /* @__PURE__ */ new Map([
|
|
402
402
|
["string", { type: "input-group", enableClear: !1 }],
|
|
403
403
|
["boolean", {
|
|
404
404
|
type: "combo-list",
|
|
@@ -438,9 +438,9 @@ function K(e, t, r) {
|
|
|
438
438
|
}
|
|
439
439
|
function d(n, o, u, c, m, T = "", D = "") {
|
|
440
440
|
return Object.keys(n).map((S) => {
|
|
441
|
-
const E = O(1), R = S, p = n[S], C = Object.keys(p), W = p.title, f = p.type, v =
|
|
442
|
-
|
|
443
|
-
const
|
|
441
|
+
const E = O(1), R = S, p = n[S], C = Object.keys(p), W = p.title, f = p.type, v = y.get(f) || { type: "input-group", enableClear: !1 }, b = p.editor ? Object.assign({}, v, p.editor) : Object.assign({}, v), $ = k(C, p, o), N = j(C, p, o);
|
|
442
|
+
b.readonly = b.readonly === void 0 ? N() : b.readonly;
|
|
443
|
+
const w = p.type === "cascade" ? d(p.properties, o, u, c, m, T, D) : [], A = !0;
|
|
444
444
|
let G = l(p, D);
|
|
445
445
|
const L = F({
|
|
446
446
|
get() {
|
|
@@ -455,8 +455,8 @@ function K(e, t, r) {
|
|
|
455
455
|
set(z) {
|
|
456
456
|
E.value += 1, G && G.convertTo ? (G.convertTo(c, S, z, m, T), G.convertTo(u, S, z, m, T)) : (c[S] = z, u[S] = z);
|
|
457
457
|
}
|
|
458
|
-
}), { refreshPanelAfterChanged: q, description: ae, isExpand: ce, parentPropertyID: le } = p,
|
|
459
|
-
return o[R] =
|
|
458
|
+
}), { refreshPanelAfterChanged: q, description: ae, isExpand: ce, parentPropertyID: le } = p, x = { propertyID: R, propertyName: W, propertyType: f, propertyValue: L, editor: b, visible: $, readonly: N, cascadeConfig: w, hideCascadeTitle: A, refreshPanelAfterChanged: q, description: ae, isExpand: ce, parentPropertyID: le };
|
|
459
|
+
return o[R] = x, x;
|
|
460
460
|
});
|
|
461
461
|
}
|
|
462
462
|
function s(n, o, u = {}) {
|
|
@@ -470,8 +470,8 @@ function K(e, t, r) {
|
|
|
470
470
|
const T = o.$ref.schema, D = o.$ref.converter, M = u[T], S = M.type, E = r(M), R = {}, p = e[S];
|
|
471
471
|
if (p && p.categories) {
|
|
472
472
|
const C = p.categories[n], W = C == null ? void 0 : C.title;
|
|
473
|
-
D && Object.keys(C.properties).forEach((
|
|
474
|
-
C.properties[
|
|
473
|
+
D && Object.keys(C.properties).forEach((b) => {
|
|
474
|
+
C.properties[b].$converter = D;
|
|
475
475
|
});
|
|
476
476
|
const f = (C == null ? void 0 : C.properties) || {}, v = d(f, R, E, M, c, m);
|
|
477
477
|
return { categoryId: n, categoryName: W, properties: v };
|
|
@@ -489,8 +489,8 @@ function K(e, t, r) {
|
|
|
489
489
|
E.push(a(R, p, n, o, c));
|
|
490
490
|
return;
|
|
491
491
|
}
|
|
492
|
-
const C = p == null ? void 0 : p.title, W = p == null ? void 0 : p.tabId, f = p == null ? void 0 : p.tabName, v = p == null ? void 0 : p.hide,
|
|
493
|
-
E.push({ categoryId: R, categoryName: C, tabId: W, tabName: f, hide: v, properties:
|
|
492
|
+
const C = p == null ? void 0 : p.title, W = p == null ? void 0 : p.tabId, f = p == null ? void 0 : p.tabName, v = p == null ? void 0 : p.hide, b = p == null ? void 0 : p.hideTitle, $ = d(p.properties || {}, M, D, n, o, c, p.$converter), { setPropertyRelates: N } = p, w = p == null ? void 0 : p.parentPropertyID;
|
|
493
|
+
E.push({ categoryId: R, categoryName: C, tabId: W, tabName: f, hide: v, properties: $, hideTitle: b, setPropertyRelates: N, parentPropertyID: w });
|
|
494
494
|
}), E;
|
|
495
495
|
}
|
|
496
496
|
return [];
|
|
@@ -503,26 +503,26 @@ function K(e, t, r) {
|
|
|
503
503
|
}
|
|
504
504
|
const ee = {}, te = {};
|
|
505
505
|
K(ee, te, me);
|
|
506
|
-
const re = {}, ne = {}, { resolveSchemaWithDefaultValue: qe } =
|
|
506
|
+
const re = {}, ne = {}, { getSchemaByType: St, resolveSchemaWithDefaultValue: qe, resolveSchemaToProps: kt, mappingSchemaToProps: Pt, setDesignerContext: Tt } = Z(re, ne), oe = {}, se = {};
|
|
507
507
|
K(oe, se, qe);
|
|
508
|
-
function _e(e, t, r = /* @__PURE__ */ new Map(), i = (h, k, j, l) => k,
|
|
509
|
-
return V[t.title] = t, H[t.title] = i, ee[t.title] =
|
|
508
|
+
function _e(e, t, r = /* @__PURE__ */ new Map(), i = (h, k, j, l) => k, y = {}, P = (h) => h) {
|
|
509
|
+
return V[t.title] = t, H[t.title] = i, ee[t.title] = y, te[t.title] = P, re[t.title] = t, ne[t.title] = i, oe[t.title] = y, se[t.title] = P, (h = {}, k = !0) => {
|
|
510
510
|
if (!k)
|
|
511
|
-
return
|
|
512
|
-
const j =
|
|
511
|
+
return be(h, r);
|
|
512
|
+
const j = ye(h, t, r), l = Object.keys(e).reduce((d, s) => (d[s] = e[s].default, d), {});
|
|
513
513
|
return Object.assign(l, j);
|
|
514
514
|
};
|
|
515
515
|
}
|
|
516
516
|
function Ue(e, t) {
|
|
517
517
|
return { customClass: t.class, customStyle: t.style };
|
|
518
518
|
}
|
|
519
|
-
const
|
|
519
|
+
const xe = /* @__PURE__ */ new Map([
|
|
520
520
|
["appearance", Ue]
|
|
521
521
|
]);
|
|
522
|
-
function
|
|
522
|
+
function Xe(e, t, r) {
|
|
523
523
|
return t;
|
|
524
524
|
}
|
|
525
|
-
const
|
|
525
|
+
const Ye = "https://json-schema.org/draft/2020-12/schema", Je = "https://farris-design.gitee.io/progress.schema.json", Qe = "progress", Ze = "A Farris Component", Ve = "object", He = {
|
|
526
526
|
id: {
|
|
527
527
|
description: "The unique identifier for progress",
|
|
528
528
|
type: "string"
|
|
@@ -588,10 +588,10 @@ const Je = "https://json-schema.org/draft/2020-12/schema", Qe = "https://farris-
|
|
|
588
588
|
"id",
|
|
589
589
|
"type"
|
|
590
590
|
], Ke = {
|
|
591
|
-
$schema:
|
|
592
|
-
$id:
|
|
593
|
-
title:
|
|
594
|
-
description:
|
|
591
|
+
$schema: Ye,
|
|
592
|
+
$id: Je,
|
|
593
|
+
title: Qe,
|
|
594
|
+
description: Ze,
|
|
595
595
|
type: Ve,
|
|
596
596
|
properties: He,
|
|
597
597
|
required: Ie
|
|
@@ -653,7 +653,7 @@ const Je = "https://json-schema.org/draft/2020-12/schema", Qe = "https://farris-
|
|
|
653
653
|
* 格式化进度信息
|
|
654
654
|
*/
|
|
655
655
|
format: { type: Function, default: (e, t) => `${e}%` }
|
|
656
|
-
}, ie = _e(U, Ke,
|
|
656
|
+
}, ie = _e(U, Ke, xe, Xe, ot);
|
|
657
657
|
function st(e) {
|
|
658
658
|
function t(h) {
|
|
659
659
|
return +h.replace("%", "");
|
|
@@ -668,7 +668,7 @@ function st(e) {
|
|
|
668
668
|
});
|
|
669
669
|
}), k = k.sort((j, l) => j.key - l.key), k;
|
|
670
670
|
}
|
|
671
|
-
const i = F(() => !!e.strokeColor && typeof e.strokeColor != "string"),
|
|
671
|
+
const i = F(() => !!e.strokeColor && typeof e.strokeColor != "string"), y = F(() => {
|
|
672
672
|
const { from: h = "#59a1ff", to: k = "#59a1ff", direction: j = "to right", ...l } = e.strokeColor;
|
|
673
673
|
if (Object.keys(l).length !== 0) {
|
|
674
674
|
const d = r(l).map(({ key: s, value: a }) => `${a} ${s}%`).join(", ");
|
|
@@ -678,7 +678,7 @@ function st(e) {
|
|
|
678
678
|
}), P = F(() => r(e.strokeColor).map(({ key: h, value: k }) => ({ offset: `${h}%`, color: k })));
|
|
679
679
|
return {
|
|
680
680
|
isGradient: i,
|
|
681
|
-
linearGradient:
|
|
681
|
+
linearGradient: y,
|
|
682
682
|
circleGradient: P
|
|
683
683
|
};
|
|
684
684
|
}
|
|
@@ -689,13 +689,13 @@ function at(e) {
|
|
|
689
689
|
return { formatPercentageText: F(() => e.format(e.percent, e.successPercent)) };
|
|
690
690
|
}
|
|
691
691
|
function ct(e, t, r, i) {
|
|
692
|
-
const { isCircleStyle:
|
|
692
|
+
const { isCircleStyle: y } = t, { isGradient: P, linearGradient: h } = r, { strokeWidth: k } = i, j = F(() => {
|
|
693
693
|
const c = {
|
|
694
694
|
"f-progress": !0,
|
|
695
695
|
"f-progress-line": e.progressType === "line",
|
|
696
696
|
"ant-progress-small": e.size === "small",
|
|
697
697
|
"f-progress-show-info": e.showInfo,
|
|
698
|
-
"f-progress-circle":
|
|
698
|
+
"f-progress-circle": y.value
|
|
699
699
|
}, m = `f-progress-status-${e.progressStatus}`;
|
|
700
700
|
return c[m] = !0, c;
|
|
701
701
|
}), l = F(() => ({
|
|
@@ -767,17 +767,17 @@ function lt(e) {
|
|
|
767
767
|
}
|
|
768
768
|
function ut(e) {
|
|
769
769
|
const t = F(() => {
|
|
770
|
-
const
|
|
770
|
+
const y = {
|
|
771
771
|
"f-progress-text-icon": !0,
|
|
772
772
|
"f-icon": !0
|
|
773
773
|
}, P = `f-icon-${e.progressStatus}`;
|
|
774
|
-
return
|
|
774
|
+
return y[P] = !0, y;
|
|
775
775
|
}), r = F(() => {
|
|
776
|
-
const
|
|
776
|
+
const y = {
|
|
777
777
|
"f-progress-text-icon": !0,
|
|
778
778
|
"f-icon": !0
|
|
779
779
|
}, P = e.progressStatus === "success" ? "f-icon-checkmark" : "f-icon-x";
|
|
780
|
-
return
|
|
780
|
+
return y[P] = !0, y;
|
|
781
781
|
}), i = F(() => e.progressStatus === "error" || e.progressStatus === "success");
|
|
782
782
|
return {
|
|
783
783
|
inlineProgrssStatusClass: t,
|
|
@@ -794,12 +794,12 @@ function ft(e) {
|
|
|
794
794
|
})), r = F(() => e.successPercent || e.successPercent === 0);
|
|
795
795
|
return { inlineProgressSuccessBackgroundStyle: t, shouldShowSuccessInlineProgressBackground: r };
|
|
796
796
|
}
|
|
797
|
-
const _ = /* @__PURE__ */
|
|
797
|
+
const _ = /* @__PURE__ */ J({
|
|
798
798
|
name: "FProgress",
|
|
799
799
|
props: U,
|
|
800
800
|
emits: [],
|
|
801
801
|
setup(e) {
|
|
802
|
-
const t = O(e.progressType), r = O(e.showInfo), i = O(e.percent),
|
|
802
|
+
const t = O(e.progressType), r = O(e.showInfo), i = O(e.percent), y = O(e.strokeLinecap), P = st(e), {
|
|
803
803
|
isGradient: h,
|
|
804
804
|
circleGradient: k
|
|
805
805
|
} = P, j = it(e), {
|
|
@@ -825,7 +825,7 @@ const _ = /* @__PURE__ */ Q({
|
|
|
825
825
|
inlineProgressSuccessBackgroundStyle: R,
|
|
826
826
|
shouldShowSuccessInlineProgressBackground: p
|
|
827
827
|
} = ft(e);
|
|
828
|
-
|
|
828
|
+
Q(() => e.percent, (v) => {
|
|
829
829
|
i.value = v || 0;
|
|
830
830
|
});
|
|
831
831
|
function C() {
|
|
@@ -875,7 +875,7 @@ const _ = /* @__PURE__ */ Q({
|
|
|
875
875
|
class: "f-progress-circle-path",
|
|
876
876
|
"fill-opacity": "0",
|
|
877
877
|
d: u.value,
|
|
878
|
-
"stroke-linecap":
|
|
878
|
+
"stroke-linecap": y.value,
|
|
879
879
|
stroke: v.stroke,
|
|
880
880
|
"stroke-width": i.value ? l.value : 0,
|
|
881
881
|
style: v.strokePathStyle
|
|
@@ -888,7 +888,7 @@ const _ = /* @__PURE__ */ Q({
|
|
|
888
888
|
});
|
|
889
889
|
function pt(e, t, r) {
|
|
890
890
|
var W;
|
|
891
|
-
const i = "",
|
|
891
|
+
const i = "", y = "", P = O();
|
|
892
892
|
let h;
|
|
893
893
|
function k() {
|
|
894
894
|
return (t == null ? void 0 : t.schema.componentType) !== "frame";
|
|
@@ -907,19 +907,19 @@ function pt(e, t, r) {
|
|
|
907
907
|
return null;
|
|
908
908
|
if (f.value.schema && f.value.schema.type === "component")
|
|
909
909
|
return f.value;
|
|
910
|
-
const v = O(f == null ? void 0 : f.value.parent),
|
|
911
|
-
return
|
|
910
|
+
const v = O(f == null ? void 0 : f.value.parent), b = s(v);
|
|
911
|
+
return b || null;
|
|
912
912
|
}
|
|
913
913
|
function a(f = t) {
|
|
914
914
|
var N;
|
|
915
|
-
const { componentInstance: v, designerItemElementRef:
|
|
915
|
+
const { componentInstance: v, designerItemElementRef: b } = f;
|
|
916
916
|
if (!v || !v.value)
|
|
917
917
|
return null;
|
|
918
|
-
const { getCustomButtons:
|
|
919
|
-
return v.value.canMove ||
|
|
918
|
+
const { getCustomButtons: $ } = v.value;
|
|
919
|
+
return v.value.canMove || $ && ((N = $()) != null && N.length) ? b : a(f.parent);
|
|
920
920
|
}
|
|
921
921
|
function g(f) {
|
|
922
|
-
return
|
|
922
|
+
return !!r;
|
|
923
923
|
}
|
|
924
924
|
function n() {
|
|
925
925
|
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
@@ -927,14 +927,14 @@ function pt(e, t, r) {
|
|
|
927
927
|
function o() {
|
|
928
928
|
}
|
|
929
929
|
function u(f, v) {
|
|
930
|
-
var
|
|
931
|
-
!f || !v || (
|
|
930
|
+
var b;
|
|
931
|
+
!f || !v || (b = t == null ? void 0 : t.setupContext) == null || b.emit("dragEnd");
|
|
932
932
|
}
|
|
933
933
|
function c(f, v) {
|
|
934
|
-
const { componentType:
|
|
935
|
-
let
|
|
936
|
-
const N =
|
|
937
|
-
return
|
|
934
|
+
const { componentType: b } = f;
|
|
935
|
+
let $ = ge(b, f, v);
|
|
936
|
+
const N = b.toLowerCase().replace(/-/g, "_");
|
|
937
|
+
return $ && !$.id && $.type === b && ($.id = `${N}_${Math.random().toString().slice(2, 6)}`), $;
|
|
938
938
|
}
|
|
939
939
|
function m(f) {
|
|
940
940
|
}
|
|
@@ -943,40 +943,40 @@ function pt(e, t, r) {
|
|
|
943
943
|
function D(f) {
|
|
944
944
|
if (!f)
|
|
945
945
|
return;
|
|
946
|
-
const v = t == null ? void 0 : t.schema, { formSchemaUtils:
|
|
947
|
-
if (v &&
|
|
948
|
-
const
|
|
949
|
-
|
|
946
|
+
const v = t == null ? void 0 : t.schema, { formSchemaUtils: b } = f;
|
|
947
|
+
if (v && b.getExpressions().length) {
|
|
948
|
+
const $ = b.getExpressions().findIndex((N) => N.target === v.id);
|
|
949
|
+
$ > -1 && b.getExpressions().splice($, 1);
|
|
950
950
|
}
|
|
951
951
|
}
|
|
952
952
|
function M(f) {
|
|
953
953
|
if (!f || !(t != null && t.schema))
|
|
954
954
|
return;
|
|
955
|
-
const v = t.schema, { formSchemaUtils:
|
|
956
|
-
|
|
955
|
+
const v = t.schema, { formSchemaUtils: b } = f;
|
|
956
|
+
b.removeCommunicationInComponent(v);
|
|
957
957
|
}
|
|
958
958
|
function S(f) {
|
|
959
959
|
D(f), M(f), t != null && t.schema.contents && t.schema.contents.map((v) => {
|
|
960
|
-
let
|
|
961
|
-
v.type === "component-ref" && (
|
|
962
|
-
const
|
|
963
|
-
|
|
964
|
-
var
|
|
965
|
-
(
|
|
960
|
+
let b = v.id;
|
|
961
|
+
v.type === "component-ref" && (b = v.component);
|
|
962
|
+
const $ = e.value.querySelectorAll(`#${b}-design-item`);
|
|
963
|
+
$ != null && $.length && Array.from($).map((N) => {
|
|
964
|
+
var w;
|
|
965
|
+
(w = N == null ? void 0 : N.componentInstance) != null && w.value.onRemoveComponent && N.componentInstance.value.onRemoveComponent(f);
|
|
966
966
|
});
|
|
967
967
|
});
|
|
968
968
|
}
|
|
969
969
|
function E() {
|
|
970
970
|
}
|
|
971
971
|
function R(f) {
|
|
972
|
-
var
|
|
973
|
-
if (!((
|
|
972
|
+
var b, $;
|
|
973
|
+
if (!((b = t == null ? void 0 : t.schema) != null && b.id))
|
|
974
974
|
return;
|
|
975
975
|
!h && f && (h = f.formSchemaUtils);
|
|
976
976
|
let v = "";
|
|
977
977
|
{
|
|
978
|
-
const { text: N, title:
|
|
979
|
-
v = N ||
|
|
978
|
+
const { text: N, title: w, label: A, mainTitle: G, name: L, type: q } = t.schema;
|
|
979
|
+
v = N || w || A || G || L || (($ = I[q]) == null ? void 0 : $.name);
|
|
980
980
|
}
|
|
981
981
|
v && h.getControlBasicInfoMap().set(t.schema.id, {
|
|
982
982
|
componentTitle: v,
|
|
@@ -985,15 +985,15 @@ function pt(e, t, r) {
|
|
|
985
985
|
}
|
|
986
986
|
function p(f) {
|
|
987
987
|
var N;
|
|
988
|
-
const { changeObject: v } = f, { propertyID:
|
|
989
|
-
if (["text", "title", "label", "name", "mainTitle"].includes((N = f == null ? void 0 : f.changeObject) == null ? void 0 : N.propertyID) &&
|
|
990
|
-
const
|
|
988
|
+
const { changeObject: v } = f, { propertyID: b, propertyValue: $ } = v;
|
|
989
|
+
if (["text", "title", "label", "name", "mainTitle"].includes((N = f == null ? void 0 : f.changeObject) == null ? void 0 : N.propertyID) && b && $ && (R(), h)) {
|
|
990
|
+
const w = h.getControlBasicInfoMap(), A = w.keys().toArray().filter((G) => {
|
|
991
991
|
var L, q;
|
|
992
|
-
return ((L =
|
|
992
|
+
return ((L = w.get(G)) == null ? void 0 : L.reliedComponentId) === ((q = t == null ? void 0 : t.schema) == null ? void 0 : q.id);
|
|
993
993
|
});
|
|
994
994
|
A != null && A.length && A.forEach((G) => {
|
|
995
|
-
const L =
|
|
996
|
-
L[0] = w
|
|
995
|
+
const L = w.get(G).parentPathName.split(" > ");
|
|
996
|
+
L[0] = $, w.get(G).parentPathName = L.join(" > ");
|
|
997
997
|
});
|
|
998
998
|
}
|
|
999
999
|
}
|
|
@@ -1010,7 +1010,7 @@ function pt(e, t, r) {
|
|
|
1010
1010
|
parent: (W = t == null ? void 0 : t.parent) == null ? void 0 : W.componentInstance,
|
|
1011
1011
|
schema: t == null ? void 0 : t.schema,
|
|
1012
1012
|
styles: i,
|
|
1013
|
-
designerClass:
|
|
1013
|
+
designerClass: y,
|
|
1014
1014
|
canAccepts: g,
|
|
1015
1015
|
getBelongedComponentInstance: s,
|
|
1016
1016
|
getDraggableDesignItemElement: a,
|
|
@@ -1029,26 +1029,26 @@ function pt(e, t, r) {
|
|
|
1029
1029
|
updateContextSchema: t == null ? void 0 : t.updateContextSchema
|
|
1030
1030
|
}, P;
|
|
1031
1031
|
}
|
|
1032
|
-
const dt = /* @__PURE__ */
|
|
1032
|
+
const dt = /* @__PURE__ */ J({
|
|
1033
1033
|
name: "FProgressDesign",
|
|
1034
1034
|
props: U,
|
|
1035
1035
|
emits: [],
|
|
1036
1036
|
setup(e, t) {
|
|
1037
|
-
const r = O(e.progressStatus), i = O(e.progressType),
|
|
1037
|
+
const r = O(e.progressStatus), i = O(e.progressType), y = O(e.size), P = O(e.showInfo), h = O(e.strokeWidth), k = O(e.percent), j = O(e.strokeLinecap), l = O(!1), d = O(e.strokeColor), s = O(null), a = O(0), g = O(e.width), n = O(""), o = O([]), u = O(""), c = O([]), m = O(e.enableBackgroundImg), T = O(e.backgroundImg), D = O(), M = pe("design-item-context"), S = pt(D, M);
|
|
1038
1038
|
de(() => {
|
|
1039
1039
|
D.value.componentInstance = S;
|
|
1040
|
-
}), t.expose(S.value),
|
|
1041
|
-
k.value =
|
|
1040
|
+
}), t.expose(S.value), Q(() => e.percent, (w) => {
|
|
1041
|
+
k.value = w || 0;
|
|
1042
1042
|
});
|
|
1043
|
-
const E = F(() => h.value || (i.value === "line" &&
|
|
1044
|
-
const
|
|
1043
|
+
const E = F(() => h.value || (i.value === "line" && y.value !== "small" ? 8 : 6)), R = F(() => i.value === "circle" || i.value === "dashboard"), p = F(() => {
|
|
1044
|
+
const w = {
|
|
1045
1045
|
"f-progress": !0,
|
|
1046
1046
|
"f-progress-line": i.value === "line",
|
|
1047
|
-
"ant-progress-small":
|
|
1047
|
+
"ant-progress-small": y.value === "small",
|
|
1048
1048
|
"f-progress-show-info": P.value,
|
|
1049
1049
|
".f-progress-circle": R.value
|
|
1050
1050
|
}, A = `f-progress-status-${r.value}`;
|
|
1051
|
-
return
|
|
1051
|
+
return w[A] = !0, w;
|
|
1052
1052
|
}), C = F(() => ({
|
|
1053
1053
|
width: `${k.value}%`,
|
|
1054
1054
|
"border-radius": j.value === "round" ? "100px" : "0",
|
|
@@ -1074,16 +1074,16 @@ const dt = /* @__PURE__ */ Q({
|
|
|
1074
1074
|
style: W.value
|
|
1075
1075
|
}, null)])]);
|
|
1076
1076
|
}
|
|
1077
|
-
const
|
|
1077
|
+
const b = F(() => ({
|
|
1078
1078
|
width: `${g.value}px`,
|
|
1079
1079
|
height: `${g.value}px`,
|
|
1080
1080
|
"font-size": `${g.value * 0.15 + 6}px`,
|
|
1081
1081
|
"f-progress-circle-gradient": l.value
|
|
1082
|
-
})),
|
|
1082
|
+
})), $ = F(() => ({}));
|
|
1083
1083
|
function N() {
|
|
1084
1084
|
return B("div", {
|
|
1085
1085
|
class: "f-progress-inner",
|
|
1086
|
-
style:
|
|
1086
|
+
style: b.value
|
|
1087
1087
|
}, [B("svg", {
|
|
1088
1088
|
class: "f-progress-circle",
|
|
1089
1089
|
viewBox: "0 0 100 100"
|
|
@@ -1093,24 +1093,24 @@ const dt = /* @__PURE__ */ Q({
|
|
|
1093
1093
|
y1: "0%",
|
|
1094
1094
|
x2: "0%",
|
|
1095
1095
|
y2: "0%"
|
|
1096
|
-
}, [o.value.map((
|
|
1097
|
-
offset:
|
|
1098
|
-
"stop-color":
|
|
1096
|
+
}, [o.value.map((w) => B("stop", {
|
|
1097
|
+
offset: w.offset,
|
|
1098
|
+
"stop-color": w.color
|
|
1099
1099
|
}, null))])]), B("path", {
|
|
1100
1100
|
class: "f-progress-circle-trail",
|
|
1101
1101
|
stroke: "#efefef",
|
|
1102
1102
|
"fill-opacity": "0",
|
|
1103
1103
|
"stroke-width": E.value,
|
|
1104
1104
|
d: u.value,
|
|
1105
|
-
style:
|
|
1106
|
-
}, null), c.value.map((
|
|
1105
|
+
style: $.value
|
|
1106
|
+
}, null), c.value.map((w) => B("path", {
|
|
1107
1107
|
class: "f-progress-circle-path",
|
|
1108
1108
|
"fill-opacity": "0",
|
|
1109
1109
|
d: u.value,
|
|
1110
1110
|
"stroke-linecap": j.value,
|
|
1111
|
-
stroke:
|
|
1111
|
+
stroke: w.stroke,
|
|
1112
1112
|
"stroke-width": k.value ? E.value : 0,
|
|
1113
|
-
style:
|
|
1113
|
+
style: w.strokePathStyle
|
|
1114
1114
|
}, null))])]);
|
|
1115
1115
|
}
|
|
1116
1116
|
return () => B("div", {
|
|
@@ -1125,10 +1125,10 @@ _.register = (e, t, r) => {
|
|
|
1125
1125
|
_.registerDesigner = (e, t, r) => {
|
|
1126
1126
|
e.progress = dt, t.progress = ie;
|
|
1127
1127
|
};
|
|
1128
|
-
const
|
|
1128
|
+
const $t = ve(_);
|
|
1129
1129
|
export {
|
|
1130
1130
|
_ as Progress,
|
|
1131
|
-
|
|
1131
|
+
$t as default,
|
|
1132
1132
|
U as progressProps,
|
|
1133
1133
|
ie as propsResolver
|
|
1134
1134
|
};
|