@farris/ui-vue 1.3.1 → 1.3.3
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 +103 -99
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +301 -351
- package/components/avatar/index.umd.cjs +1 -1
- package/components/binding-selector/index.esm.js +444 -0
- package/components/binding-selector/index.umd.cjs +1 -0
- package/components/binding-selector/package.json +8 -0
- package/components/border-editor/index.esm.js +5 -3
- package/components/border-editor/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +143 -139
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +407 -396
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +266 -255
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +628 -641
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +379 -374
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +471 -471
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +155 -148
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +487 -478
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +330 -279
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1171 -1277
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +220 -204
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4743 -4641
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +2916 -3019
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2375 -2590
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +9518 -1198
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +2 -1
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +34 -38
- package/components/drawer/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +149 -138
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1602 -1740
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +159 -151
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +218 -218
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +311 -0
- package/components/event-parameter/index.umd.cjs +1 -0
- package/components/event-parameter/package.json +8 -0
- package/components/events-editor/index.css +1 -1
- package/components/events-editor/index.esm.js +533 -563
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +95 -91
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +2356 -2455
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +3048 -3308
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +10537 -3249
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +9781 -1327
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +353 -341
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +510 -827
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +278 -268
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +144 -136
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +2139 -2237
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +6414 -6367
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +5216 -5114
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +252 -252
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +70 -70
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +486 -984
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +446 -498
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +363 -388
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1050 -1308
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +134 -131
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1072 -1082
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +412 -910
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +214 -203
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1361 -1536
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +650 -677
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +12344 -5048
- package/components/query-solution/index.umd.cjs +6 -1
- package/components/radio-button/index.esm.js +97 -97
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.css +1 -1
- package/components/radio-group/index.esm.js +1821 -565
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +251 -244
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +151 -140
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +707 -676
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +719 -740
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +4977 -5249
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +145 -134
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +348 -337
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +141 -130
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +311 -301
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +231 -220
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +385 -432
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +1932 -1914
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +351 -340
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +209 -199
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +388 -415
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +619 -666
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +493 -486
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +3169 -3278
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2320 -2418
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +563 -554
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +287 -276
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +368 -324
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +498 -487
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +51302 -47651
- package/farris.all.umd.cjs +14 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/binding-selector/index.d.ts +55 -0
- package/types/binding-selector/src/binding-selector.component.d.ts +11 -0
- package/types/binding-selector/src/binding-selector.props.d.ts +52 -0
- package/types/binding-selector/src/components/binding-selector-container.component.d.ts +13 -0
- package/types/binding-selector/src/composition/use-field-selection.d.ts +9 -0
- package/types/combo-list/src/components/list-container.component.d.ts +6 -6
- package/types/combo-list/src/components/list-container.props.d.ts +1 -1
- package/types/combo-tree/src/components/tree-container.component.d.ts +5 -5
- package/types/common/entity/entity-schema.d.ts +26 -11
- package/types/common/index.d.ts +1 -0
- package/types/common/types.d.ts +2 -2
- package/types/condition/src/condition-fields.design.component.d.ts +18 -0
- package/types/condition/src/types.d.ts +6 -6
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +20 -0
- package/types/data-grid/src/{designer/data-grid-column.props.d.ts → data-grid-column.props.d.ts} +1 -1
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/grid-field-editor.component.d.ts +14 -14
- package/types/data-grid/src/schema/schema-resolver.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +2 -2
- package/types/date-picker/src/components/calendar/calendar.component.d.ts +3 -3
- package/types/date-picker/src/components/month/month.component.d.ts +3 -3
- package/types/date-picker/src/components/year/year.component.d.ts +3 -3
- package/types/designer-canvas/index.d.ts +2 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/function/drag-resolve.d.ts +5 -0
- package/types/designer-canvas/src/composition/types.d.ts +49 -40
- package/types/designer-canvas/src/types.d.ts +8 -20
- package/types/dynamic-form/index.d.ts +1 -1
- package/types/dynamic-form/src/designer/form-group-use-designer-rules.d.ts +3 -0
- package/types/dynamic-form/src/schema/{schema-resolver.d.ts → response-form-schema-resolver.d.ts} +1 -1
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +5 -0
- package/types/dynamic-resolver/src/converter/row-number.converter.d.ts +3 -0
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +7 -0
- package/types/entity-binding-selector/entity-binding-selector.component.d.ts +11 -0
- package/types/entity-binding-selector/entity-binding-selector.props.d.ts +3 -0
- package/types/enum-editor/src/components/enum-editor-container.component.d.ts +3 -3
- package/types/enum-editor/src/enum-editor.component.d.ts +3 -3
- package/types/event-parameter/index.d.ts +31 -0
- package/types/event-parameter/src/composition/type.d.ts +77 -0
- package/types/event-parameter/src/composition/use-editor-combotree.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-input.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-select.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-switch.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor.d.ts +3 -0
- package/types/event-parameter/src/event-parameter.component.d.ts +8 -0
- package/types/event-parameter/src/event-parameter.props.d.ts +34 -0
- package/types/external-container/src/designer/import-external-schema.component.d.ts +1 -1
- package/types/field-selector/src/field-selector.component.d.ts +1 -2
- package/types/field-selector/src/field-selector.props.d.ts +0 -9
- package/types/input-group/src/designer/use-input-group-rules.d.ts +1 -2
- package/types/list-view/src/designer/list-view-table.design.component.d.ts +15 -0
- package/types/list-view/src/list-view-table.component.d.ts +15 -0
- package/types/lookup/src/composition/use-user-data.d.ts +2 -2
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -6
- package/types/modal/src/composition/modal.service.d.ts +2 -1
- package/types/page-header/src/designer/page-header.design.component.d.ts +1 -1
- package/types/page-header/src/page-header.component.d.ts +1 -1
- package/types/property-panel/index.d.ts +2 -1
- package/types/property-panel/src/composition/entity/property-entity.d.ts +1 -1
- package/types/property-panel/src/composition/type.d.ts +0 -13
- package/types/query-solution/src/composition/types.d.ts +35 -4
- package/types/query-solution/src/composition/use-header.d.ts +21 -0
- package/types/query-solution/src/composition/{use-filter.d.ts → use-http.d.ts} +2 -2
- package/types/query-solution/src/composition/use-solution.d.ts +20 -0
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +17 -16
- package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +14 -14
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +3 -51
- package/types/query-solution/src/query-solution.d.ts +10 -2
- package/types/radio-group/src/designer/item-collection-editor-inner.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.props.d.ts +21 -0
- package/types/radio-group/src/schema/schema-mapper.d.ts +1 -0
- package/types/radio-group/src/schema/schema-resolver.d.ts +1 -0
- package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -0
- package/types/section/src/property-config/section.property-config.d.ts +17 -17
- package/types/section/src/schema/schema-resolver.d.ts +1 -2
- package/types/section/src/schema/toolbar-resolver.d.ts +1 -1
- package/types/tabs/src/composition/types.d.ts +4 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +9 -59
- package/types/tabs/src/property-config/tabs.property-config.d.ts +8 -71
- package/types/tabs/src/schema/schema-resolver.d.ts +1 -2
- package/types/text/src/composition/types.d.ts +4 -4
- package/types/textarea/src/property-config/textarea.property-config.d.ts +23 -0
- package/types/weather/src/composition/use-weather-charts.d.ts +15 -0
- package/types/weather/src/composition/use-weather-color.d.ts +15 -0
- package/types/weather/src/composition/use-weather-data.d.ts +15 -0
- package/types/weather/src/composition/use-weather-format-number.d.ts +15 -0
- package/types/property-panel/src/composition/entity/use-input-rules.d.ts +0 -3
- package/types/tree-grid/src/schema/column-resolver.d.ts +0 -3
- package/types/weather/src/composition/types.d.ts +0 -2
- /package/types/dynamic-form/src/designer/{use-designer-rules.d.ts → response-form-use-designer-rules.d.ts} +0 -0
- /package/types/dynamic-form/src/property-config/{form.property-config.d.ts → response-form.property-config.d.ts} +0 -0
|
@@ -1,94 +1,98 @@
|
|
|
1
1
|
var j = Object.defineProperty;
|
|
2
|
-
var O = (i,
|
|
3
|
-
var f = (i,
|
|
2
|
+
var O = (i, o, e) => o in i ? j(i, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[o] = e;
|
|
3
|
+
var f = (i, o, e) => O(i, typeof o != "symbol" ? o + "" : o, e);
|
|
4
4
|
import { ref as I, computed as B, defineComponent as x, createVNode as b, inject as P, onMounted as Z } from "vue";
|
|
5
|
-
import { isPlainObject as V, cloneDeep as
|
|
5
|
+
import { isPlainObject as V, cloneDeep as N } from "lodash-es";
|
|
6
6
|
import { resolveAppearance as z } from "../dynamic-resolver/index.esm.js";
|
|
7
|
-
import { DgControl as
|
|
7
|
+
import { DgControl as L, useDesignerComponent as K } from "../designer-canvas/index.esm.js";
|
|
8
8
|
import { withInstall as J } from "../common/index.esm.js";
|
|
9
9
|
const X = {}, Y = {};
|
|
10
|
-
function
|
|
11
|
-
const { properties:
|
|
12
|
-
|
|
10
|
+
function D(i) {
|
|
11
|
+
const { properties: o, title: e, ignore: n } = i, r = n && Array.isArray(n), s = Object.keys(o).reduce((l, m) => ((!r || !n.find((y) => y === m)) && (l[m] = o[m].type === "object" && o[m].properties ? D(o[m]) : N(o[m].default)), l), {});
|
|
12
|
+
if (e && (!r || !n.find((l) => l === "id"))) {
|
|
13
|
+
const l = e.toLowerCase().replace(/-/g, "_");
|
|
14
|
+
s.id = `${l}_${Math.random().toString().slice(2, 6)}`;
|
|
15
|
+
}
|
|
16
|
+
return s;
|
|
13
17
|
}
|
|
14
|
-
function $(i,
|
|
15
|
-
const e =
|
|
16
|
-
return Object.keys(
|
|
18
|
+
function $(i, o) {
|
|
19
|
+
const e = D(o);
|
|
20
|
+
return Object.keys(e).reduce((n, r) => (n[r] && V(n[r]) && V(i[r] || !i[r]) ? Object.assign(n[r], i[r] || {}) : n[r] = i[r], n), e), e;
|
|
17
21
|
}
|
|
18
|
-
function _(i,
|
|
19
|
-
return Object.keys(i).filter((n) => i[n] != null).reduce((n,
|
|
20
|
-
if (
|
|
21
|
-
const
|
|
22
|
-
if (typeof
|
|
23
|
-
n[
|
|
22
|
+
function _(i, o) {
|
|
23
|
+
return Object.keys(i).filter((n) => i[n] != null).reduce((n, r) => {
|
|
24
|
+
if (o.has(r)) {
|
|
25
|
+
const s = o.get(r);
|
|
26
|
+
if (typeof s == "string")
|
|
27
|
+
n[s] = i[r];
|
|
24
28
|
else {
|
|
25
|
-
const
|
|
26
|
-
Object.assign(n,
|
|
29
|
+
const l = s(r, i[r], i);
|
|
30
|
+
Object.assign(n, l);
|
|
27
31
|
}
|
|
28
32
|
} else
|
|
29
|
-
n[
|
|
33
|
+
n[r] = i[r];
|
|
30
34
|
return n;
|
|
31
35
|
}, {});
|
|
32
36
|
}
|
|
33
|
-
function ee(i,
|
|
34
|
-
const n = $(i,
|
|
37
|
+
function ee(i, o, e = /* @__PURE__ */ new Map()) {
|
|
38
|
+
const n = $(i, o);
|
|
35
39
|
return _(n, e);
|
|
36
40
|
}
|
|
37
41
|
function te(i = {}) {
|
|
38
|
-
function
|
|
42
|
+
function o(a, d, t, p) {
|
|
39
43
|
if (typeof t == "number")
|
|
40
44
|
return p[a].length === t;
|
|
41
45
|
if (typeof t == "object") {
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
44
|
-
return Number(p[a].length) !== Number(
|
|
45
|
-
if (
|
|
46
|
-
return Number(p[a].length) >= Number(
|
|
47
|
-
if (
|
|
48
|
-
return Number(p[a].length) <= Number(
|
|
46
|
+
const c = Object.keys(t)[0], A = t[c];
|
|
47
|
+
if (c === "not")
|
|
48
|
+
return Number(p[a].length) !== Number(A);
|
|
49
|
+
if (c === "moreThan")
|
|
50
|
+
return Number(p[a].length) >= Number(A);
|
|
51
|
+
if (c === "lessThan")
|
|
52
|
+
return Number(p[a].length) <= Number(A);
|
|
49
53
|
}
|
|
50
54
|
return !1;
|
|
51
55
|
}
|
|
52
|
-
function e(a,
|
|
56
|
+
function e(a, d, t, p) {
|
|
53
57
|
return p[a] && p[a].propertyValue && String(p[a].propertyValue.value) === String(t);
|
|
54
58
|
}
|
|
55
59
|
const n = /* @__PURE__ */ new Map([
|
|
56
|
-
["length",
|
|
60
|
+
["length", o],
|
|
57
61
|
["getProperty", e]
|
|
58
62
|
]);
|
|
59
|
-
Object.keys(i).reduce((a,
|
|
60
|
-
function
|
|
63
|
+
Object.keys(i).reduce((a, d) => (a.set(d, i[d]), a), n);
|
|
64
|
+
function r(a, d) {
|
|
61
65
|
const t = a;
|
|
62
|
-
return typeof
|
|
66
|
+
return typeof d == "number" ? [{ target: t, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: t, operator: "getProperty", param: a, value: !!d }] : typeof d == "object" ? Object.keys(d).map((p) => {
|
|
63
67
|
if (p === "length")
|
|
64
|
-
return { target: t, operator: "length", param: null, value:
|
|
65
|
-
const
|
|
66
|
-
return { target: t, operator: "getProperty", param:
|
|
68
|
+
return { target: t, operator: "length", param: null, value: d[p] };
|
|
69
|
+
const c = p, A = d[p];
|
|
70
|
+
return { target: t, operator: "getProperty", param: c, value: A };
|
|
67
71
|
}) : [];
|
|
68
72
|
}
|
|
69
|
-
function
|
|
73
|
+
function s(a) {
|
|
70
74
|
return Object.keys(a).reduce((t, p) => {
|
|
71
|
-
const
|
|
72
|
-
return t.push(...
|
|
75
|
+
const c = r(p, a[p]);
|
|
76
|
+
return t.push(...c), t;
|
|
73
77
|
}, []);
|
|
74
78
|
}
|
|
75
|
-
function
|
|
79
|
+
function l(a, d) {
|
|
76
80
|
if (n.has(a.operator)) {
|
|
77
81
|
const t = n.get(a.operator);
|
|
78
|
-
return t && t(a.target, a.param, a.value,
|
|
82
|
+
return t && t(a.target, a.param, a.value, d) || !1;
|
|
79
83
|
}
|
|
80
84
|
return !1;
|
|
81
85
|
}
|
|
82
|
-
function
|
|
83
|
-
return
|
|
86
|
+
function m(a, d) {
|
|
87
|
+
return s(a).reduce((c, A) => c && l(A, d), !0);
|
|
84
88
|
}
|
|
85
|
-
function
|
|
86
|
-
const t = Object.keys(a), p = t.includes("allOf"),
|
|
89
|
+
function y(a, d) {
|
|
90
|
+
const t = Object.keys(a), p = t.includes("allOf"), c = t.includes("anyOf"), A = p || c, v = (A ? a[A ? p ? "allOf" : "anyOf" : "allOf"] : [a]).map((k) => m(k, d));
|
|
87
91
|
return p ? !v.includes(!1) : v.includes(!0);
|
|
88
92
|
}
|
|
89
|
-
return { parseValueSchema:
|
|
93
|
+
return { parseValueSchema: y };
|
|
90
94
|
}
|
|
91
|
-
const
|
|
95
|
+
const u = {
|
|
92
96
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
93
97
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
94
98
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -126,17 +130,18 @@ const A = {
|
|
|
126
130
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
127
131
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
128
132
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
129
|
-
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
130
|
-
|
|
133
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
|
|
134
|
+
"query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
|
|
135
|
+
}, ne = {}, re = {};
|
|
131
136
|
te();
|
|
132
|
-
function
|
|
133
|
-
return X[
|
|
134
|
-
const
|
|
135
|
-
return Object.assign(
|
|
137
|
+
function oe(i, o, e = /* @__PURE__ */ new Map(), n = (l, m, y, a) => m, r = {}, s = (l) => l) {
|
|
138
|
+
return X[o.title] = o, Y[o.title] = n, ne[o.title] = r, re[o.title] = s, (l = {}) => {
|
|
139
|
+
const m = ee(l, o, e), y = Object.keys(i).reduce((a, d) => (a[d] = i[d].default, a), {});
|
|
140
|
+
return Object.assign(y, m);
|
|
136
141
|
};
|
|
137
142
|
}
|
|
138
|
-
function ie(i,
|
|
139
|
-
return
|
|
143
|
+
function ie(i, o, e) {
|
|
144
|
+
return o;
|
|
140
145
|
}
|
|
141
146
|
const ae = /* @__PURE__ */ new Map([
|
|
142
147
|
["appearance", z]
|
|
@@ -208,8 +213,9 @@ const ae = /* @__PURE__ */ new Map([
|
|
|
208
213
|
], me = [
|
|
209
214
|
"id",
|
|
210
215
|
"appearance",
|
|
211
|
-
"binding"
|
|
212
|
-
|
|
216
|
+
"binding",
|
|
217
|
+
"visible"
|
|
218
|
+
], ye = {
|
|
213
219
|
$schema: se,
|
|
214
220
|
$id: le,
|
|
215
221
|
title: ce,
|
|
@@ -218,7 +224,7 @@ const ae = /* @__PURE__ */ new Map([
|
|
|
218
224
|
properties: ue,
|
|
219
225
|
required: Ae,
|
|
220
226
|
ignore: me
|
|
221
|
-
},
|
|
227
|
+
}, T = {
|
|
222
228
|
/**
|
|
223
229
|
* 头像宽度
|
|
224
230
|
*/
|
|
@@ -255,66 +261,66 @@ const ae = /* @__PURE__ */ new Map([
|
|
|
255
261
|
* 支持的头像类型
|
|
256
262
|
*/
|
|
257
263
|
imageType: { type: Array, default: ["jpeg"] }
|
|
258
|
-
},
|
|
259
|
-
function
|
|
260
|
-
const
|
|
261
|
-
function
|
|
262
|
-
return
|
|
264
|
+
}, H = oe(T, ye, ae, ie);
|
|
265
|
+
function q(i, o, e, n) {
|
|
266
|
+
const r = "data:image/jpeg;base64,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", s = I(i.readonly);
|
|
267
|
+
function l(c) {
|
|
268
|
+
return c.match(/\.(jpeg|jpg|gif|png|svg|bmp|webp)$/) != null;
|
|
263
269
|
}
|
|
264
|
-
function
|
|
265
|
-
return
|
|
270
|
+
function m(c) {
|
|
271
|
+
return c.indexOf("data:image/") > -1;
|
|
266
272
|
}
|
|
267
|
-
function
|
|
268
|
-
return
|
|
273
|
+
function y(c) {
|
|
274
|
+
return c ? "data:image/jpeg;base64," + c : "";
|
|
269
275
|
}
|
|
270
276
|
const a = B(() => {
|
|
271
|
-
var
|
|
277
|
+
var A;
|
|
272
278
|
if (!i.imageType || !i.imageType.length)
|
|
273
279
|
return "";
|
|
274
|
-
const
|
|
275
|
-
return !
|
|
276
|
-
}),
|
|
277
|
-
const
|
|
278
|
-
return
|
|
279
|
-
}), t = B(() =>
|
|
280
|
+
const c = (A = i.imageType) == null ? void 0 : A.map((g) => (g === "jpg" && (g = "jpeg"), `image/${g}`));
|
|
281
|
+
return !c || !c.length ? "image/*" : c.join(",");
|
|
282
|
+
}), d = B(() => {
|
|
283
|
+
const c = n.value || i.cover || r;
|
|
284
|
+
return l(c) || m(c) ? c : y(c);
|
|
285
|
+
}), t = B(() => s.value ? "" : i.title);
|
|
280
286
|
function p() {
|
|
281
|
-
|
|
287
|
+
s.value || e && e.value && e.value.click();
|
|
282
288
|
}
|
|
283
|
-
return { acceptTypes: a, imageSource:
|
|
289
|
+
return { acceptTypes: a, imageSource: d, imageTitle: t, onClickImage: p };
|
|
284
290
|
}
|
|
285
|
-
const
|
|
291
|
+
const E = /* @__PURE__ */ x({
|
|
286
292
|
name: "FAvatar",
|
|
287
|
-
props:
|
|
293
|
+
props: T,
|
|
288
294
|
emits: ["change", "update:modelValue"],
|
|
289
|
-
setup(i,
|
|
295
|
+
setup(i, o) {
|
|
290
296
|
const e = B(() => ({
|
|
291
297
|
"f-avatar": !0,
|
|
292
298
|
"f-avatar-readonly": i.readonly,
|
|
293
299
|
"f-avatar-circle": i.shape === "circle",
|
|
294
300
|
"f-avatar-square": i.shape === "square"
|
|
295
|
-
})), n = I(i.modelValue),
|
|
301
|
+
})), n = I(i.modelValue), r = B(() => ({
|
|
296
302
|
width: i.avatarWidth + "px",
|
|
297
303
|
height: i.avatarHeight + "px"
|
|
298
|
-
})),
|
|
299
|
-
function
|
|
304
|
+
})), s = !1;
|
|
305
|
+
function l() {
|
|
300
306
|
return "";
|
|
301
307
|
}
|
|
302
|
-
function
|
|
308
|
+
function m() {
|
|
303
309
|
}
|
|
304
|
-
const
|
|
310
|
+
const y = I(null), {
|
|
305
311
|
acceptTypes: a,
|
|
306
|
-
imageSource:
|
|
312
|
+
imageSource: d,
|
|
307
313
|
onClickImage: t
|
|
308
|
-
} =
|
|
314
|
+
} = q(i, o, y, n);
|
|
309
315
|
return () => b("div", {
|
|
310
316
|
class: e.value,
|
|
311
|
-
style:
|
|
317
|
+
style: r.value,
|
|
312
318
|
onClick: t
|
|
313
|
-
}, [
|
|
319
|
+
}, [s, b("img", {
|
|
314
320
|
title: i.title,
|
|
315
321
|
class: "f-avatar-image",
|
|
316
|
-
src:
|
|
317
|
-
onError:
|
|
322
|
+
src: d.value,
|
|
323
|
+
onError: l
|
|
318
324
|
}, null), !i.readonly && b("div", {
|
|
319
325
|
class: "f-avatar-icon"
|
|
320
326
|
}, [b("span", {
|
|
@@ -325,47 +331,13 @@ const F = /* @__PURE__ */ x({
|
|
|
325
331
|
type: "file",
|
|
326
332
|
class: "f-avatar-upload",
|
|
327
333
|
accept: a.value,
|
|
328
|
-
onChange:
|
|
334
|
+
onChange: m,
|
|
329
335
|
style: "display: none;"
|
|
330
336
|
}, null)]);
|
|
331
337
|
}
|
|
332
338
|
});
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
const e = I(!0), n = I(!0);
|
|
336
|
-
function o(t) {
|
|
337
|
-
return !1;
|
|
338
|
-
}
|
|
339
|
-
function c() {
|
|
340
|
-
return !1;
|
|
341
|
-
}
|
|
342
|
-
function d() {
|
|
343
|
-
return !1;
|
|
344
|
-
}
|
|
345
|
-
function g() {
|
|
346
|
-
return !0;
|
|
347
|
-
}
|
|
348
|
-
function m(t) {
|
|
349
|
-
}
|
|
350
|
-
function a() {
|
|
351
|
-
}
|
|
352
|
-
function l(t) {
|
|
353
|
-
return null;
|
|
354
|
-
}
|
|
355
|
-
return {
|
|
356
|
-
canAccepts: o,
|
|
357
|
-
checkCanDeleteComponent: c,
|
|
358
|
-
checkCanMoveComponent: d,
|
|
359
|
-
hideNestedPaddingInDesginerView: g,
|
|
360
|
-
onAcceptMovedChildElement: m,
|
|
361
|
-
resolveComponentContext: a,
|
|
362
|
-
triggerBelongedComponentToMoveWhenMoved: e,
|
|
363
|
-
triggerBelongedComponentToDeleteWhenDeleted: n,
|
|
364
|
-
getPropsConfig: l
|
|
365
|
-
};
|
|
366
|
-
}
|
|
367
|
-
class fe {
|
|
368
|
-
constructor(r, e) {
|
|
339
|
+
class ge {
|
|
340
|
+
constructor(o, e) {
|
|
369
341
|
f(this, "componentId");
|
|
370
342
|
f(this, "viewModelId");
|
|
371
343
|
f(this, "eventsEditorUtils");
|
|
@@ -382,25 +354,26 @@ class fe {
|
|
|
382
354
|
categories: {}
|
|
383
355
|
});
|
|
384
356
|
var n;
|
|
385
|
-
this.componentId =
|
|
357
|
+
this.componentId = o, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((n = this.formSchemaUtils) == null ? void 0 : n.getViewModelIdByComponentId(o)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
|
|
386
358
|
}
|
|
387
359
|
getTableInfo() {
|
|
388
|
-
var
|
|
389
|
-
return (
|
|
360
|
+
var o;
|
|
361
|
+
return (o = this.schemaService) == null ? void 0 : o.getTableInfoByViewModelId(this.viewModelId);
|
|
390
362
|
}
|
|
391
|
-
setDesignViewModelField(
|
|
392
|
-
|
|
363
|
+
setDesignViewModelField(o) {
|
|
364
|
+
var n;
|
|
365
|
+
const e = o.binding && o.binding.type === "Form" && o.binding.field;
|
|
393
366
|
if (e) {
|
|
394
367
|
if (!this.designViewModelField) {
|
|
395
|
-
const
|
|
396
|
-
this.designViewModelField =
|
|
368
|
+
const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
369
|
+
this.designViewModelField = r.fields.find((s) => s.id === e);
|
|
397
370
|
}
|
|
398
|
-
|
|
371
|
+
o.updateOn = (n = this.designViewModelField) == null ? void 0 : n.updateOn;
|
|
399
372
|
}
|
|
400
373
|
}
|
|
401
|
-
changeFieldEditorType(
|
|
374
|
+
changeFieldEditorType(o, e) {
|
|
402
375
|
}
|
|
403
|
-
getBasicPropConfig(
|
|
376
|
+
getBasicPropConfig(o) {
|
|
404
377
|
return {
|
|
405
378
|
description: "Basic Information",
|
|
406
379
|
title: "基本信息",
|
|
@@ -419,13 +392,13 @@ class fe {
|
|
|
419
392
|
type: "combo-list",
|
|
420
393
|
textField: "name",
|
|
421
394
|
valueField: "value",
|
|
422
|
-
data: [{ value:
|
|
395
|
+
data: [{ value: o.type, name: u[o.type].name }]
|
|
423
396
|
}
|
|
424
397
|
}
|
|
425
398
|
}
|
|
426
399
|
};
|
|
427
400
|
}
|
|
428
|
-
getAppearanceConfig(
|
|
401
|
+
getAppearanceConfig(o = null) {
|
|
429
402
|
return {
|
|
430
403
|
title: "样式",
|
|
431
404
|
description: "Appearance",
|
|
@@ -451,87 +424,87 @@ class fe {
|
|
|
451
424
|
* @param componentInstance
|
|
452
425
|
* @returns
|
|
453
426
|
*/
|
|
454
|
-
updateElementByParentContainer(
|
|
427
|
+
updateElementByParentContainer(o, e) {
|
|
455
428
|
const n = e && e.parent && e.parent.schema;
|
|
456
429
|
if (!n)
|
|
457
430
|
return;
|
|
458
|
-
const
|
|
459
|
-
n.contents.splice(
|
|
431
|
+
const r = n.contents.findIndex((l) => l.id === o), s = N(n.contents[r]);
|
|
432
|
+
n.contents.splice(r, 1), n.contents.splice(r, 0, s);
|
|
460
433
|
}
|
|
461
434
|
}
|
|
462
|
-
const
|
|
435
|
+
const S = class S {
|
|
463
436
|
/**
|
|
464
437
|
* 根据绑定字段类型获取可用的输入类控件
|
|
465
438
|
*/
|
|
466
|
-
static getEditorTypesByMDataType(
|
|
467
|
-
const e =
|
|
439
|
+
static getEditorTypesByMDataType(o) {
|
|
440
|
+
const e = S.fieldControlTypeMapping[o];
|
|
468
441
|
return e || [{ key: "", value: "" }];
|
|
469
442
|
}
|
|
470
443
|
/**
|
|
471
444
|
* 获取所有输入类控件
|
|
472
445
|
*/
|
|
473
446
|
static getAllInputTypes() {
|
|
474
|
-
const
|
|
475
|
-
for (
|
|
476
|
-
|
|
477
|
-
|
|
447
|
+
const o = [];
|
|
448
|
+
for (const e in S.fieldControlTypeMapping)
|
|
449
|
+
S.fieldControlTypeMapping[e].forEach((n) => {
|
|
450
|
+
o.find((r) => r.key === n.key && r.value === n.value) || o.push({ key: n.key, value: n.value });
|
|
478
451
|
});
|
|
479
|
-
return
|
|
452
|
+
return o;
|
|
480
453
|
}
|
|
481
454
|
};
|
|
482
455
|
/**
|
|
483
456
|
* <字段类型,可配置的控件类型列表>的映射
|
|
484
457
|
*/
|
|
485
|
-
f(
|
|
458
|
+
f(S, "fieldControlTypeMapping", {
|
|
486
459
|
String: [
|
|
487
|
-
{ key:
|
|
488
|
-
{ key:
|
|
489
|
-
{ key:
|
|
490
|
-
{ key:
|
|
491
|
-
{ key:
|
|
492
|
-
{ key:
|
|
493
|
-
{ key:
|
|
494
|
-
{ key:
|
|
460
|
+
{ key: u["input-group"].type, value: u["input-group"].name },
|
|
461
|
+
{ key: u.lookup.type, value: u.lookup.name },
|
|
462
|
+
{ key: u["date-picker"].type, value: u["date-picker"].name },
|
|
463
|
+
{ key: u["check-box"].type, value: u["check-box"].name },
|
|
464
|
+
{ key: u["check-group"].type, value: u["check-group"].name },
|
|
465
|
+
{ key: u["radio-group"].type, value: u["radio-group"].name },
|
|
466
|
+
{ key: u["combo-list"].type, value: u["combo-list"].name },
|
|
467
|
+
{ key: u.textarea.type, value: u.textarea.name }
|
|
495
468
|
],
|
|
496
469
|
Text: [
|
|
497
|
-
{ key:
|
|
498
|
-
{ key:
|
|
470
|
+
{ key: u.textarea.type, value: u.textarea.name },
|
|
471
|
+
{ key: u.lookup.type, value: u.lookup.name }
|
|
499
472
|
],
|
|
500
473
|
Decimal: [
|
|
501
|
-
{ key:
|
|
474
|
+
{ key: u["number-spinner"].type, value: u["number-spinner"].name }
|
|
502
475
|
],
|
|
503
476
|
Integer: [
|
|
504
|
-
{ key:
|
|
477
|
+
{ key: u["number-spinner"].type, value: u["number-spinner"].name }
|
|
505
478
|
],
|
|
506
479
|
Number: [
|
|
507
|
-
{ key:
|
|
480
|
+
{ key: u["number-spinner"].type, value: u["number-spinner"].name }
|
|
508
481
|
],
|
|
509
482
|
BigNumber: [
|
|
510
|
-
{ key:
|
|
483
|
+
{ key: u["number-spinner"].type, value: u["number-spinner"].name }
|
|
511
484
|
],
|
|
512
485
|
Date: [
|
|
513
|
-
{ key:
|
|
486
|
+
{ key: u["date-picker"].type, value: u["date-picker"].name }
|
|
514
487
|
],
|
|
515
488
|
DateTime: [
|
|
516
|
-
{ key:
|
|
489
|
+
{ key: u["date-picker"].type, value: u["date-picker"].name }
|
|
517
490
|
],
|
|
518
491
|
Boolean: [
|
|
519
|
-
{ key:
|
|
520
|
-
{ key:
|
|
492
|
+
{ key: u.switch.type, value: u.switch.name },
|
|
493
|
+
{ key: u["check-box"].type, value: u["check-box"].name }
|
|
521
494
|
],
|
|
522
495
|
Enum: [
|
|
523
|
-
{ key:
|
|
524
|
-
{ key:
|
|
496
|
+
{ key: u["combo-list"].type, value: u["combo-list"].name },
|
|
497
|
+
{ key: u["radio-group"].type, value: u["radio-group"].name }
|
|
525
498
|
],
|
|
526
499
|
Object: [
|
|
527
|
-
{ key:
|
|
528
|
-
{ key:
|
|
529
|
-
{ key:
|
|
500
|
+
{ key: u.lookup.type, value: u.lookup.name },
|
|
501
|
+
{ key: u["combo-list"].type, value: u["combo-list"].name },
|
|
502
|
+
{ key: u["radio-group"].type, value: u["radio-group"].name }
|
|
530
503
|
]
|
|
531
504
|
});
|
|
532
|
-
let
|
|
533
|
-
const
|
|
534
|
-
class
|
|
505
|
+
let w = S;
|
|
506
|
+
const fe = I(0);
|
|
507
|
+
class he {
|
|
535
508
|
constructor() {
|
|
536
509
|
/** 控件标题 */
|
|
537
510
|
f(this, "label", "");
|
|
@@ -561,97 +534,95 @@ class ve {
|
|
|
561
534
|
f(this, "fieldSetId", "");
|
|
562
535
|
}
|
|
563
536
|
}
|
|
564
|
-
function
|
|
565
|
-
let
|
|
537
|
+
function ve(i) {
|
|
538
|
+
let o, e;
|
|
566
539
|
const n = /* @__PURE__ */ new Map();
|
|
567
|
-
let
|
|
568
|
-
function
|
|
569
|
-
const
|
|
570
|
-
if (
|
|
540
|
+
let r = [];
|
|
541
|
+
function s(d, t) {
|
|
542
|
+
const c = d.split(" ").filter((C) => C.startsWith("col-"));
|
|
543
|
+
if (c.length === 0) {
|
|
571
544
|
t.isSupportedClass = !1;
|
|
572
545
|
return;
|
|
573
546
|
}
|
|
574
|
-
let
|
|
575
|
-
|
|
576
|
-
}
|
|
577
|
-
function d
|
|
578
|
-
let
|
|
579
|
-
|
|
580
|
-
if (
|
|
581
|
-
p += 1,
|
|
547
|
+
let A = c.find((C) => /^col-([1-9]|10|11|12)$/.test(C)), g = c.find((C) => /^col-md-([1-9]|10|11|12)$/.test(C)), h = c.find((C) => /^col-xl-([1-9]|10|11|12)$/.test(C)), v = c.find((C) => /^col-el-([1-9]|10|11|12)$/.test(C));
|
|
548
|
+
A = A || "col-12", t.columnInSM = parseInt(A.replace("col-", ""), 10), t.displayWidthInSM = t.columnInSM / 12, t.displayWidthInSM !== 1 && (t.isSupportedClass = !1), g = g || "col-md-" + t.columnInSM, t.columnInMD = parseInt(g.replace("col-md-", ""), 10), t.displayWidthInMD = t.columnInMD / 6, [1, 2].includes(t.displayWidthInMD) || (t.isSupportedClass = !1), h = h || "col-xl-" + t.columnInMD, t.columnInLG = parseInt(h.replace("col-xl-", ""), 10), t.displayWidthInLG = t.columnInLG / 3, [1, 2, 3, 4].includes(t.displayWidthInLG) || (t.isSupportedClass = !1), v = v || "col-el-" + t.columnInLG, t.columnInEL = parseInt(v.replace("col-el-", ""), 10), t.displayWidthInEL = t.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(t.displayWidthInEL) || (t.isSupportedClass = !1);
|
|
549
|
+
}
|
|
550
|
+
function l(d, t, p, c = !1) {
|
|
551
|
+
let A = !1;
|
|
552
|
+
d.contents.forEach((g) => {
|
|
553
|
+
if (g.type === "fieldset") {
|
|
554
|
+
p += 1, l(g, t, p, !0), A = !0;
|
|
582
555
|
return;
|
|
583
556
|
}
|
|
584
|
-
|
|
585
|
-
const h =
|
|
586
|
-
h ?
|
|
557
|
+
A && (p += 1, A = !1);
|
|
558
|
+
const h = g.appearance && g.appearance.class, v = new he();
|
|
559
|
+
h ? s(h, v) : v.isSupportedClass = !1, v.label = g.label || g.id, v.id = g.id, v.group = p, c && (v.fieldSetId = d.id), e === g.id && (o = p), n.set(g.id, g), t.push(v);
|
|
587
560
|
});
|
|
588
561
|
}
|
|
589
|
-
function
|
|
590
|
-
const t = i.getComponentById(
|
|
562
|
+
function m(d) {
|
|
563
|
+
const t = i.getComponentById(d);
|
|
591
564
|
if (!t || !t.componentType || !t.componentType.startsWith("form"))
|
|
592
565
|
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
593
|
-
const p = i.selectNode(t, (
|
|
566
|
+
const p = i.selectNode(t, (c) => c.type === L["response-form"].type);
|
|
594
567
|
return !p || !p.contents || p.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: p };
|
|
595
568
|
}
|
|
596
|
-
function
|
|
597
|
-
t = t ||
|
|
598
|
-
const { result: p, message:
|
|
569
|
+
function y(d, t) {
|
|
570
|
+
t = t || d.id;
|
|
571
|
+
const { result: p, message: c, formNode: A } = m(t);
|
|
599
572
|
if (!p)
|
|
600
|
-
return { result: p, message:
|
|
601
|
-
e =
|
|
602
|
-
const
|
|
603
|
-
|
|
604
|
-
const h =
|
|
573
|
+
return { result: p, message: c };
|
|
574
|
+
e = d.id, r = [], n.clear();
|
|
575
|
+
const g = A.contents[0].type === L.fieldset.type ? 0 : 1;
|
|
576
|
+
l(A, r, g);
|
|
577
|
+
const h = r.find((C) => !C.isSupportedClass);
|
|
605
578
|
return {
|
|
606
579
|
defaultState: {
|
|
607
|
-
defaultGroupNumber:
|
|
580
|
+
defaultGroupNumber: o || 1,
|
|
608
581
|
model: h ? "customize" : "standard"
|
|
609
582
|
},
|
|
610
|
-
importData:
|
|
583
|
+
importData: r
|
|
611
584
|
};
|
|
612
585
|
}
|
|
613
|
-
function a(
|
|
586
|
+
function a(d, t) {
|
|
614
587
|
t = t;
|
|
615
|
-
const { result: p, formNode:
|
|
588
|
+
const { result: p, formNode: c } = m(t);
|
|
616
589
|
if (!p)
|
|
617
590
|
return "";
|
|
618
|
-
const
|
|
619
|
-
return
|
|
591
|
+
const A = [];
|
|
592
|
+
return d.forEach((g) => {
|
|
620
593
|
var C;
|
|
621
|
-
const h = n.get(
|
|
594
|
+
const h = n.get(g.id), v = h.appearance && h.appearance.class;
|
|
622
595
|
if (v) {
|
|
623
|
-
const
|
|
596
|
+
const F = v.split(" ").filter((R) => !R.startsWith("col-")), M = "col-" + g.columnInSM, U = "col-md-" + g.columnInMD, Q = "col-xl-" + g.columnInLG, W = "col-el-" + g.columnInEL, G = [M, U, Q, W].concat(F);
|
|
624
597
|
h.appearance.class = G.join(" ");
|
|
625
598
|
}
|
|
626
|
-
if (
|
|
627
|
-
const k =
|
|
628
|
-
|
|
599
|
+
if (g.fieldSetId) {
|
|
600
|
+
const k = c.contents.find((M) => M.id === g.fieldSetId), F = A.find((M) => M.id === g.fieldSetId);
|
|
601
|
+
F ? (C = F.contents) == null || C.push(h) : (A.push(k), k.contents = [h]);
|
|
629
602
|
} else
|
|
630
|
-
|
|
631
|
-
}),
|
|
603
|
+
A.push(h);
|
|
604
|
+
}), c.contents = A, c.id;
|
|
632
605
|
}
|
|
633
606
|
return {
|
|
634
|
-
checkCanFindFormNode:
|
|
635
|
-
checkCanOpenLayoutEditor:
|
|
607
|
+
checkCanFindFormNode: m,
|
|
608
|
+
checkCanOpenLayoutEditor: y,
|
|
636
609
|
changeFormControlsByResponseLayoutConfig: a,
|
|
637
|
-
getResonseFormLayoutConfig:
|
|
610
|
+
getResonseFormLayoutConfig: l
|
|
638
611
|
};
|
|
639
612
|
}
|
|
640
|
-
class
|
|
613
|
+
class Ce extends ge {
|
|
641
614
|
constructor(e, n) {
|
|
642
615
|
super(e, n);
|
|
643
616
|
f(this, "responseLayoutEditorFunction");
|
|
644
|
-
this.responseLayoutEditorFunction =
|
|
617
|
+
this.responseLayoutEditorFunction = ve(this.formSchemaUtils);
|
|
645
618
|
}
|
|
646
619
|
getPropertyConfig(e, n) {
|
|
647
620
|
return this.propertyConfig.categories.basic = this.getBasicProperties(e, n), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, n), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
|
|
648
621
|
}
|
|
649
622
|
getBasicProperties(e, n) {
|
|
650
|
-
var
|
|
651
|
-
|
|
652
|
-
this.setDesignViewModelField(e)
|
|
653
|
-
const c = this.formSchemaUtils.getFormMetadataBasicInfo(), d = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
654
|
-
return {
|
|
623
|
+
var s;
|
|
624
|
+
const r = this;
|
|
625
|
+
return this.setDesignViewModelField(e), this.formSchemaUtils.getFormMetadataBasicInfo(), {
|
|
655
626
|
description: "Basic Information",
|
|
656
627
|
title: "基本信息",
|
|
657
628
|
properties: {
|
|
@@ -672,7 +643,7 @@ class be extends fe {
|
|
|
672
643
|
textField: "value",
|
|
673
644
|
valueField: "key",
|
|
674
645
|
editable: !1,
|
|
675
|
-
data:
|
|
646
|
+
data: r.designViewModelField ? w.getEditorTypesByMDataType((s = r.designViewModelField.type) == null ? void 0 : s.name) : w.getAllInputTypes()
|
|
676
647
|
}
|
|
677
648
|
},
|
|
678
649
|
label: {
|
|
@@ -683,33 +654,29 @@ class be extends fe {
|
|
|
683
654
|
binding: {
|
|
684
655
|
description: "绑定的表单字段",
|
|
685
656
|
title: "绑定",
|
|
686
|
-
$converter: "/converter/field-selector.converter",
|
|
687
657
|
editor: {
|
|
688
|
-
type: "
|
|
658
|
+
type: "binding-selector",
|
|
689
659
|
bindingType: { enable: !1 },
|
|
690
660
|
editorParams: {
|
|
691
|
-
|
|
692
|
-
|
|
661
|
+
componentSchema: e,
|
|
662
|
+
needSyncToViewModel: !0,
|
|
663
|
+
viewModelId: this.viewModelId,
|
|
664
|
+
designerHostService: this.designerHostService,
|
|
665
|
+
disableOccupiedFields: !0
|
|
693
666
|
},
|
|
694
|
-
|
|
695
|
-
{ field: "name", title: "字段名称" },
|
|
696
|
-
{ field: "bindingField", title: "绑定字段" },
|
|
697
|
-
{ field: "fieldType", title: "字段类型" }
|
|
698
|
-
],
|
|
699
|
-
textField: "bindingField",
|
|
700
|
-
data: d
|
|
667
|
+
textField: "bindingField"
|
|
701
668
|
}
|
|
702
669
|
}
|
|
703
670
|
},
|
|
704
|
-
setPropertyRelates(
|
|
705
|
-
if (
|
|
706
|
-
switch (
|
|
671
|
+
setPropertyRelates(l, m) {
|
|
672
|
+
if (l)
|
|
673
|
+
switch (l && l.propertyID) {
|
|
707
674
|
case "type": {
|
|
708
|
-
|
|
675
|
+
r.changeControlType(e, l, n);
|
|
709
676
|
break;
|
|
710
677
|
}
|
|
711
678
|
case "label": {
|
|
712
|
-
|
|
679
|
+
l.needRefreshControlTree = !0;
|
|
713
680
|
break;
|
|
714
681
|
}
|
|
715
682
|
}
|
|
@@ -717,7 +684,7 @@ class be extends fe {
|
|
|
717
684
|
};
|
|
718
685
|
}
|
|
719
686
|
getAppearanceProperties(e, n) {
|
|
720
|
-
|
|
687
|
+
const r = this;
|
|
721
688
|
return {
|
|
722
689
|
title: "样式",
|
|
723
690
|
description: "Appearance",
|
|
@@ -743,18 +710,18 @@ class be extends fe {
|
|
|
743
710
|
refreshPanelAfterChanged: !0,
|
|
744
711
|
editor: {
|
|
745
712
|
type: "response-layout-editor-setting",
|
|
746
|
-
initialState:
|
|
713
|
+
initialState: r.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, r.componentId)
|
|
747
714
|
}
|
|
748
715
|
}
|
|
749
716
|
},
|
|
750
|
-
setPropertyRelates(
|
|
751
|
-
if (
|
|
752
|
-
switch (
|
|
717
|
+
setPropertyRelates(s, l) {
|
|
718
|
+
if (s)
|
|
719
|
+
switch (s && s.propertyID) {
|
|
753
720
|
case "responseLayout":
|
|
754
|
-
|
|
721
|
+
r.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(s.propertyValue, r.componentId || e.id), r.updateUnifiedLayoutAfterResponseLayoutChanged(r.componentId), r.updateElementByParentContainer(e.id, n), delete e.responseLayout;
|
|
755
722
|
break;
|
|
756
723
|
case "class":
|
|
757
|
-
|
|
724
|
+
r.updateUnifiedLayoutAfterControlChanged(s.propertyValue, e.id, this.componentId), r.updateElementByParentContainer(e.id, n);
|
|
758
725
|
break;
|
|
759
726
|
}
|
|
760
727
|
}
|
|
@@ -768,44 +735,44 @@ class be extends fe {
|
|
|
768
735
|
* @param propertyData 控件DOM属性
|
|
769
736
|
* @param newControlType 新控件类型
|
|
770
737
|
*/
|
|
771
|
-
changeControlType(e, n,
|
|
772
|
-
var
|
|
773
|
-
const
|
|
774
|
-
if (!
|
|
738
|
+
changeControlType(e, n, r) {
|
|
739
|
+
var d, t, p, c;
|
|
740
|
+
const s = n.propertyValue, l = r && r.parent && r.parent.schema;
|
|
741
|
+
if (!l)
|
|
775
742
|
return;
|
|
776
|
-
const
|
|
743
|
+
const m = l.contents.findIndex((A) => A.id === e.id), y = l.contents[m];
|
|
777
744
|
let a;
|
|
778
745
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
779
746
|
editor: {
|
|
780
|
-
$type:
|
|
747
|
+
$type: s
|
|
781
748
|
},
|
|
782
749
|
name: this.designViewModelField.name,
|
|
783
750
|
require: this.designViewModelField.require,
|
|
784
751
|
readonly: this.designViewModelField.readonly
|
|
785
|
-
}, !1), a = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField,
|
|
786
|
-
id:
|
|
787
|
-
appearance:
|
|
788
|
-
size:
|
|
789
|
-
label:
|
|
790
|
-
binding:
|
|
791
|
-
visible:
|
|
752
|
+
}, !1), a = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, s)), a || (a = this.controlCreatorUtils.createFormGroupWithoutField(s)), Object.assign(a, {
|
|
753
|
+
id: y.id,
|
|
754
|
+
appearance: y.appearance,
|
|
755
|
+
size: y.size,
|
|
756
|
+
label: y.label,
|
|
757
|
+
binding: y.binding,
|
|
758
|
+
visible: y.visible
|
|
792
759
|
}), Object.assign(a.editor, {
|
|
793
|
-
isTextArea: a.isTextArea &&
|
|
794
|
-
placeholder: (
|
|
795
|
-
holdPlace: (t =
|
|
796
|
-
readonly: (p =
|
|
797
|
-
require: (
|
|
798
|
-
}),
|
|
799
|
-
(
|
|
800
|
-
),
|
|
801
|
-
}
|
|
802
|
-
getComponentConfig(e, n = {},
|
|
803
|
-
const
|
|
760
|
+
isTextArea: a.isTextArea && y.isTextArea,
|
|
761
|
+
placeholder: (d = y.editor) == null ? void 0 : d.placeholder,
|
|
762
|
+
holdPlace: (t = y.editor) == null ? void 0 : t.holdPlace,
|
|
763
|
+
readonly: (p = y.editor) == null ? void 0 : p.readonly,
|
|
764
|
+
require: (c = y.editor) == null ? void 0 : c.require
|
|
765
|
+
}), l.contents.splice(m, 1), l.contents.splice(m, 0, a), r.schema = Object.assign(y, a), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
766
|
+
(A) => A.classList.remove("dgComponentSelected")
|
|
767
|
+
), fe.value++;
|
|
768
|
+
}
|
|
769
|
+
getComponentConfig(e, n = {}, r = {}) {
|
|
770
|
+
const s = Object.assign({
|
|
804
771
|
description: "编辑器",
|
|
805
772
|
title: "编辑器",
|
|
806
773
|
type: "input-group",
|
|
807
774
|
$converter: "/converter/property-editor.converter"
|
|
808
|
-
}, n),
|
|
775
|
+
}, n), l = Object.assign({
|
|
809
776
|
readonly: {
|
|
810
777
|
description: "",
|
|
811
778
|
title: "只读",
|
|
@@ -826,8 +793,8 @@ class be extends fe {
|
|
|
826
793
|
title: "提示文本",
|
|
827
794
|
type: "string"
|
|
828
795
|
}
|
|
829
|
-
},
|
|
830
|
-
return { ...
|
|
796
|
+
}, r);
|
|
797
|
+
return { ...s, properties: { ...l } };
|
|
831
798
|
}
|
|
832
799
|
/**
|
|
833
800
|
* 修改某一输入控件的样式后更新Form的统一布局配置
|
|
@@ -835,18 +802,18 @@ class be extends fe {
|
|
|
835
802
|
* @param controlId 控件Id
|
|
836
803
|
* @param componentId 控件所在组件id
|
|
837
804
|
*/
|
|
838
|
-
updateUnifiedLayoutAfterControlChanged(e, n,
|
|
839
|
-
const
|
|
840
|
-
let
|
|
841
|
-
|
|
842
|
-
const
|
|
805
|
+
updateUnifiedLayoutAfterControlChanged(e, n, r) {
|
|
806
|
+
const s = e.split(" ");
|
|
807
|
+
let l = s.find((t) => /^col-([1-9]|10|11|12)$/.test(t)), m = s.find((t) => /^col-md-([1-9]|10|11|12)$/.test(t)), y = s.find((t) => /^col-xl-([1-9]|10|11|12)$/.test(t)), a = s.find((t) => /^col-el-([1-9]|10|11|12)$/.test(t));
|
|
808
|
+
l = l || "col-12", m = m || "col-md-" + l.replace("col-", ""), y = y || "col-xl-" + m.replace("col-md-", ""), a = a || "col-el-" + y.replace("col-xl-", "");
|
|
809
|
+
const d = {
|
|
843
810
|
id: n,
|
|
844
|
-
columnInSM: parseInt(
|
|
845
|
-
columnInMD: parseInt(
|
|
846
|
-
columnInLG: parseInt(
|
|
811
|
+
columnInSM: parseInt(l.replace("col-", ""), 10),
|
|
812
|
+
columnInMD: parseInt(m.replace("col-md-", ""), 10),
|
|
813
|
+
columnInLG: parseInt(y.replace("col-xl-", ""), 10),
|
|
847
814
|
columnInEL: parseInt(a.replace("col-el-", ""), 10)
|
|
848
815
|
};
|
|
849
|
-
this.updateUnifiedLayoutAfterResponseLayoutChanged(
|
|
816
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(r, d);
|
|
850
817
|
}
|
|
851
818
|
/**
|
|
852
819
|
* 修改控件布局配置后更新Form统一布局配置
|
|
@@ -854,20 +821,20 @@ class be extends fe {
|
|
|
854
821
|
* @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
|
|
855
822
|
*/
|
|
856
823
|
updateUnifiedLayoutAfterResponseLayoutChanged(e, n) {
|
|
857
|
-
const { formNode:
|
|
858
|
-
if (!
|
|
824
|
+
const { formNode: r } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
|
|
825
|
+
if (!r || !r.unifiedLayout)
|
|
859
826
|
return;
|
|
860
|
-
const
|
|
861
|
-
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(
|
|
862
|
-
const
|
|
863
|
-
Object.assign(
|
|
827
|
+
const s = [];
|
|
828
|
+
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(r, s, 1), n) {
|
|
829
|
+
const A = s.find((g) => g.id === n.id);
|
|
830
|
+
Object.assign(A || {}, n);
|
|
864
831
|
}
|
|
865
|
-
const
|
|
866
|
-
Object.assign(
|
|
867
|
-
uniqueColClassInSM:
|
|
832
|
+
const l = s.map((A) => A.columnInSM), m = s.map((A) => A.columnInMD), y = s.map((A) => A.columnInLG), a = s.map((A) => A.columnInEL), d = this.checkIsUniqueColumn(l) ? l[0] : null, t = this.checkIsUniqueColumn(m) ? m[0] : null, p = this.checkIsUniqueColumn(y) ? y[0] : null, c = this.checkIsUniqueColumn(a) ? a[0] : null;
|
|
833
|
+
Object.assign(r.unifiedLayout, {
|
|
834
|
+
uniqueColClassInSM: d,
|
|
868
835
|
uniqueColClassInMD: t,
|
|
869
836
|
uniqueColClassInLG: p,
|
|
870
|
-
uniqueColClassInEL:
|
|
837
|
+
uniqueColClassInEL: c
|
|
871
838
|
});
|
|
872
839
|
}
|
|
873
840
|
/**
|
|
@@ -878,11 +845,11 @@ class be extends fe {
|
|
|
878
845
|
return Array.from(n).length === 1;
|
|
879
846
|
}
|
|
880
847
|
}
|
|
881
|
-
class
|
|
882
|
-
constructor(
|
|
883
|
-
super(
|
|
848
|
+
class be extends Ce {
|
|
849
|
+
constructor(o, e) {
|
|
850
|
+
super(o, e);
|
|
884
851
|
}
|
|
885
|
-
getEditorProperties(
|
|
852
|
+
getEditorProperties(o) {
|
|
886
853
|
return {
|
|
887
854
|
description: "编辑器",
|
|
888
855
|
title: "编辑器",
|
|
@@ -913,69 +880,52 @@ class Ie extends be {
|
|
|
913
880
|
};
|
|
914
881
|
}
|
|
915
882
|
}
|
|
916
|
-
function
|
|
917
|
-
const
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
checkCanMoveComponent: o,
|
|
921
|
-
hideNestedPaddingInDesginerView: c,
|
|
922
|
-
onAcceptMovedChildElement: d,
|
|
923
|
-
resolveComponentContext: g,
|
|
924
|
-
triggerBelongedComponentToMoveWhenMoved: m,
|
|
925
|
-
triggerBelongedComponentToDeleteWhenDeleted: a
|
|
926
|
-
} = ye(i), l = i.schema;
|
|
927
|
-
function t(p, s) {
|
|
928
|
-
return new Ie(p, r).getPropertyConfig(l, s);
|
|
883
|
+
function Ie(i, o) {
|
|
884
|
+
const e = i.schema;
|
|
885
|
+
function n(r, s) {
|
|
886
|
+
return new be(r, o).getPropertyConfig(e, s);
|
|
929
887
|
}
|
|
930
888
|
return {
|
|
931
|
-
|
|
932
|
-
checkCanDeleteComponent: n,
|
|
933
|
-
checkCanMoveComponent: o,
|
|
934
|
-
hideNestedPaddingInDesginerView: c,
|
|
935
|
-
onAcceptMovedChildElement: d,
|
|
936
|
-
resolveComponentContext: g,
|
|
937
|
-
triggerBelongedComponentToMoveWhenMoved: m,
|
|
938
|
-
triggerBelongedComponentToDeleteWhenDeleted: a,
|
|
939
|
-
getPropsConfig: t
|
|
889
|
+
getPropsConfig: n
|
|
940
890
|
};
|
|
941
891
|
}
|
|
942
|
-
const
|
|
892
|
+
const Be = /* @__PURE__ */ x({
|
|
943
893
|
name: "FAvatarDesign",
|
|
944
|
-
props:
|
|
894
|
+
props: T,
|
|
945
895
|
emits: ["change", "update:modelValue"],
|
|
946
|
-
setup(i,
|
|
947
|
-
const e = I(), n = P("designer-host-service"),
|
|
896
|
+
setup(i, o) {
|
|
897
|
+
const e = I(), n = P("designer-host-service"), r = P("design-item-context"), s = Ie(r, n), l = K(e, r, s);
|
|
948
898
|
Z(() => {
|
|
949
|
-
e.value.componentInstance =
|
|
950
|
-
}),
|
|
951
|
-
const
|
|
899
|
+
e.value.componentInstance = l;
|
|
900
|
+
}), o.expose(l.value);
|
|
901
|
+
const m = B(() => ({
|
|
952
902
|
"f-avatar": !0,
|
|
953
903
|
"f-avatar-readonly": i.readonly,
|
|
954
904
|
"f-avatar-circle": i.shape === "circle",
|
|
955
905
|
"f-avatar-square": i.shape === "square"
|
|
956
|
-
})),
|
|
906
|
+
})), y = I(i.modelValue), a = B(() => ({
|
|
957
907
|
width: i.avatarWidth + "px",
|
|
958
908
|
height: i.avatarHeight + "px"
|
|
959
|
-
})),
|
|
909
|
+
})), d = !1;
|
|
960
910
|
function t() {
|
|
961
911
|
return "";
|
|
962
912
|
}
|
|
963
913
|
function p() {
|
|
964
914
|
}
|
|
965
|
-
const
|
|
966
|
-
acceptTypes:
|
|
967
|
-
imageSource:
|
|
915
|
+
const c = I(null), {
|
|
916
|
+
acceptTypes: A,
|
|
917
|
+
imageSource: g,
|
|
968
918
|
onClickImage: h
|
|
969
|
-
} =
|
|
919
|
+
} = q(i, o, c, y);
|
|
970
920
|
return () => b("div", {
|
|
971
921
|
ref: e,
|
|
972
|
-
class:
|
|
922
|
+
class: m.value,
|
|
973
923
|
style: a.value,
|
|
974
924
|
onClick: h
|
|
975
|
-
}, [
|
|
925
|
+
}, [d, b("img", {
|
|
976
926
|
title: i.title,
|
|
977
927
|
class: "f-avatar-image",
|
|
978
|
-
src:
|
|
928
|
+
src: g.value,
|
|
979
929
|
onError: t
|
|
980
930
|
}, null), !i.readonly && b("div", {
|
|
981
931
|
class: "f-avatar-icon"
|
|
@@ -986,22 +936,22 @@ const Me = /* @__PURE__ */ x({
|
|
|
986
936
|
name: "file-input",
|
|
987
937
|
type: "file",
|
|
988
938
|
class: "f-avatar-upload",
|
|
989
|
-
accept:
|
|
939
|
+
accept: A.value,
|
|
990
940
|
onChange: p,
|
|
991
941
|
style: "display: none;"
|
|
992
942
|
}, null)]);
|
|
993
943
|
}
|
|
994
944
|
});
|
|
995
|
-
|
|
996
|
-
i.avatar =
|
|
945
|
+
E.register = (i, o, e, n) => {
|
|
946
|
+
i.avatar = E, o.avatar = H;
|
|
997
947
|
};
|
|
998
|
-
|
|
999
|
-
i.avatar =
|
|
948
|
+
E.registerDesigner = (i, o, e) => {
|
|
949
|
+
i.avatar = Be, o.avatar = H;
|
|
1000
950
|
};
|
|
1001
|
-
const
|
|
951
|
+
const Te = J(E);
|
|
1002
952
|
export {
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
953
|
+
E as FAvatar,
|
|
954
|
+
T as avatarProps,
|
|
955
|
+
Te as default,
|
|
956
|
+
H as propsResolver
|
|
1007
957
|
};
|