@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,10 +1,10 @@
|
|
|
1
1
|
var ie = Object.defineProperty;
|
|
2
|
-
var re = (n,
|
|
3
|
-
var k = (n,
|
|
4
|
-
import { defineComponent as D, inject as I, ref as M, computed as x, watch as A, onMounted as N, createVNode as
|
|
5
|
-
import { isPlainObject as
|
|
2
|
+
var re = (n, e, t) => e in n ? ie(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var k = (n, e, t) => re(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { defineComponent as D, inject as I, ref as M, computed as x, watch as A, onMounted as N, createVNode as S, Fragment as ae, provide as le } from "vue";
|
|
5
|
+
import { isPlainObject as O, cloneDeep as U } from "lodash-es";
|
|
6
6
|
import { CHECKBOX_CONTEXT as X, useCheck as se } from "../common/index.esm.js";
|
|
7
|
-
import { DgControl as
|
|
7
|
+
import { DgControl as z } from "../designer-canvas/index.esm.js";
|
|
8
8
|
const ce = "https://json-schema.org/draft/2020-12/schema", ue = "https://farris-design.gitee.io/check-box.schema.json", de = "check-box", pe = "A Farris Input Component", me = "object", fe = {
|
|
9
9
|
id: {
|
|
10
10
|
description: "The unique identifier for a check box",
|
|
@@ -73,7 +73,6 @@ const ce = "https://json-schema.org/draft/2020-12/schema", ue = "https://farris-
|
|
|
73
73
|
default: !0
|
|
74
74
|
}
|
|
75
75
|
}, ye = [
|
|
76
|
-
"id",
|
|
77
76
|
"type"
|
|
78
77
|
], he = [
|
|
79
78
|
"id",
|
|
@@ -90,96 +89,110 @@ const ce = "https://json-schema.org/draft/2020-12/schema", ue = "https://farris-
|
|
|
90
89
|
required: ye,
|
|
91
90
|
ignore: he
|
|
92
91
|
}, _ = {}, H = {};
|
|
93
|
-
function
|
|
94
|
-
const { properties:
|
|
95
|
-
if (
|
|
96
|
-
const
|
|
97
|
-
a.id = `${
|
|
92
|
+
function q(n) {
|
|
93
|
+
const { properties: e, title: t, ignore: i } = n, r = i && Array.isArray(i), a = Object.keys(e).reduce((l, y) => ((!r || !i.find((h) => h === y)) && (l[y] = e[y].type === "object" && e[y].properties ? q(e[y]) : U(e[y].default)), l), {});
|
|
94
|
+
if (t && (!r || !i.find((l) => l === "id"))) {
|
|
95
|
+
const l = t.toLowerCase().replace(/-/g, "_");
|
|
96
|
+
a.id = `${l}_${Math.random().toString().slice(2, 6)}`;
|
|
98
97
|
}
|
|
99
98
|
return a;
|
|
100
99
|
}
|
|
101
|
-
function
|
|
100
|
+
function be(n) {
|
|
101
|
+
const { properties: e, title: t, required: i } = n;
|
|
102
|
+
if (i && Array.isArray(i)) {
|
|
103
|
+
const r = i.reduce((a, l) => (a[l] = e[l].type === "object" && e[l].properties ? q(e[l]) : U(e[l].default), a), {});
|
|
104
|
+
if (t && i.find((a) => a === "id")) {
|
|
105
|
+
const a = t.toLowerCase().replace(/-/g, "_");
|
|
106
|
+
r.id = `${a}_${Math.random().toString().slice(2, 6)}`;
|
|
107
|
+
}
|
|
108
|
+
return r;
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
type: t
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
function Q(n, e = {}, t) {
|
|
102
115
|
const i = _[n];
|
|
103
116
|
if (i) {
|
|
104
|
-
let r =
|
|
117
|
+
let r = be(i);
|
|
105
118
|
const a = H[n];
|
|
106
|
-
return r = a ? a({ getSchemaByType: Q }, r,
|
|
119
|
+
return r = a ? a({ getSchemaByType: Q }, r, e, t) : r, r;
|
|
107
120
|
}
|
|
108
121
|
return null;
|
|
109
122
|
}
|
|
110
|
-
function
|
|
111
|
-
const
|
|
112
|
-
return Object.keys(
|
|
123
|
+
function ve(n, e) {
|
|
124
|
+
const t = q(e);
|
|
125
|
+
return Object.keys(t).reduce((i, r) => (Object.prototype.hasOwnProperty.call(n, r) && (i[r] && O(i[r]) && O(n[r] || !n[r]) ? Object.assign(i[r], n[r] || {}) : i[r] = n[r]), i), t), t;
|
|
113
126
|
}
|
|
114
|
-
function
|
|
127
|
+
function ke(n, e) {
|
|
115
128
|
return Object.keys(n).filter((i) => n[i] != null).reduce((i, r) => {
|
|
116
|
-
if (
|
|
117
|
-
const a =
|
|
129
|
+
if (e.has(r)) {
|
|
130
|
+
const a = e.get(r);
|
|
118
131
|
if (typeof a == "string")
|
|
119
132
|
i[a] = n[r];
|
|
120
133
|
else {
|
|
121
|
-
const
|
|
122
|
-
Object.assign(i,
|
|
134
|
+
const l = a(r, n[r], n);
|
|
135
|
+
Object.assign(i, l);
|
|
123
136
|
}
|
|
124
137
|
} else
|
|
125
138
|
i[r] = n[r];
|
|
126
139
|
return i;
|
|
127
140
|
}, {});
|
|
128
141
|
}
|
|
129
|
-
function
|
|
130
|
-
const i =
|
|
131
|
-
return
|
|
142
|
+
function Ce(n, e, t = /* @__PURE__ */ new Map()) {
|
|
143
|
+
const i = ve(n, e);
|
|
144
|
+
return ke(i, t);
|
|
132
145
|
}
|
|
133
|
-
function
|
|
134
|
-
function
|
|
146
|
+
function Me(n = {}) {
|
|
147
|
+
function e(s, p, o, d) {
|
|
135
148
|
if (typeof o == "number")
|
|
136
|
-
return d[
|
|
149
|
+
return d[s].length === o;
|
|
137
150
|
if (typeof o == "object") {
|
|
138
|
-
const
|
|
139
|
-
if (
|
|
140
|
-
return Number(d[
|
|
141
|
-
if (
|
|
142
|
-
return Number(d[
|
|
143
|
-
if (
|
|
144
|
-
return Number(d[
|
|
151
|
+
const c = Object.keys(o)[0], u = o[c];
|
|
152
|
+
if (c === "not")
|
|
153
|
+
return Number(d[s].length) !== Number(u);
|
|
154
|
+
if (c === "moreThan")
|
|
155
|
+
return Number(d[s].length) >= Number(u);
|
|
156
|
+
if (c === "lessThan")
|
|
157
|
+
return Number(d[s].length) <= Number(u);
|
|
145
158
|
}
|
|
146
159
|
return !1;
|
|
147
160
|
}
|
|
148
|
-
function
|
|
149
|
-
return d[
|
|
161
|
+
function t(s, p, o, d) {
|
|
162
|
+
return d[s] && d[s].propertyValue && String(d[s].propertyValue.value) === String(o);
|
|
150
163
|
}
|
|
151
164
|
const i = /* @__PURE__ */ new Map([
|
|
152
|
-
["length",
|
|
153
|
-
["getProperty",
|
|
165
|
+
["length", e],
|
|
166
|
+
["getProperty", t]
|
|
154
167
|
]);
|
|
155
|
-
Object.keys(n).reduce((
|
|
156
|
-
function r(
|
|
157
|
-
const o =
|
|
158
|
-
return typeof p == "number" ? [{ target: o, operator: "length", param: null, value: Number(p) }] : typeof p == "boolean" ? [{ target: o, operator: "getProperty", param:
|
|
168
|
+
Object.keys(n).reduce((s, p) => (s.set(p, n[p]), s), i);
|
|
169
|
+
function r(s, p) {
|
|
170
|
+
const o = s;
|
|
171
|
+
return typeof p == "number" ? [{ target: o, operator: "length", param: null, value: Number(p) }] : typeof p == "boolean" ? [{ target: o, operator: "getProperty", param: s, value: !!p }] : typeof p == "object" ? Object.keys(p).map((d) => {
|
|
159
172
|
if (d === "length")
|
|
160
173
|
return { target: o, operator: "length", param: null, value: p[d] };
|
|
161
|
-
const
|
|
162
|
-
return { target: o, operator: "getProperty", param:
|
|
174
|
+
const c = d, u = p[d];
|
|
175
|
+
return { target: o, operator: "getProperty", param: c, value: u };
|
|
163
176
|
}) : [];
|
|
164
177
|
}
|
|
165
|
-
function a(
|
|
166
|
-
return Object.keys(
|
|
167
|
-
const
|
|
168
|
-
return o.push(...
|
|
178
|
+
function a(s) {
|
|
179
|
+
return Object.keys(s).reduce((o, d) => {
|
|
180
|
+
const c = r(d, s[d]);
|
|
181
|
+
return o.push(...c), o;
|
|
169
182
|
}, []);
|
|
170
183
|
}
|
|
171
|
-
function
|
|
172
|
-
if (i.has(
|
|
173
|
-
const o = i.get(
|
|
174
|
-
return o && o(
|
|
184
|
+
function l(s, p) {
|
|
185
|
+
if (i.has(s.operator)) {
|
|
186
|
+
const o = i.get(s.operator);
|
|
187
|
+
return o && o(s.target, s.param, s.value, p) || !1;
|
|
175
188
|
}
|
|
176
189
|
return !1;
|
|
177
190
|
}
|
|
178
|
-
function y(
|
|
179
|
-
return a(
|
|
191
|
+
function y(s, p) {
|
|
192
|
+
return a(s).reduce((c, u) => c && l(u, p), !0);
|
|
180
193
|
}
|
|
181
|
-
function h(
|
|
182
|
-
const o = Object.keys(
|
|
194
|
+
function h(s, p) {
|
|
195
|
+
const o = Object.keys(s), d = o.includes("allOf"), c = o.includes("anyOf"), u = d || c, g = (u ? s[u ? d ? "allOf" : "anyOf" : "allOf"] : [s]).map((T) => y(T, p));
|
|
183
196
|
return d ? !g.includes(!1) : g.includes(!0);
|
|
184
197
|
}
|
|
185
198
|
return { parseValueSchema: h };
|
|
@@ -224,24 +237,24 @@ const m = {
|
|
|
224
237
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
225
238
|
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
|
|
226
239
|
"query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
|
|
227
|
-
},
|
|
228
|
-
|
|
229
|
-
function J(n,
|
|
230
|
-
return _[
|
|
231
|
-
const y =
|
|
240
|
+
}, Se = {}, Fe = {};
|
|
241
|
+
Me();
|
|
242
|
+
function J(n, e, t = /* @__PURE__ */ new Map(), i = (l, y, h, s) => y, r = {}, a = (l) => l) {
|
|
243
|
+
return _[e.title] = e, H[e.title] = i, Se[e.title] = r, Fe[e.title] = a, (l = {}) => {
|
|
244
|
+
const y = Ce(l, e, t), h = Object.keys(n).reduce((s, p) => (s[p] = n[p].default, s), {});
|
|
232
245
|
return Object.assign(h, y);
|
|
233
246
|
};
|
|
234
247
|
}
|
|
235
|
-
function
|
|
236
|
-
return { customClass:
|
|
248
|
+
function we(n, e) {
|
|
249
|
+
return { customClass: e.class, customStyle: e.style };
|
|
237
250
|
}
|
|
238
251
|
const Y = /* @__PURE__ */ new Map([
|
|
239
|
-
["appearance",
|
|
252
|
+
["appearance", we]
|
|
240
253
|
]);
|
|
241
|
-
function Z(n,
|
|
242
|
-
return
|
|
254
|
+
function Z(n, e, t) {
|
|
255
|
+
return e;
|
|
243
256
|
}
|
|
244
|
-
const
|
|
257
|
+
const j = {
|
|
245
258
|
/** 组件唯一标识 */
|
|
246
259
|
id: { Type: String, default: "" },
|
|
247
260
|
/** 自定义样式 */
|
|
@@ -268,54 +281,54 @@ const q = {
|
|
|
268
281
|
label: { type: String, default: "" },
|
|
269
282
|
/** 标识是否被选中 */
|
|
270
283
|
checked: { type: Boolean, default: !1 }
|
|
271
|
-
}, R = J(
|
|
284
|
+
}, R = J(j, ge, Y, Z), G = /* @__PURE__ */ D({
|
|
272
285
|
name: "FCheckBox",
|
|
273
|
-
props:
|
|
286
|
+
props: j,
|
|
274
287
|
emits: ["change", "changeValue", "update:modelValue", "update:checked"],
|
|
275
|
-
setup(n,
|
|
276
|
-
const
|
|
288
|
+
setup(n, e) {
|
|
289
|
+
const t = I(X, null), {
|
|
277
290
|
buttonClass: i,
|
|
278
291
|
disabled: r,
|
|
279
292
|
name: a,
|
|
280
|
-
shouldRenderButton:
|
|
293
|
+
shouldRenderButton: l,
|
|
281
294
|
shouldRenderNative: y,
|
|
282
295
|
shouldRenderTag: h,
|
|
283
|
-
tagClass:
|
|
296
|
+
tagClass: s,
|
|
284
297
|
checked: p,
|
|
285
298
|
onClickCheckBox: o
|
|
286
|
-
} = se(n,
|
|
299
|
+
} = se(n, e, t == null ? void 0 : t.parentProps, t == null ? void 0 : t.parentContext);
|
|
287
300
|
M();
|
|
288
|
-
const d = M(n.id),
|
|
301
|
+
const d = M(n.id), c = M(n.customClass), u = M(n.modelValue), f = M(n.indeterminate);
|
|
289
302
|
return x(() => {
|
|
290
303
|
const v = {
|
|
291
304
|
"custom-control": !0,
|
|
292
305
|
"custom-checkbox": !0
|
|
293
306
|
};
|
|
294
|
-
return
|
|
307
|
+
return c.value && c.value.split(" ").reduce((g, C) => (g[C] = !0, g), v), v;
|
|
295
308
|
}), A(() => n.modelValue, (v) => {
|
|
296
|
-
|
|
309
|
+
u.value = v;
|
|
297
310
|
}), A(() => n.indeterminate, (v) => {
|
|
298
311
|
f.value = v;
|
|
299
312
|
}), N(() => {
|
|
300
313
|
}), () => {
|
|
301
|
-
var v, g, C,
|
|
302
|
-
return
|
|
314
|
+
var v, g, C, T, P, b;
|
|
315
|
+
return S(ae, null, [l.value && S("div", {
|
|
303
316
|
class: i.value,
|
|
304
317
|
style: "border-radius:0;border: 1px solid #E8EBF2;",
|
|
305
318
|
onClick: o
|
|
306
|
-
}, [(g = (v =
|
|
307
|
-
class:
|
|
319
|
+
}, [(g = (v = e.slots).default) == null ? void 0 : g.call(v)]), h.value && S("div", {
|
|
320
|
+
class: s.value,
|
|
308
321
|
onClick: o
|
|
309
|
-
}, [
|
|
322
|
+
}, [S("div", {
|
|
310
323
|
class: "title"
|
|
311
|
-
}, [(
|
|
324
|
+
}, [(T = (C = e.slots).default) == null ? void 0 : T.call(C)]), S("div", {
|
|
312
325
|
class: "tip"
|
|
313
|
-
}, null),
|
|
326
|
+
}, null), S("span", {
|
|
314
327
|
class: "f-icon f-icon-check f-radio-icon"
|
|
315
|
-
}, null)]), y.value &&
|
|
328
|
+
}, null)]), y.value && S("div", {
|
|
316
329
|
class: "custom-control custom-checkbox",
|
|
317
330
|
onClick: o
|
|
318
|
-
}, [
|
|
331
|
+
}, [S("input", {
|
|
319
332
|
type: "checkbox",
|
|
320
333
|
class: "custom-control-input",
|
|
321
334
|
name: a.value,
|
|
@@ -324,12 +337,12 @@ const q = {
|
|
|
324
337
|
checked: p.value,
|
|
325
338
|
indeterminate: f.value,
|
|
326
339
|
disabled: r.value
|
|
327
|
-
}, null),
|
|
340
|
+
}, null), S("div", {
|
|
328
341
|
class: "custom-control-label"
|
|
329
|
-
}, [(b = (
|
|
342
|
+
}, [(b = (P = e.slots).default) == null ? void 0 : b.call(P)])])]);
|
|
330
343
|
};
|
|
331
344
|
}
|
|
332
|
-
}), Te = "https://json-schema.org/draft/2020-12/schema",
|
|
345
|
+
}), Te = "https://json-schema.org/draft/2020-12/schema", Pe = "https://farris-design.gitee.io/check-box.schema.json", Ve = "check-group", Ee = "A Farris Input Component", Be = "object", Ie = {
|
|
333
346
|
id: {
|
|
334
347
|
description: "The unique identifier for a check box",
|
|
335
348
|
type: "string"
|
|
@@ -401,24 +414,23 @@ const q = {
|
|
|
401
414
|
type: "boolean",
|
|
402
415
|
default: !1
|
|
403
416
|
}
|
|
404
|
-
},
|
|
405
|
-
"id",
|
|
417
|
+
}, Ae = [
|
|
406
418
|
"type"
|
|
407
|
-
],
|
|
419
|
+
], Le = [
|
|
408
420
|
"id",
|
|
409
421
|
"appearance",
|
|
410
422
|
"binding",
|
|
411
423
|
"visible"
|
|
412
|
-
],
|
|
424
|
+
], De = {
|
|
413
425
|
$schema: Te,
|
|
414
|
-
$id:
|
|
426
|
+
$id: Pe,
|
|
415
427
|
title: Ve,
|
|
416
|
-
description:
|
|
417
|
-
type:
|
|
418
|
-
properties:
|
|
419
|
-
required:
|
|
420
|
-
ignore:
|
|
421
|
-
},
|
|
428
|
+
description: Ee,
|
|
429
|
+
type: Be,
|
|
430
|
+
properties: Ie,
|
|
431
|
+
required: Ae,
|
|
432
|
+
ignore: Le
|
|
433
|
+
}, xe = {
|
|
422
434
|
/**
|
|
423
435
|
* 是否被选中
|
|
424
436
|
*/
|
|
@@ -436,7 +448,7 @@ const q = {
|
|
|
436
448
|
*/
|
|
437
449
|
size: { type: String, default: "middle" }
|
|
438
450
|
}, W = {
|
|
439
|
-
...
|
|
451
|
+
...xe,
|
|
440
452
|
/**
|
|
441
453
|
* 组件标识
|
|
442
454
|
*/
|
|
@@ -506,39 +518,39 @@ const q = {
|
|
|
506
518
|
* 枚举数组中枚举值的key值。
|
|
507
519
|
*/
|
|
508
520
|
valueField: { type: String, default: "value" }
|
|
509
|
-
}, K = J(W,
|
|
510
|
-
function ee(n,
|
|
521
|
+
}, K = J(W, De, Y, Z);
|
|
522
|
+
function ee(n, e, t) {
|
|
511
523
|
const i = x(() => !(n.readonly && n.disabled)), r = M(n.data || n.enumData);
|
|
512
524
|
function a(o) {
|
|
513
525
|
return o[n.valueField];
|
|
514
526
|
}
|
|
515
|
-
function
|
|
527
|
+
function l(o) {
|
|
516
528
|
return o[n.textField];
|
|
517
529
|
}
|
|
518
530
|
function y(o) {
|
|
519
531
|
return o ? n.isStringValue ? o.split(n.separator) : o : [];
|
|
520
532
|
}
|
|
521
533
|
function h(o) {
|
|
522
|
-
const
|
|
523
|
-
return n.isStringValue ?
|
|
534
|
+
const c = r.value.map((u) => a(u)).filter((u) => o.some((f) => f === String(u)));
|
|
535
|
+
return n.isStringValue ? c.join(n.separator) : c;
|
|
524
536
|
}
|
|
525
|
-
function
|
|
537
|
+
function s(o) {
|
|
526
538
|
const d = String(a(o));
|
|
527
|
-
return y(
|
|
539
|
+
return y(t.value).some((u) => u === d);
|
|
528
540
|
}
|
|
529
541
|
function p(o, d) {
|
|
530
542
|
if (i.value) {
|
|
531
|
-
let
|
|
532
|
-
const
|
|
533
|
-
!
|
|
543
|
+
let c = y(t.value) || [];
|
|
544
|
+
const u = String(a(o));
|
|
545
|
+
!c || !c.length ? c.push(u) : c.some((f) => f === u) ? c = c.filter((f) => f !== u) : c.push(u), t.value = h(c), e.emit("changeValue", t.value), e.emit("update:modelValue", t.value);
|
|
534
546
|
}
|
|
535
547
|
d.stopPropagation();
|
|
536
548
|
}
|
|
537
549
|
return {
|
|
538
550
|
enumData: r,
|
|
539
551
|
getValue: a,
|
|
540
|
-
getText:
|
|
541
|
-
checked:
|
|
552
|
+
getText: l,
|
|
553
|
+
checked: s,
|
|
542
554
|
onClickCheckbox: p
|
|
543
555
|
};
|
|
544
556
|
}
|
|
@@ -546,135 +558,135 @@ const B = /* @__PURE__ */ D({
|
|
|
546
558
|
name: "FCheckGroup",
|
|
547
559
|
props: W,
|
|
548
560
|
emits: ["changeValue", "update:modelValue"],
|
|
549
|
-
setup(n,
|
|
550
|
-
const
|
|
551
|
-
enumData:
|
|
561
|
+
setup(n, e) {
|
|
562
|
+
const t = M(n.modelValue), i = M(n.horizontal), r = M(n.tabIndex), a = M(n.name), {
|
|
563
|
+
enumData: l,
|
|
552
564
|
onClickCheckbox: y,
|
|
553
565
|
getValue: h,
|
|
554
|
-
getText:
|
|
566
|
+
getText: s,
|
|
555
567
|
checked: p
|
|
556
|
-
} = ee(n,
|
|
568
|
+
} = ee(n, e, t), o = x(() => ({
|
|
557
569
|
"farris-checkradio-hor": i.value
|
|
558
570
|
}));
|
|
559
|
-
A(() => n.modelValue, (
|
|
560
|
-
|
|
571
|
+
A(() => n.modelValue, (c) => {
|
|
572
|
+
t.value = c;
|
|
561
573
|
});
|
|
562
574
|
const d = M([]);
|
|
563
575
|
return le(X, {
|
|
564
576
|
values: d,
|
|
565
577
|
parentProps: n,
|
|
566
|
-
parentContext:
|
|
567
|
-
}), () =>
|
|
578
|
+
parentContext: e
|
|
579
|
+
}), () => S("div", {
|
|
568
580
|
class: ["farris-input-wrap", o.value]
|
|
569
|
-
}, [
|
|
570
|
-
const f = "checkbox_" + a.value +
|
|
571
|
-
return
|
|
581
|
+
}, [e.slots.default ? e.slots.default() : l.value.map((c, u) => {
|
|
582
|
+
const f = "checkbox_" + a.value + u;
|
|
583
|
+
return S("div", {
|
|
572
584
|
class: "custom-control custom-checkbox"
|
|
573
|
-
}, [
|
|
585
|
+
}, [S("input", {
|
|
574
586
|
type: "checkbox",
|
|
575
587
|
class: "custom-control-input",
|
|
576
588
|
name: a.value,
|
|
577
589
|
id: f,
|
|
578
|
-
value: h(
|
|
579
|
-
checked: p(
|
|
590
|
+
value: h(c),
|
|
591
|
+
checked: p(c),
|
|
580
592
|
disabled: n.readonly || n.disabled,
|
|
581
593
|
tabindex: r.value,
|
|
582
|
-
onClick: (v) => y(
|
|
583
|
-
}, null),
|
|
594
|
+
onClick: (v) => y(c, v)
|
|
595
|
+
}, null), S("label", {
|
|
584
596
|
class: "custom-control-label",
|
|
585
597
|
for: f,
|
|
586
|
-
title:
|
|
587
|
-
}, [
|
|
598
|
+
title: s(c)
|
|
599
|
+
}, [s(c)])]);
|
|
588
600
|
})]);
|
|
589
601
|
}
|
|
590
602
|
});
|
|
591
|
-
function te(n,
|
|
592
|
-
var
|
|
593
|
-
const i =
|
|
594
|
-
function
|
|
595
|
-
return (
|
|
603
|
+
function te(n, e, t) {
|
|
604
|
+
var P;
|
|
605
|
+
const i = t && t.getStyles && t.getStyles() || "", r = t && t.getDesignerClass && t.getDesignerClass() || "", a = M();
|
|
606
|
+
function l() {
|
|
607
|
+
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
596
608
|
}
|
|
597
609
|
function y() {
|
|
598
610
|
return !1;
|
|
599
611
|
}
|
|
600
612
|
function h() {
|
|
601
|
-
return (
|
|
613
|
+
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
602
614
|
}
|
|
603
|
-
function
|
|
604
|
-
return (
|
|
615
|
+
function s() {
|
|
616
|
+
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
605
617
|
}
|
|
606
618
|
function p(b) {
|
|
607
619
|
if (!b || !b.value)
|
|
608
620
|
return null;
|
|
609
621
|
if (b.value.schema && b.value.schema.type === "component")
|
|
610
622
|
return b.value;
|
|
611
|
-
const
|
|
612
|
-
return
|
|
623
|
+
const F = M(b == null ? void 0 : b.value.parent), w = p(F);
|
|
624
|
+
return w || null;
|
|
613
625
|
}
|
|
614
|
-
function o(b =
|
|
615
|
-
const { componentInstance:
|
|
616
|
-
return !
|
|
626
|
+
function o(b = e) {
|
|
627
|
+
const { componentInstance: F, designerItemElementRef: w } = b;
|
|
628
|
+
return !F || !F.value ? null : F.value.canMove ? w : o(b.parent);
|
|
617
629
|
}
|
|
618
630
|
function d(b) {
|
|
619
|
-
return !!
|
|
620
|
-
}
|
|
621
|
-
function s() {
|
|
622
|
-
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
631
|
+
return !!t && t.canAccepts(b);
|
|
623
632
|
}
|
|
624
633
|
function c() {
|
|
634
|
+
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
635
|
+
}
|
|
636
|
+
function u() {
|
|
625
637
|
}
|
|
626
|
-
function f(b,
|
|
627
|
-
|
|
638
|
+
function f(b, F) {
|
|
639
|
+
F && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(F);
|
|
628
640
|
}
|
|
629
|
-
function v(b,
|
|
630
|
-
const { componentType:
|
|
631
|
-
let
|
|
632
|
-
|
|
633
|
-
const $ =
|
|
634
|
-
return
|
|
641
|
+
function v(b, F) {
|
|
642
|
+
const { componentType: w } = b;
|
|
643
|
+
let V = Q(w, b, F);
|
|
644
|
+
t && t.onResolveNewComponentSchema && (V = t.onResolveNewComponentSchema(b, V));
|
|
645
|
+
const $ = w.toLowerCase().replace(/-/g, "_");
|
|
646
|
+
return V && !V.id && V.type === w && (V.id = `${$}_${Math.random().toString().slice(2, 6)}`), V;
|
|
635
647
|
}
|
|
636
648
|
function g(b) {
|
|
637
649
|
}
|
|
638
650
|
function C(...b) {
|
|
639
|
-
if (
|
|
640
|
-
return
|
|
641
|
-
}
|
|
642
|
-
function
|
|
643
|
-
|
|
644
|
-
var
|
|
645
|
-
let
|
|
646
|
-
b.type === "component-ref" && (
|
|
647
|
-
const
|
|
648
|
-
(
|
|
651
|
+
if (t && t.getPropsConfig)
|
|
652
|
+
return t.getPropsConfig(...b);
|
|
653
|
+
}
|
|
654
|
+
function T() {
|
|
655
|
+
t && t.onRemoveComponent && t.onRemoveComponent(), e != null && e.schema.contents && e.schema.contents.map((b) => {
|
|
656
|
+
var V;
|
|
657
|
+
let F = b.id;
|
|
658
|
+
b.type === "component-ref" && (F = b.component);
|
|
659
|
+
const w = n.value.querySelector(`#${F}-design-item`);
|
|
660
|
+
(V = w == null ? void 0 : w.componentInstance) != null && V.value.onRemoveComponent && w.componentInstance.value.onRemoveComponent();
|
|
649
661
|
});
|
|
650
662
|
}
|
|
651
663
|
return a.value = {
|
|
652
|
-
canMove:
|
|
664
|
+
canMove: l(),
|
|
653
665
|
canSelectParent: y(),
|
|
654
666
|
canDelete: h(),
|
|
655
|
-
canNested: !
|
|
656
|
-
contents:
|
|
667
|
+
canNested: !s(),
|
|
668
|
+
contents: e == null ? void 0 : e.schema.contents,
|
|
657
669
|
elementRef: n,
|
|
658
|
-
parent: (
|
|
659
|
-
schema:
|
|
670
|
+
parent: (P = e == null ? void 0 : e.parent) == null ? void 0 : P.componentInstance,
|
|
671
|
+
schema: e == null ? void 0 : e.schema,
|
|
660
672
|
styles: i,
|
|
661
673
|
designerClass: r,
|
|
662
674
|
canAccepts: d,
|
|
663
675
|
getBelongedComponentInstance: p,
|
|
664
676
|
getDraggableDesignItemElement: o,
|
|
665
|
-
getDraggingDisplayText:
|
|
677
|
+
getDraggingDisplayText: c,
|
|
666
678
|
getPropConfig: C,
|
|
667
|
-
getDragScopeElement:
|
|
679
|
+
getDragScopeElement: u,
|
|
668
680
|
onAcceptMovedChildElement: f,
|
|
669
681
|
onChildElementMovedOut: g,
|
|
670
682
|
addNewChildComponentSchema: v,
|
|
671
|
-
triggerBelongedComponentToMoveWhenMoved: !!
|
|
672
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!
|
|
673
|
-
onRemoveComponent:
|
|
683
|
+
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || M(!1),
|
|
684
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || M(!1),
|
|
685
|
+
onRemoveComponent: T
|
|
674
686
|
}, a;
|
|
675
687
|
}
|
|
676
|
-
class
|
|
677
|
-
constructor(
|
|
688
|
+
class $e {
|
|
689
|
+
constructor(e, t) {
|
|
678
690
|
k(this, "componentId");
|
|
679
691
|
k(this, "viewModelId");
|
|
680
692
|
k(this, "eventsEditorUtils");
|
|
@@ -691,26 +703,26 @@ class xe {
|
|
|
691
703
|
categories: {}
|
|
692
704
|
});
|
|
693
705
|
var i;
|
|
694
|
-
this.componentId =
|
|
706
|
+
this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((i = this.formSchemaUtils) == null ? void 0 : i.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
|
|
695
707
|
}
|
|
696
708
|
getTableInfo() {
|
|
697
|
-
var
|
|
698
|
-
return (
|
|
709
|
+
var e;
|
|
710
|
+
return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
|
|
699
711
|
}
|
|
700
|
-
setDesignViewModelField(
|
|
712
|
+
setDesignViewModelField(e) {
|
|
701
713
|
var i;
|
|
702
|
-
const
|
|
703
|
-
if (
|
|
714
|
+
const t = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
715
|
+
if (t) {
|
|
704
716
|
if (!this.designViewModelField) {
|
|
705
717
|
const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
706
|
-
this.designViewModelField = r.fields.find((a) => a.id ===
|
|
718
|
+
this.designViewModelField = r.fields.find((a) => a.id === t);
|
|
707
719
|
}
|
|
708
|
-
|
|
720
|
+
e.updateOn = (i = this.designViewModelField) == null ? void 0 : i.updateOn;
|
|
709
721
|
}
|
|
710
722
|
}
|
|
711
|
-
changeFieldEditorType(
|
|
723
|
+
changeFieldEditorType(e, t) {
|
|
712
724
|
}
|
|
713
|
-
getBasicPropConfig(
|
|
725
|
+
getBasicPropConfig(e) {
|
|
714
726
|
return {
|
|
715
727
|
description: "Basic Information",
|
|
716
728
|
title: "基本信息",
|
|
@@ -729,13 +741,13 @@ class xe {
|
|
|
729
741
|
type: "combo-list",
|
|
730
742
|
textField: "name",
|
|
731
743
|
valueField: "value",
|
|
732
|
-
data: [{ value:
|
|
744
|
+
data: [{ value: e.type, name: m[e.type].name }]
|
|
733
745
|
}
|
|
734
746
|
}
|
|
735
747
|
}
|
|
736
748
|
};
|
|
737
749
|
}
|
|
738
|
-
getAppearanceConfig(
|
|
750
|
+
getAppearanceConfig(e = null) {
|
|
739
751
|
return {
|
|
740
752
|
title: "样式",
|
|
741
753
|
description: "Appearance",
|
|
@@ -761,11 +773,11 @@ class xe {
|
|
|
761
773
|
* @param componentInstance
|
|
762
774
|
* @returns
|
|
763
775
|
*/
|
|
764
|
-
updateElementByParentContainer(
|
|
765
|
-
const i =
|
|
776
|
+
updateElementByParentContainer(e, t) {
|
|
777
|
+
const i = t && t.parent && t.parent.schema;
|
|
766
778
|
if (!i)
|
|
767
779
|
return;
|
|
768
|
-
const r = i.contents.findIndex((
|
|
780
|
+
const r = i.contents.findIndex((l) => l.id === e), a = U(i.contents[r]);
|
|
769
781
|
i.contents.splice(r, 1), i.contents.splice(r, 0, a);
|
|
770
782
|
}
|
|
771
783
|
}
|
|
@@ -773,20 +785,20 @@ const E = class E {
|
|
|
773
785
|
/**
|
|
774
786
|
* 根据绑定字段类型获取可用的输入类控件
|
|
775
787
|
*/
|
|
776
|
-
static getEditorTypesByMDataType(
|
|
777
|
-
const
|
|
778
|
-
return
|
|
788
|
+
static getEditorTypesByMDataType(e) {
|
|
789
|
+
const t = E.fieldControlTypeMapping[e];
|
|
790
|
+
return t || [{ key: "", value: "" }];
|
|
779
791
|
}
|
|
780
792
|
/**
|
|
781
793
|
* 获取所有输入类控件
|
|
782
794
|
*/
|
|
783
795
|
static getAllInputTypes() {
|
|
784
|
-
const
|
|
785
|
-
for (const
|
|
786
|
-
E.fieldControlTypeMapping[
|
|
787
|
-
|
|
796
|
+
const e = [];
|
|
797
|
+
for (const t in E.fieldControlTypeMapping)
|
|
798
|
+
E.fieldControlTypeMapping[t].forEach((i) => {
|
|
799
|
+
e.find((r) => r.key === i.key && r.value === i.value) || e.push({ key: i.key, value: i.value });
|
|
788
800
|
});
|
|
789
|
-
return
|
|
801
|
+
return e;
|
|
790
802
|
}
|
|
791
803
|
};
|
|
792
804
|
/**
|
|
@@ -840,8 +852,8 @@ k(E, "fieldControlTypeMapping", {
|
|
|
840
852
|
]
|
|
841
853
|
});
|
|
842
854
|
let L = E;
|
|
843
|
-
const
|
|
844
|
-
class
|
|
855
|
+
const Ge = M(0);
|
|
856
|
+
class Ne {
|
|
845
857
|
constructor() {
|
|
846
858
|
/** 控件标题 */
|
|
847
859
|
k(this, "label", "");
|
|
@@ -871,95 +883,95 @@ class Ge {
|
|
|
871
883
|
k(this, "fieldSetId", "");
|
|
872
884
|
}
|
|
873
885
|
}
|
|
874
|
-
function
|
|
875
|
-
let
|
|
886
|
+
function Ue(n) {
|
|
887
|
+
let e, t;
|
|
876
888
|
const i = /* @__PURE__ */ new Map();
|
|
877
889
|
let r = [];
|
|
878
890
|
function a(p, o) {
|
|
879
|
-
const
|
|
880
|
-
if (
|
|
891
|
+
const c = p.split(" ").filter((C) => C.startsWith("col-"));
|
|
892
|
+
if (c.length === 0) {
|
|
881
893
|
o.isSupportedClass = !1;
|
|
882
894
|
return;
|
|
883
895
|
}
|
|
884
|
-
let
|
|
885
|
-
|
|
896
|
+
let u = c.find((C) => /^col-([1-9]|10|11|12)$/.test(C)), f = c.find((C) => /^col-md-([1-9]|10|11|12)$/.test(C)), v = c.find((C) => /^col-xl-([1-9]|10|11|12)$/.test(C)), g = c.find((C) => /^col-el-([1-9]|10|11|12)$/.test(C));
|
|
897
|
+
u = u || "col-12", o.columnInSM = parseInt(u.replace("col-", ""), 10), o.displayWidthInSM = o.columnInSM / 12, o.displayWidthInSM !== 1 && (o.isSupportedClass = !1), f = f || "col-md-" + o.columnInSM, o.columnInMD = parseInt(f.replace("col-md-", ""), 10), o.displayWidthInMD = o.columnInMD / 6, [1, 2].includes(o.displayWidthInMD) || (o.isSupportedClass = !1), v = v || "col-xl-" + o.columnInMD, o.columnInLG = parseInt(v.replace("col-xl-", ""), 10), o.displayWidthInLG = o.columnInLG / 3, [1, 2, 3, 4].includes(o.displayWidthInLG) || (o.isSupportedClass = !1), g = g || "col-el-" + o.columnInLG, o.columnInEL = parseInt(g.replace("col-el-", ""), 10), o.displayWidthInEL = o.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(o.displayWidthInEL) || (o.isSupportedClass = !1);
|
|
886
898
|
}
|
|
887
|
-
function
|
|
888
|
-
let
|
|
899
|
+
function l(p, o, d, c = !1) {
|
|
900
|
+
let u = !1;
|
|
889
901
|
p.contents.forEach((f) => {
|
|
890
902
|
if (f.type === "fieldset") {
|
|
891
|
-
d += 1,
|
|
903
|
+
d += 1, l(f, o, d, !0), u = !0;
|
|
892
904
|
return;
|
|
893
905
|
}
|
|
894
|
-
|
|
895
|
-
const v = f.appearance && f.appearance.class, g = new
|
|
896
|
-
v ? a(v, g) : g.isSupportedClass = !1, g.label = f.label || f.id, g.id = f.id, g.group = d,
|
|
906
|
+
u && (d += 1, u = !1);
|
|
907
|
+
const v = f.appearance && f.appearance.class, g = new Ne();
|
|
908
|
+
v ? a(v, g) : g.isSupportedClass = !1, g.label = f.label || f.id, g.id = f.id, g.group = d, c && (g.fieldSetId = p.id), t === f.id && (e = d), i.set(f.id, f), o.push(g);
|
|
897
909
|
});
|
|
898
910
|
}
|
|
899
911
|
function y(p) {
|
|
900
912
|
const o = n.getComponentById(p);
|
|
901
913
|
if (!o || !o.componentType || !o.componentType.startsWith("form"))
|
|
902
914
|
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
903
|
-
const d = n.selectNode(o, (
|
|
915
|
+
const d = n.selectNode(o, (c) => c.type === z["response-form"].type);
|
|
904
916
|
return !d || !d.contents || d.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: d };
|
|
905
917
|
}
|
|
906
918
|
function h(p, o) {
|
|
907
919
|
o = o || p.id;
|
|
908
|
-
const { result: d, message:
|
|
920
|
+
const { result: d, message: c, formNode: u } = y(o);
|
|
909
921
|
if (!d)
|
|
910
|
-
return { result: d, message:
|
|
911
|
-
|
|
912
|
-
const f =
|
|
913
|
-
u
|
|
922
|
+
return { result: d, message: c };
|
|
923
|
+
t = p.id, r = [], i.clear();
|
|
924
|
+
const f = u.contents[0].type === z.fieldset.type ? 0 : 1;
|
|
925
|
+
l(u, r, f);
|
|
914
926
|
const v = r.find((C) => !C.isSupportedClass);
|
|
915
927
|
return {
|
|
916
928
|
defaultState: {
|
|
917
|
-
defaultGroupNumber:
|
|
929
|
+
defaultGroupNumber: e || 1,
|
|
918
930
|
model: v ? "customize" : "standard"
|
|
919
931
|
},
|
|
920
932
|
importData: r
|
|
921
933
|
};
|
|
922
934
|
}
|
|
923
|
-
function
|
|
935
|
+
function s(p, o) {
|
|
924
936
|
o = o;
|
|
925
|
-
const { result: d, formNode:
|
|
937
|
+
const { result: d, formNode: c } = y(o);
|
|
926
938
|
if (!d)
|
|
927
939
|
return "";
|
|
928
|
-
const
|
|
940
|
+
const u = [];
|
|
929
941
|
return p.forEach((f) => {
|
|
930
942
|
var C;
|
|
931
943
|
const v = i.get(f.id), g = v.appearance && v.appearance.class;
|
|
932
944
|
if (g) {
|
|
933
|
-
const
|
|
945
|
+
const P = g.split(" ").filter((oe) => !oe.startsWith("col-")), b = "col-" + f.columnInSM, F = "col-md-" + f.columnInMD, w = "col-xl-" + f.columnInLG, V = "col-el-" + f.columnInEL, $ = [b, F, w, V].concat(P);
|
|
934
946
|
v.appearance.class = $.join(" ");
|
|
935
947
|
}
|
|
936
948
|
if (f.fieldSetId) {
|
|
937
|
-
const
|
|
938
|
-
|
|
949
|
+
const T = c.contents.find((b) => b.id === f.fieldSetId), P = u.find((b) => b.id === f.fieldSetId);
|
|
950
|
+
P ? (C = P.contents) == null || C.push(v) : (u.push(T), T.contents = [v]);
|
|
939
951
|
} else
|
|
940
|
-
|
|
941
|
-
}),
|
|
952
|
+
u.push(v);
|
|
953
|
+
}), c.contents = u, c.id;
|
|
942
954
|
}
|
|
943
955
|
return {
|
|
944
956
|
checkCanFindFormNode: y,
|
|
945
957
|
checkCanOpenLayoutEditor: h,
|
|
946
|
-
changeFormControlsByResponseLayoutConfig:
|
|
947
|
-
getResonseFormLayoutConfig:
|
|
958
|
+
changeFormControlsByResponseLayoutConfig: s,
|
|
959
|
+
getResonseFormLayoutConfig: l
|
|
948
960
|
};
|
|
949
961
|
}
|
|
950
|
-
class ne extends
|
|
951
|
-
constructor(
|
|
952
|
-
super(
|
|
962
|
+
class ne extends $e {
|
|
963
|
+
constructor(t, i) {
|
|
964
|
+
super(t, i);
|
|
953
965
|
k(this, "responseLayoutEditorFunction");
|
|
954
|
-
this.responseLayoutEditorFunction =
|
|
966
|
+
this.responseLayoutEditorFunction = Ue(this.formSchemaUtils);
|
|
955
967
|
}
|
|
956
|
-
getPropertyConfig(
|
|
957
|
-
return this.propertyConfig.categories.basic = this.getBasicProperties(
|
|
968
|
+
getPropertyConfig(t, i) {
|
|
969
|
+
return this.propertyConfig.categories.basic = this.getBasicProperties(t, i), this.propertyConfig.categories.appearance = this.getAppearanceProperties(t, i), this.propertyConfig.categories.editor = this.getEditorProperties(t), this.propertyConfig;
|
|
958
970
|
}
|
|
959
|
-
getBasicProperties(
|
|
971
|
+
getBasicProperties(t, i) {
|
|
960
972
|
var a;
|
|
961
973
|
const r = this;
|
|
962
|
-
return this.setDesignViewModelField(
|
|
974
|
+
return this.setDesignViewModelField(t), {
|
|
963
975
|
description: "Basic Information",
|
|
964
976
|
title: "基本信息",
|
|
965
977
|
properties: {
|
|
@@ -995,7 +1007,7 @@ class ne extends xe {
|
|
|
995
1007
|
type: "binding-selector",
|
|
996
1008
|
bindingType: { enable: !1 },
|
|
997
1009
|
editorParams: {
|
|
998
|
-
componentSchema:
|
|
1010
|
+
componentSchema: t,
|
|
999
1011
|
needSyncToViewModel: !0,
|
|
1000
1012
|
viewModelId: this.viewModelId,
|
|
1001
1013
|
designerHostService: this.designerHostService,
|
|
@@ -1005,22 +1017,22 @@ class ne extends xe {
|
|
|
1005
1017
|
}
|
|
1006
1018
|
}
|
|
1007
1019
|
},
|
|
1008
|
-
setPropertyRelates(
|
|
1009
|
-
if (
|
|
1010
|
-
switch (
|
|
1020
|
+
setPropertyRelates(l, y) {
|
|
1021
|
+
if (l)
|
|
1022
|
+
switch (l && l.propertyID) {
|
|
1011
1023
|
case "type": {
|
|
1012
|
-
r.changeControlType(
|
|
1024
|
+
r.changeControlType(t, l, i);
|
|
1013
1025
|
break;
|
|
1014
1026
|
}
|
|
1015
1027
|
case "label": {
|
|
1016
|
-
|
|
1028
|
+
l.needRefreshControlTree = !0;
|
|
1017
1029
|
break;
|
|
1018
1030
|
}
|
|
1019
1031
|
}
|
|
1020
1032
|
}
|
|
1021
1033
|
};
|
|
1022
1034
|
}
|
|
1023
|
-
getAppearanceProperties(
|
|
1035
|
+
getAppearanceProperties(t, i) {
|
|
1024
1036
|
const r = this;
|
|
1025
1037
|
return {
|
|
1026
1038
|
title: "样式",
|
|
@@ -1047,38 +1059,38 @@ class ne extends xe {
|
|
|
1047
1059
|
refreshPanelAfterChanged: !0,
|
|
1048
1060
|
editor: {
|
|
1049
1061
|
type: "response-layout-editor-setting",
|
|
1050
|
-
initialState: r.responseLayoutEditorFunction.checkCanOpenLayoutEditor(
|
|
1062
|
+
initialState: r.responseLayoutEditorFunction.checkCanOpenLayoutEditor(t, r.componentId)
|
|
1051
1063
|
}
|
|
1052
1064
|
}
|
|
1053
1065
|
},
|
|
1054
|
-
setPropertyRelates(a,
|
|
1066
|
+
setPropertyRelates(a, l) {
|
|
1055
1067
|
if (a)
|
|
1056
1068
|
switch (a && a.propertyID) {
|
|
1057
1069
|
case "responseLayout":
|
|
1058
|
-
r.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(a.propertyValue, r.componentId ||
|
|
1070
|
+
r.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(a.propertyValue, r.componentId || t.id), r.updateUnifiedLayoutAfterResponseLayoutChanged(r.componentId), r.updateElementByParentContainer(t.id, i), delete t.responseLayout;
|
|
1059
1071
|
break;
|
|
1060
1072
|
case "class":
|
|
1061
|
-
r.updateUnifiedLayoutAfterControlChanged(a.propertyValue,
|
|
1073
|
+
r.updateUnifiedLayoutAfterControlChanged(a.propertyValue, t.id, this.componentId), r.updateElementByParentContainer(t.id, i);
|
|
1062
1074
|
break;
|
|
1063
1075
|
}
|
|
1064
1076
|
}
|
|
1065
1077
|
};
|
|
1066
1078
|
}
|
|
1067
|
-
getEditorProperties(
|
|
1068
|
-
return this.getComponentConfig(
|
|
1079
|
+
getEditorProperties(t) {
|
|
1080
|
+
return this.getComponentConfig(t);
|
|
1069
1081
|
}
|
|
1070
1082
|
/**
|
|
1071
1083
|
* 卡片控件:切换控件类型后事件
|
|
1072
1084
|
* @param propertyData 控件DOM属性
|
|
1073
1085
|
* @param newControlType 新控件类型
|
|
1074
1086
|
*/
|
|
1075
|
-
changeControlType(
|
|
1076
|
-
var p, o, d,
|
|
1077
|
-
const a = i.propertyValue,
|
|
1078
|
-
if (!
|
|
1087
|
+
changeControlType(t, i, r) {
|
|
1088
|
+
var p, o, d, c;
|
|
1089
|
+
const a = i.propertyValue, l = r && r.parent && r.parent.schema;
|
|
1090
|
+
if (!l)
|
|
1079
1091
|
return;
|
|
1080
|
-
const y =
|
|
1081
|
-
let
|
|
1092
|
+
const y = l.contents.findIndex((u) => u.id === t.id), h = l.contents[y];
|
|
1093
|
+
let s;
|
|
1082
1094
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
1083
1095
|
editor: {
|
|
1084
1096
|
$type: a
|
|
@@ -1086,30 +1098,30 @@ class ne extends xe {
|
|
|
1086
1098
|
name: this.designViewModelField.name,
|
|
1087
1099
|
require: this.designViewModelField.require,
|
|
1088
1100
|
readonly: this.designViewModelField.readonly
|
|
1089
|
-
}, !1),
|
|
1101
|
+
}, !1), s = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, a)), s || (s = this.controlCreatorUtils.createFormGroupWithoutField(a)), Object.assign(s, {
|
|
1090
1102
|
id: h.id,
|
|
1091
1103
|
appearance: h.appearance,
|
|
1092
1104
|
size: h.size,
|
|
1093
1105
|
label: h.label,
|
|
1094
1106
|
binding: h.binding,
|
|
1095
1107
|
visible: h.visible
|
|
1096
|
-
}), Object.assign(
|
|
1097
|
-
isTextArea:
|
|
1108
|
+
}), Object.assign(s.editor, {
|
|
1109
|
+
isTextArea: s.isTextArea && h.isTextArea,
|
|
1098
1110
|
placeholder: (p = h.editor) == null ? void 0 : p.placeholder,
|
|
1099
1111
|
holdPlace: (o = h.editor) == null ? void 0 : o.holdPlace,
|
|
1100
1112
|
readonly: (d = h.editor) == null ? void 0 : d.readonly,
|
|
1101
|
-
require: (
|
|
1102
|
-
}),
|
|
1103
|
-
(
|
|
1104
|
-
),
|
|
1113
|
+
require: (c = h.editor) == null ? void 0 : c.require
|
|
1114
|
+
}), l.contents.splice(y, 1), l.contents.splice(y, 0, s), r.schema = Object.assign(h, s), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
1115
|
+
(u) => u.classList.remove("dgComponentSelected")
|
|
1116
|
+
), Ge.value++;
|
|
1105
1117
|
}
|
|
1106
|
-
getComponentConfig(
|
|
1118
|
+
getComponentConfig(t, i = {}, r = {}) {
|
|
1107
1119
|
const a = Object.assign({
|
|
1108
1120
|
description: "编辑器",
|
|
1109
1121
|
title: "编辑器",
|
|
1110
1122
|
type: "input-group",
|
|
1111
1123
|
$converter: "/converter/property-editor.converter"
|
|
1112
|
-
}, i),
|
|
1124
|
+
}, i), l = Object.assign({
|
|
1113
1125
|
readonly: {
|
|
1114
1126
|
description: "",
|
|
1115
1127
|
title: "只读",
|
|
@@ -1131,7 +1143,7 @@ class ne extends xe {
|
|
|
1131
1143
|
type: "string"
|
|
1132
1144
|
}
|
|
1133
1145
|
}, r);
|
|
1134
|
-
return { ...a, properties: { ...
|
|
1146
|
+
return { ...a, properties: { ...l } };
|
|
1135
1147
|
}
|
|
1136
1148
|
/**
|
|
1137
1149
|
* 修改某一输入控件的样式后更新Form的统一布局配置
|
|
@@ -1139,16 +1151,16 @@ class ne extends xe {
|
|
|
1139
1151
|
* @param controlId 控件Id
|
|
1140
1152
|
* @param componentId 控件所在组件id
|
|
1141
1153
|
*/
|
|
1142
|
-
updateUnifiedLayoutAfterControlChanged(
|
|
1143
|
-
const a =
|
|
1144
|
-
let
|
|
1145
|
-
|
|
1154
|
+
updateUnifiedLayoutAfterControlChanged(t, i, r) {
|
|
1155
|
+
const a = t.split(" ");
|
|
1156
|
+
let l = a.find((o) => /^col-([1-9]|10|11|12)$/.test(o)), y = a.find((o) => /^col-md-([1-9]|10|11|12)$/.test(o)), h = a.find((o) => /^col-xl-([1-9]|10|11|12)$/.test(o)), s = a.find((o) => /^col-el-([1-9]|10|11|12)$/.test(o));
|
|
1157
|
+
l = l || "col-12", y = y || "col-md-" + l.replace("col-", ""), h = h || "col-xl-" + y.replace("col-md-", ""), s = s || "col-el-" + h.replace("col-xl-", "");
|
|
1146
1158
|
const p = {
|
|
1147
1159
|
id: i,
|
|
1148
|
-
columnInSM: parseInt(
|
|
1160
|
+
columnInSM: parseInt(l.replace("col-", ""), 10),
|
|
1149
1161
|
columnInMD: parseInt(y.replace("col-md-", ""), 10),
|
|
1150
1162
|
columnInLG: parseInt(h.replace("col-xl-", ""), 10),
|
|
1151
|
-
columnInEL: parseInt(
|
|
1163
|
+
columnInEL: parseInt(s.replace("col-el-", ""), 10)
|
|
1152
1164
|
};
|
|
1153
1165
|
this.updateUnifiedLayoutAfterResponseLayoutChanged(r, p);
|
|
1154
1166
|
}
|
|
@@ -1157,37 +1169,37 @@ class ne extends xe {
|
|
|
1157
1169
|
* @param componentId 组件Id
|
|
1158
1170
|
* @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
|
|
1159
1171
|
*/
|
|
1160
|
-
updateUnifiedLayoutAfterResponseLayoutChanged(
|
|
1161
|
-
const { formNode: r } = this.responseLayoutEditorFunction.checkCanFindFormNode(
|
|
1172
|
+
updateUnifiedLayoutAfterResponseLayoutChanged(t, i) {
|
|
1173
|
+
const { formNode: r } = this.responseLayoutEditorFunction.checkCanFindFormNode(t);
|
|
1162
1174
|
if (!r || !r.unifiedLayout)
|
|
1163
1175
|
return;
|
|
1164
1176
|
const a = [];
|
|
1165
1177
|
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(r, a, 1), i) {
|
|
1166
|
-
const
|
|
1167
|
-
Object.assign(
|
|
1178
|
+
const u = a.find((f) => f.id === i.id);
|
|
1179
|
+
Object.assign(u || {}, i);
|
|
1168
1180
|
}
|
|
1169
|
-
const
|
|
1181
|
+
const l = a.map((u) => u.columnInSM), y = a.map((u) => u.columnInMD), h = a.map((u) => u.columnInLG), s = a.map((u) => u.columnInEL), p = this.checkIsUniqueColumn(l) ? l[0] : null, o = this.checkIsUniqueColumn(y) ? y[0] : null, d = this.checkIsUniqueColumn(h) ? h[0] : null, c = this.checkIsUniqueColumn(s) ? s[0] : null;
|
|
1170
1182
|
Object.assign(r.unifiedLayout, {
|
|
1171
1183
|
uniqueColClassInSM: p,
|
|
1172
1184
|
uniqueColClassInMD: o,
|
|
1173
1185
|
uniqueColClassInLG: d,
|
|
1174
|
-
uniqueColClassInEL:
|
|
1186
|
+
uniqueColClassInEL: c
|
|
1175
1187
|
});
|
|
1176
1188
|
}
|
|
1177
1189
|
/**
|
|
1178
1190
|
* 校验宽度样式值是否一致
|
|
1179
1191
|
*/
|
|
1180
|
-
checkIsUniqueColumn(
|
|
1181
|
-
const i = new Set(
|
|
1192
|
+
checkIsUniqueColumn(t) {
|
|
1193
|
+
const i = new Set(t);
|
|
1182
1194
|
return Array.from(i).length === 1;
|
|
1183
1195
|
}
|
|
1184
1196
|
}
|
|
1185
|
-
class
|
|
1186
|
-
constructor(
|
|
1187
|
-
super(
|
|
1197
|
+
class qe extends ne {
|
|
1198
|
+
constructor(e, t) {
|
|
1199
|
+
super(e, t);
|
|
1188
1200
|
}
|
|
1189
|
-
getEditorProperties(
|
|
1190
|
-
const
|
|
1201
|
+
getEditorProperties(e) {
|
|
1202
|
+
const t = this.getComponentConfig(e, { type: "check-group" }, {
|
|
1191
1203
|
placeholder: {
|
|
1192
1204
|
visible: !1
|
|
1193
1205
|
},
|
|
@@ -1210,37 +1222,37 @@ class Ue extends ne {
|
|
|
1210
1222
|
type: "array",
|
|
1211
1223
|
editor: {
|
|
1212
1224
|
columns: [
|
|
1213
|
-
{ field:
|
|
1214
|
-
{ field:
|
|
1225
|
+
{ field: e.editor.valueField, title: "值", dataType: "string" },
|
|
1226
|
+
{ field: e.editor.textField, title: "名称", dataType: "string" },
|
|
1215
1227
|
{ field: "disabled", title: "禁用", visible: !1, dataType: "boolean", editor: { type: "switch" } }
|
|
1216
1228
|
],
|
|
1217
1229
|
type: "item-collection-editor",
|
|
1218
|
-
valueField:
|
|
1219
|
-
nameField:
|
|
1220
|
-
requiredFields: [
|
|
1221
|
-
uniqueFields: [
|
|
1230
|
+
valueField: e.editor.valueField,
|
|
1231
|
+
nameField: e.editor.textField,
|
|
1232
|
+
requiredFields: [e.editor.valueField, e.editor.textField],
|
|
1233
|
+
uniqueFields: [e.editor.valueField, e.editor.textField]
|
|
1222
1234
|
},
|
|
1223
1235
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
1224
1236
|
refreshPanelAfterChanged: !0
|
|
1225
1237
|
}
|
|
1226
1238
|
});
|
|
1227
|
-
return
|
|
1239
|
+
return t.setPropertyRelates = function(i) {
|
|
1228
1240
|
if (i)
|
|
1229
1241
|
switch (i.propertyID) {
|
|
1230
1242
|
case "data": {
|
|
1231
|
-
i.propertyValue.parameters && (
|
|
1243
|
+
i.propertyValue.parameters && (e.editor.valueField = i.propertyValue.parameters.valueField, e.editor.textField = i.propertyValue.parameters.nameField), e.editor.data = i.propertyValue.value;
|
|
1232
1244
|
break;
|
|
1233
1245
|
}
|
|
1234
1246
|
}
|
|
1235
|
-
},
|
|
1247
|
+
}, t;
|
|
1236
1248
|
}
|
|
1237
1249
|
}
|
|
1238
|
-
class
|
|
1239
|
-
constructor(
|
|
1240
|
-
super(
|
|
1250
|
+
class je extends ne {
|
|
1251
|
+
constructor(e, t) {
|
|
1252
|
+
super(e, t);
|
|
1241
1253
|
}
|
|
1242
|
-
getEditorProperties(
|
|
1243
|
-
return this.getComponentConfig(
|
|
1254
|
+
getEditorProperties(e) {
|
|
1255
|
+
return this.getComponentConfig(e, { type: "check-group" }, {
|
|
1244
1256
|
placeholder: {
|
|
1245
1257
|
visible: !1
|
|
1246
1258
|
},
|
|
@@ -1260,84 +1272,84 @@ class qe extends ne {
|
|
|
1260
1272
|
});
|
|
1261
1273
|
}
|
|
1262
1274
|
}
|
|
1263
|
-
function We(n,
|
|
1264
|
-
const
|
|
1275
|
+
function We(n, e) {
|
|
1276
|
+
const t = n.schema;
|
|
1265
1277
|
function i(r, a) {
|
|
1266
|
-
return new
|
|
1278
|
+
return new qe(r, e).getPropertyConfig(t, a);
|
|
1267
1279
|
}
|
|
1268
1280
|
return { getPropsConfig: i };
|
|
1269
1281
|
}
|
|
1270
|
-
function
|
|
1271
|
-
const
|
|
1282
|
+
function Oe(n, e) {
|
|
1283
|
+
const t = n.schema;
|
|
1272
1284
|
function i(r, a) {
|
|
1273
|
-
return new
|
|
1285
|
+
return new je(r, e).getPropertyConfig(t, a);
|
|
1274
1286
|
}
|
|
1275
1287
|
return { getPropsConfig: i };
|
|
1276
1288
|
}
|
|
1277
|
-
const
|
|
1289
|
+
const ze = /* @__PURE__ */ D({
|
|
1278
1290
|
name: "FCheckboxGroupDesign",
|
|
1279
1291
|
props: W,
|
|
1280
1292
|
emits: ["changeValue", "update:modelValue"],
|
|
1281
|
-
setup(n,
|
|
1282
|
-
const
|
|
1293
|
+
setup(n, e) {
|
|
1294
|
+
const t = M(n.modelValue), i = M(n.horizontal), r = M(n.tabIndex), a = M(n.name), l = x(() => ({
|
|
1283
1295
|
"farris-checkradio-hor": i.value
|
|
1284
1296
|
})), {
|
|
1285
1297
|
enumData: y,
|
|
1286
1298
|
onClickCheckbox: h,
|
|
1287
|
-
getValue:
|
|
1299
|
+
getValue: s,
|
|
1288
1300
|
getText: p,
|
|
1289
1301
|
checked: o
|
|
1290
|
-
} = ee(n,
|
|
1302
|
+
} = ee(n, e, t), d = M(), c = I("designer-host-service"), u = I("design-item-context"), f = We(u, c), v = te(d, u, f);
|
|
1291
1303
|
return N(() => {
|
|
1292
1304
|
d.value.componentInstance = v;
|
|
1293
|
-
}),
|
|
1294
|
-
|
|
1295
|
-
}), () =>
|
|
1305
|
+
}), e.expose(v.value), A(() => n.modelValue, (g) => {
|
|
1306
|
+
t.value = g, e.emit("changeValue", t.value);
|
|
1307
|
+
}), () => S("div", {
|
|
1296
1308
|
ref: d,
|
|
1297
|
-
class: ["farris-input-wrap",
|
|
1309
|
+
class: ["farris-input-wrap", l.value]
|
|
1298
1310
|
}, [y.value.map((g, C) => {
|
|
1299
|
-
const
|
|
1300
|
-
return
|
|
1311
|
+
const T = "checkbox_" + a.value + C;
|
|
1312
|
+
return S("div", {
|
|
1301
1313
|
class: "custom-control custom-checkbox"
|
|
1302
|
-
}, [
|
|
1314
|
+
}, [S("input", {
|
|
1303
1315
|
type: "checkbox",
|
|
1304
1316
|
class: "custom-control-input",
|
|
1305
1317
|
name: a.value,
|
|
1306
|
-
id:
|
|
1307
|
-
value:
|
|
1318
|
+
id: T,
|
|
1319
|
+
value: s(g),
|
|
1308
1320
|
checked: o(g),
|
|
1309
1321
|
disabled: n.readonly || n.disabled,
|
|
1310
1322
|
tabindex: r.value,
|
|
1311
|
-
onClick: (
|
|
1312
|
-
}, null),
|
|
1323
|
+
onClick: (P) => h(g, P)
|
|
1324
|
+
}, null), S("label", {
|
|
1313
1325
|
class: "custom-control-label",
|
|
1314
|
-
for:
|
|
1326
|
+
for: T,
|
|
1315
1327
|
title: p(g)
|
|
1316
1328
|
}, [p(g)])]);
|
|
1317
1329
|
})]);
|
|
1318
1330
|
}
|
|
1319
|
-
}),
|
|
1331
|
+
}), Xe = /* @__PURE__ */ D({
|
|
1320
1332
|
name: "FCheckBoxDesign",
|
|
1321
|
-
props:
|
|
1333
|
+
props: j,
|
|
1322
1334
|
emits: [],
|
|
1323
|
-
setup(n,
|
|
1324
|
-
const
|
|
1335
|
+
setup(n, e) {
|
|
1336
|
+
const t = M(), i = M(n.id), r = M(n.indeterminate), a = I("designer-host-service"), l = I("design-item-context"), y = Oe(l, a), h = te(t, l, y);
|
|
1325
1337
|
return N(() => {
|
|
1326
|
-
|
|
1327
|
-
}), A(() => n.indeterminate, (
|
|
1328
|
-
r.value =
|
|
1329
|
-
}),
|
|
1330
|
-
ref:
|
|
1331
|
-
dragref: `${
|
|
1338
|
+
t.value.componentInstance = h;
|
|
1339
|
+
}), A(() => n.indeterminate, (s) => {
|
|
1340
|
+
r.value = s;
|
|
1341
|
+
}), e.expose(h.value), () => S("div", {
|
|
1342
|
+
ref: t,
|
|
1343
|
+
dragref: `${l.schema.id}-container`,
|
|
1332
1344
|
class: "drag-container custom-control custom-checkbox"
|
|
1333
|
-
}, [
|
|
1345
|
+
}, [S("input", {
|
|
1334
1346
|
type: "checkbox",
|
|
1335
1347
|
class: "custom-control-input",
|
|
1336
1348
|
id: i,
|
|
1337
1349
|
value: n.value,
|
|
1338
1350
|
checked: n.modelValue,
|
|
1339
1351
|
disabled: n.readonly || n.disabled
|
|
1340
|
-
}, null),
|
|
1352
|
+
}, null), S("div", {
|
|
1341
1353
|
class: "custom-control-label"
|
|
1342
1354
|
}, null)]);
|
|
1343
1355
|
}
|
|
@@ -1345,17 +1357,17 @@ const Oe = /* @__PURE__ */ D({
|
|
|
1345
1357
|
B.install = (n) => {
|
|
1346
1358
|
n.component(B.name, B), n.component(G.name, G);
|
|
1347
1359
|
};
|
|
1348
|
-
B.register = (n,
|
|
1349
|
-
n["check-box"] = G,
|
|
1360
|
+
B.register = (n, e, t, i) => {
|
|
1361
|
+
n["check-box"] = G, e["check-box"] = R, n["check-group"] = B, e["check-group"] = K;
|
|
1350
1362
|
};
|
|
1351
|
-
B.registerDesigner = (n,
|
|
1352
|
-
n["check-box"] =
|
|
1363
|
+
B.registerDesigner = (n, e, t) => {
|
|
1364
|
+
n["check-box"] = Xe, e["check-box"] = R, n["check-group"] = ze, e["check-group"] = K;
|
|
1353
1365
|
};
|
|
1354
1366
|
export {
|
|
1355
1367
|
G as FCheckBox,
|
|
1356
1368
|
B as FCheckBoxGroup,
|
|
1357
1369
|
K as checkBoxGroupPropsResolver,
|
|
1358
|
-
|
|
1370
|
+
j as checkBoxProps,
|
|
1359
1371
|
R as checkBoxPropsResolver,
|
|
1360
1372
|
W as checkboxGroupProps,
|
|
1361
1373
|
B as default
|