@farris/ui-vue 1.2.6 → 1.2.8
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 +150 -142
- package/components/avatar/index.esm.js +393 -457
- package/components/border-editor/index.esm.js +4 -4
- package/components/button/index.esm.js +1 -1
- package/components/button-edit/index.esm.js +353 -444
- package/components/button-group/index.esm.js +5 -5
- package/components/calendar/index.esm.js +176 -176
- package/components/capsule/index.esm.js +93 -93
- package/components/checkbox/index.esm.js +491 -554
- package/components/color-picker/index.esm.js +1 -1
- package/components/combo-list/index.esm.js +479 -513
- package/components/combo-tree/index.esm.js +8 -8
- package/components/component/index.esm.js +89 -89
- package/components/condition/index.esm.js +857 -743
- package/components/content-container/index.esm.js +61 -61
- package/components/data-grid/index.esm.js +4883 -5182
- package/components/data-view/index.esm.js +3072 -2949
- package/components/date-picker/index.esm.js +2626 -2689
- package/components/dependent-base/style.js +1 -0
- package/components/dependent-fluid/style.js +1 -0
- package/components/dependent-icon/style.js +1 -0
- package/components/dependent-input/style.js +1 -0
- package/components/dependent-table/style.js +1 -0
- package/components/designer-canvas/index.esm.js +478 -475
- package/components/designer-outline/index.esm.js +173 -131
- package/components/discussion-editor/index.esm.js +1 -1
- package/components/dropdown/index.esm.js +73 -73
- package/components/dynamic-form/index.esm.js +940 -998
- package/components/dynamic-resolver/index.esm.js +67 -35
- package/components/dynamic-view/index.esm.js +307 -293
- package/components/enum-editor/index.esm.js +3 -3
- package/components/events-editor/index.esm.js +178 -178
- package/components/expression-editor/index.esm.js +105 -105
- package/components/external-container/index.esm.js +1747 -1627
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5877 -6176
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1454 -1524
- package/components/flow-canvas/index.esm.js +678 -675
- package/components/image-cropper/index.esm.js +266 -266
- package/components/input-group/index.esm.js +659 -722
- package/components/layout/index.esm.js +148 -148
- package/components/list-nav/index.esm.js +109 -109
- package/components/list-view/index.esm.js +1643 -1524
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +6502 -6770
- package/components/mapping-editor/index.esm.js +5639 -5939
- package/components/message-box/index.esm.js +1 -1
- package/components/modal/index.esm.js +1 -1
- package/components/nav/index.esm.js +86 -86
- package/components/number-range/index.esm.js +1120 -0
- package/components/number-range/package.json +8 -0
- package/components/number-range/style.js +6 -0
- package/components/number-spinner/index.esm.js +1146 -0
- package/components/number-spinner/package.json +8 -0
- package/components/number-spinner/style.js +4 -0
- package/components/order/index.esm.js +1098 -1130
- package/components/page-footer/index.esm.js +106 -106
- package/components/page-header/index.esm.js +1088 -1317
- package/components/pagination/index.esm.js +252 -252
- package/components/progress/index.esm.js +37 -37
- package/components/property-editor/index.esm.js +1479 -1513
- package/components/property-panel/index.css +1 -1
- package/components/property-panel/index.esm.js +706 -778
- package/components/query-solution/index.css +1 -0
- package/components/query-solution/index.esm.js +6935 -0
- package/components/query-solution/package.json +8 -0
- package/components/query-solution/style.js +2 -0
- package/components/radio-button/index.esm.js +64 -64
- package/components/radio-group/index.esm.js +453 -516
- package/components/rate/index.esm.js +92 -92
- package/components/response-layout/index.esm.js +33 -33
- package/components/response-layout-editor/index.esm.js +555 -526
- package/components/response-toolbar/index.esm.js +1009 -1247
- package/components/schema-selector/index.esm.js +3261 -3373
- package/components/search-box/index.esm.js +143 -143
- package/components/section/index.esm.js +209 -209
- package/components/smoke-detector/index.esm.js +22 -22
- package/components/spacing-editor/index.esm.js +2 -2
- package/components/splitter/index.esm.js +1097 -394
- package/components/step/index.esm.js +153 -153
- package/components/switch/index.esm.js +441 -504
- package/components/tabs/index.esm.js +1849 -2039
- package/components/tags/index.esm.js +215 -215
- package/components/text/index.esm.js +53 -53
- package/components/textarea/index.esm.js +445 -493
- package/components/time-picker/index.esm.js +1350 -1414
- package/components/transfer/index.esm.js +146 -144
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5948 -6237
- package/components/tree-view/index.esm.js +2381 -2255
- package/components/uploader/index.esm.js +1 -1
- package/components/verify-detail/index.esm.js +232 -232
- package/components/video/index.esm.js +136 -136
- package/components/weather/index.esm.js +2 -2
- package/farris.all.esm.js +27221 -26804
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/checkbox/index.d.ts +1 -0
- package/types/combo-list/src/components/list-container.component.d.ts +6 -0
- package/types/combo-list/src/components/list-container.props.d.ts +9 -1
- package/types/data-grid/src/data-grid.props.d.ts +1 -0
- package/types/data-grid/src/designer/column-header.design.component.d.ts +1 -1
- package/types/data-grid/src/designer/data-grid-column.props.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +1 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
- package/types/designer-canvas/src/types.d.ts +1 -1
- package/types/dynamic-form/index.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/binding-resolver.d.ts +1 -0
- package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
- package/types/lookup/src/property-config/converters/lookup-property.converter.d.ts +0 -4
- package/types/lookup/src/property-config/lookup.property-config.d.ts +4 -3
- package/types/modal/src/modal.props.d.ts +1 -4
- package/types/property-panel/src/composition/entity/base-property.d.ts +0 -28
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -5
- package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +19 -0
- package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
- package/types/tree-grid/src/designer/use-designer-rules.d.ts +3 -0
- package/types/tree-grid/src/property-config/tree-grid.property-config.d.ts +11 -0
- package/types/tree-grid/src/schema/column-resolver.d.ts +1 -1
- package/types/tree-grid/src/tree-grid.props.d.ts +8 -0
- package/components/accordion/index.umd.cjs +0 -1
- package/components/avatar/index.umd.cjs +0 -1
- package/components/border-editor/index.umd.cjs +0 -1
- package/components/button/index.umd.cjs +0 -1
- package/components/button-edit/index.umd.cjs +0 -1
- package/components/button-group/index.umd.cjs +0 -1
- package/components/calculator/index.umd.cjs +0 -1
- package/components/calendar/index.umd.cjs +0 -1
- package/components/capsule/index.umd.cjs +0 -1
- package/components/checkbox/index.umd.cjs +0 -1
- package/components/color-picker/index.umd.cjs +0 -3
- package/components/combo-list/index.umd.cjs +0 -1
- package/components/combo-tree/index.umd.cjs +0 -1
- package/components/common/index.umd.cjs +0 -1
- package/components/component/index.umd.cjs +0 -1
- package/components/condition/index.umd.cjs +0 -1
- package/components/content-container/index.umd.cjs +0 -1
- package/components/data-grid/index.umd.cjs +0 -1
- package/components/data-view/index.umd.cjs +0 -1
- package/components/date-picker/index.umd.cjs +0 -1
- package/components/designer-canvas/index.umd.cjs +0 -1
- package/components/designer-outline/index.umd.cjs +0 -1
- package/components/designer-toolbox/index.umd.cjs +0 -1
- package/components/discussion-editor/index.umd.cjs +0 -3
- package/components/discussion-list/index.umd.cjs +0 -1
- package/components/drawer/index.umd.cjs +0 -1
- package/components/dropdown/index.umd.cjs +0 -2
- package/components/dynamic-form/index.umd.cjs +0 -1
- package/components/dynamic-resolver/index.umd.cjs +0 -1
- package/components/dynamic-view/index.umd.cjs +0 -1
- package/components/enum-editor/index.umd.cjs +0 -1
- package/components/events-editor/index.umd.cjs +0 -1
- package/components/expression-editor/index.umd.cjs +0 -1
- package/components/external-container/index.umd.cjs +0 -1
- package/components/field-selector/index.umd.cjs +0 -1
- package/components/filter-bar/index.umd.cjs +0 -1
- package/components/flow-canvas/index.umd.cjs +0 -1
- package/components/image-cropper/index.umd.cjs +0 -1
- package/components/input-group/index.umd.cjs +0 -1
- package/components/layout/index.umd.cjs +0 -1
- package/components/list-nav/index.umd.cjs +0 -1
- package/components/list-view/index.umd.cjs +0 -1
- package/components/loading/index.umd.cjs +0 -8
- package/components/locale/index.umd.cjs +0 -1
- package/components/lookup/index.umd.cjs +0 -1
- package/components/mapping-editor/index.umd.cjs +0 -1
- package/components/message-box/index.umd.cjs +0 -1
- package/components/modal/index.umd.cjs +0 -1
- package/components/nav/index.umd.cjs +0 -3
- package/components/notify/index.umd.cjs +0 -1
- package/components/order/index.umd.cjs +0 -1
- package/components/page-footer/index.umd.cjs +0 -1
- package/components/page-header/index.umd.cjs +0 -1
- package/components/pagination/index.umd.cjs +0 -1
- package/components/popover/index.umd.cjs +0 -1
- package/components/progress/index.umd.cjs +0 -3
- package/components/property-editor/index.umd.cjs +0 -3
- package/components/property-panel/index.umd.cjs +0 -1
- package/components/radio-button/index.umd.cjs +0 -1
- package/components/radio-group/index.umd.cjs +0 -1
- package/components/rate/index.umd.cjs +0 -1
- package/components/response-layout/index.umd.cjs +0 -1
- package/components/response-layout-editor/index.umd.cjs +0 -1
- package/components/response-toolbar/index.umd.cjs +0 -1
- package/components/schema-selector/index.umd.cjs +0 -8
- package/components/search-box/index.umd.cjs +0 -1
- package/components/section/index.umd.cjs +0 -1
- package/components/smoke-detector/index.umd.cjs +0 -1
- package/components/spacing-editor/index.umd.cjs +0 -1
- package/components/splitter/index.umd.cjs +0 -1
- package/components/step/index.umd.cjs +0 -1
- package/components/switch/index.umd.cjs +0 -1
- package/components/tabs/index.umd.cjs +0 -1
- package/components/tags/index.umd.cjs +0 -1
- package/components/text/index.umd.cjs +0 -1
- package/components/textarea/index.umd.cjs +0 -1
- package/components/time-picker/index.umd.cjs +0 -1
- package/components/tooltip/index.umd.cjs +0 -1
- package/components/transfer/index.umd.cjs +0 -1
- package/components/tree-grid/index.umd.cjs +0 -1
- package/components/tree-view/index.umd.cjs +0 -1
- package/components/uploader/index.umd.cjs +0 -2
- package/components/verify-detail/index.umd.cjs +0 -1
- package/components/video/index.umd.cjs +0 -1
- package/components/weather/index.umd.cjs +0 -16
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as O, ref as m, inject as P, computed as v, onMounted as M, createVNode as S, watch as h } from "vue";
|
|
2
|
-
import k from "
|
|
2
|
+
import k from "../button-edit/index.esm.js";
|
|
3
3
|
import { cloneDeep as I } from "lodash-es";
|
|
4
|
-
import N from "
|
|
5
|
-
import { withInstall as D } from "
|
|
4
|
+
import N from "../tree-view/index.esm.js";
|
|
5
|
+
import { withInstall as D } from "../common/index.esm.js";
|
|
6
6
|
const E = {}, H = {};
|
|
7
7
|
function V(e) {
|
|
8
8
|
const { properties: l, title: d } = e, i = Object.keys(l).reduce((u, s) => (u[s] = l[s].type === "object" && l[s].properties ? V(l[s]) : I(l[s].default), u), {});
|
|
@@ -10,7 +10,7 @@ function V(e) {
|
|
|
10
10
|
}
|
|
11
11
|
function R(e, l) {
|
|
12
12
|
const d = V(l);
|
|
13
|
-
return Object.keys(e).reduce((i, u) => (i[u] = e[u], i), d), d;
|
|
13
|
+
return Object.keys(e).reduce((i, u) => (i[u] && typeof i[u] == "object" ? Object.assign(i[u], e[u]) : i[u] = e[u], i), d), d;
|
|
14
14
|
}
|
|
15
15
|
function $(e, l) {
|
|
16
16
|
return Object.keys(e).filter((i) => e[i] != null).reduce((i, u) => {
|
|
@@ -377,7 +377,7 @@ const B = {
|
|
|
377
377
|
formatter: { type: Function, default: null },
|
|
378
378
|
editorParams: { type: Object },
|
|
379
379
|
repositoryToken: { type: Symbol, default: null }
|
|
380
|
-
}, le = W(B, ee, G, te),
|
|
380
|
+
}, le = W(B, ee, G, te), ie = {
|
|
381
381
|
data: { type: Array, default: [] },
|
|
382
382
|
enableSearch: { type: Boolean, default: !1 },
|
|
383
383
|
idField: { type: String, default: "id" },
|
|
@@ -393,9 +393,9 @@ const B = {
|
|
|
393
393
|
maxHeight: { type: Number, default: 350 },
|
|
394
394
|
repositoryToken: { type: Symbol, default: null },
|
|
395
395
|
editorParams: { type: Object }
|
|
396
|
-
},
|
|
396
|
+
}, re = /* @__PURE__ */ O({
|
|
397
397
|
name: "FComboTreeContainer",
|
|
398
|
-
props:
|
|
398
|
+
props: ie,
|
|
399
399
|
emits: ["selectionChange"],
|
|
400
400
|
setup(e, l) {
|
|
401
401
|
const d = m(e.data), i = m([]), u = m(e.separator), s = m(e.width), c = m(e.height), y = m(e.maxHeight), g = m(String(e.selectedValues).split(u.value));
|
|
@@ -514,7 +514,7 @@ const C = /* @__PURE__ */ O({
|
|
|
514
514
|
focusOnCreated: e.focusOnCreated,
|
|
515
515
|
selectOnCreated: e.selectOnCreated
|
|
516
516
|
}, {
|
|
517
|
-
default: () => [S(
|
|
517
|
+
default: () => [S(re, {
|
|
518
518
|
maxHeight: e.maxHeight,
|
|
519
519
|
idField: e.idField,
|
|
520
520
|
valueField: e.valueField,
|
|
@@ -2,34 +2,34 @@ import { defineComponent as F, onBeforeMount as z, onMounted as L, createVNode a
|
|
|
2
2
|
import { cloneDeep as H } from "lodash-es";
|
|
3
3
|
const W = {}, _ = {};
|
|
4
4
|
function V(c) {
|
|
5
|
-
const { properties: e, title: t } = c, s = Object.keys(e).reduce((
|
|
5
|
+
const { properties: e, title: t } = c, s = Object.keys(e).reduce((p, y) => (p[y] = e[y].type === "object" && e[y].properties ? V(e[y]) : H(e[y].default), p), {});
|
|
6
6
|
return s.id = `${t}-${Date.now()}`, s;
|
|
7
7
|
}
|
|
8
8
|
function $(c, e = {}) {
|
|
9
9
|
const t = W[c];
|
|
10
10
|
if (t) {
|
|
11
11
|
let s = V(t);
|
|
12
|
-
const
|
|
13
|
-
return s =
|
|
12
|
+
const p = _[c];
|
|
13
|
+
return s = p ? p({ getSchemaByType: $ }, s, e) : s, s;
|
|
14
14
|
}
|
|
15
15
|
return null;
|
|
16
16
|
}
|
|
17
17
|
function Q(c, e) {
|
|
18
18
|
const t = V(e);
|
|
19
|
-
return Object.keys(c).reduce((s,
|
|
19
|
+
return Object.keys(c).reduce((s, p) => (s[p] && typeof s[p] == "object" ? Object.assign(s[p], c[p]) : s[p] = c[p], s), t), t;
|
|
20
20
|
}
|
|
21
21
|
function U(c, e) {
|
|
22
|
-
return Object.keys(c).filter((s) => c[s] != null).reduce((s,
|
|
23
|
-
if (e.has(
|
|
24
|
-
const y = e.get(
|
|
22
|
+
return Object.keys(c).filter((s) => c[s] != null).reduce((s, p) => {
|
|
23
|
+
if (e.has(p)) {
|
|
24
|
+
const y = e.get(p);
|
|
25
25
|
if (typeof y == "string")
|
|
26
|
-
s[y] = c[
|
|
26
|
+
s[y] = c[p];
|
|
27
27
|
else {
|
|
28
|
-
const m = y(
|
|
28
|
+
const m = y(p, c[p], c);
|
|
29
29
|
Object.assign(s, m);
|
|
30
30
|
}
|
|
31
31
|
} else
|
|
32
|
-
s[
|
|
32
|
+
s[p] = c[p];
|
|
33
33
|
return s;
|
|
34
34
|
}, {});
|
|
35
35
|
}
|
|
@@ -60,7 +60,7 @@ function Y(c = {}) {
|
|
|
60
60
|
["getProperty", t]
|
|
61
61
|
]);
|
|
62
62
|
Object.keys(c).reduce((a, d) => (a.set(d, c[d]), a), s);
|
|
63
|
-
function
|
|
63
|
+
function p(a, d) {
|
|
64
64
|
const l = a;
|
|
65
65
|
return typeof d == "number" ? [{ target: l, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: l, operator: "getProperty", param: a, value: !!d }] : typeof d == "object" ? Object.keys(d).map((u) => {
|
|
66
66
|
if (u === "length")
|
|
@@ -71,7 +71,7 @@ function Y(c = {}) {
|
|
|
71
71
|
}
|
|
72
72
|
function y(a) {
|
|
73
73
|
return Object.keys(a).reduce((l, u) => {
|
|
74
|
-
const g =
|
|
74
|
+
const g = p(u, a[u]);
|
|
75
75
|
return l.push(...g), l;
|
|
76
76
|
}, []);
|
|
77
77
|
}
|
|
@@ -86,15 +86,15 @@ function Y(c = {}) {
|
|
|
86
86
|
return y(a).reduce((g, n) => g && m(n, d), !0);
|
|
87
87
|
}
|
|
88
88
|
function D(a, d) {
|
|
89
|
-
const l = Object.keys(a), u = l.includes("allOf"), g = l.includes("anyOf"), n = u || g,
|
|
90
|
-
return u ? !
|
|
89
|
+
const l = Object.keys(a), u = l.includes("allOf"), g = l.includes("anyOf"), n = u || g, i = (n ? a[n ? u ? "allOf" : "anyOf" : "allOf"] : [a]).map((b) => P(b, d));
|
|
90
|
+
return u ? !i.includes(!1) : i.includes(!0);
|
|
91
91
|
}
|
|
92
92
|
return { parseValueSchema: D };
|
|
93
93
|
}
|
|
94
94
|
const Z = {}, K = {};
|
|
95
95
|
Y();
|
|
96
|
-
function R(c, e, t = /* @__PURE__ */ new Map(), s = (m, P, D) => P,
|
|
97
|
-
return W[e.title] = e, _[e.title] = s, Z[e.title] =
|
|
96
|
+
function R(c, e, t = /* @__PURE__ */ new Map(), s = (m, P, D) => P, p = {}, y = (m) => m) {
|
|
97
|
+
return W[e.title] = e, _[e.title] = s, Z[e.title] = p, K[e.title] = y, (m = {}) => {
|
|
98
98
|
const P = X(m, e, t), D = Object.keys(c).reduce((a, d) => (a[d] = c[d].default, a), {});
|
|
99
99
|
return Object.assign(D, P);
|
|
100
100
|
};
|
|
@@ -209,7 +209,7 @@ const ie = "accordion", le = "A Farris Component", ue = "object", fe = {
|
|
|
209
209
|
id: { type: String },
|
|
210
210
|
customClass: { type: String, default: "" },
|
|
211
211
|
componentType: { type: String, default: "" }
|
|
212
|
-
}, B = R(k, ae, I, pe, de),
|
|
212
|
+
}, B = R(k, ae, I, pe, de), E = /* @__PURE__ */ F({
|
|
213
213
|
name: "FComponent",
|
|
214
214
|
props: k,
|
|
215
215
|
emits: ["init", "afterViewInit"],
|
|
@@ -224,12 +224,12 @@ const ie = "accordion", le = "A Farris Component", ue = "object", fe = {
|
|
|
224
224
|
}
|
|
225
225
|
});
|
|
226
226
|
function ye(c, e, t) {
|
|
227
|
-
var
|
|
227
|
+
var O;
|
|
228
228
|
function s() {
|
|
229
229
|
t != null && t.resolveComponentContext && t.resolveComponentContext();
|
|
230
230
|
}
|
|
231
231
|
s();
|
|
232
|
-
const
|
|
232
|
+
const p = t && t.getStyles && t.getStyles() || "", y = t && t.getDesignerClass && t.getDesignerClass() || "", m = M();
|
|
233
233
|
function P() {
|
|
234
234
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
235
235
|
}
|
|
@@ -247,12 +247,12 @@ function ye(c, e, t) {
|
|
|
247
247
|
return null;
|
|
248
248
|
if (f.value.schema && f.value.schema.type === "component")
|
|
249
249
|
return f.value;
|
|
250
|
-
const
|
|
250
|
+
const v = M(f == null ? void 0 : f.value.parent), h = l(v);
|
|
251
251
|
return h || null;
|
|
252
252
|
}
|
|
253
253
|
function u(f = e) {
|
|
254
|
-
const { componentInstance:
|
|
255
|
-
return !
|
|
254
|
+
const { componentInstance: v, designerItemElementRef: h } = f;
|
|
255
|
+
return !v || !v.value ? null : v.value.canMove ? h : u(f.parent);
|
|
256
256
|
}
|
|
257
257
|
function g(f) {
|
|
258
258
|
return !!t && t.canAccepts(f);
|
|
@@ -262,27 +262,27 @@ function ye(c, e, t) {
|
|
|
262
262
|
}
|
|
263
263
|
function r() {
|
|
264
264
|
}
|
|
265
|
-
function o(f,
|
|
266
|
-
|
|
265
|
+
function o(f, v) {
|
|
266
|
+
v && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(v);
|
|
267
267
|
}
|
|
268
|
-
function
|
|
269
|
-
const { componentType:
|
|
270
|
-
let h = $(
|
|
268
|
+
function i(f) {
|
|
269
|
+
const { componentType: v } = f;
|
|
270
|
+
let h = $(v, f);
|
|
271
271
|
t && t.onResolveNewComponentSchema && (h = t.onResolveNewComponentSchema(f, h));
|
|
272
|
-
const
|
|
273
|
-
return h && !h.id && h.type ===
|
|
272
|
+
const T = v.toLowerCase().replace("-", "_");
|
|
273
|
+
return h && !h.id && h.type === v && (h.id = `${T}_${Math.random().toString().slice(2, 6)}`), h;
|
|
274
274
|
}
|
|
275
|
-
function j(f,
|
|
276
|
-
const h = String(f.getAttribute("data-controltype")),
|
|
275
|
+
function j(f, v) {
|
|
276
|
+
const h = String(f.getAttribute("data-controltype")), T = f.getAttribute("data-feature"), w = T ? JSON.parse(T) : {};
|
|
277
277
|
w.parentComponentInstance = m.value;
|
|
278
278
|
let A = $(h, w);
|
|
279
|
-
t && t.onAcceptNewChildElement && (A = t.onAcceptNewChildElement(f,
|
|
279
|
+
t && t.onAcceptNewChildElement && (A = t.onAcceptNewChildElement(f, v, A));
|
|
280
280
|
const N = h.toLowerCase().replace("-", "_");
|
|
281
281
|
return A && !A.id && A.type === h && (A.id = `${N}_${Math.random().toString().slice(2, 6)}`), A;
|
|
282
282
|
}
|
|
283
283
|
function b(f) {
|
|
284
284
|
}
|
|
285
|
-
function
|
|
285
|
+
function C(...f) {
|
|
286
286
|
if (t && t.getPropsConfig)
|
|
287
287
|
return t.getPropsConfig(...f);
|
|
288
288
|
}
|
|
@@ -293,26 +293,26 @@ function ye(c, e, t) {
|
|
|
293
293
|
canNested: !d(),
|
|
294
294
|
contents: e == null ? void 0 : e.schema.contents,
|
|
295
295
|
elementRef: c,
|
|
296
|
-
parent: (
|
|
296
|
+
parent: (O = e == null ? void 0 : e.parent) == null ? void 0 : O.componentInstance,
|
|
297
297
|
schema: e == null ? void 0 : e.schema,
|
|
298
|
-
styles:
|
|
298
|
+
styles: p,
|
|
299
299
|
designerClass: y,
|
|
300
300
|
canAccepts: g,
|
|
301
301
|
getBelongedComponentInstance: l,
|
|
302
302
|
getDraggableDesignItemElement: u,
|
|
303
303
|
getDraggingDisplayText: n,
|
|
304
|
-
getPropConfig:
|
|
304
|
+
getPropConfig: C,
|
|
305
305
|
getDragScopeElement: r,
|
|
306
306
|
onAcceptMovedChildElement: o,
|
|
307
307
|
onAcceptNewChildElement: j,
|
|
308
308
|
onChildElementMovedOut: b,
|
|
309
|
-
addNewChildComponentSchema:
|
|
309
|
+
addNewChildComponentSchema: i,
|
|
310
310
|
updateDragAndDropRules: s,
|
|
311
311
|
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || M(!1),
|
|
312
312
|
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || M(!1)
|
|
313
313
|
}, m;
|
|
314
314
|
}
|
|
315
|
-
const be = "https://json-schema.org/draft/2020-12/schema", he = "https://farris-design.gitee.io/dragging-rules.schema.json", me = "Dragging Rules", ge = "The rules of designer canvas", je = "object",
|
|
315
|
+
const be = "https://json-schema.org/draft/2020-12/schema", he = "https://farris-design.gitee.io/dragging-rules.schema.json", me = "Dragging Rules", ge = "The rules of designer canvas", je = "object", Ce = {
|
|
316
316
|
"f-page": {
|
|
317
317
|
description: "The root class of page designed by farris.",
|
|
318
318
|
type: "object",
|
|
@@ -876,41 +876,41 @@ const be = "https://json-schema.org/draft/2020-12/schema", he = "https://farris-
|
|
|
876
876
|
description: "",
|
|
877
877
|
type: "object"
|
|
878
878
|
}
|
|
879
|
-
},
|
|
879
|
+
}, ve = [], Pe = {
|
|
880
880
|
$schema: be,
|
|
881
881
|
$id: he,
|
|
882
882
|
title: me,
|
|
883
883
|
description: ge,
|
|
884
884
|
type: je,
|
|
885
|
-
properties:
|
|
886
|
-
required:
|
|
887
|
-
},
|
|
885
|
+
properties: Ce,
|
|
886
|
+
required: ve
|
|
887
|
+
}, S = /* @__PURE__ */ new Map();
|
|
888
888
|
function Ae() {
|
|
889
|
-
function c(n, r, o,
|
|
889
|
+
function c(n, r, o, i) {
|
|
890
890
|
var j;
|
|
891
891
|
if (typeof o == "number")
|
|
892
|
-
return ((j =
|
|
892
|
+
return ((j = i[n]) == null ? void 0 : j.length) === o;
|
|
893
893
|
if (typeof o == "object") {
|
|
894
|
-
const b = Object.keys(o)[0],
|
|
894
|
+
const b = Object.keys(o)[0], C = o[b];
|
|
895
895
|
if (b === "not")
|
|
896
|
-
return Number(
|
|
896
|
+
return Number(i[n].length) !== Number(C);
|
|
897
897
|
if (b === "moreThan")
|
|
898
|
-
return Number(
|
|
898
|
+
return Number(i[n].length) >= Number(C);
|
|
899
899
|
if (b === "lessThan")
|
|
900
|
-
return Number(
|
|
900
|
+
return Number(i[n].length) <= Number(C);
|
|
901
901
|
}
|
|
902
902
|
return !1;
|
|
903
903
|
}
|
|
904
|
-
function e(n, r, o,
|
|
905
|
-
return typeof o == "boolean" ?
|
|
904
|
+
function e(n, r, o, i) {
|
|
905
|
+
return typeof o == "boolean" ? i.childrenClassList.includes(r) === !!o : !1;
|
|
906
906
|
}
|
|
907
|
-
function t(n, r, o,
|
|
908
|
-
return typeof o == "boolean" ?
|
|
907
|
+
function t(n, r, o, i) {
|
|
908
|
+
return typeof o == "boolean" ? i.parentClassList.includes(r) === !!o : !1;
|
|
909
909
|
}
|
|
910
|
-
function s(n, r, o,
|
|
911
|
-
return typeof o == "boolean" ?
|
|
910
|
+
function s(n, r, o, i) {
|
|
911
|
+
return typeof o == "boolean" ? i.parentClassList.includes(r) === !!o : !1;
|
|
912
912
|
}
|
|
913
|
-
const
|
|
913
|
+
const p = /* @__PURE__ */ new Map([
|
|
914
914
|
["length", c],
|
|
915
915
|
["hasChildren", e],
|
|
916
916
|
["hasSibling", s],
|
|
@@ -918,29 +918,29 @@ function Ae() {
|
|
|
918
918
|
]);
|
|
919
919
|
function y(n, r) {
|
|
920
920
|
const o = n;
|
|
921
|
-
return typeof r == "number" ? [{ target: o, operator: "length", param: null, value: Number(r) }] : typeof r == "object" ? Object.keys(r).map((
|
|
922
|
-
if (
|
|
923
|
-
return { target: o, operator: "length", param: null, value: r[
|
|
924
|
-
const j =
|
|
921
|
+
return typeof r == "number" ? [{ target: o, operator: "length", param: null, value: Number(r) }] : typeof r == "object" ? Object.keys(r).map((i) => {
|
|
922
|
+
if (i === "length")
|
|
923
|
+
return { target: o, operator: "length", param: null, value: r[i] };
|
|
924
|
+
const j = i, b = r[i];
|
|
925
925
|
return { target: o, operator: n === "children" ? "hasChildren" : n === "parent" ? "hasParent" : "hasSibling", param: j, value: b };
|
|
926
926
|
}) : [];
|
|
927
927
|
}
|
|
928
928
|
function m(n, r) {
|
|
929
|
-
if (
|
|
930
|
-
const o =
|
|
929
|
+
if (p.has(n.operator)) {
|
|
930
|
+
const o = p.get(n.operator);
|
|
931
931
|
return o && o(n.target, n.param, n.value, r) || !1;
|
|
932
932
|
}
|
|
933
933
|
return !1;
|
|
934
934
|
}
|
|
935
935
|
function P(n, r) {
|
|
936
|
-
return Object.keys(n).reduce((b,
|
|
937
|
-
const
|
|
938
|
-
return b.push(...
|
|
939
|
-
}, []).reduce((b,
|
|
936
|
+
return Object.keys(n).reduce((b, C) => {
|
|
937
|
+
const O = y(C, n[C]);
|
|
938
|
+
return b.push(...O), b;
|
|
939
|
+
}, []).reduce((b, C) => b && m(C, r), !0);
|
|
940
940
|
}
|
|
941
941
|
function D(n, r) {
|
|
942
|
-
const o = Object.keys(n),
|
|
943
|
-
return
|
|
942
|
+
const o = Object.keys(n), i = o.includes("allOf"), j = o.includes("anyOf"), b = i || j, f = (b ? n[b ? i ? "allOf" : "anyOf" : "allOf"] : [n]).map((h) => P(h, r));
|
|
943
|
+
return i ? !f.includes(!1) : f.includes(!0);
|
|
944
944
|
}
|
|
945
945
|
function a(n, r) {
|
|
946
946
|
const o = n.const;
|
|
@@ -949,16 +949,16 @@ function Ae() {
|
|
|
949
949
|
function d(n) {
|
|
950
950
|
return (r) => {
|
|
951
951
|
const o = { canAccept: !0, fixed: !1, hidePadding: !1 };
|
|
952
|
-
return n && n.properties && Object.keys(n.properties).reduce((
|
|
952
|
+
return n && n.properties && Object.keys(n.properties).reduce((i, j) => {
|
|
953
953
|
const b = n.properties[j];
|
|
954
|
-
return
|
|
954
|
+
return i[j] = a(b, r), i;
|
|
955
955
|
}, o), o;
|
|
956
956
|
};
|
|
957
957
|
}
|
|
958
958
|
function l(n, r, o) {
|
|
959
959
|
if (r.type === "object" && r.properties) {
|
|
960
|
-
const { rules:
|
|
961
|
-
o.set(n, d(
|
|
960
|
+
const { rules: i, contents: j } = r.properties;
|
|
961
|
+
o.set(n, d(i)), j && Object.keys(j.properties).forEach(
|
|
962
962
|
(b) => l(b, j.properties[b], o)
|
|
963
963
|
);
|
|
964
964
|
}
|
|
@@ -966,18 +966,18 @@ function Ae() {
|
|
|
966
966
|
function u() {
|
|
967
967
|
const { properties: n } = Pe;
|
|
968
968
|
Object.keys(n).forEach((r) => {
|
|
969
|
-
l(r, n[r],
|
|
969
|
+
l(r, n[r], S);
|
|
970
970
|
});
|
|
971
971
|
}
|
|
972
972
|
function g(n, r) {
|
|
973
973
|
const o = { canAccept: !0, fixed: !1, hidePadding: !0 };
|
|
974
|
-
return
|
|
974
|
+
return S.has(n) ? S.get(n)(r) : o;
|
|
975
975
|
}
|
|
976
976
|
return u(), { getRuleValue: g };
|
|
977
977
|
}
|
|
978
978
|
function De(c, e) {
|
|
979
979
|
const t = Ae();
|
|
980
|
-
let s = !1,
|
|
980
|
+
let s = !1, p, y = !1;
|
|
981
981
|
const m = !1;
|
|
982
982
|
function P() {
|
|
983
983
|
return !1;
|
|
@@ -990,38 +990,38 @@ function De(c, e) {
|
|
|
990
990
|
}
|
|
991
991
|
function d() {
|
|
992
992
|
y = !1;
|
|
993
|
-
const u = c, g = u.appearance && u.appearance.class || "", n = g.split(" "), r = u.contents || [], o = r.length ? r[0] : null,
|
|
993
|
+
const u = c, g = u.appearance && u.appearance.class || "", n = g.split(" "), r = u.contents || [], o = r.length ? r[0] : null, i = o && o.appearance ? o.appearance.class : "", j = i ? i.split(" ") : [], b = r.length ? r.reduce((w, A) => {
|
|
994
994
|
const N = A && A.appearance ? A.appearance.class : "", J = N ? N.split(" ") : [];
|
|
995
995
|
return w.push(...J), w;
|
|
996
|
-
}, []) : [],
|
|
997
|
-
|
|
996
|
+
}, []) : [], C = e, O = C && C.appearance && C.appearance.class || "", f = O ? O.split(" ") : [];
|
|
997
|
+
p = {
|
|
998
998
|
componentClass: g,
|
|
999
999
|
componentClassList: n,
|
|
1000
1000
|
childContents: r,
|
|
1001
1001
|
firstChildContent: o,
|
|
1002
|
-
firstChildClass:
|
|
1002
|
+
firstChildClass: i,
|
|
1003
1003
|
firstChildClassList: j,
|
|
1004
|
-
parent:
|
|
1005
|
-
parentClass:
|
|
1004
|
+
parent: C,
|
|
1005
|
+
parentClass: O,
|
|
1006
1006
|
parentClassList: f,
|
|
1007
1007
|
children: r,
|
|
1008
1008
|
childrenClassList: b
|
|
1009
1009
|
};
|
|
1010
|
-
const { canAccept:
|
|
1011
|
-
return s =
|
|
1010
|
+
const { canAccept: v, fixed: h, hidePadding: T } = t.getRuleValue(n[0], p);
|
|
1011
|
+
return s = T, y = h, !0;
|
|
1012
1012
|
}
|
|
1013
1013
|
function l() {
|
|
1014
1014
|
return s;
|
|
1015
1015
|
}
|
|
1016
1016
|
return { canAccepts: P, checkCanDeleteComponent: D, checkCanMoveComponent: a, resolveComponentContext: d, hideNestedPaddingInDesginerView: l };
|
|
1017
1017
|
}
|
|
1018
|
-
const
|
|
1018
|
+
const Oe = /* @__PURE__ */ F({
|
|
1019
1019
|
name: "FComponetDesign",
|
|
1020
1020
|
props: k,
|
|
1021
1021
|
emits: [],
|
|
1022
1022
|
setup(c, e) {
|
|
1023
1023
|
var m;
|
|
1024
|
-
const t = M(), s = G("design-item-context"),
|
|
1024
|
+
const t = M(), s = G("design-item-context"), p = De(s.schema, (m = s.parent) == null ? void 0 : m.schema), y = ye(t, s, p);
|
|
1025
1025
|
return L(() => {
|
|
1026
1026
|
t.value.componentInstance = y;
|
|
1027
1027
|
}), e.expose(y.value), () => q("div", {
|
|
@@ -1032,18 +1032,18 @@ const Te = /* @__PURE__ */ F({
|
|
|
1032
1032
|
}
|
|
1033
1033
|
}), Me = {
|
|
1034
1034
|
install(c) {
|
|
1035
|
-
c.component(
|
|
1035
|
+
c.component(E.name, E);
|
|
1036
1036
|
},
|
|
1037
1037
|
register(c, e, t, s) {
|
|
1038
|
-
c.component =
|
|
1038
|
+
c.component = E, e.component = B;
|
|
1039
1039
|
},
|
|
1040
1040
|
registerDesigner(c, e) {
|
|
1041
|
-
c.component =
|
|
1041
|
+
c.component = Oe, e.component = B;
|
|
1042
1042
|
}
|
|
1043
1043
|
};
|
|
1044
1044
|
export {
|
|
1045
|
-
|
|
1046
|
-
|
|
1045
|
+
E as Component,
|
|
1046
|
+
Oe as ComponentDesign,
|
|
1047
1047
|
k as componentProps,
|
|
1048
1048
|
Me as default,
|
|
1049
1049
|
B as propsResolver
|