@farris/ui-vue 1.2.6 → 1.2.7
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 +147 -139
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +11 -28
- package/components/avatar/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +33 -50
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/combo-list/index.esm.js +183 -171
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +236 -235
- package/components/condition/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +1531 -1560
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +1299 -1300
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +235 -252
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/dynamic-form/index.esm.js +127 -143
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +206 -201
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +650 -647
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +1101 -1131
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +335 -332
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +128 -145
- package/components/input-group/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +306 -303
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +2470 -2469
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +1928 -1958
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/order/index.esm.js +802 -788
- package/components/order/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +116 -137
- package/components/page-header/index.umd.cjs +1 -1
- package/components/property-editor/index.esm.js +533 -521
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +178 -177
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +56 -73
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +547 -518
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +260 -281
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +598 -617
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/switch/index.esm.js +137 -154
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +109 -130
- package/components/tabs/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +103 -120
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +172 -189
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +124 -122
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +1600 -1630
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +245 -246
- package/components/tree-view/index.umd.cjs +1 -1
- package/farris.all.esm.js +4123 -4112
- package/farris.all.umd.cjs +8 -8
- package/package.json +1 -1
- 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/lookup/src/property-config/converters/lookup-property.converter.d.ts +0 -4
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -2
- package/types/property-panel/src/composition/entity/base-property.d.ts +0 -16
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +21 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { merge as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
1
|
+
import { defineComponent as H, ref as k, inject as Q, watch as W, createVNode as q } from "vue";
|
|
2
|
+
import { merge as A } from "lodash-es";
|
|
3
|
+
import z from "@farris/ui-vue/components/accordion";
|
|
4
|
+
import J from "@farris/ui-vue/components/avatar";
|
|
5
|
+
import X from "@farris/ui-vue/components/button-edit";
|
|
6
|
+
import Y from "@farris/ui-vue/components/button-group";
|
|
7
|
+
import Z from "@farris/ui-vue/components/calendar";
|
|
8
|
+
import _ from "@farris/ui-vue/components/capsule";
|
|
9
|
+
import w from "@farris/ui-vue/components/checkbox";
|
|
10
10
|
import S from "@farris/ui-vue/components/combo-list";
|
|
11
11
|
import rr from "@farris/ui-vue/components/combo-tree";
|
|
12
12
|
import er from "@farris/ui-vue/components/component";
|
|
@@ -18,8 +18,8 @@ import ir from "@farris/ui-vue/components/dropdown";
|
|
|
18
18
|
import pr from "@farris/ui-vue/components/dynamic-form";
|
|
19
19
|
import ur from "@farris/ui-vue/components/events-editor";
|
|
20
20
|
import cr from "@farris/ui-vue/components/filter-bar";
|
|
21
|
-
import
|
|
22
|
-
import
|
|
21
|
+
import lr from "@farris/ui-vue/components/field-selector";
|
|
22
|
+
import ar from "@farris/ui-vue/components/image-cropper";
|
|
23
23
|
import fr from "@farris/ui-vue/components/input-group";
|
|
24
24
|
import mr from "@farris/ui-vue/components/layout";
|
|
25
25
|
import gr from "@farris/ui-vue/components/list-nav";
|
|
@@ -27,16 +27,16 @@ import dr from "@farris/ui-vue/components/list-view";
|
|
|
27
27
|
import yr from "@farris/ui-vue/components/lookup";
|
|
28
28
|
import Fr from "@farris/ui-vue/components/mapping-editor";
|
|
29
29
|
import br from "@farris/ui-vue/components/nav";
|
|
30
|
-
import
|
|
31
|
-
import
|
|
30
|
+
import vr from "@farris/ui-vue/components/number-range";
|
|
31
|
+
import Er from "@farris/ui-vue/components/number-spinner";
|
|
32
32
|
import Pr from "@farris/ui-vue/components/order";
|
|
33
33
|
import Cr from "@farris/ui-vue/components/page-header";
|
|
34
34
|
import Vr from "@farris/ui-vue/components/page-footer";
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
35
|
+
import Rr from "@farris/ui-vue/components/pagination";
|
|
36
|
+
import Or from "@farris/ui-vue/components/progress";
|
|
37
|
+
import Tr from "@farris/ui-vue/components/query-solution";
|
|
38
|
+
import hr from "@farris/ui-vue/components/radio-group";
|
|
39
|
+
import Ir from "@farris/ui-vue/components/rate";
|
|
40
40
|
import Mr from "@farris/ui-vue/components/response-toolbar";
|
|
41
41
|
import jr from "@farris/ui-vue/components/response-layout";
|
|
42
42
|
import Dr from "@farris/ui-vue/components/response-layout-editor";
|
|
@@ -48,17 +48,18 @@ import kr from "@farris/ui-vue/components/step";
|
|
|
48
48
|
import Ar from "@farris/ui-vue/components/switch";
|
|
49
49
|
import Lr from "@farris/ui-vue/components/tabs";
|
|
50
50
|
import xr from "@farris/ui-vue/components/tags";
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import
|
|
55
|
-
import
|
|
56
|
-
import
|
|
57
|
-
import
|
|
58
|
-
import
|
|
59
|
-
import
|
|
60
|
-
import
|
|
61
|
-
|
|
51
|
+
import Gr from "@farris/ui-vue/components/text";
|
|
52
|
+
import Ur from "@farris/ui-vue/components/time-picker";
|
|
53
|
+
import Hr from "@farris/ui-vue/components/transfer";
|
|
54
|
+
import Qr from "@farris/ui-vue/components/tree-view";
|
|
55
|
+
import Wr from "@farris/ui-vue/components/uploader";
|
|
56
|
+
import qr from "@farris/ui-vue/components/verify-detail";
|
|
57
|
+
import zr from "@farris/ui-vue/components/weather";
|
|
58
|
+
import Jr from "@farris/ui-vue/components/video";
|
|
59
|
+
import Xr from "@farris/ui-vue/components/textarea";
|
|
60
|
+
import Yr from "@farris/ui-vue/components/schema-selector";
|
|
61
|
+
import Zr from "@farris/ui-vue/components/tree-grid";
|
|
62
|
+
const _r = {
|
|
62
63
|
/**
|
|
63
64
|
* schema
|
|
64
65
|
*/
|
|
@@ -68,21 +69,21 @@ const Yr = {
|
|
|
68
69
|
*/
|
|
69
70
|
modelValue: { type: Object, default: null }
|
|
70
71
|
}, r = {}, t = {}, o = {}, e = {};
|
|
71
|
-
let
|
|
72
|
-
function
|
|
73
|
-
|
|
72
|
+
let L = !1;
|
|
73
|
+
function wr() {
|
|
74
|
+
L || (L = !0, J.register(r, t, o, e), z.register(r, t, o, e), X.register(r, t, o, e), Y.register(r, t, o, e), Z.register(r, t, o, e), _.register(r, t, o, e), w.register(r, t, o, e), S.register(r, t, o, e), rr.register(r, t, o, e), er.register(r, t, o, e), or.register(r, t, o, e), tr.register(r, t, o, e), nr.register(r, t, o, e), sr.register(r, t, o, e), ir.register(r, t, o, e), pr.register(r, t, o, e), ur.register(r, t, o, e), cr.register(r, t, o, e), lr.register(r, t, o, e), ar.register(r, t, o, e), fr.register(r, t, o, e), mr.register(r, t, o, e), dr.register(r, t, o, e), gr.register(r, t, o, e), yr.register(r, t, o, e), Fr.register(r, t, o, e), br.register(r, t, o, e), vr.register(r, t, o, e), Er.register(r, t, o, e), Pr.register(r, t, o, e), Cr.register(r, t, o, e), Vr.register(r, t, o, e), Rr.register(r, t, o, e), Or.register(r, t, o, e), Tr.register(r, t, o, e), hr.register(r, t, o, e), Ir.register(r, t, o, e), jr.register(r, t, o, e), Dr.register(r, t, o, e), Mr.register(r, t, o, e), Yr.register(r, t, o), Br.register(r, t, o, e), Kr.register(r, t, o, e), Nr.register(r, t, o, e), $r.register(r, t, o, e), kr.register(r, t, o, e), Ar.register(r, t, o, e), Lr.register(r, t, o, e), xr.register(r, t, o, e), Gr.register(r, t, o, e), Ur.register(r, t, o, e), Hr.register(r, t, o, e), Qr.register(r, t, o, e), qr.register(r, t, o, e), Wr.register(r, t, o, e), zr.register(r, t, o, e), Jr.register(r, t, o, e), Xr.register(r, t, o, e), Zr.register(r, t, o, e));
|
|
74
75
|
}
|
|
75
|
-
function
|
|
76
|
+
function Sr(i = {}) {
|
|
76
77
|
function y(s, c, f, a) {
|
|
77
78
|
if (typeof f == "number")
|
|
78
79
|
return a[s].length === f;
|
|
79
80
|
if (typeof f == "object") {
|
|
80
|
-
const
|
|
81
|
-
if (
|
|
81
|
+
const P = Object.keys(f)[0], V = f[P];
|
|
82
|
+
if (P === "not")
|
|
82
83
|
return Number(a[s].length) !== Number(V);
|
|
83
|
-
if (
|
|
84
|
+
if (P === "moreThan")
|
|
84
85
|
return Number(a[s].length) >= Number(V);
|
|
85
|
-
if (
|
|
86
|
+
if (P === "lessThan")
|
|
86
87
|
return Number(a[s].length) <= Number(V);
|
|
87
88
|
}
|
|
88
89
|
return !1;
|
|
@@ -95,22 +96,22 @@ function _r(i = {}) {
|
|
|
95
96
|
["getProperty", F]
|
|
96
97
|
]);
|
|
97
98
|
Object.keys(i).reduce((s, c) => (s.set(c, i[c]), s), b);
|
|
98
|
-
function
|
|
99
|
+
function v(s, c) {
|
|
99
100
|
const f = s;
|
|
100
101
|
return typeof c == "number" ? [{ target: f, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: f, operator: "getProperty", param: s, value: !!c }] : typeof c == "object" ? Object.keys(c).map((a) => {
|
|
101
102
|
if (a === "length")
|
|
102
103
|
return { target: f, operator: "length", param: null, value: c[a] };
|
|
103
|
-
const
|
|
104
|
-
return { target: f, operator: "getProperty", param:
|
|
104
|
+
const P = a, V = c[a];
|
|
105
|
+
return { target: f, operator: "getProperty", param: P, value: V };
|
|
105
106
|
}) : [];
|
|
106
107
|
}
|
|
107
|
-
function
|
|
108
|
+
function u(s) {
|
|
108
109
|
return Object.keys(s).reduce((f, a) => {
|
|
109
|
-
const
|
|
110
|
-
return f.push(...
|
|
110
|
+
const P = v(a, s[a]);
|
|
111
|
+
return f.push(...P), f;
|
|
111
112
|
}, []);
|
|
112
113
|
}
|
|
113
|
-
function
|
|
114
|
+
function p(s, c) {
|
|
114
115
|
if (b.has(s.operator)) {
|
|
115
116
|
const f = b.get(s.operator);
|
|
116
117
|
return f && f(s.target, s.param, s.value, c) || !1;
|
|
@@ -118,22 +119,22 @@ function _r(i = {}) {
|
|
|
118
119
|
return !1;
|
|
119
120
|
}
|
|
120
121
|
function C(s, c) {
|
|
121
|
-
return
|
|
122
|
+
return u(s).reduce((P, V) => P && p(V, c), !0);
|
|
122
123
|
}
|
|
123
|
-
function
|
|
124
|
-
const f = Object.keys(s), a = f.includes("allOf"),
|
|
125
|
-
return a ? !
|
|
124
|
+
function g(s, c) {
|
|
125
|
+
const f = Object.keys(s), a = f.includes("allOf"), P = f.includes("anyOf"), V = a || P, I = (V ? s[V ? a ? "allOf" : "anyOf" : "allOf"] : [s]).map((K) => C(K, c));
|
|
126
|
+
return a ? !I.includes(!1) : I.includes(!0);
|
|
126
127
|
}
|
|
127
|
-
return { parseValueSchema:
|
|
128
|
+
return { parseValueSchema: g };
|
|
128
129
|
}
|
|
129
|
-
|
|
130
|
-
function
|
|
130
|
+
Sr();
|
|
131
|
+
function re() {
|
|
131
132
|
function i(y, F) {
|
|
132
|
-
const { id: b } = y || {}, { field:
|
|
133
|
+
const { id: b } = y || {}, { field: v } = y.binding || {};
|
|
133
134
|
return {
|
|
134
135
|
modelValue: F.getValue(b),
|
|
135
|
-
"onUpdate:modelValue": (
|
|
136
|
-
F.setValue(b,
|
|
136
|
+
"onUpdate:modelValue": (u) => {
|
|
137
|
+
F.setValue(b, v, u);
|
|
137
138
|
}
|
|
138
139
|
};
|
|
139
140
|
}
|
|
@@ -141,48 +142,48 @@ function Sr() {
|
|
|
141
142
|
resolve: i
|
|
142
143
|
};
|
|
143
144
|
}
|
|
144
|
-
function
|
|
145
|
+
function ee() {
|
|
145
146
|
return (i, y, F) => {
|
|
146
|
-
const b = y.id, { type:
|
|
147
|
-
return
|
|
148
|
-
const
|
|
149
|
-
return
|
|
150
|
-
F.dispatch(b, C,
|
|
151
|
-
},
|
|
147
|
+
const b = y.id, { type: v } = y, u = i.emits;
|
|
148
|
+
return u ? u.filter((p) => p !== "update:modelValue").reduce((p, C) => {
|
|
149
|
+
const g = `on${C.charAt(0).toUpperCase()}${C.slice(1)}`;
|
|
150
|
+
return p[g] = (...s) => {
|
|
151
|
+
F.dispatch(b, C, v, s);
|
|
152
|
+
}, p;
|
|
152
153
|
}, {}) : {};
|
|
153
154
|
};
|
|
154
155
|
}
|
|
155
|
-
function
|
|
156
|
-
function y(F, b,
|
|
157
|
-
i.emit("event", { token: F, eventName: b, type:
|
|
156
|
+
function te(i) {
|
|
157
|
+
function y(F, b, v, u) {
|
|
158
|
+
i.emit("event", { token: F, eventName: b, type: v, payloads: u });
|
|
158
159
|
}
|
|
159
160
|
return {
|
|
160
161
|
dispatch: y
|
|
161
162
|
};
|
|
162
163
|
}
|
|
163
|
-
function
|
|
164
|
+
function oe() {
|
|
164
165
|
const i = /* @__PURE__ */ new Map();
|
|
165
|
-
function y(
|
|
166
|
-
i.set(
|
|
166
|
+
function y(g, s) {
|
|
167
|
+
i.set(g, s);
|
|
167
168
|
}
|
|
168
|
-
function F(
|
|
169
|
-
const s = i.get(
|
|
170
|
-
return s || (console.warn(`Instance with id ${
|
|
169
|
+
function F(g) {
|
|
170
|
+
const s = i.get(g);
|
|
171
|
+
return s || (console.warn(`Instance with id ${g} not found`), null);
|
|
171
172
|
}
|
|
172
|
-
function b(
|
|
173
|
-
i.delete(
|
|
173
|
+
function b(g) {
|
|
174
|
+
i.delete(g);
|
|
174
175
|
}
|
|
175
|
-
function
|
|
176
|
-
if (!i.has(
|
|
177
|
-
console.warn(`Instance with id ${
|
|
176
|
+
function v(g, s) {
|
|
177
|
+
if (!i.has(g)) {
|
|
178
|
+
console.warn(`Instance with id ${g} not found`);
|
|
178
179
|
return;
|
|
179
180
|
}
|
|
180
|
-
i.set(
|
|
181
|
+
i.set(g, s);
|
|
181
182
|
}
|
|
182
|
-
function
|
|
183
|
-
return i.has(
|
|
183
|
+
function u(g) {
|
|
184
|
+
return i.has(g);
|
|
184
185
|
}
|
|
185
|
-
function
|
|
186
|
+
function p() {
|
|
186
187
|
return new Map(i);
|
|
187
188
|
}
|
|
188
189
|
function C() {
|
|
@@ -192,25 +193,25 @@ function te() {
|
|
|
192
193
|
register: y,
|
|
193
194
|
get: F,
|
|
194
195
|
remove: b,
|
|
195
|
-
update:
|
|
196
|
-
has:
|
|
197
|
-
getAll:
|
|
196
|
+
update: v,
|
|
197
|
+
has: u,
|
|
198
|
+
getAll: p,
|
|
198
199
|
clear: C
|
|
199
200
|
};
|
|
200
201
|
}
|
|
201
|
-
function
|
|
202
|
-
function F(
|
|
203
|
-
return i.value && i.value[
|
|
202
|
+
function ne(i, y) {
|
|
203
|
+
function F(v) {
|
|
204
|
+
return i.value && i.value[v];
|
|
204
205
|
}
|
|
205
|
-
function b(
|
|
206
|
-
i.value && (i.value[
|
|
206
|
+
function b(v, u, p) {
|
|
207
|
+
i.value && (i.value[v] = p), y.emit("update:modelValue", { elementId: v, field: u, value: p, modelValue: i.value });
|
|
207
208
|
}
|
|
208
209
|
return {
|
|
209
210
|
getValue: F,
|
|
210
211
|
setValue: b
|
|
211
212
|
};
|
|
212
213
|
}
|
|
213
|
-
function
|
|
214
|
+
function G(i) {
|
|
214
215
|
function y() {
|
|
215
216
|
var F, b;
|
|
216
217
|
return ((b = (F = i == null ? void 0 : i.module) == null ? void 0 : F.entity[0]) == null ? void 0 : b.entities[0]) || {};
|
|
@@ -219,47 +220,47 @@ function x(i) {
|
|
|
219
220
|
getSchemaEntity: y
|
|
220
221
|
};
|
|
221
222
|
}
|
|
222
|
-
function
|
|
223
|
-
const { getSchemaEntity: y } =
|
|
224
|
-
function F(
|
|
225
|
-
const
|
|
226
|
-
return
|
|
223
|
+
function se(i) {
|
|
224
|
+
const { getSchemaEntity: y } = G(i);
|
|
225
|
+
function F(u) {
|
|
226
|
+
const p = y();
|
|
227
|
+
return v(p, u);
|
|
227
228
|
}
|
|
228
|
-
function b(
|
|
229
|
+
function b(u) {
|
|
229
230
|
var c, f;
|
|
230
|
-
const
|
|
231
|
-
function C(a,
|
|
231
|
+
const p = [];
|
|
232
|
+
function C(a, P) {
|
|
232
233
|
var M;
|
|
233
|
-
const V = [...
|
|
234
|
-
(((M =
|
|
234
|
+
const V = [...P, a.label];
|
|
235
|
+
(((M = u == null ? void 0 : u.type) == null ? void 0 : M.primary) || null) && p.push({
|
|
235
236
|
bindingPaths: V,
|
|
236
237
|
primaryKey: a.type.primary,
|
|
237
238
|
label: a.label
|
|
238
|
-
}), a.type.entities.forEach((
|
|
239
|
-
C(
|
|
239
|
+
}), a.type.entities.forEach((I) => {
|
|
240
|
+
C(I, V);
|
|
240
241
|
});
|
|
241
242
|
}
|
|
242
|
-
return (((c =
|
|
243
|
+
return (((c = u == null ? void 0 : u.type) == null ? void 0 : c.primary) || null) && (p.push({
|
|
243
244
|
bindingPaths: [],
|
|
244
|
-
primaryKey:
|
|
245
|
-
label:
|
|
246
|
-
}), (((f =
|
|
245
|
+
primaryKey: u.type.primary,
|
|
246
|
+
label: u.label
|
|
247
|
+
}), (((f = u == null ? void 0 : u.type) == null ? void 0 : f.entities) || []).forEach((a) => {
|
|
247
248
|
C(a, []);
|
|
248
|
-
})),
|
|
249
|
+
})), p;
|
|
249
250
|
}
|
|
250
|
-
function
|
|
251
|
-
const
|
|
252
|
-
if (
|
|
251
|
+
function v(u, p, C = !0) {
|
|
252
|
+
const g = C ? [] : [u.label];
|
|
253
|
+
if (u.label === p)
|
|
253
254
|
return {
|
|
254
|
-
bindingPaths:
|
|
255
|
-
primaryKey:
|
|
256
|
-
label:
|
|
255
|
+
bindingPaths: g,
|
|
256
|
+
primaryKey: u.type.primary,
|
|
257
|
+
label: u.label
|
|
257
258
|
};
|
|
258
|
-
for (const s of
|
|
259
|
-
const c =
|
|
259
|
+
for (const s of u.type.entities) {
|
|
260
|
+
const c = v(s, p, !1);
|
|
260
261
|
if (c)
|
|
261
262
|
return {
|
|
262
|
-
bindingPaths: [...
|
|
263
|
+
bindingPaths: [...g, ...c.bindingPaths],
|
|
263
264
|
primaryKey: c.primaryKey,
|
|
264
265
|
label: c.label
|
|
265
266
|
};
|
|
@@ -268,59 +269,63 @@ function ne(i) {
|
|
|
268
269
|
}
|
|
269
270
|
return {
|
|
270
271
|
resolveEntityByDataSource: F,
|
|
271
|
-
resolveEntity:
|
|
272
|
+
resolveEntity: v,
|
|
272
273
|
resolveEntities: b
|
|
273
274
|
};
|
|
274
275
|
}
|
|
275
|
-
function
|
|
276
|
-
const y = {}, { getSchemaEntity: F } =
|
|
277
|
-
function
|
|
278
|
-
const
|
|
279
|
-
b(
|
|
280
|
-
const s = "/" +
|
|
276
|
+
function ie(i) {
|
|
277
|
+
const y = {}, { getSchemaEntity: F } = G(i), { resolveEntities: b } = se(i);
|
|
278
|
+
function v() {
|
|
279
|
+
const p = F();
|
|
280
|
+
b(p).forEach((g) => {
|
|
281
|
+
const s = "/" + g.bindingPaths.join("/"), { primaryKey: c } = g, f = { primaryKey: c, bindingPath: s, label: g.label, currentId: null };
|
|
281
282
|
y[s] = f;
|
|
282
283
|
});
|
|
283
284
|
}
|
|
284
|
-
function p
|
|
285
|
-
return Array.isArray(
|
|
285
|
+
function u(p) {
|
|
286
|
+
return Array.isArray(p) ? p = "/" + p.join("/") : p = "/" + p.split("/").filter((C) => C).join("/"), y[p];
|
|
286
287
|
}
|
|
287
288
|
return {
|
|
288
|
-
setup:
|
|
289
|
-
get:
|
|
289
|
+
setup: v,
|
|
290
|
+
get: u
|
|
290
291
|
};
|
|
291
292
|
}
|
|
292
|
-
const
|
|
293
|
+
const x = /* @__PURE__ */ H({
|
|
293
294
|
name: "FDynamicView",
|
|
294
|
-
props:
|
|
295
|
+
props: _r,
|
|
295
296
|
emits: ["update:modelValue", "event"],
|
|
296
297
|
setup(i, y) {
|
|
297
|
-
const F =
|
|
298
|
-
|
|
299
|
-
const
|
|
300
|
-
|
|
298
|
+
const F = k(i.schema), b = k(i.modelValue), v = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map();
|
|
299
|
+
Q("useFormSchema"), wr();
|
|
300
|
+
const p = oe(), C = ne(b, y), g = ie(F.value);
|
|
301
|
+
g.setup();
|
|
301
302
|
function s(n) {
|
|
302
303
|
const l = n.type, {
|
|
303
|
-
dataSource:
|
|
304
|
+
dataSource: m,
|
|
304
305
|
binding: d
|
|
305
306
|
} = n;
|
|
306
|
-
if (!
|
|
307
|
+
if (!m && !d)
|
|
307
308
|
return {};
|
|
308
|
-
|
|
309
|
-
const
|
|
310
|
-
return (
|
|
309
|
+
m && u.set(m, n);
|
|
310
|
+
const E = e[l];
|
|
311
|
+
return (E && E.bindingResolver ? E.bindingResolver : re()).resolve(n, C);
|
|
311
312
|
}
|
|
312
313
|
function c(n) {
|
|
313
314
|
const l = {};
|
|
314
|
-
return n && Object.entries(n).forEach(([
|
|
315
|
-
l[
|
|
315
|
+
return n && Object.entries(n).forEach(([m, d]) => {
|
|
316
|
+
l[m] = () => Array.isArray(d) ? d.map((E) => P(E)) : P(d);
|
|
316
317
|
}), l;
|
|
317
318
|
}
|
|
318
319
|
function f(n) {
|
|
319
|
-
const l = n.type,
|
|
320
|
-
|
|
320
|
+
const l = n.type, m = te(y), d = r[l], E = ee(), R = e[l], O = R ? R.editorResolver : null;
|
|
321
|
+
if (O) {
|
|
322
|
+
const B = O.resolve(n).type, h = r[B];
|
|
323
|
+
return E ? E(h, n, m) : {};
|
|
324
|
+
}
|
|
325
|
+
return E ? E(d, n, m) : {};
|
|
321
326
|
}
|
|
322
327
|
function a(n) {
|
|
323
|
-
const l = n.type,
|
|
328
|
+
const l = n.type, m = t[l], d = m ? m(n) : {}, E = {
|
|
324
329
|
...f(n)
|
|
325
330
|
};
|
|
326
331
|
return {
|
|
@@ -330,114 +335,114 @@ const L = /* @__PURE__ */ w({
|
|
|
330
335
|
...s(n)
|
|
331
336
|
},
|
|
332
337
|
key: n.id,
|
|
333
|
-
ref: (
|
|
334
|
-
|
|
338
|
+
ref: (T) => {
|
|
339
|
+
T && n.id && p.register(n.id, T);
|
|
335
340
|
}
|
|
336
341
|
},
|
|
337
|
-
eventProps:
|
|
342
|
+
eventProps: E
|
|
338
343
|
};
|
|
339
344
|
}
|
|
340
|
-
function
|
|
341
|
-
var
|
|
345
|
+
function P(n) {
|
|
346
|
+
var j, B;
|
|
342
347
|
const l = n.type;
|
|
343
348
|
if (l === "component-ref") {
|
|
344
|
-
const
|
|
345
|
-
if (
|
|
346
|
-
return
|
|
349
|
+
const h = (B = (j = F.value) == null ? void 0 : j.module) == null ? void 0 : B.components.find(($) => $.id === n.component);
|
|
350
|
+
if (h)
|
|
351
|
+
return P(h);
|
|
347
352
|
}
|
|
348
|
-
n.id &&
|
|
349
|
-
const
|
|
350
|
-
if (!
|
|
353
|
+
n.id && v.set(n.id, n);
|
|
354
|
+
const m = r[l];
|
|
355
|
+
if (!m)
|
|
351
356
|
return null;
|
|
352
357
|
const {
|
|
353
358
|
props: d,
|
|
354
|
-
eventProps:
|
|
355
|
-
} = a(n),
|
|
356
|
-
if (
|
|
357
|
-
const
|
|
358
|
-
Object.assign(
|
|
359
|
+
eventProps: E
|
|
360
|
+
} = a(n), R = () => n.contents ? typeof n.contents == "string" ? n.contents : n.contents.map((h) => P(h)) : null, O = e[l], T = O ? O.editorResolver : null;
|
|
361
|
+
if (T) {
|
|
362
|
+
const h = T.resolve(n);
|
|
363
|
+
Object.assign(h, E);
|
|
359
364
|
} else
|
|
360
|
-
Object.assign(d,
|
|
361
|
-
return
|
|
365
|
+
Object.assign(d, E);
|
|
366
|
+
return q(m, {
|
|
362
367
|
...d
|
|
363
368
|
}, {
|
|
364
|
-
default:
|
|
369
|
+
default: R,
|
|
365
370
|
...c(n.slots)
|
|
366
371
|
});
|
|
367
372
|
}
|
|
368
373
|
function V(n, l) {
|
|
369
|
-
|
|
374
|
+
A(n.$props, l), n.$forceUpdate && n.$forceUpdate();
|
|
370
375
|
}
|
|
371
|
-
function
|
|
372
|
-
return
|
|
376
|
+
function D(n) {
|
|
377
|
+
return v.get(n);
|
|
373
378
|
}
|
|
374
379
|
function M(n, l) {
|
|
375
|
-
const
|
|
376
|
-
if (!
|
|
380
|
+
const m = v.get(n);
|
|
381
|
+
if (!m)
|
|
377
382
|
return;
|
|
378
|
-
const d =
|
|
383
|
+
const d = p.get(n);
|
|
379
384
|
if (!d)
|
|
380
385
|
return;
|
|
381
|
-
const
|
|
382
|
-
props:
|
|
383
|
-
} = a(
|
|
384
|
-
V(d,
|
|
386
|
+
const E = A(m, l), {
|
|
387
|
+
props: R
|
|
388
|
+
} = a(E);
|
|
389
|
+
V(d, R);
|
|
385
390
|
}
|
|
386
|
-
function
|
|
387
|
-
return
|
|
391
|
+
function I(n) {
|
|
392
|
+
return p.get(n).$props || {};
|
|
388
393
|
}
|
|
389
|
-
function
|
|
390
|
-
const
|
|
391
|
-
|
|
394
|
+
function N(n, l) {
|
|
395
|
+
const m = p.get(n);
|
|
396
|
+
m && V(m, l);
|
|
392
397
|
}
|
|
393
|
-
function
|
|
394
|
-
const d =
|
|
398
|
+
function K(n, l, ...m) {
|
|
399
|
+
const d = p.get(n);
|
|
395
400
|
if (d) {
|
|
396
401
|
if (!d || typeof d[l] != "function")
|
|
397
402
|
throw new Error(`Method ${l} not found on instance ${n}`);
|
|
398
|
-
return d[l](...
|
|
403
|
+
return d[l](...m);
|
|
399
404
|
}
|
|
400
405
|
}
|
|
401
406
|
function U(n, l) {
|
|
402
|
-
const
|
|
403
|
-
if (!
|
|
407
|
+
const m = g.get(n);
|
|
408
|
+
if (!m)
|
|
404
409
|
return;
|
|
405
|
-
const d =
|
|
406
|
-
if (!
|
|
410
|
+
const d = m.label, E = u.get(d);
|
|
411
|
+
if (!E)
|
|
407
412
|
return;
|
|
408
|
-
const
|
|
409
|
-
if (
|
|
410
|
-
const
|
|
411
|
-
|
|
413
|
+
const R = E.type, O = e[R], T = O ? O.selectionItemResolver : null;
|
|
414
|
+
if (T) {
|
|
415
|
+
const j = p.get(E.id);
|
|
416
|
+
T.selectItemById(j, l);
|
|
412
417
|
}
|
|
413
418
|
}
|
|
414
|
-
return
|
|
419
|
+
return W([() => i.modelValue, () => i.schema], ([n, l]) => {
|
|
415
420
|
b.value = n, F.value = l;
|
|
416
421
|
}), y.expose({
|
|
417
|
-
componentManager:
|
|
422
|
+
componentManager: p,
|
|
418
423
|
rerender: V,
|
|
419
|
-
getProps:
|
|
420
|
-
invoke:
|
|
421
|
-
setProps:
|
|
422
|
-
getSchema:
|
|
424
|
+
getProps: I,
|
|
425
|
+
invoke: K,
|
|
426
|
+
setProps: N,
|
|
427
|
+
getSchema: D,
|
|
423
428
|
setSchema: M,
|
|
424
429
|
selectItemById: U
|
|
425
430
|
}), () => {
|
|
426
|
-
var
|
|
427
|
-
const n = (d = (
|
|
431
|
+
var m, d;
|
|
432
|
+
const n = (d = (m = F.value) == null ? void 0 : m.module) == null ? void 0 : d.components;
|
|
428
433
|
if (!n || n.length < 1)
|
|
429
434
|
return null;
|
|
430
|
-
const l = n.find((
|
|
431
|
-
return l ?
|
|
435
|
+
const l = n.find((E) => E.componentType === "Frame");
|
|
436
|
+
return l ? P(l) : null;
|
|
432
437
|
};
|
|
433
438
|
}
|
|
434
|
-
}),
|
|
439
|
+
}), gt = {
|
|
435
440
|
install(i) {
|
|
436
|
-
i.component(
|
|
441
|
+
i.component(x.name, x);
|
|
437
442
|
}
|
|
438
443
|
};
|
|
439
444
|
export {
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
445
|
+
x as FDynamicView,
|
|
446
|
+
gt as default,
|
|
447
|
+
_r as dynamicViewProps
|
|
443
448
|
};
|