@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,102 +1,102 @@
|
|
|
1
|
-
var
|
|
2
|
-
var Y = (n,
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as G, ref as
|
|
5
|
-
import { cloneDeep as
|
|
6
|
-
import { useTextBox as
|
|
7
|
-
import {
|
|
8
|
-
const
|
|
9
|
-
function
|
|
10
|
-
const { properties:
|
|
11
|
-
return (!
|
|
1
|
+
var Q = Object.defineProperty;
|
|
2
|
+
var Y = (n, t, e) => t in n ? Q(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
|
+
var g = (n, t, e) => Y(n, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { defineComponent as G, ref as F, computed as D, onMounted as W, createVNode as E, withDirectives as Z, vModelText as _, inject as U } from "vue";
|
|
5
|
+
import { isPlainObject as x, cloneDeep as O } from "lodash-es";
|
|
6
|
+
import { useTextBox as H, useClear as K } from "../common/index.esm.js";
|
|
7
|
+
import { DgControl as $ } from "../designer-canvas/index.esm.js";
|
|
8
|
+
const j = {}, q = {};
|
|
9
|
+
function A(n) {
|
|
10
|
+
const { properties: t, title: e, ignore: r } = n, a = r && Array.isArray(r), l = Object.keys(t).reduce((c, f) => ((!a || !r.find((m) => m == f)) && (c[f] = t[f].type === "object" && t[f].properties ? A(t[f]) : O(t[f].default)), c), {});
|
|
11
|
+
return e && (!a || !r.find((c) => c == "id")) && (l.id = `${e}-${Date.now()}`), l;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
const
|
|
15
|
-
if (
|
|
16
|
-
let
|
|
17
|
-
const
|
|
18
|
-
return
|
|
13
|
+
function z(n, t = {}, e) {
|
|
14
|
+
const r = j[n];
|
|
15
|
+
if (r) {
|
|
16
|
+
let a = A(r);
|
|
17
|
+
const l = q[n];
|
|
18
|
+
return a = l ? l({ getSchemaByType: z }, a, t, e) : a, a;
|
|
19
19
|
}
|
|
20
20
|
return null;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
const
|
|
24
|
-
return Object.keys(n).reduce((
|
|
22
|
+
function R(n, t) {
|
|
23
|
+
const e = A(t);
|
|
24
|
+
return Object.keys(n).reduce((r, a) => (r[a] && x(r[a]) && x(n[a]) ? Object.assign(r[a], n[a]) : r[a] = n[a], r), e), e;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
return Object.keys(n).filter((
|
|
28
|
-
if (
|
|
29
|
-
const
|
|
30
|
-
if (typeof
|
|
31
|
-
|
|
26
|
+
function ee(n, t) {
|
|
27
|
+
return Object.keys(n).filter((r) => n[r] != null).reduce((r, a) => {
|
|
28
|
+
if (t.has(a)) {
|
|
29
|
+
const l = t.get(a);
|
|
30
|
+
if (typeof l == "string")
|
|
31
|
+
r[l] = n[a];
|
|
32
32
|
else {
|
|
33
|
-
const
|
|
34
|
-
Object.assign(
|
|
33
|
+
const c = l(a, n[a], n);
|
|
34
|
+
Object.assign(r, c);
|
|
35
35
|
}
|
|
36
36
|
} else
|
|
37
|
-
|
|
38
|
-
return
|
|
37
|
+
r[a] = n[a];
|
|
38
|
+
return r;
|
|
39
39
|
}, {});
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
const
|
|
43
|
-
return
|
|
41
|
+
function te(n, t, e = /* @__PURE__ */ new Map()) {
|
|
42
|
+
const r = R(n, t);
|
|
43
|
+
return ee(r, e);
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
function
|
|
47
|
-
if (typeof
|
|
48
|
-
return
|
|
49
|
-
if (typeof
|
|
50
|
-
const
|
|
51
|
-
if (
|
|
52
|
-
return Number(
|
|
53
|
-
if (
|
|
54
|
-
return Number(
|
|
55
|
-
if (
|
|
56
|
-
return Number(
|
|
45
|
+
function ne(n = {}) {
|
|
46
|
+
function t(i, s, o, p) {
|
|
47
|
+
if (typeof o == "number")
|
|
48
|
+
return p[i].length === o;
|
|
49
|
+
if (typeof o == "object") {
|
|
50
|
+
const y = Object.keys(o)[0], d = o[y];
|
|
51
|
+
if (y === "not")
|
|
52
|
+
return Number(p[i].length) !== Number(d);
|
|
53
|
+
if (y === "moreThan")
|
|
54
|
+
return Number(p[i].length) >= Number(d);
|
|
55
|
+
if (y === "lessThan")
|
|
56
|
+
return Number(p[i].length) <= Number(d);
|
|
57
57
|
}
|
|
58
58
|
return !1;
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
return
|
|
60
|
+
function e(i, s, o, p) {
|
|
61
|
+
return p[i] && p[i].propertyValue && String(p[i].propertyValue.value) === String(o);
|
|
62
62
|
}
|
|
63
|
-
const
|
|
64
|
-
["length",
|
|
65
|
-
["getProperty",
|
|
63
|
+
const r = /* @__PURE__ */ new Map([
|
|
64
|
+
["length", t],
|
|
65
|
+
["getProperty", e]
|
|
66
66
|
]);
|
|
67
|
-
Object.keys(n).reduce((
|
|
68
|
-
function
|
|
69
|
-
const
|
|
70
|
-
return typeof
|
|
71
|
-
if (
|
|
72
|
-
return { target:
|
|
73
|
-
const
|
|
74
|
-
return { target:
|
|
67
|
+
Object.keys(n).reduce((i, s) => (i.set(s, n[s]), i), r);
|
|
68
|
+
function a(i, s) {
|
|
69
|
+
const o = i;
|
|
70
|
+
return typeof s == "number" ? [{ target: o, operator: "length", param: null, value: Number(s) }] : typeof s == "boolean" ? [{ target: o, operator: "getProperty", param: i, value: !!s }] : typeof s == "object" ? Object.keys(s).map((p) => {
|
|
71
|
+
if (p === "length")
|
|
72
|
+
return { target: o, operator: "length", param: null, value: s[p] };
|
|
73
|
+
const y = p, d = s[p];
|
|
74
|
+
return { target: o, operator: "getProperty", param: y, value: d };
|
|
75
75
|
}) : [];
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
return Object.keys(
|
|
79
|
-
const
|
|
80
|
-
return
|
|
77
|
+
function l(i) {
|
|
78
|
+
return Object.keys(i).reduce((o, p) => {
|
|
79
|
+
const y = a(p, i[p]);
|
|
80
|
+
return o.push(...y), o;
|
|
81
81
|
}, []);
|
|
82
82
|
}
|
|
83
|
-
function
|
|
84
|
-
if (
|
|
85
|
-
const
|
|
86
|
-
return
|
|
83
|
+
function c(i, s) {
|
|
84
|
+
if (r.has(i.operator)) {
|
|
85
|
+
const o = r.get(i.operator);
|
|
86
|
+
return o && o(i.target, i.param, i.value, s) || !1;
|
|
87
87
|
}
|
|
88
88
|
return !1;
|
|
89
89
|
}
|
|
90
|
-
function
|
|
91
|
-
return
|
|
90
|
+
function f(i, s) {
|
|
91
|
+
return l(i).reduce((y, d) => y && c(d, s), !0);
|
|
92
92
|
}
|
|
93
|
-
function m(
|
|
94
|
-
const
|
|
95
|
-
return
|
|
93
|
+
function m(i, s) {
|
|
94
|
+
const o = Object.keys(i), p = o.includes("allOf"), y = o.includes("anyOf"), d = p || y, v = (d ? i[d ? p ? "allOf" : "anyOf" : "allOf"] : [i]).map((w) => f(w, s));
|
|
95
|
+
return p ? !v.includes(!1) : v.includes(!0);
|
|
96
96
|
}
|
|
97
97
|
return { parseValueSchema: m };
|
|
98
98
|
}
|
|
99
|
-
const
|
|
99
|
+
const u = {
|
|
100
100
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
101
101
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
102
102
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -133,21 +133,22 @@ const i = {
|
|
|
133
133
|
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
134
134
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
135
135
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
136
|
-
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
137
|
-
|
|
138
|
-
oe
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
136
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
137
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
138
|
+
}, oe = {}, re = {};
|
|
139
|
+
ne();
|
|
140
|
+
function ae(n, t, e = /* @__PURE__ */ new Map(), r = (c, f, m) => f, a = {}, l = (c) => c) {
|
|
141
|
+
return j[t.title] = t, q[t.title] = r, oe[t.title] = a, re[t.title] = l, (c = {}) => {
|
|
142
|
+
const f = te(c, t, e), m = Object.keys(n).reduce((i, s) => (i[s] = n[s].default, i), {});
|
|
143
|
+
return Object.assign(m, f);
|
|
143
144
|
};
|
|
144
145
|
}
|
|
145
|
-
function
|
|
146
|
-
return { customClass:
|
|
146
|
+
function ie(n, t) {
|
|
147
|
+
return { customClass: t.class, customStyle: t.style };
|
|
147
148
|
}
|
|
148
|
-
const
|
|
149
|
-
["appearance",
|
|
150
|
-
]), se = "https://json-schema.org/draft/2020-12/schema",
|
|
149
|
+
const le = /* @__PURE__ */ new Map([
|
|
150
|
+
["appearance", ie]
|
|
151
|
+
]), se = "https://json-schema.org/draft/2020-12/schema", ce = "https://farris-design.gitee.io/switch.schema.json", pe = "textarea", ue = "A Farris Component", de = "object", me = {
|
|
151
152
|
id: {
|
|
152
153
|
description: "The unique identifier for a textarea",
|
|
153
154
|
type: "string"
|
|
@@ -217,19 +218,19 @@ const ce = /* @__PURE__ */ new Map([
|
|
|
217
218
|
}, fe = [
|
|
218
219
|
"id",
|
|
219
220
|
"type"
|
|
220
|
-
],
|
|
221
|
+
], ye = {
|
|
221
222
|
$schema: se,
|
|
222
|
-
$id:
|
|
223
|
-
title:
|
|
224
|
-
description:
|
|
225
|
-
type:
|
|
226
|
-
properties:
|
|
223
|
+
$id: ce,
|
|
224
|
+
title: pe,
|
|
225
|
+
description: ue,
|
|
226
|
+
type: de,
|
|
227
|
+
properties: me,
|
|
227
228
|
required: fe
|
|
228
229
|
};
|
|
229
|
-
function he(n,
|
|
230
|
-
return
|
|
230
|
+
function he(n, t, e) {
|
|
231
|
+
return t;
|
|
231
232
|
}
|
|
232
|
-
const
|
|
233
|
+
const N = {
|
|
233
234
|
/** 自动聚焦 */
|
|
234
235
|
autofocus: { type: Boolean, default: !1 },
|
|
235
236
|
/** 自动完成 */
|
|
@@ -258,37 +259,38 @@ const L = {
|
|
|
258
259
|
showBorder: { Type: Boolean, default: !0 },
|
|
259
260
|
/** 键盘按键索引 */
|
|
260
261
|
tabIndex: { type: Number, default: -1 }
|
|
261
|
-
},
|
|
262
|
+
}, X = ae(N, ye, le, he), P = /* @__PURE__ */ G({
|
|
262
263
|
name: "FTextarea",
|
|
263
|
-
props:
|
|
264
|
+
props: N,
|
|
264
265
|
emits: ["update:modelValue", "valueChange"],
|
|
265
|
-
setup(n,
|
|
266
|
-
const
|
|
267
|
-
inputGroupClass:
|
|
268
|
-
onBlur:
|
|
266
|
+
setup(n, t) {
|
|
267
|
+
const e = F(), r = F(n.modelValue), a = D(() => n.modelValue), l = H(n, t, r, a), {
|
|
268
|
+
inputGroupClass: c,
|
|
269
|
+
onBlur: f,
|
|
269
270
|
onFocus: m
|
|
270
|
-
} =
|
|
271
|
-
onMouseEnter:
|
|
272
|
-
onMouseLeave:
|
|
273
|
-
clearButtonClass:
|
|
274
|
-
shouldShowClearButton:
|
|
275
|
-
clearButtonStyle:
|
|
276
|
-
} =
|
|
277
|
-
var
|
|
278
|
-
|
|
279
|
-
},
|
|
280
|
-
|
|
271
|
+
} = l, i = K(n, t, l), {
|
|
272
|
+
onMouseEnter: s,
|
|
273
|
+
onMouseLeave: o,
|
|
274
|
+
clearButtonClass: p,
|
|
275
|
+
shouldShowClearButton: y,
|
|
276
|
+
clearButtonStyle: d
|
|
277
|
+
} = i, h = D(() => n.maxLength ? n.maxLength : n.modelValue.length), M = (C) => {
|
|
278
|
+
var w, T;
|
|
279
|
+
C.stopPropagation(), t.emit("update:modelValue", (w = C.target) == null ? void 0 : w.value), t.emit("valueChange", (T = C.target) == null ? void 0 : T.value);
|
|
280
|
+
}, v = (C) => {
|
|
281
|
+
C.stopPropagation(), e.value.value = "", t.emit("update:modelValue", ""), t.emit("valueChange", "");
|
|
281
282
|
};
|
|
282
283
|
return W(() => {
|
|
283
|
-
}), () =>
|
|
284
|
-
class:
|
|
285
|
-
onMouseenter:
|
|
286
|
-
onMouseleave:
|
|
284
|
+
}), () => E("div", {
|
|
285
|
+
class: c.value,
|
|
286
|
+
onMouseenter: s,
|
|
287
|
+
onMouseleave: o,
|
|
287
288
|
style: "position:relative"
|
|
288
|
-
}, [Z(
|
|
289
|
+
}, [Z(E("textarea", {
|
|
290
|
+
class: "form-control",
|
|
289
291
|
id: n.id,
|
|
290
|
-
"onUpdate:modelValue": (
|
|
291
|
-
ref:
|
|
292
|
+
"onUpdate:modelValue": (C) => n.modelValue = C,
|
|
293
|
+
ref: e,
|
|
292
294
|
minlength: n.minLength,
|
|
293
295
|
maxlength: n.maxLength ? n.maxLength : null,
|
|
294
296
|
tabindex: n.tabIndex,
|
|
@@ -298,148 +300,138 @@ const L = {
|
|
|
298
300
|
placeholder: n.placeholder,
|
|
299
301
|
autofocus: n.autofocus,
|
|
300
302
|
rows: n.rows,
|
|
301
|
-
onInput:
|
|
303
|
+
onInput: M,
|
|
302
304
|
onFocus: m,
|
|
303
|
-
onBlur:
|
|
304
|
-
|
|
305
|
-
}, null), [[H, n.modelValue]]), f.value && w("span", {
|
|
305
|
+
onBlur: f
|
|
306
|
+
}, null), [[_, n.modelValue]]), y.value && E("span", {
|
|
306
307
|
id: "clearIcon",
|
|
307
|
-
class:
|
|
308
|
-
style:
|
|
309
|
-
onClick: (
|
|
310
|
-
}, [
|
|
308
|
+
class: p.value,
|
|
309
|
+
style: d.value,
|
|
310
|
+
onClick: (C) => v(C)
|
|
311
|
+
}, [E("i", {
|
|
311
312
|
class: "f-icon modal_close"
|
|
312
|
-
}, null)]), n.showCount &&
|
|
313
|
+
}, null)]), n.showCount && E("span", {
|
|
313
314
|
style: "position: absolute;bottom: 5px;right: 10px"
|
|
314
|
-
}, [`${n.modelValue.length}/${
|
|
315
|
+
}, [`${n.modelValue.length}/${h.value}`])]);
|
|
315
316
|
}
|
|
316
317
|
});
|
|
317
|
-
function
|
|
318
|
-
var
|
|
319
|
-
function
|
|
320
|
-
|
|
318
|
+
function ge(n, t, e) {
|
|
319
|
+
var T;
|
|
320
|
+
function r() {
|
|
321
|
+
e != null && e.resolveComponentContext && e.resolveComponentContext();
|
|
321
322
|
}
|
|
322
|
-
|
|
323
|
-
const
|
|
324
|
-
function
|
|
325
|
-
return (
|
|
323
|
+
r();
|
|
324
|
+
const a = e && e.getStyles && e.getStyles() || "", l = e && e.getDesignerClass && e.getDesignerClass() || "", c = F();
|
|
325
|
+
function f() {
|
|
326
|
+
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
|
|
326
327
|
}
|
|
327
328
|
function m() {
|
|
328
329
|
return !1;
|
|
329
330
|
}
|
|
330
|
-
function
|
|
331
|
-
return (
|
|
331
|
+
function i() {
|
|
332
|
+
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanDeleteComponent ? e.checkCanDeleteComponent() : !0;
|
|
332
333
|
}
|
|
333
|
-
function
|
|
334
|
-
return (
|
|
334
|
+
function s() {
|
|
335
|
+
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : e && e.hideNestedPaddingInDesginerView ? e.hideNestedPaddingInDesginerView() : !1;
|
|
335
336
|
}
|
|
336
|
-
function
|
|
337
|
-
if (!
|
|
337
|
+
function o(b) {
|
|
338
|
+
if (!b || !b.value)
|
|
338
339
|
return null;
|
|
339
|
-
if (
|
|
340
|
-
return
|
|
341
|
-
const
|
|
342
|
-
return
|
|
340
|
+
if (b.value.schema && b.value.schema.type === "component")
|
|
341
|
+
return b.value;
|
|
342
|
+
const k = F(b == null ? void 0 : b.value.parent), S = o(k);
|
|
343
|
+
return S || null;
|
|
343
344
|
}
|
|
344
|
-
function
|
|
345
|
-
const { componentInstance:
|
|
346
|
-
return !
|
|
345
|
+
function p(b = t) {
|
|
346
|
+
const { componentInstance: k, designerItemElementRef: S } = b;
|
|
347
|
+
return !k || !k.value ? null : k.value.canMove ? S : p(b.parent);
|
|
347
348
|
}
|
|
348
|
-
function
|
|
349
|
-
return !!
|
|
349
|
+
function y(b) {
|
|
350
|
+
return !!e && e.canAccepts(b);
|
|
350
351
|
}
|
|
351
|
-
function
|
|
352
|
-
return (
|
|
352
|
+
function d() {
|
|
353
|
+
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
353
354
|
}
|
|
354
|
-
function
|
|
355
|
+
function h() {
|
|
355
356
|
}
|
|
356
|
-
function
|
|
357
|
-
|
|
357
|
+
function M(b, k) {
|
|
358
|
+
k && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(k);
|
|
358
359
|
}
|
|
359
|
-
function
|
|
360
|
-
const { componentType:
|
|
361
|
-
let
|
|
362
|
-
|
|
363
|
-
const
|
|
364
|
-
return
|
|
360
|
+
function v(b, k) {
|
|
361
|
+
const { componentType: S } = b;
|
|
362
|
+
let B = z(S, b, k);
|
|
363
|
+
e && e.onResolveNewComponentSchema && (B = e.onResolveNewComponentSchema(b, B));
|
|
364
|
+
const L = S.toLowerCase().replace("-", "_");
|
|
365
|
+
return B && !B.id && B.type === S && (B.id = `${L}_${Math.random().toString().slice(2, 6)}`), B;
|
|
365
366
|
}
|
|
366
|
-
function
|
|
367
|
-
const C = String(y.getAttribute("data-controltype")), M = y.getAttribute("data-feature"), E = M ? JSON.parse(M) : {};
|
|
368
|
-
E.parentComponentInstance = u.value;
|
|
369
|
-
let T = $(C, E);
|
|
370
|
-
t && t.onAcceptNewChildElement && (T = t.onAcceptNewChildElement(y, b, T));
|
|
371
|
-
const Q = C.toLowerCase().replace("-", "_");
|
|
372
|
-
return T && !T.id && T.type === C && (T.id = `${Q}_${Math.random().toString().slice(2, 6)}`), T;
|
|
367
|
+
function C(b) {
|
|
373
368
|
}
|
|
374
|
-
function
|
|
369
|
+
function w(...b) {
|
|
370
|
+
if (e && e.getPropsConfig)
|
|
371
|
+
return e.getPropsConfig(...b);
|
|
375
372
|
}
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
return t.getPropsConfig(...y);
|
|
379
|
-
}
|
|
380
|
-
return u.value = {
|
|
381
|
-
canMove: l(),
|
|
373
|
+
return c.value = {
|
|
374
|
+
canMove: f(),
|
|
382
375
|
canSelectParent: m(),
|
|
383
|
-
canDelete:
|
|
384
|
-
canNested: !
|
|
385
|
-
contents:
|
|
376
|
+
canDelete: i(),
|
|
377
|
+
canNested: !s(),
|
|
378
|
+
contents: t == null ? void 0 : t.schema.contents,
|
|
386
379
|
elementRef: n,
|
|
387
|
-
parent: (
|
|
388
|
-
schema:
|
|
389
|
-
styles:
|
|
390
|
-
designerClass:
|
|
391
|
-
canAccepts:
|
|
392
|
-
getBelongedComponentInstance:
|
|
393
|
-
getDraggableDesignItemElement:
|
|
394
|
-
getDraggingDisplayText:
|
|
395
|
-
getPropConfig:
|
|
396
|
-
getDragScopeElement:
|
|
397
|
-
onAcceptMovedChildElement:
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
}, u;
|
|
380
|
+
parent: (T = t == null ? void 0 : t.parent) == null ? void 0 : T.componentInstance,
|
|
381
|
+
schema: t == null ? void 0 : t.schema,
|
|
382
|
+
styles: a,
|
|
383
|
+
designerClass: l,
|
|
384
|
+
canAccepts: y,
|
|
385
|
+
getBelongedComponentInstance: o,
|
|
386
|
+
getDraggableDesignItemElement: p,
|
|
387
|
+
getDraggingDisplayText: d,
|
|
388
|
+
getPropConfig: w,
|
|
389
|
+
getDragScopeElement: h,
|
|
390
|
+
onAcceptMovedChildElement: M,
|
|
391
|
+
onChildElementMovedOut: C,
|
|
392
|
+
addNewChildComponentSchema: v,
|
|
393
|
+
updateDragAndDropRules: r,
|
|
394
|
+
triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || F(!1),
|
|
395
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || F(!1)
|
|
396
|
+
}, c;
|
|
405
397
|
}
|
|
406
|
-
class
|
|
407
|
-
constructor(
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
398
|
+
class Ce {
|
|
399
|
+
constructor(t, e) {
|
|
400
|
+
g(this, "componentId");
|
|
401
|
+
g(this, "viewModelId");
|
|
402
|
+
g(this, "eventsEditorUtils");
|
|
403
|
+
g(this, "formSchemaUtils");
|
|
404
|
+
g(this, "formMetadataConverter");
|
|
405
|
+
g(this, "designViewModelUtils");
|
|
406
|
+
g(this, "designViewModelField");
|
|
407
|
+
g(this, "controlCreatorUtils");
|
|
408
|
+
g(this, "designerHostService");
|
|
409
|
+
g(this, "schemaService", null);
|
|
410
|
+
g(this, "metadataService", null);
|
|
411
|
+
g(this, "propertyConfig", {
|
|
420
412
|
type: "object",
|
|
421
413
|
categories: {}
|
|
422
414
|
});
|
|
423
|
-
var
|
|
424
|
-
this.componentId =
|
|
415
|
+
var r;
|
|
416
|
+
this.componentId = t, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((r = this.formSchemaUtils) == null ? void 0 : r.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
|
|
425
417
|
}
|
|
426
418
|
getTableInfo() {
|
|
427
|
-
var
|
|
428
|
-
return (
|
|
419
|
+
var t;
|
|
420
|
+
return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
|
|
429
421
|
}
|
|
430
|
-
setDesignViewModelField(
|
|
431
|
-
const
|
|
432
|
-
if (
|
|
422
|
+
setDesignViewModelField(t) {
|
|
423
|
+
const e = t.binding && t.binding.type === "Form" && t.binding.field;
|
|
424
|
+
if (e) {
|
|
433
425
|
if (!this.designViewModelField) {
|
|
434
|
-
const
|
|
435
|
-
this.designViewModelField =
|
|
426
|
+
const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
427
|
+
this.designViewModelField = r.fields.find((a) => a.id === e);
|
|
436
428
|
}
|
|
437
|
-
|
|
429
|
+
t.updateOn = this.designViewModelField.updateOn;
|
|
438
430
|
}
|
|
439
431
|
}
|
|
440
|
-
changeFieldEditorType(
|
|
432
|
+
changeFieldEditorType(t, e) {
|
|
441
433
|
}
|
|
442
|
-
getBasicPropConfig(
|
|
434
|
+
getBasicPropConfig(t) {
|
|
443
435
|
return {
|
|
444
436
|
description: "Basic Information",
|
|
445
437
|
title: "基本信息",
|
|
@@ -458,13 +450,13 @@ class be {
|
|
|
458
450
|
type: "combo-list",
|
|
459
451
|
textField: "name",
|
|
460
452
|
valueField: "value",
|
|
461
|
-
data: [{ value:
|
|
453
|
+
data: [{ value: t.type, name: u[t.type].name }]
|
|
462
454
|
}
|
|
463
455
|
}
|
|
464
456
|
}
|
|
465
457
|
};
|
|
466
458
|
}
|
|
467
|
-
getAppearanceConfig(
|
|
459
|
+
getAppearanceConfig(t = null) {
|
|
468
460
|
return {
|
|
469
461
|
title: "样式",
|
|
470
462
|
description: "Appearance",
|
|
@@ -484,90 +476,212 @@ class be {
|
|
|
484
476
|
}
|
|
485
477
|
};
|
|
486
478
|
}
|
|
479
|
+
/**
|
|
480
|
+
*
|
|
481
|
+
* @param propertyId
|
|
482
|
+
* @param componentInstance
|
|
483
|
+
* @returns
|
|
484
|
+
*/
|
|
485
|
+
updateElementByParentContainer(t, e) {
|
|
486
|
+
const r = e && e.parent && e.parent.schema;
|
|
487
|
+
if (!r)
|
|
488
|
+
return;
|
|
489
|
+
const a = r.contents.findIndex((c) => c.id === t), l = O(r.contents[a]);
|
|
490
|
+
r.contents.splice(a, 1), r.contents.splice(a, 0, l);
|
|
491
|
+
}
|
|
487
492
|
}
|
|
488
|
-
const
|
|
493
|
+
const I = class I {
|
|
489
494
|
/**
|
|
490
495
|
* 根据绑定字段类型获取可用的输入类控件
|
|
491
496
|
*/
|
|
492
|
-
static getEditorTypesByMDataType(
|
|
493
|
-
const
|
|
494
|
-
return
|
|
497
|
+
static getEditorTypesByMDataType(t) {
|
|
498
|
+
const e = I.fieldControlTypeMapping[t];
|
|
499
|
+
return e || [{ key: "", value: "" }];
|
|
495
500
|
}
|
|
496
501
|
/**
|
|
497
502
|
* 获取所有输入类控件
|
|
498
503
|
*/
|
|
499
504
|
static getAllInputTypes() {
|
|
500
|
-
const
|
|
501
|
-
for (let
|
|
502
|
-
|
|
503
|
-
|
|
505
|
+
const t = [];
|
|
506
|
+
for (let e in I.fieldControlTypeMapping)
|
|
507
|
+
I.fieldControlTypeMapping[e].forEach((r) => {
|
|
508
|
+
t.find((a) => a.key === r.key && a.value === r.value) || t.push({ key: r.key, value: r.value });
|
|
504
509
|
});
|
|
505
|
-
return
|
|
510
|
+
return t;
|
|
506
511
|
}
|
|
507
512
|
};
|
|
508
513
|
/**
|
|
509
514
|
* <字段类型,可配置的控件类型列表>的映射
|
|
510
515
|
*/
|
|
511
|
-
|
|
516
|
+
g(I, "fieldControlTypeMapping", {
|
|
512
517
|
String: [
|
|
513
|
-
{ key:
|
|
514
|
-
{ key:
|
|
515
|
-
{ key:
|
|
516
|
-
{ key:
|
|
517
|
-
{ key:
|
|
518
|
-
{ key:
|
|
519
|
-
{ key:
|
|
518
|
+
{ key: u["input-group"].type, value: u["input-group"].name },
|
|
519
|
+
{ key: u.lookup.type, value: u.lookup.name },
|
|
520
|
+
{ key: u["date-picker"].type, value: u["date-picker"].name },
|
|
521
|
+
{ key: u["check-box"].type, value: u["check-box"].name },
|
|
522
|
+
{ key: u["check-group"].type, value: u["check-group"].name },
|
|
523
|
+
{ key: u["radio-group"].type, value: u["radio-group"].name },
|
|
524
|
+
{ key: u["combo-list"].type, value: u["combo-list"].name },
|
|
525
|
+
{ key: u.textarea.type, value: u.textarea.name }
|
|
520
526
|
],
|
|
521
527
|
Text: [
|
|
522
|
-
{ key:
|
|
523
|
-
{ key:
|
|
528
|
+
{ key: u.textarea.type, value: u.textarea.name },
|
|
529
|
+
{ key: u.lookup.type, value: u.lookup.name }
|
|
524
530
|
],
|
|
525
531
|
Decimal: [
|
|
526
|
-
{ key:
|
|
532
|
+
{ key: u["number-spinner"].type, value: u["number-spinner"].name }
|
|
527
533
|
],
|
|
528
534
|
Integer: [
|
|
529
|
-
{ key:
|
|
535
|
+
{ key: u["number-spinner"].type, value: u["number-spinner"].name }
|
|
530
536
|
],
|
|
531
537
|
Number: [
|
|
532
|
-
{ key:
|
|
538
|
+
{ key: u["number-spinner"].type, value: u["number-spinner"].name }
|
|
533
539
|
],
|
|
534
540
|
BigNumber: [
|
|
535
|
-
{ key:
|
|
541
|
+
{ key: u["number-spinner"].type, value: u["number-spinner"].name }
|
|
536
542
|
],
|
|
537
543
|
Date: [
|
|
538
|
-
{ key:
|
|
544
|
+
{ key: u["date-picker"].type, value: u["date-picker"].name }
|
|
539
545
|
],
|
|
540
546
|
DateTime: [
|
|
541
|
-
{ key:
|
|
547
|
+
{ key: u["date-picker"].type, value: u["date-picker"].name }
|
|
542
548
|
],
|
|
543
549
|
Boolean: [
|
|
544
|
-
{ key:
|
|
545
|
-
{ key:
|
|
550
|
+
{ key: u.switch.type, value: u.switch.name },
|
|
551
|
+
{ key: u["check-box"].type, value: u["check-box"].name }
|
|
546
552
|
],
|
|
547
553
|
Enum: [
|
|
548
|
-
{ key:
|
|
549
|
-
{ key:
|
|
554
|
+
{ key: u["combo-list"].type, value: u["combo-list"].name },
|
|
555
|
+
{ key: u["radio-group"].type, value: u["radio-group"].name }
|
|
550
556
|
],
|
|
551
557
|
Object: [
|
|
552
|
-
{ key:
|
|
553
|
-
{ key:
|
|
554
|
-
{ key:
|
|
558
|
+
{ key: u.lookup.type, value: u.lookup.name },
|
|
559
|
+
{ key: u["combo-list"].type, value: u["combo-list"].name },
|
|
560
|
+
{ key: u["radio-group"].type, value: u["radio-group"].name }
|
|
555
561
|
]
|
|
556
562
|
});
|
|
557
|
-
let
|
|
558
|
-
const
|
|
559
|
-
class
|
|
560
|
-
constructor(
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
563
|
+
let V = I;
|
|
564
|
+
const be = F(0);
|
|
565
|
+
class ve {
|
|
566
|
+
constructor() {
|
|
567
|
+
/** 控件标题 */
|
|
568
|
+
g(this, "label", "");
|
|
569
|
+
/** 控件id */
|
|
570
|
+
g(this, "id", "");
|
|
571
|
+
/** 每个控件占用的栅格数 */
|
|
572
|
+
g(this, "columnInSM", 12);
|
|
573
|
+
g(this, "columnInMD", 6);
|
|
574
|
+
g(this, "columnInLG", 3);
|
|
575
|
+
g(this, "columnInEL", 2);
|
|
576
|
+
/** 每个控件占用的列数 */
|
|
577
|
+
g(this, "displayWidthInSM", 1);
|
|
578
|
+
g(this, "displayWidthInMD", 1);
|
|
579
|
+
g(this, "displayWidthInLG", 1);
|
|
580
|
+
g(this, "displayWidthInEL", 1);
|
|
581
|
+
/** 编辑器内部默认显示的屏幕大小-----可以去掉 */
|
|
582
|
+
g(this, "displayColumnCountAtBreakPoint", "md");
|
|
583
|
+
/** 控件所在行,传0即可-----编辑器内部使用 */
|
|
584
|
+
g(this, "tagRow", 0);
|
|
585
|
+
/** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
|
|
586
|
+
g(this, "showTopBorder", 0);
|
|
587
|
+
/** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
|
|
588
|
+
g(this, "group", 1);
|
|
589
|
+
/** 控件是否符合标准的class配置(设计器用的) */
|
|
590
|
+
g(this, "isSupportedClass", !0);
|
|
591
|
+
/** 控件所在分组id(设计器用的) */
|
|
592
|
+
g(this, "fieldSetId", "");
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
function Me(n) {
|
|
596
|
+
let t, e;
|
|
597
|
+
const r = /* @__PURE__ */ new Map();
|
|
598
|
+
let a = [];
|
|
599
|
+
function l(s, o) {
|
|
600
|
+
const y = s.split(" ").filter((C) => C.startsWith("col-"));
|
|
601
|
+
if (y.length === 0) {
|
|
602
|
+
o.isSupportedClass = !1;
|
|
603
|
+
return;
|
|
604
|
+
}
|
|
605
|
+
let d = y.find((C) => /^col-([1-9]|10|11|12)$/.test(C)), h = y.find((C) => /^col-md-([1-9]|10|11|12)$/.test(C)), M = y.find((C) => /^col-xl-([1-9]|10|11|12)$/.test(C)), v = y.find((C) => /^col-el-([1-9]|10|11|12)$/.test(C));
|
|
606
|
+
d = d || "col-12", o.columnInSM = parseInt(d.replace("col-", ""), 10), o.displayWidthInSM = o.columnInSM / 12, o.displayWidthInSM !== 1 && (o.isSupportedClass = !1), h = h || "col-md-" + o.columnInSM, o.columnInMD = parseInt(h.replace("col-md-", ""), 10), o.displayWidthInMD = o.columnInMD / 6, [1, 2].includes(o.displayWidthInMD) || (o.isSupportedClass = !1), M = M || "col-xl-" + o.columnInMD, o.columnInLG = parseInt(M.replace("col-xl-", ""), 10), o.displayWidthInLG = o.columnInLG / 3, [1, 2, 3, 4].includes(o.displayWidthInLG) || (o.isSupportedClass = !1), v = v || "col-el-" + o.columnInLG, o.columnInEL = parseInt(v.replace("col-el-", ""), 10), o.displayWidthInEL = o.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(o.displayWidthInEL) || (o.isSupportedClass = !1);
|
|
607
|
+
}
|
|
608
|
+
function c(s, o, p, y = !1) {
|
|
609
|
+
let d = !1;
|
|
610
|
+
s.contents.forEach((h) => {
|
|
611
|
+
if (h.type === "fieldset") {
|
|
612
|
+
p += 1, c(h, o, p, !0), d = !0;
|
|
613
|
+
return;
|
|
614
|
+
}
|
|
615
|
+
d && (p += 1, d = !1);
|
|
616
|
+
const M = h.appearance && h.appearance.class, v = new ve();
|
|
617
|
+
M ? l(M, v) : v.isSupportedClass = !1, v.label = h.label || h.id, v.id = h.id, v.group = p, y && (v.fieldSetId = s.id), e === h.id && (t = p), r.set(h.id, h), o.push(v);
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
function f(s) {
|
|
621
|
+
const o = n.getComponentById(s);
|
|
622
|
+
if (!o || !o.componentType || !o.componentType.startsWith("form"))
|
|
623
|
+
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
624
|
+
const p = n.selectNode(o, (y) => y.type === $["response-form"].type);
|
|
625
|
+
return !p || !p.contents || p.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: p };
|
|
626
|
+
}
|
|
627
|
+
function m(s, o) {
|
|
628
|
+
o = o || s.id;
|
|
629
|
+
const { result: p, message: y, formNode: d } = f(o);
|
|
630
|
+
if (!p)
|
|
631
|
+
return { result: p, message: y };
|
|
632
|
+
e = s.id, a = [], r.clear();
|
|
633
|
+
const h = d.contents[0].type === $.fieldset.type ? 0 : 1;
|
|
634
|
+
c(d, a, h);
|
|
635
|
+
const M = a.find((C) => !C.isSupportedClass);
|
|
636
|
+
return {
|
|
637
|
+
defaultState: {
|
|
638
|
+
defaultGroupNumber: t || 1,
|
|
639
|
+
model: M ? "customize" : "standard"
|
|
640
|
+
},
|
|
641
|
+
importData: a
|
|
642
|
+
};
|
|
643
|
+
}
|
|
644
|
+
function i(s, o) {
|
|
645
|
+
o = o;
|
|
646
|
+
const { result: p, formNode: y } = f(o);
|
|
647
|
+
if (!p)
|
|
648
|
+
return "";
|
|
649
|
+
const d = [];
|
|
650
|
+
return s.forEach((h) => {
|
|
651
|
+
var C;
|
|
652
|
+
const M = r.get(h.id), v = M.appearance && M.appearance.class;
|
|
653
|
+
if (v) {
|
|
654
|
+
const T = v.split(" ").filter((J) => !J.startsWith("col-")), b = "col-" + h.columnInSM, k = "col-md-" + h.columnInMD, S = "col-xl-" + h.columnInLG, B = "col-el-" + h.columnInEL, L = [b, k, S, B].concat(T);
|
|
655
|
+
M.appearance.class = L.join(" ");
|
|
656
|
+
}
|
|
657
|
+
if (h.fieldSetId) {
|
|
658
|
+
const w = y.contents.find((b) => b.id === h.fieldSetId), T = d.find((b) => b.id === h.fieldSetId);
|
|
659
|
+
T ? (C = T.contents) == null || C.push(M) : (d.push(w), w.contents = [M]);
|
|
660
|
+
} else
|
|
661
|
+
d.push(M);
|
|
662
|
+
}), y.contents = d, y.id;
|
|
663
|
+
}
|
|
664
|
+
return {
|
|
665
|
+
checkCanFindFormNode: f,
|
|
666
|
+
checkCanOpenLayoutEditor: m,
|
|
667
|
+
changeFormControlsByResponseLayoutConfig: i,
|
|
668
|
+
getResonseFormLayoutConfig: c
|
|
669
|
+
};
|
|
670
|
+
}
|
|
671
|
+
class ke extends Ce {
|
|
672
|
+
constructor(e, r) {
|
|
673
|
+
super(e, r);
|
|
674
|
+
g(this, "responseLayoutEditorFunction");
|
|
675
|
+
this.responseLayoutEditorFunction = Me(this.formSchemaUtils);
|
|
676
|
+
}
|
|
677
|
+
getPropertyConfig(e, r) {
|
|
678
|
+
return this.propertyConfig.categories.basic = this.getBasicProperties(e, r), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, r), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
|
|
679
|
+
}
|
|
680
|
+
getBasicProperties(e, r) {
|
|
681
|
+
var f;
|
|
682
|
+
var a = this;
|
|
569
683
|
this.setDesignViewModelField(e);
|
|
570
|
-
const
|
|
684
|
+
const l = this.formSchemaUtils.getFormMetadataBasicInfo(), c = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
571
685
|
return {
|
|
572
686
|
description: "Basic Information",
|
|
573
687
|
title: "基本信息",
|
|
@@ -589,7 +703,7 @@ class Me extends be {
|
|
|
589
703
|
textField: "value",
|
|
590
704
|
valueField: "key",
|
|
591
705
|
editable: !1,
|
|
592
|
-
data:
|
|
706
|
+
data: a.designViewModelField ? V.getEditorTypesByMDataType((f = a.designViewModelField.type) == null ? void 0 : f.name) : V.getAllInputTypes()
|
|
593
707
|
}
|
|
594
708
|
},
|
|
595
709
|
label: {
|
|
@@ -606,7 +720,7 @@ class Me extends be {
|
|
|
606
720
|
bindingType: { enable: !1 },
|
|
607
721
|
editorParams: {
|
|
608
722
|
propertyData: e,
|
|
609
|
-
formBasicInfo:
|
|
723
|
+
formBasicInfo: l
|
|
610
724
|
},
|
|
611
725
|
columns: [
|
|
612
726
|
{ field: "name", title: "字段名称" },
|
|
@@ -614,26 +728,27 @@ class Me extends be {
|
|
|
614
728
|
{ field: "fieldType", title: "字段类型" }
|
|
615
729
|
],
|
|
616
730
|
textField: "bindingField",
|
|
617
|
-
data:
|
|
731
|
+
data: c
|
|
618
732
|
}
|
|
619
733
|
}
|
|
620
734
|
},
|
|
621
|
-
setPropertyRelates(
|
|
622
|
-
if (
|
|
623
|
-
switch (
|
|
735
|
+
setPropertyRelates(m, i) {
|
|
736
|
+
if (m)
|
|
737
|
+
switch (m && m.propertyID) {
|
|
624
738
|
case "type": {
|
|
625
|
-
|
|
739
|
+
a.changeControlType(e, m, r);
|
|
626
740
|
break;
|
|
627
741
|
}
|
|
628
742
|
case "label": {
|
|
629
|
-
|
|
743
|
+
m.needRefreshControlTree = !0;
|
|
630
744
|
break;
|
|
631
745
|
}
|
|
632
746
|
}
|
|
633
747
|
}
|
|
634
748
|
};
|
|
635
749
|
}
|
|
636
|
-
getAppearanceProperties(e) {
|
|
750
|
+
getAppearanceProperties(e, r) {
|
|
751
|
+
var a = this;
|
|
637
752
|
return {
|
|
638
753
|
title: "样式",
|
|
639
754
|
description: "Appearance",
|
|
@@ -654,12 +769,25 @@ class Me extends be {
|
|
|
654
769
|
description: "响应式列宽",
|
|
655
770
|
title: "响应式列宽",
|
|
656
771
|
type: "boolean",
|
|
657
|
-
visible: !
|
|
772
|
+
visible: !0,
|
|
773
|
+
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
774
|
+
refreshPanelAfterChanged: !0,
|
|
658
775
|
editor: {
|
|
659
|
-
type: "response-layout-editor-setting"
|
|
660
|
-
|
|
661
|
-
|
|
776
|
+
type: "response-layout-editor-setting",
|
|
777
|
+
initialState: a.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, a.componentId)
|
|
778
|
+
}
|
|
662
779
|
}
|
|
780
|
+
},
|
|
781
|
+
setPropertyRelates(l, c) {
|
|
782
|
+
if (l)
|
|
783
|
+
switch (l && l.propertyID) {
|
|
784
|
+
case "responseLayout":
|
|
785
|
+
a.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(l.propertyValue, a.componentId || e.id), a.updateUnifiedLayoutAfterResponseLayoutChanged(a.componentId), a.updateElementByParentContainer(e.id, r), delete e.responseLayout;
|
|
786
|
+
break;
|
|
787
|
+
case "class":
|
|
788
|
+
a.updateUnifiedLayoutAfterControlChanged(l.propertyValue, e.id, this.componentId), a.updateElementByParentContainer(e.id, r);
|
|
789
|
+
break;
|
|
790
|
+
}
|
|
663
791
|
}
|
|
664
792
|
};
|
|
665
793
|
}
|
|
@@ -671,44 +799,44 @@ class Me extends be {
|
|
|
671
799
|
* @param propertyData 控件DOM属性
|
|
672
800
|
* @param newControlType 新控件类型
|
|
673
801
|
*/
|
|
674
|
-
changeControlType(e,
|
|
675
|
-
var
|
|
676
|
-
const
|
|
677
|
-
if (!
|
|
802
|
+
changeControlType(e, r, a) {
|
|
803
|
+
var s, o, p, y;
|
|
804
|
+
const l = r.propertyValue, c = a && a.parent && a.parent.schema;
|
|
805
|
+
if (!c)
|
|
678
806
|
return;
|
|
679
|
-
const
|
|
680
|
-
let
|
|
807
|
+
const f = c.contents.findIndex((d) => d.id === e.id), m = c.contents[f];
|
|
808
|
+
let i;
|
|
681
809
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
682
810
|
editor: {
|
|
683
|
-
$type:
|
|
811
|
+
$type: l
|
|
684
812
|
},
|
|
685
813
|
name: this.designViewModelField.name,
|
|
686
814
|
require: this.designViewModelField.require,
|
|
687
815
|
readonly: this.designViewModelField.readonly
|
|
688
|
-
}, !1),
|
|
689
|
-
id:
|
|
690
|
-
appearance:
|
|
691
|
-
size:
|
|
692
|
-
label:
|
|
693
|
-
binding:
|
|
694
|
-
visible:
|
|
695
|
-
}), Object.assign(
|
|
696
|
-
isTextArea:
|
|
697
|
-
placeholder: (
|
|
698
|
-
holdPlace: (
|
|
699
|
-
readonly: (
|
|
700
|
-
require: (
|
|
701
|
-
}),
|
|
702
|
-
(
|
|
703
|
-
),
|
|
704
|
-
}
|
|
705
|
-
getComponentConfig(e,
|
|
706
|
-
const
|
|
816
|
+
}, !1), i = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, l)), i || (i = this.controlCreatorUtils.createFormGroupWithoutField(l)), Object.assign(i, {
|
|
817
|
+
id: m.id,
|
|
818
|
+
appearance: m.appearance,
|
|
819
|
+
size: m.size,
|
|
820
|
+
label: m.label,
|
|
821
|
+
binding: m.binding,
|
|
822
|
+
visible: m.visible
|
|
823
|
+
}), Object.assign(i.editor, {
|
|
824
|
+
isTextArea: i.isTextArea && m.isTextArea,
|
|
825
|
+
placeholder: (s = m.editor) == null ? void 0 : s.placeholder,
|
|
826
|
+
holdPlace: (o = m.editor) == null ? void 0 : o.holdPlace,
|
|
827
|
+
readonly: (p = m.editor) == null ? void 0 : p.readonly,
|
|
828
|
+
require: (y = m.editor) == null ? void 0 : y.require
|
|
829
|
+
}), c.contents.splice(f, 1), c.contents.splice(f, 0, i), a.schema = Object.assign(m, i), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
830
|
+
(d) => d.classList.remove("dgComponentSelected")
|
|
831
|
+
), be.value++;
|
|
832
|
+
}
|
|
833
|
+
getComponentConfig(e, r = {}, a = {}) {
|
|
834
|
+
const l = Object.assign({
|
|
707
835
|
description: "编辑器",
|
|
708
836
|
title: "编辑器",
|
|
709
837
|
type: "input-group",
|
|
710
838
|
$converter: "/converter/property-editor.converter"
|
|
711
|
-
},
|
|
839
|
+
}, r), c = Object.assign({
|
|
712
840
|
readonly: {
|
|
713
841
|
description: "",
|
|
714
842
|
title: "只读",
|
|
@@ -729,125 +857,173 @@ class Me extends be {
|
|
|
729
857
|
title: "提示文本",
|
|
730
858
|
type: "string"
|
|
731
859
|
}
|
|
732
|
-
},
|
|
733
|
-
return { ...
|
|
860
|
+
}, a);
|
|
861
|
+
return { ...l, properties: { ...c } };
|
|
862
|
+
}
|
|
863
|
+
/**
|
|
864
|
+
* 修改某一输入控件的样式后更新Form的统一布局配置
|
|
865
|
+
* @param controlClass 控件样式
|
|
866
|
+
* @param controlId 控件Id
|
|
867
|
+
* @param componentId 控件所在组件id
|
|
868
|
+
*/
|
|
869
|
+
updateUnifiedLayoutAfterControlChanged(e, r, a) {
|
|
870
|
+
const l = e.split(" ");
|
|
871
|
+
let c = l.find((o) => /^col-([1-9]|10|11|12)$/.test(o)), f = l.find((o) => /^col-md-([1-9]|10|11|12)$/.test(o)), m = l.find((o) => /^col-xl-([1-9]|10|11|12)$/.test(o)), i = l.find((o) => /^col-el-([1-9]|10|11|12)$/.test(o));
|
|
872
|
+
c = c || "col-12", f = f || "col-md-" + c.replace("col-", ""), m = m || "col-xl-" + f.replace("col-md-", ""), i = i || "col-el-" + m.replace("col-xl-", "");
|
|
873
|
+
const s = {
|
|
874
|
+
id: r,
|
|
875
|
+
columnInSM: parseInt(c.replace("col-", ""), 10),
|
|
876
|
+
columnInMD: parseInt(f.replace("col-md-", ""), 10),
|
|
877
|
+
columnInLG: parseInt(m.replace("col-xl-", ""), 10),
|
|
878
|
+
columnInEL: parseInt(i.replace("col-el-", ""), 10)
|
|
879
|
+
};
|
|
880
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(a, s);
|
|
881
|
+
}
|
|
882
|
+
/**
|
|
883
|
+
* 修改控件布局配置后更新Form统一布局配置
|
|
884
|
+
* @param componentId 组件Id
|
|
885
|
+
* @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
|
|
886
|
+
*/
|
|
887
|
+
updateUnifiedLayoutAfterResponseLayoutChanged(e, r) {
|
|
888
|
+
const { formNode: a } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
|
|
889
|
+
if (!a || !a.unifiedLayout)
|
|
890
|
+
return;
|
|
891
|
+
const l = [];
|
|
892
|
+
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(a, l, 1), r) {
|
|
893
|
+
const d = l.find((h) => h.id === r.id);
|
|
894
|
+
Object.assign(d || {}, r);
|
|
895
|
+
}
|
|
896
|
+
const c = l.map((d) => d.columnInSM), f = l.map((d) => d.columnInMD), m = l.map((d) => d.columnInLG), i = l.map((d) => d.columnInEL), s = this.checkIsUniqueColumn(c) ? c[0] : null, o = this.checkIsUniqueColumn(f) ? f[0] : null, p = this.checkIsUniqueColumn(m) ? m[0] : null, y = this.checkIsUniqueColumn(i) ? i[0] : null;
|
|
897
|
+
Object.assign(a.unifiedLayout, {
|
|
898
|
+
uniqueColClassInSM: s,
|
|
899
|
+
uniqueColClassInMD: o,
|
|
900
|
+
uniqueColClassInLG: p,
|
|
901
|
+
uniqueColClassInEL: y
|
|
902
|
+
});
|
|
903
|
+
}
|
|
904
|
+
/**
|
|
905
|
+
* 校验宽度样式值是否一致
|
|
906
|
+
*/
|
|
907
|
+
checkIsUniqueColumn(e) {
|
|
908
|
+
const r = new Set(e);
|
|
909
|
+
return Array.from(r).length === 1;
|
|
734
910
|
}
|
|
735
911
|
}
|
|
736
|
-
class
|
|
737
|
-
constructor(
|
|
738
|
-
super(
|
|
912
|
+
class we extends ke {
|
|
913
|
+
constructor(t, e) {
|
|
914
|
+
super(t, e);
|
|
739
915
|
}
|
|
740
916
|
}
|
|
741
|
-
function
|
|
917
|
+
function Te(n, t) {
|
|
742
918
|
n.schema;
|
|
743
|
-
const
|
|
744
|
-
function
|
|
919
|
+
const e = F(!0), r = F(!0);
|
|
920
|
+
function a(o) {
|
|
745
921
|
return !1;
|
|
746
922
|
}
|
|
747
|
-
function
|
|
923
|
+
function l() {
|
|
748
924
|
return !1;
|
|
749
925
|
}
|
|
750
|
-
function
|
|
926
|
+
function c() {
|
|
751
927
|
return !1;
|
|
752
928
|
}
|
|
753
|
-
function
|
|
929
|
+
function f() {
|
|
754
930
|
return !0;
|
|
755
931
|
}
|
|
756
|
-
function m(
|
|
932
|
+
function m(o) {
|
|
757
933
|
}
|
|
758
|
-
function
|
|
934
|
+
function i() {
|
|
759
935
|
}
|
|
760
|
-
function
|
|
936
|
+
function s(o) {
|
|
761
937
|
return null;
|
|
762
938
|
}
|
|
763
939
|
return {
|
|
764
|
-
canAccepts:
|
|
765
|
-
checkCanDeleteComponent:
|
|
766
|
-
checkCanMoveComponent:
|
|
767
|
-
hideNestedPaddingInDesginerView:
|
|
940
|
+
canAccepts: a,
|
|
941
|
+
checkCanDeleteComponent: l,
|
|
942
|
+
checkCanMoveComponent: c,
|
|
943
|
+
hideNestedPaddingInDesginerView: f,
|
|
768
944
|
onAcceptMovedChildElement: m,
|
|
769
|
-
resolveComponentContext:
|
|
770
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
771
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
772
|
-
getPropsConfig:
|
|
945
|
+
resolveComponentContext: i,
|
|
946
|
+
triggerBelongedComponentToMoveWhenMoved: e,
|
|
947
|
+
triggerBelongedComponentToDeleteWhenDeleted: r,
|
|
948
|
+
getPropsConfig: s
|
|
773
949
|
};
|
|
774
950
|
}
|
|
775
|
-
function
|
|
951
|
+
function Se(n, t) {
|
|
776
952
|
const {
|
|
777
|
-
canAccepts:
|
|
778
|
-
checkCanDeleteComponent:
|
|
779
|
-
checkCanMoveComponent:
|
|
780
|
-
hideNestedPaddingInDesginerView:
|
|
781
|
-
onAcceptMovedChildElement:
|
|
782
|
-
resolveComponentContext:
|
|
953
|
+
canAccepts: e,
|
|
954
|
+
checkCanDeleteComponent: r,
|
|
955
|
+
checkCanMoveComponent: a,
|
|
956
|
+
hideNestedPaddingInDesginerView: l,
|
|
957
|
+
onAcceptMovedChildElement: c,
|
|
958
|
+
resolveComponentContext: f,
|
|
783
959
|
triggerBelongedComponentToMoveWhenMoved: m,
|
|
784
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
785
|
-
} =
|
|
786
|
-
function
|
|
787
|
-
return new
|
|
960
|
+
triggerBelongedComponentToDeleteWhenDeleted: i
|
|
961
|
+
} = Te(n), s = n.schema;
|
|
962
|
+
function o(p, y) {
|
|
963
|
+
return new we(p, t).getPropertyConfig(s, y);
|
|
788
964
|
}
|
|
789
965
|
return {
|
|
790
|
-
canAccepts:
|
|
791
|
-
checkCanDeleteComponent:
|
|
792
|
-
checkCanMoveComponent:
|
|
793
|
-
hideNestedPaddingInDesginerView:
|
|
794
|
-
onAcceptMovedChildElement:
|
|
795
|
-
resolveComponentContext:
|
|
966
|
+
canAccepts: e,
|
|
967
|
+
checkCanDeleteComponent: r,
|
|
968
|
+
checkCanMoveComponent: a,
|
|
969
|
+
hideNestedPaddingInDesginerView: l,
|
|
970
|
+
onAcceptMovedChildElement: c,
|
|
971
|
+
resolveComponentContext: f,
|
|
796
972
|
triggerBelongedComponentToMoveWhenMoved: m,
|
|
797
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
798
|
-
getPropsConfig:
|
|
973
|
+
triggerBelongedComponentToDeleteWhenDeleted: i,
|
|
974
|
+
getPropsConfig: o
|
|
799
975
|
};
|
|
800
976
|
}
|
|
801
|
-
const
|
|
977
|
+
const Fe = /* @__PURE__ */ G({
|
|
802
978
|
name: "FTextareaDesign",
|
|
803
|
-
props:
|
|
979
|
+
props: N,
|
|
804
980
|
emits: [""],
|
|
805
|
-
setup(n,
|
|
806
|
-
const
|
|
981
|
+
setup(n, t) {
|
|
982
|
+
const e = F(), r = U("designer-host-service"), a = U("design-item-context"), l = Se(a, r), c = ge(e, a, l), f = D(() => n.maxLength ? n.maxLength : n.modelValue.length), m = D(() => ({
|
|
807
983
|
position: "relative"
|
|
808
|
-
})),
|
|
984
|
+
})), i = D(() => ({
|
|
809
985
|
"box-shadow": "0 0 0 1px #dcdfe6 inset",
|
|
810
986
|
border: "none",
|
|
811
987
|
padding: "5px 10px",
|
|
812
988
|
width: "100%"
|
|
813
|
-
})),
|
|
989
|
+
})), s = {
|
|
814
990
|
position: "absolute",
|
|
815
991
|
bottom: "5px",
|
|
816
992
|
right: "10px"
|
|
817
993
|
};
|
|
818
994
|
return W(() => {
|
|
819
|
-
|
|
820
|
-
}),
|
|
995
|
+
e.value.componentInstance = c;
|
|
996
|
+
}), t.expose(c.value), () => E("div", {
|
|
821
997
|
style: m.value,
|
|
822
|
-
ref:
|
|
823
|
-
}, [
|
|
998
|
+
ref: e
|
|
999
|
+
}, [E("textarea", {
|
|
824
1000
|
id: n.id,
|
|
825
1001
|
tabindex: n.tabIndex,
|
|
826
1002
|
disabled: !1,
|
|
827
1003
|
readonly: !0,
|
|
828
|
-
style:
|
|
1004
|
+
style: i.value,
|
|
829
1005
|
placeholder: n.placeholder,
|
|
830
1006
|
rows: n.rows
|
|
831
|
-
}, null), n.showCount &&
|
|
832
|
-
style:
|
|
833
|
-
}, [`${n.modelValue.length}/${
|
|
834
|
-
}
|
|
835
|
-
}),
|
|
836
|
-
const
|
|
837
|
-
return
|
|
838
|
-
|
|
1007
|
+
}, null), n.showCount && E("span", {
|
|
1008
|
+
style: s
|
|
1009
|
+
}, [`${n.modelValue.length}/${f.value}`])]);
|
|
1010
|
+
}
|
|
1011
|
+
}), Be = (n) => {
|
|
1012
|
+
const t = n;
|
|
1013
|
+
return t.install = function(e) {
|
|
1014
|
+
e.component(t.name, n);
|
|
839
1015
|
}, n;
|
|
840
1016
|
};
|
|
841
|
-
|
|
842
|
-
n.textarea =
|
|
1017
|
+
P.register = (n, t, e, r) => {
|
|
1018
|
+
n.textarea = P, t.textarea = X;
|
|
843
1019
|
};
|
|
844
|
-
|
|
845
|
-
n.textarea =
|
|
1020
|
+
P.registerDesigner = (n, t, e) => {
|
|
1021
|
+
n.textarea = Fe, t.textarea = X;
|
|
846
1022
|
};
|
|
847
|
-
const
|
|
1023
|
+
const Le = Be(P);
|
|
848
1024
|
export {
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
1025
|
+
P as FTextarea,
|
|
1026
|
+
Le as default,
|
|
1027
|
+
X as propsResolver,
|
|
1028
|
+
N as textAreaProps
|
|
853
1029
|
};
|