@farris/ui-vue 1.3.0 → 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 +454 -398
- 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 +479 -476
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +255 -252
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +652 -567
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +518 -521
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +659 -553
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +162 -155
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +866 -747
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +371 -998
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1174 -1280
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +340 -991
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +6066 -5847
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3400 -3486
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2328 -2446
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +9551 -1200
- 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 +234 -231
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1996 -2630
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +138 -123
- 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 +548 -586
- 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 +2871 -3736
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +3380 -3645
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +10543 -3207
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +9775 -1312
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +442 -438
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +587 -807
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +415 -381
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +361 -1024
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +2265 -2371
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +6425 -6257
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +6164 -5946
- 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 +524 -1474
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +547 -502
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +646 -574
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1181 -2028
- 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 +1185 -2027
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +442 -1368
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +238 -235
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1635 -1713
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +791 -716
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +12203 -5274
- 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 +1873 -520
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +299 -300
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +176 -173
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +715 -659
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +1032 -1883
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +4767 -5693
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +169 -161
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +490 -1167
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +154 -151
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +575 -1204
- package/components/splitter/index.umd.cjs +1 -1
- package/components/splitter/style.js +2 -0
- package/components/step/index.esm.js +279 -276
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +478 -428
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +2591 -3326
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +442 -439
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +309 -307
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +500 -430
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +1391 -1341
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +574 -575
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +3422 -3536
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2661 -2764
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +675 -674
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +300 -297
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +454 -1089
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +709 -706
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +54780 -52757
- 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/directive/area-response.d.ts +10 -0
- package/types/common/entity/entity-schema.d.ts +26 -11
- 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 +2 -2
- package/types/common/utils/resolve-field.d.ts +2 -0
- package/types/common/utils/use-class.d.ts +7 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/condition/src/condition-fields.design.component.d.ts +18 -0
- package/types/condition/src/types.d.ts +5 -4
- package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/data-grid/index.d.ts +8 -5
- 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.component.d.ts +3 -2
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/designer/grid-field-editor.component.d.ts +14 -14
- package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-grid/src/schema/schema-resolver.d.ts +1 -1
- 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 +9 -11
- 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 +3 -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/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 +49 -41
- package/types/designer-canvas/src/types.d.ts +10 -21
- 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/designer/response-form-use-designer-rules.d.ts +3 -0
- package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
- package/types/dynamic-form/src/property-config/{form.property-config.d.ts → response-form.property-config.d.ts} +1 -1
- 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 +6 -1
- 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/external-container/src/designer/use-designer-rules.d.ts +3 -3
- 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/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/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/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 +3 -1
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -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 +43 -35
- package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
- package/types/query-solution/src/designer/query-solution-config/composition/use-property.d.ts +19 -0
- 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/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 +12 -0
- package/types/query-solution/src/query-solution.d.ts +10 -2
- package/types/query-solution/src/solutions.d.ts +108 -509
- 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-layout-editor/index.d.ts +3 -1
- 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/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -0
- package/types/section/src/designer/use-designer-rules.d.ts +3 -3
- 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/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/composition/types.d.ts +4 -1
- 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/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/tree-grid/index.d.ts +3 -3
- package/types/tree-grid/src/tree-grid.component.d.ts +1 -1
- 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/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/dynamic-form/src/designer/use-designer-rules.d.ts +0 -3
- package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
- package/types/property-panel/src/composition/entity/use-input-rules.d.ts +0 -3
- package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
- package/types/tree-grid/src/schema/column-resolver.d.ts +0 -3
- package/types/weather/src/composition/types.d.ts +0 -2
|
@@ -1,103 +1,107 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { computed as B, ref as
|
|
5
|
-
import { isPlainObject as
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
const
|
|
10
|
-
function
|
|
11
|
-
const { properties: n, title:
|
|
12
|
-
|
|
1
|
+
var ee = Object.defineProperty;
|
|
2
|
+
var te = (e, n, t) => n in e ? ee(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
|
|
3
|
+
var v = (e, n, t) => te(e, typeof n != "symbol" ? n + "" : n, t);
|
|
4
|
+
import { computed as B, ref as T, createVNode as E, onMounted as O, nextTick as j, defineComponent as $, watch as A, inject as G } from "vue";
|
|
5
|
+
import { isPlainObject as q, cloneDeep as z } from "lodash-es";
|
|
6
|
+
import N from "bignumber.js";
|
|
7
|
+
import { DgControl as W } from "../designer-canvas/index.esm.js";
|
|
8
|
+
import { withInstall as ne } from "../common/index.esm.js";
|
|
9
|
+
const Z = {}, X = {};
|
|
10
|
+
function x(e) {
|
|
11
|
+
const { properties: n, title: t, ignore: r } = e, i = r && Array.isArray(r), s = Object.keys(n).reduce((c, d) => ((!i || !r.find((m) => m === d)) && (c[d] = n[d].type === "object" && n[d].properties ? x(n[d]) : z(n[d].default)), c), {});
|
|
12
|
+
if (t && (!i || !r.find((c) => c === "id"))) {
|
|
13
|
+
const c = t.toLowerCase().replace(/-/g, "_");
|
|
14
|
+
s.id = `${c}_${Math.random().toString().slice(2, 6)}`;
|
|
15
|
+
}
|
|
16
|
+
return s;
|
|
13
17
|
}
|
|
14
|
-
function
|
|
15
|
-
const r =
|
|
18
|
+
function Q(e, n = {}, t) {
|
|
19
|
+
const r = Z[e];
|
|
16
20
|
if (r) {
|
|
17
|
-
let i =
|
|
18
|
-
const
|
|
19
|
-
return i =
|
|
21
|
+
let i = x(r);
|
|
22
|
+
const s = X[e];
|
|
23
|
+
return i = s ? s({ getSchemaByType: Q }, i, n, t) : i, i;
|
|
20
24
|
}
|
|
21
25
|
return null;
|
|
22
26
|
}
|
|
23
|
-
function
|
|
24
|
-
const
|
|
25
|
-
return Object.keys(t).reduce((r, i) => (r[i] &&
|
|
27
|
+
function oe(e, n) {
|
|
28
|
+
const t = x(n);
|
|
29
|
+
return Object.keys(t).reduce((r, i) => (r[i] && q(r[i]) && q(e[i] || !e[i]) ? Object.assign(r[i], e[i] || {}) : r[i] = e[i], r), t), t;
|
|
26
30
|
}
|
|
27
|
-
function
|
|
28
|
-
return Object.keys(
|
|
31
|
+
function re(e, n) {
|
|
32
|
+
return Object.keys(e).filter((r) => e[r] != null).reduce((r, i) => {
|
|
29
33
|
if (n.has(i)) {
|
|
30
|
-
const
|
|
31
|
-
if (typeof
|
|
32
|
-
r[
|
|
34
|
+
const s = n.get(i);
|
|
35
|
+
if (typeof s == "string")
|
|
36
|
+
r[s] = e[i];
|
|
33
37
|
else {
|
|
34
|
-
const
|
|
35
|
-
Object.assign(r,
|
|
38
|
+
const c = s(i, e[i], e);
|
|
39
|
+
Object.assign(r, c);
|
|
36
40
|
}
|
|
37
41
|
} else
|
|
38
|
-
r[i] =
|
|
42
|
+
r[i] = e[i];
|
|
39
43
|
return r;
|
|
40
44
|
}, {});
|
|
41
45
|
}
|
|
42
|
-
function
|
|
43
|
-
const r =
|
|
44
|
-
return
|
|
46
|
+
function ie(e, n, t = /* @__PURE__ */ new Map()) {
|
|
47
|
+
const r = oe(e, n);
|
|
48
|
+
return re(r, t);
|
|
45
49
|
}
|
|
46
|
-
function
|
|
47
|
-
function n(
|
|
48
|
-
if (typeof
|
|
49
|
-
return
|
|
50
|
-
if (typeof
|
|
51
|
-
const
|
|
52
|
-
if (
|
|
53
|
-
return Number(
|
|
54
|
-
if (
|
|
55
|
-
return Number(
|
|
56
|
-
if (
|
|
57
|
-
return Number(
|
|
50
|
+
function ae(e = {}) {
|
|
51
|
+
function n(a, l, o, u) {
|
|
52
|
+
if (typeof o == "number")
|
|
53
|
+
return u[a].length === o;
|
|
54
|
+
if (typeof o == "object") {
|
|
55
|
+
const f = Object.keys(o)[0], p = o[f];
|
|
56
|
+
if (f === "not")
|
|
57
|
+
return Number(u[a].length) !== Number(p);
|
|
58
|
+
if (f === "moreThan")
|
|
59
|
+
return Number(u[a].length) >= Number(p);
|
|
60
|
+
if (f === "lessThan")
|
|
61
|
+
return Number(u[a].length) <= Number(p);
|
|
58
62
|
}
|
|
59
63
|
return !1;
|
|
60
64
|
}
|
|
61
|
-
function
|
|
62
|
-
return
|
|
65
|
+
function t(a, l, o, u) {
|
|
66
|
+
return u[a] && u[a].propertyValue && String(u[a].propertyValue.value) === String(o);
|
|
63
67
|
}
|
|
64
68
|
const r = /* @__PURE__ */ new Map([
|
|
65
69
|
["length", n],
|
|
66
|
-
["getProperty",
|
|
70
|
+
["getProperty", t]
|
|
67
71
|
]);
|
|
68
|
-
Object.keys(
|
|
69
|
-
function i(
|
|
70
|
-
const
|
|
71
|
-
return typeof l == "number" ? [{ target:
|
|
72
|
-
if (
|
|
73
|
-
return { target:
|
|
74
|
-
const
|
|
75
|
-
return { target:
|
|
72
|
+
Object.keys(e).reduce((a, l) => (a.set(l, e[l]), a), r);
|
|
73
|
+
function i(a, l) {
|
|
74
|
+
const o = a;
|
|
75
|
+
return typeof l == "number" ? [{ target: o, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: o, operator: "getProperty", param: a, value: !!l }] : typeof l == "object" ? Object.keys(l).map((u) => {
|
|
76
|
+
if (u === "length")
|
|
77
|
+
return { target: o, operator: "length", param: null, value: l[u] };
|
|
78
|
+
const f = u, p = l[u];
|
|
79
|
+
return { target: o, operator: "getProperty", param: f, value: p };
|
|
76
80
|
}) : [];
|
|
77
81
|
}
|
|
78
|
-
function
|
|
79
|
-
return Object.keys(
|
|
80
|
-
const
|
|
81
|
-
return
|
|
82
|
+
function s(a) {
|
|
83
|
+
return Object.keys(a).reduce((o, u) => {
|
|
84
|
+
const f = i(u, a[u]);
|
|
85
|
+
return o.push(...f), o;
|
|
82
86
|
}, []);
|
|
83
87
|
}
|
|
84
|
-
function
|
|
85
|
-
if (r.has(
|
|
86
|
-
const
|
|
87
|
-
return
|
|
88
|
+
function c(a, l) {
|
|
89
|
+
if (r.has(a.operator)) {
|
|
90
|
+
const o = r.get(a.operator);
|
|
91
|
+
return o && o(a.target, a.param, a.value, l) || !1;
|
|
88
92
|
}
|
|
89
93
|
return !1;
|
|
90
94
|
}
|
|
91
|
-
function
|
|
92
|
-
return
|
|
95
|
+
function d(a, l) {
|
|
96
|
+
return s(a).reduce((f, p) => f && c(p, l), !0);
|
|
93
97
|
}
|
|
94
|
-
function
|
|
95
|
-
const
|
|
96
|
-
return
|
|
98
|
+
function m(a, l) {
|
|
99
|
+
const o = Object.keys(a), u = o.includes("allOf"), f = o.includes("anyOf"), p = u || f, S = (p ? a[p ? u ? "allOf" : "anyOf" : "allOf"] : [a]).map((V) => d(V, l));
|
|
100
|
+
return u ? !S.includes(!1) : S.includes(!0);
|
|
97
101
|
}
|
|
98
|
-
return { parseValueSchema:
|
|
102
|
+
return { parseValueSchema: m };
|
|
99
103
|
}
|
|
100
|
-
const
|
|
104
|
+
const y = {
|
|
101
105
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
102
106
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
103
107
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -135,21 +139,22 @@ const f = {
|
|
|
135
139
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
136
140
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
137
141
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
138
|
-
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
142
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
|
|
143
|
+
"query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
|
|
144
|
+
}, le = {}, se = {};
|
|
145
|
+
ae();
|
|
146
|
+
function ce(e, n, t = /* @__PURE__ */ new Map(), r = (c, d, m, a) => d, i = {}, s = (c) => c) {
|
|
147
|
+
return Z[n.title] = n, X[n.title] = r, le[n.title] = i, se[n.title] = s, (c = {}) => {
|
|
148
|
+
const d = ie(c, n, t), m = Object.keys(e).reduce((a, l) => (a[l] = e[l].default, a), {});
|
|
149
|
+
return Object.assign(m, d);
|
|
145
150
|
};
|
|
146
151
|
}
|
|
147
|
-
function
|
|
152
|
+
function ue(e, n) {
|
|
148
153
|
return { customClass: n.class, customStyle: n.style };
|
|
149
154
|
}
|
|
150
|
-
const
|
|
151
|
-
["appearance",
|
|
152
|
-
]),
|
|
155
|
+
const pe = /* @__PURE__ */ new Map([
|
|
156
|
+
["appearance", ue]
|
|
157
|
+
]), de = "https://json-schema.org/draft/2020-12/schema", me = "https://farris-design.gitee.io/number-spinner.schema.json", fe = "number-spinner", ye = "A Farris Input Component", ge = "object", he = {
|
|
153
158
|
id: {
|
|
154
159
|
description: "The unique identifier for a number spinner",
|
|
155
160
|
type: "string"
|
|
@@ -182,20 +187,6 @@ const me = /* @__PURE__ */ new Map([
|
|
|
182
187
|
type: "boolean",
|
|
183
188
|
default: !0
|
|
184
189
|
},
|
|
185
|
-
enableLinkLabel: {
|
|
186
|
-
description: "",
|
|
187
|
-
type: "boolean",
|
|
188
|
-
default: !1
|
|
189
|
-
},
|
|
190
|
-
label: {
|
|
191
|
-
description: "",
|
|
192
|
-
type: "string",
|
|
193
|
-
default: ""
|
|
194
|
-
},
|
|
195
|
-
lableWidth: {
|
|
196
|
-
description: "",
|
|
197
|
-
type: "number"
|
|
198
|
-
},
|
|
199
190
|
placeholder: {
|
|
200
191
|
description: "",
|
|
201
192
|
type: "string",
|
|
@@ -216,6 +207,20 @@ const me = /* @__PURE__ */ new Map([
|
|
|
216
207
|
type: "boolean",
|
|
217
208
|
default: !1
|
|
218
209
|
},
|
|
210
|
+
precision: {
|
|
211
|
+
description: "",
|
|
212
|
+
type: "number",
|
|
213
|
+
default: 0
|
|
214
|
+
},
|
|
215
|
+
min: {
|
|
216
|
+
description: "",
|
|
217
|
+
type: "number"
|
|
218
|
+
},
|
|
219
|
+
step: {
|
|
220
|
+
description: "",
|
|
221
|
+
type: "number",
|
|
222
|
+
default: 1
|
|
223
|
+
},
|
|
219
224
|
tabindex: {
|
|
220
225
|
description: "",
|
|
221
226
|
type: "number",
|
|
@@ -250,27 +255,28 @@ const me = /* @__PURE__ */ new Map([
|
|
|
250
255
|
type: "sting",
|
|
251
256
|
default: ""
|
|
252
257
|
}
|
|
253
|
-
},
|
|
258
|
+
}, be = [
|
|
254
259
|
"id",
|
|
255
260
|
"type"
|
|
256
|
-
],
|
|
261
|
+
], ve = [
|
|
257
262
|
"id",
|
|
258
263
|
"appearance",
|
|
259
|
-
"binding"
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
$
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
264
|
+
"binding",
|
|
265
|
+
"visible"
|
|
266
|
+
], Ce = {
|
|
267
|
+
$schema: de,
|
|
268
|
+
$id: me,
|
|
269
|
+
title: fe,
|
|
270
|
+
description: ye,
|
|
271
|
+
type: ge,
|
|
272
|
+
properties: he,
|
|
273
|
+
required: be,
|
|
274
|
+
ignore: ve
|
|
269
275
|
};
|
|
270
|
-
function
|
|
276
|
+
function Se(e, n, t) {
|
|
271
277
|
return n;
|
|
272
278
|
}
|
|
273
|
-
const
|
|
279
|
+
const U = {
|
|
274
280
|
/**
|
|
275
281
|
* 组件标识
|
|
276
282
|
*/
|
|
@@ -374,356 +380,353 @@ const q = {
|
|
|
374
380
|
* 作为内嵌编辑器被创建后默认选中文本
|
|
375
381
|
*/
|
|
376
382
|
selectOnCreated: { type: Boolean, default: !1 }
|
|
377
|
-
},
|
|
378
|
-
function
|
|
379
|
-
const { format: i } =
|
|
380
|
-
function
|
|
381
|
-
const
|
|
382
|
-
return !(
|
|
383
|
+
}, H = ce(U, Ce, pe, Se);
|
|
384
|
+
function J(e, n, t, r) {
|
|
385
|
+
const { format: i } = t, { displayValue: s, getRealValue: c, modelValue: d, onNumberValueChanged: m } = r;
|
|
386
|
+
function a() {
|
|
387
|
+
const b = new N(d.value || 0);
|
|
388
|
+
return !(e.max && !new N(e.max).isNaN() && b.gte(new N(e.max)));
|
|
383
389
|
}
|
|
384
390
|
function l() {
|
|
385
|
-
const
|
|
386
|
-
return !(
|
|
391
|
+
const b = new N(d.value || 0);
|
|
392
|
+
return !(e.min && !new N(e.min).isNaN() && b.lte(new N(e.min)));
|
|
387
393
|
}
|
|
388
|
-
function
|
|
389
|
-
if (
|
|
394
|
+
function o(b) {
|
|
395
|
+
if (e.readonly || e.disabled)
|
|
390
396
|
return;
|
|
391
|
-
const
|
|
392
|
-
if (
|
|
393
|
-
const
|
|
394
|
-
|
|
397
|
+
const S = b === "up" ? a : l, w = b === "up" ? "plus" : "minus";
|
|
398
|
+
if (S()) {
|
|
399
|
+
const C = new N(d.value || 0)[w](Number(e.step)), h = C.toFixed();
|
|
400
|
+
s.value = i(h), m(c(C));
|
|
395
401
|
}
|
|
396
402
|
}
|
|
397
|
-
function
|
|
398
|
-
|
|
403
|
+
function u() {
|
|
404
|
+
o("up");
|
|
399
405
|
}
|
|
400
|
-
function
|
|
401
|
-
|
|
406
|
+
function f() {
|
|
407
|
+
o("down");
|
|
402
408
|
}
|
|
403
|
-
function
|
|
404
|
-
|
|
409
|
+
function p(b) {
|
|
410
|
+
u(), b.stopPropagation();
|
|
405
411
|
}
|
|
406
|
-
function
|
|
407
|
-
|
|
412
|
+
function g(b) {
|
|
413
|
+
f(), b.stopPropagation();
|
|
408
414
|
}
|
|
409
|
-
return { canDownward: l, canUpward:
|
|
415
|
+
return { canDownward: l, canUpward: a, downward: f, onClickDownButton: g, onClickUpButton: p, upward: u };
|
|
410
416
|
}
|
|
411
|
-
function
|
|
417
|
+
function Y(e, n, t) {
|
|
412
418
|
const r = B(() => ({
|
|
413
|
-
prefix:
|
|
414
|
-
suffix:
|
|
415
|
-
decimalSeparator:
|
|
416
|
-
groupSeparator:
|
|
417
|
-
groupSize:
|
|
418
|
-
})), { getValidNumberObject: i, precision:
|
|
419
|
-
function
|
|
420
|
-
return
|
|
421
|
-
}
|
|
422
|
-
function
|
|
423
|
-
return
|
|
424
|
-
}
|
|
425
|
-
function
|
|
426
|
-
const l =
|
|
427
|
-
return
|
|
428
|
-
}
|
|
429
|
-
return { cleanFormat:
|
|
419
|
+
prefix: e.prefix,
|
|
420
|
+
suffix: e.suffix,
|
|
421
|
+
decimalSeparator: e.decimalSeparator,
|
|
422
|
+
groupSeparator: e.useThousands ? e.groupSeparator : "",
|
|
423
|
+
groupSize: e.groupSize
|
|
424
|
+
})), { getValidNumberObject: i, precision: s } = t;
|
|
425
|
+
function c(a) {
|
|
426
|
+
return a = a == null || a === "" ? "" : String(a), a = a.replace(new RegExp(e.prefix, "g"), "").replace(new RegExp(e.suffix, "g"), "").replace(/,/g, ""), e.groupSeparator && e.groupSeparator !== "," && (a = a.replace(new RegExp(`\\${e.groupSeparator}`, "g"), "")), e.decimalSeparator && e.decimalSeparator !== "." && (a = a.replace(new RegExp(`\\${e.decimalSeparator}`, "g"), ".")), a;
|
|
427
|
+
}
|
|
428
|
+
function d(a, l) {
|
|
429
|
+
return e.precision !== null && e.precision !== void 0 ? a.toFormat(s.value, l) : a.toFormat(l);
|
|
430
|
+
}
|
|
431
|
+
function m(a) {
|
|
432
|
+
const l = c(a), o = new N(l, 10), u = i(o);
|
|
433
|
+
return u.valueOf() === "0" && !e.showZero || u.isNaN() ? "" : e.formatter ? e.formatter(u.toNumber()) : d(u, r.value);
|
|
434
|
+
}
|
|
435
|
+
return { cleanFormat: c, format: m };
|
|
430
436
|
}
|
|
431
|
-
function
|
|
432
|
-
const
|
|
433
|
-
function
|
|
437
|
+
function _(e, n) {
|
|
438
|
+
const t = T(""), r = T(e.modelValue), i = B(() => Number(e.precision) || 0);
|
|
439
|
+
function s(l) {
|
|
434
440
|
return l.toFixed(i.value);
|
|
435
441
|
}
|
|
436
|
-
function
|
|
442
|
+
function c(l) {
|
|
437
443
|
return isNaN(l) || l === null || l === void 0 || l === "";
|
|
438
444
|
}
|
|
439
|
-
function
|
|
440
|
-
const
|
|
441
|
-
return
|
|
445
|
+
function d(l) {
|
|
446
|
+
const o = c(e.max) ? null : new N(String(e.max), 10), u = c(e.min) ? null : new N(String(e.min), 10);
|
|
447
|
+
return o && l.gt(o) ? o : u && l.lt(u) ? u : l;
|
|
442
448
|
}
|
|
443
|
-
function
|
|
444
|
-
if (
|
|
445
|
-
return isNaN(Number(l)) ?
|
|
446
|
-
let
|
|
447
|
-
if (
|
|
448
|
-
if (
|
|
449
|
+
function m(l) {
|
|
450
|
+
if (e.parser)
|
|
451
|
+
return isNaN(Number(l)) ? e.parser(l) : l;
|
|
452
|
+
let o = d(new N(l, 10));
|
|
453
|
+
if (o.isNaN()) {
|
|
454
|
+
if (e.canNull)
|
|
449
455
|
return null;
|
|
450
|
-
const
|
|
451
|
-
if (!
|
|
452
|
-
|
|
453
|
-
else if (!
|
|
454
|
-
|
|
456
|
+
const f = new N("" + e.min, 10), p = new N("" + e.max, 10);
|
|
457
|
+
if (!f.isNaN())
|
|
458
|
+
o = f;
|
|
459
|
+
else if (!p.isNaN())
|
|
460
|
+
o = p;
|
|
455
461
|
else
|
|
456
462
|
return 0;
|
|
457
463
|
}
|
|
458
|
-
return
|
|
464
|
+
return s(o);
|
|
459
465
|
}
|
|
460
|
-
function
|
|
461
|
-
const
|
|
462
|
-
r.value =
|
|
466
|
+
function a(l) {
|
|
467
|
+
const o = Number(l);
|
|
468
|
+
r.value = o, n.emit("update:modelValue", o), n.emit("valueChange", o), n.emit("change", o);
|
|
463
469
|
}
|
|
464
|
-
return { displayValue:
|
|
470
|
+
return { displayValue: t, getRealValue: m, modelValue: r, isEmpty: c, onNumberValueChanged: a, precision: i, getValidNumberObject: d };
|
|
465
471
|
}
|
|
466
|
-
function
|
|
467
|
-
const { cleanFormat:
|
|
468
|
-
function C
|
|
469
|
-
var
|
|
470
|
-
if (
|
|
472
|
+
function we(e, n, t, r, i) {
|
|
473
|
+
const { cleanFormat: s, format: c } = t, { displayValue: d, getRealValue: m, modelValue: a, isEmpty: l, onNumberValueChanged: o } = r, { downward: u, upward: f } = i, p = T(!1), g = B(() => d.value);
|
|
474
|
+
function b(C) {
|
|
475
|
+
var M;
|
|
476
|
+
if (C.stopPropagation(), p.value = !1, e.readonly || e.disabled)
|
|
471
477
|
return;
|
|
472
|
-
let
|
|
473
|
-
|
|
474
|
-
const
|
|
475
|
-
|
|
476
|
-
}
|
|
477
|
-
function
|
|
478
|
-
|
|
479
|
-
}
|
|
480
|
-
function
|
|
481
|
-
var
|
|
482
|
-
|
|
483
|
-
let
|
|
484
|
-
|
|
485
|
-
const
|
|
486
|
-
|
|
487
|
-
}
|
|
488
|
-
function
|
|
489
|
-
|
|
490
|
-
}
|
|
491
|
-
return { textBoxValue:
|
|
478
|
+
let h = (M = C.target) == null ? void 0 : M.value;
|
|
479
|
+
e.canNull || (h = h || 0);
|
|
480
|
+
const k = s(h);
|
|
481
|
+
d.value = c(k), o(m(k)), n.emit("blur", { event: C, formatted: d.value, value: a.value });
|
|
482
|
+
}
|
|
483
|
+
function S(C) {
|
|
484
|
+
C.stopPropagation(), p.value = !0, !(e.readonly || e.disabled) && (d.value = l(a.value) || !e.showZero && a.value === "0" ? "" : String(a.value), n.emit("focus", { event: C, formatted: d.value, value: a.value }));
|
|
485
|
+
}
|
|
486
|
+
function w(C) {
|
|
487
|
+
var M;
|
|
488
|
+
C.stopPropagation();
|
|
489
|
+
let h = (M = C.target) == null ? void 0 : M.value;
|
|
490
|
+
e.canNull || (h = h || 0);
|
|
491
|
+
const k = s(h);
|
|
492
|
+
d.value = k, o(m(k));
|
|
493
|
+
}
|
|
494
|
+
function V(C) {
|
|
495
|
+
C.key === "ArrowDown" && (C.preventDefault(), u()), C.key === "ArrowUp" && (C.preventDefault(), f()), C.stopPropagation();
|
|
496
|
+
}
|
|
497
|
+
return { textBoxValue: g, onBlurTextBox: b, onFocusTextBox: S, onInput: w, onKeyDown: V, isFocus: p };
|
|
492
498
|
}
|
|
493
|
-
function
|
|
499
|
+
function R(e, n, t) {
|
|
494
500
|
const {
|
|
495
501
|
canDownward: r,
|
|
496
502
|
canUpward: i,
|
|
497
|
-
onClickDownButton:
|
|
498
|
-
onClickUpButton:
|
|
499
|
-
} =
|
|
503
|
+
onClickDownButton: s,
|
|
504
|
+
onClickUpButton: c
|
|
505
|
+
} = t, d = B(() => ({
|
|
500
506
|
"input-group-append": !0,
|
|
501
507
|
"btn-group": !0,
|
|
502
508
|
"btn-group-number": !0
|
|
503
|
-
})),
|
|
509
|
+
})), m = B(() => ({
|
|
504
510
|
btn: !0,
|
|
505
511
|
"btn-secondary": !0,
|
|
506
512
|
"btn-number-flag": !0
|
|
507
|
-
})),
|
|
513
|
+
})), a = B(() => ({
|
|
508
514
|
cursor: i() ? "pointer" : "not-allowed",
|
|
509
515
|
"margin-left": 0
|
|
510
516
|
})), l = B(() => ({
|
|
511
517
|
cursor: r() ? "pointer" : "not-allowed",
|
|
512
518
|
"margin-left": 0
|
|
513
519
|
}));
|
|
514
|
-
return () =>
|
|
515
|
-
class:
|
|
516
|
-
}, [
|
|
520
|
+
return () => E("div", {
|
|
521
|
+
class: d.value
|
|
522
|
+
}, [E("button", {
|
|
517
523
|
title: "upButton",
|
|
518
|
-
class:
|
|
519
|
-
style:
|
|
520
|
-
onClick:
|
|
524
|
+
class: m.value,
|
|
525
|
+
style: a.value,
|
|
526
|
+
onClick: c,
|
|
521
527
|
disabled: !i()
|
|
522
|
-
}, [
|
|
528
|
+
}, [E("span", {
|
|
523
529
|
class: "f-icon f-icon-arrow-chevron-up number-arrow-chevron"
|
|
524
|
-
}, null)]),
|
|
530
|
+
}, null)]), E("button", {
|
|
525
531
|
title: "downButton",
|
|
526
|
-
class:
|
|
532
|
+
class: m.value,
|
|
527
533
|
style: l.value,
|
|
528
|
-
onClick:
|
|
534
|
+
onClick: s,
|
|
529
535
|
disabled: !r()
|
|
530
|
-
}, [
|
|
536
|
+
}, [E("span", {
|
|
531
537
|
class: "f-icon f-icon-arrow-chevron-down number-arrow-chevron"
|
|
532
538
|
}, null)])]);
|
|
533
539
|
}
|
|
534
|
-
function
|
|
535
|
-
const r =
|
|
540
|
+
function ke(e, n, t) {
|
|
541
|
+
const r = T(), {
|
|
536
542
|
onBlurTextBox: i,
|
|
537
|
-
onFocusTextBox:
|
|
538
|
-
onInput:
|
|
539
|
-
onKeyDown:
|
|
540
|
-
textBoxValue:
|
|
541
|
-
} =
|
|
543
|
+
onFocusTextBox: s,
|
|
544
|
+
onInput: c,
|
|
545
|
+
onKeyDown: d,
|
|
546
|
+
textBoxValue: m
|
|
547
|
+
} = t, a = B(() => e.disabled || e.readonly || !e.editable ? "" : e.placeholder), l = B(() => ({
|
|
542
548
|
"form-control": !0,
|
|
543
549
|
"f-utils-fill": !0
|
|
544
|
-
})),
|
|
545
|
-
"text-align":
|
|
550
|
+
})), o = B(() => ({
|
|
551
|
+
"text-align": e.textAlign
|
|
546
552
|
}));
|
|
547
|
-
function
|
|
548
|
-
|
|
553
|
+
function u(g) {
|
|
554
|
+
g.stopPropagation();
|
|
549
555
|
}
|
|
550
|
-
function
|
|
551
|
-
|
|
556
|
+
function f() {
|
|
557
|
+
e.selectOnCreated, e.focusOnCreated;
|
|
552
558
|
}
|
|
553
|
-
async function
|
|
554
|
-
|
|
559
|
+
async function p(g) {
|
|
560
|
+
s(g), await j, f();
|
|
555
561
|
}
|
|
556
|
-
return
|
|
557
|
-
await
|
|
558
|
-
}), () =>
|
|
562
|
+
return O(async () => {
|
|
563
|
+
await j, f();
|
|
564
|
+
}), () => E("input", {
|
|
559
565
|
ref: r,
|
|
560
566
|
class: l.value,
|
|
561
|
-
style:
|
|
567
|
+
style: o.value,
|
|
562
568
|
type: "text",
|
|
563
|
-
value:
|
|
564
|
-
disabled:
|
|
565
|
-
readonly:
|
|
566
|
-
placeholder:
|
|
569
|
+
value: m.value,
|
|
570
|
+
disabled: e.disabled,
|
|
571
|
+
readonly: e.readonly || !e.editable,
|
|
572
|
+
placeholder: a.value,
|
|
567
573
|
onBlur: i,
|
|
568
|
-
onChange:
|
|
569
|
-
onFocus:
|
|
570
|
-
onInput:
|
|
571
|
-
onKeydown:
|
|
574
|
+
onChange: u,
|
|
575
|
+
onFocus: p,
|
|
576
|
+
onInput: c,
|
|
577
|
+
onKeydown: d
|
|
572
578
|
}, null);
|
|
573
579
|
}
|
|
574
|
-
const
|
|
580
|
+
const D = /* @__PURE__ */ $({
|
|
575
581
|
name: "FNumberSpinner",
|
|
576
|
-
props:
|
|
582
|
+
props: U,
|
|
577
583
|
emits: ["update:modelValue", "valueChange", "change", "blur", "focus", "click", "input"],
|
|
578
|
-
setup(
|
|
579
|
-
const
|
|
580
|
-
displayValue:
|
|
581
|
-
modelValue:
|
|
582
|
-
getRealValue:
|
|
583
|
-
} =
|
|
584
|
-
format:
|
|
584
|
+
setup(e, n) {
|
|
585
|
+
const t = _(e, n), r = Y(e, n, t), i = J(e, n, r, t), s = we(e, n, r, t, i), c = R(e, n, i), {
|
|
586
|
+
displayValue: d,
|
|
587
|
+
modelValue: m,
|
|
588
|
+
getRealValue: a
|
|
589
|
+
} = t, l = ke(e, n, s), {
|
|
590
|
+
format: o
|
|
585
591
|
} = r, {
|
|
586
|
-
isFocus:
|
|
587
|
-
} =
|
|
588
|
-
return
|
|
589
|
-
const
|
|
590
|
-
|
|
591
|
-
}),
|
|
592
|
-
const
|
|
593
|
-
|
|
594
|
-
}),
|
|
595
|
-
|
|
596
|
-
}),
|
|
597
|
-
|
|
598
|
-
}), () =>
|
|
592
|
+
isFocus: u
|
|
593
|
+
} = s, f = B(() => !e.disabled && !e.readonly && e.showButton);
|
|
594
|
+
return O(() => {
|
|
595
|
+
const p = a(e.modelValue);
|
|
596
|
+
d.value = o(p);
|
|
597
|
+
}), A(() => [e.value], ([p]) => {
|
|
598
|
+
const g = a(p);
|
|
599
|
+
m.value = g, d.value = o(g);
|
|
600
|
+
}), A(() => [e.modelValue], ([p]) => {
|
|
601
|
+
p !== m.value && (m.value = p, !u.value && (d.value = o(a(p))));
|
|
602
|
+
}), A(() => [e.precision, e.useThousands, e.prefix, e.suffix, e.showZero], () => {
|
|
603
|
+
d.value = o(m.value);
|
|
604
|
+
}), () => E("div", {
|
|
599
605
|
class: "input-group f-state-hover flex-row f-cmp-number-spinner"
|
|
600
|
-
}, [l(),
|
|
606
|
+
}, [l(), f.value && c()]);
|
|
601
607
|
}
|
|
602
608
|
});
|
|
603
|
-
function
|
|
604
|
-
var
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
r();
|
|
609
|
-
const i = e && e.getStyles && e.getStyles() || "", c = e && e.getDesignerClass && e.getDesignerClass() || "", s = k();
|
|
610
|
-
function p() {
|
|
611
|
-
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
|
|
609
|
+
function Me(e, n, t) {
|
|
610
|
+
var C;
|
|
611
|
+
const r = t && t.getStyles && t.getStyles() || "", i = t && t.getDesignerClass && t.getDesignerClass() || "", s = T();
|
|
612
|
+
function c() {
|
|
613
|
+
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
612
614
|
}
|
|
613
|
-
function
|
|
615
|
+
function d() {
|
|
614
616
|
return !1;
|
|
615
617
|
}
|
|
616
|
-
function
|
|
617
|
-
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 :
|
|
618
|
+
function m() {
|
|
619
|
+
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
618
620
|
}
|
|
619
|
-
function
|
|
620
|
-
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !0 :
|
|
621
|
+
function a() {
|
|
622
|
+
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
621
623
|
}
|
|
622
|
-
function
|
|
623
|
-
if (!
|
|
624
|
+
function l(h) {
|
|
625
|
+
if (!h || !h.value)
|
|
624
626
|
return null;
|
|
625
|
-
if (
|
|
626
|
-
return
|
|
627
|
-
const
|
|
627
|
+
if (h.value.schema && h.value.schema.type === "component")
|
|
628
|
+
return h.value;
|
|
629
|
+
const k = T(h == null ? void 0 : h.value.parent), M = l(k);
|
|
628
630
|
return M || null;
|
|
629
631
|
}
|
|
630
|
-
function
|
|
631
|
-
const { componentInstance:
|
|
632
|
-
return !
|
|
632
|
+
function o(h = n) {
|
|
633
|
+
const { componentInstance: k, designerItemElementRef: M } = h;
|
|
634
|
+
return !k || !k.value ? null : k.value.canMove ? M : o(h.parent);
|
|
633
635
|
}
|
|
634
|
-
function
|
|
635
|
-
return !!
|
|
636
|
+
function u(h) {
|
|
637
|
+
return !!t && t.canAccepts(h);
|
|
636
638
|
}
|
|
637
|
-
function
|
|
639
|
+
function f() {
|
|
638
640
|
return (n == null ? void 0 : n.schema.label) || (n == null ? void 0 : n.schema.title) || (n == null ? void 0 : n.schema.name);
|
|
639
641
|
}
|
|
640
|
-
function
|
|
641
|
-
}
|
|
642
|
-
function C(g, h) {
|
|
643
|
-
h && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(h);
|
|
644
|
-
}
|
|
645
|
-
function F(g, h) {
|
|
646
|
-
const { componentType: M } = g;
|
|
647
|
-
let T = j(M, g, h);
|
|
648
|
-
e && e.onResolveNewComponentSchema && (T = e.onResolveNewComponentSchema(g, T));
|
|
649
|
-
const A = M.toLowerCase().replace("-", "_");
|
|
650
|
-
return T && !T.id && T.type === M && (T.id = `${A}_${Math.random().toString().slice(2, 6)}`), T;
|
|
651
|
-
}
|
|
652
|
-
function E(g, h) {
|
|
653
|
-
const M = String(g.getAttribute("data-controltype")), T = g.getAttribute("data-feature"), A = T ? JSON.parse(T) : {};
|
|
654
|
-
A.parentComponentInstance = s.value;
|
|
655
|
-
let x = j(M, A);
|
|
656
|
-
e && e.onAcceptNewChildElement && (x = e.onAcceptNewChildElement(g, h, x));
|
|
657
|
-
const te = M.toLowerCase().replace("-", "_");
|
|
658
|
-
return x && !x.id && x.type === M && (x.id = `${te}_${Math.random().toString().slice(2, 6)}`), x;
|
|
659
|
-
}
|
|
660
|
-
function P(g) {
|
|
642
|
+
function p() {
|
|
661
643
|
}
|
|
662
|
-
function
|
|
663
|
-
|
|
664
|
-
|
|
644
|
+
function g(h, k) {
|
|
645
|
+
k && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(k);
|
|
646
|
+
}
|
|
647
|
+
function b(h, k) {
|
|
648
|
+
const { componentType: M } = h;
|
|
649
|
+
let F = Q(M, h, k);
|
|
650
|
+
t && t.onResolveNewComponentSchema && (F = t.onResolveNewComponentSchema(h, F));
|
|
651
|
+
const L = M.toLowerCase().replace(/-/g, "_");
|
|
652
|
+
return F && !F.id && F.type === M && (F.id = `${L}_${Math.random().toString().slice(2, 6)}`), F;
|
|
653
|
+
}
|
|
654
|
+
function S(h) {
|
|
655
|
+
}
|
|
656
|
+
function w(...h) {
|
|
657
|
+
if (t && t.getPropsConfig)
|
|
658
|
+
return t.getPropsConfig(...h);
|
|
659
|
+
}
|
|
660
|
+
function V() {
|
|
661
|
+
t && t.onRemoveComponent && t.onRemoveComponent(), n != null && n.schema.contents && n.schema.contents.map((h) => {
|
|
662
|
+
var F;
|
|
663
|
+
let k = h.id;
|
|
664
|
+
h.type === "component-ref" && (k = h.component);
|
|
665
|
+
const M = e.value.querySelector(`#${k}-design-item`);
|
|
666
|
+
(F = M == null ? void 0 : M.componentInstance) != null && F.value.onRemoveComponent && M.componentInstance.value.onRemoveComponent();
|
|
667
|
+
});
|
|
665
668
|
}
|
|
666
669
|
return s.value = {
|
|
667
|
-
canMove:
|
|
668
|
-
canSelectParent:
|
|
669
|
-
canDelete:
|
|
670
|
-
canNested: !
|
|
670
|
+
canMove: c(),
|
|
671
|
+
canSelectParent: d(),
|
|
672
|
+
canDelete: m(),
|
|
673
|
+
canNested: !a(),
|
|
671
674
|
contents: n == null ? void 0 : n.schema.contents,
|
|
672
|
-
elementRef:
|
|
673
|
-
parent: (
|
|
675
|
+
elementRef: e,
|
|
676
|
+
parent: (C = n == null ? void 0 : n.parent) == null ? void 0 : C.componentInstance,
|
|
674
677
|
schema: n == null ? void 0 : n.schema,
|
|
675
|
-
styles:
|
|
676
|
-
designerClass:
|
|
677
|
-
canAccepts:
|
|
678
|
-
getBelongedComponentInstance:
|
|
679
|
-
getDraggableDesignItemElement:
|
|
680
|
-
getDraggingDisplayText:
|
|
681
|
-
getPropConfig:
|
|
682
|
-
getDragScopeElement:
|
|
683
|
-
onAcceptMovedChildElement:
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || k(!1)
|
|
678
|
+
styles: r,
|
|
679
|
+
designerClass: i,
|
|
680
|
+
canAccepts: u,
|
|
681
|
+
getBelongedComponentInstance: l,
|
|
682
|
+
getDraggableDesignItemElement: o,
|
|
683
|
+
getDraggingDisplayText: f,
|
|
684
|
+
getPropConfig: w,
|
|
685
|
+
getDragScopeElement: p,
|
|
686
|
+
onAcceptMovedChildElement: g,
|
|
687
|
+
onChildElementMovedOut: S,
|
|
688
|
+
addNewChildComponentSchema: b,
|
|
689
|
+
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || T(!1),
|
|
690
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || T(!1),
|
|
691
|
+
onRemoveComponent: V
|
|
690
692
|
}, s;
|
|
691
693
|
}
|
|
692
|
-
class
|
|
693
|
-
constructor(n,
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
694
|
+
class Ne {
|
|
695
|
+
constructor(n, t) {
|
|
696
|
+
v(this, "componentId");
|
|
697
|
+
v(this, "viewModelId");
|
|
698
|
+
v(this, "eventsEditorUtils");
|
|
699
|
+
v(this, "formSchemaUtils");
|
|
700
|
+
v(this, "formMetadataConverter");
|
|
701
|
+
v(this, "designViewModelUtils");
|
|
702
|
+
v(this, "designViewModelField");
|
|
703
|
+
v(this, "controlCreatorUtils");
|
|
704
|
+
v(this, "designerHostService");
|
|
705
|
+
v(this, "schemaService", null);
|
|
706
|
+
v(this, "metadataService", null);
|
|
707
|
+
v(this, "propertyConfig", {
|
|
706
708
|
type: "object",
|
|
707
709
|
categories: {}
|
|
708
710
|
});
|
|
709
711
|
var r;
|
|
710
|
-
this.componentId = n, this.designerHostService =
|
|
712
|
+
this.componentId = n, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((r = this.formSchemaUtils) == null ? void 0 : r.getViewModelIdByComponentId(n)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
|
|
711
713
|
}
|
|
712
714
|
getTableInfo() {
|
|
713
715
|
var n;
|
|
714
716
|
return (n = this.schemaService) == null ? void 0 : n.getTableInfoByViewModelId(this.viewModelId);
|
|
715
717
|
}
|
|
716
718
|
setDesignViewModelField(n) {
|
|
717
|
-
|
|
718
|
-
|
|
719
|
+
var r;
|
|
720
|
+
const t = n.binding && n.binding.type === "Form" && n.binding.field;
|
|
721
|
+
if (t) {
|
|
719
722
|
if (!this.designViewModelField) {
|
|
720
|
-
const
|
|
721
|
-
this.designViewModelField =
|
|
723
|
+
const i = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
724
|
+
this.designViewModelField = i.fields.find((s) => s.id === t);
|
|
722
725
|
}
|
|
723
|
-
n.updateOn = this.designViewModelField.updateOn;
|
|
726
|
+
n.updateOn = (r = this.designViewModelField) == null ? void 0 : r.updateOn;
|
|
724
727
|
}
|
|
725
728
|
}
|
|
726
|
-
changeFieldEditorType(n,
|
|
729
|
+
changeFieldEditorType(n, t) {
|
|
727
730
|
}
|
|
728
731
|
getBasicPropConfig(n) {
|
|
729
732
|
return {
|
|
@@ -744,7 +747,7 @@ class Te {
|
|
|
744
747
|
type: "combo-list",
|
|
745
748
|
textField: "name",
|
|
746
749
|
valueField: "value",
|
|
747
|
-
data: [{ value: n.type, name:
|
|
750
|
+
data: [{ value: n.type, name: y[n.type].name }]
|
|
748
751
|
}
|
|
749
752
|
}
|
|
750
753
|
}
|
|
@@ -776,29 +779,29 @@ class Te {
|
|
|
776
779
|
* @param componentInstance
|
|
777
780
|
* @returns
|
|
778
781
|
*/
|
|
779
|
-
updateElementByParentContainer(n,
|
|
780
|
-
const r =
|
|
782
|
+
updateElementByParentContainer(n, t) {
|
|
783
|
+
const r = t && t.parent && t.parent.schema;
|
|
781
784
|
if (!r)
|
|
782
785
|
return;
|
|
783
|
-
const i = r.contents.findIndex((
|
|
784
|
-
r.contents.splice(i, 1), r.contents.splice(i, 0,
|
|
786
|
+
const i = r.contents.findIndex((c) => c.id === n), s = z(r.contents[i]);
|
|
787
|
+
r.contents.splice(i, 1), r.contents.splice(i, 0, s);
|
|
785
788
|
}
|
|
786
789
|
}
|
|
787
|
-
const
|
|
790
|
+
const P = class P {
|
|
788
791
|
/**
|
|
789
792
|
* 根据绑定字段类型获取可用的输入类控件
|
|
790
793
|
*/
|
|
791
794
|
static getEditorTypesByMDataType(n) {
|
|
792
|
-
const
|
|
793
|
-
return
|
|
795
|
+
const t = P.fieldControlTypeMapping[n];
|
|
796
|
+
return t || [{ key: "", value: "" }];
|
|
794
797
|
}
|
|
795
798
|
/**
|
|
796
799
|
* 获取所有输入类控件
|
|
797
800
|
*/
|
|
798
801
|
static getAllInputTypes() {
|
|
799
802
|
const n = [];
|
|
800
|
-
for (
|
|
801
|
-
|
|
803
|
+
for (const t in P.fieldControlTypeMapping)
|
|
804
|
+
P.fieldControlTypeMapping[t].forEach((r) => {
|
|
802
805
|
n.find((i) => i.key === r.key && i.value === r.value) || n.push({ key: r.key, value: r.value });
|
|
803
806
|
});
|
|
804
807
|
return n;
|
|
@@ -807,69 +810,174 @@ const D = class D {
|
|
|
807
810
|
/**
|
|
808
811
|
* <字段类型,可配置的控件类型列表>的映射
|
|
809
812
|
*/
|
|
810
|
-
|
|
813
|
+
v(P, "fieldControlTypeMapping", {
|
|
811
814
|
String: [
|
|
812
|
-
{ key:
|
|
813
|
-
{ key:
|
|
814
|
-
{ key:
|
|
815
|
-
{ key:
|
|
816
|
-
{ key:
|
|
817
|
-
{ key:
|
|
818
|
-
{ key:
|
|
815
|
+
{ key: y["input-group"].type, value: y["input-group"].name },
|
|
816
|
+
{ key: y.lookup.type, value: y.lookup.name },
|
|
817
|
+
{ key: y["date-picker"].type, value: y["date-picker"].name },
|
|
818
|
+
{ key: y["check-box"].type, value: y["check-box"].name },
|
|
819
|
+
{ key: y["check-group"].type, value: y["check-group"].name },
|
|
820
|
+
{ key: y["radio-group"].type, value: y["radio-group"].name },
|
|
821
|
+
{ key: y["combo-list"].type, value: y["combo-list"].name },
|
|
822
|
+
{ key: y.textarea.type, value: y.textarea.name }
|
|
819
823
|
],
|
|
820
824
|
Text: [
|
|
821
|
-
{ key:
|
|
822
|
-
{ key:
|
|
825
|
+
{ key: y.textarea.type, value: y.textarea.name },
|
|
826
|
+
{ key: y.lookup.type, value: y.lookup.name }
|
|
823
827
|
],
|
|
824
828
|
Decimal: [
|
|
825
|
-
{ key:
|
|
829
|
+
{ key: y["number-spinner"].type, value: y["number-spinner"].name }
|
|
826
830
|
],
|
|
827
831
|
Integer: [
|
|
828
|
-
{ key:
|
|
832
|
+
{ key: y["number-spinner"].type, value: y["number-spinner"].name }
|
|
829
833
|
],
|
|
830
834
|
Number: [
|
|
831
|
-
{ key:
|
|
835
|
+
{ key: y["number-spinner"].type, value: y["number-spinner"].name }
|
|
832
836
|
],
|
|
833
837
|
BigNumber: [
|
|
834
|
-
{ key:
|
|
838
|
+
{ key: y["number-spinner"].type, value: y["number-spinner"].name }
|
|
835
839
|
],
|
|
836
840
|
Date: [
|
|
837
|
-
{ key:
|
|
841
|
+
{ key: y["date-picker"].type, value: y["date-picker"].name }
|
|
838
842
|
],
|
|
839
843
|
DateTime: [
|
|
840
|
-
{ key:
|
|
844
|
+
{ key: y["date-picker"].type, value: y["date-picker"].name }
|
|
841
845
|
],
|
|
842
846
|
Boolean: [
|
|
843
|
-
{ key:
|
|
844
|
-
{ key:
|
|
847
|
+
{ key: y.switch.type, value: y.switch.name },
|
|
848
|
+
{ key: y["check-box"].type, value: y["check-box"].name }
|
|
845
849
|
],
|
|
846
850
|
Enum: [
|
|
847
|
-
{ key:
|
|
848
|
-
{ key:
|
|
851
|
+
{ key: y["combo-list"].type, value: y["combo-list"].name },
|
|
852
|
+
{ key: y["radio-group"].type, value: y["radio-group"].name }
|
|
849
853
|
],
|
|
850
854
|
Object: [
|
|
851
|
-
{ key:
|
|
852
|
-
{ key:
|
|
853
|
-
{ key:
|
|
855
|
+
{ key: y.lookup.type, value: y.lookup.name },
|
|
856
|
+
{ key: y["combo-list"].type, value: y["combo-list"].name },
|
|
857
|
+
{ key: y["radio-group"].type, value: y["radio-group"].name }
|
|
854
858
|
]
|
|
855
859
|
});
|
|
856
|
-
let
|
|
857
|
-
const
|
|
858
|
-
class
|
|
859
|
-
constructor(
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
this
|
|
871
|
-
|
|
860
|
+
let I = P;
|
|
861
|
+
const Fe = T(0);
|
|
862
|
+
class Be {
|
|
863
|
+
constructor() {
|
|
864
|
+
/** 控件标题 */
|
|
865
|
+
v(this, "label", "");
|
|
866
|
+
/** 控件id */
|
|
867
|
+
v(this, "id", "");
|
|
868
|
+
/** 每个控件占用的栅格数 */
|
|
869
|
+
v(this, "columnInSM", 12);
|
|
870
|
+
v(this, "columnInMD", 6);
|
|
871
|
+
v(this, "columnInLG", 3);
|
|
872
|
+
v(this, "columnInEL", 2);
|
|
873
|
+
/** 每个控件占用的列数 */
|
|
874
|
+
v(this, "displayWidthInSM", 1);
|
|
875
|
+
v(this, "displayWidthInMD", 1);
|
|
876
|
+
v(this, "displayWidthInLG", 1);
|
|
877
|
+
v(this, "displayWidthInEL", 1);
|
|
878
|
+
/** 编辑器内部默认显示的屏幕大小-----可以去掉 */
|
|
879
|
+
v(this, "displayColumnCountAtBreakPoint", "md");
|
|
880
|
+
/** 控件所在行,传0即可-----编辑器内部使用 */
|
|
881
|
+
v(this, "tagRow", 0);
|
|
882
|
+
/** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
|
|
883
|
+
v(this, "showTopBorder", 0);
|
|
884
|
+
/** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
|
|
885
|
+
v(this, "group", 1);
|
|
886
|
+
/** 控件是否符合标准的class配置(设计器用的) */
|
|
887
|
+
v(this, "isSupportedClass", !0);
|
|
888
|
+
/** 控件所在分组id(设计器用的) */
|
|
889
|
+
v(this, "fieldSetId", "");
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
function Te(e) {
|
|
893
|
+
let n, t;
|
|
894
|
+
const r = /* @__PURE__ */ new Map();
|
|
895
|
+
let i = [];
|
|
896
|
+
function s(l, o) {
|
|
897
|
+
const f = l.split(" ").filter((w) => w.startsWith("col-"));
|
|
898
|
+
if (f.length === 0) {
|
|
899
|
+
o.isSupportedClass = !1;
|
|
900
|
+
return;
|
|
901
|
+
}
|
|
902
|
+
let p = f.find((w) => /^col-([1-9]|10|11|12)$/.test(w)), g = f.find((w) => /^col-md-([1-9]|10|11|12)$/.test(w)), b = f.find((w) => /^col-xl-([1-9]|10|11|12)$/.test(w)), S = f.find((w) => /^col-el-([1-9]|10|11|12)$/.test(w));
|
|
903
|
+
p = p || "col-12", o.columnInSM = parseInt(p.replace("col-", ""), 10), o.displayWidthInSM = o.columnInSM / 12, o.displayWidthInSM !== 1 && (o.isSupportedClass = !1), g = g || "col-md-" + o.columnInSM, o.columnInMD = parseInt(g.replace("col-md-", ""), 10), o.displayWidthInMD = o.columnInMD / 6, [1, 2].includes(o.displayWidthInMD) || (o.isSupportedClass = !1), b = b || "col-xl-" + o.columnInMD, o.columnInLG = parseInt(b.replace("col-xl-", ""), 10), o.displayWidthInLG = o.columnInLG / 3, [1, 2, 3, 4].includes(o.displayWidthInLG) || (o.isSupportedClass = !1), S = S || "col-el-" + o.columnInLG, o.columnInEL = parseInt(S.replace("col-el-", ""), 10), o.displayWidthInEL = o.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(o.displayWidthInEL) || (o.isSupportedClass = !1);
|
|
904
|
+
}
|
|
905
|
+
function c(l, o, u, f = !1) {
|
|
906
|
+
let p = !1;
|
|
907
|
+
l.contents.forEach((g) => {
|
|
908
|
+
if (g.type === "fieldset") {
|
|
909
|
+
u += 1, c(g, o, u, !0), p = !0;
|
|
910
|
+
return;
|
|
911
|
+
}
|
|
912
|
+
p && (u += 1, p = !1);
|
|
913
|
+
const b = g.appearance && g.appearance.class, S = new Be();
|
|
914
|
+
b ? s(b, S) : S.isSupportedClass = !1, S.label = g.label || g.id, S.id = g.id, S.group = u, f && (S.fieldSetId = l.id), t === g.id && (n = u), r.set(g.id, g), o.push(S);
|
|
915
|
+
});
|
|
916
|
+
}
|
|
917
|
+
function d(l) {
|
|
918
|
+
const o = e.getComponentById(l);
|
|
919
|
+
if (!o || !o.componentType || !o.componentType.startsWith("form"))
|
|
920
|
+
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
921
|
+
const u = e.selectNode(o, (f) => f.type === W["response-form"].type);
|
|
922
|
+
return !u || !u.contents || u.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: u };
|
|
923
|
+
}
|
|
924
|
+
function m(l, o) {
|
|
925
|
+
o = o || l.id;
|
|
926
|
+
const { result: u, message: f, formNode: p } = d(o);
|
|
927
|
+
if (!u)
|
|
928
|
+
return { result: u, message: f };
|
|
929
|
+
t = l.id, i = [], r.clear();
|
|
930
|
+
const g = p.contents[0].type === W.fieldset.type ? 0 : 1;
|
|
931
|
+
c(p, i, g);
|
|
932
|
+
const b = i.find((w) => !w.isSupportedClass);
|
|
872
933
|
return {
|
|
934
|
+
defaultState: {
|
|
935
|
+
defaultGroupNumber: n || 1,
|
|
936
|
+
model: b ? "customize" : "standard"
|
|
937
|
+
},
|
|
938
|
+
importData: i
|
|
939
|
+
};
|
|
940
|
+
}
|
|
941
|
+
function a(l, o) {
|
|
942
|
+
o = o;
|
|
943
|
+
const { result: u, formNode: f } = d(o);
|
|
944
|
+
if (!u)
|
|
945
|
+
return "";
|
|
946
|
+
const p = [];
|
|
947
|
+
return l.forEach((g) => {
|
|
948
|
+
var w;
|
|
949
|
+
const b = r.get(g.id), S = b.appearance && b.appearance.class;
|
|
950
|
+
if (S) {
|
|
951
|
+
const C = S.split(" ").filter((K) => !K.startsWith("col-")), h = "col-" + g.columnInSM, k = "col-md-" + g.columnInMD, M = "col-xl-" + g.columnInLG, F = "col-el-" + g.columnInEL, L = [h, k, M, F].concat(C);
|
|
952
|
+
b.appearance.class = L.join(" ");
|
|
953
|
+
}
|
|
954
|
+
if (g.fieldSetId) {
|
|
955
|
+
const V = f.contents.find((h) => h.id === g.fieldSetId), C = p.find((h) => h.id === g.fieldSetId);
|
|
956
|
+
C ? (w = C.contents) == null || w.push(b) : (p.push(V), V.contents = [b]);
|
|
957
|
+
} else
|
|
958
|
+
p.push(b);
|
|
959
|
+
}), f.contents = p, f.id;
|
|
960
|
+
}
|
|
961
|
+
return {
|
|
962
|
+
checkCanFindFormNode: d,
|
|
963
|
+
checkCanOpenLayoutEditor: m,
|
|
964
|
+
changeFormControlsByResponseLayoutConfig: a,
|
|
965
|
+
getResonseFormLayoutConfig: c
|
|
966
|
+
};
|
|
967
|
+
}
|
|
968
|
+
class Ve extends Ne {
|
|
969
|
+
constructor(t, r) {
|
|
970
|
+
super(t, r);
|
|
971
|
+
v(this, "responseLayoutEditorFunction");
|
|
972
|
+
this.responseLayoutEditorFunction = Te(this.formSchemaUtils);
|
|
973
|
+
}
|
|
974
|
+
getPropertyConfig(t, r) {
|
|
975
|
+
return this.propertyConfig.categories.basic = this.getBasicProperties(t, r), this.propertyConfig.categories.appearance = this.getAppearanceProperties(t, r), this.propertyConfig.categories.editor = this.getEditorProperties(t), this.propertyConfig;
|
|
976
|
+
}
|
|
977
|
+
getBasicProperties(t, r) {
|
|
978
|
+
var s;
|
|
979
|
+
const i = this;
|
|
980
|
+
return this.setDesignViewModelField(t), this.formSchemaUtils.getFormMetadataBasicInfo(), {
|
|
873
981
|
description: "Basic Information",
|
|
874
982
|
title: "基本信息",
|
|
875
983
|
properties: {
|
|
@@ -890,7 +998,7 @@ class Fe extends Te {
|
|
|
890
998
|
textField: "value",
|
|
891
999
|
valueField: "key",
|
|
892
1000
|
editable: !1,
|
|
893
|
-
data: i.designViewModelField ?
|
|
1001
|
+
data: i.designViewModelField ? I.getEditorTypesByMDataType((s = i.designViewModelField.type) == null ? void 0 : s.name) : I.getAllInputTypes()
|
|
894
1002
|
}
|
|
895
1003
|
},
|
|
896
1004
|
label: {
|
|
@@ -901,41 +1009,37 @@ class Fe extends Te {
|
|
|
901
1009
|
binding: {
|
|
902
1010
|
description: "绑定的表单字段",
|
|
903
1011
|
title: "绑定",
|
|
904
|
-
$converter: "/converter/field-selector.converter",
|
|
905
1012
|
editor: {
|
|
906
|
-
type: "
|
|
1013
|
+
type: "binding-selector",
|
|
907
1014
|
bindingType: { enable: !1 },
|
|
908
1015
|
editorParams: {
|
|
909
|
-
|
|
910
|
-
|
|
1016
|
+
componentSchema: t,
|
|
1017
|
+
needSyncToViewModel: !0,
|
|
1018
|
+
viewModelId: this.viewModelId,
|
|
1019
|
+
designerHostService: this.designerHostService,
|
|
1020
|
+
disableOccupiedFields: !0
|
|
911
1021
|
},
|
|
912
|
-
|
|
913
|
-
{ field: "name", title: "字段名称" },
|
|
914
|
-
{ field: "bindingField", title: "绑定字段" },
|
|
915
|
-
{ field: "fieldType", title: "字段类型" }
|
|
916
|
-
],
|
|
917
|
-
textField: "bindingField",
|
|
918
|
-
data: s
|
|
1022
|
+
textField: "bindingField"
|
|
919
1023
|
}
|
|
920
1024
|
}
|
|
921
1025
|
},
|
|
922
|
-
setPropertyRelates(
|
|
923
|
-
if (
|
|
924
|
-
switch (
|
|
1026
|
+
setPropertyRelates(c, d) {
|
|
1027
|
+
if (c)
|
|
1028
|
+
switch (c && c.propertyID) {
|
|
925
1029
|
case "type": {
|
|
926
|
-
i.changeControlType(
|
|
1030
|
+
i.changeControlType(t, c, r);
|
|
927
1031
|
break;
|
|
928
1032
|
}
|
|
929
1033
|
case "label": {
|
|
930
|
-
|
|
1034
|
+
c.needRefreshControlTree = !0;
|
|
931
1035
|
break;
|
|
932
1036
|
}
|
|
933
1037
|
}
|
|
934
1038
|
}
|
|
935
1039
|
};
|
|
936
1040
|
}
|
|
937
|
-
getAppearanceProperties(
|
|
938
|
-
|
|
1041
|
+
getAppearanceProperties(t, r) {
|
|
1042
|
+
const i = this;
|
|
939
1043
|
return {
|
|
940
1044
|
title: "样式",
|
|
941
1045
|
description: "Appearance",
|
|
@@ -961,69 +1065,69 @@ class Fe extends Te {
|
|
|
961
1065
|
refreshPanelAfterChanged: !0,
|
|
962
1066
|
editor: {
|
|
963
1067
|
type: "response-layout-editor-setting",
|
|
964
|
-
initialState: i.responseLayoutEditorFunction.checkCanOpenLayoutEditor(
|
|
1068
|
+
initialState: i.responseLayoutEditorFunction.checkCanOpenLayoutEditor(t, i.componentId)
|
|
965
1069
|
}
|
|
966
1070
|
}
|
|
967
1071
|
},
|
|
968
|
-
setPropertyRelates(
|
|
969
|
-
if (
|
|
970
|
-
switch (
|
|
1072
|
+
setPropertyRelates(s, c) {
|
|
1073
|
+
if (s)
|
|
1074
|
+
switch (s && s.propertyID) {
|
|
971
1075
|
case "responseLayout":
|
|
972
|
-
i.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(
|
|
1076
|
+
i.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(s.propertyValue, i.componentId || t.id), i.updateUnifiedLayoutAfterResponseLayoutChanged(i.componentId), i.updateElementByParentContainer(t.id, r), delete t.responseLayout;
|
|
973
1077
|
break;
|
|
974
1078
|
case "class":
|
|
975
|
-
i.updateUnifiedLayoutAfterControlChanged(
|
|
1079
|
+
i.updateUnifiedLayoutAfterControlChanged(s.propertyValue, t.id, this.componentId), i.updateElementByParentContainer(t.id, r);
|
|
976
1080
|
break;
|
|
977
1081
|
}
|
|
978
1082
|
}
|
|
979
1083
|
};
|
|
980
1084
|
}
|
|
981
|
-
getEditorProperties(
|
|
982
|
-
return this.getComponentConfig(
|
|
1085
|
+
getEditorProperties(t) {
|
|
1086
|
+
return this.getComponentConfig(t);
|
|
983
1087
|
}
|
|
984
1088
|
/**
|
|
985
1089
|
* 卡片控件:切换控件类型后事件
|
|
986
1090
|
* @param propertyData 控件DOM属性
|
|
987
1091
|
* @param newControlType 新控件类型
|
|
988
1092
|
*/
|
|
989
|
-
changeControlType(
|
|
990
|
-
var l,
|
|
991
|
-
const
|
|
992
|
-
if (!
|
|
1093
|
+
changeControlType(t, r, i) {
|
|
1094
|
+
var l, o, u, f;
|
|
1095
|
+
const s = r.propertyValue, c = i && i.parent && i.parent.schema;
|
|
1096
|
+
if (!c)
|
|
993
1097
|
return;
|
|
994
|
-
const
|
|
995
|
-
let
|
|
1098
|
+
const d = c.contents.findIndex((p) => p.id === t.id), m = c.contents[d];
|
|
1099
|
+
let a;
|
|
996
1100
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
997
1101
|
editor: {
|
|
998
|
-
$type:
|
|
1102
|
+
$type: s
|
|
999
1103
|
},
|
|
1000
1104
|
name: this.designViewModelField.name,
|
|
1001
1105
|
require: this.designViewModelField.require,
|
|
1002
1106
|
readonly: this.designViewModelField.readonly
|
|
1003
|
-
}, !1),
|
|
1004
|
-
id:
|
|
1005
|
-
appearance:
|
|
1006
|
-
size:
|
|
1007
|
-
label:
|
|
1008
|
-
binding:
|
|
1009
|
-
visible:
|
|
1010
|
-
}), Object.assign(
|
|
1011
|
-
isTextArea:
|
|
1012
|
-
placeholder: (l =
|
|
1013
|
-
holdPlace: (
|
|
1014
|
-
readonly: (
|
|
1015
|
-
require: (
|
|
1016
|
-
}),
|
|
1017
|
-
(
|
|
1018
|
-
),
|
|
1019
|
-
}
|
|
1020
|
-
getComponentConfig(
|
|
1021
|
-
const
|
|
1107
|
+
}, !1), a = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, s)), a || (a = this.controlCreatorUtils.createFormGroupWithoutField(s)), Object.assign(a, {
|
|
1108
|
+
id: m.id,
|
|
1109
|
+
appearance: m.appearance,
|
|
1110
|
+
size: m.size,
|
|
1111
|
+
label: m.label,
|
|
1112
|
+
binding: m.binding,
|
|
1113
|
+
visible: m.visible
|
|
1114
|
+
}), Object.assign(a.editor, {
|
|
1115
|
+
isTextArea: a.isTextArea && m.isTextArea,
|
|
1116
|
+
placeholder: (l = m.editor) == null ? void 0 : l.placeholder,
|
|
1117
|
+
holdPlace: (o = m.editor) == null ? void 0 : o.holdPlace,
|
|
1118
|
+
readonly: (u = m.editor) == null ? void 0 : u.readonly,
|
|
1119
|
+
require: (f = m.editor) == null ? void 0 : f.require
|
|
1120
|
+
}), c.contents.splice(d, 1), c.contents.splice(d, 0, a), i.schema = Object.assign(m, a), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
1121
|
+
(p) => p.classList.remove("dgComponentSelected")
|
|
1122
|
+
), Fe.value++;
|
|
1123
|
+
}
|
|
1124
|
+
getComponentConfig(t, r = {}, i = {}) {
|
|
1125
|
+
const s = Object.assign({
|
|
1022
1126
|
description: "编辑器",
|
|
1023
1127
|
title: "编辑器",
|
|
1024
1128
|
type: "input-group",
|
|
1025
1129
|
$converter: "/converter/property-editor.converter"
|
|
1026
|
-
}, r),
|
|
1130
|
+
}, r), c = Object.assign({
|
|
1027
1131
|
readonly: {
|
|
1028
1132
|
description: "",
|
|
1029
1133
|
title: "只读",
|
|
@@ -1045,7 +1149,7 @@ class Fe extends Te {
|
|
|
1045
1149
|
type: "string"
|
|
1046
1150
|
}
|
|
1047
1151
|
}, i);
|
|
1048
|
-
return { ...
|
|
1152
|
+
return { ...s, properties: { ...c } };
|
|
1049
1153
|
}
|
|
1050
1154
|
/**
|
|
1051
1155
|
* 修改某一输入控件的样式后更新Form的统一布局配置
|
|
@@ -1053,16 +1157,16 @@ class Fe extends Te {
|
|
|
1053
1157
|
* @param controlId 控件Id
|
|
1054
1158
|
* @param componentId 控件所在组件id
|
|
1055
1159
|
*/
|
|
1056
|
-
updateUnifiedLayoutAfterControlChanged(
|
|
1057
|
-
const
|
|
1058
|
-
let
|
|
1059
|
-
|
|
1160
|
+
updateUnifiedLayoutAfterControlChanged(t, r, i) {
|
|
1161
|
+
const s = t.split(" ");
|
|
1162
|
+
let c = s.find((o) => /^col-([1-9]|10|11|12)$/.test(o)), d = s.find((o) => /^col-md-([1-9]|10|11|12)$/.test(o)), m = s.find((o) => /^col-xl-([1-9]|10|11|12)$/.test(o)), a = s.find((o) => /^col-el-([1-9]|10|11|12)$/.test(o));
|
|
1163
|
+
c = c || "col-12", d = d || "col-md-" + c.replace("col-", ""), m = m || "col-xl-" + d.replace("col-md-", ""), a = a || "col-el-" + m.replace("col-xl-", "");
|
|
1060
1164
|
const l = {
|
|
1061
1165
|
id: r,
|
|
1062
|
-
columnInSM: parseInt(
|
|
1063
|
-
columnInMD: parseInt(
|
|
1064
|
-
columnInLG: parseInt(
|
|
1065
|
-
columnInEL: parseInt(
|
|
1166
|
+
columnInSM: parseInt(c.replace("col-", ""), 10),
|
|
1167
|
+
columnInMD: parseInt(d.replace("col-md-", ""), 10),
|
|
1168
|
+
columnInLG: parseInt(m.replace("col-xl-", ""), 10),
|
|
1169
|
+
columnInEL: parseInt(a.replace("col-el-", ""), 10)
|
|
1066
1170
|
};
|
|
1067
1171
|
this.updateUnifiedLayoutAfterResponseLayoutChanged(i, l);
|
|
1068
1172
|
}
|
|
@@ -1071,37 +1175,63 @@ class Fe extends Te {
|
|
|
1071
1175
|
* @param componentId 组件Id
|
|
1072
1176
|
* @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
|
|
1073
1177
|
*/
|
|
1074
|
-
updateUnifiedLayoutAfterResponseLayoutChanged(
|
|
1075
|
-
const { formNode: i } = this.responseLayoutEditorFunction.checkCanFindFormNode(
|
|
1178
|
+
updateUnifiedLayoutAfterResponseLayoutChanged(t, r) {
|
|
1179
|
+
const { formNode: i } = this.responseLayoutEditorFunction.checkCanFindFormNode(t);
|
|
1076
1180
|
if (!i || !i.unifiedLayout)
|
|
1077
1181
|
return;
|
|
1078
|
-
const
|
|
1079
|
-
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(i,
|
|
1080
|
-
const
|
|
1081
|
-
Object.assign(
|
|
1182
|
+
const s = [];
|
|
1183
|
+
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(i, s, 1), r) {
|
|
1184
|
+
const p = s.find((g) => g.id === r.id);
|
|
1185
|
+
Object.assign(p || {}, r);
|
|
1082
1186
|
}
|
|
1083
|
-
const
|
|
1187
|
+
const c = s.map((p) => p.columnInSM), d = s.map((p) => p.columnInMD), m = s.map((p) => p.columnInLG), a = s.map((p) => p.columnInEL), l = this.checkIsUniqueColumn(c) ? c[0] : null, o = this.checkIsUniqueColumn(d) ? d[0] : null, u = this.checkIsUniqueColumn(m) ? m[0] : null, f = this.checkIsUniqueColumn(a) ? a[0] : null;
|
|
1084
1188
|
Object.assign(i.unifiedLayout, {
|
|
1085
1189
|
uniqueColClassInSM: l,
|
|
1086
|
-
uniqueColClassInMD:
|
|
1087
|
-
uniqueColClassInLG:
|
|
1088
|
-
uniqueColClassInEL:
|
|
1190
|
+
uniqueColClassInMD: o,
|
|
1191
|
+
uniqueColClassInLG: u,
|
|
1192
|
+
uniqueColClassInEL: f
|
|
1089
1193
|
});
|
|
1090
1194
|
}
|
|
1091
1195
|
/**
|
|
1092
1196
|
* 校验宽度样式值是否一致
|
|
1093
1197
|
*/
|
|
1094
|
-
checkIsUniqueColumn(
|
|
1095
|
-
const r = new Set(
|
|
1198
|
+
checkIsUniqueColumn(t) {
|
|
1199
|
+
const r = new Set(t);
|
|
1096
1200
|
return Array.from(r).length === 1;
|
|
1097
1201
|
}
|
|
1098
1202
|
}
|
|
1099
|
-
class
|
|
1100
|
-
constructor(n,
|
|
1101
|
-
super(n,
|
|
1203
|
+
class Ee extends Ve {
|
|
1204
|
+
constructor(n, t) {
|
|
1205
|
+
super(n, t);
|
|
1102
1206
|
}
|
|
1103
1207
|
getEditorProperties(n) {
|
|
1104
1208
|
return this.getComponentConfig(n, { type: "number-spinner" }, {
|
|
1209
|
+
precision: {
|
|
1210
|
+
description: "",
|
|
1211
|
+
title: "精度",
|
|
1212
|
+
type: "number"
|
|
1213
|
+
},
|
|
1214
|
+
step: {
|
|
1215
|
+
description: "",
|
|
1216
|
+
title: "步长",
|
|
1217
|
+
type: "number"
|
|
1218
|
+
},
|
|
1219
|
+
max: {
|
|
1220
|
+
description: "",
|
|
1221
|
+
title: "最大值",
|
|
1222
|
+
type: "number",
|
|
1223
|
+
editor: {
|
|
1224
|
+
canNull: !0
|
|
1225
|
+
}
|
|
1226
|
+
},
|
|
1227
|
+
min: {
|
|
1228
|
+
description: "",
|
|
1229
|
+
title: "最小值",
|
|
1230
|
+
type: "number",
|
|
1231
|
+
editor: {
|
|
1232
|
+
canNull: !0
|
|
1233
|
+
}
|
|
1234
|
+
},
|
|
1105
1235
|
textAlign: {
|
|
1106
1236
|
description: "",
|
|
1107
1237
|
title: "对齐方式",
|
|
@@ -1117,7 +1247,7 @@ class xe extends Fe {
|
|
|
1117
1247
|
},
|
|
1118
1248
|
{
|
|
1119
1249
|
value: "center",
|
|
1120
|
-
name: "
|
|
1250
|
+
name: "居中"
|
|
1121
1251
|
},
|
|
1122
1252
|
{
|
|
1123
1253
|
value: "right",
|
|
@@ -1129,106 +1259,48 @@ class xe extends Fe {
|
|
|
1129
1259
|
});
|
|
1130
1260
|
}
|
|
1131
1261
|
}
|
|
1132
|
-
function
|
|
1133
|
-
t.schema;
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
return !1;
|
|
1137
|
-
}
|
|
1138
|
-
function c() {
|
|
1139
|
-
return !1;
|
|
1140
|
-
}
|
|
1141
|
-
function s() {
|
|
1142
|
-
return !1;
|
|
1143
|
-
}
|
|
1144
|
-
function p() {
|
|
1145
|
-
return !0;
|
|
1146
|
-
}
|
|
1147
|
-
function u(a) {
|
|
1148
|
-
}
|
|
1149
|
-
function o() {
|
|
1150
|
-
}
|
|
1151
|
-
function l(a) {
|
|
1152
|
-
return null;
|
|
1153
|
-
}
|
|
1154
|
-
return {
|
|
1155
|
-
canAccepts: i,
|
|
1156
|
-
checkCanDeleteComponent: c,
|
|
1157
|
-
checkCanMoveComponent: s,
|
|
1158
|
-
hideNestedPaddingInDesginerView: p,
|
|
1159
|
-
onAcceptMovedChildElement: u,
|
|
1160
|
-
resolveComponentContext: o,
|
|
1161
|
-
triggerBelongedComponentToMoveWhenMoved: e,
|
|
1162
|
-
triggerBelongedComponentToDeleteWhenDeleted: r,
|
|
1163
|
-
getPropsConfig: l
|
|
1164
|
-
};
|
|
1165
|
-
}
|
|
1166
|
-
function Pe(t, n) {
|
|
1167
|
-
const {
|
|
1168
|
-
canAccepts: e,
|
|
1169
|
-
checkCanDeleteComponent: r,
|
|
1170
|
-
checkCanMoveComponent: i,
|
|
1171
|
-
hideNestedPaddingInDesginerView: c,
|
|
1172
|
-
onAcceptMovedChildElement: s,
|
|
1173
|
-
resolveComponentContext: p,
|
|
1174
|
-
triggerBelongedComponentToMoveWhenMoved: u,
|
|
1175
|
-
triggerBelongedComponentToDeleteWhenDeleted: o
|
|
1176
|
-
} = Ee(t), l = t.schema;
|
|
1177
|
-
function a(d, y) {
|
|
1178
|
-
return new xe(d, n).getPropertyConfig(l, y);
|
|
1262
|
+
function Pe(e, n) {
|
|
1263
|
+
const t = e.schema;
|
|
1264
|
+
function r(i, s) {
|
|
1265
|
+
return new Ee(i, n).getPropertyConfig(t, s);
|
|
1179
1266
|
}
|
|
1180
|
-
return {
|
|
1181
|
-
canAccepts: e,
|
|
1182
|
-
checkCanDeleteComponent: r,
|
|
1183
|
-
checkCanMoveComponent: i,
|
|
1184
|
-
hideNestedPaddingInDesginerView: c,
|
|
1185
|
-
onAcceptMovedChildElement: s,
|
|
1186
|
-
resolveComponentContext: p,
|
|
1187
|
-
triggerBelongedComponentToMoveWhenMoved: u,
|
|
1188
|
-
triggerBelongedComponentToDeleteWhenDeleted: o,
|
|
1189
|
-
getPropsConfig: a
|
|
1190
|
-
};
|
|
1267
|
+
return { getPropsConfig: r };
|
|
1191
1268
|
}
|
|
1192
|
-
const De = /* @__PURE__ */
|
|
1269
|
+
const De = /* @__PURE__ */ $({
|
|
1193
1270
|
name: "FNumberSpinnerDesign",
|
|
1194
|
-
props:
|
|
1271
|
+
props: U,
|
|
1195
1272
|
emits: ["update:modelValue", "valueChange", "change", "blur", "focus", "click", "input"],
|
|
1196
|
-
setup(
|
|
1197
|
-
const
|
|
1198
|
-
|
|
1199
|
-
|
|
1273
|
+
setup(e, n) {
|
|
1274
|
+
const t = _(e, n), r = Y(e, n, t), i = J(e, n, r, t), s = R(e, n, i), c = T(), d = G("designer-host-service"), m = G("design-item-context"), a = Pe(m, d), l = Me(c, m, a);
|
|
1275
|
+
O(() => {
|
|
1276
|
+
c.value.componentInstance = l, e.readonly = !0;
|
|
1200
1277
|
}), n.expose(l.value);
|
|
1201
|
-
const
|
|
1202
|
-
return () =>
|
|
1203
|
-
ref:
|
|
1278
|
+
const o = T();
|
|
1279
|
+
return () => E("div", {
|
|
1280
|
+
ref: c,
|
|
1204
1281
|
class: "input-group f-state-hover flex-row f-cmp-number-spinner test"
|
|
1205
|
-
}, [
|
|
1206
|
-
ref:
|
|
1282
|
+
}, [E("input", {
|
|
1283
|
+
ref: o,
|
|
1207
1284
|
class: "form-control",
|
|
1208
1285
|
readonly: !0,
|
|
1209
|
-
placeholder:
|
|
1210
|
-
}, null),
|
|
1211
|
-
}
|
|
1212
|
-
})
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
e.component(n.name, t);
|
|
1216
|
-
}, t;
|
|
1217
|
-
};
|
|
1218
|
-
L.register = (t, n, e, r) => {
|
|
1219
|
-
t["number-spinner"] = L, n["number-spinner"] = Y;
|
|
1286
|
+
placeholder: e.placeholder
|
|
1287
|
+
}, null), s()]);
|
|
1288
|
+
}
|
|
1289
|
+
});
|
|
1290
|
+
D.register = (e, n, t, r) => {
|
|
1291
|
+
e["number-spinner"] = D, n["number-spinner"] = H;
|
|
1220
1292
|
};
|
|
1221
|
-
|
|
1222
|
-
|
|
1293
|
+
D.registerDesigner = (e, n, t) => {
|
|
1294
|
+
e["number-spinner"] = De, n["number-spinner"] = H;
|
|
1223
1295
|
};
|
|
1224
|
-
const
|
|
1296
|
+
const je = ne(D);
|
|
1225
1297
|
export {
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1298
|
+
D as FNumberSpinner,
|
|
1299
|
+
je as default,
|
|
1300
|
+
U as numberSpinnerProps,
|
|
1301
|
+
H as propsResolver,
|
|
1302
|
+
Y as useFormat,
|
|
1303
|
+
_ as useNumber,
|
|
1304
|
+
J as useSpinner,
|
|
1305
|
+
we as useTextBox
|
|
1234
1306
|
};
|