@farris/ui-vue 1.2.8 → 1.2.9
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 +129 -129
- package/components/accordion/index.umd.cjs +1 -0
- package/components/avatar/index.esm.js +166 -157
- package/components/avatar/index.umd.cjs +1 -0
- package/components/border-editor/index.umd.cjs +1 -0
- package/components/button/index.umd.cjs +1 -0
- package/components/button-edit/index.esm.js +343 -325
- package/components/button-edit/index.umd.cjs +1 -0
- package/components/button-group/index.umd.cjs +1 -0
- package/components/calculator/index.umd.cjs +1 -0
- package/components/calendar/index.esm.js +338 -338
- package/components/calendar/index.umd.cjs +1 -0
- package/components/capsule/index.esm.js +182 -182
- package/components/capsule/index.umd.cjs +1 -0
- package/components/checkbox/index.esm.js +326 -317
- package/components/checkbox/index.umd.cjs +1 -0
- package/components/color-picker/index.esm.js +118 -118
- package/components/color-picker/index.umd.cjs +3 -0
- package/components/combo-list/index.esm.js +338 -325
- package/components/combo-list/index.umd.cjs +1 -0
- package/components/combo-tree/index.esm.js +62 -62
- package/components/combo-tree/index.umd.cjs +1 -0
- package/components/common/index.umd.cjs +1 -0
- package/components/component/index.esm.js +382 -270
- package/components/component/index.umd.cjs +1 -0
- package/components/condition/index.esm.js +1018 -895
- package/components/condition/index.umd.cjs +1 -0
- package/components/content-container/index.esm.js +285 -212
- package/components/content-container/index.umd.cjs +1 -0
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +4761 -4319
- package/components/data-grid/index.umd.cjs +1 -0
- package/components/data-view/index.esm.js +2901 -2664
- package/components/data-view/index.umd.cjs +1 -0
- package/components/date-picker/index.esm.js +1502 -1488
- package/components/date-picker/index.umd.cjs +1 -0
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +938 -928
- package/components/designer-canvas/index.umd.cjs +1 -0
- package/components/designer-outline/index.css +1 -1
- package/components/designer-outline/index.esm.js +27 -27
- package/components/designer-outline/index.umd.cjs +1 -0
- package/components/designer-toolbox/index.esm.js +36 -12
- package/components/designer-toolbox/index.umd.cjs +1 -0
- package/components/discussion-editor/index.umd.cjs +3 -0
- package/components/discussion-list/index.umd.cjs +1 -0
- package/components/drawer/index.umd.cjs +1 -0
- package/components/dropdown/index.esm.js +241 -241
- package/components/dropdown/index.umd.cjs +2 -0
- package/components/dynamic-form/index.esm.js +1074 -885
- package/components/dynamic-form/index.umd.cjs +1 -0
- package/components/dynamic-resolver/index.esm.js +99 -94
- package/components/dynamic-resolver/index.umd.cjs +1 -0
- package/components/dynamic-view/index.umd.cjs +1 -0
- package/components/enum-editor/index.umd.cjs +1 -0
- package/components/events-editor/index.esm.js +577 -522
- package/components/events-editor/index.umd.cjs +1 -0
- package/components/expression-editor/index.esm.js +70 -70
- package/components/expression-editor/index.umd.cjs +1 -0
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +2938 -2619
- package/components/external-container/index.umd.cjs +1 -0
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +4766 -4325
- package/components/field-selector/index.umd.cjs +1 -0
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1231 -1215
- package/components/filter-bar/index.umd.cjs +1 -0
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +1062 -1052
- package/components/flow-canvas/index.umd.cjs +1 -0
- package/components/image-cropper/index.esm.js +373 -373
- package/components/image-cropper/index.umd.cjs +1 -0
- package/components/input-group/index.esm.js +398 -394
- package/components/input-group/index.umd.cjs +1 -0
- package/components/layout/index.esm.js +268 -268
- package/components/layout/index.umd.cjs +1 -0
- package/components/list-nav/index.esm.js +234 -161
- package/components/list-nav/index.umd.cjs +1 -0
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +2288 -2048
- package/components/list-view/index.umd.cjs +1 -0
- package/components/loading/index.umd.cjs +8 -0
- package/components/locale/index.umd.cjs +1 -0
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +5776 -5305
- package/components/lookup/index.umd.cjs +1 -0
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +5496 -5036
- package/components/mapping-editor/index.umd.cjs +1 -0
- package/components/message-box/index.umd.cjs +1 -0
- package/components/modal/index.umd.cjs +1 -0
- package/components/nav/index.esm.js +383 -322
- package/components/nav/index.umd.cjs +3 -0
- package/components/notify/index.umd.cjs +1 -0
- package/components/number-range/index.esm.js +273 -269
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-spinner/index.esm.js +292 -283
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1008 -925
- package/components/order/index.umd.cjs +1 -0
- package/components/page-footer/index.esm.js +98 -98
- package/components/page-footer/index.umd.cjs +1 -0
- package/components/page-header/index.esm.js +949 -847
- package/components/page-header/index.umd.cjs +1 -0
- package/components/pagination/index.esm.js +464 -403
- package/components/pagination/index.umd.cjs +1 -0
- package/components/popover/index.umd.cjs +1 -0
- package/components/progress/index.esm.js +226 -226
- package/components/progress/index.umd.cjs +3 -0
- package/components/property-editor/index.esm.js +1110 -1092
- package/components/property-editor/index.umd.cjs +3 -0
- package/components/property-panel/index.esm.js +520 -513
- package/components/property-panel/index.umd.cjs +1 -0
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +1714 -1575
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/radio-button/index.esm.js +67 -67
- package/components/radio-button/index.umd.cjs +1 -0
- package/components/radio-group/index.esm.js +298 -289
- package/components/radio-group/index.umd.cjs +1 -0
- package/components/rate/index.esm.js +195 -190
- package/components/rate/index.umd.cjs +1 -0
- package/components/response-layout/index.esm.js +112 -112
- package/components/response-layout/index.umd.cjs +1 -0
- package/components/response-layout-editor/index.esm.js +902 -877
- package/components/response-layout-editor/index.umd.cjs +1 -0
- package/components/response-toolbar/index.esm.js +874 -778
- package/components/response-toolbar/index.umd.cjs +1 -0
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +4594 -4289
- package/components/schema-selector/index.umd.cjs +8 -0
- package/components/search-box/index.esm.js +126 -126
- package/components/search-box/index.umd.cjs +1 -0
- package/components/section/index.esm.js +645 -503
- package/components/section/index.umd.cjs +1 -0
- package/components/smoke-detector/index.esm.js +120 -120
- package/components/smoke-detector/index.umd.cjs +1 -0
- package/components/spacing-editor/index.umd.cjs +1 -0
- package/components/splitter/index.esm.js +421 -348
- package/components/splitter/index.umd.cjs +1 -0
- package/components/step/index.esm.js +219 -219
- package/components/step/index.umd.cjs +1 -0
- package/components/switch/index.esm.js +232 -222
- package/components/switch/index.umd.cjs +1 -0
- package/components/tabs/index.esm.js +1823 -1744
- package/components/tabs/index.umd.cjs +1 -0
- package/components/tags/index.esm.js +399 -401
- package/components/tags/index.umd.cjs +1 -0
- package/components/text/index.esm.js +164 -164
- package/components/text/index.umd.cjs +1 -0
- package/components/textarea/index.esm.js +220 -215
- package/components/textarea/index.umd.cjs +1 -0
- package/components/time-picker/index.esm.js +693 -666
- package/components/time-picker/index.umd.cjs +1 -0
- package/components/tooltip/index.umd.cjs +1 -0
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +422 -413
- package/components/transfer/index.umd.cjs +1 -0
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +4799 -4358
- package/components/tree-grid/index.umd.cjs +1 -0
- package/components/tree-view/index.esm.js +2448 -2215
- package/components/tree-view/index.umd.cjs +1 -0
- package/components/uploader/index.esm.js +164 -164
- package/components/uploader/index.umd.cjs +2 -0
- package/components/verify-detail/index.esm.js +143 -143
- package/components/verify-detail/index.umd.cjs +1 -0
- package/components/video/index.esm.js +410 -331
- package/components/video/index.umd.cjs +1 -0
- package/components/weather/index.esm.js +901 -901
- package/components/weather/index.umd.cjs +16 -0
- package/farris.all.esm.js +12305 -11403
- package/farris.all.umd.cjs +8 -8
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
- package/types/combo-list/src/components/list-container.component.d.ts +3 -0
- package/types/combo-list/src/components/list-container.props.d.ts +5 -1
- package/types/common/entity/entity-schema.d.ts +258 -0
- package/types/component/src/component-ref.props.d.ts +4 -0
- package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-grid/index.d.ts +5 -2
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
- package/types/data-grid/src/data-grid.component.d.ts +2 -1
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/use-group-column.d.ts +20 -0
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
- package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
- package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
- package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
- package/types/data-view/components/column-format/date.component.d.ts +4 -0
- package/types/data-view/components/column-format/enum.component.d.ts +4 -0
- package/types/data-view/components/column-format/number.component.d.ts +4 -0
- package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +18 -6
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- package/types/designer-canvas/src/types.d.ts +2 -2
- package/types/dynamic-form/index.d.ts +2 -1
- package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +3 -2
- package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
- package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +93 -0
- package/types/section/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +2 -2
- package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
- package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
- package/types/tags/index.d.ts +36 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var ie = Object.defineProperty;
|
|
2
2
|
var ae = (n, e, t) => e in n ? ie(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
3
|
+
var M = (n, e, t) => ae(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { defineComponent as O, inject as A, ref as h, computed as G, watch as $, onMounted as z, createVNode as b, Fragment as ce, provide as le } from "vue";
|
|
5
5
|
import { cloneDeep as se } from "lodash-es";
|
|
6
6
|
import { CHECKBOX_CONTEXT as J, useCheck as pe } from "../common/index.esm.js";
|
|
7
7
|
import { getSchemaByType as X } from "../dynamic-resolver/index.esm.js";
|
|
@@ -80,6 +80,10 @@ const ue = "https://json-schema.org/draft/2020-12/schema", de = "https://farris-
|
|
|
80
80
|
}, ge = [
|
|
81
81
|
"id",
|
|
82
82
|
"type"
|
|
83
|
+
], be = [
|
|
84
|
+
"id",
|
|
85
|
+
"appearance",
|
|
86
|
+
"binding"
|
|
83
87
|
], ve = {
|
|
84
88
|
$schema: ue,
|
|
85
89
|
$id: de,
|
|
@@ -87,33 +91,34 @@ const ue = "https://json-schema.org/draft/2020-12/schema", de = "https://farris-
|
|
|
87
91
|
description: fe,
|
|
88
92
|
type: ye,
|
|
89
93
|
properties: he,
|
|
90
|
-
required: ge
|
|
94
|
+
required: ge,
|
|
95
|
+
ignore: be
|
|
91
96
|
}, H = {}, Q = {};
|
|
92
|
-
function
|
|
93
|
-
const { properties: e, title: t } = n, o = Object.keys(e).reduce((
|
|
94
|
-
return o.id = `${t}-${Date.now()}
|
|
97
|
+
function W(n) {
|
|
98
|
+
const { properties: e, title: t, ignore: o } = n, r = o && Array.isArray(o), s = Object.keys(e).reduce((m, c) => ((!r || !o.find((f) => f == c)) && (m[c] = e[c].type === "object" && e[c].properties ? W(e[c]) : se(e[c].default)), m), {});
|
|
99
|
+
return (!r || !o.find((m) => m == "id")) && (s.id = `${t}-${Date.now()}`), s;
|
|
95
100
|
}
|
|
96
|
-
function
|
|
97
|
-
const
|
|
98
|
-
if (
|
|
99
|
-
let
|
|
100
|
-
const
|
|
101
|
-
return
|
|
101
|
+
function U(n, e = {}, t) {
|
|
102
|
+
const o = H[n];
|
|
103
|
+
if (o) {
|
|
104
|
+
let r = W(o);
|
|
105
|
+
const s = Q[n];
|
|
106
|
+
return r = s ? s({ getSchemaByType: U }, r, e, t) : r, r;
|
|
102
107
|
}
|
|
103
108
|
return null;
|
|
104
109
|
}
|
|
105
|
-
function
|
|
106
|
-
const t =
|
|
110
|
+
function ke(n, e) {
|
|
111
|
+
const t = W(e);
|
|
107
112
|
return Object.keys(n).reduce((o, r) => (o[r] && typeof o[r] == "object" ? Object.assign(o[r], n[r]) : o[r] = n[r], o), t), t;
|
|
108
113
|
}
|
|
109
|
-
function
|
|
114
|
+
function Ce(n, e) {
|
|
110
115
|
return Object.keys(n).filter((o) => n[o] != null).reduce((o, r) => {
|
|
111
116
|
if (e.has(r)) {
|
|
112
|
-
const
|
|
113
|
-
if (typeof
|
|
114
|
-
o[
|
|
117
|
+
const s = e.get(r);
|
|
118
|
+
if (typeof s == "string")
|
|
119
|
+
o[s] = n[r];
|
|
115
120
|
else {
|
|
116
|
-
const m =
|
|
121
|
+
const m = s(r, n[r], n);
|
|
117
122
|
Object.assign(o, m);
|
|
118
123
|
}
|
|
119
124
|
} else
|
|
@@ -121,65 +126,65 @@ function ke(n, e) {
|
|
|
121
126
|
return o;
|
|
122
127
|
}, {});
|
|
123
128
|
}
|
|
124
|
-
function
|
|
125
|
-
const o =
|
|
126
|
-
return
|
|
129
|
+
function Me(n, e, t = /* @__PURE__ */ new Map()) {
|
|
130
|
+
const o = ke(n, e);
|
|
131
|
+
return Ce(o, t);
|
|
127
132
|
}
|
|
128
|
-
function
|
|
129
|
-
function e(a,
|
|
133
|
+
function Te(n = {}) {
|
|
134
|
+
function e(a, d, i, u) {
|
|
130
135
|
if (typeof i == "number")
|
|
131
|
-
return
|
|
136
|
+
return u[a].length === i;
|
|
132
137
|
if (typeof i == "object") {
|
|
133
|
-
const
|
|
134
|
-
if (
|
|
135
|
-
return Number(
|
|
136
|
-
if (
|
|
137
|
-
return Number(
|
|
138
|
-
if (
|
|
139
|
-
return Number(
|
|
138
|
+
const l = Object.keys(i)[0], y = i[l];
|
|
139
|
+
if (l === "not")
|
|
140
|
+
return Number(u[a].length) !== Number(y);
|
|
141
|
+
if (l === "moreThan")
|
|
142
|
+
return Number(u[a].length) >= Number(y);
|
|
143
|
+
if (l === "lessThan")
|
|
144
|
+
return Number(u[a].length) <= Number(y);
|
|
140
145
|
}
|
|
141
146
|
return !1;
|
|
142
147
|
}
|
|
143
|
-
function t(a,
|
|
144
|
-
return
|
|
148
|
+
function t(a, d, i, u) {
|
|
149
|
+
return u[a] && u[a].propertyValue && String(u[a].propertyValue.value) === String(i);
|
|
145
150
|
}
|
|
146
151
|
const o = /* @__PURE__ */ new Map([
|
|
147
152
|
["length", e],
|
|
148
153
|
["getProperty", t]
|
|
149
154
|
]);
|
|
150
|
-
Object.keys(n).reduce((a,
|
|
151
|
-
function r(a,
|
|
155
|
+
Object.keys(n).reduce((a, d) => (a.set(d, n[d]), a), o);
|
|
156
|
+
function r(a, d) {
|
|
152
157
|
const i = a;
|
|
153
|
-
return typeof
|
|
154
|
-
if (
|
|
155
|
-
return { target: i, operator: "length", param: null, value: u
|
|
156
|
-
const
|
|
157
|
-
return { target: i, operator: "getProperty", param:
|
|
158
|
+
return typeof d == "number" ? [{ target: i, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: i, operator: "getProperty", param: a, value: !!d }] : typeof d == "object" ? Object.keys(d).map((u) => {
|
|
159
|
+
if (u === "length")
|
|
160
|
+
return { target: i, operator: "length", param: null, value: d[u] };
|
|
161
|
+
const l = u, y = d[u];
|
|
162
|
+
return { target: i, operator: "getProperty", param: l, value: y };
|
|
158
163
|
}) : [];
|
|
159
164
|
}
|
|
160
|
-
function
|
|
161
|
-
return Object.keys(a).reduce((i,
|
|
162
|
-
const
|
|
163
|
-
return i.push(...
|
|
165
|
+
function s(a) {
|
|
166
|
+
return Object.keys(a).reduce((i, u) => {
|
|
167
|
+
const l = r(u, a[u]);
|
|
168
|
+
return i.push(...l), i;
|
|
164
169
|
}, []);
|
|
165
170
|
}
|
|
166
|
-
function m(a,
|
|
171
|
+
function m(a, d) {
|
|
167
172
|
if (o.has(a.operator)) {
|
|
168
173
|
const i = o.get(a.operator);
|
|
169
|
-
return i && i(a.target, a.param, a.value,
|
|
174
|
+
return i && i(a.target, a.param, a.value, d) || !1;
|
|
170
175
|
}
|
|
171
176
|
return !1;
|
|
172
177
|
}
|
|
173
|
-
function
|
|
174
|
-
return
|
|
178
|
+
function c(a, d) {
|
|
179
|
+
return s(a).reduce((l, y) => l && m(y, d), !0);
|
|
175
180
|
}
|
|
176
|
-
function f(a,
|
|
177
|
-
const i = Object.keys(a),
|
|
178
|
-
return
|
|
181
|
+
function f(a, d) {
|
|
182
|
+
const i = Object.keys(a), u = i.includes("allOf"), l = i.includes("anyOf"), y = u || l, v = (y ? a[y ? u ? "allOf" : "anyOf" : "allOf"] : [a]).map((P) => c(P, d));
|
|
183
|
+
return u ? !v.includes(!1) : v.includes(!0);
|
|
179
184
|
}
|
|
180
185
|
return { parseValueSchema: f };
|
|
181
186
|
}
|
|
182
|
-
const
|
|
187
|
+
const p = {
|
|
183
188
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
184
189
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
185
190
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -217,24 +222,24 @@ const s = {
|
|
|
217
222
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
218
223
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
219
224
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
220
|
-
},
|
|
221
|
-
|
|
222
|
-
function Y(n, e, t = /* @__PURE__ */ new Map(), o = (m,
|
|
223
|
-
return H[e.title] = e, Q[e.title] = o,
|
|
224
|
-
const
|
|
225
|
-
return Object.assign(f,
|
|
225
|
+
}, Ve = {}, we = {};
|
|
226
|
+
Te();
|
|
227
|
+
function Y(n, e, t = /* @__PURE__ */ new Map(), o = (m, c, f) => c, r = {}, s = (m) => m) {
|
|
228
|
+
return H[e.title] = e, Q[e.title] = o, Ve[e.title] = r, we[e.title] = s, (m = {}) => {
|
|
229
|
+
const c = Me(m, e, t), f = Object.keys(n).reduce((a, d) => (a[d] = n[d].default, a), {});
|
|
230
|
+
return Object.assign(f, c);
|
|
226
231
|
};
|
|
227
232
|
}
|
|
228
|
-
function
|
|
233
|
+
function Be(n, e) {
|
|
229
234
|
return { customClass: e.class, customStyle: e.style };
|
|
230
235
|
}
|
|
231
236
|
const Z = /* @__PURE__ */ new Map([
|
|
232
|
-
["appearance",
|
|
237
|
+
["appearance", Be]
|
|
233
238
|
]);
|
|
234
239
|
function I(n, e, t) {
|
|
235
240
|
return e;
|
|
236
241
|
}
|
|
237
|
-
const
|
|
242
|
+
const L = {
|
|
238
243
|
/** 组件唯一标识 */
|
|
239
244
|
id: { Type: String, default: "" },
|
|
240
245
|
/** 自定义样式 */
|
|
@@ -257,67 +262,67 @@ const W = {
|
|
|
257
262
|
label: { type: String, default: "" },
|
|
258
263
|
/** 标识是否被选中 */
|
|
259
264
|
checked: { type: Boolean, default: !1 }
|
|
260
|
-
},
|
|
265
|
+
}, R = Y(L, ve, Z, I), q = /* @__PURE__ */ O({
|
|
261
266
|
name: "FCheckBox",
|
|
262
|
-
props:
|
|
267
|
+
props: L,
|
|
263
268
|
emits: ["change", "changeValue", "update:modelValue", "update:checked"],
|
|
264
269
|
setup(n, e) {
|
|
265
|
-
const t =
|
|
270
|
+
const t = A(J, null), {
|
|
266
271
|
buttonClass: o,
|
|
267
272
|
disabled: r,
|
|
268
|
-
name:
|
|
273
|
+
name: s,
|
|
269
274
|
shouldRenderButton: m,
|
|
270
|
-
shouldRenderNative:
|
|
275
|
+
shouldRenderNative: c,
|
|
271
276
|
shouldRenderTag: f,
|
|
272
277
|
tagClass: a,
|
|
273
|
-
checked:
|
|
278
|
+
checked: d,
|
|
274
279
|
onClickCheckBox: i
|
|
275
280
|
} = pe(n, e, t == null ? void 0 : t.parentProps, t == null ? void 0 : t.parentContext);
|
|
276
281
|
h();
|
|
277
|
-
const
|
|
278
|
-
return
|
|
282
|
+
const u = h(n.id), l = h(n.customClass), y = h(n.modelValue), C = h(n.indeterminate);
|
|
283
|
+
return G(() => {
|
|
279
284
|
const k = {
|
|
280
285
|
"custom-control": !0,
|
|
281
286
|
"custom-checkbox": !0
|
|
282
287
|
};
|
|
283
|
-
return
|
|
284
|
-
}),
|
|
288
|
+
return l.value && l.value.split(" ").reduce((v, B) => (v[B] = !0, v), k), k;
|
|
289
|
+
}), $(() => n.modelValue, (k) => {
|
|
285
290
|
y.value = k;
|
|
286
|
-
}),
|
|
291
|
+
}), $(() => n.indeterminate, (k) => {
|
|
287
292
|
C.value = k;
|
|
288
|
-
}),
|
|
293
|
+
}), z(() => {
|
|
289
294
|
}), () => {
|
|
290
|
-
var k,
|
|
291
|
-
return
|
|
295
|
+
var k, v, B, P, S, E;
|
|
296
|
+
return b(ce, null, [m.value && b("div", {
|
|
292
297
|
class: o.value,
|
|
293
298
|
style: "border-radius:0;border: 1px solid #E8EBF2;",
|
|
294
299
|
onClick: i
|
|
295
|
-
}, [(
|
|
300
|
+
}, [(v = (k = e.slots).default) == null ? void 0 : v.call(k)]), f.value && b("div", {
|
|
296
301
|
class: a.value,
|
|
297
302
|
onClick: i
|
|
298
|
-
}, [
|
|
303
|
+
}, [b("div", {
|
|
299
304
|
class: "title"
|
|
300
|
-
}, [(
|
|
305
|
+
}, [(P = (B = e.slots).default) == null ? void 0 : P.call(B)]), b("div", {
|
|
301
306
|
class: "tip"
|
|
302
|
-
}, null),
|
|
307
|
+
}, null), b("span", {
|
|
303
308
|
class: "f-icon f-icon-check f-radio-icon"
|
|
304
|
-
}, null)]),
|
|
309
|
+
}, null)]), c.value && b("div", {
|
|
305
310
|
class: "custom-control custom-checkbox",
|
|
306
311
|
onClick: i
|
|
307
|
-
}, [
|
|
312
|
+
}, [b("input", {
|
|
308
313
|
type: "checkbox",
|
|
309
314
|
class: "custom-control-input",
|
|
310
|
-
name:
|
|
311
|
-
id:
|
|
315
|
+
name: s.value,
|
|
316
|
+
id: u,
|
|
312
317
|
value: n.value,
|
|
313
|
-
checked:
|
|
318
|
+
checked: d.value,
|
|
314
319
|
disabled: r.value
|
|
315
|
-
}, null),
|
|
320
|
+
}, null), b("div", {
|
|
316
321
|
class: "custom-control-label"
|
|
317
|
-
}, [(
|
|
322
|
+
}, [(E = (S = e.slots).default) == null ? void 0 : E.call(S)])])]);
|
|
318
323
|
};
|
|
319
324
|
}
|
|
320
|
-
}),
|
|
325
|
+
}), Pe = "https://json-schema.org/draft/2020-12/schema", De = "https://farris-design.gitee.io/check-box.schema.json", Se = "check-group", Fe = "A Farris Input Component", xe = "object", Ee = {
|
|
321
326
|
id: {
|
|
322
327
|
description: "The unique identifier for a check box",
|
|
323
328
|
type: "string"
|
|
@@ -384,18 +389,18 @@ const W = {
|
|
|
384
389
|
type: "boolean",
|
|
385
390
|
default: !0
|
|
386
391
|
}
|
|
387
|
-
},
|
|
392
|
+
}, Ae = [
|
|
388
393
|
"id",
|
|
389
394
|
"type"
|
|
390
|
-
],
|
|
391
|
-
$schema:
|
|
392
|
-
$id:
|
|
393
|
-
title:
|
|
394
|
-
description:
|
|
395
|
-
type:
|
|
396
|
-
properties:
|
|
397
|
-
required:
|
|
398
|
-
},
|
|
395
|
+
], $e = {
|
|
396
|
+
$schema: Pe,
|
|
397
|
+
$id: De,
|
|
398
|
+
title: Se,
|
|
399
|
+
description: Fe,
|
|
400
|
+
type: xe,
|
|
401
|
+
properties: Ee,
|
|
402
|
+
required: Ae
|
|
403
|
+
}, Ne = {
|
|
399
404
|
/**
|
|
400
405
|
* 是否被选中
|
|
401
406
|
*/
|
|
@@ -412,8 +417,8 @@ const W = {
|
|
|
412
417
|
* type为button或者tag时的尺寸
|
|
413
418
|
*/
|
|
414
419
|
size: { type: String, default: "middle" }
|
|
415
|
-
},
|
|
416
|
-
|
|
420
|
+
}, _ = {
|
|
421
|
+
...Ne,
|
|
417
422
|
/**
|
|
418
423
|
* 组件标识
|
|
419
424
|
*/
|
|
@@ -469,96 +474,96 @@ const W = {
|
|
|
469
474
|
* 枚举数组中枚举值的key值。
|
|
470
475
|
*/
|
|
471
476
|
valueField: { type: String, default: "value" }
|
|
472
|
-
},
|
|
477
|
+
}, K = Y(_, $e, Z, I);
|
|
473
478
|
function ee(n, e, t) {
|
|
474
|
-
const o =
|
|
475
|
-
function
|
|
479
|
+
const o = G(() => !n.disabled), r = h(n.enumData);
|
|
480
|
+
function s(i) {
|
|
476
481
|
return i[n.valueField];
|
|
477
482
|
}
|
|
478
483
|
function m(i) {
|
|
479
484
|
return i[n.textField];
|
|
480
485
|
}
|
|
481
|
-
function
|
|
486
|
+
function c(i) {
|
|
482
487
|
return i ? n.isStringValue ? i.split(n.separator) : i : [];
|
|
483
488
|
}
|
|
484
489
|
function f(i) {
|
|
485
|
-
const
|
|
486
|
-
return n.isStringValue ?
|
|
490
|
+
const l = r.value.map((y) => s(y)).filter((y) => i.some((C) => C === String(y)));
|
|
491
|
+
return n.isStringValue ? l.join(n.separator) : l;
|
|
487
492
|
}
|
|
488
493
|
function a(i) {
|
|
489
|
-
const
|
|
490
|
-
return
|
|
494
|
+
const u = String(s(i));
|
|
495
|
+
return c(t.value).some((y) => y === u);
|
|
491
496
|
}
|
|
492
|
-
function
|
|
497
|
+
function d(i, u) {
|
|
493
498
|
if (o.value) {
|
|
494
|
-
let
|
|
495
|
-
const y = String(
|
|
496
|
-
!
|
|
499
|
+
let l = c(t.value) || [];
|
|
500
|
+
const y = String(s(i));
|
|
501
|
+
!l || !l.length ? l.push(y) : l.some((C) => C === y) ? l = l.filter((C) => C !== y) : l.push(y), t.value = f(l), e.emit("changeValue", t.value), e.emit("update:modelValue", t.value);
|
|
497
502
|
}
|
|
498
|
-
|
|
503
|
+
u.stopPropagation();
|
|
499
504
|
}
|
|
500
505
|
return {
|
|
501
506
|
enumData: r,
|
|
502
|
-
getValue:
|
|
507
|
+
getValue: s,
|
|
503
508
|
getText: m,
|
|
504
509
|
checked: a,
|
|
505
|
-
onClickCheckbox:
|
|
510
|
+
onClickCheckbox: d
|
|
506
511
|
};
|
|
507
512
|
}
|
|
508
|
-
const
|
|
513
|
+
const x = /* @__PURE__ */ O({
|
|
509
514
|
name: "FCheckGroup",
|
|
510
|
-
props:
|
|
515
|
+
props: _,
|
|
511
516
|
emits: ["changeValue", "update:modelValue"],
|
|
512
517
|
setup(n, e) {
|
|
513
|
-
const t = h(n.modelValue), o = h(n.horizontal), r = h(n.tabIndex),
|
|
518
|
+
const t = h(n.modelValue), o = h(n.horizontal), r = h(n.tabIndex), s = h(n.name), {
|
|
514
519
|
enumData: m,
|
|
515
|
-
onClickCheckbox:
|
|
520
|
+
onClickCheckbox: c,
|
|
516
521
|
getValue: f,
|
|
517
522
|
getText: a,
|
|
518
|
-
checked:
|
|
519
|
-
} = ee(n, e, t), i =
|
|
523
|
+
checked: d
|
|
524
|
+
} = ee(n, e, t), i = G(() => ({
|
|
520
525
|
"farris-checkradio-hor": o.value
|
|
521
526
|
}));
|
|
522
|
-
|
|
523
|
-
t.value =
|
|
527
|
+
$(() => n.modelValue, (l) => {
|
|
528
|
+
t.value = l;
|
|
524
529
|
});
|
|
525
|
-
const
|
|
530
|
+
const u = h([]);
|
|
526
531
|
return le(J, {
|
|
527
|
-
values:
|
|
532
|
+
values: u,
|
|
528
533
|
parentProps: n,
|
|
529
534
|
parentContext: e
|
|
530
|
-
}), () =>
|
|
535
|
+
}), () => b("div", {
|
|
531
536
|
class: ["farris-input-wrap", i.value]
|
|
532
|
-
}, [e.slots.default ? e.slots.default() : m.value.map((
|
|
533
|
-
const C = "checkbox_" +
|
|
534
|
-
return
|
|
537
|
+
}, [e.slots.default ? e.slots.default() : m.value.map((l, y) => {
|
|
538
|
+
const C = "checkbox_" + s.value + y;
|
|
539
|
+
return b("div", {
|
|
535
540
|
class: "custom-control custom-checkbox"
|
|
536
|
-
}, [
|
|
541
|
+
}, [b("input", {
|
|
537
542
|
type: "checkbox",
|
|
538
543
|
class: "custom-control-input",
|
|
539
|
-
name:
|
|
544
|
+
name: s.value,
|
|
540
545
|
id: C,
|
|
541
|
-
value: f(
|
|
542
|
-
checked:
|
|
546
|
+
value: f(l),
|
|
547
|
+
checked: d(l),
|
|
543
548
|
disabled: n.disabled,
|
|
544
549
|
tabindex: r.value,
|
|
545
|
-
onClick: (k) =>
|
|
546
|
-
}, null),
|
|
550
|
+
onClick: (k) => c(l, k)
|
|
551
|
+
}, null), b("label", {
|
|
547
552
|
class: "custom-control-label",
|
|
548
553
|
for: C,
|
|
549
|
-
title: a(
|
|
550
|
-
}, [a(
|
|
554
|
+
title: a(l)
|
|
555
|
+
}, [a(l)])]);
|
|
551
556
|
})]);
|
|
552
557
|
}
|
|
553
558
|
});
|
|
554
559
|
function te(n, e, t) {
|
|
555
|
-
var
|
|
560
|
+
var E;
|
|
556
561
|
function o() {
|
|
557
562
|
t != null && t.resolveComponentContext && t.resolveComponentContext();
|
|
558
563
|
}
|
|
559
564
|
o();
|
|
560
|
-
const r = t && t.getStyles && t.getStyles() || "",
|
|
561
|
-
function
|
|
565
|
+
const r = t && t.getStyles && t.getStyles() || "", s = t && t.getDesignerClass && t.getDesignerClass() || "", m = h();
|
|
566
|
+
function c() {
|
|
562
567
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
563
568
|
}
|
|
564
569
|
function f() {
|
|
@@ -567,7 +572,7 @@ function te(n, e, t) {
|
|
|
567
572
|
function a() {
|
|
568
573
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
569
574
|
}
|
|
570
|
-
function
|
|
575
|
+
function d() {
|
|
571
576
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
572
577
|
}
|
|
573
578
|
function i(g) {
|
|
@@ -575,14 +580,14 @@ function te(n, e, t) {
|
|
|
575
580
|
return null;
|
|
576
581
|
if (g.value.schema && g.value.schema.type === "component")
|
|
577
582
|
return g.value;
|
|
578
|
-
const T = h(g == null ? void 0 : g.value.parent),
|
|
579
|
-
return
|
|
583
|
+
const T = h(g == null ? void 0 : g.value.parent), V = i(T);
|
|
584
|
+
return V || null;
|
|
580
585
|
}
|
|
581
|
-
function
|
|
582
|
-
const { componentInstance: T, designerItemElementRef:
|
|
583
|
-
return !T || !T.value ? null : T.value.canMove ?
|
|
586
|
+
function u(g = e) {
|
|
587
|
+
const { componentInstance: T, designerItemElementRef: V } = g;
|
|
588
|
+
return !T || !T.value ? null : T.value.canMove ? V : u(g.parent);
|
|
584
589
|
}
|
|
585
|
-
function
|
|
590
|
+
function l(g) {
|
|
586
591
|
return !!t && t.canAccepts(g);
|
|
587
592
|
}
|
|
588
593
|
function y() {
|
|
@@ -593,48 +598,48 @@ function te(n, e, t) {
|
|
|
593
598
|
function k(g, T) {
|
|
594
599
|
T && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(T);
|
|
595
600
|
}
|
|
596
|
-
function
|
|
597
|
-
const { componentType:
|
|
598
|
-
let
|
|
599
|
-
t && t.onResolveNewComponentSchema && (
|
|
600
|
-
const
|
|
601
|
-
return
|
|
601
|
+
function v(g, T) {
|
|
602
|
+
const { componentType: V } = g;
|
|
603
|
+
let w = U(V, g, T);
|
|
604
|
+
t && t.onResolveNewComponentSchema && (w = t.onResolveNewComponentSchema(g, w));
|
|
605
|
+
const N = V.toLowerCase().replace("-", "_");
|
|
606
|
+
return w && !w.id && w.type === V && (w.id = `${N}_${Math.random().toString().slice(2, 6)}`), w;
|
|
602
607
|
}
|
|
603
|
-
function
|
|
604
|
-
const
|
|
605
|
-
|
|
606
|
-
let
|
|
607
|
-
t && t.onAcceptNewChildElement && (
|
|
608
|
-
const re =
|
|
609
|
-
return
|
|
608
|
+
function B(g, T) {
|
|
609
|
+
const V = String(g.getAttribute("data-controltype")), w = g.getAttribute("data-feature"), N = w ? JSON.parse(w) : {};
|
|
610
|
+
N.parentComponentInstance = m.value;
|
|
611
|
+
let D = U(V, N);
|
|
612
|
+
t && t.onAcceptNewChildElement && (D = t.onAcceptNewChildElement(g, T, D));
|
|
613
|
+
const re = V.toLowerCase().replace("-", "_");
|
|
614
|
+
return D && !D.id && D.type === V && (D.id = `${re}_${Math.random().toString().slice(2, 6)}`), D;
|
|
610
615
|
}
|
|
611
|
-
function
|
|
616
|
+
function P(g) {
|
|
612
617
|
}
|
|
613
|
-
function
|
|
618
|
+
function S(...g) {
|
|
614
619
|
if (t && t.getPropsConfig)
|
|
615
620
|
return t.getPropsConfig(...g);
|
|
616
621
|
}
|
|
617
622
|
return m.value = {
|
|
618
|
-
canMove:
|
|
623
|
+
canMove: c(),
|
|
619
624
|
canSelectParent: f(),
|
|
620
625
|
canDelete: a(),
|
|
621
|
-
canNested: !
|
|
626
|
+
canNested: !d(),
|
|
622
627
|
contents: e == null ? void 0 : e.schema.contents,
|
|
623
628
|
elementRef: n,
|
|
624
|
-
parent: (
|
|
629
|
+
parent: (E = e == null ? void 0 : e.parent) == null ? void 0 : E.componentInstance,
|
|
625
630
|
schema: e == null ? void 0 : e.schema,
|
|
626
631
|
styles: r,
|
|
627
|
-
designerClass:
|
|
628
|
-
canAccepts:
|
|
632
|
+
designerClass: s,
|
|
633
|
+
canAccepts: l,
|
|
629
634
|
getBelongedComponentInstance: i,
|
|
630
|
-
getDraggableDesignItemElement:
|
|
635
|
+
getDraggableDesignItemElement: u,
|
|
631
636
|
getDraggingDisplayText: y,
|
|
632
|
-
getPropConfig:
|
|
637
|
+
getPropConfig: S,
|
|
633
638
|
getDragScopeElement: C,
|
|
634
639
|
onAcceptMovedChildElement: k,
|
|
635
|
-
onAcceptNewChildElement:
|
|
636
|
-
onChildElementMovedOut:
|
|
637
|
-
addNewChildComponentSchema:
|
|
640
|
+
onAcceptNewChildElement: B,
|
|
641
|
+
onChildElementMovedOut: P,
|
|
642
|
+
addNewChildComponentSchema: v,
|
|
638
643
|
updateDragAndDropRules: o,
|
|
639
644
|
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || h(!1),
|
|
640
645
|
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || h(!1)
|
|
@@ -646,48 +651,48 @@ function ne(n, e) {
|
|
|
646
651
|
function r(i) {
|
|
647
652
|
return !1;
|
|
648
653
|
}
|
|
649
|
-
function
|
|
654
|
+
function s() {
|
|
650
655
|
return !1;
|
|
651
656
|
}
|
|
652
657
|
function m() {
|
|
653
658
|
return !1;
|
|
654
659
|
}
|
|
655
|
-
function
|
|
660
|
+
function c() {
|
|
656
661
|
return !0;
|
|
657
662
|
}
|
|
658
663
|
function f(i) {
|
|
659
664
|
}
|
|
660
665
|
function a() {
|
|
661
666
|
}
|
|
662
|
-
function
|
|
667
|
+
function d(i) {
|
|
663
668
|
return null;
|
|
664
669
|
}
|
|
665
670
|
return {
|
|
666
671
|
canAccepts: r,
|
|
667
|
-
checkCanDeleteComponent:
|
|
672
|
+
checkCanDeleteComponent: s,
|
|
668
673
|
checkCanMoveComponent: m,
|
|
669
|
-
hideNestedPaddingInDesginerView:
|
|
674
|
+
hideNestedPaddingInDesginerView: c,
|
|
670
675
|
onAcceptMovedChildElement: f,
|
|
671
676
|
resolveComponentContext: a,
|
|
672
677
|
triggerBelongedComponentToMoveWhenMoved: t,
|
|
673
678
|
triggerBelongedComponentToDeleteWhenDeleted: o,
|
|
674
|
-
getPropsConfig:
|
|
679
|
+
getPropsConfig: d
|
|
675
680
|
};
|
|
676
681
|
}
|
|
677
|
-
class
|
|
682
|
+
class je {
|
|
678
683
|
constructor(e, t) {
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
684
|
+
M(this, "componentId");
|
|
685
|
+
M(this, "viewModelId");
|
|
686
|
+
M(this, "eventsEditorUtils");
|
|
687
|
+
M(this, "formSchemaUtils");
|
|
688
|
+
M(this, "formMetadataConverter");
|
|
689
|
+
M(this, "designViewModelUtils");
|
|
690
|
+
M(this, "designViewModelField");
|
|
691
|
+
M(this, "controlCreatorUtils");
|
|
692
|
+
M(this, "designerHostService");
|
|
693
|
+
M(this, "schemaService", null);
|
|
694
|
+
M(this, "metadataService", null);
|
|
695
|
+
M(this, "propertyConfig", {
|
|
691
696
|
type: "object",
|
|
692
697
|
categories: {}
|
|
693
698
|
});
|
|
@@ -729,7 +734,7 @@ class Ne {
|
|
|
729
734
|
type: "combo-list",
|
|
730
735
|
textField: "name",
|
|
731
736
|
valueField: "value",
|
|
732
|
-
data: [{ value: e.type, name:
|
|
737
|
+
data: [{ value: e.type, name: p[e.type].name }]
|
|
733
738
|
}
|
|
734
739
|
}
|
|
735
740
|
}
|
|
@@ -756,12 +761,12 @@ class Ne {
|
|
|
756
761
|
};
|
|
757
762
|
}
|
|
758
763
|
}
|
|
759
|
-
const
|
|
764
|
+
const F = class F {
|
|
760
765
|
/**
|
|
761
766
|
* 根据绑定字段类型获取可用的输入类控件
|
|
762
767
|
*/
|
|
763
768
|
static getEditorTypesByMDataType(e) {
|
|
764
|
-
const t =
|
|
769
|
+
const t = F.fieldControlTypeMapping[e];
|
|
765
770
|
return t || [{ key: "", value: "" }];
|
|
766
771
|
}
|
|
767
772
|
/**
|
|
@@ -769,8 +774,8 @@ const S = class S {
|
|
|
769
774
|
*/
|
|
770
775
|
static getAllInputTypes() {
|
|
771
776
|
const e = [];
|
|
772
|
-
for (let t in
|
|
773
|
-
|
|
777
|
+
for (let t in F.fieldControlTypeMapping)
|
|
778
|
+
F.fieldControlTypeMapping[t].forEach((o) => {
|
|
774
779
|
e.find((r) => r.key === o.key && r.value === o.value) || e.push({ key: o.key, value: o.value });
|
|
775
780
|
});
|
|
776
781
|
return e;
|
|
@@ -779,55 +784,55 @@ const S = class S {
|
|
|
779
784
|
/**
|
|
780
785
|
* <字段类型,可配置的控件类型列表>的映射
|
|
781
786
|
*/
|
|
782
|
-
|
|
787
|
+
M(F, "fieldControlTypeMapping", {
|
|
783
788
|
String: [
|
|
784
|
-
{ key:
|
|
785
|
-
{ key:
|
|
786
|
-
{ key:
|
|
787
|
-
{ key:
|
|
788
|
-
{ key:
|
|
789
|
-
{ key:
|
|
790
|
-
{ key:
|
|
789
|
+
{ key: p["input-group"].type, value: p["input-group"].name },
|
|
790
|
+
{ key: p.lookup.type, value: p.lookup.name },
|
|
791
|
+
{ key: p["date-picker"].type, value: p["date-picker"].name },
|
|
792
|
+
{ key: p["check-box"].type, value: p["check-box"].name },
|
|
793
|
+
{ key: p["radio-group"].type, value: p["radio-group"].name },
|
|
794
|
+
{ key: p["combo-list"].type, value: p["combo-list"].name },
|
|
795
|
+
{ key: p.textarea.type, value: p.textarea.name }
|
|
791
796
|
],
|
|
792
797
|
Text: [
|
|
793
|
-
{ key:
|
|
794
|
-
{ key:
|
|
798
|
+
{ key: p.textarea.type, value: p.textarea.name },
|
|
799
|
+
{ key: p.lookup.type, value: p.lookup.name }
|
|
795
800
|
],
|
|
796
801
|
Decimal: [
|
|
797
|
-
{ key:
|
|
802
|
+
{ key: p["number-spinner"].type, value: p["number-spinner"].name }
|
|
798
803
|
],
|
|
799
804
|
Integer: [
|
|
800
|
-
{ key:
|
|
805
|
+
{ key: p["number-spinner"].type, value: p["number-spinner"].name }
|
|
801
806
|
],
|
|
802
807
|
Number: [
|
|
803
|
-
{ key:
|
|
808
|
+
{ key: p["number-spinner"].type, value: p["number-spinner"].name }
|
|
804
809
|
],
|
|
805
810
|
BigNumber: [
|
|
806
|
-
{ key:
|
|
811
|
+
{ key: p["number-spinner"].type, value: p["number-spinner"].name }
|
|
807
812
|
],
|
|
808
813
|
Date: [
|
|
809
|
-
{ key:
|
|
814
|
+
{ key: p["date-picker"].type, value: p["date-picker"].name }
|
|
810
815
|
],
|
|
811
816
|
DateTime: [
|
|
812
|
-
{ key:
|
|
817
|
+
{ key: p["date-picker"].type, value: p["date-picker"].name }
|
|
813
818
|
],
|
|
814
819
|
Boolean: [
|
|
815
|
-
{ key:
|
|
816
|
-
{ key:
|
|
820
|
+
{ key: p.switch.type, value: p.switch.name },
|
|
821
|
+
{ key: p["check-box"].type, value: p["check-box"].name }
|
|
817
822
|
],
|
|
818
823
|
Enum: [
|
|
819
|
-
{ key:
|
|
820
|
-
{ key:
|
|
824
|
+
{ key: p["combo-list"].type, value: p["combo-list"].name },
|
|
825
|
+
{ key: p["radio-group"].type, value: p["radio-group"].name }
|
|
821
826
|
],
|
|
822
827
|
Object: [
|
|
823
|
-
{ key:
|
|
824
|
-
{ key:
|
|
825
|
-
{ key:
|
|
828
|
+
{ key: p.lookup.type, value: p.lookup.name },
|
|
829
|
+
{ key: p["combo-list"].type, value: p["combo-list"].name },
|
|
830
|
+
{ key: p["radio-group"].type, value: p["radio-group"].name }
|
|
826
831
|
]
|
|
827
832
|
});
|
|
828
|
-
let
|
|
829
|
-
const
|
|
830
|
-
class oe extends
|
|
833
|
+
let j = F;
|
|
834
|
+
const Oe = h(0);
|
|
835
|
+
class oe extends je {
|
|
831
836
|
constructor(e, t) {
|
|
832
837
|
super(e, t);
|
|
833
838
|
}
|
|
@@ -838,7 +843,7 @@ class oe extends Ne {
|
|
|
838
843
|
var m;
|
|
839
844
|
var o = this;
|
|
840
845
|
this.setDesignViewModelField(e);
|
|
841
|
-
const r = this.formSchemaUtils.getFormMetadataBasicInfo(),
|
|
846
|
+
const r = this.formSchemaUtils.getFormMetadataBasicInfo(), s = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
842
847
|
return {
|
|
843
848
|
description: "Basic Information",
|
|
844
849
|
title: "基本信息",
|
|
@@ -850,8 +855,8 @@ class oe extends Ne {
|
|
|
850
855
|
readonly: !0
|
|
851
856
|
},
|
|
852
857
|
type: {
|
|
853
|
-
description: "
|
|
854
|
-
title: "
|
|
858
|
+
description: "编辑器类型",
|
|
859
|
+
title: "编辑器类型",
|
|
855
860
|
type: "string",
|
|
856
861
|
refreshPanelAfterChanged: !0,
|
|
857
862
|
$converter: "/converter/change-editor.converter",
|
|
@@ -860,7 +865,7 @@ class oe extends Ne {
|
|
|
860
865
|
textField: "value",
|
|
861
866
|
valueField: "key",
|
|
862
867
|
editable: !1,
|
|
863
|
-
data: o.designViewModelField ?
|
|
868
|
+
data: o.designViewModelField ? j.getEditorTypesByMDataType((m = o.designViewModelField.type) == null ? void 0 : m.name) : j.getAllInputTypes()
|
|
864
869
|
}
|
|
865
870
|
},
|
|
866
871
|
label: {
|
|
@@ -885,15 +890,19 @@ class oe extends Ne {
|
|
|
885
890
|
{ field: "fieldType", title: "字段类型" }
|
|
886
891
|
],
|
|
887
892
|
textField: "bindingField",
|
|
888
|
-
data:
|
|
893
|
+
data: s
|
|
889
894
|
}
|
|
890
895
|
}
|
|
891
896
|
},
|
|
892
|
-
setPropertyRelates(
|
|
893
|
-
if (
|
|
894
|
-
switch (
|
|
897
|
+
setPropertyRelates(c, f) {
|
|
898
|
+
if (c)
|
|
899
|
+
switch (c && c.propertyID) {
|
|
895
900
|
case "type": {
|
|
896
|
-
o.changeControlType(e,
|
|
901
|
+
o.changeControlType(e, c, t);
|
|
902
|
+
break;
|
|
903
|
+
}
|
|
904
|
+
case "label": {
|
|
905
|
+
c.needRefreshControlTree = !0;
|
|
897
906
|
break;
|
|
898
907
|
}
|
|
899
908
|
}
|
|
@@ -939,11 +948,11 @@ class oe extends Ne {
|
|
|
939
948
|
* @param newControlType 新控件类型
|
|
940
949
|
*/
|
|
941
950
|
changeControlType(e, t, o) {
|
|
942
|
-
var a,
|
|
943
|
-
const r = t.propertyValue,
|
|
944
|
-
if (!
|
|
951
|
+
var a, d, i, u;
|
|
952
|
+
const r = t.propertyValue, s = o && o.parent && o.parent.schema;
|
|
953
|
+
if (!s)
|
|
945
954
|
return;
|
|
946
|
-
const m =
|
|
955
|
+
const m = s.contents.findIndex((l) => l.id === e.id), c = s.contents[m];
|
|
947
956
|
let f;
|
|
948
957
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
949
958
|
editor: {
|
|
@@ -953,29 +962,29 @@ class oe extends Ne {
|
|
|
953
962
|
require: this.designViewModelField.require,
|
|
954
963
|
readonly: this.designViewModelField.readonly
|
|
955
964
|
}, !1), f = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, r)), f || (f = X("form-group") || {}, f.editor = X(r) || {}, delete f.editor.id, delete f.editor.binding, delete f.editor.appearance), Object.assign(f, {
|
|
956
|
-
id:
|
|
957
|
-
appearance:
|
|
958
|
-
size:
|
|
959
|
-
label:
|
|
960
|
-
binding:
|
|
961
|
-
visible:
|
|
965
|
+
id: c.id,
|
|
966
|
+
appearance: c.appearance,
|
|
967
|
+
size: c.size,
|
|
968
|
+
label: c.label,
|
|
969
|
+
binding: c.binding,
|
|
970
|
+
visible: c.visible
|
|
962
971
|
}), Object.assign(f.editor, {
|
|
963
|
-
isTextArea: f.isTextArea &&
|
|
964
|
-
placeholder: (a =
|
|
965
|
-
holdPlace: (
|
|
966
|
-
readonly: (i =
|
|
967
|
-
require: (
|
|
968
|
-
}),
|
|
969
|
-
(
|
|
970
|
-
),
|
|
972
|
+
isTextArea: f.isTextArea && c.isTextArea,
|
|
973
|
+
placeholder: (a = c.editor) == null ? void 0 : a.placeholder,
|
|
974
|
+
holdPlace: (d = c.editor) == null ? void 0 : d.holdPlace,
|
|
975
|
+
readonly: (i = c.editor) == null ? void 0 : i.readonly,
|
|
976
|
+
require: (u = c.editor) == null ? void 0 : u.require
|
|
977
|
+
}), s.contents.splice(m, 1), s.contents.splice(m, 0, f), o.schema = Object.assign(c, f), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
978
|
+
(l) => l.classList.remove("dgComponentSelected")
|
|
979
|
+
), Oe.value++;
|
|
971
980
|
}
|
|
972
981
|
getComponentConfig(e, t = {}, o = {}) {
|
|
973
982
|
const r = Object.assign({
|
|
974
|
-
description: "
|
|
975
|
-
title: "
|
|
983
|
+
description: "编辑器",
|
|
984
|
+
title: "编辑器",
|
|
976
985
|
type: "input-group",
|
|
977
986
|
$converter: "/converter/property-editor.converter"
|
|
978
|
-
}, t),
|
|
987
|
+
}, t), s = Object.assign({
|
|
979
988
|
readonly: {
|
|
980
989
|
description: "",
|
|
981
990
|
title: "只读",
|
|
@@ -997,10 +1006,10 @@ class oe extends Ne {
|
|
|
997
1006
|
type: "string"
|
|
998
1007
|
}
|
|
999
1008
|
}, o);
|
|
1000
|
-
return { ...r, properties: { ...
|
|
1009
|
+
return { ...r, properties: { ...s } };
|
|
1001
1010
|
}
|
|
1002
1011
|
}
|
|
1003
|
-
class
|
|
1012
|
+
class Ge extends oe {
|
|
1004
1013
|
constructor(e, t) {
|
|
1005
1014
|
super(e, t);
|
|
1006
1015
|
}
|
|
@@ -1027,7 +1036,7 @@ class Oe extends oe {
|
|
|
1027
1036
|
});
|
|
1028
1037
|
}
|
|
1029
1038
|
}
|
|
1030
|
-
class
|
|
1039
|
+
class Ue extends oe {
|
|
1031
1040
|
constructor(e, t) {
|
|
1032
1041
|
super(e, t);
|
|
1033
1042
|
}
|
|
@@ -1049,141 +1058,141 @@ class Ge extends oe {
|
|
|
1049
1058
|
});
|
|
1050
1059
|
}
|
|
1051
1060
|
}
|
|
1052
|
-
function
|
|
1061
|
+
function qe(n, e) {
|
|
1053
1062
|
const {
|
|
1054
1063
|
canAccepts: t,
|
|
1055
1064
|
checkCanDeleteComponent: o,
|
|
1056
1065
|
checkCanMoveComponent: r,
|
|
1057
|
-
hideNestedPaddingInDesginerView:
|
|
1066
|
+
hideNestedPaddingInDesginerView: s,
|
|
1058
1067
|
onAcceptMovedChildElement: m,
|
|
1059
|
-
resolveComponentContext:
|
|
1068
|
+
resolveComponentContext: c,
|
|
1060
1069
|
triggerBelongedComponentToMoveWhenMoved: f,
|
|
1061
1070
|
triggerBelongedComponentToDeleteWhenDeleted: a
|
|
1062
|
-
} = ne(n),
|
|
1063
|
-
function i(
|
|
1064
|
-
return new
|
|
1071
|
+
} = ne(n), d = n.schema;
|
|
1072
|
+
function i(u, l) {
|
|
1073
|
+
return new Ge(u, e).getPropertyConfig(d, l);
|
|
1065
1074
|
}
|
|
1066
1075
|
return {
|
|
1067
1076
|
canAccepts: t,
|
|
1068
1077
|
checkCanDeleteComponent: o,
|
|
1069
1078
|
checkCanMoveComponent: r,
|
|
1070
|
-
hideNestedPaddingInDesginerView:
|
|
1079
|
+
hideNestedPaddingInDesginerView: s,
|
|
1071
1080
|
onAcceptMovedChildElement: m,
|
|
1072
|
-
resolveComponentContext:
|
|
1081
|
+
resolveComponentContext: c,
|
|
1073
1082
|
triggerBelongedComponentToMoveWhenMoved: f,
|
|
1074
1083
|
triggerBelongedComponentToDeleteWhenDeleted: a,
|
|
1075
1084
|
getPropsConfig: i
|
|
1076
1085
|
};
|
|
1077
1086
|
}
|
|
1078
|
-
function
|
|
1087
|
+
function ze(n, e) {
|
|
1079
1088
|
const {
|
|
1080
1089
|
canAccepts: t,
|
|
1081
1090
|
checkCanDeleteComponent: o,
|
|
1082
1091
|
checkCanMoveComponent: r,
|
|
1083
|
-
hideNestedPaddingInDesginerView:
|
|
1092
|
+
hideNestedPaddingInDesginerView: s,
|
|
1084
1093
|
onAcceptMovedChildElement: m,
|
|
1085
|
-
resolveComponentContext:
|
|
1094
|
+
resolveComponentContext: c,
|
|
1086
1095
|
triggerBelongedComponentToMoveWhenMoved: f,
|
|
1087
1096
|
triggerBelongedComponentToDeleteWhenDeleted: a
|
|
1088
|
-
} = ne(n),
|
|
1089
|
-
function i(
|
|
1090
|
-
return new
|
|
1097
|
+
} = ne(n), d = n.schema;
|
|
1098
|
+
function i(u, l) {
|
|
1099
|
+
return new Ue(u, e).getPropertyConfig(d, l);
|
|
1091
1100
|
}
|
|
1092
1101
|
return {
|
|
1093
1102
|
canAccepts: t,
|
|
1094
1103
|
checkCanDeleteComponent: o,
|
|
1095
1104
|
checkCanMoveComponent: r,
|
|
1096
|
-
hideNestedPaddingInDesginerView:
|
|
1105
|
+
hideNestedPaddingInDesginerView: s,
|
|
1097
1106
|
onAcceptMovedChildElement: m,
|
|
1098
|
-
resolveComponentContext:
|
|
1107
|
+
resolveComponentContext: c,
|
|
1099
1108
|
triggerBelongedComponentToMoveWhenMoved: f,
|
|
1100
1109
|
triggerBelongedComponentToDeleteWhenDeleted: a,
|
|
1101
1110
|
getPropsConfig: i
|
|
1102
1111
|
};
|
|
1103
1112
|
}
|
|
1104
|
-
const
|
|
1113
|
+
const We = /* @__PURE__ */ O({
|
|
1105
1114
|
name: "FCheckboxGroupDesign",
|
|
1106
|
-
props:
|
|
1115
|
+
props: _,
|
|
1107
1116
|
emits: ["changeValue", "update:modelValue"],
|
|
1108
1117
|
setup(n, e) {
|
|
1109
|
-
const t = h(n.modelValue), o = h(n.horizontal), r = h(n.tabIndex),
|
|
1118
|
+
const t = h(n.modelValue), o = h(n.horizontal), r = h(n.tabIndex), s = h(n.name), m = G(() => ({
|
|
1110
1119
|
"farris-checkradio-hor": o.value
|
|
1111
1120
|
})), {
|
|
1112
|
-
enumData:
|
|
1121
|
+
enumData: c,
|
|
1113
1122
|
onClickCheckbox: f,
|
|
1114
1123
|
getValue: a,
|
|
1115
|
-
getText:
|
|
1124
|
+
getText: d,
|
|
1116
1125
|
checked: i
|
|
1117
|
-
} = ee(n, e, t),
|
|
1118
|
-
return
|
|
1119
|
-
|
|
1120
|
-
}), e.expose(k.value),
|
|
1121
|
-
t.value =
|
|
1122
|
-
}), () =>
|
|
1123
|
-
ref:
|
|
1126
|
+
} = ee(n, e, t), u = h(), l = A("designer-host-service"), y = A("design-item-context"), C = qe(y, l), k = te(u, y, C);
|
|
1127
|
+
return z(() => {
|
|
1128
|
+
u.value.componentInstance = k;
|
|
1129
|
+
}), e.expose(k.value), $(() => n.modelValue, (v) => {
|
|
1130
|
+
t.value = v, e.emit("changeValue", t.value);
|
|
1131
|
+
}), () => b("div", {
|
|
1132
|
+
ref: u,
|
|
1124
1133
|
class: ["farris-input-wrap", m.value]
|
|
1125
|
-
}, [
|
|
1126
|
-
const
|
|
1127
|
-
return
|
|
1134
|
+
}, [c.value.map((v, B) => {
|
|
1135
|
+
const P = "checkbox_" + s.value + B;
|
|
1136
|
+
return b("div", {
|
|
1128
1137
|
class: "custom-control custom-checkbox"
|
|
1129
|
-
}, [
|
|
1138
|
+
}, [b("input", {
|
|
1130
1139
|
type: "checkbox",
|
|
1131
1140
|
class: "custom-control-input",
|
|
1132
|
-
name:
|
|
1133
|
-
id:
|
|
1134
|
-
value: a(
|
|
1135
|
-
checked: i(
|
|
1141
|
+
name: s.value,
|
|
1142
|
+
id: P,
|
|
1143
|
+
value: a(v),
|
|
1144
|
+
checked: i(v),
|
|
1136
1145
|
disabled: n.disabled,
|
|
1137
1146
|
tabindex: r.value,
|
|
1138
|
-
onClick: (
|
|
1139
|
-
}, null),
|
|
1147
|
+
onClick: (S) => f(v, S)
|
|
1148
|
+
}, null), b("label", {
|
|
1140
1149
|
class: "custom-control-label",
|
|
1141
|
-
for:
|
|
1142
|
-
title:
|
|
1143
|
-
}, [
|
|
1150
|
+
for: P,
|
|
1151
|
+
title: d(v)
|
|
1152
|
+
}, [d(v)])]);
|
|
1144
1153
|
})]);
|
|
1145
1154
|
}
|
|
1146
|
-
}),
|
|
1155
|
+
}), Le = /* @__PURE__ */ O({
|
|
1147
1156
|
name: "FCheckBoxDesign",
|
|
1148
|
-
props:
|
|
1157
|
+
props: L,
|
|
1149
1158
|
emits: [],
|
|
1150
1159
|
setup(n, e) {
|
|
1151
|
-
const t = h(), o = h(n.id), r = h(n.indeterminate),
|
|
1152
|
-
return
|
|
1160
|
+
const t = h(), o = h(n.id), r = h(n.indeterminate), s = A("designer-host-service"), m = A("design-item-context"), c = ze(m, s), f = te(t, m, c);
|
|
1161
|
+
return z(() => {
|
|
1153
1162
|
t.value.componentInstance = f;
|
|
1154
|
-
}),
|
|
1163
|
+
}), $(() => n.indeterminate, (a) => {
|
|
1155
1164
|
r.value = a;
|
|
1156
|
-
}), e.expose(f.value), () =>
|
|
1165
|
+
}), e.expose(f.value), () => b("div", {
|
|
1157
1166
|
ref: t,
|
|
1158
1167
|
dragref: `${m.schema.id}-container`,
|
|
1159
1168
|
class: "drag-container custom-control custom-checkbox"
|
|
1160
|
-
}, [
|
|
1169
|
+
}, [b("input", {
|
|
1161
1170
|
type: "checkbox",
|
|
1162
1171
|
class: "custom-control-input",
|
|
1163
1172
|
id: o,
|
|
1164
1173
|
value: n.value,
|
|
1165
1174
|
checked: n.modelValue,
|
|
1166
1175
|
disabled: n.disabled
|
|
1167
|
-
}, null),
|
|
1176
|
+
}, null), b("div", {
|
|
1168
1177
|
class: "custom-control-label"
|
|
1169
1178
|
}, null)]);
|
|
1170
1179
|
}
|
|
1171
1180
|
});
|
|
1172
|
-
|
|
1173
|
-
n.component(
|
|
1181
|
+
x.install = (n) => {
|
|
1182
|
+
n.component(x.name, x), n.component(q.name, q);
|
|
1174
1183
|
};
|
|
1175
|
-
|
|
1176
|
-
n["check-box"] =
|
|
1184
|
+
x.register = (n, e, t, o) => {
|
|
1185
|
+
n["check-box"] = q, e["check-box"] = R, n["check-group"] = x, e["check-group"] = K;
|
|
1177
1186
|
};
|
|
1178
|
-
|
|
1179
|
-
n["check-box"] =
|
|
1187
|
+
x.registerDesigner = (n, e, t) => {
|
|
1188
|
+
n["check-box"] = Le, e["check-box"] = R, n["check-group"] = We, e["check-group"] = K;
|
|
1180
1189
|
};
|
|
1181
1190
|
export {
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1191
|
+
q as FCheckBox,
|
|
1192
|
+
x as FCheckBoxGroup,
|
|
1193
|
+
K as checkBoxGroupPropsResolver,
|
|
1194
|
+
L as checkBoxProps,
|
|
1195
|
+
R as checkBoxPropsResolver,
|
|
1196
|
+
_ as checkboxGroupProps,
|
|
1197
|
+
x as default
|
|
1189
1198
|
};
|