@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,106 +1,110 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { computed as
|
|
5
|
-
import { isPlainObject as H, cloneDeep as
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
function
|
|
1
|
+
var oe = Object.defineProperty;
|
|
2
|
+
var re = (e, n, t) => n in e ? oe(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
|
|
3
|
+
var v = (e, n, t) => re(e, typeof n != "symbol" ? n + "" : n, t);
|
|
4
|
+
import { computed as D, ref as P, createVNode as E, defineComponent as Q, onMounted as W, watch as x, createTextVNode as R, inject as Z } from "vue";
|
|
5
|
+
import { isPlainObject as H, cloneDeep as J } from "lodash-es";
|
|
6
|
+
import T from "bignumber.js";
|
|
7
|
+
import { DgControl as X } from "../designer-canvas/index.esm.js";
|
|
8
|
+
import { withInstall as ie } from "../common/index.esm.js";
|
|
9
|
+
function ae(e, n, t) {
|
|
10
10
|
return n;
|
|
11
11
|
}
|
|
12
|
-
const
|
|
13
|
-
function
|
|
14
|
-
const { properties: n, title: t, ignore: o } = e, r = o && Array.isArray(o), l = Object.keys(n).reduce((
|
|
15
|
-
|
|
12
|
+
const Y = {}, _ = {};
|
|
13
|
+
function $(e) {
|
|
14
|
+
const { properties: n, title: t, ignore: o } = e, r = o && Array.isArray(o), l = Object.keys(n).reduce((s, m) => ((!r || !o.find((d) => d === m)) && (s[m] = n[m].type === "object" && n[m].properties ? $(n[m]) : J(n[m].default)), s), {});
|
|
15
|
+
if (t && (!r || !o.find((s) => s === "id"))) {
|
|
16
|
+
const s = t.toLowerCase().replace(/-/g, "_");
|
|
17
|
+
l.id = `${s}_${Math.random().toString().slice(2, 6)}`;
|
|
18
|
+
}
|
|
19
|
+
return l;
|
|
16
20
|
}
|
|
17
|
-
function
|
|
18
|
-
const o =
|
|
21
|
+
function K(e, n = {}, t) {
|
|
22
|
+
const o = Y[e];
|
|
19
23
|
if (o) {
|
|
20
|
-
let r =
|
|
21
|
-
const l =
|
|
22
|
-
return r = l ? l({ getSchemaByType:
|
|
24
|
+
let r = $(o);
|
|
25
|
+
const l = _[e];
|
|
26
|
+
return r = l ? l({ getSchemaByType: K }, r, n, t) : r, r;
|
|
23
27
|
}
|
|
24
28
|
return null;
|
|
25
29
|
}
|
|
26
|
-
function
|
|
27
|
-
const t =
|
|
28
|
-
return Object.keys(
|
|
30
|
+
function le(e, n) {
|
|
31
|
+
const t = $(n);
|
|
32
|
+
return Object.keys(t).reduce((o, r) => (o[r] && H(o[r]) && H(e[r] || !e[r]) ? Object.assign(o[r], e[r] || {}) : o[r] = e[r], o), t), t;
|
|
29
33
|
}
|
|
30
|
-
function
|
|
34
|
+
function se(e, n) {
|
|
31
35
|
return Object.keys(e).filter((o) => e[o] != null).reduce((o, r) => {
|
|
32
36
|
if (n.has(r)) {
|
|
33
37
|
const l = n.get(r);
|
|
34
38
|
if (typeof l == "string")
|
|
35
39
|
o[l] = e[r];
|
|
36
40
|
else {
|
|
37
|
-
const
|
|
38
|
-
Object.assign(o,
|
|
41
|
+
const s = l(r, e[r], e);
|
|
42
|
+
Object.assign(o, s);
|
|
39
43
|
}
|
|
40
44
|
} else
|
|
41
45
|
o[r] = e[r];
|
|
42
46
|
return o;
|
|
43
47
|
}, {});
|
|
44
48
|
}
|
|
45
|
-
function
|
|
46
|
-
const o =
|
|
47
|
-
return
|
|
49
|
+
function ce(e, n, t = /* @__PURE__ */ new Map()) {
|
|
50
|
+
const o = le(e, n);
|
|
51
|
+
return se(o, t);
|
|
48
52
|
}
|
|
49
|
-
function
|
|
50
|
-
function n(
|
|
51
|
-
if (typeof
|
|
52
|
-
return
|
|
53
|
-
if (typeof
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
56
|
-
return Number(
|
|
57
|
-
if (
|
|
58
|
-
return Number(
|
|
59
|
-
if (
|
|
60
|
-
return Number(
|
|
53
|
+
function ue(e = {}) {
|
|
54
|
+
function n(a, c, i, u) {
|
|
55
|
+
if (typeof i == "number")
|
|
56
|
+
return u[a].length === i;
|
|
57
|
+
if (typeof i == "object") {
|
|
58
|
+
const f = Object.keys(i)[0], p = i[f];
|
|
59
|
+
if (f === "not")
|
|
60
|
+
return Number(u[a].length) !== Number(p);
|
|
61
|
+
if (f === "moreThan")
|
|
62
|
+
return Number(u[a].length) >= Number(p);
|
|
63
|
+
if (f === "lessThan")
|
|
64
|
+
return Number(u[a].length) <= Number(p);
|
|
61
65
|
}
|
|
62
66
|
return !1;
|
|
63
67
|
}
|
|
64
|
-
function t(
|
|
65
|
-
return
|
|
68
|
+
function t(a, c, i, u) {
|
|
69
|
+
return u[a] && u[a].propertyValue && String(u[a].propertyValue.value) === String(i);
|
|
66
70
|
}
|
|
67
71
|
const o = /* @__PURE__ */ new Map([
|
|
68
72
|
["length", n],
|
|
69
73
|
["getProperty", t]
|
|
70
74
|
]);
|
|
71
|
-
Object.keys(e).reduce((
|
|
72
|
-
function r(
|
|
73
|
-
const
|
|
74
|
-
return typeof
|
|
75
|
-
if (
|
|
76
|
-
return { target:
|
|
77
|
-
const
|
|
78
|
-
return { target:
|
|
75
|
+
Object.keys(e).reduce((a, c) => (a.set(c, e[c]), a), o);
|
|
76
|
+
function r(a, c) {
|
|
77
|
+
const i = a;
|
|
78
|
+
return typeof c == "number" ? [{ target: i, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: i, operator: "getProperty", param: a, value: !!c }] : typeof c == "object" ? Object.keys(c).map((u) => {
|
|
79
|
+
if (u === "length")
|
|
80
|
+
return { target: i, operator: "length", param: null, value: c[u] };
|
|
81
|
+
const f = u, p = c[u];
|
|
82
|
+
return { target: i, operator: "getProperty", param: f, value: p };
|
|
79
83
|
}) : [];
|
|
80
84
|
}
|
|
81
|
-
function l(
|
|
82
|
-
return Object.keys(
|
|
83
|
-
const
|
|
84
|
-
return
|
|
85
|
+
function l(a) {
|
|
86
|
+
return Object.keys(a).reduce((i, u) => {
|
|
87
|
+
const f = r(u, a[u]);
|
|
88
|
+
return i.push(...f), i;
|
|
85
89
|
}, []);
|
|
86
90
|
}
|
|
87
|
-
function
|
|
88
|
-
if (o.has(
|
|
89
|
-
const
|
|
90
|
-
return
|
|
91
|
+
function s(a, c) {
|
|
92
|
+
if (o.has(a.operator)) {
|
|
93
|
+
const i = o.get(a.operator);
|
|
94
|
+
return i && i(a.target, a.param, a.value, c) || !1;
|
|
91
95
|
}
|
|
92
96
|
return !1;
|
|
93
97
|
}
|
|
94
|
-
function
|
|
95
|
-
return l(
|
|
98
|
+
function m(a, c) {
|
|
99
|
+
return l(a).reduce((f, p) => f && s(p, c), !0);
|
|
96
100
|
}
|
|
97
|
-
function a
|
|
98
|
-
const
|
|
99
|
-
return
|
|
101
|
+
function d(a, c) {
|
|
102
|
+
const i = Object.keys(a), u = i.includes("allOf"), f = i.includes("anyOf"), p = u || f, C = (p ? a[p ? u ? "allOf" : "anyOf" : "allOf"] : [a]).map((k) => m(k, c));
|
|
103
|
+
return u ? !C.includes(!1) : C.includes(!0);
|
|
100
104
|
}
|
|
101
|
-
return { parseValueSchema:
|
|
105
|
+
return { parseValueSchema: d };
|
|
102
106
|
}
|
|
103
|
-
const
|
|
107
|
+
const y = {
|
|
104
108
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
105
109
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
106
110
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -138,21 +142,22 @@ const m = {
|
|
|
138
142
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
139
143
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
140
144
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
141
|
-
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
142
|
-
|
|
143
|
-
pe
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
145
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
|
|
146
|
+
"query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
|
|
147
|
+
}, de = {}, pe = {};
|
|
148
|
+
ue();
|
|
149
|
+
function me(e, n, t = /* @__PURE__ */ new Map(), o = (s, m, d, a) => m, r = {}, l = (s) => s) {
|
|
150
|
+
return Y[n.title] = n, _[n.title] = o, de[n.title] = r, pe[n.title] = l, (s = {}) => {
|
|
151
|
+
const m = ce(s, n, t), d = Object.keys(e).reduce((a, c) => (a[c] = e[c].default, a), {});
|
|
152
|
+
return Object.assign(d, m);
|
|
148
153
|
};
|
|
149
154
|
}
|
|
150
|
-
function
|
|
155
|
+
function fe(e, n) {
|
|
151
156
|
return { customClass: n.class, customStyle: n.style };
|
|
152
157
|
}
|
|
153
|
-
const
|
|
154
|
-
["appearance",
|
|
155
|
-
]),
|
|
158
|
+
const ge = /* @__PURE__ */ new Map([
|
|
159
|
+
["appearance", fe]
|
|
160
|
+
]), ye = "https://json-schema.org/draft/2020-12/schema", be = "https://farris-design.gitee.io/number-range.schema.json", he = "number-range", ve = "A Farris Component", Ce = "object", we = {
|
|
156
161
|
id: {
|
|
157
162
|
description: "The unique identifier for a number-range",
|
|
158
163
|
type: "string"
|
|
@@ -214,17 +219,17 @@ const ye = /* @__PURE__ */ new Map([
|
|
|
214
219
|
type: "boolean",
|
|
215
220
|
default: !0
|
|
216
221
|
}
|
|
217
|
-
},
|
|
222
|
+
}, Se = [
|
|
218
223
|
"id",
|
|
219
224
|
"type"
|
|
220
|
-
],
|
|
221
|
-
$schema:
|
|
222
|
-
$id:
|
|
223
|
-
title:
|
|
224
|
-
description:
|
|
225
|
-
type:
|
|
226
|
-
properties:
|
|
227
|
-
required:
|
|
225
|
+
], Me = {
|
|
226
|
+
$schema: ye,
|
|
227
|
+
$id: be,
|
|
228
|
+
title: he,
|
|
229
|
+
description: ve,
|
|
230
|
+
type: Ce,
|
|
231
|
+
properties: we,
|
|
232
|
+
required: Se
|
|
228
233
|
}, z = {
|
|
229
234
|
/**
|
|
230
235
|
* 组件标识
|
|
@@ -337,376 +342,338 @@ const ye = /* @__PURE__ */ new Map([
|
|
|
337
342
|
* 是否使用千分值
|
|
338
343
|
*/
|
|
339
344
|
useThousands: { type: Boolean, default: !0 }
|
|
340
|
-
}, ee =
|
|
345
|
+
}, ee = me(z, Me, ge, ae);
|
|
341
346
|
function te(e, n) {
|
|
342
|
-
const t =
|
|
343
|
-
function o(
|
|
344
|
-
return
|
|
347
|
+
const t = D(() => Number(e.precision) || 0);
|
|
348
|
+
function o(d) {
|
|
349
|
+
return d.toFixed(t.value);
|
|
345
350
|
}
|
|
346
|
-
function r(
|
|
347
|
-
return isNaN(
|
|
351
|
+
function r(d) {
|
|
352
|
+
return isNaN(d) || d === null || d === void 0 || d === "";
|
|
348
353
|
}
|
|
349
|
-
function l(
|
|
350
|
-
const
|
|
351
|
-
return
|
|
354
|
+
function l(d) {
|
|
355
|
+
const a = r(e.max) ? null : new T(String(e.max), 10), c = r(e.min) ? null : new T(String(e.min), 10);
|
|
356
|
+
return a && d.gt(a) ? a : c && d.lt(c) ? c : d;
|
|
352
357
|
}
|
|
353
|
-
function
|
|
354
|
-
const
|
|
355
|
-
let
|
|
356
|
-
return
|
|
358
|
+
function s(d, a, c, i) {
|
|
359
|
+
const u = new T(d, 10), f = r(c && c.value) ? null : new T(String(c.value), 10), p = r(a && a.value) ? null : new T(String(a.value), 10);
|
|
360
|
+
let b;
|
|
361
|
+
return i ? b = f && u.gt(f) ? f : u : b = p && u.lt(p) ? p : u, b.toString();
|
|
357
362
|
}
|
|
358
|
-
function
|
|
363
|
+
function m(d) {
|
|
359
364
|
if (e.parser)
|
|
360
|
-
return isNaN(Number(
|
|
361
|
-
let
|
|
362
|
-
if (
|
|
365
|
+
return isNaN(Number(d)) ? e.parser(d) : d;
|
|
366
|
+
let a = l(new T(d, 10));
|
|
367
|
+
if (a.isNaN()) {
|
|
363
368
|
if (e.canNull)
|
|
364
369
|
return null;
|
|
365
|
-
const
|
|
366
|
-
if (!
|
|
367
|
-
|
|
368
|
-
else if (!
|
|
369
|
-
|
|
370
|
+
const i = new T("" + e.min, 10), u = new T("" + e.max, 10);
|
|
371
|
+
if (!i.isNaN())
|
|
372
|
+
a = i;
|
|
373
|
+
else if (!u.isNaN())
|
|
374
|
+
a = u;
|
|
370
375
|
else
|
|
371
376
|
return 0;
|
|
372
377
|
}
|
|
373
|
-
return o(
|
|
378
|
+
return o(a);
|
|
374
379
|
}
|
|
375
|
-
return { getRealValue:
|
|
380
|
+
return { getRealValue: m, isEmpty: r, precision: t, getValidNumberObject: l, getValidNumberInRange: s };
|
|
376
381
|
}
|
|
377
382
|
function ne(e, n, t) {
|
|
378
|
-
const o =
|
|
383
|
+
const o = D(() => ({
|
|
379
384
|
prefix: e.prefix,
|
|
380
385
|
suffix: e.suffix,
|
|
381
386
|
decimalSeparator: e.decimalSeparator,
|
|
382
387
|
groupSeparator: e.useThousands ? e.groupSeparator : "",
|
|
383
388
|
groupSize: e.groupSize
|
|
384
389
|
})), { getValidNumberObject: r, precision: l } = t;
|
|
385
|
-
function
|
|
386
|
-
return
|
|
390
|
+
function s(a) {
|
|
391
|
+
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;
|
|
387
392
|
}
|
|
388
|
-
function
|
|
389
|
-
return e.precision !== null && e.precision !== void 0 ?
|
|
393
|
+
function m(a, c) {
|
|
394
|
+
return e.precision !== null && e.precision !== void 0 ? a.toFormat(l.value, c) : a.toFormat(c);
|
|
390
395
|
}
|
|
391
|
-
function a
|
|
392
|
-
const
|
|
393
|
-
return
|
|
396
|
+
function d(a) {
|
|
397
|
+
const c = s(a), i = new T(c, 10), u = r(i);
|
|
398
|
+
return u.valueOf() === "0" && !e.showZero || u.isNaN() ? "" : e.formatter ? e.formatter(u.toNumber()) : m(u, o.value);
|
|
394
399
|
}
|
|
395
|
-
return { cleanFormat:
|
|
400
|
+
return { cleanFormat: s, format: d };
|
|
396
401
|
}
|
|
397
|
-
function
|
|
398
|
-
const { format:
|
|
399
|
-
function g() {
|
|
400
|
-
const B = new M(o.value || 0);
|
|
401
|
-
return !(e.max && !new M(e.max).isNaN() && B.gte(new M(e.max)));
|
|
402
|
-
}
|
|
402
|
+
function A(e, n, t, o, r, l, s, m, d, a) {
|
|
403
|
+
const { format: c } = r, { getRealValue: i, getValidNumberInRange: u } = l;
|
|
403
404
|
function f() {
|
|
404
|
-
const
|
|
405
|
-
return !(e.
|
|
405
|
+
const N = new T(o.value || 0);
|
|
406
|
+
return !(e.max && !new T(e.max).isNaN() && N.gte(new T(e.max)));
|
|
407
|
+
}
|
|
408
|
+
function p() {
|
|
409
|
+
const N = new T(o.value || 0);
|
|
410
|
+
return !(e.min && !new T(e.min).isNaN() && N.lte(new T(e.min)));
|
|
406
411
|
}
|
|
407
|
-
function
|
|
412
|
+
function b(N) {
|
|
408
413
|
if (e.readonly || e.disabled)
|
|
409
414
|
return;
|
|
410
|
-
const
|
|
411
|
-
if (
|
|
412
|
-
let
|
|
413
|
-
|
|
415
|
+
const g = N === "up" ? f : p, M = N === "up" ? "plus" : "minus";
|
|
416
|
+
if (g()) {
|
|
417
|
+
let V = new T(o.value || 0)[M](Number(e.step)).toFixed();
|
|
418
|
+
V = u(V, m, d, a), t.value = c(V), o.value = i(V), s(o.value);
|
|
414
419
|
}
|
|
415
420
|
}
|
|
416
|
-
function
|
|
417
|
-
|
|
421
|
+
function S() {
|
|
422
|
+
b("up");
|
|
418
423
|
}
|
|
419
|
-
function
|
|
420
|
-
|
|
424
|
+
function C() {
|
|
425
|
+
b("down");
|
|
421
426
|
}
|
|
422
|
-
function
|
|
423
|
-
|
|
427
|
+
function w(N) {
|
|
428
|
+
S(), N.stopPropagation();
|
|
424
429
|
}
|
|
425
|
-
function
|
|
426
|
-
|
|
430
|
+
function k(N) {
|
|
431
|
+
C(), N.stopPropagation();
|
|
427
432
|
}
|
|
428
|
-
return { canDownward:
|
|
433
|
+
return { canDownward: p, canUpward: f, downward: C, onClickDownButton: k, onClickUpButton: w, upward: S };
|
|
429
434
|
}
|
|
430
|
-
function
|
|
431
|
-
const { cleanFormat:
|
|
432
|
-
function
|
|
433
|
-
var
|
|
434
|
-
if (
|
|
435
|
+
function O(e, n, t, o, r, l, s, m, d, a, c) {
|
|
436
|
+
const { cleanFormat: i, format: u } = r, { getRealValue: f, isEmpty: p, getValidNumberInRange: b } = l, { downward: S, upward: C } = s, w = D(() => t.value), k = P(!1);
|
|
437
|
+
function N(h) {
|
|
438
|
+
var I;
|
|
439
|
+
if (h.stopPropagation(), e.readonly || e.disabled)
|
|
435
440
|
return;
|
|
436
|
-
|
|
437
|
-
let
|
|
438
|
-
e.canNull || (
|
|
439
|
-
let
|
|
440
|
-
|
|
441
|
-
}
|
|
442
|
-
function
|
|
443
|
-
|
|
444
|
-
}
|
|
445
|
-
function
|
|
446
|
-
var
|
|
447
|
-
|
|
448
|
-
let
|
|
449
|
-
e.canNull || (
|
|
450
|
-
const
|
|
451
|
-
t.value =
|
|
452
|
-
}
|
|
453
|
-
function
|
|
454
|
-
|
|
455
|
-
}
|
|
456
|
-
return { textBoxValue:
|
|
441
|
+
k.value = !1;
|
|
442
|
+
let V = (I = h.target) == null ? void 0 : I.value;
|
|
443
|
+
e.canNull || (V = V || 0);
|
|
444
|
+
let F = i(V);
|
|
445
|
+
F = b(F, d, a, c), t.value = u(F), o.value = f(F), m(o.value), n.emit("blur", { event: h, formatted: t.value, value: o.value });
|
|
446
|
+
}
|
|
447
|
+
function g(h) {
|
|
448
|
+
h.stopPropagation(), !(e.readonly || e.disabled) && (k.value = !0, t.value = p(o.value) || !e.showZero && o.value === "0" ? "" : String(o.value), n.emit("focus", { event: h, formatted: t.value, value: o.value }));
|
|
449
|
+
}
|
|
450
|
+
function M(h) {
|
|
451
|
+
var I;
|
|
452
|
+
h.stopPropagation();
|
|
453
|
+
let V = (I = h.target) == null ? void 0 : I.value;
|
|
454
|
+
e.canNull || (V = V || 0);
|
|
455
|
+
const F = i(V);
|
|
456
|
+
t.value = F, o.value = f(F), m(o.value);
|
|
457
|
+
}
|
|
458
|
+
function B(h) {
|
|
459
|
+
h.key === "ArrowDown" && (h.preventDefault(), S()), h.key === "ArrowUp" && (h.preventDefault(), C()), h.stopPropagation();
|
|
460
|
+
}
|
|
461
|
+
return { textBoxValue: w, onBlurTextBox: N, onFocusTextBox: g, onInput: M, onKeyDown: B, isTextBoxFocused: k };
|
|
457
462
|
}
|
|
458
|
-
function
|
|
463
|
+
function j(e, n, t, o) {
|
|
459
464
|
const {
|
|
460
465
|
onBlurTextBox: r,
|
|
461
466
|
onFocusTextBox: l,
|
|
462
|
-
onInput:
|
|
463
|
-
onKeyDown:
|
|
464
|
-
textBoxValue:
|
|
465
|
-
} = t,
|
|
467
|
+
onInput: s,
|
|
468
|
+
onKeyDown: m,
|
|
469
|
+
textBoxValue: d
|
|
470
|
+
} = t, a = D(() => e.disabled || e.readonly || !e.editable ? "" : o ? e.beginPlaceHolder : e.endPlaceHolder), c = D(() => ({
|
|
466
471
|
"form-control": !0,
|
|
467
472
|
"sub-input": !0
|
|
468
|
-
})),
|
|
473
|
+
})), i = D(() => ({
|
|
469
474
|
"text-align": e.textAlign
|
|
470
475
|
}));
|
|
471
|
-
function
|
|
472
|
-
|
|
476
|
+
function u(f) {
|
|
477
|
+
f.stopPropagation();
|
|
473
478
|
}
|
|
474
|
-
return () =>
|
|
475
|
-
class:
|
|
476
|
-
style:
|
|
479
|
+
return () => E("input", {
|
|
480
|
+
class: c.value,
|
|
481
|
+
style: i.value,
|
|
477
482
|
type: "text",
|
|
478
|
-
value:
|
|
483
|
+
value: d.value,
|
|
479
484
|
disabled: e.disabled,
|
|
480
485
|
readonly: e.readonly || !e.editable,
|
|
481
|
-
placeholder:
|
|
486
|
+
placeholder: a.value,
|
|
482
487
|
onBlur: r,
|
|
483
|
-
onChange:
|
|
488
|
+
onChange: u,
|
|
484
489
|
onFocus: l,
|
|
485
|
-
onInput:
|
|
486
|
-
onKeydown:
|
|
490
|
+
onInput: s,
|
|
491
|
+
onKeydown: m
|
|
487
492
|
}, null);
|
|
488
493
|
}
|
|
489
|
-
function
|
|
494
|
+
function U(e, n, t) {
|
|
490
495
|
const {
|
|
491
496
|
canDownward: o,
|
|
492
497
|
canUpward: r,
|
|
493
498
|
onClickDownButton: l,
|
|
494
|
-
onClickUpButton:
|
|
495
|
-
} = t,
|
|
499
|
+
onClickUpButton: s
|
|
500
|
+
} = t, m = D(() => ({
|
|
496
501
|
"input-group-append": !0,
|
|
497
502
|
"btn-group": !0,
|
|
498
503
|
"btn-group-number": !0,
|
|
499
504
|
"sub-btn-group": !0
|
|
500
|
-
})),
|
|
505
|
+
})), d = D(() => ({
|
|
501
506
|
btn: !0,
|
|
502
507
|
"btn-secondary": !0,
|
|
503
508
|
"btn-number-flag": !0
|
|
504
|
-
})),
|
|
509
|
+
})), a = D(() => ({
|
|
505
510
|
cursor: r() ? "pointer" : "not-allowed",
|
|
506
511
|
"margin-left": 0
|
|
507
|
-
})),
|
|
512
|
+
})), c = D(() => ({
|
|
508
513
|
cursor: o() ? "pointer" : "not-allowed",
|
|
509
514
|
"margin-left": 0
|
|
510
515
|
}));
|
|
511
|
-
return () =>
|
|
512
|
-
class:
|
|
513
|
-
}, [
|
|
516
|
+
return () => E("div", {
|
|
517
|
+
class: m.value
|
|
518
|
+
}, [E("button", {
|
|
514
519
|
title: "upButton",
|
|
515
|
-
class:
|
|
516
|
-
style:
|
|
517
|
-
onClick:
|
|
520
|
+
class: d.value,
|
|
521
|
+
style: a.value,
|
|
522
|
+
onClick: s,
|
|
518
523
|
disabled: !r()
|
|
519
|
-
}, [
|
|
524
|
+
}, [E("span", {
|
|
520
525
|
class: "f-icon f-icon-arrow-chevron-up number-arrow-chevron"
|
|
521
|
-
}, null)]),
|
|
526
|
+
}, null)]), E("button", {
|
|
522
527
|
title: "downButton",
|
|
523
|
-
class:
|
|
524
|
-
style:
|
|
528
|
+
class: d.value,
|
|
529
|
+
style: c.value,
|
|
525
530
|
onClick: l,
|
|
526
531
|
disabled: !o()
|
|
527
|
-
}, [
|
|
532
|
+
}, [E("span", {
|
|
528
533
|
class: "f-icon f-icon-arrow-chevron-down number-arrow-chevron"
|
|
529
534
|
}, null)])]);
|
|
530
535
|
}
|
|
531
|
-
const
|
|
536
|
+
const G = /* @__PURE__ */ Q({
|
|
532
537
|
name: "FNumberRange",
|
|
533
538
|
props: z,
|
|
534
539
|
emits: ["valueChange", "blur", "focus", "click", "input", "beginValueChange", "endValueChange"],
|
|
535
540
|
setup(e, n) {
|
|
536
|
-
const t =
|
|
537
|
-
n.emit("beginValueChange",
|
|
538
|
-
},
|
|
539
|
-
n.emit("endValueChange",
|
|
540
|
-
},
|
|
541
|
-
getRealValue:
|
|
542
|
-
} =
|
|
543
|
-
format:
|
|
544
|
-
} =
|
|
545
|
-
return
|
|
546
|
-
const
|
|
547
|
-
o.value =
|
|
548
|
-
}),
|
|
549
|
-
if (!
|
|
550
|
-
const
|
|
551
|
-
o.value =
|
|
541
|
+
const t = P(e.beginValue), o = P(""), r = P(e.endValue), l = P(""), s = te(e), m = ne(e, n, s), d = (g) => {
|
|
542
|
+
n.emit("beginValueChange", g);
|
|
543
|
+
}, a = A(e, n, o, t, m, s, d, t, r, !0), c = O(e, n, o, t, m, s, a, d, t, r, !0), i = U(e, n, a), u = j(e, n, c, !0), f = (g) => {
|
|
544
|
+
n.emit("endValueChange", g);
|
|
545
|
+
}, p = A(e, n, l, r, m, s, f, t, r, !1), b = O(e, n, l, r, m, s, p, f, t, r, !1), S = U(e, n, p), C = j(e, n, b, !1), {
|
|
546
|
+
getRealValue: w
|
|
547
|
+
} = s, {
|
|
548
|
+
format: k
|
|
549
|
+
} = m, N = D(() => !e.disabled && !e.readonly && e.showButton);
|
|
550
|
+
return W(() => {
|
|
551
|
+
const g = w(e.beginValue), M = w(e.endValue);
|
|
552
|
+
o.value = k(g), l.value = k(M);
|
|
553
|
+
}), x(() => [e.beginValue], ([g]) => {
|
|
554
|
+
if (!c.isTextBoxFocused.value) {
|
|
555
|
+
const M = w(g);
|
|
556
|
+
o.value = k(M);
|
|
552
557
|
}
|
|
553
|
-
}),
|
|
554
|
-
if (!
|
|
555
|
-
const
|
|
556
|
-
l.value =
|
|
558
|
+
}), x(() => [e.endValue], ([g]) => {
|
|
559
|
+
if (!b.isTextBoxFocused.value) {
|
|
560
|
+
const M = w(g);
|
|
561
|
+
l.value = k(M);
|
|
557
562
|
}
|
|
558
|
-
}),
|
|
559
|
-
o.value =
|
|
560
|
-
}), () =>
|
|
563
|
+
}), x(() => [e.precision, e.useThousands, e.prefix, e.suffix, e.showZero], () => {
|
|
564
|
+
o.value = k(t.value), l.value = k(r.value);
|
|
565
|
+
}), () => E("div", {
|
|
561
566
|
class: "input-group number-range f-cmp-number-spinner"
|
|
562
|
-
}, [
|
|
567
|
+
}, [E("div", {
|
|
563
568
|
class: "form-control input-container"
|
|
564
|
-
}, [
|
|
569
|
+
}, [E("div", {
|
|
565
570
|
class: "sub-input-group"
|
|
566
|
-
}, [
|
|
571
|
+
}, [u(), N.value && i()]), E("span", {
|
|
567
572
|
class: "spliter"
|
|
568
|
-
}, [
|
|
573
|
+
}, [R("~")]), E("div", {
|
|
569
574
|
class: "sub-input-group"
|
|
570
|
-
}, [
|
|
575
|
+
}, [C(), N.value && S()])])]);
|
|
571
576
|
}
|
|
572
577
|
});
|
|
573
578
|
function Ne(e, n, t) {
|
|
574
579
|
var N;
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
}
|
|
578
|
-
o();
|
|
579
|
-
const r = t && t.getStyles && t.getStyles() || "", l = t && t.getDesignerClass && t.getDesignerClass() || "", u = V();
|
|
580
|
-
function p() {
|
|
580
|
+
const o = t && t.getStyles && t.getStyles() || "", r = t && t.getDesignerClass && t.getDesignerClass() || "", l = P();
|
|
581
|
+
function s() {
|
|
581
582
|
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
582
583
|
}
|
|
583
|
-
function
|
|
584
|
+
function m() {
|
|
584
585
|
return !1;
|
|
585
586
|
}
|
|
586
|
-
function
|
|
587
|
+
function d() {
|
|
587
588
|
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
588
589
|
}
|
|
589
|
-
function
|
|
590
|
+
function a() {
|
|
590
591
|
return (n == null ? void 0 : n.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
591
592
|
}
|
|
592
|
-
function c(
|
|
593
|
-
if (!
|
|
593
|
+
function c(g) {
|
|
594
|
+
if (!g || !g.value)
|
|
594
595
|
return null;
|
|
595
|
-
if (
|
|
596
|
-
return
|
|
597
|
-
const
|
|
598
|
-
return
|
|
596
|
+
if (g.value.schema && g.value.schema.type === "component")
|
|
597
|
+
return g.value;
|
|
598
|
+
const M = P(g == null ? void 0 : g.value.parent), B = c(M);
|
|
599
|
+
return B || null;
|
|
599
600
|
}
|
|
600
|
-
function
|
|
601
|
-
const { componentInstance:
|
|
602
|
-
return !
|
|
601
|
+
function i(g = n) {
|
|
602
|
+
const { componentInstance: M, designerItemElementRef: B } = g;
|
|
603
|
+
return !M || !M.value ? null : M.value.canMove ? B : i(g.parent);
|
|
603
604
|
}
|
|
604
|
-
function g
|
|
605
|
-
return !!t && t.canAccepts(
|
|
605
|
+
function u(g) {
|
|
606
|
+
return !!t && t.canAccepts(g);
|
|
606
607
|
}
|
|
607
608
|
function f() {
|
|
608
609
|
return (n == null ? void 0 : n.schema.label) || (n == null ? void 0 : n.schema.title) || (n == null ? void 0 : n.schema.name);
|
|
609
610
|
}
|
|
610
|
-
function
|
|
611
|
-
}
|
|
612
|
-
function D(y, C) {
|
|
613
|
-
C && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(C);
|
|
611
|
+
function p() {
|
|
614
612
|
}
|
|
615
|
-
function
|
|
616
|
-
|
|
617
|
-
let h = R(b, y, C);
|
|
618
|
-
t && t.onResolveNewComponentSchema && (h = t.onResolveNewComponentSchema(y, h));
|
|
619
|
-
const v = b.toLowerCase().replace("-", "_");
|
|
620
|
-
return h && !h.id && h.type === b && (h.id = `${v}_${Math.random().toString().slice(2, 6)}`), h;
|
|
613
|
+
function b(g, M) {
|
|
614
|
+
M && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(M);
|
|
621
615
|
}
|
|
622
|
-
function
|
|
623
|
-
const
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
return k && !k.id && k.type === b && (k.id = `${oe}_${Math.random().toString().slice(2, 6)}`), k;
|
|
616
|
+
function S(g, M) {
|
|
617
|
+
const { componentType: B } = g;
|
|
618
|
+
let h = K(B, g, M);
|
|
619
|
+
t && t.onResolveNewComponentSchema && (h = t.onResolveNewComponentSchema(g, h));
|
|
620
|
+
const V = B.toLowerCase().replace(/-/g, "_");
|
|
621
|
+
return h && !h.id && h.type === B && (h.id = `${V}_${Math.random().toString().slice(2, 6)}`), h;
|
|
629
622
|
}
|
|
630
|
-
function
|
|
623
|
+
function C(g) {
|
|
631
624
|
}
|
|
632
|
-
function
|
|
625
|
+
function w(...g) {
|
|
633
626
|
if (t && t.getPropsConfig)
|
|
634
|
-
return t.getPropsConfig(...
|
|
627
|
+
return t.getPropsConfig(...g);
|
|
628
|
+
}
|
|
629
|
+
function k() {
|
|
630
|
+
t && t.onRemoveComponent && t.onRemoveComponent(), n != null && n.schema.contents && n.schema.contents.map((g) => {
|
|
631
|
+
var h;
|
|
632
|
+
let M = g.id;
|
|
633
|
+
g.type === "component-ref" && (M = g.component);
|
|
634
|
+
const B = e.value.querySelector(`#${M}-design-item`);
|
|
635
|
+
(h = B == null ? void 0 : B.componentInstance) != null && h.value.onRemoveComponent && B.componentInstance.value.onRemoveComponent();
|
|
636
|
+
});
|
|
635
637
|
}
|
|
636
|
-
return
|
|
637
|
-
canMove:
|
|
638
|
-
canSelectParent:
|
|
639
|
-
canDelete:
|
|
640
|
-
canNested: !
|
|
638
|
+
return l.value = {
|
|
639
|
+
canMove: s(),
|
|
640
|
+
canSelectParent: m(),
|
|
641
|
+
canDelete: d(),
|
|
642
|
+
canNested: !a(),
|
|
641
643
|
contents: n == null ? void 0 : n.schema.contents,
|
|
642
644
|
elementRef: e,
|
|
643
645
|
parent: (N = n == null ? void 0 : n.parent) == null ? void 0 : N.componentInstance,
|
|
644
646
|
schema: n == null ? void 0 : n.schema,
|
|
645
|
-
styles:
|
|
646
|
-
designerClass:
|
|
647
|
-
canAccepts:
|
|
647
|
+
styles: o,
|
|
648
|
+
designerClass: r,
|
|
649
|
+
canAccepts: u,
|
|
648
650
|
getBelongedComponentInstance: c,
|
|
649
|
-
getDraggableDesignItemElement:
|
|
651
|
+
getDraggableDesignItemElement: i,
|
|
650
652
|
getDraggingDisplayText: f,
|
|
651
|
-
getPropConfig:
|
|
652
|
-
getDragScopeElement:
|
|
653
|
-
onAcceptMovedChildElement:
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
}, u;
|
|
653
|
+
getPropConfig: w,
|
|
654
|
+
getDragScopeElement: p,
|
|
655
|
+
onAcceptMovedChildElement: b,
|
|
656
|
+
onChildElementMovedOut: C,
|
|
657
|
+
addNewChildComponentSchema: S,
|
|
658
|
+
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || P(!1),
|
|
659
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || P(!1),
|
|
660
|
+
onRemoveComponent: k
|
|
661
|
+
}, l;
|
|
661
662
|
}
|
|
662
|
-
|
|
663
|
-
e.schema;
|
|
664
|
-
const t = V(!0), o = V(!0);
|
|
665
|
-
function r(c) {
|
|
666
|
-
return !1;
|
|
667
|
-
}
|
|
668
|
-
function l() {
|
|
669
|
-
return !1;
|
|
670
|
-
}
|
|
671
|
-
function u() {
|
|
672
|
-
return !1;
|
|
673
|
-
}
|
|
674
|
-
function p() {
|
|
675
|
-
return !0;
|
|
676
|
-
}
|
|
677
|
-
function a(c) {
|
|
678
|
-
}
|
|
679
|
-
function i() {
|
|
680
|
-
}
|
|
681
|
-
function s(c) {
|
|
682
|
-
return null;
|
|
683
|
-
}
|
|
684
|
-
return {
|
|
685
|
-
canAccepts: r,
|
|
686
|
-
checkCanDeleteComponent: l,
|
|
687
|
-
checkCanMoveComponent: u,
|
|
688
|
-
hideNestedPaddingInDesginerView: p,
|
|
689
|
-
onAcceptMovedChildElement: a,
|
|
690
|
-
resolveComponentContext: i,
|
|
691
|
-
triggerBelongedComponentToMoveWhenMoved: t,
|
|
692
|
-
triggerBelongedComponentToDeleteWhenDeleted: o,
|
|
693
|
-
getPropsConfig: s
|
|
694
|
-
};
|
|
695
|
-
}
|
|
696
|
-
class Me {
|
|
663
|
+
class ke {
|
|
697
664
|
constructor(n, t) {
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
665
|
+
v(this, "componentId");
|
|
666
|
+
v(this, "viewModelId");
|
|
667
|
+
v(this, "eventsEditorUtils");
|
|
668
|
+
v(this, "formSchemaUtils");
|
|
669
|
+
v(this, "formMetadataConverter");
|
|
670
|
+
v(this, "designViewModelUtils");
|
|
671
|
+
v(this, "designViewModelField");
|
|
672
|
+
v(this, "controlCreatorUtils");
|
|
673
|
+
v(this, "designerHostService");
|
|
674
|
+
v(this, "schemaService", null);
|
|
675
|
+
v(this, "metadataService", null);
|
|
676
|
+
v(this, "propertyConfig", {
|
|
710
677
|
type: "object",
|
|
711
678
|
categories: {}
|
|
712
679
|
});
|
|
@@ -718,13 +685,14 @@ class Me {
|
|
|
718
685
|
return (n = this.schemaService) == null ? void 0 : n.getTableInfoByViewModelId(this.viewModelId);
|
|
719
686
|
}
|
|
720
687
|
setDesignViewModelField(n) {
|
|
688
|
+
var o;
|
|
721
689
|
const t = n.binding && n.binding.type === "Form" && n.binding.field;
|
|
722
690
|
if (t) {
|
|
723
691
|
if (!this.designViewModelField) {
|
|
724
|
-
const
|
|
725
|
-
this.designViewModelField =
|
|
692
|
+
const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
693
|
+
this.designViewModelField = r.fields.find((l) => l.id === t);
|
|
726
694
|
}
|
|
727
|
-
n.updateOn = this.designViewModelField.updateOn;
|
|
695
|
+
n.updateOn = (o = this.designViewModelField) == null ? void 0 : o.updateOn;
|
|
728
696
|
}
|
|
729
697
|
}
|
|
730
698
|
changeFieldEditorType(n, t) {
|
|
@@ -748,7 +716,7 @@ class Me {
|
|
|
748
716
|
type: "combo-list",
|
|
749
717
|
textField: "name",
|
|
750
718
|
valueField: "value",
|
|
751
|
-
data: [{ value: n.type, name:
|
|
719
|
+
data: [{ value: n.type, name: y[n.type].name }]
|
|
752
720
|
}
|
|
753
721
|
}
|
|
754
722
|
}
|
|
@@ -784,16 +752,16 @@ class Me {
|
|
|
784
752
|
const o = t && t.parent && t.parent.schema;
|
|
785
753
|
if (!o)
|
|
786
754
|
return;
|
|
787
|
-
const r = o.contents.findIndex((
|
|
755
|
+
const r = o.contents.findIndex((s) => s.id === n), l = J(o.contents[r]);
|
|
788
756
|
o.contents.splice(r, 1), o.contents.splice(r, 0, l);
|
|
789
757
|
}
|
|
790
758
|
}
|
|
791
|
-
const
|
|
759
|
+
const L = class L {
|
|
792
760
|
/**
|
|
793
761
|
* 根据绑定字段类型获取可用的输入类控件
|
|
794
762
|
*/
|
|
795
763
|
static getEditorTypesByMDataType(n) {
|
|
796
|
-
const t =
|
|
764
|
+
const t = L.fieldControlTypeMapping[n];
|
|
797
765
|
return t || [{ key: "", value: "" }];
|
|
798
766
|
}
|
|
799
767
|
/**
|
|
@@ -801,8 +769,8 @@ const A = class A {
|
|
|
801
769
|
*/
|
|
802
770
|
static getAllInputTypes() {
|
|
803
771
|
const n = [];
|
|
804
|
-
for (
|
|
805
|
-
|
|
772
|
+
for (const t in L.fieldControlTypeMapping)
|
|
773
|
+
L.fieldControlTypeMapping[t].forEach((o) => {
|
|
806
774
|
n.find((r) => r.key === o.key && r.value === o.value) || n.push({ key: o.key, value: o.value });
|
|
807
775
|
});
|
|
808
776
|
return n;
|
|
@@ -811,69 +779,174 @@ const A = class A {
|
|
|
811
779
|
/**
|
|
812
780
|
* <字段类型,可配置的控件类型列表>的映射
|
|
813
781
|
*/
|
|
814
|
-
|
|
782
|
+
v(L, "fieldControlTypeMapping", {
|
|
815
783
|
String: [
|
|
816
|
-
{ key:
|
|
817
|
-
{ key:
|
|
818
|
-
{ key:
|
|
819
|
-
{ key:
|
|
820
|
-
{ key:
|
|
821
|
-
{ key:
|
|
822
|
-
{ key:
|
|
784
|
+
{ key: y["input-group"].type, value: y["input-group"].name },
|
|
785
|
+
{ key: y.lookup.type, value: y.lookup.name },
|
|
786
|
+
{ key: y["date-picker"].type, value: y["date-picker"].name },
|
|
787
|
+
{ key: y["check-box"].type, value: y["check-box"].name },
|
|
788
|
+
{ key: y["check-group"].type, value: y["check-group"].name },
|
|
789
|
+
{ key: y["radio-group"].type, value: y["radio-group"].name },
|
|
790
|
+
{ key: y["combo-list"].type, value: y["combo-list"].name },
|
|
791
|
+
{ key: y.textarea.type, value: y.textarea.name }
|
|
823
792
|
],
|
|
824
793
|
Text: [
|
|
825
|
-
{ key:
|
|
826
|
-
{ key:
|
|
794
|
+
{ key: y.textarea.type, value: y.textarea.name },
|
|
795
|
+
{ key: y.lookup.type, value: y.lookup.name }
|
|
827
796
|
],
|
|
828
797
|
Decimal: [
|
|
829
|
-
{ key:
|
|
798
|
+
{ key: y["number-spinner"].type, value: y["number-spinner"].name }
|
|
830
799
|
],
|
|
831
800
|
Integer: [
|
|
832
|
-
{ key:
|
|
801
|
+
{ key: y["number-spinner"].type, value: y["number-spinner"].name }
|
|
833
802
|
],
|
|
834
803
|
Number: [
|
|
835
|
-
{ key:
|
|
804
|
+
{ key: y["number-spinner"].type, value: y["number-spinner"].name }
|
|
836
805
|
],
|
|
837
806
|
BigNumber: [
|
|
838
|
-
{ key:
|
|
807
|
+
{ key: y["number-spinner"].type, value: y["number-spinner"].name }
|
|
839
808
|
],
|
|
840
809
|
Date: [
|
|
841
|
-
{ key:
|
|
810
|
+
{ key: y["date-picker"].type, value: y["date-picker"].name }
|
|
842
811
|
],
|
|
843
812
|
DateTime: [
|
|
844
|
-
{ key:
|
|
813
|
+
{ key: y["date-picker"].type, value: y["date-picker"].name }
|
|
845
814
|
],
|
|
846
815
|
Boolean: [
|
|
847
|
-
{ key:
|
|
848
|
-
{ key:
|
|
816
|
+
{ key: y.switch.type, value: y.switch.name },
|
|
817
|
+
{ key: y["check-box"].type, value: y["check-box"].name }
|
|
849
818
|
],
|
|
850
819
|
Enum: [
|
|
851
|
-
{ key:
|
|
852
|
-
{ key:
|
|
820
|
+
{ key: y["combo-list"].type, value: y["combo-list"].name },
|
|
821
|
+
{ key: y["radio-group"].type, value: y["radio-group"].name }
|
|
853
822
|
],
|
|
854
823
|
Object: [
|
|
855
|
-
{ key:
|
|
856
|
-
{ key:
|
|
857
|
-
{ key:
|
|
824
|
+
{ key: y.lookup.type, value: y.lookup.name },
|
|
825
|
+
{ key: y["combo-list"].type, value: y["combo-list"].name },
|
|
826
|
+
{ key: y["radio-group"].type, value: y["radio-group"].name }
|
|
858
827
|
]
|
|
859
828
|
});
|
|
860
|
-
let q =
|
|
861
|
-
const
|
|
862
|
-
class
|
|
829
|
+
let q = L;
|
|
830
|
+
const Be = P(0);
|
|
831
|
+
class Ve {
|
|
832
|
+
constructor() {
|
|
833
|
+
/** 控件标题 */
|
|
834
|
+
v(this, "label", "");
|
|
835
|
+
/** 控件id */
|
|
836
|
+
v(this, "id", "");
|
|
837
|
+
/** 每个控件占用的栅格数 */
|
|
838
|
+
v(this, "columnInSM", 12);
|
|
839
|
+
v(this, "columnInMD", 6);
|
|
840
|
+
v(this, "columnInLG", 3);
|
|
841
|
+
v(this, "columnInEL", 2);
|
|
842
|
+
/** 每个控件占用的列数 */
|
|
843
|
+
v(this, "displayWidthInSM", 1);
|
|
844
|
+
v(this, "displayWidthInMD", 1);
|
|
845
|
+
v(this, "displayWidthInLG", 1);
|
|
846
|
+
v(this, "displayWidthInEL", 1);
|
|
847
|
+
/** 编辑器内部默认显示的屏幕大小-----可以去掉 */
|
|
848
|
+
v(this, "displayColumnCountAtBreakPoint", "md");
|
|
849
|
+
/** 控件所在行,传0即可-----编辑器内部使用 */
|
|
850
|
+
v(this, "tagRow", 0);
|
|
851
|
+
/** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
|
|
852
|
+
v(this, "showTopBorder", 0);
|
|
853
|
+
/** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
|
|
854
|
+
v(this, "group", 1);
|
|
855
|
+
/** 控件是否符合标准的class配置(设计器用的) */
|
|
856
|
+
v(this, "isSupportedClass", !0);
|
|
857
|
+
/** 控件所在分组id(设计器用的) */
|
|
858
|
+
v(this, "fieldSetId", "");
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
function Fe(e) {
|
|
862
|
+
let n, t;
|
|
863
|
+
const o = /* @__PURE__ */ new Map();
|
|
864
|
+
let r = [];
|
|
865
|
+
function l(c, i) {
|
|
866
|
+
const f = c.split(" ").filter((w) => w.startsWith("col-"));
|
|
867
|
+
if (f.length === 0) {
|
|
868
|
+
i.isSupportedClass = !1;
|
|
869
|
+
return;
|
|
870
|
+
}
|
|
871
|
+
let p = f.find((w) => /^col-([1-9]|10|11|12)$/.test(w)), b = f.find((w) => /^col-md-([1-9]|10|11|12)$/.test(w)), S = f.find((w) => /^col-xl-([1-9]|10|11|12)$/.test(w)), C = f.find((w) => /^col-el-([1-9]|10|11|12)$/.test(w));
|
|
872
|
+
p = p || "col-12", i.columnInSM = parseInt(p.replace("col-", ""), 10), i.displayWidthInSM = i.columnInSM / 12, i.displayWidthInSM !== 1 && (i.isSupportedClass = !1), b = b || "col-md-" + i.columnInSM, i.columnInMD = parseInt(b.replace("col-md-", ""), 10), i.displayWidthInMD = i.columnInMD / 6, [1, 2].includes(i.displayWidthInMD) || (i.isSupportedClass = !1), S = S || "col-xl-" + i.columnInMD, i.columnInLG = parseInt(S.replace("col-xl-", ""), 10), i.displayWidthInLG = i.columnInLG / 3, [1, 2, 3, 4].includes(i.displayWidthInLG) || (i.isSupportedClass = !1), C = C || "col-el-" + i.columnInLG, i.columnInEL = parseInt(C.replace("col-el-", ""), 10), i.displayWidthInEL = i.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(i.displayWidthInEL) || (i.isSupportedClass = !1);
|
|
873
|
+
}
|
|
874
|
+
function s(c, i, u, f = !1) {
|
|
875
|
+
let p = !1;
|
|
876
|
+
c.contents.forEach((b) => {
|
|
877
|
+
if (b.type === "fieldset") {
|
|
878
|
+
u += 1, s(b, i, u, !0), p = !0;
|
|
879
|
+
return;
|
|
880
|
+
}
|
|
881
|
+
p && (u += 1, p = !1);
|
|
882
|
+
const S = b.appearance && b.appearance.class, C = new Ve();
|
|
883
|
+
S ? l(S, C) : C.isSupportedClass = !1, C.label = b.label || b.id, C.id = b.id, C.group = u, f && (C.fieldSetId = c.id), t === b.id && (n = u), o.set(b.id, b), i.push(C);
|
|
884
|
+
});
|
|
885
|
+
}
|
|
886
|
+
function m(c) {
|
|
887
|
+
const i = e.getComponentById(c);
|
|
888
|
+
if (!i || !i.componentType || !i.componentType.startsWith("form"))
|
|
889
|
+
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
890
|
+
const u = e.selectNode(i, (f) => f.type === X["response-form"].type);
|
|
891
|
+
return !u || !u.contents || u.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: u };
|
|
892
|
+
}
|
|
893
|
+
function d(c, i) {
|
|
894
|
+
i = i || c.id;
|
|
895
|
+
const { result: u, message: f, formNode: p } = m(i);
|
|
896
|
+
if (!u)
|
|
897
|
+
return { result: u, message: f };
|
|
898
|
+
t = c.id, r = [], o.clear();
|
|
899
|
+
const b = p.contents[0].type === X.fieldset.type ? 0 : 1;
|
|
900
|
+
s(p, r, b);
|
|
901
|
+
const S = r.find((w) => !w.isSupportedClass);
|
|
902
|
+
return {
|
|
903
|
+
defaultState: {
|
|
904
|
+
defaultGroupNumber: n || 1,
|
|
905
|
+
model: S ? "customize" : "standard"
|
|
906
|
+
},
|
|
907
|
+
importData: r
|
|
908
|
+
};
|
|
909
|
+
}
|
|
910
|
+
function a(c, i) {
|
|
911
|
+
i = i;
|
|
912
|
+
const { result: u, formNode: f } = m(i);
|
|
913
|
+
if (!u)
|
|
914
|
+
return "";
|
|
915
|
+
const p = [];
|
|
916
|
+
return c.forEach((b) => {
|
|
917
|
+
var w;
|
|
918
|
+
const S = o.get(b.id), C = S.appearance && S.appearance.class;
|
|
919
|
+
if (C) {
|
|
920
|
+
const N = C.split(" ").filter((F) => !F.startsWith("col-")), g = "col-" + b.columnInSM, M = "col-md-" + b.columnInMD, B = "col-xl-" + b.columnInLG, h = "col-el-" + b.columnInEL, V = [g, M, B, h].concat(N);
|
|
921
|
+
S.appearance.class = V.join(" ");
|
|
922
|
+
}
|
|
923
|
+
if (b.fieldSetId) {
|
|
924
|
+
const k = f.contents.find((g) => g.id === b.fieldSetId), N = p.find((g) => g.id === b.fieldSetId);
|
|
925
|
+
N ? (w = N.contents) == null || w.push(S) : (p.push(k), k.contents = [S]);
|
|
926
|
+
} else
|
|
927
|
+
p.push(S);
|
|
928
|
+
}), f.contents = p, f.id;
|
|
929
|
+
}
|
|
930
|
+
return {
|
|
931
|
+
checkCanFindFormNode: m,
|
|
932
|
+
checkCanOpenLayoutEditor: d,
|
|
933
|
+
changeFormControlsByResponseLayoutConfig: a,
|
|
934
|
+
getResonseFormLayoutConfig: s
|
|
935
|
+
};
|
|
936
|
+
}
|
|
937
|
+
class Te extends ke {
|
|
863
938
|
constructor(t, o) {
|
|
864
939
|
super(t, o);
|
|
865
|
-
|
|
866
|
-
this.responseLayoutEditorFunction =
|
|
940
|
+
v(this, "responseLayoutEditorFunction");
|
|
941
|
+
this.responseLayoutEditorFunction = Fe(this.formSchemaUtils);
|
|
867
942
|
}
|
|
868
943
|
getPropertyConfig(t, o) {
|
|
869
944
|
return this.propertyConfig.categories.basic = this.getBasicProperties(t, o), this.propertyConfig.categories.appearance = this.getAppearanceProperties(t, o), this.propertyConfig.categories.editor = this.getEditorProperties(t), this.propertyConfig;
|
|
870
945
|
}
|
|
871
946
|
getBasicProperties(t, o) {
|
|
872
|
-
var
|
|
873
|
-
|
|
874
|
-
this.setDesignViewModelField(t)
|
|
875
|
-
const l = this.formSchemaUtils.getFormMetadataBasicInfo(), u = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
876
|
-
return {
|
|
947
|
+
var l;
|
|
948
|
+
const r = this;
|
|
949
|
+
return this.setDesignViewModelField(t), this.formSchemaUtils.getFormMetadataBasicInfo(), {
|
|
877
950
|
description: "Basic Information",
|
|
878
951
|
title: "基本信息",
|
|
879
952
|
properties: {
|
|
@@ -894,7 +967,7 @@ class xe extends Me {
|
|
|
894
967
|
textField: "value",
|
|
895
968
|
valueField: "key",
|
|
896
969
|
editable: !1,
|
|
897
|
-
data: r.designViewModelField ? q.getEditorTypesByMDataType((
|
|
970
|
+
data: r.designViewModelField ? q.getEditorTypesByMDataType((l = r.designViewModelField.type) == null ? void 0 : l.name) : q.getAllInputTypes()
|
|
898
971
|
}
|
|
899
972
|
},
|
|
900
973
|
label: {
|
|
@@ -905,33 +978,29 @@ class xe extends Me {
|
|
|
905
978
|
binding: {
|
|
906
979
|
description: "绑定的表单字段",
|
|
907
980
|
title: "绑定",
|
|
908
|
-
$converter: "/converter/field-selector.converter",
|
|
909
981
|
editor: {
|
|
910
|
-
type: "
|
|
982
|
+
type: "binding-selector",
|
|
911
983
|
bindingType: { enable: !1 },
|
|
912
984
|
editorParams: {
|
|
913
|
-
|
|
914
|
-
|
|
985
|
+
componentSchema: t,
|
|
986
|
+
needSyncToViewModel: !0,
|
|
987
|
+
viewModelId: this.viewModelId,
|
|
988
|
+
designerHostService: this.designerHostService,
|
|
989
|
+
disableOccupiedFields: !0
|
|
915
990
|
},
|
|
916
|
-
|
|
917
|
-
{ field: "name", title: "字段名称" },
|
|
918
|
-
{ field: "bindingField", title: "绑定字段" },
|
|
919
|
-
{ field: "fieldType", title: "字段类型" }
|
|
920
|
-
],
|
|
921
|
-
textField: "bindingField",
|
|
922
|
-
data: u
|
|
991
|
+
textField: "bindingField"
|
|
923
992
|
}
|
|
924
993
|
}
|
|
925
994
|
},
|
|
926
|
-
setPropertyRelates(
|
|
927
|
-
if (
|
|
928
|
-
switch (
|
|
995
|
+
setPropertyRelates(s, m) {
|
|
996
|
+
if (s)
|
|
997
|
+
switch (s && s.propertyID) {
|
|
929
998
|
case "type": {
|
|
930
|
-
r.changeControlType(t,
|
|
999
|
+
r.changeControlType(t, s, o);
|
|
931
1000
|
break;
|
|
932
1001
|
}
|
|
933
1002
|
case "label": {
|
|
934
|
-
|
|
1003
|
+
s.needRefreshControlTree = !0;
|
|
935
1004
|
break;
|
|
936
1005
|
}
|
|
937
1006
|
}
|
|
@@ -939,7 +1008,7 @@ class xe extends Me {
|
|
|
939
1008
|
};
|
|
940
1009
|
}
|
|
941
1010
|
getAppearanceProperties(t, o) {
|
|
942
|
-
|
|
1011
|
+
const r = this;
|
|
943
1012
|
return {
|
|
944
1013
|
title: "样式",
|
|
945
1014
|
description: "Appearance",
|
|
@@ -969,7 +1038,7 @@ class xe extends Me {
|
|
|
969
1038
|
}
|
|
970
1039
|
}
|
|
971
1040
|
},
|
|
972
|
-
setPropertyRelates(l,
|
|
1041
|
+
setPropertyRelates(l, s) {
|
|
973
1042
|
if (l)
|
|
974
1043
|
switch (l && l.propertyID) {
|
|
975
1044
|
case "responseLayout":
|
|
@@ -991,12 +1060,12 @@ class xe extends Me {
|
|
|
991
1060
|
* @param newControlType 新控件类型
|
|
992
1061
|
*/
|
|
993
1062
|
changeControlType(t, o, r) {
|
|
994
|
-
var
|
|
995
|
-
const l = o.propertyValue,
|
|
996
|
-
if (!
|
|
1063
|
+
var c, i, u, f;
|
|
1064
|
+
const l = o.propertyValue, s = r && r.parent && r.parent.schema;
|
|
1065
|
+
if (!s)
|
|
997
1066
|
return;
|
|
998
|
-
const
|
|
999
|
-
let
|
|
1067
|
+
const m = s.contents.findIndex((p) => p.id === t.id), d = s.contents[m];
|
|
1068
|
+
let a;
|
|
1000
1069
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
1001
1070
|
editor: {
|
|
1002
1071
|
$type: l
|
|
@@ -1004,22 +1073,22 @@ class xe extends Me {
|
|
|
1004
1073
|
name: this.designViewModelField.name,
|
|
1005
1074
|
require: this.designViewModelField.require,
|
|
1006
1075
|
readonly: this.designViewModelField.readonly
|
|
1007
|
-
}, !1),
|
|
1008
|
-
id:
|
|
1009
|
-
appearance:
|
|
1010
|
-
size:
|
|
1011
|
-
label:
|
|
1012
|
-
binding:
|
|
1013
|
-
visible:
|
|
1014
|
-
}), Object.assign(
|
|
1015
|
-
isTextArea:
|
|
1016
|
-
placeholder: (
|
|
1017
|
-
holdPlace: (
|
|
1018
|
-
readonly: (
|
|
1019
|
-
require: (
|
|
1020
|
-
}),
|
|
1021
|
-
(
|
|
1022
|
-
),
|
|
1076
|
+
}, !1), a = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, l)), a || (a = this.controlCreatorUtils.createFormGroupWithoutField(l)), Object.assign(a, {
|
|
1077
|
+
id: d.id,
|
|
1078
|
+
appearance: d.appearance,
|
|
1079
|
+
size: d.size,
|
|
1080
|
+
label: d.label,
|
|
1081
|
+
binding: d.binding,
|
|
1082
|
+
visible: d.visible
|
|
1083
|
+
}), Object.assign(a.editor, {
|
|
1084
|
+
isTextArea: a.isTextArea && d.isTextArea,
|
|
1085
|
+
placeholder: (c = d.editor) == null ? void 0 : c.placeholder,
|
|
1086
|
+
holdPlace: (i = d.editor) == null ? void 0 : i.holdPlace,
|
|
1087
|
+
readonly: (u = d.editor) == null ? void 0 : u.readonly,
|
|
1088
|
+
require: (f = d.editor) == null ? void 0 : f.require
|
|
1089
|
+
}), s.contents.splice(m, 1), s.contents.splice(m, 0, a), r.schema = Object.assign(d, a), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
1090
|
+
(p) => p.classList.remove("dgComponentSelected")
|
|
1091
|
+
), Be.value++;
|
|
1023
1092
|
}
|
|
1024
1093
|
getComponentConfig(t, o = {}, r = {}) {
|
|
1025
1094
|
const l = Object.assign({
|
|
@@ -1027,7 +1096,7 @@ class xe extends Me {
|
|
|
1027
1096
|
title: "编辑器",
|
|
1028
1097
|
type: "input-group",
|
|
1029
1098
|
$converter: "/converter/property-editor.converter"
|
|
1030
|
-
}, o),
|
|
1099
|
+
}, o), s = Object.assign({
|
|
1031
1100
|
readonly: {
|
|
1032
1101
|
description: "",
|
|
1033
1102
|
title: "只读",
|
|
@@ -1049,7 +1118,7 @@ class xe extends Me {
|
|
|
1049
1118
|
type: "string"
|
|
1050
1119
|
}
|
|
1051
1120
|
}, r);
|
|
1052
|
-
return { ...l, properties: { ...
|
|
1121
|
+
return { ...l, properties: { ...s } };
|
|
1053
1122
|
}
|
|
1054
1123
|
/**
|
|
1055
1124
|
* 修改某一输入控件的样式后更新Form的统一布局配置
|
|
@@ -1059,16 +1128,16 @@ class xe extends Me {
|
|
|
1059
1128
|
*/
|
|
1060
1129
|
updateUnifiedLayoutAfterControlChanged(t, o, r) {
|
|
1061
1130
|
const l = t.split(" ");
|
|
1062
|
-
let
|
|
1063
|
-
|
|
1064
|
-
const
|
|
1131
|
+
let s = l.find((i) => /^col-([1-9]|10|11|12)$/.test(i)), m = l.find((i) => /^col-md-([1-9]|10|11|12)$/.test(i)), d = l.find((i) => /^col-xl-([1-9]|10|11|12)$/.test(i)), a = l.find((i) => /^col-el-([1-9]|10|11|12)$/.test(i));
|
|
1132
|
+
s = s || "col-12", m = m || "col-md-" + s.replace("col-", ""), d = d || "col-xl-" + m.replace("col-md-", ""), a = a || "col-el-" + d.replace("col-xl-", "");
|
|
1133
|
+
const c = {
|
|
1065
1134
|
id: o,
|
|
1066
|
-
columnInSM: parseInt(
|
|
1067
|
-
columnInMD: parseInt(
|
|
1068
|
-
columnInLG: parseInt(
|
|
1069
|
-
columnInEL: parseInt(
|
|
1135
|
+
columnInSM: parseInt(s.replace("col-", ""), 10),
|
|
1136
|
+
columnInMD: parseInt(m.replace("col-md-", ""), 10),
|
|
1137
|
+
columnInLG: parseInt(d.replace("col-xl-", ""), 10),
|
|
1138
|
+
columnInEL: parseInt(a.replace("col-el-", ""), 10)
|
|
1070
1139
|
};
|
|
1071
|
-
this.updateUnifiedLayoutAfterResponseLayoutChanged(r,
|
|
1140
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(r, c);
|
|
1072
1141
|
}
|
|
1073
1142
|
/**
|
|
1074
1143
|
* 修改控件布局配置后更新Form统一布局配置
|
|
@@ -1081,15 +1150,15 @@ class xe extends Me {
|
|
|
1081
1150
|
return;
|
|
1082
1151
|
const l = [];
|
|
1083
1152
|
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(r, l, 1), o) {
|
|
1084
|
-
const
|
|
1085
|
-
Object.assign(
|
|
1153
|
+
const p = l.find((b) => b.id === o.id);
|
|
1154
|
+
Object.assign(p || {}, o);
|
|
1086
1155
|
}
|
|
1087
|
-
const
|
|
1156
|
+
const s = l.map((p) => p.columnInSM), m = l.map((p) => p.columnInMD), d = l.map((p) => p.columnInLG), a = l.map((p) => p.columnInEL), c = this.checkIsUniqueColumn(s) ? s[0] : null, i = this.checkIsUniqueColumn(m) ? m[0] : null, u = this.checkIsUniqueColumn(d) ? d[0] : null, f = this.checkIsUniqueColumn(a) ? a[0] : null;
|
|
1088
1157
|
Object.assign(r.unifiedLayout, {
|
|
1089
|
-
uniqueColClassInSM:
|
|
1090
|
-
uniqueColClassInMD:
|
|
1091
|
-
uniqueColClassInLG:
|
|
1092
|
-
uniqueColClassInEL:
|
|
1158
|
+
uniqueColClassInSM: c,
|
|
1159
|
+
uniqueColClassInMD: i,
|
|
1160
|
+
uniqueColClassInLG: u,
|
|
1161
|
+
uniqueColClassInEL: f
|
|
1093
1162
|
});
|
|
1094
1163
|
}
|
|
1095
1164
|
/**
|
|
@@ -1100,7 +1169,7 @@ class xe extends Me {
|
|
|
1100
1169
|
return Array.from(o).length === 1;
|
|
1101
1170
|
}
|
|
1102
1171
|
}
|
|
1103
|
-
class
|
|
1172
|
+
class Ee extends Te {
|
|
1104
1173
|
constructor(n, t) {
|
|
1105
1174
|
super(n, t);
|
|
1106
1175
|
}
|
|
@@ -1114,90 +1183,66 @@ class Fe extends xe {
|
|
|
1114
1183
|
});
|
|
1115
1184
|
}
|
|
1116
1185
|
}
|
|
1117
|
-
function
|
|
1118
|
-
const
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
checkCanMoveComponent: r,
|
|
1122
|
-
hideNestedPaddingInDesginerView: l,
|
|
1123
|
-
onAcceptMovedChildElement: u,
|
|
1124
|
-
resolveComponentContext: p,
|
|
1125
|
-
triggerBelongedComponentToMoveWhenMoved: a,
|
|
1126
|
-
triggerBelongedComponentToDeleteWhenDeleted: i
|
|
1127
|
-
} = Ve(e), s = e.schema;
|
|
1128
|
-
function c(d, g) {
|
|
1129
|
-
return new Fe(d, n).getPropertyConfig(s, g);
|
|
1186
|
+
function Pe(e, n) {
|
|
1187
|
+
const t = e.schema;
|
|
1188
|
+
function o(r, l) {
|
|
1189
|
+
return new Ee(r, n).getPropertyConfig(t, l);
|
|
1130
1190
|
}
|
|
1131
|
-
return {
|
|
1132
|
-
canAccepts: t,
|
|
1133
|
-
checkCanDeleteComponent: o,
|
|
1134
|
-
checkCanMoveComponent: r,
|
|
1135
|
-
hideNestedPaddingInDesginerView: l,
|
|
1136
|
-
onAcceptMovedChildElement: u,
|
|
1137
|
-
resolveComponentContext: p,
|
|
1138
|
-
triggerBelongedComponentToMoveWhenMoved: a,
|
|
1139
|
-
triggerBelongedComponentToDeleteWhenDeleted: i,
|
|
1140
|
-
getPropsConfig: c
|
|
1141
|
-
};
|
|
1191
|
+
return { getPropsConfig: o };
|
|
1142
1192
|
}
|
|
1143
|
-
const
|
|
1193
|
+
const De = /* @__PURE__ */ Q({
|
|
1144
1194
|
name: "FNumberRangeDesign",
|
|
1145
1195
|
props: z,
|
|
1146
1196
|
emits: ["valueChange", "blur", "focus", "click", "input", "beginValueChange", "endValueChange"],
|
|
1147
1197
|
setup(e, n) {
|
|
1148
|
-
const t =
|
|
1149
|
-
n.emit("beginValueChange",
|
|
1150
|
-
},
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
}), n.expose(
|
|
1154
|
-
const
|
|
1155
|
-
n.emit("endValueChange",
|
|
1156
|
-
},
|
|
1157
|
-
getRealValue:
|
|
1158
|
-
} =
|
|
1159
|
-
format:
|
|
1160
|
-
} =
|
|
1161
|
-
return
|
|
1162
|
-
const
|
|
1163
|
-
o.value =
|
|
1164
|
-
}),
|
|
1165
|
-
const
|
|
1166
|
-
o.value =
|
|
1167
|
-
}),
|
|
1168
|
-
const
|
|
1169
|
-
l.value =
|
|
1170
|
-
}),
|
|
1171
|
-
o.value =
|
|
1172
|
-
}), () =>
|
|
1173
|
-
ref:
|
|
1198
|
+
const t = P(e.beginValue), o = P(""), r = P(e.endValue), l = P(""), s = te(e), m = ne(e, n, s), d = (F) => {
|
|
1199
|
+
n.emit("beginValueChange", F);
|
|
1200
|
+
}, a = P(), c = Z("designer-host-service"), i = Z("design-item-context"), u = Pe(i, c), f = Ne(a, i, u);
|
|
1201
|
+
W(() => {
|
|
1202
|
+
a.value.componentInstance = f;
|
|
1203
|
+
}), n.expose(f.value);
|
|
1204
|
+
const p = A(e, n, o, t, m, s, d, t, r, !0), b = O(e, n, o, t, m, s, p, d, t, r, !0), S = U(e, n, p), C = j(e, n, b, !0), w = (F) => {
|
|
1205
|
+
n.emit("endValueChange", F);
|
|
1206
|
+
}, k = A(e, n, l, r, m, s, w, t, r, !1), N = O(e, n, l, r, m, s, k, w, t, r, !1), g = U(e, n, k), M = j(e, n, N, !1), {
|
|
1207
|
+
getRealValue: B
|
|
1208
|
+
} = s, {
|
|
1209
|
+
format: h
|
|
1210
|
+
} = m, V = D(() => !e.disabled && !e.readonly && e.showButton);
|
|
1211
|
+
return W(() => {
|
|
1212
|
+
const F = B(e.beginValue), I = B(e.endValue);
|
|
1213
|
+
o.value = h(F), l.value = h(I);
|
|
1214
|
+
}), x(() => [e.beginValue], ([F]) => {
|
|
1215
|
+
const I = B(F);
|
|
1216
|
+
o.value = h(I);
|
|
1217
|
+
}), x(() => [e.endValue], ([F]) => {
|
|
1218
|
+
const I = B(F);
|
|
1219
|
+
l.value = h(I);
|
|
1220
|
+
}), x(() => [e.precision, e.useThousands, e.prefix, e.suffix, e.showZero], () => {
|
|
1221
|
+
o.value = h(t.value), l.value = h(r.value);
|
|
1222
|
+
}), () => E("div", {
|
|
1223
|
+
ref: a,
|
|
1174
1224
|
class: "input-group number-range f-cmp-number-spinner"
|
|
1175
|
-
}, [
|
|
1225
|
+
}, [E("div", {
|
|
1176
1226
|
class: "form-control input-container"
|
|
1177
|
-
}, [
|
|
1227
|
+
}, [E("div", {
|
|
1178
1228
|
class: "sub-input-group"
|
|
1179
|
-
}, [
|
|
1229
|
+
}, [C(), V.value && S()]), E("span", {
|
|
1180
1230
|
class: "spliter"
|
|
1181
|
-
}, [
|
|
1231
|
+
}, [R("~")]), E("div", {
|
|
1182
1232
|
class: "sub-input-group"
|
|
1183
|
-
}, [
|
|
1233
|
+
}, [M(), V.value && g()])])]);
|
|
1184
1234
|
}
|
|
1185
|
-
})
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
t.component(n.name, e);
|
|
1189
|
-
}, e;
|
|
1190
|
-
};
|
|
1191
|
-
$.register = (e, n, t, o) => {
|
|
1192
|
-
e["number-range"] = $, n["number-range"] = ee;
|
|
1235
|
+
});
|
|
1236
|
+
G.register = (e, n, t, o) => {
|
|
1237
|
+
e["number-range"] = G, n["number-range"] = ee;
|
|
1193
1238
|
};
|
|
1194
|
-
|
|
1195
|
-
e["number-range"] =
|
|
1239
|
+
G.registerDesigner = (e, n, t) => {
|
|
1240
|
+
e["number-range"] = De, n["number-range"] = ee;
|
|
1196
1241
|
};
|
|
1197
|
-
const
|
|
1242
|
+
const Ue = ie(G);
|
|
1198
1243
|
export {
|
|
1199
|
-
|
|
1200
|
-
|
|
1244
|
+
G as FNumberRange,
|
|
1245
|
+
Ue as default,
|
|
1201
1246
|
z as numberRangeProps,
|
|
1202
1247
|
ee as propsResolver
|
|
1203
1248
|
};
|