@farris/ui-vue 1.2.9 → 1.3.1
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 +64 -64
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +521 -336
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.css +1 -1
- package/components/button-edit/index.esm.js +99 -97
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +496 -504
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +251 -259
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +696 -519
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +368 -376
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.css +1 -0
- package/components/combo-list/index.esm.js +1141 -340
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +116 -116
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +986 -798
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +463 -998
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.css +1 -0
- package/components/condition/index.esm.js +2233 -1057
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +335 -1002
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +6193 -4702
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.css +1 -0
- package/components/data-view/index.esm.js +4562 -3294
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.css +1 -1
- package/components/date-picker/index.esm.js +3420 -2623
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +914 -883
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +14 -13
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +204 -212
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.css +1 -0
- package/components/dynamic-form/index.esm.js +2795 -1835
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +180 -130
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +303 -290
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +328 -336
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +65 -65
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3349 -3626
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5344 -8588
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +2179 -2227
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +684 -675
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +482 -490
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +746 -569
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +409 -385
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +348 -1019
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +3606 -2388
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +10871 -8970
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6019 -5631
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.css +1 -1
- package/components/message-box/index.esm.js +511 -471
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.css +1 -1
- package/components/modal/index.esm.js +438 -398
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +912 -1281
- package/components/nav/index.umd.cjs +3 -3
- package/components/notify/index.esm.js +59 -53
- package/components/notify/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +660 -484
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +682 -506
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1848 -1658
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +100 -100
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1120 -1923
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +875 -1214
- package/components/pagination/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +71 -70
- package/components/popover/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +229 -237
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.css +1 -1
- package/components/property-editor/index.esm.js +2314 -1521
- package/components/property-editor/index.umd.cjs +3 -3
- package/components/property-panel/index.esm.js +867 -868
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +4332 -3623
- package/components/query-solution/index.umd.cjs +1 -1
- package/components/radio-button/index.esm.js +72 -72
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +613 -437
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +255 -263
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +144 -152
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.css +1 -1
- package/components/response-layout-editor/index.esm.js +1101 -1038
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +935 -1750
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5264 -5677
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +151 -154
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +438 -1125
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +93 -101
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +563 -1202
- package/components/splitter/index.umd.cjs +1 -1
- package/components/splitter/style.js +2 -0
- package/components/step/index.esm.js +248 -256
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +549 -373
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.css +1 -1
- package/components/tabs/index.esm.js +2436 -3110
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +328 -336
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +339 -347
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +554 -378
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.css +1 -1
- package/components/time-picker/index.esm.js +1322 -1144
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +537 -543
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5113 -9426
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.css +1 -0
- package/components/tree-view/index.esm.js +3900 -2677
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +568 -570
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +266 -274
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +553 -1052
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +558 -566
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +22009 -22688
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/capsule/src/capsule.props.d.ts +2 -2
- package/types/combo-list/src/components/list-container.component.d.ts +0 -3
- package/types/combo-list/src/components/list-container.props.d.ts +0 -4
- package/types/common/directive/area-response.d.ts +10 -0
- package/types/common/index.d.ts +9 -0
- package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
- package/types/common/types.d.ts +1 -1
- package/types/common/utils/encrypt.d.ts +2 -0
- package/types/common/utils/resolve-field.d.ts +2 -0
- package/types/common/utils/use-class.d.ts +7 -0
- package/types/component/src/component.props.d.ts +7 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/component/src/property-config/component.property-config.d.ts +9 -0
- package/types/components.d.ts +1 -0
- package/types/condition/src/types.d.ts +2 -1
- package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/data-grid/index.d.ts +11 -5
- package/types/data-grid/src/data-grid.component.d.ts +4 -2
- package/types/data-grid/src/data-grid.props.d.ts +1 -0
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +19 -4
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
- 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/rule/use-dragula-common-rule.d.ts +4 -0
- package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
- package/types/designer-canvas/src/composition/types.d.ts +2 -3
- package/types/designer-canvas/src/types.d.ts +2 -1
- package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
- package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +1 -1
- package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
- package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +12 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +1 -1
- package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
- package/types/dynamic-resolver/src/types.d.ts +9 -0
- package/types/dynamic-view/index.d.ts +1 -0
- package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
- package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/index.d.ts +2 -0
- package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
- package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
- package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
- package/types/lookup/src/components/modal-container.component.d.ts +25 -0
- package/types/lookup/src/components/modal-container.props.d.ts +29 -0
- package/types/lookup/src/composition/types.d.ts +8 -0
- package/types/lookup/src/composition/use-check-props.d.ts +9 -2
- package/types/lookup/src/composition/use-dialog.d.ts +5 -1
- package/types/lookup/src/composition/use-favorite.d.ts +12 -0
- package/types/lookup/src/composition/use-http.d.ts +9 -5
- package/types/lookup/src/composition/use-input-change.d.ts +3 -0
- package/types/lookup/src/composition/use-user-data.d.ts +24 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
- package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
- package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
- package/types/modal/src/composition/use-draggable.d.ts +2 -1
- package/types/modal/src/composition/use-shortcut.d.ts +6 -0
- package/types/modal/src/modal.component.d.ts +3 -0
- package/types/modal/src/modal.props.d.ts +4 -0
- package/types/page-header/src/page-header.props.d.ts +1 -0
- package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
- package/types/property-panel/index.d.ts +2 -1
- package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +34 -27
- package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
- package/types/{data-grid/src/designer/use-group-column.d.ts → query-solution/src/designer/query-solution-config/composition/use-property.d.ts} +4 -5
- package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +60 -0
- package/types/query-solution/src/solutions.d.ts +108 -509
- package/types/response-layout-editor/index.d.ts +3 -1
- package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
- package/types/response-layout-editor/src/type.d.ts +21 -0
- package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
- package/types/section/src/designer/use-designer-rules.d.ts +3 -3
- package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
- package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
- package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/tabs.props.d.ts +1 -0
- package/types/tree-grid/index.d.ts +8 -2
- package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
- package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
- package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
- package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
- package/types/modal/src/composition/use-esc.d.ts +0 -1
- package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
- package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
- package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
|
@@ -1,94 +1,94 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { ref as
|
|
5
|
-
import { cloneDeep as
|
|
6
|
-
import { resolveAppearance as
|
|
7
|
-
import { useDesignerComponent as
|
|
8
|
-
import { withInstall as
|
|
9
|
-
const
|
|
10
|
-
function
|
|
11
|
-
const { properties:
|
|
12
|
-
return (!o || !
|
|
1
|
+
var j = Object.defineProperty;
|
|
2
|
+
var O = (i, r, e) => r in i ? j(i, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[r] = e;
|
|
3
|
+
var f = (i, r, e) => O(i, typeof r != "symbol" ? r + "" : r, e);
|
|
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 L } from "lodash-es";
|
|
6
|
+
import { resolveAppearance as z } from "../dynamic-resolver/index.esm.js";
|
|
7
|
+
import { DgControl as D, useDesignerComponent as K } from "../designer-canvas/index.esm.js";
|
|
8
|
+
import { withInstall as J } from "../common/index.esm.js";
|
|
9
|
+
const X = {}, Y = {};
|
|
10
|
+
function N(i) {
|
|
11
|
+
const { properties: r, title: e, ignore: n } = i, o = n && Array.isArray(n), c = Object.keys(r).reduce((d, g) => ((!o || !n.find((m) => m == g)) && (d[g] = r[g].type === "object" && r[g].properties ? N(r[g]) : L(r[g].default)), d), {});
|
|
12
|
+
return e && (!o || !n.find((d) => d == "id")) && (c.id = `${e}-${Date.now()}`), c;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
const
|
|
16
|
-
return Object.keys(
|
|
14
|
+
function $(i, r) {
|
|
15
|
+
const e = N(r);
|
|
16
|
+
return Object.keys(i).reduce((n, o) => (n[o] && V(n[o]) && V(i[o]) ? Object.assign(n[o], i[o]) : n[o] = i[o], n), e), e;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
return Object.keys(
|
|
20
|
-
if (
|
|
21
|
-
const
|
|
22
|
-
if (typeof
|
|
23
|
-
|
|
18
|
+
function _(i, r) {
|
|
19
|
+
return Object.keys(i).filter((n) => i[n] != null).reduce((n, o) => {
|
|
20
|
+
if (r.has(o)) {
|
|
21
|
+
const c = r.get(o);
|
|
22
|
+
if (typeof c == "string")
|
|
23
|
+
n[c] = i[o];
|
|
24
24
|
else {
|
|
25
|
-
const
|
|
26
|
-
Object.assign(
|
|
25
|
+
const d = c(o, i[o], i);
|
|
26
|
+
Object.assign(n, d);
|
|
27
27
|
}
|
|
28
28
|
} else
|
|
29
|
-
|
|
30
|
-
return
|
|
29
|
+
n[o] = i[o];
|
|
30
|
+
return n;
|
|
31
31
|
}, {});
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
const
|
|
35
|
-
return
|
|
33
|
+
function ee(i, r, e = /* @__PURE__ */ new Map()) {
|
|
34
|
+
const n = $(i, r);
|
|
35
|
+
return _(n, e);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
function
|
|
39
|
-
if (typeof
|
|
40
|
-
return
|
|
41
|
-
if (typeof
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
44
|
-
return Number(
|
|
45
|
-
if (
|
|
46
|
-
return Number(
|
|
47
|
-
if (
|
|
48
|
-
return Number(
|
|
37
|
+
function te(i = {}) {
|
|
38
|
+
function r(a, l, t, p) {
|
|
39
|
+
if (typeof t == "number")
|
|
40
|
+
return p[a].length === t;
|
|
41
|
+
if (typeof t == "object") {
|
|
42
|
+
const s = Object.keys(t)[0], u = t[s];
|
|
43
|
+
if (s === "not")
|
|
44
|
+
return Number(p[a].length) !== Number(u);
|
|
45
|
+
if (s === "moreThan")
|
|
46
|
+
return Number(p[a].length) >= Number(u);
|
|
47
|
+
if (s === "lessThan")
|
|
48
|
+
return Number(p[a].length) <= Number(u);
|
|
49
49
|
}
|
|
50
50
|
return !1;
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
return
|
|
52
|
+
function e(a, l, t, p) {
|
|
53
|
+
return p[a] && p[a].propertyValue && String(p[a].propertyValue.value) === String(t);
|
|
54
54
|
}
|
|
55
|
-
const
|
|
56
|
-
["length",
|
|
57
|
-
["getProperty",
|
|
55
|
+
const n = /* @__PURE__ */ new Map([
|
|
56
|
+
["length", r],
|
|
57
|
+
["getProperty", e]
|
|
58
58
|
]);
|
|
59
|
-
Object.keys(
|
|
60
|
-
function o(
|
|
61
|
-
const
|
|
62
|
-
return typeof
|
|
63
|
-
if (
|
|
64
|
-
return { target:
|
|
65
|
-
const
|
|
66
|
-
return { target:
|
|
59
|
+
Object.keys(i).reduce((a, l) => (a.set(l, i[l]), a), n);
|
|
60
|
+
function o(a, l) {
|
|
61
|
+
const t = a;
|
|
62
|
+
return typeof l == "number" ? [{ target: t, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: t, operator: "getProperty", param: a, value: !!l }] : typeof l == "object" ? Object.keys(l).map((p) => {
|
|
63
|
+
if (p === "length")
|
|
64
|
+
return { target: t, operator: "length", param: null, value: l[p] };
|
|
65
|
+
const s = p, u = l[p];
|
|
66
|
+
return { target: t, operator: "getProperty", param: s, value: u };
|
|
67
67
|
}) : [];
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
return Object.keys(
|
|
71
|
-
const
|
|
72
|
-
return
|
|
69
|
+
function c(a) {
|
|
70
|
+
return Object.keys(a).reduce((t, p) => {
|
|
71
|
+
const s = o(p, a[p]);
|
|
72
|
+
return t.push(...s), t;
|
|
73
73
|
}, []);
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
if (
|
|
77
|
-
const
|
|
78
|
-
return
|
|
75
|
+
function d(a, l) {
|
|
76
|
+
if (n.has(a.operator)) {
|
|
77
|
+
const t = n.get(a.operator);
|
|
78
|
+
return t && t(a.target, a.param, a.value, l) || !1;
|
|
79
79
|
}
|
|
80
80
|
return !1;
|
|
81
81
|
}
|
|
82
|
-
function
|
|
83
|
-
return
|
|
82
|
+
function g(a, l) {
|
|
83
|
+
return c(a).reduce((s, u) => s && d(u, l), !0);
|
|
84
84
|
}
|
|
85
|
-
function
|
|
86
|
-
const
|
|
87
|
-
return
|
|
85
|
+
function m(a, l) {
|
|
86
|
+
const t = Object.keys(a), p = t.includes("allOf"), s = t.includes("anyOf"), u = p || s, v = (u ? a[u ? p ? "allOf" : "anyOf" : "allOf"] : [a]).map((k) => g(k, l));
|
|
87
|
+
return p ? !v.includes(!1) : v.includes(!0);
|
|
88
88
|
}
|
|
89
|
-
return { parseValueSchema:
|
|
89
|
+
return { parseValueSchema: m };
|
|
90
90
|
}
|
|
91
|
-
const
|
|
91
|
+
const A = {
|
|
92
92
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
93
93
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
94
94
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -125,21 +125,22 @@ const a = {
|
|
|
125
125
|
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
126
126
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
127
127
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
128
|
-
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
128
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
129
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
130
|
+
}, ne = {}, oe = {};
|
|
131
|
+
te();
|
|
132
|
+
function re(i, r, e = /* @__PURE__ */ new Map(), n = (d, g, m) => g, o = {}, c = (d) => d) {
|
|
133
|
+
return X[r.title] = r, Y[r.title] = n, ne[r.title] = o, oe[r.title] = c, (d = {}) => {
|
|
134
|
+
const g = ee(d, r, e), m = Object.keys(i).reduce((a, l) => (a[l] = i[l].default, a), {});
|
|
135
|
+
return Object.assign(m, g);
|
|
135
136
|
};
|
|
136
137
|
}
|
|
137
|
-
function
|
|
138
|
-
return
|
|
138
|
+
function ie(i, r, e) {
|
|
139
|
+
return r;
|
|
139
140
|
}
|
|
140
|
-
const
|
|
141
|
-
["appearance",
|
|
142
|
-
]),
|
|
141
|
+
const ae = /* @__PURE__ */ new Map([
|
|
142
|
+
["appearance", z]
|
|
143
|
+
]), se = "https://json-schema.org/draft/2020-12/schema", le = "https://farris-design.gitee.io/avatar.schema.json", ce = "avatar", de = "A Farris Component", pe = "object", ue = {
|
|
143
144
|
id: {
|
|
144
145
|
description: "The unique identifier for avatar",
|
|
145
146
|
type: "string"
|
|
@@ -201,23 +202,23 @@ const X = /* @__PURE__ */ new Map([
|
|
|
201
202
|
type: "boolean",
|
|
202
203
|
default: !0
|
|
203
204
|
}
|
|
204
|
-
},
|
|
205
|
+
}, Ae = [
|
|
205
206
|
"id",
|
|
206
207
|
"type"
|
|
207
|
-
],
|
|
208
|
+
], me = [
|
|
208
209
|
"id",
|
|
209
210
|
"appearance",
|
|
210
211
|
"binding"
|
|
211
|
-
],
|
|
212
|
-
$schema:
|
|
213
|
-
$id:
|
|
214
|
-
title:
|
|
215
|
-
description:
|
|
216
|
-
type:
|
|
217
|
-
properties:
|
|
218
|
-
required:
|
|
219
|
-
ignore:
|
|
220
|
-
},
|
|
212
|
+
], ge = {
|
|
213
|
+
$schema: se,
|
|
214
|
+
$id: le,
|
|
215
|
+
title: ce,
|
|
216
|
+
description: de,
|
|
217
|
+
type: pe,
|
|
218
|
+
properties: ue,
|
|
219
|
+
required: Ae,
|
|
220
|
+
ignore: me
|
|
221
|
+
}, w = {
|
|
221
222
|
/**
|
|
222
223
|
* 头像宽度
|
|
223
224
|
*/
|
|
@@ -254,152 +255,152 @@ const X = /* @__PURE__ */ new Map([
|
|
|
254
255
|
* 支持的头像类型
|
|
255
256
|
*/
|
|
256
257
|
imageType: { type: Array, default: ["jpeg"] }
|
|
257
|
-
},
|
|
258
|
-
function
|
|
259
|
-
const o = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAZABkAAD/2wBDAAwICQoJBwwKCQoNDAwOER0TERAQESMZGxUdKiUsKyklKCguNEI4LjE/MigoOk46P0RHSktKLTdRV1FIVkJJSkf/2wBDAQwNDREPESITEyJHMCgwR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0f/wAARCAEsASwDASIAAhEBAxEB/8QAGgABAQEBAQEBAAAAAAAAAAAAAAECAwQFB//EADMQAQEAAQEECAQGAgMBAAAAAAABAhEDITFBBBRRUmFxgaESkcHwEyIysdHhM3IjQvE0/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAH/xAAXEQEBAQEAAAAAAAAAAAAAAAAAEQEh/9oADAMBAAIRAxEAPwD9BBYqCiyAGhougIqyGgEhIui6AyuixdATQ0WQA0BdA4houhoCaGgugMrouhoCaJoum80BNDRdDQGTRbEBNCxdDQGTRUBE0asQGRTQGTT71WxNPP5AugqyACyAC6dpIsgGgshoBISKAiroQDQ0OSyAgoBoaABoaABomigJTRQGV0XRATRGizUGRSwGdEsaqAljLQDOiNWJQZNJ4KffEFIRYAsFkAkFkAJFFkAkNCLIAAAC6AguhoCCl3TW2TzugIHx4S788Z6wmWN4ZY3ysoA1pu+qAgpYCAAaIoDIoCaJZvVAQ03LUB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yoNCKC6m/VAGhPJdQBOSgKi6+QGu41QBRAF1LUABbUABNdAVOYUC0tE13gIWloCcTXeloFQLQTmffMtT74gixOa6gqysrzBVSVQVdWdQGpRNV1BV10SUlBYIvIF1E1Ne0F5iAKIAohaCmqWgBaapqC2ohqC6pqWoC2paa70tAqCACACa+F+RanyAWJ/a8vkAuqT6fVf7AVOz0X+AXVYh2egNSifx9T+wVWefyX+PqCyrqn807PQFEn0+p/YKH9H37gAc/kC6onL0P5BRP6OV8vqC2of2l/gAOSAuqan9J/AKmon9AUtL9PqnP1oCWl5ehfv5gh635nP1qWg//Z",
|
|
260
|
-
function
|
|
261
|
-
return
|
|
258
|
+
}, U = re(w, ge, ae, ie);
|
|
259
|
+
function H(i, r, e, n) {
|
|
260
|
+
const o = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAZABkAAD/2wBDAAwICQoJBwwKCQoNDAwOER0TERAQESMZGxUdKiUsKyklKCguNEI4LjE/MigoOk46P0RHSktKLTdRV1FIVkJJSkf/2wBDAQwNDREPESITEyJHMCgwR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0f/wAARCAEsASwDASIAAhEBAxEB/8QAGgABAQEBAQEBAAAAAAAAAAAAAAECAwQFB//EADMQAQEAAQEECAQGAgMBAAAAAAABAhEDITFBBBRRUmFxgaESkcHwEyIysdHhM3IjQvE0/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAH/xAAXEQEBAQEAAAAAAAAAAAAAAAAAEQEh/9oADAMBAAIRAxEAPwD9BBYqCiyAGhougIqyGgEhIui6AyuixdATQ0WQA0BdA4houhoCaGgugMrouhoCaJoum80BNDRdDQGTRbEBNCxdDQGTRUBE0asQGRTQGTT71WxNPP5AugqyACyAC6dpIsgGgshoBISKAiroQDQ0OSyAgoBoaABoaABomigJTRQGV0XRATRGizUGRSwGdEsaqAljLQDOiNWJQZNJ4KffEFIRYAsFkAkFkAJFFkAkNCLIA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PudWz72PuDg7dG/y3/W/Q6tl3sfdvY7K7PO25S6yzSdoOqWlEBmhaBamt+6J6AnmqaqDQy0CxYyoNCKC6m/VAGhPJdQBOSgKi6+QGu41QBRAF1LUABbUABNdAVOYUC0tE13gIWloCcTXeloFQLQTmffMtT74gixOa6gqysrzBVSVQVdWdQGpRNV1BV10SUlBYIvIF1E1Ne0F5iAKIAohaCmqWgBaapqC2ohqC6pqWoC2paa70tAqCACACa+F+RanyAWJ/a8vkAuqT6fVf7AVOz0X+AXVYh2egNSifx9T+wVWefyX+PqCyrqn807PQFEn0+p/YKH9H37gAc/kC6onL0P5BRP6OV8vqC2of2l/gAOSAuqan9J/AKmon9AUtL9PqnP1oCWl5ehfv5gh635nP1qWg//Z", c = I(i.readonly);
|
|
261
|
+
function d(s) {
|
|
262
|
+
return s.match(/\.(jpeg|jpg|gif|png|svg|bmp|webp)$/) != null;
|
|
262
263
|
}
|
|
263
|
-
function s
|
|
264
|
-
return
|
|
264
|
+
function g(s) {
|
|
265
|
+
return s.indexOf("data:image/") > -1;
|
|
265
266
|
}
|
|
266
|
-
function
|
|
267
|
-
return
|
|
267
|
+
function m(s) {
|
|
268
|
+
return s ? "data:image/jpeg;base64," + s : "";
|
|
268
269
|
}
|
|
269
|
-
const
|
|
270
|
-
var
|
|
271
|
-
if (!
|
|
270
|
+
const a = B(() => {
|
|
271
|
+
var u;
|
|
272
|
+
if (!i.imageType || !i.imageType.length)
|
|
272
273
|
return "";
|
|
273
|
-
const
|
|
274
|
-
return !
|
|
275
|
-
}),
|
|
276
|
-
const
|
|
277
|
-
return
|
|
278
|
-
}),
|
|
279
|
-
function
|
|
280
|
-
|
|
281
|
-
}
|
|
282
|
-
return { acceptTypes:
|
|
274
|
+
const s = (u = i.imageType) == null ? void 0 : u.map((y) => (y === "jpg" && (y = "jpeg"), `image/${y}`));
|
|
275
|
+
return !s || !s.length ? "image/*" : s.join(",");
|
|
276
|
+
}), l = B(() => {
|
|
277
|
+
const s = n.value || i.cover || o;
|
|
278
|
+
return d(s) || g(s) ? s : m(s);
|
|
279
|
+
}), t = B(() => c.value ? "" : i.title);
|
|
280
|
+
function p() {
|
|
281
|
+
c.value || e && e.value && e.value.click();
|
|
282
|
+
}
|
|
283
|
+
return { acceptTypes: a, imageSource: l, imageTitle: t, onClickImage: p };
|
|
283
284
|
}
|
|
284
|
-
const
|
|
285
|
+
const F = /* @__PURE__ */ x({
|
|
285
286
|
name: "FAvatar",
|
|
286
|
-
props:
|
|
287
|
+
props: w,
|
|
287
288
|
emits: ["change", "update:modelValue"],
|
|
288
|
-
setup(
|
|
289
|
-
const
|
|
289
|
+
setup(i, r) {
|
|
290
|
+
const e = B(() => ({
|
|
290
291
|
"f-avatar": !0,
|
|
291
|
-
"f-avatar-readonly":
|
|
292
|
-
"f-avatar-circle":
|
|
293
|
-
"f-avatar-square":
|
|
294
|
-
})),
|
|
295
|
-
width:
|
|
296
|
-
height:
|
|
297
|
-
})),
|
|
298
|
-
function
|
|
292
|
+
"f-avatar-readonly": i.readonly,
|
|
293
|
+
"f-avatar-circle": i.shape === "circle",
|
|
294
|
+
"f-avatar-square": i.shape === "square"
|
|
295
|
+
})), n = I(i.modelValue), o = B(() => ({
|
|
296
|
+
width: i.avatarWidth + "px",
|
|
297
|
+
height: i.avatarHeight + "px"
|
|
298
|
+
})), c = !1;
|
|
299
|
+
function d() {
|
|
299
300
|
return "";
|
|
300
301
|
}
|
|
301
|
-
function
|
|
302
|
+
function g() {
|
|
302
303
|
}
|
|
303
|
-
const
|
|
304
|
-
acceptTypes:
|
|
305
|
-
imageSource:
|
|
306
|
-
onClickImage:
|
|
307
|
-
} =
|
|
308
|
-
return () =>
|
|
309
|
-
class:
|
|
304
|
+
const m = I(null), {
|
|
305
|
+
acceptTypes: a,
|
|
306
|
+
imageSource: l,
|
|
307
|
+
onClickImage: t
|
|
308
|
+
} = H(i, r, m, n);
|
|
309
|
+
return () => b("div", {
|
|
310
|
+
class: e.value,
|
|
310
311
|
style: o.value,
|
|
311
|
-
onClick:
|
|
312
|
-
}, [
|
|
313
|
-
title:
|
|
312
|
+
onClick: t
|
|
313
|
+
}, [c, b("img", {
|
|
314
|
+
title: i.title,
|
|
314
315
|
class: "f-avatar-image",
|
|
315
|
-
src:
|
|
316
|
-
onError:
|
|
317
|
-
}, null), !
|
|
316
|
+
src: l.value,
|
|
317
|
+
onError: d
|
|
318
|
+
}, null), !i.readonly && b("div", {
|
|
318
319
|
class: "f-avatar-icon"
|
|
319
|
-
}, [
|
|
320
|
+
}, [b("span", {
|
|
320
321
|
class: "f-icon f-icon-camera"
|
|
321
|
-
}, null)]),
|
|
322
|
+
}, null)]), b("input", {
|
|
322
323
|
ref: "file",
|
|
323
324
|
name: "file-input",
|
|
324
325
|
type: "file",
|
|
325
326
|
class: "f-avatar-upload",
|
|
326
|
-
accept:
|
|
327
|
-
onChange:
|
|
327
|
+
accept: a.value,
|
|
328
|
+
onChange: g,
|
|
328
329
|
style: "display: none;"
|
|
329
330
|
}, null)]);
|
|
330
331
|
}
|
|
331
332
|
});
|
|
332
|
-
function
|
|
333
|
-
|
|
334
|
-
const
|
|
335
|
-
function o(
|
|
333
|
+
function ye(i, r) {
|
|
334
|
+
i.schema;
|
|
335
|
+
const e = I(!0), n = I(!0);
|
|
336
|
+
function o(t) {
|
|
336
337
|
return !1;
|
|
337
338
|
}
|
|
338
|
-
function
|
|
339
|
+
function c() {
|
|
339
340
|
return !1;
|
|
340
341
|
}
|
|
341
|
-
function
|
|
342
|
+
function d() {
|
|
342
343
|
return !1;
|
|
343
344
|
}
|
|
344
|
-
function
|
|
345
|
+
function g() {
|
|
345
346
|
return !0;
|
|
346
347
|
}
|
|
347
|
-
function
|
|
348
|
+
function m(t) {
|
|
348
349
|
}
|
|
349
|
-
function
|
|
350
|
+
function a() {
|
|
350
351
|
}
|
|
351
|
-
function
|
|
352
|
+
function l(t) {
|
|
352
353
|
return null;
|
|
353
354
|
}
|
|
354
355
|
return {
|
|
355
356
|
canAccepts: o,
|
|
356
|
-
checkCanDeleteComponent:
|
|
357
|
-
checkCanMoveComponent:
|
|
358
|
-
hideNestedPaddingInDesginerView:
|
|
359
|
-
onAcceptMovedChildElement:
|
|
360
|
-
resolveComponentContext:
|
|
361
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
362
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
363
|
-
getPropsConfig:
|
|
357
|
+
checkCanDeleteComponent: c,
|
|
358
|
+
checkCanMoveComponent: d,
|
|
359
|
+
hideNestedPaddingInDesginerView: g,
|
|
360
|
+
onAcceptMovedChildElement: m,
|
|
361
|
+
resolveComponentContext: a,
|
|
362
|
+
triggerBelongedComponentToMoveWhenMoved: e,
|
|
363
|
+
triggerBelongedComponentToDeleteWhenDeleted: n,
|
|
364
|
+
getPropsConfig: l
|
|
364
365
|
};
|
|
365
366
|
}
|
|
366
|
-
class
|
|
367
|
-
constructor(
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
367
|
+
class fe {
|
|
368
|
+
constructor(r, e) {
|
|
369
|
+
f(this, "componentId");
|
|
370
|
+
f(this, "viewModelId");
|
|
371
|
+
f(this, "eventsEditorUtils");
|
|
372
|
+
f(this, "formSchemaUtils");
|
|
373
|
+
f(this, "formMetadataConverter");
|
|
374
|
+
f(this, "designViewModelUtils");
|
|
375
|
+
f(this, "designViewModelField");
|
|
376
|
+
f(this, "controlCreatorUtils");
|
|
377
|
+
f(this, "designerHostService");
|
|
378
|
+
f(this, "schemaService", null);
|
|
379
|
+
f(this, "metadataService", null);
|
|
380
|
+
f(this, "propertyConfig", {
|
|
380
381
|
type: "object",
|
|
381
382
|
categories: {}
|
|
382
383
|
});
|
|
383
|
-
var
|
|
384
|
-
this.componentId =
|
|
384
|
+
var n;
|
|
385
|
+
this.componentId = r, 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(r)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
|
|
385
386
|
}
|
|
386
387
|
getTableInfo() {
|
|
387
|
-
var
|
|
388
|
-
return (
|
|
388
|
+
var r;
|
|
389
|
+
return (r = this.schemaService) == null ? void 0 : r.getTableInfoByViewModelId(this.viewModelId);
|
|
389
390
|
}
|
|
390
|
-
setDesignViewModelField(
|
|
391
|
-
const
|
|
392
|
-
if (
|
|
391
|
+
setDesignViewModelField(r) {
|
|
392
|
+
const e = r.binding && r.binding.type === "Form" && r.binding.field;
|
|
393
|
+
if (e) {
|
|
393
394
|
if (!this.designViewModelField) {
|
|
394
|
-
const
|
|
395
|
-
this.designViewModelField =
|
|
395
|
+
const n = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
396
|
+
this.designViewModelField = n.fields.find((o) => o.id === e);
|
|
396
397
|
}
|
|
397
|
-
|
|
398
|
+
r.updateOn = this.designViewModelField.updateOn;
|
|
398
399
|
}
|
|
399
400
|
}
|
|
400
|
-
changeFieldEditorType(
|
|
401
|
+
changeFieldEditorType(r, e) {
|
|
401
402
|
}
|
|
402
|
-
getBasicPropConfig(
|
|
403
|
+
getBasicPropConfig(r) {
|
|
403
404
|
return {
|
|
404
405
|
description: "Basic Information",
|
|
405
406
|
title: "基本信息",
|
|
@@ -418,13 +419,13 @@ class le {
|
|
|
418
419
|
type: "combo-list",
|
|
419
420
|
textField: "name",
|
|
420
421
|
valueField: "value",
|
|
421
|
-
data: [{ value:
|
|
422
|
+
data: [{ value: r.type, name: A[r.type].name }]
|
|
422
423
|
}
|
|
423
424
|
}
|
|
424
425
|
}
|
|
425
426
|
};
|
|
426
427
|
}
|
|
427
|
-
getAppearanceConfig(
|
|
428
|
+
getAppearanceConfig(r = null) {
|
|
428
429
|
return {
|
|
429
430
|
title: "样式",
|
|
430
431
|
description: "Appearance",
|
|
@@ -444,90 +445,212 @@ class le {
|
|
|
444
445
|
}
|
|
445
446
|
};
|
|
446
447
|
}
|
|
448
|
+
/**
|
|
449
|
+
*
|
|
450
|
+
* @param propertyId
|
|
451
|
+
* @param componentInstance
|
|
452
|
+
* @returns
|
|
453
|
+
*/
|
|
454
|
+
updateElementByParentContainer(r, e) {
|
|
455
|
+
const n = e && e.parent && e.parent.schema;
|
|
456
|
+
if (!n)
|
|
457
|
+
return;
|
|
458
|
+
const o = n.contents.findIndex((d) => d.id === r), c = L(n.contents[o]);
|
|
459
|
+
n.contents.splice(o, 1), n.contents.splice(o, 0, c);
|
|
460
|
+
}
|
|
447
461
|
}
|
|
448
|
-
const
|
|
462
|
+
const M = class M {
|
|
449
463
|
/**
|
|
450
464
|
* 根据绑定字段类型获取可用的输入类控件
|
|
451
465
|
*/
|
|
452
|
-
static getEditorTypesByMDataType(
|
|
453
|
-
const
|
|
454
|
-
return
|
|
466
|
+
static getEditorTypesByMDataType(r) {
|
|
467
|
+
const e = M.fieldControlTypeMapping[r];
|
|
468
|
+
return e || [{ key: "", value: "" }];
|
|
455
469
|
}
|
|
456
470
|
/**
|
|
457
471
|
* 获取所有输入类控件
|
|
458
472
|
*/
|
|
459
473
|
static getAllInputTypes() {
|
|
460
|
-
const
|
|
461
|
-
for (let
|
|
462
|
-
|
|
463
|
-
|
|
474
|
+
const r = [];
|
|
475
|
+
for (let e in M.fieldControlTypeMapping)
|
|
476
|
+
M.fieldControlTypeMapping[e].forEach((n) => {
|
|
477
|
+
r.find((o) => o.key === n.key && o.value === n.value) || r.push({ key: n.key, value: n.value });
|
|
464
478
|
});
|
|
465
|
-
return
|
|
479
|
+
return r;
|
|
466
480
|
}
|
|
467
481
|
};
|
|
468
482
|
/**
|
|
469
483
|
* <字段类型,可配置的控件类型列表>的映射
|
|
470
484
|
*/
|
|
471
|
-
|
|
485
|
+
f(M, "fieldControlTypeMapping", {
|
|
472
486
|
String: [
|
|
473
|
-
{ key:
|
|
474
|
-
{ key:
|
|
475
|
-
{ key:
|
|
476
|
-
{ key:
|
|
477
|
-
{ key:
|
|
478
|
-
{ key:
|
|
479
|
-
{ key:
|
|
487
|
+
{ key: A["input-group"].type, value: A["input-group"].name },
|
|
488
|
+
{ key: A.lookup.type, value: A.lookup.name },
|
|
489
|
+
{ key: A["date-picker"].type, value: A["date-picker"].name },
|
|
490
|
+
{ key: A["check-box"].type, value: A["check-box"].name },
|
|
491
|
+
{ key: A["check-group"].type, value: A["check-group"].name },
|
|
492
|
+
{ key: A["radio-group"].type, value: A["radio-group"].name },
|
|
493
|
+
{ key: A["combo-list"].type, value: A["combo-list"].name },
|
|
494
|
+
{ key: A.textarea.type, value: A.textarea.name }
|
|
480
495
|
],
|
|
481
496
|
Text: [
|
|
482
|
-
{ key:
|
|
483
|
-
{ key:
|
|
497
|
+
{ key: A.textarea.type, value: A.textarea.name },
|
|
498
|
+
{ key: A.lookup.type, value: A.lookup.name }
|
|
484
499
|
],
|
|
485
500
|
Decimal: [
|
|
486
|
-
{ key:
|
|
501
|
+
{ key: A["number-spinner"].type, value: A["number-spinner"].name }
|
|
487
502
|
],
|
|
488
503
|
Integer: [
|
|
489
|
-
{ key:
|
|
504
|
+
{ key: A["number-spinner"].type, value: A["number-spinner"].name }
|
|
490
505
|
],
|
|
491
506
|
Number: [
|
|
492
|
-
{ key:
|
|
507
|
+
{ key: A["number-spinner"].type, value: A["number-spinner"].name }
|
|
493
508
|
],
|
|
494
509
|
BigNumber: [
|
|
495
|
-
{ key:
|
|
510
|
+
{ key: A["number-spinner"].type, value: A["number-spinner"].name }
|
|
496
511
|
],
|
|
497
512
|
Date: [
|
|
498
|
-
{ key:
|
|
513
|
+
{ key: A["date-picker"].type, value: A["date-picker"].name }
|
|
499
514
|
],
|
|
500
515
|
DateTime: [
|
|
501
|
-
{ key:
|
|
516
|
+
{ key: A["date-picker"].type, value: A["date-picker"].name }
|
|
502
517
|
],
|
|
503
518
|
Boolean: [
|
|
504
|
-
{ key:
|
|
505
|
-
{ key:
|
|
519
|
+
{ key: A.switch.type, value: A.switch.name },
|
|
520
|
+
{ key: A["check-box"].type, value: A["check-box"].name }
|
|
506
521
|
],
|
|
507
522
|
Enum: [
|
|
508
|
-
{ key:
|
|
509
|
-
{ key:
|
|
523
|
+
{ key: A["combo-list"].type, value: A["combo-list"].name },
|
|
524
|
+
{ key: A["radio-group"].type, value: A["radio-group"].name }
|
|
510
525
|
],
|
|
511
526
|
Object: [
|
|
512
|
-
{ key:
|
|
513
|
-
{ key:
|
|
514
|
-
{ key:
|
|
527
|
+
{ key: A.lookup.type, value: A.lookup.name },
|
|
528
|
+
{ key: A["combo-list"].type, value: A["combo-list"].name },
|
|
529
|
+
{ key: A["radio-group"].type, value: A["radio-group"].name }
|
|
515
530
|
]
|
|
516
531
|
});
|
|
517
|
-
let
|
|
518
|
-
const
|
|
519
|
-
class
|
|
532
|
+
let S = M;
|
|
533
|
+
const he = I(0);
|
|
534
|
+
class ve {
|
|
535
|
+
constructor() {
|
|
536
|
+
/** 控件标题 */
|
|
537
|
+
f(this, "label", "");
|
|
538
|
+
/** 控件id */
|
|
539
|
+
f(this, "id", "");
|
|
540
|
+
/** 每个控件占用的栅格数 */
|
|
541
|
+
f(this, "columnInSM", 12);
|
|
542
|
+
f(this, "columnInMD", 6);
|
|
543
|
+
f(this, "columnInLG", 3);
|
|
544
|
+
f(this, "columnInEL", 2);
|
|
545
|
+
/** 每个控件占用的列数 */
|
|
546
|
+
f(this, "displayWidthInSM", 1);
|
|
547
|
+
f(this, "displayWidthInMD", 1);
|
|
548
|
+
f(this, "displayWidthInLG", 1);
|
|
549
|
+
f(this, "displayWidthInEL", 1);
|
|
550
|
+
/** 编辑器内部默认显示的屏幕大小-----可以去掉 */
|
|
551
|
+
f(this, "displayColumnCountAtBreakPoint", "md");
|
|
552
|
+
/** 控件所在行,传0即可-----编辑器内部使用 */
|
|
553
|
+
f(this, "tagRow", 0);
|
|
554
|
+
/** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
|
|
555
|
+
f(this, "showTopBorder", 0);
|
|
556
|
+
/** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
|
|
557
|
+
f(this, "group", 1);
|
|
558
|
+
/** 控件是否符合标准的class配置(设计器用的) */
|
|
559
|
+
f(this, "isSupportedClass", !0);
|
|
560
|
+
/** 控件所在分组id(设计器用的) */
|
|
561
|
+
f(this, "fieldSetId", "");
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
function Ce(i) {
|
|
565
|
+
let r, e;
|
|
566
|
+
const n = /* @__PURE__ */ new Map();
|
|
567
|
+
let o = [];
|
|
568
|
+
function c(l, t) {
|
|
569
|
+
const s = l.split(" ").filter((C) => C.startsWith("col-"));
|
|
570
|
+
if (s.length === 0) {
|
|
571
|
+
t.isSupportedClass = !1;
|
|
572
|
+
return;
|
|
573
|
+
}
|
|
574
|
+
let u = s.find((C) => /^col-([1-9]|10|11|12)$/.test(C)), y = s.find((C) => /^col-md-([1-9]|10|11|12)$/.test(C)), h = s.find((C) => /^col-xl-([1-9]|10|11|12)$/.test(C)), v = s.find((C) => /^col-el-([1-9]|10|11|12)$/.test(C));
|
|
575
|
+
u = u || "col-12", t.columnInSM = parseInt(u.replace("col-", ""), 10), t.displayWidthInSM = t.columnInSM / 12, t.displayWidthInSM !== 1 && (t.isSupportedClass = !1), y = y || "col-md-" + t.columnInSM, t.columnInMD = parseInt(y.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);
|
|
576
|
+
}
|
|
577
|
+
function d(l, t, p, s = !1) {
|
|
578
|
+
let u = !1;
|
|
579
|
+
l.contents.forEach((y) => {
|
|
580
|
+
if (y.type === "fieldset") {
|
|
581
|
+
p += 1, d(y, t, p, !0), u = !0;
|
|
582
|
+
return;
|
|
583
|
+
}
|
|
584
|
+
u && (p += 1, u = !1);
|
|
585
|
+
const h = y.appearance && y.appearance.class, v = new ve();
|
|
586
|
+
h ? c(h, v) : v.isSupportedClass = !1, v.label = y.label || y.id, v.id = y.id, v.group = p, s && (v.fieldSetId = l.id), e === y.id && (r = p), n.set(y.id, y), t.push(v);
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
function g(l) {
|
|
590
|
+
const t = i.getComponentById(l);
|
|
591
|
+
if (!t || !t.componentType || !t.componentType.startsWith("form"))
|
|
592
|
+
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
593
|
+
const p = i.selectNode(t, (s) => s.type === D["response-form"].type);
|
|
594
|
+
return !p || !p.contents || p.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: p };
|
|
595
|
+
}
|
|
596
|
+
function m(l, t) {
|
|
597
|
+
t = t || l.id;
|
|
598
|
+
const { result: p, message: s, formNode: u } = g(t);
|
|
599
|
+
if (!p)
|
|
600
|
+
return { result: p, message: s };
|
|
601
|
+
e = l.id, o = [], n.clear();
|
|
602
|
+
const y = u.contents[0].type === D.fieldset.type ? 0 : 1;
|
|
603
|
+
d(u, o, y);
|
|
604
|
+
const h = o.find((C) => !C.isSupportedClass);
|
|
605
|
+
return {
|
|
606
|
+
defaultState: {
|
|
607
|
+
defaultGroupNumber: r || 1,
|
|
608
|
+
model: h ? "customize" : "standard"
|
|
609
|
+
},
|
|
610
|
+
importData: o
|
|
611
|
+
};
|
|
612
|
+
}
|
|
613
|
+
function a(l, t) {
|
|
614
|
+
t = t;
|
|
615
|
+
const { result: p, formNode: s } = g(t);
|
|
616
|
+
if (!p)
|
|
617
|
+
return "";
|
|
618
|
+
const u = [];
|
|
619
|
+
return l.forEach((y) => {
|
|
620
|
+
var C;
|
|
621
|
+
const h = n.get(y.id), v = h.appearance && h.appearance.class;
|
|
622
|
+
if (v) {
|
|
623
|
+
const T = v.split(" ").filter((Q) => !Q.startsWith("col-")), E = "col-" + y.columnInSM, q = "col-md-" + y.columnInMD, W = "col-xl-" + y.columnInLG, R = "col-el-" + y.columnInEL, G = [E, q, W, R].concat(T);
|
|
624
|
+
h.appearance.class = G.join(" ");
|
|
625
|
+
}
|
|
626
|
+
if (y.fieldSetId) {
|
|
627
|
+
const k = s.contents.find((E) => E.id === y.fieldSetId), T = u.find((E) => E.id === y.fieldSetId);
|
|
628
|
+
T ? (C = T.contents) == null || C.push(h) : (u.push(k), k.contents = [h]);
|
|
629
|
+
} else
|
|
630
|
+
u.push(h);
|
|
631
|
+
}), s.contents = u, s.id;
|
|
632
|
+
}
|
|
633
|
+
return {
|
|
634
|
+
checkCanFindFormNode: g,
|
|
635
|
+
checkCanOpenLayoutEditor: m,
|
|
636
|
+
changeFormControlsByResponseLayoutConfig: a,
|
|
637
|
+
getResonseFormLayoutConfig: d
|
|
638
|
+
};
|
|
639
|
+
}
|
|
640
|
+
class be extends fe {
|
|
520
641
|
constructor(e, n) {
|
|
521
642
|
super(e, n);
|
|
643
|
+
f(this, "responseLayoutEditorFunction");
|
|
644
|
+
this.responseLayoutEditorFunction = Ce(this.formSchemaUtils);
|
|
522
645
|
}
|
|
523
646
|
getPropertyConfig(e, n) {
|
|
524
|
-
return this.propertyConfig.categories.basic = this.getBasicProperties(e, n), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
|
|
647
|
+
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;
|
|
525
648
|
}
|
|
526
649
|
getBasicProperties(e, n) {
|
|
527
|
-
var
|
|
528
|
-
var
|
|
650
|
+
var g;
|
|
651
|
+
var o = this;
|
|
529
652
|
this.setDesignViewModelField(e);
|
|
530
|
-
const
|
|
653
|
+
const c = this.formSchemaUtils.getFormMetadataBasicInfo(), d = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
531
654
|
return {
|
|
532
655
|
description: "Basic Information",
|
|
533
656
|
title: "基本信息",
|
|
@@ -549,7 +672,7 @@ class pe extends le {
|
|
|
549
672
|
textField: "value",
|
|
550
673
|
valueField: "key",
|
|
551
674
|
editable: !1,
|
|
552
|
-
data:
|
|
675
|
+
data: o.designViewModelField ? S.getEditorTypesByMDataType((g = o.designViewModelField.type) == null ? void 0 : g.name) : S.getAllInputTypes()
|
|
553
676
|
}
|
|
554
677
|
},
|
|
555
678
|
label: {
|
|
@@ -566,7 +689,7 @@ class pe extends le {
|
|
|
566
689
|
bindingType: { enable: !1 },
|
|
567
690
|
editorParams: {
|
|
568
691
|
propertyData: e,
|
|
569
|
-
formBasicInfo:
|
|
692
|
+
formBasicInfo: c
|
|
570
693
|
},
|
|
571
694
|
columns: [
|
|
572
695
|
{ field: "name", title: "字段名称" },
|
|
@@ -578,22 +701,23 @@ class pe extends le {
|
|
|
578
701
|
}
|
|
579
702
|
}
|
|
580
703
|
},
|
|
581
|
-
setPropertyRelates(
|
|
582
|
-
if (
|
|
583
|
-
switch (
|
|
704
|
+
setPropertyRelates(m, a) {
|
|
705
|
+
if (m)
|
|
706
|
+
switch (m && m.propertyID) {
|
|
584
707
|
case "type": {
|
|
585
|
-
|
|
708
|
+
o.changeControlType(e, m, n);
|
|
586
709
|
break;
|
|
587
710
|
}
|
|
588
711
|
case "label": {
|
|
589
|
-
|
|
712
|
+
m.needRefreshControlTree = !0;
|
|
590
713
|
break;
|
|
591
714
|
}
|
|
592
715
|
}
|
|
593
716
|
}
|
|
594
717
|
};
|
|
595
718
|
}
|
|
596
|
-
getAppearanceProperties(e) {
|
|
719
|
+
getAppearanceProperties(e, n) {
|
|
720
|
+
var o = this;
|
|
597
721
|
return {
|
|
598
722
|
title: "样式",
|
|
599
723
|
description: "Appearance",
|
|
@@ -614,12 +738,25 @@ class pe extends le {
|
|
|
614
738
|
description: "响应式列宽",
|
|
615
739
|
title: "响应式列宽",
|
|
616
740
|
type: "boolean",
|
|
617
|
-
visible: !
|
|
741
|
+
visible: !0,
|
|
742
|
+
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
743
|
+
refreshPanelAfterChanged: !0,
|
|
618
744
|
editor: {
|
|
619
|
-
type: "response-layout-editor-setting"
|
|
620
|
-
|
|
621
|
-
|
|
745
|
+
type: "response-layout-editor-setting",
|
|
746
|
+
initialState: o.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, o.componentId)
|
|
747
|
+
}
|
|
622
748
|
}
|
|
749
|
+
},
|
|
750
|
+
setPropertyRelates(c, d) {
|
|
751
|
+
if (c)
|
|
752
|
+
switch (c && c.propertyID) {
|
|
753
|
+
case "responseLayout":
|
|
754
|
+
o.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(c.propertyValue, o.componentId || e.id), o.updateUnifiedLayoutAfterResponseLayoutChanged(o.componentId), o.updateElementByParentContainer(e.id, n), delete e.responseLayout;
|
|
755
|
+
break;
|
|
756
|
+
case "class":
|
|
757
|
+
o.updateUnifiedLayoutAfterControlChanged(c.propertyValue, e.id, this.componentId), o.updateElementByParentContainer(e.id, n);
|
|
758
|
+
break;
|
|
759
|
+
}
|
|
623
760
|
}
|
|
624
761
|
};
|
|
625
762
|
}
|
|
@@ -631,39 +768,39 @@ class pe extends le {
|
|
|
631
768
|
* @param propertyData 控件DOM属性
|
|
632
769
|
* @param newControlType 新控件类型
|
|
633
770
|
*/
|
|
634
|
-
changeControlType(e, n,
|
|
635
|
-
var
|
|
636
|
-
const
|
|
771
|
+
changeControlType(e, n, o) {
|
|
772
|
+
var l, t, p, s;
|
|
773
|
+
const c = n.propertyValue, d = o && o.parent && o.parent.schema;
|
|
637
774
|
if (!d)
|
|
638
775
|
return;
|
|
639
|
-
const
|
|
640
|
-
let
|
|
776
|
+
const g = d.contents.findIndex((u) => u.id === e.id), m = d.contents[g];
|
|
777
|
+
let a;
|
|
641
778
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
642
779
|
editor: {
|
|
643
|
-
$type:
|
|
780
|
+
$type: c
|
|
644
781
|
},
|
|
645
782
|
name: this.designViewModelField.name,
|
|
646
783
|
require: this.designViewModelField.require,
|
|
647
784
|
readonly: this.designViewModelField.readonly
|
|
648
|
-
}, !1),
|
|
649
|
-
id:
|
|
650
|
-
appearance:
|
|
651
|
-
size:
|
|
652
|
-
label:
|
|
653
|
-
binding:
|
|
654
|
-
visible:
|
|
655
|
-
}), Object.assign(
|
|
656
|
-
isTextArea:
|
|
657
|
-
placeholder: (
|
|
658
|
-
holdPlace: (
|
|
659
|
-
readonly: (p =
|
|
660
|
-
require: (
|
|
661
|
-
}), d.contents.splice(
|
|
662
|
-
(
|
|
663
|
-
),
|
|
664
|
-
}
|
|
665
|
-
getComponentConfig(e, n = {},
|
|
666
|
-
const
|
|
785
|
+
}, !1), a = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, c)), a || (a = this.controlCreatorUtils.createFormGroupWithoutField(c)), Object.assign(a, {
|
|
786
|
+
id: m.id,
|
|
787
|
+
appearance: m.appearance,
|
|
788
|
+
size: m.size,
|
|
789
|
+
label: m.label,
|
|
790
|
+
binding: m.binding,
|
|
791
|
+
visible: m.visible
|
|
792
|
+
}), Object.assign(a.editor, {
|
|
793
|
+
isTextArea: a.isTextArea && m.isTextArea,
|
|
794
|
+
placeholder: (l = m.editor) == null ? void 0 : l.placeholder,
|
|
795
|
+
holdPlace: (t = m.editor) == null ? void 0 : t.holdPlace,
|
|
796
|
+
readonly: (p = m.editor) == null ? void 0 : p.readonly,
|
|
797
|
+
require: (s = m.editor) == null ? void 0 : s.require
|
|
798
|
+
}), d.contents.splice(g, 1), d.contents.splice(g, 0, a), o.schema = Object.assign(m, a), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
799
|
+
(u) => u.classList.remove("dgComponentSelected")
|
|
800
|
+
), he.value++;
|
|
801
|
+
}
|
|
802
|
+
getComponentConfig(e, n = {}, o = {}) {
|
|
803
|
+
const c = Object.assign({
|
|
667
804
|
description: "编辑器",
|
|
668
805
|
title: "编辑器",
|
|
669
806
|
type: "input-group",
|
|
@@ -689,15 +826,63 @@ class pe extends le {
|
|
|
689
826
|
title: "提示文本",
|
|
690
827
|
type: "string"
|
|
691
828
|
}
|
|
692
|
-
},
|
|
693
|
-
return { ...
|
|
829
|
+
}, o);
|
|
830
|
+
return { ...c, properties: { ...d } };
|
|
831
|
+
}
|
|
832
|
+
/**
|
|
833
|
+
* 修改某一输入控件的样式后更新Form的统一布局配置
|
|
834
|
+
* @param controlClass 控件样式
|
|
835
|
+
* @param controlId 控件Id
|
|
836
|
+
* @param componentId 控件所在组件id
|
|
837
|
+
*/
|
|
838
|
+
updateUnifiedLayoutAfterControlChanged(e, n, o) {
|
|
839
|
+
const c = e.split(" ");
|
|
840
|
+
let d = c.find((t) => /^col-([1-9]|10|11|12)$/.test(t)), g = c.find((t) => /^col-md-([1-9]|10|11|12)$/.test(t)), m = c.find((t) => /^col-xl-([1-9]|10|11|12)$/.test(t)), a = c.find((t) => /^col-el-([1-9]|10|11|12)$/.test(t));
|
|
841
|
+
d = d || "col-12", g = g || "col-md-" + d.replace("col-", ""), m = m || "col-xl-" + g.replace("col-md-", ""), a = a || "col-el-" + m.replace("col-xl-", "");
|
|
842
|
+
const l = {
|
|
843
|
+
id: n,
|
|
844
|
+
columnInSM: parseInt(d.replace("col-", ""), 10),
|
|
845
|
+
columnInMD: parseInt(g.replace("col-md-", ""), 10),
|
|
846
|
+
columnInLG: parseInt(m.replace("col-xl-", ""), 10),
|
|
847
|
+
columnInEL: parseInt(a.replace("col-el-", ""), 10)
|
|
848
|
+
};
|
|
849
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(o, l);
|
|
850
|
+
}
|
|
851
|
+
/**
|
|
852
|
+
* 修改控件布局配置后更新Form统一布局配置
|
|
853
|
+
* @param componentId 组件Id
|
|
854
|
+
* @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
|
|
855
|
+
*/
|
|
856
|
+
updateUnifiedLayoutAfterResponseLayoutChanged(e, n) {
|
|
857
|
+
const { formNode: o } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
|
|
858
|
+
if (!o || !o.unifiedLayout)
|
|
859
|
+
return;
|
|
860
|
+
const c = [];
|
|
861
|
+
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(o, c, 1), n) {
|
|
862
|
+
const u = c.find((y) => y.id === n.id);
|
|
863
|
+
Object.assign(u || {}, n);
|
|
864
|
+
}
|
|
865
|
+
const d = c.map((u) => u.columnInSM), g = c.map((u) => u.columnInMD), m = c.map((u) => u.columnInLG), a = c.map((u) => u.columnInEL), l = this.checkIsUniqueColumn(d) ? d[0] : null, t = this.checkIsUniqueColumn(g) ? g[0] : null, p = this.checkIsUniqueColumn(m) ? m[0] : null, s = this.checkIsUniqueColumn(a) ? a[0] : null;
|
|
866
|
+
Object.assign(o.unifiedLayout, {
|
|
867
|
+
uniqueColClassInSM: l,
|
|
868
|
+
uniqueColClassInMD: t,
|
|
869
|
+
uniqueColClassInLG: p,
|
|
870
|
+
uniqueColClassInEL: s
|
|
871
|
+
});
|
|
872
|
+
}
|
|
873
|
+
/**
|
|
874
|
+
* 校验宽度样式值是否一致
|
|
875
|
+
*/
|
|
876
|
+
checkIsUniqueColumn(e) {
|
|
877
|
+
const n = new Set(e);
|
|
878
|
+
return Array.from(n).length === 1;
|
|
694
879
|
}
|
|
695
880
|
}
|
|
696
|
-
class
|
|
697
|
-
constructor(
|
|
698
|
-
super(
|
|
881
|
+
class Ie extends be {
|
|
882
|
+
constructor(r, e) {
|
|
883
|
+
super(r, e);
|
|
699
884
|
}
|
|
700
|
-
getEditorProperties(
|
|
885
|
+
getEditorProperties(r) {
|
|
701
886
|
return {
|
|
702
887
|
description: "编辑器",
|
|
703
888
|
title: "编辑器",
|
|
@@ -728,95 +913,95 @@ class de extends pe {
|
|
|
728
913
|
};
|
|
729
914
|
}
|
|
730
915
|
}
|
|
731
|
-
function
|
|
916
|
+
function Be(i, r) {
|
|
732
917
|
const {
|
|
733
|
-
canAccepts:
|
|
734
|
-
checkCanDeleteComponent:
|
|
918
|
+
canAccepts: e,
|
|
919
|
+
checkCanDeleteComponent: n,
|
|
735
920
|
checkCanMoveComponent: o,
|
|
736
|
-
hideNestedPaddingInDesginerView:
|
|
737
|
-
onAcceptMovedChildElement:
|
|
738
|
-
resolveComponentContext:
|
|
739
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
740
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
741
|
-
} =
|
|
742
|
-
function p
|
|
743
|
-
return new
|
|
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);
|
|
744
929
|
}
|
|
745
930
|
return {
|
|
746
|
-
canAccepts:
|
|
747
|
-
checkCanDeleteComponent:
|
|
931
|
+
canAccepts: e,
|
|
932
|
+
checkCanDeleteComponent: n,
|
|
748
933
|
checkCanMoveComponent: o,
|
|
749
|
-
hideNestedPaddingInDesginerView:
|
|
750
|
-
onAcceptMovedChildElement:
|
|
751
|
-
resolveComponentContext:
|
|
752
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
753
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
754
|
-
getPropsConfig:
|
|
934
|
+
hideNestedPaddingInDesginerView: c,
|
|
935
|
+
onAcceptMovedChildElement: d,
|
|
936
|
+
resolveComponentContext: g,
|
|
937
|
+
triggerBelongedComponentToMoveWhenMoved: m,
|
|
938
|
+
triggerBelongedComponentToDeleteWhenDeleted: a,
|
|
939
|
+
getPropsConfig: t
|
|
755
940
|
};
|
|
756
941
|
}
|
|
757
|
-
const
|
|
942
|
+
const Me = /* @__PURE__ */ x({
|
|
758
943
|
name: "FAvatarDesign",
|
|
759
|
-
props:
|
|
944
|
+
props: w,
|
|
760
945
|
emits: ["change", "update:modelValue"],
|
|
761
|
-
setup(
|
|
762
|
-
const
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
}),
|
|
766
|
-
const
|
|
946
|
+
setup(i, r) {
|
|
947
|
+
const e = I(), n = P("designer-host-service"), o = P("design-item-context"), c = Be(o, n), d = K(e, o, c);
|
|
948
|
+
Z(() => {
|
|
949
|
+
e.value.componentInstance = d;
|
|
950
|
+
}), r.expose(d.value);
|
|
951
|
+
const g = B(() => ({
|
|
767
952
|
"f-avatar": !0,
|
|
768
|
-
"f-avatar-readonly":
|
|
769
|
-
"f-avatar-circle":
|
|
770
|
-
"f-avatar-square":
|
|
771
|
-
})),
|
|
772
|
-
width:
|
|
773
|
-
height:
|
|
774
|
-
})),
|
|
775
|
-
function
|
|
953
|
+
"f-avatar-readonly": i.readonly,
|
|
954
|
+
"f-avatar-circle": i.shape === "circle",
|
|
955
|
+
"f-avatar-square": i.shape === "square"
|
|
956
|
+
})), m = I(i.modelValue), a = B(() => ({
|
|
957
|
+
width: i.avatarWidth + "px",
|
|
958
|
+
height: i.avatarHeight + "px"
|
|
959
|
+
})), l = !1;
|
|
960
|
+
function t() {
|
|
776
961
|
return "";
|
|
777
962
|
}
|
|
778
|
-
function
|
|
963
|
+
function p() {
|
|
779
964
|
}
|
|
780
|
-
const
|
|
781
|
-
acceptTypes:
|
|
782
|
-
imageSource:
|
|
783
|
-
onClickImage:
|
|
784
|
-
} =
|
|
785
|
-
return () =>
|
|
786
|
-
ref:
|
|
787
|
-
class:
|
|
788
|
-
style:
|
|
789
|
-
onClick:
|
|
790
|
-
}, [
|
|
791
|
-
title:
|
|
965
|
+
const s = I(null), {
|
|
966
|
+
acceptTypes: u,
|
|
967
|
+
imageSource: y,
|
|
968
|
+
onClickImage: h
|
|
969
|
+
} = H(i, r, s, m);
|
|
970
|
+
return () => b("div", {
|
|
971
|
+
ref: e,
|
|
972
|
+
class: g.value,
|
|
973
|
+
style: a.value,
|
|
974
|
+
onClick: h
|
|
975
|
+
}, [l, b("img", {
|
|
976
|
+
title: i.title,
|
|
792
977
|
class: "f-avatar-image",
|
|
793
|
-
src:
|
|
794
|
-
onError:
|
|
795
|
-
}, null), !
|
|
978
|
+
src: y.value,
|
|
979
|
+
onError: t
|
|
980
|
+
}, null), !i.readonly && b("div", {
|
|
796
981
|
class: "f-avatar-icon"
|
|
797
|
-
}, [
|
|
982
|
+
}, [b("span", {
|
|
798
983
|
class: "f-icon f-icon-camera"
|
|
799
|
-
}, null)]),
|
|
984
|
+
}, null)]), b("input", {
|
|
800
985
|
ref: "file",
|
|
801
986
|
name: "file-input",
|
|
802
987
|
type: "file",
|
|
803
988
|
class: "f-avatar-upload",
|
|
804
|
-
accept:
|
|
805
|
-
onChange:
|
|
989
|
+
accept: u.value,
|
|
990
|
+
onChange: p,
|
|
806
991
|
style: "display: none;"
|
|
807
992
|
}, null)]);
|
|
808
993
|
}
|
|
809
994
|
});
|
|
810
|
-
|
|
811
|
-
|
|
995
|
+
F.register = (i, r, e, n) => {
|
|
996
|
+
i.avatar = F, r.avatar = U;
|
|
812
997
|
};
|
|
813
|
-
|
|
814
|
-
|
|
998
|
+
F.registerDesigner = (i, r, e) => {
|
|
999
|
+
i.avatar = Me, r.avatar = U;
|
|
815
1000
|
};
|
|
816
|
-
const
|
|
1001
|
+
const Pe = J(F);
|
|
817
1002
|
export {
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
1003
|
+
F as FAvatar,
|
|
1004
|
+
w as avatarProps,
|
|
1005
|
+
Pe as default,
|
|
1006
|
+
U as propsResolver
|
|
822
1007
|
};
|