@farris/ui-vue 1.2.7 → 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 +79 -79
- package/components/avatar/index.esm.js +393 -440
- 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 +496 -542
- package/components/color-picker/index.esm.js +1 -1
- package/components/combo-list/index.esm.js +437 -483
- package/components/combo-tree/index.esm.js +8 -8
- package/components/component/index.esm.js +89 -89
- package/components/condition/index.esm.js +839 -726
- package/components/content-container/index.esm.js +61 -61
- package/components/data-grid/index.esm.js +4702 -4972
- package/components/data-view/index.esm.js +2999 -2875
- package/components/date-picker/index.esm.js +2626 -2672
- 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 +934 -976
- package/components/dynamic-resolver/index.esm.js +67 -35
- package/components/dynamic-view/index.esm.js +258 -249
- 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 +1892 -1775
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5245 -5514
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1483 -1556
- 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 +668 -714
- package/components/layout/index.esm.js +148 -148
- package/components/list-nav/index.esm.js +109 -109
- package/components/list-view/index.esm.js +1679 -1563
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +6596 -6865
- package/components/mapping-editor/index.esm.js +5592 -5862
- 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 +988 -1034
- package/components/page-footer/index.esm.js +106 -106
- package/components/page-header/index.esm.js +1088 -1296
- package/components/pagination/index.esm.js +252 -252
- package/components/progress/index.esm.js +37 -37
- package/components/property-editor/index.esm.js +1416 -1462
- package/components/property-panel/index.css +1 -1
- package/components/property-panel/index.esm.js +757 -830
- 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 +452 -498
- 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 +117 -117
- package/components/response-toolbar/index.esm.js +1021 -1238
- package/components/schema-selector/index.esm.js +3215 -3308
- 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 +442 -488
- package/components/tabs/index.esm.js +1835 -2004
- package/components/tags/index.esm.js +215 -215
- package/components/text/index.esm.js +53 -53
- package/components/textarea/index.esm.js +451 -482
- package/components/time-picker/index.esm.js +1345 -1392
- package/components/transfer/index.esm.js +135 -135
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5761 -6020
- package/components/tree-view/index.esm.js +2380 -2253
- 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 +31630 -31224
- 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/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/lookup.property-config.d.ts +2 -1
- package/types/modal/src/modal.props.d.ts +1 -4
- package/types/property-panel/src/composition/entity/base-property.d.ts +0 -12
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -26
- 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,35 +1,35 @@
|
|
|
1
|
-
import { defineComponent as W, ref as N, computed as q, createVNode as P, nextTick as Z, inject as
|
|
1
|
+
import { defineComponent as W, ref as N, computed as q, createVNode as P, nextTick as Z, inject as R, onMounted as K } from "vue";
|
|
2
2
|
import { cloneDeep as x } from "lodash-es";
|
|
3
3
|
const _ = {}, G = {};
|
|
4
4
|
function k(n) {
|
|
5
|
-
const { properties: e, title: t } = n, r = Object.keys(e).reduce((
|
|
5
|
+
const { properties: e, title: t } = n, r = Object.keys(e).reduce((s, d) => (s[d] = e[d].type === "object" && e[d].properties ? k(e[d]) : x(e[d].default), s), {});
|
|
6
6
|
return r.id = `${t}-${Date.now()}`, r;
|
|
7
7
|
}
|
|
8
8
|
function S(n, e = {}) {
|
|
9
9
|
const t = _[n];
|
|
10
10
|
if (t) {
|
|
11
11
|
let r = k(t);
|
|
12
|
-
const
|
|
13
|
-
return r =
|
|
12
|
+
const s = G[n];
|
|
13
|
+
return r = s ? s({ getSchemaByType: S }, r, e) : r, r;
|
|
14
14
|
}
|
|
15
15
|
return null;
|
|
16
16
|
}
|
|
17
17
|
function I(n, e) {
|
|
18
18
|
const t = k(e);
|
|
19
|
-
return Object.keys(n).reduce((r,
|
|
19
|
+
return Object.keys(n).reduce((r, s) => (r[s] && typeof r[s] == "object" ? Object.assign(r[s], n[s]) : r[s] = n[s], r), t), t;
|
|
20
20
|
}
|
|
21
21
|
function ee(n, e) {
|
|
22
|
-
return Object.keys(n).filter((r) => n[r] != null).reduce((r,
|
|
23
|
-
if (e.has(
|
|
24
|
-
const d = e.get(
|
|
22
|
+
return Object.keys(n).filter((r) => n[r] != null).reduce((r, s) => {
|
|
23
|
+
if (e.has(s)) {
|
|
24
|
+
const d = e.get(s);
|
|
25
25
|
if (typeof d == "string")
|
|
26
|
-
r[d] = n[
|
|
26
|
+
r[d] = n[s];
|
|
27
27
|
else {
|
|
28
|
-
const h = d(
|
|
28
|
+
const h = d(s, n[s], n);
|
|
29
29
|
Object.assign(r, h);
|
|
30
30
|
}
|
|
31
31
|
} else
|
|
32
|
-
r[
|
|
32
|
+
r[s] = n[s];
|
|
33
33
|
return r;
|
|
34
34
|
}, {});
|
|
35
35
|
}
|
|
@@ -38,64 +38,64 @@ function te(n, e, t = /* @__PURE__ */ new Map()) {
|
|
|
38
38
|
return ee(r, t);
|
|
39
39
|
}
|
|
40
40
|
function ne(n = {}) {
|
|
41
|
-
function e(
|
|
41
|
+
function e(c, y, u, b) {
|
|
42
42
|
if (typeof u == "number")
|
|
43
|
-
return b[
|
|
43
|
+
return b[c].length === u;
|
|
44
44
|
if (typeof u == "object") {
|
|
45
45
|
const C = Object.keys(u)[0], o = u[C];
|
|
46
46
|
if (C === "not")
|
|
47
|
-
return Number(b[
|
|
47
|
+
return Number(b[c].length) !== Number(o);
|
|
48
48
|
if (C === "moreThan")
|
|
49
|
-
return Number(b[
|
|
49
|
+
return Number(b[c].length) >= Number(o);
|
|
50
50
|
if (C === "lessThan")
|
|
51
|
-
return Number(b[
|
|
51
|
+
return Number(b[c].length) <= Number(o);
|
|
52
52
|
}
|
|
53
53
|
return !1;
|
|
54
54
|
}
|
|
55
|
-
function t(
|
|
56
|
-
return b[
|
|
55
|
+
function t(c, y, u, b) {
|
|
56
|
+
return b[c] && b[c].propertyValue && String(b[c].propertyValue.value) === String(u);
|
|
57
57
|
}
|
|
58
58
|
const r = /* @__PURE__ */ new Map([
|
|
59
59
|
["length", e],
|
|
60
60
|
["getProperty", t]
|
|
61
61
|
]);
|
|
62
|
-
Object.keys(n).reduce((
|
|
63
|
-
function
|
|
64
|
-
const u =
|
|
65
|
-
return typeof y == "number" ? [{ target: u, operator: "length", param: null, value: Number(y) }] : typeof y == "boolean" ? [{ target: u, operator: "getProperty", param:
|
|
62
|
+
Object.keys(n).reduce((c, y) => (c.set(y, n[y]), c), r);
|
|
63
|
+
function s(c, y) {
|
|
64
|
+
const u = c;
|
|
65
|
+
return typeof y == "number" ? [{ target: u, operator: "length", param: null, value: Number(y) }] : typeof y == "boolean" ? [{ target: u, operator: "getProperty", param: c, value: !!y }] : typeof y == "object" ? Object.keys(y).map((b) => {
|
|
66
66
|
if (b === "length")
|
|
67
67
|
return { target: u, operator: "length", param: null, value: y[b] };
|
|
68
68
|
const C = b, o = y[b];
|
|
69
69
|
return { target: u, operator: "getProperty", param: C, value: o };
|
|
70
70
|
}) : [];
|
|
71
71
|
}
|
|
72
|
-
function d(
|
|
73
|
-
return Object.keys(
|
|
74
|
-
const C =
|
|
72
|
+
function d(c) {
|
|
73
|
+
return Object.keys(c).reduce((u, b) => {
|
|
74
|
+
const C = s(b, c[b]);
|
|
75
75
|
return u.push(...C), u;
|
|
76
76
|
}, []);
|
|
77
77
|
}
|
|
78
|
-
function h(
|
|
79
|
-
if (r.has(
|
|
80
|
-
const u = r.get(
|
|
81
|
-
return u && u(
|
|
78
|
+
function h(c, y) {
|
|
79
|
+
if (r.has(c.operator)) {
|
|
80
|
+
const u = r.get(c.operator);
|
|
81
|
+
return u && u(c.target, c.param, c.value, y) || !1;
|
|
82
82
|
}
|
|
83
83
|
return !1;
|
|
84
84
|
}
|
|
85
|
-
function v(
|
|
86
|
-
return d(
|
|
85
|
+
function v(c, y) {
|
|
86
|
+
return d(c).reduce((C, o) => C && h(o, y), !0);
|
|
87
87
|
}
|
|
88
|
-
function g(
|
|
89
|
-
const u = Object.keys(
|
|
88
|
+
function g(c, y) {
|
|
89
|
+
const u = Object.keys(c), b = u.includes("allOf"), C = u.includes("anyOf"), o = b || C, f = (o ? c[o ? b ? "allOf" : "anyOf" : "allOf"] : [c]).map((i) => v(i, y));
|
|
90
90
|
return b ? !f.includes(!1) : f.includes(!0);
|
|
91
91
|
}
|
|
92
92
|
return { parseValueSchema: g };
|
|
93
93
|
}
|
|
94
94
|
const oe = {}, re = {};
|
|
95
95
|
ne();
|
|
96
|
-
function se(n, e, t = /* @__PURE__ */ new Map(), r = (h, v, g) => v,
|
|
97
|
-
return _[e.title] = e, G[e.title] = r, oe[e.title] =
|
|
98
|
-
const v = te(h, e, t), g = Object.keys(n).reduce((
|
|
96
|
+
function se(n, e, t = /* @__PURE__ */ new Map(), r = (h, v, g) => v, s = {}, d = (h) => h) {
|
|
97
|
+
return _[e.title] = e, G[e.title] = r, oe[e.title] = s, re[e.title] = d, (h = {}) => {
|
|
98
|
+
const v = te(h, e, t), g = Object.keys(n).reduce((c, y) => (c[y] = n[y].default, c), {});
|
|
99
99
|
return Object.assign(g, v);
|
|
100
100
|
};
|
|
101
101
|
}
|
|
@@ -210,14 +210,14 @@ const pe = "https://json-schema.org/draft/2020-12/schema", le = "https://farris-
|
|
|
210
210
|
props: B,
|
|
211
211
|
emits: ["collapse"],
|
|
212
212
|
setup(n, e) {
|
|
213
|
-
const t = N(n.position), r = N(n.title),
|
|
213
|
+
const t = N(n.position), r = N(n.title), s = N(n.folded), d = N(!1);
|
|
214
214
|
function h(g) {
|
|
215
|
-
g && g.stopPropagation(), !n.disabled && (d.value = !0,
|
|
215
|
+
g && g.stopPropagation(), !n.disabled && (d.value = !0, s.value = !s.value, e.emit("collapse", s.value));
|
|
216
216
|
}
|
|
217
217
|
const v = q(() => {
|
|
218
218
|
const g = {};
|
|
219
|
-
let
|
|
220
|
-
return g[
|
|
219
|
+
let c = ["top", "bottom"].indexOf(t.value) > -1 ? "height" : "width";
|
|
220
|
+
return g[c] = s.value ? "0px" : n.size + "px", g;
|
|
221
221
|
});
|
|
222
222
|
return () => P("div", {
|
|
223
223
|
class: `f-list-nav f-list-nav-${t.value}`
|
|
@@ -239,7 +239,7 @@ const pe = "https://json-schema.org/draft/2020-12/schema", le = "https://farris-
|
|
|
239
239
|
}, [e.slots.navFooter()])]), n.collapsible && P("div", {
|
|
240
240
|
class: ["f-list-nav-toggle-sidebar", {
|
|
241
241
|
disabled: n.disabled,
|
|
242
|
-
active:
|
|
242
|
+
active: s.value,
|
|
243
243
|
"splitter-pane-collapse-animate": d.value
|
|
244
244
|
}],
|
|
245
245
|
onClick: (g) => h(g)
|
|
@@ -254,14 +254,14 @@ function Te(n, e, t) {
|
|
|
254
254
|
t != null && t.resolveComponentContext && t.resolveComponentContext();
|
|
255
255
|
}
|
|
256
256
|
r();
|
|
257
|
-
const
|
|
257
|
+
const s = t && t.getStyles && t.getStyles() || "", d = t && t.getDesignerClass && t.getDesignerClass() || "", h = N();
|
|
258
258
|
function v() {
|
|
259
259
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
260
260
|
}
|
|
261
261
|
function g() {
|
|
262
262
|
return !1;
|
|
263
263
|
}
|
|
264
|
-
function
|
|
264
|
+
function c() {
|
|
265
265
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
266
266
|
}
|
|
267
267
|
function y() {
|
|
@@ -287,7 +287,7 @@ function Te(n, e, t) {
|
|
|
287
287
|
}
|
|
288
288
|
function l() {
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function a(p, j) {
|
|
291
291
|
j && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(j);
|
|
292
292
|
}
|
|
293
293
|
function f(p) {
|
|
@@ -305,7 +305,7 @@ function Te(n, e, t) {
|
|
|
305
305
|
const E = m.toLowerCase().replace("-", "_");
|
|
306
306
|
return w && !w.id && w.type === m && (w.id = `${E}_${Math.random().toString().slice(2, 6)}`), w;
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function i(p) {
|
|
309
309
|
}
|
|
310
310
|
function T(...p) {
|
|
311
311
|
if (t && t.getPropsConfig)
|
|
@@ -314,13 +314,13 @@ function Te(n, e, t) {
|
|
|
314
314
|
return h.value = {
|
|
315
315
|
canMove: v(),
|
|
316
316
|
canSelectParent: g(),
|
|
317
|
-
canDelete:
|
|
317
|
+
canDelete: c(),
|
|
318
318
|
canNested: !y(),
|
|
319
319
|
contents: e == null ? void 0 : e.schema.contents,
|
|
320
320
|
elementRef: n,
|
|
321
321
|
parent: (D = e == null ? void 0 : e.parent) == null ? void 0 : D.componentInstance,
|
|
322
322
|
schema: e == null ? void 0 : e.schema,
|
|
323
|
-
styles:
|
|
323
|
+
styles: s,
|
|
324
324
|
designerClass: d,
|
|
325
325
|
canAccepts: C,
|
|
326
326
|
getBelongedComponentInstance: u,
|
|
@@ -328,9 +328,9 @@ function Te(n, e, t) {
|
|
|
328
328
|
getDraggingDisplayText: o,
|
|
329
329
|
getPropConfig: T,
|
|
330
330
|
getDragScopeElement: l,
|
|
331
|
-
onAcceptMovedChildElement:
|
|
331
|
+
onAcceptMovedChildElement: a,
|
|
332
332
|
onAcceptNewChildElement: A,
|
|
333
|
-
onChildElementMovedOut:
|
|
333
|
+
onChildElementMovedOut: i,
|
|
334
334
|
addNewChildComponentSchema: f,
|
|
335
335
|
updateDragAndDropRules: r,
|
|
336
336
|
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || N(!1),
|
|
@@ -339,10 +339,10 @@ function Te(n, e, t) {
|
|
|
339
339
|
}
|
|
340
340
|
function Pe() {
|
|
341
341
|
function n(e) {
|
|
342
|
-
var
|
|
342
|
+
var s, d;
|
|
343
343
|
if (!e)
|
|
344
344
|
return !1;
|
|
345
|
-
const t = ((
|
|
345
|
+
const t = ((s = e.targetContainer) == null ? void 0 : s.componentInstance) && e.targetContainer.componentInstance.value;
|
|
346
346
|
if (!t)
|
|
347
347
|
return !1;
|
|
348
348
|
const r = (d = t.schema.appearance) == null ? void 0 : d.class;
|
|
@@ -931,80 +931,80 @@ const Ae = "https://json-schema.org/draft/2020-12/schema", Ne = "https://farris-
|
|
|
931
931
|
required: Ee
|
|
932
932
|
}, F = /* @__PURE__ */ new Map();
|
|
933
933
|
function $e() {
|
|
934
|
-
function n(o, l,
|
|
934
|
+
function n(o, l, a, f) {
|
|
935
935
|
var A;
|
|
936
|
-
if (typeof
|
|
937
|
-
return ((A = f[o]) == null ? void 0 : A.length) ===
|
|
938
|
-
if (typeof
|
|
939
|
-
const
|
|
940
|
-
if (
|
|
936
|
+
if (typeof a == "number")
|
|
937
|
+
return ((A = f[o]) == null ? void 0 : A.length) === a;
|
|
938
|
+
if (typeof a == "object") {
|
|
939
|
+
const i = Object.keys(a)[0], T = a[i];
|
|
940
|
+
if (i === "not")
|
|
941
941
|
return Number(f[o].length) !== Number(T);
|
|
942
|
-
if (
|
|
942
|
+
if (i === "moreThan")
|
|
943
943
|
return Number(f[o].length) >= Number(T);
|
|
944
|
-
if (
|
|
944
|
+
if (i === "lessThan")
|
|
945
945
|
return Number(f[o].length) <= Number(T);
|
|
946
946
|
}
|
|
947
947
|
return !1;
|
|
948
948
|
}
|
|
949
|
-
function e(o, l,
|
|
950
|
-
return typeof
|
|
949
|
+
function e(o, l, a, f) {
|
|
950
|
+
return typeof a == "boolean" ? f.childrenClassList.includes(l) === !!a : !1;
|
|
951
951
|
}
|
|
952
|
-
function t(o, l,
|
|
953
|
-
return typeof
|
|
952
|
+
function t(o, l, a, f) {
|
|
953
|
+
return typeof a == "boolean" ? f.parentClassList.includes(l) === !!a : !1;
|
|
954
954
|
}
|
|
955
|
-
function r(o, l,
|
|
956
|
-
return typeof
|
|
955
|
+
function r(o, l, a, f) {
|
|
956
|
+
return typeof a == "boolean" ? f.parentClassList.includes(l) === !!a : !1;
|
|
957
957
|
}
|
|
958
|
-
const
|
|
958
|
+
const s = /* @__PURE__ */ new Map([
|
|
959
959
|
["length", n],
|
|
960
960
|
["hasChildren", e],
|
|
961
961
|
["hasSibling", r],
|
|
962
962
|
["hasParent", t]
|
|
963
963
|
]);
|
|
964
964
|
function d(o, l) {
|
|
965
|
-
const
|
|
966
|
-
return typeof l == "number" ? [{ target:
|
|
965
|
+
const a = o;
|
|
966
|
+
return typeof l == "number" ? [{ target: a, operator: "length", param: null, value: Number(l) }] : typeof l == "object" ? Object.keys(l).map((f) => {
|
|
967
967
|
if (f === "length")
|
|
968
|
-
return { target:
|
|
969
|
-
const A = f,
|
|
970
|
-
return { target:
|
|
968
|
+
return { target: a, operator: "length", param: null, value: l[f] };
|
|
969
|
+
const A = f, i = l[f];
|
|
970
|
+
return { target: a, operator: o === "children" ? "hasChildren" : o === "parent" ? "hasParent" : "hasSibling", param: A, value: i };
|
|
971
971
|
}) : [];
|
|
972
972
|
}
|
|
973
973
|
function h(o, l) {
|
|
974
|
-
if (
|
|
975
|
-
const
|
|
976
|
-
return
|
|
974
|
+
if (s.has(o.operator)) {
|
|
975
|
+
const a = s.get(o.operator);
|
|
976
|
+
return a && a(o.target, o.param, o.value, l) || !1;
|
|
977
977
|
}
|
|
978
978
|
return !1;
|
|
979
979
|
}
|
|
980
980
|
function v(o, l) {
|
|
981
|
-
return Object.keys(o).reduce((
|
|
981
|
+
return Object.keys(o).reduce((i, T) => {
|
|
982
982
|
const D = d(T, o[T]);
|
|
983
|
-
return
|
|
984
|
-
}, []).reduce((
|
|
983
|
+
return i.push(...D), i;
|
|
984
|
+
}, []).reduce((i, T) => i && h(T, l), !0);
|
|
985
985
|
}
|
|
986
986
|
function g(o, l) {
|
|
987
|
-
const
|
|
987
|
+
const a = Object.keys(o), f = a.includes("allOf"), A = a.includes("anyOf"), i = f || A, p = (i ? o[i ? f ? "allOf" : "anyOf" : "allOf"] : [o]).map((m) => v(m, l));
|
|
988
988
|
return f ? !p.includes(!1) : p.includes(!0);
|
|
989
989
|
}
|
|
990
|
-
function
|
|
991
|
-
const
|
|
992
|
-
return
|
|
990
|
+
function c(o, l) {
|
|
991
|
+
const a = o.const;
|
|
992
|
+
return a ? typeof a == "boolean" ? a : typeof a == "object" ? g(a, l) : !1 : !1;
|
|
993
993
|
}
|
|
994
994
|
function y(o) {
|
|
995
995
|
return (l) => {
|
|
996
|
-
const
|
|
996
|
+
const a = { canAccept: !0, fixed: !1, hidePadding: !1 };
|
|
997
997
|
return o && o.properties && Object.keys(o.properties).reduce((f, A) => {
|
|
998
|
-
const
|
|
999
|
-
return f[A] =
|
|
1000
|
-
},
|
|
998
|
+
const i = o.properties[A];
|
|
999
|
+
return f[A] = c(i, l), f;
|
|
1000
|
+
}, a), a;
|
|
1001
1001
|
};
|
|
1002
1002
|
}
|
|
1003
|
-
function u(o, l,
|
|
1003
|
+
function u(o, l, a) {
|
|
1004
1004
|
if (l.type === "object" && l.properties) {
|
|
1005
1005
|
const { rules: f, contents: A } = l.properties;
|
|
1006
|
-
|
|
1007
|
-
(
|
|
1006
|
+
a.set(o, y(f)), A && Object.keys(A.properties).forEach(
|
|
1007
|
+
(i) => u(i, A.properties[i], a)
|
|
1008
1008
|
);
|
|
1009
1009
|
}
|
|
1010
1010
|
}
|
|
@@ -1015,23 +1015,23 @@ function $e() {
|
|
|
1015
1015
|
});
|
|
1016
1016
|
}
|
|
1017
1017
|
function C(o, l) {
|
|
1018
|
-
const
|
|
1019
|
-
return F.has(o) ? F.get(o)(l) :
|
|
1018
|
+
const a = { canAccept: !0, fixed: !1, hidePadding: !0 };
|
|
1019
|
+
return F.has(o) ? F.get(o)(l) : a;
|
|
1020
1020
|
}
|
|
1021
1021
|
return b(), { getRuleValue: C };
|
|
1022
1022
|
}
|
|
1023
1023
|
function Le(n, e) {
|
|
1024
|
-
const t = $e(), r = N(!1),
|
|
1024
|
+
const t = $e(), r = N(!1), s = N(!1);
|
|
1025
1025
|
let d = !0, h = !1, v, g = !1;
|
|
1026
|
-
function
|
|
1027
|
-
return v && v.componentClassList && v.componentClassList.includes("f-form-layout") && v.componentClassList.includes("farris-form") ?
|
|
1026
|
+
function c(i) {
|
|
1027
|
+
return v && v.componentClassList && v.componentClassList.includes("f-form-layout") && v.componentClassList.includes("farris-form") ? i.sourceType === "control" && i.controlCategory === "input" || i.sourceType === "move" && i.controlType === "form-group" : !0;
|
|
1028
1028
|
}
|
|
1029
|
-
function y(
|
|
1030
|
-
return !(!Pe().basalDragulaRuleForContainer(
|
|
1029
|
+
function y(i) {
|
|
1030
|
+
return !(!Pe().basalDragulaRuleForContainer(i) || !d || !c(i));
|
|
1031
1031
|
}
|
|
1032
1032
|
function u() {
|
|
1033
|
-
r.value = !1,
|
|
1034
|
-
const
|
|
1033
|
+
r.value = !1, s.value = !1;
|
|
1034
|
+
const i = n, T = i.appearance && i.appearance.class || "", D = T.split(" "), p = i.contents || [], j = p.length ? p[0] : null, m = j && j.appearance ? j.appearance.class : "", O = m ? m.split(" ") : [], M = p.length ? p.reduce((V, $) => {
|
|
1035
1035
|
const z = $ && $.appearance ? $.appearance.class : "", Y = z ? z.split(" ") : [];
|
|
1036
1036
|
return V.push(...Y), V;
|
|
1037
1037
|
}, []) : [], w = e, E = w && w.appearance && w.appearance.class || "", J = E ? E.split(" ") : [];
|
|
@@ -1051,29 +1051,29 @@ function Le(n, e) {
|
|
|
1051
1051
|
const { canAccept: Q, fixed: U, hidePadding: X } = t.getRuleValue(D[0], v);
|
|
1052
1052
|
return d = Q, h = X, g = U, !0;
|
|
1053
1053
|
}
|
|
1054
|
-
function b(
|
|
1054
|
+
function b(i) {
|
|
1055
1055
|
Z();
|
|
1056
1056
|
}
|
|
1057
1057
|
function C() {
|
|
1058
1058
|
return n.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
|
|
1059
1059
|
}
|
|
1060
|
-
function o(
|
|
1060
|
+
function o(i, T) {
|
|
1061
1061
|
const D = n;
|
|
1062
1062
|
if ((D.appearance && D.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
1063
|
-
const { label: m } =
|
|
1063
|
+
const { label: m } = i, O = S("form-group");
|
|
1064
1064
|
return O.editor = T, O.label = m, O;
|
|
1065
1065
|
}
|
|
1066
1066
|
return T;
|
|
1067
1067
|
}
|
|
1068
|
-
function l(
|
|
1068
|
+
function l(i, T, D) {
|
|
1069
1069
|
const p = n;
|
|
1070
1070
|
if ((p.appearance && p.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
1071
|
-
const O = String(
|
|
1071
|
+
const O = String(i.innerText), M = S("form-group");
|
|
1072
1072
|
return M.editor = D, M.label = O, M;
|
|
1073
1073
|
}
|
|
1074
1074
|
return D;
|
|
1075
1075
|
}
|
|
1076
|
-
function
|
|
1076
|
+
function a() {
|
|
1077
1077
|
return !g;
|
|
1078
1078
|
}
|
|
1079
1079
|
function f() {
|
|
@@ -1090,8 +1090,8 @@ function Le(n, e) {
|
|
|
1090
1090
|
onAcceptMovedChildElement: b,
|
|
1091
1091
|
onResolveNewComponentSchema: o,
|
|
1092
1092
|
triggerBelongedComponentToMoveWhenMoved: r,
|
|
1093
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1094
|
-
checkCanMoveComponent:
|
|
1093
|
+
triggerBelongedComponentToDeleteWhenDeleted: s,
|
|
1094
|
+
checkCanMoveComponent: a,
|
|
1095
1095
|
checkCanDeleteComponent: f,
|
|
1096
1096
|
hideNestedPaddingInDesginerView: A
|
|
1097
1097
|
};
|
|
@@ -1102,14 +1102,14 @@ const Fe = /* @__PURE__ */ W({
|
|
|
1102
1102
|
emits: [],
|
|
1103
1103
|
setup(n, e) {
|
|
1104
1104
|
var u;
|
|
1105
|
-
const t = N(), r =
|
|
1105
|
+
const t = N(), r = R("design-item-context"), s = Le(r.schema, (u = r.parent) == null ? void 0 : u.schema), d = Te(t, r, s);
|
|
1106
1106
|
d.value.canMove = !1, d.value.canNested = !1;
|
|
1107
|
-
const h = N(n.position), v = N(n.title), g = N(!1),
|
|
1107
|
+
const h = N(n.position), v = N(n.title), g = N(!1), c = N(!1), y = q(() => {
|
|
1108
1108
|
const b = {};
|
|
1109
1109
|
let C = ["top", "bottom"].indexOf(h.value) > -1 ? "height" : "width";
|
|
1110
1110
|
return b[C] = g.value ? "0px" : n.size + "px", b;
|
|
1111
1111
|
});
|
|
1112
|
-
return
|
|
1112
|
+
return K(() => {
|
|
1113
1113
|
t.value.componentInstance = d;
|
|
1114
1114
|
}), e.expose(d.value), () => P("div", {
|
|
1115
1115
|
class: `f-list-nav f-list-nav-${h.value}`
|
|
@@ -1132,7 +1132,7 @@ const Fe = /* @__PURE__ */ W({
|
|
|
1132
1132
|
class: ["f-list-nav-toggle-sidebar", {
|
|
1133
1133
|
disabled: n.disabled,
|
|
1134
1134
|
active: g.value,
|
|
1135
|
-
"splitter-pane-collapse-animate":
|
|
1135
|
+
"splitter-pane-collapse-animate": c.value
|
|
1136
1136
|
}]
|
|
1137
1137
|
}, [P("span", {
|
|
1138
1138
|
class: "triangle"
|