@farris/ui-vue 1.2.9 → 1.3.0
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 +63 -63
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +402 -323
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.css +1 -1
- package/components/button-edit/index.esm.js +98 -96
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +66 -66
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +118 -118
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +539 -460
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +135 -135
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.css +1 -0
- package/components/combo-list/index.esm.js +1007 -312
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +97 -97
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +778 -700
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +472 -329
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.css +1 -0
- package/components/condition/index.esm.js +2231 -1055
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +79 -79
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +6408 -5034
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.css +1 -0
- package/components/data-view/index.esm.js +4762 -3511
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.css +1 -1
- package/components/date-picker/index.esm.js +3442 -2742
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +14 -13
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +73 -73
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.css +1 -0
- package/components/dynamic-form/index.esm.js +2597 -1141
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +114 -71
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +303 -290
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +171 -171
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +65 -65
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3075 -2586
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5272 -8511
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1726 -1822
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +126 -126
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +620 -540
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +88 -88
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +71 -71
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +3582 -2356
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +10752 -8972
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +5601 -5329
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.css +1 -1
- package/components/message-box/index.esm.js +511 -471
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.css +1 -1
- package/components/modal/index.esm.js +438 -398
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +535 -452
- package/components/nav/index.umd.cjs +2 -2
- package/components/notify/index.esm.js +59 -53
- package/components/notify/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +556 -477
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +504 -425
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1833 -1054
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +100 -100
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +899 -870
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +576 -487
- package/components/pagination/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +71 -70
- package/components/popover/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +73 -73
- package/components/progress/index.umd.cjs +2 -2
- package/components/property-editor/index.css +1 -1
- package/components/property-editor/index.esm.js +1916 -1220
- package/components/property-editor/index.umd.cjs +3 -3
- package/components/property-panel/index.esm.js +783 -886
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +3632 -2556
- package/components/query-solution/index.umd.cjs +1 -1
- package/components/radio-button/index.esm.js +72 -72
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +484 -405
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +152 -152
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +73 -73
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.css +1 -1
- package/components/response-layout-editor/index.esm.js +1081 -1043
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +753 -738
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +4418 -4177
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +119 -119
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +92 -91
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +59 -59
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +103 -103
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +85 -85
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +457 -378
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.css +1 -1
- package/components/tabs/index.esm.js +1696 -1617
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +53 -53
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +268 -268
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +420 -341
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.css +1 -1
- package/components/time-picker/index.esm.js +1062 -981
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +381 -379
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5252 -9560
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.css +1 -0
- package/components/tree-view/index.esm.js +3920 -2692
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +373 -367
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +92 -92
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +597 -417
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +251 -251
- package/components/weather/index.umd.cjs +4 -4
- package/farris.all.esm.js +17125 -16176
- package/farris.all.umd.cjs +8 -8
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/capsule/src/capsule.props.d.ts +2 -2
- package/types/combo-list/src/components/list-container.component.d.ts +0 -3
- package/types/combo-list/src/components/list-container.props.d.ts +0 -4
- package/types/common/index.d.ts +1 -0
- package/types/common/types.d.ts +1 -1
- package/types/common/utils/encrypt.d.ts +2 -0
- package/types/component/src/component.props.d.ts +7 -0
- package/types/component/src/designer/use-designer-rules.d.ts +1 -1
- package/types/component/src/property-config/component.property-config.d.ts +9 -0
- package/types/components.d.ts +1 -0
- package/types/data-grid/index.d.ts +5 -2
- package/types/data-grid/src/data-grid.component.d.ts +2 -1
- package/types/data-grid/src/data-grid.props.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +18 -1
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/types.d.ts +1 -1
- package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
- package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
- package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +12 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
- package/types/dynamic-resolver/src/types.d.ts +9 -0
- package/types/dynamic-view/index.d.ts +1 -0
- package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
- package/types/index.d.ts +2 -0
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
- package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
- package/types/lookup/src/components/modal-container.component.d.ts +25 -0
- package/types/lookup/src/components/modal-container.props.d.ts +29 -0
- package/types/lookup/src/composition/types.d.ts +8 -0
- package/types/lookup/src/composition/use-check-props.d.ts +9 -2
- package/types/lookup/src/composition/use-dialog.d.ts +5 -1
- package/types/lookup/src/composition/use-favorite.d.ts +12 -0
- package/types/lookup/src/composition/use-http.d.ts +9 -5
- package/types/lookup/src/composition/use-input-change.d.ts +3 -0
- package/types/lookup/src/composition/use-user-data.d.ts +24 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
- package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
- package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
- package/types/modal/src/composition/use-draggable.d.ts +2 -1
- package/types/modal/src/composition/use-shortcut.d.ts +6 -0
- package/types/modal/src/modal.component.d.ts +3 -0
- package/types/modal/src/modal.props.d.ts +4 -0
- package/types/page-header/src/page-header.props.d.ts +1 -0
- package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
- package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
- package/types/response-layout-editor/src/type.d.ts +21 -0
- package/types/tabs/src/tabs.props.d.ts +1 -0
- package/types/tree-grid/index.d.ts +8 -2
- package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
- package/types/data-grid/src/designer/use-group-column.d.ts +0 -20
- package/types/modal/src/composition/use-esc.d.ts +0 -1
- package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
- package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
|
@@ -1,115 +1,115 @@
|
|
|
1
|
-
import { cloneDeep as
|
|
1
|
+
import { cloneDeep as I, isPlainObject as h } from "lodash-es";
|
|
2
2
|
import "vue";
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
const { properties: e, title: s, ignore: n } = t, r = n && Array.isArray(n), i = Object.keys(e).reduce((
|
|
6
|
-
return (!r || !n.find((
|
|
3
|
+
const b = {}, O = {};
|
|
4
|
+
function m(t) {
|
|
5
|
+
const { properties: e, title: s, ignore: n } = t, r = n && Array.isArray(n), i = Object.keys(e).reduce((u, c) => ((!r || !n.find((d) => d == c)) && (u[c] = e[c].type === "object" && e[c].properties ? m(e[c]) : I(e[c].default)), u), {});
|
|
6
|
+
return (!r || !n.find((u) => u == "id")) && (i.id = `${s}-${Date.now()}`), i;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
const n =
|
|
8
|
+
function P(t, e = {}, s) {
|
|
9
|
+
const n = b[t];
|
|
10
10
|
if (n) {
|
|
11
|
-
let r =
|
|
11
|
+
let r = m(n);
|
|
12
12
|
const i = O[t];
|
|
13
|
-
return r = i ? i({ getSchemaByType:
|
|
13
|
+
return r = i ? i({ getSchemaByType: P }, r, e, s) : r, r;
|
|
14
14
|
}
|
|
15
15
|
return null;
|
|
16
16
|
}
|
|
17
17
|
function y(t, e) {
|
|
18
|
-
const s =
|
|
19
|
-
return Object.keys(t).reduce((n, r) => (n[r] &&
|
|
18
|
+
const s = m(e);
|
|
19
|
+
return Object.keys(t).reduce((n, r) => (n[r] && h(n[r]) && h(t[r]) ? Object.assign(n[r], t[r]) : n[r] = t[r], n), s), s;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function k(t, e) {
|
|
22
22
|
return Object.keys(t).filter((n) => t[n] != null).reduce((n, r) => {
|
|
23
23
|
if (e.has(r)) {
|
|
24
24
|
const i = e.get(r);
|
|
25
25
|
if (typeof i == "string")
|
|
26
26
|
n[i] = t[r];
|
|
27
27
|
else {
|
|
28
|
-
const
|
|
29
|
-
Object.assign(n,
|
|
28
|
+
const u = i(r, t[r], t);
|
|
29
|
+
Object.assign(n, u);
|
|
30
30
|
}
|
|
31
31
|
} else
|
|
32
32
|
n[r] = t[r];
|
|
33
33
|
return n;
|
|
34
34
|
}, {});
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function B(t, e, s = /* @__PURE__ */ new Map()) {
|
|
37
37
|
const n = y(t, e);
|
|
38
|
-
return
|
|
38
|
+
return k(n, s);
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function N(t) {
|
|
41
41
|
var s;
|
|
42
42
|
const e = t.type;
|
|
43
43
|
if (e) {
|
|
44
|
-
const n =
|
|
44
|
+
const n = b[e], r = y(t, n), i = ((s = t.editor) == null ? void 0 : s.type) || "";
|
|
45
45
|
if (i) {
|
|
46
|
-
const
|
|
47
|
-
r.editor =
|
|
46
|
+
const u = b[i], c = y(t.editor, u);
|
|
47
|
+
r.editor = c;
|
|
48
48
|
}
|
|
49
49
|
return r;
|
|
50
50
|
}
|
|
51
51
|
return t;
|
|
52
52
|
}
|
|
53
53
|
function T(t = {}) {
|
|
54
|
-
function e(o,
|
|
55
|
-
if (typeof
|
|
56
|
-
return
|
|
57
|
-
if (typeof
|
|
58
|
-
const p = Object.keys(
|
|
54
|
+
function e(o, l, a, f) {
|
|
55
|
+
if (typeof a == "number")
|
|
56
|
+
return f[o].length === a;
|
|
57
|
+
if (typeof a == "object") {
|
|
58
|
+
const p = Object.keys(a)[0], g = a[p];
|
|
59
59
|
if (p === "not")
|
|
60
|
-
return Number(
|
|
60
|
+
return Number(f[o].length) !== Number(g);
|
|
61
61
|
if (p === "moreThan")
|
|
62
|
-
return Number(
|
|
62
|
+
return Number(f[o].length) >= Number(g);
|
|
63
63
|
if (p === "lessThan")
|
|
64
|
-
return Number(
|
|
64
|
+
return Number(f[o].length) <= Number(g);
|
|
65
65
|
}
|
|
66
66
|
return !1;
|
|
67
67
|
}
|
|
68
|
-
function s(o,
|
|
69
|
-
return
|
|
68
|
+
function s(o, l, a, f) {
|
|
69
|
+
return f[o] && f[o].propertyValue && String(f[o].propertyValue.value) === String(a);
|
|
70
70
|
}
|
|
71
71
|
const n = /* @__PURE__ */ new Map([
|
|
72
72
|
["length", e],
|
|
73
73
|
["getProperty", s]
|
|
74
74
|
]);
|
|
75
|
-
Object.keys(t).reduce((o,
|
|
76
|
-
function r(o,
|
|
77
|
-
const
|
|
78
|
-
return typeof
|
|
79
|
-
if (
|
|
80
|
-
return { target:
|
|
81
|
-
const p =
|
|
82
|
-
return { target:
|
|
75
|
+
Object.keys(t).reduce((o, l) => (o.set(l, t[l]), o), n);
|
|
76
|
+
function r(o, l) {
|
|
77
|
+
const a = o;
|
|
78
|
+
return typeof l == "number" ? [{ target: a, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: a, operator: "getProperty", param: o, value: !!l }] : typeof l == "object" ? Object.keys(l).map((f) => {
|
|
79
|
+
if (f === "length")
|
|
80
|
+
return { target: a, operator: "length", param: null, value: l[f] };
|
|
81
|
+
const p = f, g = l[f];
|
|
82
|
+
return { target: a, operator: "getProperty", param: p, value: g };
|
|
83
83
|
}) : [];
|
|
84
84
|
}
|
|
85
85
|
function i(o) {
|
|
86
|
-
return Object.keys(o).reduce((
|
|
87
|
-
const p = r(
|
|
88
|
-
return
|
|
86
|
+
return Object.keys(o).reduce((a, f) => {
|
|
87
|
+
const p = r(f, o[f]);
|
|
88
|
+
return a.push(...p), a;
|
|
89
89
|
}, []);
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function u(o, l) {
|
|
92
92
|
if (n.has(o.operator)) {
|
|
93
|
-
const
|
|
94
|
-
return
|
|
93
|
+
const a = n.get(o.operator);
|
|
94
|
+
return a && a(o.target, o.param, o.value, l) || !1;
|
|
95
95
|
}
|
|
96
96
|
return !1;
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
return i(o).reduce((p,
|
|
98
|
+
function c(o, l) {
|
|
99
|
+
return i(o).reduce((p, g) => p && u(g, l), !0);
|
|
100
100
|
}
|
|
101
|
-
function
|
|
102
|
-
const
|
|
103
|
-
return
|
|
101
|
+
function d(o, l) {
|
|
102
|
+
const a = Object.keys(o), f = a.includes("allOf"), p = a.includes("anyOf"), g = f || p, v = (g ? o[g ? f ? "allOf" : "anyOf" : "allOf"] : [o]).map((E) => c(E, l));
|
|
103
|
+
return f ? !v.includes(!1) : v.includes(!0);
|
|
104
104
|
}
|
|
105
|
-
return { parseValueSchema:
|
|
105
|
+
return { parseValueSchema: d };
|
|
106
106
|
}
|
|
107
|
-
const
|
|
107
|
+
const j = {}, C = {};
|
|
108
108
|
T();
|
|
109
|
-
function
|
|
110
|
-
return
|
|
111
|
-
const
|
|
112
|
-
return Object.assign(
|
|
109
|
+
function $(t, e, s = /* @__PURE__ */ new Map(), n = (u, c, d) => c, r = {}, i = (u) => u) {
|
|
110
|
+
return b[e.title] = e, O[e.title] = n, j[e.title] = r, C[e.title] = i, (u = {}) => {
|
|
111
|
+
const c = B(u, e, s), d = Object.keys(t).reduce((o, l) => (o[l] = t[l].default, o), {});
|
|
112
|
+
return Object.assign(d, c);
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
115
|
function w(t, e) {
|
|
@@ -118,7 +118,7 @@ function w(t, e) {
|
|
|
118
118
|
function A(t, e) {
|
|
119
119
|
return { buttons: e.buttons };
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function U() {
|
|
122
122
|
function t(e, s) {
|
|
123
123
|
const { id: n } = e || {}, { field: r } = e.binding || {};
|
|
124
124
|
return {
|
|
@@ -132,7 +132,7 @@ function G() {
|
|
|
132
132
|
resolve: t
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function G() {
|
|
136
136
|
function t(e, s) {
|
|
137
137
|
const { id: n } = e || {}, { dataSource: r } = e || {};
|
|
138
138
|
return r === void 0 ? {} : {
|
|
@@ -145,7 +145,7 @@ function U() {
|
|
|
145
145
|
resolve: t
|
|
146
146
|
};
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function H() {
|
|
149
149
|
function t(e, s) {
|
|
150
150
|
const { dataSource: n } = e || {};
|
|
151
151
|
return n === void 0 ? {} : {};
|
|
@@ -169,11 +169,11 @@ function x() {
|
|
|
169
169
|
function F() {
|
|
170
170
|
return (t, e, s) => {
|
|
171
171
|
const n = e.id, { type: r } = e, i = t.emits;
|
|
172
|
-
return i ? i.filter((
|
|
173
|
-
const
|
|
174
|
-
return
|
|
175
|
-
s.dispatch(n,
|
|
176
|
-
},
|
|
172
|
+
return i ? i.filter((u) => u !== "update:modelValue").reduce((u, c) => {
|
|
173
|
+
const d = `on${c.charAt(0).toUpperCase()}${c.slice(1)}`;
|
|
174
|
+
return u[d] = (...o) => {
|
|
175
|
+
s.dispatch(n, c, r, o);
|
|
176
|
+
}, u;
|
|
177
177
|
}, {}) : {};
|
|
178
178
|
};
|
|
179
179
|
}
|
|
@@ -209,22 +209,65 @@ function z() {
|
|
|
209
209
|
resolve: t
|
|
210
210
|
};
|
|
211
211
|
}
|
|
212
|
+
function J() {
|
|
213
|
+
function t(e, s) {
|
|
214
|
+
const { name: n } = s;
|
|
215
|
+
return e[`on${n.charAt(0).toUpperCase()}${n.slice(1)}`] || e[n];
|
|
216
|
+
}
|
|
217
|
+
return {
|
|
218
|
+
resolve: t
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
function Q() {
|
|
222
|
+
function t(e, s) {
|
|
223
|
+
var c;
|
|
224
|
+
const n = (c = e.toolbar) == null ? void 0 : c.buttons;
|
|
225
|
+
if (!n || n.length < 1)
|
|
226
|
+
return null;
|
|
227
|
+
const [r, i] = s.payloads, u = n.find((d) => d.id === i);
|
|
228
|
+
return u ? u.onClick || u.click : null;
|
|
229
|
+
}
|
|
230
|
+
return {
|
|
231
|
+
resolve: t
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
function X() {
|
|
235
|
+
function t(e, s) {
|
|
236
|
+
const n = e.contents;
|
|
237
|
+
if (!n || n.length < 1)
|
|
238
|
+
return null;
|
|
239
|
+
const r = n.reduce((d, o) => {
|
|
240
|
+
const l = o.toolbar && o.toolbar.buttons || [];
|
|
241
|
+
return d.push(...l), d;
|
|
242
|
+
}, []);
|
|
243
|
+
if (!r || r.length < 1)
|
|
244
|
+
return;
|
|
245
|
+
const [i, u] = s.payloads, c = r.find((d) => d.id === u);
|
|
246
|
+
return c ? c.onClick || c.click : null;
|
|
247
|
+
}
|
|
248
|
+
return {
|
|
249
|
+
resolve: t
|
|
250
|
+
};
|
|
251
|
+
}
|
|
212
252
|
export {
|
|
213
|
-
|
|
253
|
+
G as createCollectionBindingResolver,
|
|
214
254
|
L as createDataGridSelectionItemResolver,
|
|
215
255
|
x as createDataMappingBindingResolver,
|
|
256
|
+
J as createEventHandlerResolver,
|
|
216
257
|
F as createEventsResolver,
|
|
217
|
-
|
|
258
|
+
U as createFormBindingResolver,
|
|
218
259
|
q as createFormGroupEditorResolver,
|
|
219
|
-
|
|
220
|
-
$ as
|
|
260
|
+
Q as createPageHeaderEventHandlerResolver,
|
|
261
|
+
$ as createPropsResolver,
|
|
262
|
+
X as createTabsEventHandlerResolver,
|
|
263
|
+
H as createTreeGridBindingResolver,
|
|
221
264
|
W as createTreeGridSelectionItemResolver,
|
|
222
265
|
z as createVisiblePropResolver,
|
|
223
|
-
|
|
266
|
+
P as getSchemaByType,
|
|
224
267
|
w as resolveAppearance,
|
|
225
|
-
|
|
226
|
-
|
|
268
|
+
B as resolveSchemaToProps,
|
|
269
|
+
N as resolveSchemaWithDefaultValue,
|
|
227
270
|
A as resolveToolbar,
|
|
228
|
-
|
|
271
|
+
b as schemaMap,
|
|
229
272
|
O as schemaResolverMap
|
|
230
273
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(s,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("lodash-es"),require("vue")):typeof define=="function"&&define.amd?define(["exports","lodash-es","vue"],b):(s=typeof globalThis<"u"?globalThis:s||self,b(s["dynamic-resolver"]={},s.LodashES))})(this,function(s,b){"use strict";const m={},y={};function R(t){const{properties:e,title:i,ignore:n}=t,r=n&&Array.isArray(n),c=Object.keys(e).reduce((u,l)=>((!r||!n.find(p=>p==l))&&(u[l]=e[l].type==="object"&&e[l].properties?R(e[l]):b.cloneDeep(e[l].default)),u),{});return(!r||!n.find(u=>u=="id"))&&(c.id=`${i}-${Date.now()}`),c}function E(t,e={},i){const n=m[t];if(n){let r=R(n);const c=y[t];return r=c?c({getSchemaByType:E},r,e,i):r,r}return null}function h(t,e){const i=R(e);return Object.keys(t).reduce((n,r)=>(n[r]&&b.isPlainObject(n[r])&&b.isPlainObject(t[r])?Object.assign(n[r],t[r]):n[r]=t[r],n),i),i}function P(t,e){return Object.keys(t).filter(n=>t[n]!=null).reduce((n,r)=>{if(e.has(r)){const c=e.get(r);if(typeof c=="string")n[c]=t[r];else{const u=c(r,t[r],t);Object.assign(n,u)}}else n[r]=t[r];return n},{})}function T(t,e,i=new Map){const n=h(t,e);return P(n,i)}function S(t){var i;const e=t.type;if(e){const n=m[e],r=h(t,n),c=((i=t.editor)==null?void 0:i.type)||"";if(c){const u=m[c],l=h(t.editor,u);r.editor=l}return r}return t}function B(t={}){function e(o,a,f,d){if(typeof f=="number")return d[o].length===f;if(typeof f=="object"){const g=Object.keys(f)[0],v=f[g];if(g==="not")return Number(d[o].length)!==Number(v);if(g==="moreThan")return Number(d[o].length)>=Number(v);if(g==="lessThan")return Number(d[o].length)<=Number(v)}return!1}function i(o,a,f,d){return d[o]&&d[o].propertyValue&&String(d[o].propertyValue.value)===String(f)}const n=new Map([["length",e],["getProperty",i]]);Object.keys(t).reduce((o,a)=>(o.set(a,t[a]),o),n);function r(o,a){const f=o;return typeof a=="number"?[{target:f,operator:"length",param:null,value:Number(a)}]:typeof a=="boolean"?[{target:f,operator:"getProperty",param:o,value:!!a}]:typeof a=="object"?Object.keys(a).map(d=>{if(d==="length")return{target:f,operator:"length",param:null,value:a[d]};const g=d,v=a[d];return{target:f,operator:"getProperty",param:g,value:v}}):[]}function c(o){return Object.keys(o).reduce((f,d)=>{const g=r(d,o[d]);return f.push(...g),f},[])}function u(o,a){if(n.has(o.operator)){const f=n.get(o.operator);return f&&f(o.target,o.param,o.value,a)||!1}return!1}function l(o,a){return c(o).reduce((g,v)=>g&&u(v,a),!0)}function p(o,a){const f=Object.keys(o),d=f.includes("allOf"),g=f.includes("anyOf"),v=d||g,O=(v?o[v?d?"allOf":"anyOf":"allOf"]:[o]).map(z=>l(z,a));return d?!O.includes(!1):O.includes(!0)}return{parseValueSchema:p}}const I={},j={};B();function k(t,e,i=new Map,n=(u,l,p)=>l,r={},c=u=>u){return m[e.title]=e,y[e.title]=n,I[e.title]=r,j[e.title]=c,(u={})=>{const l=T(u,e,i),p=Object.keys(t).reduce((o,a)=>(o[a]=t[a].default,o),{});return Object.assign(p,l)}}function C(t,e){return{customClass:e.class,customStyle:e.style}}function M(t,e){return{buttons:e.buttons}}function V(){function t(e,i){const{id:n}=e||{},{field:r}=e.binding||{};return{modelValue:i.getValue(n),"onUpdate:modelValue":c=>{i.setValue(n,r,c)}}}return{resolve:t}}function D(){function t(e,i){const{id:n}=e||{},{dataSource:r}=e||{};return r===void 0?{}:{data:i.getValue(n),"onUpdate:data":(...c)=>{}}}return{resolve:t}}function G(){function t(e,i){const{dataSource:n}=e||{};return n===void 0?{}:{}}return{resolve:t}}function H(){function t(e,i){const{path:n}=e.binding||{};return n?{"onUpdate:dataMapping":(...r)=>{}}:{}}return{resolve:t}}function A(){return(t,e,i)=>{const n=e.id,{type:r}=e,c=t.emits;return c?c.filter(u=>u!=="update:modelValue").reduce((u,l)=>{const p=`on${l.charAt(0).toUpperCase()}${l.slice(1)}`;return u[p]=(...o)=>{i.dispatch(n,l,r,o)},u},{}):{}}}function N(){function t(e,i){return e.selectItemById(i)}return{selectItemById:t}}function $(){function t(e,i){return e.selectItemById(i)}return{selectItemById:t}}function w(){function t(e){return e.editor}return{resolve:t}}function F(){function t(e){return Object.prototype.hasOwnProperty.call(e,"visible")?e.visible:null}return{resolve:t}}function U(){function t(e,i){const{name:n}=i;return e[`on${n.charAt(0).toUpperCase()}${n.slice(1)}`]||e[n]}return{resolve:t}}function L(){function t(e,i){var l;const n=(l=e.toolbar)==null?void 0:l.buttons;if(!n||n.length<1)return null;const[r,c]=i.payloads,u=n.find(p=>p.id===c);return u?u.onClick||u.click:null}return{resolve:t}}function q(){function t(e,i){const n=e.contents;if(!n||n.length<1)return null;const r=n.reduce((p,o)=>{const a=o.toolbar&&o.toolbar.buttons||[];return p.push(...a),p},[]);if(!r||r.length<1)return;const[c,u]=i.payloads,l=r.find(p=>p.id===u);return l?l.onClick||l.click:null}return{resolve:t}}s.createCollectionBindingResolver=D,s.createDataGridSelectionItemResolver=N,s.createDataMappingBindingResolver=H,s.createEventHandlerResolver=U,s.createEventsResolver=A,s.createFormBindingResolver=V,s.createFormGroupEditorResolver=w,s.createPageHeaderEventHandlerResolver=L,s.createPropsResolver=k,s.createTabsEventHandlerResolver=q,s.createTreeGridBindingResolver=G,s.createTreeGridSelectionItemResolver=$,s.createVisiblePropResolver=F,s.getSchemaByType=E,s.resolveAppearance=C,s.resolveSchemaToProps=T,s.resolveSchemaWithDefaultValue=S,s.resolveToolbar=M,s.schemaMap=m,s.schemaResolverMap=y,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})});
|