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