@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,96 +1,100 @@
|
|
|
1
|
-
var
|
|
2
|
-
var Y = (e, t, n) => t in e ?
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { isPlainObject as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { resolveAppearance as
|
|
9
|
-
import { useDesignerComponent as
|
|
10
|
-
import {
|
|
11
|
-
const ae = {},
|
|
12
|
-
function
|
|
13
|
-
const { properties: t, title: n, ignore:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return
|
|
1
|
+
var _ = Object.defineProperty;
|
|
2
|
+
var Y = (e, t, n) => t in e ? _(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var v = (e, t, n) => Y(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { defineComponent as T, ref as C, computed as k, watch as E, createVNode as I, Teleport as Z, createApp as K, onUnmounted as ee, inject as O, nextTick as D, onMounted as U, mergeProps as te } from "vue";
|
|
5
|
+
import { isPlainObject as N, cloneDeep as R } from "lodash-es";
|
|
6
|
+
import ne from "../list-view/index.esm.js";
|
|
7
|
+
import oe from "../button-edit/index.esm.js";
|
|
8
|
+
import { resolveAppearance as ie } from "../dynamic-resolver/index.esm.js";
|
|
9
|
+
import { useDesignerComponent as q, DgControl as G } from "../designer-canvas/index.esm.js";
|
|
10
|
+
import { withInstall as le } from "../common/index.esm.js";
|
|
11
|
+
const ae = {}, re = {};
|
|
12
|
+
function W(e) {
|
|
13
|
+
const { properties: t, title: n, ignore: i } = e, l = i && Array.isArray(i), a = Object.keys(t).reduce((s, m) => ((!l || !i.find((y) => y === m)) && (s[m] = t[m].type === "object" && t[m].properties ? W(t[m]) : R(t[m].default)), s), {});
|
|
14
|
+
if (n && (!l || !i.find((s) => s === "id"))) {
|
|
15
|
+
const s = n.toLowerCase().replace(/-/g, "_");
|
|
16
|
+
a.id = `${s}_${Math.random().toString().slice(2, 6)}`;
|
|
17
|
+
}
|
|
18
|
+
return a;
|
|
19
19
|
}
|
|
20
20
|
function se(e, t) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
const n = W(t);
|
|
22
|
+
return Object.keys(n).reduce((i, l) => (i[l] && N(i[l]) && N(e[l] || !e[l]) ? Object.assign(i[l], e[l] || {}) : i[l] = e[l], i), n), n;
|
|
23
|
+
}
|
|
24
|
+
function ue(e, t) {
|
|
25
|
+
return Object.keys(e).filter((i) => e[i] != null).reduce((i, l) => {
|
|
26
|
+
if (t.has(l)) {
|
|
27
|
+
const a = t.get(l);
|
|
28
|
+
if (typeof a == "string")
|
|
29
|
+
i[a] = e[l];
|
|
26
30
|
else {
|
|
27
|
-
const
|
|
28
|
-
Object.assign(
|
|
31
|
+
const s = a(l, e[l], e);
|
|
32
|
+
Object.assign(i, s);
|
|
29
33
|
}
|
|
30
34
|
} else
|
|
31
|
-
|
|
32
|
-
return
|
|
35
|
+
i[l] = e[l];
|
|
36
|
+
return i;
|
|
33
37
|
}, {});
|
|
34
38
|
}
|
|
35
|
-
function
|
|
36
|
-
const
|
|
37
|
-
return
|
|
39
|
+
function ce(e, t, n = /* @__PURE__ */ new Map()) {
|
|
40
|
+
const i = se(e, t);
|
|
41
|
+
return ue(i, n);
|
|
38
42
|
}
|
|
39
|
-
function
|
|
40
|
-
function t(
|
|
41
|
-
if (typeof
|
|
42
|
-
return
|
|
43
|
-
if (typeof
|
|
44
|
-
const
|
|
45
|
-
if (
|
|
46
|
-
return Number(
|
|
47
|
-
if (
|
|
48
|
-
return Number(
|
|
49
|
-
if (
|
|
50
|
-
return Number(
|
|
43
|
+
function de(e = {}) {
|
|
44
|
+
function t(u, c, o, r) {
|
|
45
|
+
if (typeof o == "number")
|
|
46
|
+
return r[u].length === o;
|
|
47
|
+
if (typeof o == "object") {
|
|
48
|
+
const d = Object.keys(o)[0], p = o[d];
|
|
49
|
+
if (d === "not")
|
|
50
|
+
return Number(r[u].length) !== Number(p);
|
|
51
|
+
if (d === "moreThan")
|
|
52
|
+
return Number(r[u].length) >= Number(p);
|
|
53
|
+
if (d === "lessThan")
|
|
54
|
+
return Number(r[u].length) <= Number(p);
|
|
51
55
|
}
|
|
52
56
|
return !1;
|
|
53
57
|
}
|
|
54
|
-
function n(
|
|
55
|
-
return
|
|
58
|
+
function n(u, c, o, r) {
|
|
59
|
+
return r[u] && r[u].propertyValue && String(r[u].propertyValue.value) === String(o);
|
|
56
60
|
}
|
|
57
|
-
const
|
|
61
|
+
const i = /* @__PURE__ */ new Map([
|
|
58
62
|
["length", t],
|
|
59
63
|
["getProperty", n]
|
|
60
64
|
]);
|
|
61
|
-
Object.keys(e).reduce((
|
|
62
|
-
function
|
|
63
|
-
const
|
|
64
|
-
return typeof
|
|
65
|
-
if (
|
|
66
|
-
return { target:
|
|
67
|
-
const
|
|
68
|
-
return { target:
|
|
65
|
+
Object.keys(e).reduce((u, c) => (u.set(c, e[c]), u), i);
|
|
66
|
+
function l(u, c) {
|
|
67
|
+
const o = u;
|
|
68
|
+
return typeof c == "number" ? [{ target: o, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: o, operator: "getProperty", param: u, value: !!c }] : typeof c == "object" ? Object.keys(c).map((r) => {
|
|
69
|
+
if (r === "length")
|
|
70
|
+
return { target: o, operator: "length", param: null, value: c[r] };
|
|
71
|
+
const d = r, p = c[r];
|
|
72
|
+
return { target: o, operator: "getProperty", param: d, value: p };
|
|
69
73
|
}) : [];
|
|
70
74
|
}
|
|
71
|
-
function
|
|
72
|
-
return Object.keys(
|
|
73
|
-
const
|
|
74
|
-
return
|
|
75
|
+
function a(u) {
|
|
76
|
+
return Object.keys(u).reduce((o, r) => {
|
|
77
|
+
const d = l(r, u[r]);
|
|
78
|
+
return o.push(...d), o;
|
|
75
79
|
}, []);
|
|
76
80
|
}
|
|
77
|
-
function u
|
|
78
|
-
if (
|
|
79
|
-
const
|
|
80
|
-
return
|
|
81
|
+
function s(u, c) {
|
|
82
|
+
if (i.has(u.operator)) {
|
|
83
|
+
const o = i.get(u.operator);
|
|
84
|
+
return o && o(u.target, u.param, u.value, c) || !1;
|
|
81
85
|
}
|
|
82
86
|
return !1;
|
|
83
87
|
}
|
|
84
|
-
function
|
|
85
|
-
return
|
|
88
|
+
function m(u, c) {
|
|
89
|
+
return a(u).reduce((d, p) => d && s(p, c), !0);
|
|
86
90
|
}
|
|
87
|
-
function
|
|
88
|
-
const
|
|
89
|
-
return
|
|
91
|
+
function y(u, c) {
|
|
92
|
+
const o = Object.keys(u), r = o.includes("allOf"), d = o.includes("anyOf"), p = r || d, b = (p ? u[p ? r ? "allOf" : "anyOf" : "allOf"] : [u]).map((w) => m(w, c));
|
|
93
|
+
return r ? !b.includes(!1) : b.includes(!0);
|
|
90
94
|
}
|
|
91
|
-
return { parseValueSchema:
|
|
95
|
+
return { parseValueSchema: y };
|
|
92
96
|
}
|
|
93
|
-
const
|
|
97
|
+
const g = {
|
|
94
98
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
95
99
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
96
100
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -128,21 +132,22 @@ const f = {
|
|
|
128
132
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
129
133
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
130
134
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
131
|
-
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
|
|
136
|
+
"query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
|
|
137
|
+
}, pe = {}, fe = {};
|
|
138
|
+
de();
|
|
139
|
+
function H(e, t, n = /* @__PURE__ */ new Map(), i = (s, m, y, u) => m, l = {}, a = (s) => s) {
|
|
140
|
+
return ae[t.title] = t, re[t.title] = i, pe[t.title] = l, fe[t.title] = a, (s = {}) => {
|
|
141
|
+
const m = ce(s, t, n), y = Object.keys(e).reduce((u, c) => (u[c] = e[c].default, u), {});
|
|
142
|
+
return Object.assign(y, m);
|
|
138
143
|
};
|
|
139
144
|
}
|
|
140
|
-
function
|
|
145
|
+
function me(e, t) {
|
|
141
146
|
return { customClass: t.class, customStyle: t.style };
|
|
142
147
|
}
|
|
143
148
|
const ye = /* @__PURE__ */ new Map([
|
|
144
|
-
["appearance",
|
|
145
|
-
]),
|
|
149
|
+
["appearance", me]
|
|
150
|
+
]), ge = "https://json-schema.org/draft/2020-12/schema", he = "https://farris-design.gitee.io/combo-list.schema.json", be = "combo-list", ve = "A Farris Input Component", Ce = "object", Se = {
|
|
146
151
|
id: {
|
|
147
152
|
description: "The unique identifier for a combo list",
|
|
148
153
|
type: "string"
|
|
@@ -175,6 +180,11 @@ const ye = /* @__PURE__ */ new Map([
|
|
|
175
180
|
type: "boolean",
|
|
176
181
|
default: !1
|
|
177
182
|
},
|
|
183
|
+
enableClear: {
|
|
184
|
+
description: "",
|
|
185
|
+
type: "boolean",
|
|
186
|
+
default: !0
|
|
187
|
+
},
|
|
178
188
|
editable: {
|
|
179
189
|
description: "",
|
|
180
190
|
type: "boolean",
|
|
@@ -199,6 +209,11 @@ const ye = /* @__PURE__ */ new Map([
|
|
|
199
209
|
type: "string",
|
|
200
210
|
default: ""
|
|
201
211
|
},
|
|
212
|
+
idField: {
|
|
213
|
+
description: "",
|
|
214
|
+
type: "string",
|
|
215
|
+
default: "id"
|
|
216
|
+
},
|
|
202
217
|
valueField: {
|
|
203
218
|
description: "",
|
|
204
219
|
type: "string",
|
|
@@ -258,28 +273,29 @@ const ye = /* @__PURE__ */ new Map([
|
|
|
258
273
|
type: "sting",
|
|
259
274
|
default: ""
|
|
260
275
|
}
|
|
261
|
-
},
|
|
276
|
+
}, Fe = [
|
|
262
277
|
"id",
|
|
263
278
|
"type"
|
|
264
|
-
],
|
|
279
|
+
], Ie = [
|
|
265
280
|
"id",
|
|
266
281
|
"appearance",
|
|
267
|
-
"binding"
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
$
|
|
282
|
+
"binding",
|
|
283
|
+
"visible"
|
|
284
|
+
], ke = {
|
|
285
|
+
$schema: ge,
|
|
286
|
+
$id: he,
|
|
271
287
|
title: be,
|
|
272
|
-
description:
|
|
273
|
-
type:
|
|
274
|
-
properties:
|
|
275
|
-
required:
|
|
276
|
-
ignore:
|
|
288
|
+
description: ve,
|
|
289
|
+
type: Ce,
|
|
290
|
+
properties: Se,
|
|
291
|
+
required: Fe,
|
|
292
|
+
ignore: Ie
|
|
277
293
|
};
|
|
278
|
-
function
|
|
294
|
+
function we(e, t, n) {
|
|
279
295
|
return t;
|
|
280
296
|
}
|
|
281
|
-
var
|
|
282
|
-
const
|
|
297
|
+
var Be = /* @__PURE__ */ ((e) => (e.Text = "text", e.Tag = "tag", e))(Be || {}), Me = /* @__PURE__ */ ((e) => (e.top = "top", e.bottom = "bottom", e.auto = "auto", e))(Me || {});
|
|
298
|
+
const $ = {
|
|
283
299
|
/**
|
|
284
300
|
* 组件标识
|
|
285
301
|
*/
|
|
@@ -440,12 +456,12 @@ const V = {
|
|
|
440
456
|
*/
|
|
441
457
|
beforeOpen: { type: Function, default: null },
|
|
442
458
|
searchOption: {
|
|
443
|
-
type:
|
|
459
|
+
type: [Boolean, Function],
|
|
444
460
|
default: !1
|
|
445
461
|
},
|
|
446
462
|
// 搜索启用高亮
|
|
447
463
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
448
|
-
},
|
|
464
|
+
}, z = H($, ke, ye, we), xe = {
|
|
449
465
|
dataSource: { type: Array, default: [] },
|
|
450
466
|
enableSearch: { type: Boolean, default: !1 },
|
|
451
467
|
idField: { type: String, default: "id" },
|
|
@@ -461,201 +477,204 @@ const V = {
|
|
|
461
477
|
onSelectionChange: { type: Function, default: () => {
|
|
462
478
|
} },
|
|
463
479
|
searchOption: {
|
|
464
|
-
type:
|
|
480
|
+
type: [Boolean, Function],
|
|
465
481
|
default: !1
|
|
466
482
|
},
|
|
467
483
|
// 搜索启用高亮
|
|
468
484
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
469
|
-
},
|
|
485
|
+
}, Ee = /* @__PURE__ */ T({
|
|
470
486
|
name: "FComboListContainer",
|
|
471
|
-
props:
|
|
487
|
+
props: xe,
|
|
472
488
|
emits: ["selectionChange"],
|
|
473
489
|
setup(e, t) {
|
|
474
|
-
const n =
|
|
490
|
+
const n = C(), i = C(e.dataSource), l = C([]), a = C(e.separator), s = C(e.width), m = C(e.maxHeight), y = C(String(e.selectedValues).split(a.value)), u = k(() => e.multiSelect), c = k(() => ({
|
|
475
491
|
enableSelectRow: !0,
|
|
476
492
|
multiSelect: e.multiSelect,
|
|
477
493
|
multiSelectMode: "OnCheckAndClick",
|
|
478
|
-
showCheckbox:
|
|
494
|
+
showCheckbox: u.value,
|
|
479
495
|
showSelectAll: !1,
|
|
480
496
|
showSelection: !0
|
|
481
497
|
}));
|
|
482
|
-
|
|
483
|
-
|
|
498
|
+
E(e.dataSource, () => {
|
|
499
|
+
i.value = e.dataSource;
|
|
484
500
|
});
|
|
485
|
-
const
|
|
486
|
-
const
|
|
487
|
-
return
|
|
501
|
+
const o = k(() => e.enableSearch ? "SearchBar" : "ContentHeader"), r = k(() => {
|
|
502
|
+
const f = {};
|
|
503
|
+
return s.value !== void 0 && (f.width = `${s.value}px`), m.value !== void 0 && m.value > 0 && (f.maxHeight = `${m.value}px`), f;
|
|
488
504
|
});
|
|
489
|
-
function
|
|
490
|
-
|
|
505
|
+
function d(f) {
|
|
506
|
+
l.value = f.map((h) => Object.assign({}, h)), y.value = f.map((h) => h[e.idField]), t.emit("selectionChange", l.value);
|
|
491
507
|
}
|
|
492
|
-
function
|
|
508
|
+
function p(f) {
|
|
493
509
|
if (e.enableHighlightSearch)
|
|
494
510
|
return;
|
|
495
|
-
let
|
|
496
|
-
|
|
511
|
+
let h = [];
|
|
512
|
+
const {
|
|
513
|
+
searchOption: b
|
|
514
|
+
} = e;
|
|
515
|
+
typeof b == "function" ? h = i.value.filter((S) => b(f, S)) : h = i.value.filter((S) => S[e.valueField].indexOf(f) > -1 || S[e.textField].indexOf(f) > -1), n.value.updateDataSource(h);
|
|
497
516
|
}
|
|
498
|
-
return
|
|
499
|
-
|
|
500
|
-
}), () =>
|
|
517
|
+
return E([() => e.selectedValues], ([f]) => {
|
|
518
|
+
y.value = f.split(a.value);
|
|
519
|
+
}), () => I("div", {
|
|
501
520
|
class: "f-combo-list-container pl-1",
|
|
502
|
-
style:
|
|
503
|
-
}, [
|
|
521
|
+
style: r.value
|
|
522
|
+
}, [I(ne, {
|
|
504
523
|
ref: n,
|
|
505
524
|
size: "small",
|
|
506
525
|
itemClass: "f-combo-list-item",
|
|
507
|
-
header:
|
|
526
|
+
header: o.value,
|
|
508
527
|
headerClass: "f-combo-list-search-box",
|
|
509
|
-
data:
|
|
528
|
+
data: i.value,
|
|
510
529
|
idField: e.idField,
|
|
511
530
|
textField: e.textField,
|
|
512
531
|
titleField: e.titleField,
|
|
513
532
|
multiSelect: e.multiSelect,
|
|
514
|
-
selection:
|
|
533
|
+
selection: c.value,
|
|
515
534
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
516
|
-
selectionValues:
|
|
517
|
-
onSelectionChange:
|
|
518
|
-
onAfterSearch:
|
|
535
|
+
selectionValues: y.value,
|
|
536
|
+
onSelectionChange: d,
|
|
537
|
+
onAfterSearch: p
|
|
519
538
|
}, null)]);
|
|
520
539
|
}
|
|
521
540
|
});
|
|
522
|
-
function
|
|
523
|
-
const t =
|
|
524
|
-
function
|
|
525
|
-
const
|
|
526
|
-
return
|
|
527
|
-
const
|
|
528
|
-
return
|
|
541
|
+
function Te(e) {
|
|
542
|
+
const t = C(""), n = C(e.modelValue), i = C(e.data || []), l = C(e.editable);
|
|
543
|
+
function a(o) {
|
|
544
|
+
const r = String(o).split(e.separator), d = r.map((h) => [h, !0]), p = new Map(d);
|
|
545
|
+
return i.value.filter((h) => p.has(String(h[e.valueField]))).sort((h, b) => {
|
|
546
|
+
const S = r.indexOf(h[e.valueField]), w = r.indexOf(b[e.valueField]);
|
|
547
|
+
return S - w;
|
|
529
548
|
});
|
|
530
549
|
}
|
|
531
|
-
function
|
|
532
|
-
const
|
|
533
|
-
t.value =
|
|
550
|
+
function s(o) {
|
|
551
|
+
const r = a(o).map((d) => d[e.textField]).join(e.separator);
|
|
552
|
+
t.value = l.value ? r || o : r;
|
|
534
553
|
}
|
|
535
|
-
function
|
|
536
|
-
const
|
|
537
|
-
return
|
|
554
|
+
function m(o) {
|
|
555
|
+
const r = o.split(e.separator).map((p) => [p, !0]), d = new Map(r);
|
|
556
|
+
return i.value.filter((p) => d.has(p[e.textField]));
|
|
538
557
|
}
|
|
539
|
-
function
|
|
540
|
-
const
|
|
541
|
-
return
|
|
558
|
+
function y(o) {
|
|
559
|
+
const r = {};
|
|
560
|
+
return r[e.idField] = o, r[e.textField] = o, [r];
|
|
542
561
|
}
|
|
543
|
-
function
|
|
544
|
-
let
|
|
545
|
-
const
|
|
546
|
-
return
|
|
562
|
+
function u(o) {
|
|
563
|
+
let r = m(o);
|
|
564
|
+
const d = r && r.length > 0;
|
|
565
|
+
return l.value && !d && (r = y(o)), r;
|
|
547
566
|
}
|
|
548
|
-
function
|
|
549
|
-
const { url:
|
|
550
|
-
let
|
|
551
|
-
fetch(
|
|
552
|
-
var
|
|
553
|
-
if (
|
|
554
|
-
return
|
|
555
|
-
throw new Error(
|
|
556
|
-
}).then((
|
|
557
|
-
|
|
558
|
-
}).catch((
|
|
559
|
-
console.error(
|
|
567
|
+
function c() {
|
|
568
|
+
const { url: o, method: r = "GET", headers: d = {}, body: p = null } = e.remote, f = r.toLowerCase() === "get" ? { method: r, headers: d } : { method: r, headers: d, body: p };
|
|
569
|
+
let h = !1;
|
|
570
|
+
fetch(o, f).then((b) => {
|
|
571
|
+
var w, B;
|
|
572
|
+
if (b.status === 200)
|
|
573
|
+
return h = !!((B = (w = b.headers) == null ? void 0 : w.get("content-type")) != null && B.includes("application/json")), h ? b.text() : b.json();
|
|
574
|
+
throw new Error(b.statusText);
|
|
575
|
+
}).then((b) => {
|
|
576
|
+
i.value = h ? JSON.parse(b) : b;
|
|
577
|
+
}).catch((b) => {
|
|
578
|
+
console.error(b);
|
|
560
579
|
});
|
|
561
580
|
}
|
|
562
|
-
return e.remote &&
|
|
563
|
-
|
|
564
|
-
}),
|
|
581
|
+
return e.remote && c(), E(() => e.data, () => {
|
|
582
|
+
i.value = e.data;
|
|
583
|
+
}), E([i], ([o]) => {
|
|
565
584
|
if (e.modelValue != null) {
|
|
566
|
-
const
|
|
567
|
-
|
|
585
|
+
const r = o.find((d) => d[e.valueField] === e.modelValue);
|
|
586
|
+
r && (t.value = r[e.textField]);
|
|
568
587
|
}
|
|
569
|
-
}),
|
|
570
|
-
n.value =
|
|
571
|
-
}),
|
|
588
|
+
}), E(() => e.modelValue, (o) => {
|
|
589
|
+
n.value = o, s(o);
|
|
590
|
+
}), s(e.modelValue), { dataSource: i, displayText: t, editable: l, modelValue: n, getItemsByDisplayText: m, getItemsByValue: a, getSelectedItemsByDisplayText: u };
|
|
572
591
|
}
|
|
573
|
-
const P = /* @__PURE__ */
|
|
592
|
+
const P = /* @__PURE__ */ T({
|
|
574
593
|
name: "FComboList",
|
|
575
|
-
props:
|
|
594
|
+
props: $,
|
|
576
595
|
emits: ["clear", "update:modelValue", "change", "input"],
|
|
577
596
|
setup(e, t) {
|
|
578
|
-
const n =
|
|
579
|
-
dataSource:
|
|
580
|
-
displayText:
|
|
581
|
-
editable:
|
|
582
|
-
modelValue:
|
|
583
|
-
getSelectedItemsByDisplayText:
|
|
584
|
-
} =
|
|
585
|
-
function
|
|
586
|
-
!
|
|
597
|
+
const n = C(), i = C(e.disabled), l = C(e.enableClear), a = C(e.enableSearch), s = C(e.readonly), {
|
|
598
|
+
dataSource: m,
|
|
599
|
+
displayText: y,
|
|
600
|
+
editable: u,
|
|
601
|
+
modelValue: c,
|
|
602
|
+
getSelectedItemsByDisplayText: o
|
|
603
|
+
} = Te(e), r = k(() => e.multiSelect), d = k(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
|
|
604
|
+
function p() {
|
|
605
|
+
!r.value && n.value && n.value.hidePopup();
|
|
587
606
|
}
|
|
588
|
-
function
|
|
589
|
-
|
|
607
|
+
function f(F) {
|
|
608
|
+
y.value = F.map((M) => M[e.textField]).join(e.separator), F.length === 1 ? c.value = F[0][e.valueField] : c.value = F.map((M) => M[e.valueField]).join(e.separator), t.emit("update:modelValue", c.value), t.emit("change", F, c.value), p();
|
|
590
609
|
}
|
|
591
|
-
function
|
|
592
|
-
|
|
610
|
+
function h() {
|
|
611
|
+
s.value || n.value.togglePopup();
|
|
593
612
|
}
|
|
594
|
-
function
|
|
595
|
-
|
|
613
|
+
function b(F) {
|
|
614
|
+
c.value = "", t.emit("update:modelValue", ""), t.emit("clear");
|
|
596
615
|
}
|
|
597
|
-
function
|
|
598
|
-
const
|
|
599
|
-
|
|
616
|
+
function S(F) {
|
|
617
|
+
const M = o(F);
|
|
618
|
+
f(M);
|
|
600
619
|
}
|
|
601
|
-
function
|
|
602
|
-
return
|
|
620
|
+
function w() {
|
|
621
|
+
return y.value;
|
|
603
622
|
}
|
|
604
|
-
function
|
|
605
|
-
t.emit("input",
|
|
623
|
+
function B(F) {
|
|
624
|
+
t.emit("input", F);
|
|
606
625
|
}
|
|
607
626
|
return t.expose({
|
|
608
|
-
getDisplayText:
|
|
609
|
-
}),
|
|
610
|
-
|
|
611
|
-
}), () =>
|
|
627
|
+
getDisplayText: w
|
|
628
|
+
}), E([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([F, M, V, A, j]) => {
|
|
629
|
+
i.value = F, u.value = M, l.value = V, a.value = A, s.value = j;
|
|
630
|
+
}), () => I(oe, {
|
|
612
631
|
ref: n,
|
|
613
632
|
id: e.id,
|
|
614
|
-
disable:
|
|
615
|
-
readonly:
|
|
633
|
+
disable: i.value,
|
|
634
|
+
readonly: s.value,
|
|
616
635
|
forcePlaceholder: e.forcePlaceholder,
|
|
617
|
-
editable:
|
|
636
|
+
editable: u.value,
|
|
618
637
|
buttonContent: e.dropDownIcon,
|
|
619
638
|
placeholder: e.placeholder,
|
|
620
|
-
enableClear:
|
|
639
|
+
enableClear: l.value,
|
|
621
640
|
maxLength: e.maxLength,
|
|
622
641
|
tabIndex: e.tabIndex,
|
|
623
642
|
enableTitle: e.enableTitle,
|
|
624
643
|
multiSelect: e.multiSelect,
|
|
625
644
|
inputType: e.multiSelect ? e.viewType : "text",
|
|
626
|
-
modelValue:
|
|
627
|
-
"onUpdate:modelValue": (
|
|
645
|
+
modelValue: y.value,
|
|
646
|
+
"onUpdate:modelValue": (F) => y.value = F,
|
|
628
647
|
focusOnCreated: e.focusOnCreated,
|
|
629
648
|
selectOnCreated: e.selectOnCreated,
|
|
630
|
-
onClear:
|
|
631
|
-
onClick:
|
|
632
|
-
onChange:
|
|
633
|
-
onInput:
|
|
649
|
+
onClear: b,
|
|
650
|
+
onClick: h,
|
|
651
|
+
onChange: S,
|
|
652
|
+
onInput: B,
|
|
634
653
|
beforeOpen: e.beforeOpen
|
|
635
654
|
}, {
|
|
636
|
-
default: () => [
|
|
655
|
+
default: () => [I(Ee, {
|
|
637
656
|
idField: e.idField,
|
|
638
657
|
valueField: e.valueField,
|
|
639
658
|
textField: e.textField,
|
|
640
659
|
titleField: e.titleField,
|
|
641
|
-
dataSource:
|
|
642
|
-
selectedValues:
|
|
660
|
+
dataSource: m.value,
|
|
661
|
+
selectedValues: c.value,
|
|
643
662
|
multiSelect: e.multiSelect,
|
|
644
|
-
enableSearch:
|
|
663
|
+
enableSearch: a.value,
|
|
645
664
|
maxHeight: e.maxHeight,
|
|
646
665
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
647
|
-
width: e.fitEditor ?
|
|
648
|
-
onSelectionChange:
|
|
666
|
+
width: e.fitEditor ? d.value : void 0,
|
|
667
|
+
onSelectionChange: f
|
|
649
668
|
}, null)]
|
|
650
669
|
});
|
|
651
670
|
}
|
|
652
|
-
}),
|
|
653
|
-
["appearance",
|
|
671
|
+
}), Oe = /* @__PURE__ */ new Map([
|
|
672
|
+
["appearance", ie]
|
|
654
673
|
]);
|
|
655
|
-
function
|
|
674
|
+
function Pe(e, t, n) {
|
|
656
675
|
return t;
|
|
657
676
|
}
|
|
658
|
-
const
|
|
677
|
+
const Le = "https://json-schema.org/draft/2020-12/schema", Ve = "https://farris-design.gitee.io/button-edit.schema.json", Ae = "button-edit", je = "A Farris Input Component", $e = "object", De = {
|
|
659
678
|
id: {
|
|
660
679
|
description: "The unique identifier for a Input Group",
|
|
661
680
|
type: "string"
|
|
@@ -839,18 +858,18 @@ const Pe = "https://json-schema.org/draft/2020-12/schema", Le = "https://farris-
|
|
|
839
858
|
type: "string",
|
|
840
859
|
default: ""
|
|
841
860
|
}
|
|
842
|
-
},
|
|
861
|
+
}, Ne = [
|
|
843
862
|
"id",
|
|
844
863
|
"type"
|
|
845
|
-
],
|
|
846
|
-
$schema:
|
|
847
|
-
$id:
|
|
848
|
-
title:
|
|
849
|
-
description:
|
|
850
|
-
type:
|
|
851
|
-
properties:
|
|
852
|
-
required:
|
|
853
|
-
}, Ue = "buttonEdit",
|
|
864
|
+
], Ge = {
|
|
865
|
+
$schema: Le,
|
|
866
|
+
$id: Ve,
|
|
867
|
+
title: Ae,
|
|
868
|
+
description: je,
|
|
869
|
+
type: $e,
|
|
870
|
+
properties: De,
|
|
871
|
+
required: Ne
|
|
872
|
+
}, Ue = "buttonEdit", Re = "A Farris Component", qe = "object", We = {
|
|
854
873
|
basic: {
|
|
855
874
|
description: "Basic Infomation",
|
|
856
875
|
title: "基本信息",
|
|
@@ -921,7 +940,7 @@ const Pe = "https://json-schema.org/draft/2020-12/schema", Le = "https://farris-
|
|
|
921
940
|
},
|
|
922
941
|
{
|
|
923
942
|
value: "center",
|
|
924
|
-
name: "
|
|
943
|
+
name: "居中"
|
|
925
944
|
},
|
|
926
945
|
{
|
|
927
946
|
value: "right",
|
|
@@ -932,12 +951,12 @@ const Pe = "https://json-schema.org/draft/2020-12/schema", Le = "https://farris-
|
|
|
932
951
|
}
|
|
933
952
|
}
|
|
934
953
|
}
|
|
935
|
-
},
|
|
954
|
+
}, He = {
|
|
936
955
|
title: Ue,
|
|
937
|
-
description:
|
|
956
|
+
description: Re,
|
|
938
957
|
type: qe,
|
|
939
|
-
categories:
|
|
940
|
-
},
|
|
958
|
+
categories: We
|
|
959
|
+
}, X = {
|
|
941
960
|
/**
|
|
942
961
|
* 组件标识
|
|
943
962
|
*/
|
|
@@ -1046,55 +1065,55 @@ const Pe = "https://json-schema.org/draft/2020-12/schema", Le = "https://farris-
|
|
|
1046
1065
|
/** 更新方式 blur | change */
|
|
1047
1066
|
updateOn: { type: String, default: "change" }
|
|
1048
1067
|
};
|
|
1049
|
-
|
|
1050
|
-
const
|
|
1068
|
+
H(X, Ge, Oe, Pe, He);
|
|
1069
|
+
const ze = {
|
|
1051
1070
|
popupContentPosition: { type: Object, default: { left: 0, top: 0 } },
|
|
1052
1071
|
host: { type: Object },
|
|
1053
1072
|
backgroundColor: { type: String, default: "" }
|
|
1054
|
-
},
|
|
1073
|
+
}, Xe = /* @__PURE__ */ T({
|
|
1055
1074
|
name: "FOverlay",
|
|
1056
|
-
props:
|
|
1075
|
+
props: ze,
|
|
1057
1076
|
emits: ["click"],
|
|
1058
1077
|
setup(e, t) {
|
|
1059
|
-
const n =
|
|
1078
|
+
const n = C(e.popupContentPosition), i = C(e.host), l = k(() => ({
|
|
1060
1079
|
backgroundColor: e.backgroundColor || "",
|
|
1061
1080
|
pointerEvents: "auto"
|
|
1062
1081
|
}));
|
|
1063
|
-
function
|
|
1064
|
-
t.emit("click"),
|
|
1082
|
+
function a(m) {
|
|
1083
|
+
t.emit("click"), m.preventDefault(), m.stopPropagation();
|
|
1065
1084
|
}
|
|
1066
|
-
|
|
1067
|
-
const
|
|
1068
|
-
if (
|
|
1069
|
-
const
|
|
1070
|
-
left:
|
|
1071
|
-
top:
|
|
1072
|
-
height:
|
|
1073
|
-
} =
|
|
1085
|
+
k(() => {
|
|
1086
|
+
const m = i.value;
|
|
1087
|
+
if (m) {
|
|
1088
|
+
const y = m.getBoundingClientRect(), {
|
|
1089
|
+
left: u,
|
|
1090
|
+
top: c,
|
|
1091
|
+
height: o
|
|
1092
|
+
} = y;
|
|
1074
1093
|
return {
|
|
1075
|
-
left:
|
|
1076
|
-
top:
|
|
1094
|
+
left: u,
|
|
1095
|
+
top: c + o
|
|
1077
1096
|
};
|
|
1078
1097
|
}
|
|
1079
1098
|
return n.value;
|
|
1080
1099
|
});
|
|
1081
|
-
const
|
|
1100
|
+
const s = k(() => ({
|
|
1082
1101
|
// position: 'relative',
|
|
1083
1102
|
// left: `${position.value.left}px`,
|
|
1084
1103
|
// top: `${position.value.top}px`
|
|
1085
1104
|
}));
|
|
1086
|
-
return () =>
|
|
1105
|
+
return () => I(Z, {
|
|
1087
1106
|
to: "body"
|
|
1088
1107
|
}, {
|
|
1089
1108
|
default: () => {
|
|
1090
|
-
var
|
|
1091
|
-
return [
|
|
1109
|
+
var m, y;
|
|
1110
|
+
return [I("div", {
|
|
1092
1111
|
class: "overlay-container",
|
|
1093
|
-
onClick: (
|
|
1094
|
-
style:
|
|
1095
|
-
}, [
|
|
1096
|
-
style:
|
|
1097
|
-
}, [(
|
|
1112
|
+
onClick: (u) => a(u),
|
|
1113
|
+
style: l.value
|
|
1114
|
+
}, [I("div", {
|
|
1115
|
+
style: s.value
|
|
1116
|
+
}, [(y = (m = t.slots).default) == null ? void 0 : y.call(m)])])];
|
|
1098
1117
|
}
|
|
1099
1118
|
});
|
|
1100
1119
|
}
|
|
@@ -1105,236 +1124,203 @@ function Je(e) {
|
|
|
1105
1124
|
if (e.render && typeof e.render == "function")
|
|
1106
1125
|
return e.render;
|
|
1107
1126
|
}
|
|
1108
|
-
function
|
|
1127
|
+
function Qe(e) {
|
|
1109
1128
|
const t = document.createElement("div");
|
|
1110
1129
|
t.style.display = "contents";
|
|
1111
1130
|
let n;
|
|
1112
|
-
const
|
|
1113
|
-
}),
|
|
1114
|
-
|
|
1131
|
+
const i = e.onClickCallback || (() => {
|
|
1132
|
+
}), l = () => {
|
|
1133
|
+
i(), n && n.unmount();
|
|
1115
1134
|
};
|
|
1116
|
-
return n =
|
|
1135
|
+
return n = K({
|
|
1117
1136
|
setup() {
|
|
1118
|
-
|
|
1137
|
+
ee(() => {
|
|
1119
1138
|
document.body.removeChild(t);
|
|
1120
1139
|
});
|
|
1121
|
-
const
|
|
1122
|
-
return () =>
|
|
1140
|
+
const a = Je(e);
|
|
1141
|
+
return () => I(Xe, {
|
|
1123
1142
|
"popup-content-position": e.popupPosition,
|
|
1124
1143
|
host: e.host,
|
|
1125
|
-
onClick:
|
|
1144
|
+
onClick: l,
|
|
1126
1145
|
backgroundColor: e.backgroundColor
|
|
1127
1146
|
}, {
|
|
1128
|
-
default: () => [
|
|
1147
|
+
default: () => [a && a()]
|
|
1129
1148
|
});
|
|
1130
1149
|
}
|
|
1131
1150
|
}), document.body.appendChild(t), n.mount(t), n;
|
|
1132
1151
|
}
|
|
1133
|
-
class
|
|
1152
|
+
class _e {
|
|
1134
1153
|
static show(t) {
|
|
1135
|
-
return
|
|
1154
|
+
return Qe(t);
|
|
1136
1155
|
}
|
|
1137
1156
|
}
|
|
1138
1157
|
const Ye = Symbol("FModalService");
|
|
1139
|
-
function
|
|
1158
|
+
function J(e, t) {
|
|
1140
1159
|
function n() {
|
|
1141
|
-
const
|
|
1142
|
-
let
|
|
1143
|
-
if (
|
|
1144
|
-
const
|
|
1145
|
-
if (typeof
|
|
1146
|
-
return
|
|
1147
|
-
typeof
|
|
1160
|
+
const i = e.beforeOpen || e.beforeClickButton || null;
|
|
1161
|
+
let l = Promise.resolve(!0);
|
|
1162
|
+
if (i) {
|
|
1163
|
+
const a = i(t.value);
|
|
1164
|
+
if (typeof a > "u")
|
|
1165
|
+
return l;
|
|
1166
|
+
typeof a == "boolean" ? l = Promise.resolve(a) : l = a;
|
|
1148
1167
|
}
|
|
1149
|
-
return
|
|
1168
|
+
return l;
|
|
1150
1169
|
}
|
|
1151
1170
|
return { judgeCanOpen: n };
|
|
1152
1171
|
}
|
|
1153
|
-
function Ze(e, t, n,
|
|
1154
|
-
const
|
|
1172
|
+
function Ze(e, t, n, i, l) {
|
|
1173
|
+
const a = C(e.buttonBehavior), s = C(e.popupOnInput), m = k(() => ({
|
|
1155
1174
|
"input-group-append": !0,
|
|
1156
1175
|
"append-force-show": e.showButtonWhenDisabled && (e.readonly || e.disable)
|
|
1157
|
-
})), { judgeCanOpen:
|
|
1158
|
-
async function
|
|
1159
|
-
if (await
|
|
1160
|
-
const
|
|
1161
|
-
if (
|
|
1162
|
-
const
|
|
1163
|
-
...
|
|
1176
|
+
})), { judgeCanOpen: y } = J(e, l), u = k(() => e.showButtonWhenDisabled || (!e.editable || !e.readonly) && !e.disable), c = O(Ye, null), o = C();
|
|
1177
|
+
async function r(f) {
|
|
1178
|
+
if (await y() && u.value) {
|
|
1179
|
+
const h = !!t.slots.default;
|
|
1180
|
+
if (a.value === "Modal") {
|
|
1181
|
+
const b = e.modalOptions, S = c == null ? void 0 : c.open({
|
|
1182
|
+
...b,
|
|
1164
1183
|
render: () => t.slots.default && t.slots.default()
|
|
1165
1184
|
});
|
|
1166
|
-
|
|
1185
|
+
o.value = S == null ? void 0 : S.modalRef;
|
|
1167
1186
|
}
|
|
1168
|
-
|
|
1187
|
+
a.value === "Overlay" && _e.show({
|
|
1169
1188
|
// host: buttonEditRef.value,
|
|
1170
1189
|
host: document.body,
|
|
1171
1190
|
backgroundColor: "rgba(0,0,0,.15)",
|
|
1172
1191
|
render: () => t.slots.default && t.slots.default()
|
|
1173
|
-
}),
|
|
1192
|
+
}), h && a.value === "Popup" && i.togglePopup(!0), h && s.value && i.hidePopup(), t.emit("clickButton", { origin: f, value: e.modelValue });
|
|
1174
1193
|
}
|
|
1175
1194
|
}
|
|
1176
|
-
function
|
|
1177
|
-
t.emit("mouseEnterIcon",
|
|
1195
|
+
function d(f) {
|
|
1196
|
+
t.emit("mouseEnterIcon", f);
|
|
1178
1197
|
}
|
|
1179
|
-
function
|
|
1180
|
-
t.emit("mouseLeaveIcon",
|
|
1198
|
+
function p(f) {
|
|
1199
|
+
t.emit("mouseLeaveIcon", f);
|
|
1181
1200
|
}
|
|
1182
1201
|
return {
|
|
1183
|
-
buttonGroupClass:
|
|
1184
|
-
onClickButton:
|
|
1185
|
-
onMouseEnterButton:
|
|
1186
|
-
onMouseLeaveButton:
|
|
1187
|
-
modalRef:
|
|
1202
|
+
buttonGroupClass: m,
|
|
1203
|
+
onClickButton: r,
|
|
1204
|
+
onMouseEnterButton: d,
|
|
1205
|
+
onMouseLeaveButton: p,
|
|
1206
|
+
modalRef: o
|
|
1188
1207
|
};
|
|
1189
1208
|
}
|
|
1190
|
-
function
|
|
1191
|
-
const
|
|
1192
|
-
function
|
|
1193
|
-
const
|
|
1194
|
-
|
|
1209
|
+
function Ke(e, t, n, i) {
|
|
1210
|
+
const l = C(), a = C(!1), { judgeCanOpen: s } = J(e, i);
|
|
1211
|
+
function m() {
|
|
1212
|
+
const o = l.value;
|
|
1213
|
+
o && o.show(n.value);
|
|
1195
1214
|
}
|
|
1196
|
-
async function
|
|
1215
|
+
async function y(o = !1) {
|
|
1197
1216
|
if (!!t.slots.default) {
|
|
1198
|
-
if (!
|
|
1217
|
+
if (!o && !a.value && !await s())
|
|
1199
1218
|
return;
|
|
1200
|
-
|
|
1219
|
+
a.value = !a.value, await D(), m();
|
|
1201
1220
|
}
|
|
1202
1221
|
}
|
|
1203
|
-
async function
|
|
1222
|
+
async function u(o = !1) {
|
|
1204
1223
|
if (!!t.slots.default) {
|
|
1205
|
-
if (!
|
|
1224
|
+
if (!o && !await s())
|
|
1206
1225
|
return;
|
|
1207
|
-
|
|
1226
|
+
a.value = !0, await D(), m();
|
|
1208
1227
|
}
|
|
1209
1228
|
}
|
|
1210
|
-
function
|
|
1211
|
-
|
|
1229
|
+
function c() {
|
|
1230
|
+
a.value = !1;
|
|
1212
1231
|
}
|
|
1213
|
-
return { hidePopup:
|
|
1232
|
+
return { hidePopup: c, popup: u, shouldPopupContent: a, togglePopup: y, popoverRef: l };
|
|
1214
1233
|
}
|
|
1215
|
-
function
|
|
1234
|
+
function et(e, t, n) {
|
|
1216
1235
|
const {
|
|
1217
|
-
buttonGroupClass:
|
|
1218
|
-
} = n,
|
|
1236
|
+
buttonGroupClass: i
|
|
1237
|
+
} = n, l = C();
|
|
1219
1238
|
return {
|
|
1220
|
-
renderButtonGroup: () =>
|
|
1239
|
+
renderButtonGroup: () => I("div", {
|
|
1221
1240
|
id: `${e.id}-button-group`,
|
|
1222
|
-
class:
|
|
1223
|
-
}, [t.slots.buttonContent ?
|
|
1241
|
+
class: i.value
|
|
1242
|
+
}, [t.slots.buttonContent ? I("span", {
|
|
1224
1243
|
class: "input-group-text input-group-append-button"
|
|
1225
|
-
}, [t.slots.buttonContent()]) : e.buttonContent ?
|
|
1244
|
+
}, [t.slots.buttonContent()]) : e.buttonContent ? I("span", {
|
|
1226
1245
|
class: "input-group-text input-group-append-button",
|
|
1227
1246
|
innerHTML: e.buttonContent,
|
|
1228
|
-
ref:
|
|
1247
|
+
ref: l
|
|
1229
1248
|
}, null) : null]),
|
|
1230
|
-
buttonHandleElement:
|
|
1249
|
+
buttonHandleElement: l
|
|
1231
1250
|
};
|
|
1232
1251
|
}
|
|
1233
|
-
const
|
|
1252
|
+
const tt = /* @__PURE__ */ T({
|
|
1234
1253
|
name: "FButtonEdit",
|
|
1235
|
-
props:
|
|
1254
|
+
props: X,
|
|
1236
1255
|
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
|
|
1237
1256
|
setup(e, t) {
|
|
1238
|
-
const n =
|
|
1257
|
+
const n = C(), i = O("design-item-context"), l = q(n, i), a = C(e.customClass), s = C(e.modelValue), m = Ke(e, t, n, s), y = Ze(e, t, n, m, s), u = C(), c = k(() => ({
|
|
1239
1258
|
"f-cmp-inputgroup": !0,
|
|
1240
1259
|
"input-group": !0,
|
|
1241
1260
|
"f-state-disable": !0,
|
|
1242
1261
|
"f-state-editable": !1,
|
|
1243
1262
|
"f-state-readonly": !0
|
|
1244
1263
|
}));
|
|
1245
|
-
|
|
1246
|
-
n.value.componentInstance =
|
|
1247
|
-
}), t.expose(
|
|
1248
|
-
const
|
|
1249
|
-
const
|
|
1264
|
+
U(() => {
|
|
1265
|
+
n.value.componentInstance = l;
|
|
1266
|
+
}), t.expose(l.value);
|
|
1267
|
+
const o = k(() => {
|
|
1268
|
+
const d = {
|
|
1250
1269
|
"f-button-edit": !0,
|
|
1251
1270
|
"f-cmp-inputgroup": !0,
|
|
1252
1271
|
"f-button-edit-nowrap": !e.wrapText
|
|
1253
1272
|
};
|
|
1254
|
-
return
|
|
1273
|
+
return a.value && a.value.split(" ").reduce((p, f) => (p[f] = !0, p), d), d;
|
|
1255
1274
|
}), {
|
|
1256
|
-
renderButtonGroup:
|
|
1257
|
-
} =
|
|
1258
|
-
return () =>
|
|
1275
|
+
renderButtonGroup: r
|
|
1276
|
+
} = et(e, t, y);
|
|
1277
|
+
return () => I("div", te(t.attrs, {
|
|
1259
1278
|
ref: n,
|
|
1260
|
-
class:
|
|
1279
|
+
class: o.value,
|
|
1261
1280
|
id: e.id
|
|
1262
|
-
}), [
|
|
1263
|
-
class:
|
|
1264
|
-
}, [
|
|
1265
|
-
ref:
|
|
1281
|
+
}), [I("div", {
|
|
1282
|
+
class: c.value
|
|
1283
|
+
}, [I("input", {
|
|
1284
|
+
ref: u,
|
|
1266
1285
|
class: "form-control",
|
|
1267
1286
|
readonly: !0,
|
|
1268
1287
|
placeholder: e.placeholder
|
|
1269
|
-
}, null),
|
|
1288
|
+
}, null), r()])]);
|
|
1270
1289
|
}
|
|
1271
1290
|
});
|
|
1272
|
-
function tt(e, t) {
|
|
1273
|
-
e.schema;
|
|
1274
|
-
const n = g(!0), o = g(!0);
|
|
1275
|
-
function i(a) {
|
|
1276
|
-
return !1;
|
|
1277
|
-
}
|
|
1278
|
-
function l() {
|
|
1279
|
-
return !1;
|
|
1280
|
-
}
|
|
1281
|
-
function u() {
|
|
1282
|
-
return !1;
|
|
1283
|
-
}
|
|
1284
|
-
function d() {
|
|
1285
|
-
return !0;
|
|
1286
|
-
}
|
|
1287
|
-
function c(a) {
|
|
1288
|
-
}
|
|
1289
|
-
function r() {
|
|
1290
|
-
}
|
|
1291
|
-
function p(a) {
|
|
1292
|
-
return null;
|
|
1293
|
-
}
|
|
1294
|
-
return {
|
|
1295
|
-
canAccepts: i,
|
|
1296
|
-
checkCanDeleteComponent: l,
|
|
1297
|
-
checkCanMoveComponent: u,
|
|
1298
|
-
hideNestedPaddingInDesginerView: d,
|
|
1299
|
-
onAcceptMovedChildElement: c,
|
|
1300
|
-
resolveComponentContext: r,
|
|
1301
|
-
triggerBelongedComponentToMoveWhenMoved: n,
|
|
1302
|
-
triggerBelongedComponentToDeleteWhenDeleted: o,
|
|
1303
|
-
getPropsConfig: p
|
|
1304
|
-
};
|
|
1305
|
-
}
|
|
1306
1291
|
class nt {
|
|
1307
1292
|
constructor(t, n) {
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1293
|
+
v(this, "componentId");
|
|
1294
|
+
v(this, "viewModelId");
|
|
1295
|
+
v(this, "eventsEditorUtils");
|
|
1296
|
+
v(this, "formSchemaUtils");
|
|
1297
|
+
v(this, "formMetadataConverter");
|
|
1298
|
+
v(this, "designViewModelUtils");
|
|
1299
|
+
v(this, "designViewModelField");
|
|
1300
|
+
v(this, "controlCreatorUtils");
|
|
1301
|
+
v(this, "designerHostService");
|
|
1302
|
+
v(this, "schemaService", null);
|
|
1303
|
+
v(this, "metadataService", null);
|
|
1304
|
+
v(this, "propertyConfig", {
|
|
1320
1305
|
type: "object",
|
|
1321
1306
|
categories: {}
|
|
1322
1307
|
});
|
|
1323
|
-
var
|
|
1324
|
-
this.componentId = t, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((
|
|
1308
|
+
var i;
|
|
1309
|
+
this.componentId = t, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((i = this.formSchemaUtils) == null ? void 0 : i.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
|
|
1325
1310
|
}
|
|
1326
1311
|
getTableInfo() {
|
|
1327
1312
|
var t;
|
|
1328
1313
|
return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
|
|
1329
1314
|
}
|
|
1330
1315
|
setDesignViewModelField(t) {
|
|
1316
|
+
var i;
|
|
1331
1317
|
const n = t.binding && t.binding.type === "Form" && t.binding.field;
|
|
1332
1318
|
if (n) {
|
|
1333
1319
|
if (!this.designViewModelField) {
|
|
1334
|
-
const
|
|
1335
|
-
this.designViewModelField =
|
|
1320
|
+
const l = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
1321
|
+
this.designViewModelField = l.fields.find((a) => a.id === n);
|
|
1336
1322
|
}
|
|
1337
|
-
t.updateOn = this.designViewModelField.updateOn;
|
|
1323
|
+
t.updateOn = (i = this.designViewModelField) == null ? void 0 : i.updateOn;
|
|
1338
1324
|
}
|
|
1339
1325
|
}
|
|
1340
1326
|
changeFieldEditorType(t, n) {
|
|
@@ -1358,7 +1344,7 @@ class nt {
|
|
|
1358
1344
|
type: "combo-list",
|
|
1359
1345
|
textField: "name",
|
|
1360
1346
|
valueField: "value",
|
|
1361
|
-
data: [{ value: t.type, name:
|
|
1347
|
+
data: [{ value: t.type, name: g[t.type].name }]
|
|
1362
1348
|
}
|
|
1363
1349
|
}
|
|
1364
1350
|
}
|
|
@@ -1391,19 +1377,19 @@ class nt {
|
|
|
1391
1377
|
* @returns
|
|
1392
1378
|
*/
|
|
1393
1379
|
updateElementByParentContainer(t, n) {
|
|
1394
|
-
const
|
|
1395
|
-
if (!
|
|
1380
|
+
const i = n && n.parent && n.parent.schema;
|
|
1381
|
+
if (!i)
|
|
1396
1382
|
return;
|
|
1397
|
-
const
|
|
1398
|
-
|
|
1383
|
+
const l = i.contents.findIndex((s) => s.id === t), a = R(i.contents[l]);
|
|
1384
|
+
i.contents.splice(l, 1), i.contents.splice(l, 0, a);
|
|
1399
1385
|
}
|
|
1400
1386
|
}
|
|
1401
|
-
const
|
|
1387
|
+
const x = class x {
|
|
1402
1388
|
/**
|
|
1403
1389
|
* 根据绑定字段类型获取可用的输入类控件
|
|
1404
1390
|
*/
|
|
1405
1391
|
static getEditorTypesByMDataType(t) {
|
|
1406
|
-
const n =
|
|
1392
|
+
const n = x.fieldControlTypeMapping[t];
|
|
1407
1393
|
return n || [{ key: "", value: "" }];
|
|
1408
1394
|
}
|
|
1409
1395
|
/**
|
|
@@ -1411,9 +1397,9 @@ const I = class I {
|
|
|
1411
1397
|
*/
|
|
1412
1398
|
static getAllInputTypes() {
|
|
1413
1399
|
const t = [];
|
|
1414
|
-
for (
|
|
1415
|
-
|
|
1416
|
-
t.find((
|
|
1400
|
+
for (const n in x.fieldControlTypeMapping)
|
|
1401
|
+
x.fieldControlTypeMapping[n].forEach((i) => {
|
|
1402
|
+
t.find((l) => l.key === i.key && l.value === i.value) || t.push({ key: i.key, value: i.value });
|
|
1417
1403
|
});
|
|
1418
1404
|
return t;
|
|
1419
1405
|
}
|
|
@@ -1421,69 +1407,174 @@ const I = class I {
|
|
|
1421
1407
|
/**
|
|
1422
1408
|
* <字段类型,可配置的控件类型列表>的映射
|
|
1423
1409
|
*/
|
|
1424
|
-
|
|
1410
|
+
v(x, "fieldControlTypeMapping", {
|
|
1425
1411
|
String: [
|
|
1426
|
-
{ key:
|
|
1427
|
-
{ key:
|
|
1428
|
-
{ key:
|
|
1429
|
-
{ key:
|
|
1430
|
-
{ key:
|
|
1431
|
-
{ key:
|
|
1432
|
-
{ key:
|
|
1412
|
+
{ key: g["input-group"].type, value: g["input-group"].name },
|
|
1413
|
+
{ key: g.lookup.type, value: g.lookup.name },
|
|
1414
|
+
{ key: g["date-picker"].type, value: g["date-picker"].name },
|
|
1415
|
+
{ key: g["check-box"].type, value: g["check-box"].name },
|
|
1416
|
+
{ key: g["check-group"].type, value: g["check-group"].name },
|
|
1417
|
+
{ key: g["radio-group"].type, value: g["radio-group"].name },
|
|
1418
|
+
{ key: g["combo-list"].type, value: g["combo-list"].name },
|
|
1419
|
+
{ key: g.textarea.type, value: g.textarea.name }
|
|
1433
1420
|
],
|
|
1434
1421
|
Text: [
|
|
1435
|
-
{ key:
|
|
1436
|
-
{ key:
|
|
1422
|
+
{ key: g.textarea.type, value: g.textarea.name },
|
|
1423
|
+
{ key: g.lookup.type, value: g.lookup.name }
|
|
1437
1424
|
],
|
|
1438
1425
|
Decimal: [
|
|
1439
|
-
{ key:
|
|
1426
|
+
{ key: g["number-spinner"].type, value: g["number-spinner"].name }
|
|
1440
1427
|
],
|
|
1441
1428
|
Integer: [
|
|
1442
|
-
{ key:
|
|
1429
|
+
{ key: g["number-spinner"].type, value: g["number-spinner"].name }
|
|
1443
1430
|
],
|
|
1444
1431
|
Number: [
|
|
1445
|
-
{ key:
|
|
1432
|
+
{ key: g["number-spinner"].type, value: g["number-spinner"].name }
|
|
1446
1433
|
],
|
|
1447
1434
|
BigNumber: [
|
|
1448
|
-
{ key:
|
|
1435
|
+
{ key: g["number-spinner"].type, value: g["number-spinner"].name }
|
|
1449
1436
|
],
|
|
1450
1437
|
Date: [
|
|
1451
|
-
{ key:
|
|
1438
|
+
{ key: g["date-picker"].type, value: g["date-picker"].name }
|
|
1452
1439
|
],
|
|
1453
1440
|
DateTime: [
|
|
1454
|
-
{ key:
|
|
1441
|
+
{ key: g["date-picker"].type, value: g["date-picker"].name }
|
|
1455
1442
|
],
|
|
1456
1443
|
Boolean: [
|
|
1457
|
-
{ key:
|
|
1458
|
-
{ key:
|
|
1444
|
+
{ key: g.switch.type, value: g.switch.name },
|
|
1445
|
+
{ key: g["check-box"].type, value: g["check-box"].name }
|
|
1459
1446
|
],
|
|
1460
1447
|
Enum: [
|
|
1461
|
-
{ key:
|
|
1462
|
-
{ key:
|
|
1448
|
+
{ key: g["combo-list"].type, value: g["combo-list"].name },
|
|
1449
|
+
{ key: g["radio-group"].type, value: g["radio-group"].name }
|
|
1463
1450
|
],
|
|
1464
1451
|
Object: [
|
|
1465
|
-
{ key:
|
|
1466
|
-
{ key:
|
|
1467
|
-
{ key:
|
|
1452
|
+
{ key: g.lookup.type, value: g.lookup.name },
|
|
1453
|
+
{ key: g["combo-list"].type, value: g["combo-list"].name },
|
|
1454
|
+
{ key: g["radio-group"].type, value: g["radio-group"].name }
|
|
1468
1455
|
]
|
|
1469
1456
|
});
|
|
1470
|
-
let L =
|
|
1471
|
-
const ot =
|
|
1472
|
-
class it
|
|
1473
|
-
constructor(
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1457
|
+
let L = x;
|
|
1458
|
+
const ot = C(0);
|
|
1459
|
+
class it {
|
|
1460
|
+
constructor() {
|
|
1461
|
+
/** 控件标题 */
|
|
1462
|
+
v(this, "label", "");
|
|
1463
|
+
/** 控件id */
|
|
1464
|
+
v(this, "id", "");
|
|
1465
|
+
/** 每个控件占用的栅格数 */
|
|
1466
|
+
v(this, "columnInSM", 12);
|
|
1467
|
+
v(this, "columnInMD", 6);
|
|
1468
|
+
v(this, "columnInLG", 3);
|
|
1469
|
+
v(this, "columnInEL", 2);
|
|
1470
|
+
/** 每个控件占用的列数 */
|
|
1471
|
+
v(this, "displayWidthInSM", 1);
|
|
1472
|
+
v(this, "displayWidthInMD", 1);
|
|
1473
|
+
v(this, "displayWidthInLG", 1);
|
|
1474
|
+
v(this, "displayWidthInEL", 1);
|
|
1475
|
+
/** 编辑器内部默认显示的屏幕大小-----可以去掉 */
|
|
1476
|
+
v(this, "displayColumnCountAtBreakPoint", "md");
|
|
1477
|
+
/** 控件所在行,传0即可-----编辑器内部使用 */
|
|
1478
|
+
v(this, "tagRow", 0);
|
|
1479
|
+
/** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
|
|
1480
|
+
v(this, "showTopBorder", 0);
|
|
1481
|
+
/** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
|
|
1482
|
+
v(this, "group", 1);
|
|
1483
|
+
/** 控件是否符合标准的class配置(设计器用的) */
|
|
1484
|
+
v(this, "isSupportedClass", !0);
|
|
1485
|
+
/** 控件所在分组id(设计器用的) */
|
|
1486
|
+
v(this, "fieldSetId", "");
|
|
1477
1487
|
}
|
|
1478
|
-
|
|
1479
|
-
|
|
1488
|
+
}
|
|
1489
|
+
function lt(e) {
|
|
1490
|
+
let t, n;
|
|
1491
|
+
const i = /* @__PURE__ */ new Map();
|
|
1492
|
+
let l = [];
|
|
1493
|
+
function a(c, o) {
|
|
1494
|
+
const d = c.split(" ").filter((S) => S.startsWith("col-"));
|
|
1495
|
+
if (d.length === 0) {
|
|
1496
|
+
o.isSupportedClass = !1;
|
|
1497
|
+
return;
|
|
1498
|
+
}
|
|
1499
|
+
let p = d.find((S) => /^col-([1-9]|10|11|12)$/.test(S)), f = d.find((S) => /^col-md-([1-9]|10|11|12)$/.test(S)), h = d.find((S) => /^col-xl-([1-9]|10|11|12)$/.test(S)), b = d.find((S) => /^col-el-([1-9]|10|11|12)$/.test(S));
|
|
1500
|
+
p = p || "col-12", o.columnInSM = parseInt(p.replace("col-", ""), 10), o.displayWidthInSM = o.columnInSM / 12, o.displayWidthInSM !== 1 && (o.isSupportedClass = !1), f = f || "col-md-" + o.columnInSM, o.columnInMD = parseInt(f.replace("col-md-", ""), 10), o.displayWidthInMD = o.columnInMD / 6, [1, 2].includes(o.displayWidthInMD) || (o.isSupportedClass = !1), h = h || "col-xl-" + o.columnInMD, o.columnInLG = parseInt(h.replace("col-xl-", ""), 10), o.displayWidthInLG = o.columnInLG / 3, [1, 2, 3, 4].includes(o.displayWidthInLG) || (o.isSupportedClass = !1), b = b || "col-el-" + o.columnInLG, o.columnInEL = parseInt(b.replace("col-el-", ""), 10), o.displayWidthInEL = o.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(o.displayWidthInEL) || (o.isSupportedClass = !1);
|
|
1480
1501
|
}
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1502
|
+
function s(c, o, r, d = !1) {
|
|
1503
|
+
let p = !1;
|
|
1504
|
+
c.contents.forEach((f) => {
|
|
1505
|
+
if (f.type === "fieldset") {
|
|
1506
|
+
r += 1, s(f, o, r, !0), p = !0;
|
|
1507
|
+
return;
|
|
1508
|
+
}
|
|
1509
|
+
p && (r += 1, p = !1);
|
|
1510
|
+
const h = f.appearance && f.appearance.class, b = new it();
|
|
1511
|
+
h ? a(h, b) : b.isSupportedClass = !1, b.label = f.label || f.id, b.id = f.id, b.group = r, d && (b.fieldSetId = c.id), n === f.id && (t = r), i.set(f.id, f), o.push(b);
|
|
1512
|
+
});
|
|
1513
|
+
}
|
|
1514
|
+
function m(c) {
|
|
1515
|
+
const o = e.getComponentById(c);
|
|
1516
|
+
if (!o || !o.componentType || !o.componentType.startsWith("form"))
|
|
1517
|
+
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
1518
|
+
const r = e.selectNode(o, (d) => d.type === G["response-form"].type);
|
|
1519
|
+
return !r || !r.contents || r.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: r };
|
|
1520
|
+
}
|
|
1521
|
+
function y(c, o) {
|
|
1522
|
+
o = o || c.id;
|
|
1523
|
+
const { result: r, message: d, formNode: p } = m(o);
|
|
1524
|
+
if (!r)
|
|
1525
|
+
return { result: r, message: d };
|
|
1526
|
+
n = c.id, l = [], i.clear();
|
|
1527
|
+
const f = p.contents[0].type === G.fieldset.type ? 0 : 1;
|
|
1528
|
+
s(p, l, f);
|
|
1529
|
+
const h = l.find((S) => !S.isSupportedClass);
|
|
1486
1530
|
return {
|
|
1531
|
+
defaultState: {
|
|
1532
|
+
defaultGroupNumber: t || 1,
|
|
1533
|
+
model: h ? "customize" : "standard"
|
|
1534
|
+
},
|
|
1535
|
+
importData: l
|
|
1536
|
+
};
|
|
1537
|
+
}
|
|
1538
|
+
function u(c, o) {
|
|
1539
|
+
o = o;
|
|
1540
|
+
const { result: r, formNode: d } = m(o);
|
|
1541
|
+
if (!r)
|
|
1542
|
+
return "";
|
|
1543
|
+
const p = [];
|
|
1544
|
+
return c.forEach((f) => {
|
|
1545
|
+
var S;
|
|
1546
|
+
const h = i.get(f.id), b = h.appearance && h.appearance.class;
|
|
1547
|
+
if (b) {
|
|
1548
|
+
const B = b.split(" ").filter((Q) => !Q.startsWith("col-")), F = "col-" + f.columnInSM, M = "col-md-" + f.columnInMD, V = "col-xl-" + f.columnInLG, A = "col-el-" + f.columnInEL, j = [F, M, V, A].concat(B);
|
|
1549
|
+
h.appearance.class = j.join(" ");
|
|
1550
|
+
}
|
|
1551
|
+
if (f.fieldSetId) {
|
|
1552
|
+
const w = d.contents.find((F) => F.id === f.fieldSetId), B = p.find((F) => F.id === f.fieldSetId);
|
|
1553
|
+
B ? (S = B.contents) == null || S.push(h) : (p.push(w), w.contents = [h]);
|
|
1554
|
+
} else
|
|
1555
|
+
p.push(h);
|
|
1556
|
+
}), d.contents = p, d.id;
|
|
1557
|
+
}
|
|
1558
|
+
return {
|
|
1559
|
+
checkCanFindFormNode: m,
|
|
1560
|
+
checkCanOpenLayoutEditor: y,
|
|
1561
|
+
changeFormControlsByResponseLayoutConfig: u,
|
|
1562
|
+
getResonseFormLayoutConfig: s
|
|
1563
|
+
};
|
|
1564
|
+
}
|
|
1565
|
+
class at extends nt {
|
|
1566
|
+
constructor(n, i) {
|
|
1567
|
+
super(n, i);
|
|
1568
|
+
v(this, "responseLayoutEditorFunction");
|
|
1569
|
+
this.responseLayoutEditorFunction = lt(this.formSchemaUtils);
|
|
1570
|
+
}
|
|
1571
|
+
getPropertyConfig(n, i) {
|
|
1572
|
+
return this.propertyConfig.categories.basic = this.getBasicProperties(n, i), this.propertyConfig.categories.appearance = this.getAppearanceProperties(n, i), this.propertyConfig.categories.editor = this.getEditorProperties(n), this.propertyConfig;
|
|
1573
|
+
}
|
|
1574
|
+
getBasicProperties(n, i) {
|
|
1575
|
+
var a;
|
|
1576
|
+
const l = this;
|
|
1577
|
+
return this.setDesignViewModelField(n), this.formSchemaUtils.getFormMetadataBasicInfo(), {
|
|
1487
1578
|
description: "Basic Information",
|
|
1488
1579
|
title: "基本信息",
|
|
1489
1580
|
properties: {
|
|
@@ -1504,7 +1595,7 @@ class it extends nt {
|
|
|
1504
1595
|
textField: "value",
|
|
1505
1596
|
valueField: "key",
|
|
1506
1597
|
editable: !1,
|
|
1507
|
-
data:
|
|
1598
|
+
data: l.designViewModelField ? L.getEditorTypesByMDataType((a = l.designViewModelField.type) == null ? void 0 : a.name) : L.getAllInputTypes()
|
|
1508
1599
|
}
|
|
1509
1600
|
},
|
|
1510
1601
|
label: {
|
|
@@ -1515,41 +1606,37 @@ class it extends nt {
|
|
|
1515
1606
|
binding: {
|
|
1516
1607
|
description: "绑定的表单字段",
|
|
1517
1608
|
title: "绑定",
|
|
1518
|
-
$converter: "/converter/field-selector.converter",
|
|
1519
1609
|
editor: {
|
|
1520
|
-
type: "
|
|
1610
|
+
type: "binding-selector",
|
|
1521
1611
|
bindingType: { enable: !1 },
|
|
1522
1612
|
editorParams: {
|
|
1523
|
-
|
|
1524
|
-
|
|
1613
|
+
componentSchema: n,
|
|
1614
|
+
needSyncToViewModel: !0,
|
|
1615
|
+
viewModelId: this.viewModelId,
|
|
1616
|
+
designerHostService: this.designerHostService,
|
|
1617
|
+
disableOccupiedFields: !0
|
|
1525
1618
|
},
|
|
1526
|
-
|
|
1527
|
-
{ field: "name", title: "字段名称" },
|
|
1528
|
-
{ field: "bindingField", title: "绑定字段" },
|
|
1529
|
-
{ field: "fieldType", title: "字段类型" }
|
|
1530
|
-
],
|
|
1531
|
-
textField: "bindingField",
|
|
1532
|
-
data: u
|
|
1619
|
+
textField: "bindingField"
|
|
1533
1620
|
}
|
|
1534
1621
|
}
|
|
1535
1622
|
},
|
|
1536
|
-
setPropertyRelates(
|
|
1537
|
-
if (
|
|
1538
|
-
switch (
|
|
1623
|
+
setPropertyRelates(s, m) {
|
|
1624
|
+
if (s)
|
|
1625
|
+
switch (s && s.propertyID) {
|
|
1539
1626
|
case "type": {
|
|
1540
|
-
|
|
1627
|
+
l.changeControlType(n, s, i);
|
|
1541
1628
|
break;
|
|
1542
1629
|
}
|
|
1543
1630
|
case "label": {
|
|
1544
|
-
|
|
1631
|
+
s.needRefreshControlTree = !0;
|
|
1545
1632
|
break;
|
|
1546
1633
|
}
|
|
1547
1634
|
}
|
|
1548
1635
|
}
|
|
1549
1636
|
};
|
|
1550
1637
|
}
|
|
1551
|
-
getAppearanceProperties(n,
|
|
1552
|
-
|
|
1638
|
+
getAppearanceProperties(n, i) {
|
|
1639
|
+
const l = this;
|
|
1553
1640
|
return {
|
|
1554
1641
|
title: "样式",
|
|
1555
1642
|
description: "Appearance",
|
|
@@ -1575,18 +1662,18 @@ class it extends nt {
|
|
|
1575
1662
|
refreshPanelAfterChanged: !0,
|
|
1576
1663
|
editor: {
|
|
1577
1664
|
type: "response-layout-editor-setting",
|
|
1578
|
-
initialState:
|
|
1665
|
+
initialState: l.responseLayoutEditorFunction.checkCanOpenLayoutEditor(n, l.componentId)
|
|
1579
1666
|
}
|
|
1580
1667
|
}
|
|
1581
1668
|
},
|
|
1582
|
-
setPropertyRelates(
|
|
1583
|
-
if (
|
|
1584
|
-
switch (
|
|
1669
|
+
setPropertyRelates(a, s) {
|
|
1670
|
+
if (a)
|
|
1671
|
+
switch (a && a.propertyID) {
|
|
1585
1672
|
case "responseLayout":
|
|
1586
|
-
|
|
1673
|
+
l.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(a.propertyValue, l.componentId || n.id), l.updateUnifiedLayoutAfterResponseLayoutChanged(l.componentId), l.updateElementByParentContainer(n.id, i), delete n.responseLayout;
|
|
1587
1674
|
break;
|
|
1588
1675
|
case "class":
|
|
1589
|
-
|
|
1676
|
+
l.updateUnifiedLayoutAfterControlChanged(a.propertyValue, n.id, this.componentId), l.updateElementByParentContainer(n.id, i);
|
|
1590
1677
|
break;
|
|
1591
1678
|
}
|
|
1592
1679
|
}
|
|
@@ -1600,44 +1687,44 @@ class it extends nt {
|
|
|
1600
1687
|
* @param propertyData 控件DOM属性
|
|
1601
1688
|
* @param newControlType 新控件类型
|
|
1602
1689
|
*/
|
|
1603
|
-
changeControlType(n,
|
|
1604
|
-
var
|
|
1605
|
-
const
|
|
1606
|
-
if (!
|
|
1690
|
+
changeControlType(n, i, l) {
|
|
1691
|
+
var c, o, r, d;
|
|
1692
|
+
const a = i.propertyValue, s = l && l.parent && l.parent.schema;
|
|
1693
|
+
if (!s)
|
|
1607
1694
|
return;
|
|
1608
|
-
const
|
|
1609
|
-
let
|
|
1695
|
+
const m = s.contents.findIndex((p) => p.id === n.id), y = s.contents[m];
|
|
1696
|
+
let u;
|
|
1610
1697
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
1611
1698
|
editor: {
|
|
1612
|
-
$type:
|
|
1699
|
+
$type: a
|
|
1613
1700
|
},
|
|
1614
1701
|
name: this.designViewModelField.name,
|
|
1615
1702
|
require: this.designViewModelField.require,
|
|
1616
1703
|
readonly: this.designViewModelField.readonly
|
|
1617
|
-
}, !1),
|
|
1618
|
-
id:
|
|
1619
|
-
appearance:
|
|
1620
|
-
size:
|
|
1621
|
-
label:
|
|
1622
|
-
binding:
|
|
1623
|
-
visible:
|
|
1624
|
-
}), Object.assign(
|
|
1625
|
-
isTextArea:
|
|
1626
|
-
placeholder: (
|
|
1627
|
-
holdPlace: (
|
|
1628
|
-
readonly: (
|
|
1629
|
-
require: (
|
|
1630
|
-
}),
|
|
1631
|
-
(
|
|
1704
|
+
}, !1), u = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, a)), u || (u = this.controlCreatorUtils.createFormGroupWithoutField(a)), Object.assign(u, {
|
|
1705
|
+
id: y.id,
|
|
1706
|
+
appearance: y.appearance,
|
|
1707
|
+
size: y.size,
|
|
1708
|
+
label: y.label,
|
|
1709
|
+
binding: y.binding,
|
|
1710
|
+
visible: y.visible
|
|
1711
|
+
}), Object.assign(u.editor, {
|
|
1712
|
+
isTextArea: u.isTextArea && y.isTextArea,
|
|
1713
|
+
placeholder: (c = y.editor) == null ? void 0 : c.placeholder,
|
|
1714
|
+
holdPlace: (o = y.editor) == null ? void 0 : o.holdPlace,
|
|
1715
|
+
readonly: (r = y.editor) == null ? void 0 : r.readonly,
|
|
1716
|
+
require: (d = y.editor) == null ? void 0 : d.require
|
|
1717
|
+
}), s.contents.splice(m, 1), s.contents.splice(m, 0, u), l.schema = Object.assign(y, u), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
1718
|
+
(p) => p.classList.remove("dgComponentSelected")
|
|
1632
1719
|
), ot.value++;
|
|
1633
1720
|
}
|
|
1634
|
-
getComponentConfig(n,
|
|
1635
|
-
const
|
|
1721
|
+
getComponentConfig(n, i = {}, l = {}) {
|
|
1722
|
+
const a = Object.assign({
|
|
1636
1723
|
description: "编辑器",
|
|
1637
1724
|
title: "编辑器",
|
|
1638
1725
|
type: "input-group",
|
|
1639
1726
|
$converter: "/converter/property-editor.converter"
|
|
1640
|
-
},
|
|
1727
|
+
}, i), s = Object.assign({
|
|
1641
1728
|
readonly: {
|
|
1642
1729
|
description: "",
|
|
1643
1730
|
title: "只读",
|
|
@@ -1658,8 +1745,8 @@ class it extends nt {
|
|
|
1658
1745
|
title: "提示文本",
|
|
1659
1746
|
type: "string"
|
|
1660
1747
|
}
|
|
1661
|
-
},
|
|
1662
|
-
return { ...
|
|
1748
|
+
}, l);
|
|
1749
|
+
return { ...a, properties: { ...s } };
|
|
1663
1750
|
}
|
|
1664
1751
|
/**
|
|
1665
1752
|
* 修改某一输入控件的样式后更新Form的统一布局配置
|
|
@@ -1667,108 +1754,132 @@ class it extends nt {
|
|
|
1667
1754
|
* @param controlId 控件Id
|
|
1668
1755
|
* @param componentId 控件所在组件id
|
|
1669
1756
|
*/
|
|
1670
|
-
updateUnifiedLayoutAfterControlChanged(n,
|
|
1671
|
-
const
|
|
1672
|
-
let
|
|
1673
|
-
|
|
1674
|
-
const
|
|
1675
|
-
id:
|
|
1676
|
-
columnInSM: parseInt(
|
|
1677
|
-
columnInMD: parseInt(
|
|
1678
|
-
columnInLG: parseInt(
|
|
1679
|
-
columnInEL: parseInt(
|
|
1757
|
+
updateUnifiedLayoutAfterControlChanged(n, i, l) {
|
|
1758
|
+
const a = n.split(" ");
|
|
1759
|
+
let s = a.find((o) => /^col-([1-9]|10|11|12)$/.test(o)), m = a.find((o) => /^col-md-([1-9]|10|11|12)$/.test(o)), y = a.find((o) => /^col-xl-([1-9]|10|11|12)$/.test(o)), u = a.find((o) => /^col-el-([1-9]|10|11|12)$/.test(o));
|
|
1760
|
+
s = s || "col-12", m = m || "col-md-" + s.replace("col-", ""), y = y || "col-xl-" + m.replace("col-md-", ""), u = u || "col-el-" + y.replace("col-xl-", "");
|
|
1761
|
+
const c = {
|
|
1762
|
+
id: i,
|
|
1763
|
+
columnInSM: parseInt(s.replace("col-", ""), 10),
|
|
1764
|
+
columnInMD: parseInt(m.replace("col-md-", ""), 10),
|
|
1765
|
+
columnInLG: parseInt(y.replace("col-xl-", ""), 10),
|
|
1766
|
+
columnInEL: parseInt(u.replace("col-el-", ""), 10)
|
|
1680
1767
|
};
|
|
1681
|
-
this.updateUnifiedLayoutAfterResponseLayoutChanged(
|
|
1768
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(l, c);
|
|
1682
1769
|
}
|
|
1683
1770
|
/**
|
|
1684
1771
|
* 修改控件布局配置后更新Form统一布局配置
|
|
1685
1772
|
* @param componentId 组件Id
|
|
1686
1773
|
* @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
|
|
1687
1774
|
*/
|
|
1688
|
-
updateUnifiedLayoutAfterResponseLayoutChanged(n,
|
|
1689
|
-
const { formNode:
|
|
1690
|
-
if (!
|
|
1775
|
+
updateUnifiedLayoutAfterResponseLayoutChanged(n, i) {
|
|
1776
|
+
const { formNode: l } = this.responseLayoutEditorFunction.checkCanFindFormNode(n);
|
|
1777
|
+
if (!l || !l.unifiedLayout)
|
|
1691
1778
|
return;
|
|
1692
|
-
const
|
|
1693
|
-
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(
|
|
1694
|
-
const
|
|
1695
|
-
Object.assign(
|
|
1779
|
+
const a = [];
|
|
1780
|
+
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(l, a, 1), i) {
|
|
1781
|
+
const p = a.find((f) => f.id === i.id);
|
|
1782
|
+
Object.assign(p || {}, i);
|
|
1696
1783
|
}
|
|
1697
|
-
const
|
|
1698
|
-
Object.assign(
|
|
1699
|
-
uniqueColClassInSM:
|
|
1700
|
-
uniqueColClassInMD:
|
|
1701
|
-
uniqueColClassInLG:
|
|
1702
|
-
uniqueColClassInEL:
|
|
1784
|
+
const s = a.map((p) => p.columnInSM), m = a.map((p) => p.columnInMD), y = a.map((p) => p.columnInLG), u = a.map((p) => p.columnInEL), c = this.checkIsUniqueColumn(s) ? s[0] : null, o = this.checkIsUniqueColumn(m) ? m[0] : null, r = this.checkIsUniqueColumn(y) ? y[0] : null, d = this.checkIsUniqueColumn(u) ? u[0] : null;
|
|
1785
|
+
Object.assign(l.unifiedLayout, {
|
|
1786
|
+
uniqueColClassInSM: c,
|
|
1787
|
+
uniqueColClassInMD: o,
|
|
1788
|
+
uniqueColClassInLG: r,
|
|
1789
|
+
uniqueColClassInEL: d
|
|
1703
1790
|
});
|
|
1704
1791
|
}
|
|
1705
1792
|
/**
|
|
1706
1793
|
* 校验宽度样式值是否一致
|
|
1707
1794
|
*/
|
|
1708
1795
|
checkIsUniqueColumn(n) {
|
|
1709
|
-
const
|
|
1710
|
-
return Array.from(
|
|
1796
|
+
const i = new Set(n);
|
|
1797
|
+
return Array.from(i).length === 1;
|
|
1711
1798
|
}
|
|
1712
1799
|
}
|
|
1713
|
-
class
|
|
1800
|
+
class rt extends at {
|
|
1714
1801
|
constructor(t, n) {
|
|
1715
1802
|
super(t, n);
|
|
1716
1803
|
}
|
|
1717
1804
|
getEditorProperties(t) {
|
|
1718
|
-
|
|
1805
|
+
const n = this.getComponentConfig(t, { type: "combo-list" }, {
|
|
1719
1806
|
editable: {
|
|
1720
1807
|
description: "",
|
|
1721
1808
|
title: "允许编辑",
|
|
1722
1809
|
type: "boolean"
|
|
1723
1810
|
},
|
|
1811
|
+
enableClear: {
|
|
1812
|
+
description: "",
|
|
1813
|
+
title: "启用清空",
|
|
1814
|
+
type: "boolean"
|
|
1815
|
+
},
|
|
1724
1816
|
textField: {
|
|
1817
|
+
visible: !1,
|
|
1725
1818
|
description: "",
|
|
1726
1819
|
title: "数据源显示字段",
|
|
1727
1820
|
type: "string"
|
|
1728
1821
|
},
|
|
1729
|
-
|
|
1822
|
+
valueField: {
|
|
1823
|
+
visible: !1,
|
|
1730
1824
|
description: "",
|
|
1731
1825
|
title: "数据源值字段",
|
|
1732
1826
|
type: "string"
|
|
1827
|
+
},
|
|
1828
|
+
idField: {
|
|
1829
|
+
visible: !1,
|
|
1830
|
+
description: "",
|
|
1831
|
+
title: "数据源标识字段",
|
|
1832
|
+
type: "string"
|
|
1833
|
+
},
|
|
1834
|
+
data: {
|
|
1835
|
+
description: "",
|
|
1836
|
+
title: "数据",
|
|
1837
|
+
type: "array",
|
|
1838
|
+
editor: {
|
|
1839
|
+
columns: [
|
|
1840
|
+
{ field: t.editor.valueField, title: "值", dataType: "string" },
|
|
1841
|
+
{ field: t.editor.textField, title: "名称", dataType: "string" },
|
|
1842
|
+
{ field: "disabled", title: "禁用", visible: !1, dataType: "boolean", editor: { type: "switch" } }
|
|
1843
|
+
],
|
|
1844
|
+
type: "item-collection-editor",
|
|
1845
|
+
valueField: t.editor.valueField,
|
|
1846
|
+
nameField: t.editor.textField,
|
|
1847
|
+
requiredFields: [t.editor.valueField, t.editor.textField],
|
|
1848
|
+
uniqueFields: [t.editor.valueField, t.editor.textField]
|
|
1849
|
+
},
|
|
1850
|
+
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
1851
|
+
refreshPanelAfterChanged: !0
|
|
1733
1852
|
}
|
|
1734
1853
|
});
|
|
1854
|
+
return n.setPropertyRelates = function(i) {
|
|
1855
|
+
if (i)
|
|
1856
|
+
switch (i.propertyID) {
|
|
1857
|
+
case "data": {
|
|
1858
|
+
i.propertyValue.parameters && (t.editor.valueField = i.propertyValue.parameters.valueField, t.editor.textField = i.propertyValue.parameters.nameField), t.editor.data = i.propertyValue.value;
|
|
1859
|
+
break;
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
1862
|
+
}, n;
|
|
1735
1863
|
}
|
|
1736
1864
|
}
|
|
1737
|
-
function
|
|
1738
|
-
const
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
checkCanMoveComponent: i,
|
|
1742
|
-
hideNestedPaddingInDesginerView: l,
|
|
1743
|
-
onAcceptMovedChildElement: u,
|
|
1744
|
-
resolveComponentContext: d,
|
|
1745
|
-
triggerBelongedComponentToMoveWhenMoved: c,
|
|
1746
|
-
triggerBelongedComponentToDeleteWhenDeleted: r
|
|
1747
|
-
} = tt(e), p = e.schema;
|
|
1748
|
-
function a(s, y) {
|
|
1749
|
-
return new at(s, t).getPropertyConfig(p, y);
|
|
1865
|
+
function st(e, t) {
|
|
1866
|
+
const n = e.schema;
|
|
1867
|
+
function i(l, a) {
|
|
1868
|
+
return new rt(l, t).getPropertyConfig(n, a);
|
|
1750
1869
|
}
|
|
1751
1870
|
return {
|
|
1752
|
-
|
|
1753
|
-
checkCanDeleteComponent: o,
|
|
1754
|
-
checkCanMoveComponent: i,
|
|
1755
|
-
hideNestedPaddingInDesginerView: l,
|
|
1756
|
-
onAcceptMovedChildElement: u,
|
|
1757
|
-
resolveComponentContext: d,
|
|
1758
|
-
triggerBelongedComponentToMoveWhenMoved: c,
|
|
1759
|
-
triggerBelongedComponentToDeleteWhenDeleted: r,
|
|
1760
|
-
getPropsConfig: a
|
|
1871
|
+
getPropsConfig: i
|
|
1761
1872
|
};
|
|
1762
1873
|
}
|
|
1763
|
-
const
|
|
1874
|
+
const ut = /* @__PURE__ */ T({
|
|
1764
1875
|
name: "FComboListDesign",
|
|
1765
|
-
props:
|
|
1876
|
+
props: $,
|
|
1766
1877
|
emits: ["clear", "update:modelValue", "change"],
|
|
1767
1878
|
setup(e, t) {
|
|
1768
|
-
const n =
|
|
1769
|
-
return
|
|
1770
|
-
n.value.componentInstance =
|
|
1771
|
-
}), t.expose(
|
|
1879
|
+
const n = C(), i = O("designer-host-service"), l = O("design-item-context"), a = st(l, i), s = q(n, l, a);
|
|
1880
|
+
return U(() => {
|
|
1881
|
+
n.value.componentInstance = s;
|
|
1882
|
+
}), t.expose(s.value), () => I(tt, {
|
|
1772
1883
|
ref: n,
|
|
1773
1884
|
buttonContent: e.dropDownIcon,
|
|
1774
1885
|
readonly: !0,
|
|
@@ -1778,24 +1889,19 @@ const rt = /* @__PURE__ */ O({
|
|
|
1778
1889
|
enableClear: !0
|
|
1779
1890
|
}, null);
|
|
1780
1891
|
}
|
|
1781
|
-
})
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
n.component(t.name, e);
|
|
1785
|
-
}, e;
|
|
1786
|
-
};
|
|
1787
|
-
P.register = (e, t, n, o) => {
|
|
1788
|
-
e["combo-list"] = P, t["combo-list"] = H;
|
|
1892
|
+
});
|
|
1893
|
+
P.register = (e, t, n, i) => {
|
|
1894
|
+
e["combo-list"] = P, t["combo-list"] = z;
|
|
1789
1895
|
};
|
|
1790
1896
|
P.registerDesigner = (e, t, n) => {
|
|
1791
|
-
e["combo-list"] =
|
|
1897
|
+
e["combo-list"] = ut, t["combo-list"] = z;
|
|
1792
1898
|
};
|
|
1793
|
-
const bt =
|
|
1899
|
+
const bt = le(P);
|
|
1794
1900
|
export {
|
|
1795
1901
|
P as FComboList,
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1902
|
+
Me as Placement,
|
|
1903
|
+
Be as ViewType,
|
|
1904
|
+
$ as comboListProps,
|
|
1799
1905
|
bt as default,
|
|
1800
|
-
|
|
1906
|
+
z as propsResolver
|
|
1801
1907
|
};
|