@farris/ui-vue 1.3.4 → 1.3.6
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 +16 -16
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +65 -65
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +13 -13
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +504 -490
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +247 -233
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +356 -344
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +159 -145
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +127 -128
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +15 -15
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/component/index.esm.js +101 -87
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +9 -7
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +181 -167
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +746 -730
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +9 -7
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +789 -777
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +3096 -3069
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +257 -243
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +322 -306
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +177 -163
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +78 -82
- package/components/event-parameter/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +501 -487
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +37 -37
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +487 -472
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +440 -433
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +594 -587
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.esm.js +2766 -2739
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +402 -388
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +201 -202
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +264 -245
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +157 -143
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +314 -298
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +862 -843
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +1031 -1015
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +169 -155
- package/components/nav/index.umd.cjs +2 -2
- package/components/number-range/index.esm.js +150 -137
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +207 -194
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +427 -414
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +22 -22
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +510 -492
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +192 -178
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +234 -220
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +288 -277
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +62 -61
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +776 -770
- package/components/query-solution/index.umd.cjs +6 -6
- package/components/radio-button/index.esm.js +64 -64
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +296 -283
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +222 -208
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +187 -173
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +554 -542
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +483 -469
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +634 -619
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +228 -214
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +419 -406
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +162 -148
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +308 -284
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +279 -265
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +183 -170
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +307 -294
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +320 -306
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +245 -231
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +260 -247
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +409 -396
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +424 -410
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +383 -376
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +595 -575
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +325 -311
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +304 -290
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +99 -85
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +947 -933
- package/components/weather/index.umd.cjs +4 -4
- package/farris.all.esm.js +5492 -5470
- package/farris.all.umd.cjs +13 -13
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/condition/src/composition/condition-value/input-group-value.d.ts +1 -1
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +3 -0
- package/types/entity-binding-selector/composition/use-field-tree.d.ts +1 -0
|
@@ -1,288 +1,302 @@
|
|
|
1
|
-
import { cloneDeep as
|
|
1
|
+
import { cloneDeep as R, isPlainObject as h } from "lodash-es";
|
|
2
2
|
import "vue";
|
|
3
|
-
const m = {},
|
|
4
|
-
function b(
|
|
5
|
-
const { properties: e, title: o, ignore:
|
|
6
|
-
if (o && (!r || !
|
|
7
|
-
const
|
|
8
|
-
|
|
3
|
+
const m = {}, E = {};
|
|
4
|
+
function b(n) {
|
|
5
|
+
const { properties: e, title: o, ignore: t } = n, r = t && Array.isArray(t), i = Object.keys(e).reduce((s, c) => ((!r || !t.find((d) => d === c)) && (s[c] = e[c].type === "object" && e[c].properties ? b(e[c]) : R(e[c].default)), s), {});
|
|
6
|
+
if (o && (!r || !t.find((s) => s === "id"))) {
|
|
7
|
+
const s = o.toLowerCase().replace(/-/g, "_");
|
|
8
|
+
i.id = `${s}_${Math.random().toString().slice(2, 6)}`;
|
|
9
9
|
}
|
|
10
|
-
return
|
|
10
|
+
return i;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
const
|
|
14
|
-
if (
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
function S(n) {
|
|
13
|
+
const { properties: e, title: o, required: t } = n;
|
|
14
|
+
if (t && Array.isArray(t)) {
|
|
15
|
+
const r = t.reduce((i, s) => (i[s] = e[s].type === "object" && e[s].properties ? b(e[s]) : R(e[s].default), i), {});
|
|
16
|
+
if (o && t.find((i) => i === "id")) {
|
|
17
|
+
const i = o.toLowerCase().replace(/-/g, "_");
|
|
18
|
+
r.id = `${i}_${Math.random().toString().slice(2, 6)}`;
|
|
19
|
+
}
|
|
20
|
+
return r;
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
type: o
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function B(n, e = {}, o) {
|
|
27
|
+
const t = m[n];
|
|
28
|
+
if (t) {
|
|
29
|
+
let r = S(t);
|
|
30
|
+
const i = E[n];
|
|
31
|
+
return r = i ? i({ getSchemaByType: B }, r, e, o) : r, r;
|
|
18
32
|
}
|
|
19
33
|
return null;
|
|
20
34
|
}
|
|
21
|
-
function y(
|
|
35
|
+
function y(n, e) {
|
|
22
36
|
const o = b(e);
|
|
23
|
-
return Object.keys(o).reduce((
|
|
37
|
+
return Object.keys(o).reduce((t, r) => (Object.prototype.hasOwnProperty.call(n, r) && (t[r] && h(t[r]) && h(n[r] || !n[r]) ? Object.assign(t[r], n[r] || {}) : t[r] = n[r]), t), o), o;
|
|
24
38
|
}
|
|
25
|
-
function C(
|
|
26
|
-
return Object.keys(
|
|
39
|
+
function C(n, e) {
|
|
40
|
+
return Object.keys(n).filter((t) => n[t] != null).reduce((t, r) => {
|
|
27
41
|
if (e.has(r)) {
|
|
28
|
-
const
|
|
29
|
-
if (typeof
|
|
30
|
-
|
|
42
|
+
const i = e.get(r);
|
|
43
|
+
if (typeof i == "string")
|
|
44
|
+
t[i] = n[r];
|
|
31
45
|
else {
|
|
32
|
-
const
|
|
33
|
-
Object.assign(
|
|
46
|
+
const s = i(r, n[r], n);
|
|
47
|
+
Object.assign(t, s);
|
|
34
48
|
}
|
|
35
49
|
} else
|
|
36
|
-
|
|
37
|
-
return
|
|
50
|
+
t[r] = n[r];
|
|
51
|
+
return t;
|
|
38
52
|
}, {});
|
|
39
53
|
}
|
|
40
|
-
function O(
|
|
41
|
-
const
|
|
42
|
-
return C(
|
|
54
|
+
function O(n, e, o = /* @__PURE__ */ new Map()) {
|
|
55
|
+
const t = y(n, e);
|
|
56
|
+
return C(t, o);
|
|
43
57
|
}
|
|
44
|
-
function
|
|
58
|
+
function D(n) {
|
|
45
59
|
var o;
|
|
46
|
-
const e =
|
|
60
|
+
const e = n.type;
|
|
47
61
|
if (e) {
|
|
48
|
-
const
|
|
49
|
-
if (!
|
|
50
|
-
return
|
|
51
|
-
const r = y(
|
|
52
|
-
if (
|
|
53
|
-
const
|
|
54
|
-
r.editor =
|
|
62
|
+
const t = m[e];
|
|
63
|
+
if (!t)
|
|
64
|
+
return n;
|
|
65
|
+
const r = y(n, t), i = ((o = n.editor) == null ? void 0 : o.type) || "";
|
|
66
|
+
if (i) {
|
|
67
|
+
const s = m[i], c = y(n.editor, s);
|
|
68
|
+
r.editor = c;
|
|
55
69
|
}
|
|
56
70
|
return r;
|
|
57
71
|
}
|
|
58
|
-
return
|
|
72
|
+
return n;
|
|
59
73
|
}
|
|
60
|
-
function
|
|
61
|
-
function e(
|
|
74
|
+
function T(n = {}) {
|
|
75
|
+
function e(u, a, l, f) {
|
|
62
76
|
if (typeof l == "number")
|
|
63
|
-
return f[
|
|
77
|
+
return f[u].length === l;
|
|
64
78
|
if (typeof l == "object") {
|
|
65
|
-
const
|
|
66
|
-
if (
|
|
67
|
-
return Number(f[
|
|
68
|
-
if (
|
|
69
|
-
return Number(f[
|
|
70
|
-
if (
|
|
71
|
-
return Number(f[
|
|
79
|
+
const p = Object.keys(l)[0], g = l[p];
|
|
80
|
+
if (p === "not")
|
|
81
|
+
return Number(f[u].length) !== Number(g);
|
|
82
|
+
if (p === "moreThan")
|
|
83
|
+
return Number(f[u].length) >= Number(g);
|
|
84
|
+
if (p === "lessThan")
|
|
85
|
+
return Number(f[u].length) <= Number(g);
|
|
72
86
|
}
|
|
73
87
|
return !1;
|
|
74
88
|
}
|
|
75
|
-
function o(
|
|
76
|
-
return f[
|
|
89
|
+
function o(u, a, l, f) {
|
|
90
|
+
return f[u] && f[u].propertyValue && String(f[u].propertyValue.value) === String(l);
|
|
77
91
|
}
|
|
78
|
-
const
|
|
92
|
+
const t = /* @__PURE__ */ new Map([
|
|
79
93
|
["length", e],
|
|
80
94
|
["getProperty", o]
|
|
81
95
|
]);
|
|
82
|
-
Object.keys(
|
|
83
|
-
function r(
|
|
84
|
-
const l =
|
|
85
|
-
return typeof a == "number" ? [{ target: l, operator: "length", param: null, value: Number(a) }] : typeof a == "boolean" ? [{ target: l, operator: "getProperty", param:
|
|
96
|
+
Object.keys(n).reduce((u, a) => (u.set(a, n[a]), u), t);
|
|
97
|
+
function r(u, a) {
|
|
98
|
+
const l = u;
|
|
99
|
+
return typeof a == "number" ? [{ target: l, operator: "length", param: null, value: Number(a) }] : typeof a == "boolean" ? [{ target: l, operator: "getProperty", param: u, value: !!a }] : typeof a == "object" ? Object.keys(a).map((f) => {
|
|
86
100
|
if (f === "length")
|
|
87
101
|
return { target: l, operator: "length", param: null, value: a[f] };
|
|
88
|
-
const
|
|
89
|
-
return { target: l, operator: "getProperty", param:
|
|
102
|
+
const p = f, g = a[f];
|
|
103
|
+
return { target: l, operator: "getProperty", param: p, value: g };
|
|
90
104
|
}) : [];
|
|
91
105
|
}
|
|
92
|
-
function
|
|
93
|
-
return Object.keys(
|
|
94
|
-
const
|
|
95
|
-
return l.push(...
|
|
106
|
+
function i(u) {
|
|
107
|
+
return Object.keys(u).reduce((l, f) => {
|
|
108
|
+
const p = r(f, u[f]);
|
|
109
|
+
return l.push(...p), l;
|
|
96
110
|
}, []);
|
|
97
111
|
}
|
|
98
|
-
function u
|
|
99
|
-
if (
|
|
100
|
-
const l =
|
|
101
|
-
return l && l(
|
|
112
|
+
function s(u, a) {
|
|
113
|
+
if (t.has(u.operator)) {
|
|
114
|
+
const l = t.get(u.operator);
|
|
115
|
+
return l && l(u.target, u.param, u.value, a) || !1;
|
|
102
116
|
}
|
|
103
117
|
return !1;
|
|
104
118
|
}
|
|
105
|
-
function
|
|
106
|
-
return
|
|
119
|
+
function c(u, a) {
|
|
120
|
+
return i(u).reduce((p, g) => p && s(g, a), !0);
|
|
107
121
|
}
|
|
108
|
-
function
|
|
109
|
-
const l = Object.keys(
|
|
122
|
+
function d(u, a) {
|
|
123
|
+
const l = Object.keys(u), f = l.includes("allOf"), p = l.includes("anyOf"), g = f || p, v = (g ? u[g ? f ? "allOf" : "anyOf" : "allOf"] : [u]).map((I) => c(I, a));
|
|
110
124
|
return f ? !v.includes(!1) : v.includes(!0);
|
|
111
125
|
}
|
|
112
|
-
return { parseValueSchema:
|
|
126
|
+
return { parseValueSchema: d };
|
|
113
127
|
}
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
function
|
|
117
|
-
return m[e.title] = e,
|
|
118
|
-
const
|
|
119
|
-
return Object.assign(
|
|
128
|
+
const k = {}, M = {};
|
|
129
|
+
T();
|
|
130
|
+
function j(n, e, o = /* @__PURE__ */ new Map(), t = (s, c, d, u) => c, r = {}, i = (s) => s) {
|
|
131
|
+
return m[e.title] = e, E[e.title] = t, k[e.title] = r, M[e.title] = i, (s = {}) => {
|
|
132
|
+
const c = O(s, e, o), d = Object.keys(n).reduce((u, a) => (u[a] = n[a].default, u), {});
|
|
133
|
+
return Object.assign(d, c);
|
|
120
134
|
};
|
|
121
135
|
}
|
|
122
|
-
function
|
|
136
|
+
function N(n, e) {
|
|
123
137
|
return { customClass: e.class, customStyle: e.style };
|
|
124
138
|
}
|
|
125
|
-
function
|
|
126
|
-
var
|
|
139
|
+
function x(n, e) {
|
|
140
|
+
var t, r;
|
|
127
141
|
const o = [];
|
|
128
|
-
return e == null || e.buttons.map((
|
|
129
|
-
const
|
|
130
|
-
Object.keys(
|
|
131
|
-
var
|
|
132
|
-
|
|
133
|
-
}), o.push(
|
|
134
|
-
}), (
|
|
142
|
+
return e == null || e.buttons.map((i) => {
|
|
143
|
+
const s = {};
|
|
144
|
+
Object.keys(i).map((c) => {
|
|
145
|
+
var d;
|
|
146
|
+
c === "appearance" ? s.class = ((d = i[c]) == null ? void 0 : d.class) || "" : s[c] = i[c];
|
|
147
|
+
}), o.push(s);
|
|
148
|
+
}), (t = e.appearance) != null && t.class ? { buttons: o, buttonClass: (r = e.appearance) == null ? void 0 : r.class } : { buttons: o };
|
|
135
149
|
}
|
|
136
150
|
function H() {
|
|
137
|
-
function
|
|
138
|
-
const { id:
|
|
151
|
+
function n(e, o) {
|
|
152
|
+
const { id: t } = e || {}, { field: r } = e.binding || {};
|
|
139
153
|
return {
|
|
140
|
-
modelValue: o.getValue(
|
|
141
|
-
"onUpdate:modelValue": (
|
|
142
|
-
o.setValue(
|
|
154
|
+
modelValue: o.getValue(t),
|
|
155
|
+
"onUpdate:modelValue": (i) => {
|
|
156
|
+
o.setValue(t, r, i);
|
|
143
157
|
}
|
|
144
158
|
};
|
|
145
159
|
}
|
|
146
160
|
return {
|
|
147
|
-
resolve:
|
|
161
|
+
resolve: n
|
|
148
162
|
};
|
|
149
163
|
}
|
|
150
164
|
function U() {
|
|
151
|
-
function
|
|
152
|
-
const { id:
|
|
165
|
+
function n(e, o) {
|
|
166
|
+
const { id: t } = e || {}, { dataSource: r } = e || {};
|
|
153
167
|
return r === void 0 ? {} : {
|
|
154
|
-
data: o.getValue(
|
|
155
|
-
"onUpdate:data": (...
|
|
168
|
+
data: o.getValue(t),
|
|
169
|
+
"onUpdate:data": (...i) => {
|
|
156
170
|
}
|
|
157
171
|
};
|
|
158
172
|
}
|
|
159
173
|
return {
|
|
160
|
-
resolve:
|
|
174
|
+
resolve: n
|
|
161
175
|
};
|
|
162
176
|
}
|
|
163
|
-
function
|
|
164
|
-
function
|
|
165
|
-
const { dataSource:
|
|
166
|
-
return
|
|
177
|
+
function G() {
|
|
178
|
+
function n(e, o) {
|
|
179
|
+
const { dataSource: t } = e || {};
|
|
180
|
+
return t === void 0 ? {} : {};
|
|
167
181
|
}
|
|
168
182
|
return {
|
|
169
|
-
resolve:
|
|
183
|
+
resolve: n
|
|
170
184
|
};
|
|
171
185
|
}
|
|
172
|
-
function
|
|
173
|
-
function
|
|
174
|
-
const { path:
|
|
175
|
-
return
|
|
186
|
+
function L() {
|
|
187
|
+
function n(e, o) {
|
|
188
|
+
const { path: t } = e.binding || {};
|
|
189
|
+
return t ? {
|
|
176
190
|
"onUpdate:dataMapping": (...r) => {
|
|
177
191
|
}
|
|
178
192
|
} : {};
|
|
179
193
|
}
|
|
180
194
|
return {
|
|
181
|
-
resolve:
|
|
195
|
+
resolve: n
|
|
182
196
|
};
|
|
183
197
|
}
|
|
184
|
-
function
|
|
185
|
-
return (
|
|
186
|
-
const
|
|
187
|
-
return
|
|
188
|
-
const
|
|
189
|
-
return
|
|
190
|
-
o.dispatch(
|
|
191
|
-
},
|
|
198
|
+
function _() {
|
|
199
|
+
return (n, e, o) => {
|
|
200
|
+
const t = e.id, { type: r } = e, i = n.emits;
|
|
201
|
+
return i ? i.filter((s) => s !== "update:modelValue").reduce((s, c) => {
|
|
202
|
+
const d = `on${c.charAt(0).toUpperCase()}${c.slice(1)}`;
|
|
203
|
+
return s[d] = (...u) => {
|
|
204
|
+
o.dispatch(t, c, r, u);
|
|
205
|
+
}, s;
|
|
192
206
|
}, {}) : {};
|
|
193
207
|
};
|
|
194
208
|
}
|
|
195
|
-
function
|
|
196
|
-
function
|
|
209
|
+
function q() {
|
|
210
|
+
function n(e, o) {
|
|
197
211
|
return e.selectItemById(o);
|
|
198
212
|
}
|
|
199
213
|
return {
|
|
200
|
-
selectItemById:
|
|
214
|
+
selectItemById: n
|
|
201
215
|
};
|
|
202
216
|
}
|
|
203
|
-
function
|
|
204
|
-
function
|
|
217
|
+
function F() {
|
|
218
|
+
function n(e, o) {
|
|
205
219
|
return e.selectItemById(o);
|
|
206
220
|
}
|
|
207
221
|
return {
|
|
208
|
-
selectItemById:
|
|
222
|
+
selectItemById: n
|
|
209
223
|
};
|
|
210
224
|
}
|
|
211
225
|
function W() {
|
|
212
|
-
function
|
|
226
|
+
function n(e) {
|
|
213
227
|
return e.editor;
|
|
214
228
|
}
|
|
215
229
|
return {
|
|
216
|
-
resolve:
|
|
230
|
+
resolve: n
|
|
217
231
|
};
|
|
218
232
|
}
|
|
219
|
-
function
|
|
220
|
-
function
|
|
233
|
+
function z() {
|
|
234
|
+
function n(e) {
|
|
221
235
|
return Object.prototype.hasOwnProperty.call(e, "visible") ? e.visible : null;
|
|
222
236
|
}
|
|
223
237
|
return {
|
|
224
|
-
resolve:
|
|
238
|
+
resolve: n
|
|
225
239
|
};
|
|
226
240
|
}
|
|
227
|
-
function
|
|
228
|
-
function
|
|
229
|
-
const { name:
|
|
230
|
-
return e[`on${
|
|
241
|
+
function J() {
|
|
242
|
+
function n(e, o) {
|
|
243
|
+
const { name: t } = o;
|
|
244
|
+
return e[`on${t.charAt(0).toUpperCase()}${t.slice(1)}`] || e[t];
|
|
231
245
|
}
|
|
232
246
|
return {
|
|
233
|
-
resolve:
|
|
247
|
+
resolve: n
|
|
234
248
|
};
|
|
235
249
|
}
|
|
236
|
-
function
|
|
237
|
-
function
|
|
238
|
-
var
|
|
239
|
-
const
|
|
240
|
-
if (!
|
|
250
|
+
function Q() {
|
|
251
|
+
function n(e, o) {
|
|
252
|
+
var c;
|
|
253
|
+
const t = (c = e.toolbar) == null ? void 0 : c.buttons;
|
|
254
|
+
if (!t || t.length < 1)
|
|
241
255
|
return null;
|
|
242
|
-
const [r,
|
|
243
|
-
return
|
|
256
|
+
const [r, i] = o.payloads, s = t.find((d) => d.id === i);
|
|
257
|
+
return s ? s.onClick || s.click : null;
|
|
244
258
|
}
|
|
245
259
|
return {
|
|
246
|
-
resolve:
|
|
260
|
+
resolve: n
|
|
247
261
|
};
|
|
248
262
|
}
|
|
249
|
-
function
|
|
250
|
-
function
|
|
251
|
-
const
|
|
252
|
-
if (!
|
|
263
|
+
function X() {
|
|
264
|
+
function n(e, o) {
|
|
265
|
+
const t = e.contents;
|
|
266
|
+
if (!t || t.length < 1)
|
|
253
267
|
return null;
|
|
254
|
-
const r =
|
|
255
|
-
const a =
|
|
256
|
-
return
|
|
268
|
+
const r = t.reduce((d, u) => {
|
|
269
|
+
const a = u.toolbar && u.toolbar.buttons || [];
|
|
270
|
+
return d.push(...a), d;
|
|
257
271
|
}, []);
|
|
258
272
|
if (!r || r.length < 1)
|
|
259
273
|
return;
|
|
260
|
-
const [
|
|
261
|
-
return
|
|
274
|
+
const [i, s] = o.payloads, c = r.find((d) => d.id === s);
|
|
275
|
+
return c ? c.onClick || c.click : null;
|
|
262
276
|
}
|
|
263
277
|
return {
|
|
264
|
-
resolve:
|
|
278
|
+
resolve: n
|
|
265
279
|
};
|
|
266
280
|
}
|
|
267
281
|
export {
|
|
268
282
|
U as createCollectionBindingResolver,
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
283
|
+
q as createDataGridSelectionItemResolver,
|
|
284
|
+
L as createDataMappingBindingResolver,
|
|
285
|
+
J as createEventHandlerResolver,
|
|
286
|
+
_ as createEventsResolver,
|
|
273
287
|
H as createFormBindingResolver,
|
|
274
288
|
W as createFormGroupEditorResolver,
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
289
|
+
Q as createPageHeaderEventHandlerResolver,
|
|
290
|
+
j as createPropsResolver,
|
|
291
|
+
X as createTabsEventHandlerResolver,
|
|
292
|
+
G as createTreeGridBindingResolver,
|
|
293
|
+
F as createTreeGridSelectionItemResolver,
|
|
294
|
+
z as createVisiblePropResolver,
|
|
281
295
|
B as getSchemaByType,
|
|
282
|
-
|
|
296
|
+
N as resolveAppearance,
|
|
283
297
|
O as resolveSchemaToProps,
|
|
284
|
-
|
|
285
|
-
|
|
298
|
+
D as resolveSchemaWithDefaultValue,
|
|
299
|
+
x as resolveToolbar,
|
|
286
300
|
m as schemaMap,
|
|
287
|
-
|
|
301
|
+
E as schemaResolverMap
|
|
288
302
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(a,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("lodash-es"),require("vue")):typeof define=="function"&&define.amd?define(["exports","lodash-es","vue"],m):(a=typeof globalThis<"u"?globalThis:a||self,m(a["dynamic-resolver"]={},a.LodashES))})(this,function(a,m){"use strict";const y={},b={};function R(n){const{properties:e,title:o,ignore:t}=n,r=t&&Array.isArray(t),
|
|
1
|
+
(function(a,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("lodash-es"),require("vue")):typeof define=="function"&&define.amd?define(["exports","lodash-es","vue"],m):(a=typeof globalThis<"u"?globalThis:a||self,m(a["dynamic-resolver"]={},a.LodashES))})(this,function(a,m){"use strict";const y={},b={};function R(n){const{properties:e,title:o,ignore:t}=n,r=t&&Array.isArray(t),c=Object.keys(e).reduce((s,u)=>((!r||!t.find(p=>p===u))&&(s[u]=e[u].type==="object"&&e[u].properties?R(e[u]):m.cloneDeep(e[u].default)),s),{});if(o&&(!r||!t.find(s=>s==="id"))){const s=o.toLowerCase().replace(/-/g,"_");c.id=`${s}_${Math.random().toString().slice(2,6)}`}return c}function E(n){const{properties:e,title:o,required:t}=n;if(t&&Array.isArray(t)){const r=t.reduce((c,s)=>(c[s]=e[s].type==="object"&&e[s].properties?R(e[s]):m.cloneDeep(e[s].default),c),{});if(o&&t.find(c=>c==="id")){const c=o.toLowerCase().replace(/-/g,"_");r.id=`${c}_${Math.random().toString().slice(2,6)}`}return r}return{type:o}}function P(n,e={},o){const t=y[n];if(t){let r=E(t);const c=b[n];return r=c?c({getSchemaByType:P},r,e,o):r,r}return null}function h(n,e){const o=R(e);return Object.keys(o).reduce((t,r)=>(Object.prototype.hasOwnProperty.call(n,r)&&(t[r]&&m.isPlainObject(t[r])&&m.isPlainObject(n[r]||!n[r])?Object.assign(t[r],n[r]||{}):t[r]=n[r]),t),o),o}function B(n,e){return Object.keys(n).filter(t=>n[t]!=null).reduce((t,r)=>{if(e.has(r)){const c=e.get(r);if(typeof c=="string")t[c]=n[r];else{const s=c(r,n[r],n);Object.assign(t,s)}}else t[r]=n[r];return t},{})}function S(n,e,o=new Map){const t=h(n,e);return B(t,o)}function I(n){var o;const e=n.type;if(e){const t=y[e];if(!t)return n;const r=h(n,t),c=((o=n.editor)==null?void 0:o.type)||"";if(c){const s=y[c],u=h(n.editor,s);r.editor=u}return r}return n}function O(n={}){function e(i,l,f,d){if(typeof f=="number")return d[i].length===f;if(typeof f=="object"){const g=Object.keys(f)[0],v=f[g];if(g==="not")return Number(d[i].length)!==Number(v);if(g==="moreThan")return Number(d[i].length)>=Number(v);if(g==="lessThan")return Number(d[i].length)<=Number(v)}return!1}function o(i,l,f,d){return d[i]&&d[i].propertyValue&&String(d[i].propertyValue.value)===String(f)}const t=new Map([["length",e],["getProperty",o]]);Object.keys(n).reduce((i,l)=>(i.set(l,n[l]),i),t);function r(i,l){const f=i;return typeof l=="number"?[{target:f,operator:"length",param:null,value:Number(l)}]:typeof l=="boolean"?[{target:f,operator:"getProperty",param:i,value:!!l}]:typeof l=="object"?Object.keys(l).map(d=>{if(d==="length")return{target:f,operator:"length",param:null,value:l[d]};const g=d,v=l[d];return{target:f,operator:"getProperty",param:g,value:v}}):[]}function c(i){return Object.keys(i).reduce((f,d)=>{const g=r(d,i[d]);return f.push(...g),f},[])}function s(i,l){if(t.has(i.operator)){const f=t.get(i.operator);return f&&f(i.target,i.param,i.value,l)||!1}return!1}function u(i,l){return c(i).reduce((g,v)=>g&&s(v,l),!0)}function p(i,l){const f=Object.keys(i),d=f.includes("allOf"),g=f.includes("anyOf"),v=d||g,T=(v?i[v?d?"allOf":"anyOf":"allOf"]:[i]).map(z=>u(z,l));return d?!T.includes(!1):T.includes(!0)}return{parseValueSchema:p}}const C={},M={};O();function D(n,e,o=new Map,t=(s,u,p,i)=>u,r={},c=s=>s){return y[e.title]=e,b[e.title]=t,C[e.title]=r,M[e.title]=c,(s={})=>{const u=S(s,e,o),p=Object.keys(n).reduce((i,l)=>(i[l]=n[l].default,i),{});return Object.assign(p,u)}}function V(n,e){return{customClass:e.class,customStyle:e.style}}function j(n,e){var t,r;const o=[];return e==null||e.buttons.map(c=>{const s={};Object.keys(c).map(u=>{var p;u==="appearance"?s.class=((p=c[u])==null?void 0:p.class)||"":s[u]=c[u]}),o.push(s)}),(t=e.appearance)!=null&&t.class?{buttons:o,buttonClass:(r=e.appearance)==null?void 0:r.class}:{buttons:o}}function k(){function n(e,o){const{id:t}=e||{},{field:r}=e.binding||{};return{modelValue:o.getValue(t),"onUpdate:modelValue":c=>{o.setValue(t,r,c)}}}return{resolve:n}}function H(){function n(e,o){const{id:t}=e||{},{dataSource:r}=e||{};return r===void 0?{}:{data:o.getValue(t),"onUpdate:data":(...c)=>{}}}return{resolve:n}}function w(){function n(e,o){const{dataSource:t}=e||{};return t===void 0?{}:{}}return{resolve:n}}function A(){function n(e,o){const{path:t}=e.binding||{};return t?{"onUpdate:dataMapping":(...r)=>{}}:{}}return{resolve:n}}function G(){return(n,e,o)=>{const t=e.id,{type:r}=e,c=n.emits;return c?c.filter(s=>s!=="update:modelValue").reduce((s,u)=>{const p=`on${u.charAt(0).toUpperCase()}${u.slice(1)}`;return s[p]=(...i)=>{o.dispatch(t,u,r,i)},s},{}):{}}}function $(){function n(e,o){return e.selectItemById(o)}return{selectItemById:n}}function N(){function n(e,o){return e.selectItemById(o)}return{selectItemById:n}}function q(){function n(e){return e.editor}return{resolve:n}}function F(){function n(e){return Object.prototype.hasOwnProperty.call(e,"visible")?e.visible:null}return{resolve:n}}function L(){function n(e,o){const{name:t}=o;return e[`on${t.charAt(0).toUpperCase()}${t.slice(1)}`]||e[t]}return{resolve:n}}function U(){function n(e,o){var u;const t=(u=e.toolbar)==null?void 0:u.buttons;if(!t||t.length<1)return null;const[r,c]=o.payloads,s=t.find(p=>p.id===c);return s?s.onClick||s.click:null}return{resolve:n}}function _(){function n(e,o){const t=e.contents;if(!t||t.length<1)return null;const r=t.reduce((p,i)=>{const l=i.toolbar&&i.toolbar.buttons||[];return p.push(...l),p},[]);if(!r||r.length<1)return;const[c,s]=o.payloads,u=r.find(p=>p.id===s);return u?u.onClick||u.click:null}return{resolve:n}}a.createCollectionBindingResolver=H,a.createDataGridSelectionItemResolver=$,a.createDataMappingBindingResolver=A,a.createEventHandlerResolver=L,a.createEventsResolver=G,a.createFormBindingResolver=k,a.createFormGroupEditorResolver=q,a.createPageHeaderEventHandlerResolver=U,a.createPropsResolver=D,a.createTabsEventHandlerResolver=_,a.createTreeGridBindingResolver=w,a.createTreeGridSelectionItemResolver=N,a.createVisiblePropResolver=F,a.getSchemaByType=P,a.resolveAppearance=V,a.resolveSchemaToProps=S,a.resolveSchemaWithDefaultValue=I,a.resolveToolbar=j,a.schemaMap=y,a.schemaResolverMap=b,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
|