@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,109 +1,111 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { ref as
|
|
5
|
-
import { isPlainObject as
|
|
6
|
-
import { useIdentify as
|
|
7
|
-
import { FCheckBox as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { resolveAppearance as
|
|
11
|
-
import { useDesignerComponent as
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
var ve = Object.defineProperty;
|
|
2
|
+
var be = (e, t, n) => t in e ? ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var T = (e, t, n) => be(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { ref as b, computed as B, createVNode as h, Fragment as X, watch as H, withModifiers as Ce, withDirectives as Se, vModelText as we, defineComponent as x, Teleport as Fe, createApp as ke, onUnmounted as Ie, inject as N, nextTick as te, onMounted as J, mergeProps as Me } from "vue";
|
|
5
|
+
import { isPlainObject as ne, cloneDeep as re } from "lodash-es";
|
|
6
|
+
import { useIdentify as Be, useHierarchy as Ve, useGroupData as Oe, usePagination as Te, useDataView as Pe, useSelection as Le, useEdit as Ee, useVisualDataBound as $e, useVisualDataCell as De, useVisualDataRow as Ae, useVisualGroupRow as je, useVisualSummaryRow as Re, useVisualData as xe } from "../data-view/index.esm.js";
|
|
7
|
+
import { FCheckBox as Q } from "../checkbox/index.esm.js";
|
|
8
|
+
import He from "../list-view/index.esm.js";
|
|
9
|
+
import Ge from "../button-edit/index.esm.js";
|
|
10
|
+
import { resolveAppearance as Ne } from "../dynamic-resolver/index.esm.js";
|
|
11
|
+
import { useDesignerComponent as se, DgControl as oe } from "../designer-canvas/index.esm.js";
|
|
12
|
+
import { withInstall as Ue } from "../common/index.esm.js";
|
|
13
|
+
const ce = {}, ue = {};
|
|
14
|
+
function Y(e) {
|
|
15
|
+
const { properties: t, title: n, ignore: l } = e, i = l && Array.isArray(l), a = Object.keys(t).reduce((r, c) => ((!i || !l.find((m) => m === c)) && (r[c] = t[c].type === "object" && t[c].properties ? Y(t[c]) : re(t[c].default)), r), {});
|
|
16
|
+
if (n && (!i || !l.find((r) => r === "id"))) {
|
|
17
|
+
const r = n.toLowerCase().replace(/-/g, "_");
|
|
18
|
+
a.id = `${r}_${Math.random().toString().slice(2, 6)}`;
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
19
21
|
}
|
|
20
|
-
function
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
23
|
-
let
|
|
24
|
-
const
|
|
25
|
-
return
|
|
22
|
+
function de(e, t = {}, n) {
|
|
23
|
+
const l = ce[e];
|
|
24
|
+
if (l) {
|
|
25
|
+
let i = Y(l);
|
|
26
|
+
const a = ue[e];
|
|
27
|
+
return i = a ? a({ getSchemaByType: de }, i, t, n) : i, i;
|
|
26
28
|
}
|
|
27
29
|
return null;
|
|
28
30
|
}
|
|
29
|
-
function
|
|
30
|
-
const n =
|
|
31
|
-
return Object.keys(
|
|
31
|
+
function qe(e, t) {
|
|
32
|
+
const n = Y(t);
|
|
33
|
+
return Object.keys(n).reduce((l, i) => (l[i] && ne(l[i]) && ne(e[i] || !e[i]) ? Object.assign(l[i], e[i] || {}) : l[i] = e[i], l), n), n;
|
|
32
34
|
}
|
|
33
|
-
function
|
|
34
|
-
return Object.keys(e).filter((
|
|
35
|
-
if (t.has(
|
|
36
|
-
const
|
|
37
|
-
if (typeof
|
|
38
|
-
|
|
35
|
+
function We(e, t) {
|
|
36
|
+
return Object.keys(e).filter((l) => e[l] != null).reduce((l, i) => {
|
|
37
|
+
if (t.has(i)) {
|
|
38
|
+
const a = t.get(i);
|
|
39
|
+
if (typeof a == "string")
|
|
40
|
+
l[a] = e[i];
|
|
39
41
|
else {
|
|
40
|
-
const
|
|
41
|
-
Object.assign(
|
|
42
|
+
const r = a(i, e[i], e);
|
|
43
|
+
Object.assign(l, r);
|
|
42
44
|
}
|
|
43
45
|
} else
|
|
44
|
-
|
|
45
|
-
return
|
|
46
|
+
l[i] = e[i];
|
|
47
|
+
return l;
|
|
46
48
|
}, {});
|
|
47
49
|
}
|
|
48
|
-
function
|
|
49
|
-
const
|
|
50
|
-
return
|
|
50
|
+
function _e(e, t, n = /* @__PURE__ */ new Map()) {
|
|
51
|
+
const l = qe(e, t);
|
|
52
|
+
return We(l, n);
|
|
51
53
|
}
|
|
52
|
-
function
|
|
53
|
-
function t(
|
|
54
|
-
if (typeof
|
|
55
|
-
return
|
|
56
|
-
if (typeof
|
|
57
|
-
const
|
|
58
|
-
if (
|
|
59
|
-
return Number(
|
|
60
|
-
if (
|
|
61
|
-
return Number(
|
|
62
|
-
if (
|
|
63
|
-
return Number(
|
|
54
|
+
function ze(e = {}) {
|
|
55
|
+
function t(p, u, o, s) {
|
|
56
|
+
if (typeof o == "number")
|
|
57
|
+
return s[p].length === o;
|
|
58
|
+
if (typeof o == "object") {
|
|
59
|
+
const g = Object.keys(o)[0], y = o[g];
|
|
60
|
+
if (g === "not")
|
|
61
|
+
return Number(s[p].length) !== Number(y);
|
|
62
|
+
if (g === "moreThan")
|
|
63
|
+
return Number(s[p].length) >= Number(y);
|
|
64
|
+
if (g === "lessThan")
|
|
65
|
+
return Number(s[p].length) <= Number(y);
|
|
64
66
|
}
|
|
65
67
|
return !1;
|
|
66
68
|
}
|
|
67
|
-
function n(
|
|
68
|
-
return
|
|
69
|
+
function n(p, u, o, s) {
|
|
70
|
+
return s[p] && s[p].propertyValue && String(s[p].propertyValue.value) === String(o);
|
|
69
71
|
}
|
|
70
|
-
const
|
|
72
|
+
const l = /* @__PURE__ */ new Map([
|
|
71
73
|
["length", t],
|
|
72
74
|
["getProperty", n]
|
|
73
75
|
]);
|
|
74
|
-
Object.keys(e).reduce((
|
|
75
|
-
function
|
|
76
|
-
const
|
|
77
|
-
return typeof
|
|
78
|
-
if (
|
|
79
|
-
return { target:
|
|
80
|
-
const
|
|
81
|
-
return { target:
|
|
76
|
+
Object.keys(e).reduce((p, u) => (p.set(u, e[u]), p), l);
|
|
77
|
+
function i(p, u) {
|
|
78
|
+
const o = p;
|
|
79
|
+
return typeof u == "number" ? [{ target: o, operator: "length", param: null, value: Number(u) }] : typeof u == "boolean" ? [{ target: o, operator: "getProperty", param: p, value: !!u }] : typeof u == "object" ? Object.keys(u).map((s) => {
|
|
80
|
+
if (s === "length")
|
|
81
|
+
return { target: o, operator: "length", param: null, value: u[s] };
|
|
82
|
+
const g = s, y = u[s];
|
|
83
|
+
return { target: o, operator: "getProperty", param: g, value: y };
|
|
82
84
|
}) : [];
|
|
83
85
|
}
|
|
84
|
-
function
|
|
85
|
-
return Object.keys(
|
|
86
|
-
const
|
|
87
|
-
return
|
|
86
|
+
function a(p) {
|
|
87
|
+
return Object.keys(p).reduce((o, s) => {
|
|
88
|
+
const g = i(s, p[s]);
|
|
89
|
+
return o.push(...g), o;
|
|
88
90
|
}, []);
|
|
89
91
|
}
|
|
90
|
-
function
|
|
91
|
-
if (
|
|
92
|
-
const
|
|
93
|
-
return
|
|
92
|
+
function r(p, u) {
|
|
93
|
+
if (l.has(p.operator)) {
|
|
94
|
+
const o = l.get(p.operator);
|
|
95
|
+
return o && o(p.target, p.param, p.value, u) || !1;
|
|
94
96
|
}
|
|
95
97
|
return !1;
|
|
96
98
|
}
|
|
97
|
-
function
|
|
98
|
-
return
|
|
99
|
+
function c(p, u) {
|
|
100
|
+
return a(p).reduce((g, y) => g && r(y, u), !0);
|
|
99
101
|
}
|
|
100
|
-
function
|
|
101
|
-
const
|
|
102
|
-
return
|
|
102
|
+
function m(p, u) {
|
|
103
|
+
const o = Object.keys(p), s = o.includes("allOf"), g = o.includes("anyOf"), y = s || g, v = (y ? p[y ? s ? "allOf" : "anyOf" : "allOf"] : [p]).map((w) => c(w, u));
|
|
104
|
+
return s ? !v.includes(!1) : v.includes(!0);
|
|
103
105
|
}
|
|
104
|
-
return { parseValueSchema:
|
|
106
|
+
return { parseValueSchema: m };
|
|
105
107
|
}
|
|
106
|
-
const
|
|
108
|
+
const I = {
|
|
107
109
|
button: { type: "button", name: "按钮", icon: "Button" },
|
|
108
110
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
109
111
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
@@ -141,21 +143,22 @@ const B = {
|
|
|
141
143
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
142
144
|
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
143
145
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
144
|
-
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
146
|
+
fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
|
|
147
|
+
"query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
|
|
148
|
+
}, Xe = {}, Je = {};
|
|
149
|
+
ze();
|
|
150
|
+
function _(e, t, n = /* @__PURE__ */ new Map(), l = (r, c, m, p) => c, i = {}, a = (r) => r) {
|
|
151
|
+
return ce[t.title] = t, ue[t.title] = l, Xe[t.title] = i, Je[t.title] = a, (r = {}) => {
|
|
152
|
+
const c = _e(r, t, n), m = Object.keys(e).reduce((p, u) => (p[u] = e[u].default, p), {});
|
|
153
|
+
return Object.assign(m, c);
|
|
151
154
|
};
|
|
152
155
|
}
|
|
153
|
-
function
|
|
156
|
+
function Z(e, t) {
|
|
154
157
|
return { customClass: t.class, customStyle: t.style };
|
|
155
158
|
}
|
|
156
|
-
const
|
|
157
|
-
["appearance",
|
|
158
|
-
]),
|
|
159
|
+
const Qe = /* @__PURE__ */ new Map([
|
|
160
|
+
["appearance", Z]
|
|
161
|
+
]), Ye = "https://json-schema.org/draft/2020-12/schema", Ze = "https://farris-design.gitee.io/order.schema.json", Ke = "order", et = "A Farris Component", tt = "object", nt = {
|
|
159
162
|
id: {
|
|
160
163
|
description: "The unique identifier for a order",
|
|
161
164
|
type: "string"
|
|
@@ -247,22 +250,22 @@ const st = /* @__PURE__ */ new Map([
|
|
|
247
250
|
type: "sting",
|
|
248
251
|
default: ""
|
|
249
252
|
}
|
|
250
|
-
},
|
|
253
|
+
}, ot = [
|
|
251
254
|
"id",
|
|
252
255
|
"type"
|
|
253
|
-
],
|
|
254
|
-
$schema:
|
|
255
|
-
$id:
|
|
256
|
-
title:
|
|
257
|
-
description:
|
|
258
|
-
type:
|
|
259
|
-
properties:
|
|
260
|
-
required:
|
|
256
|
+
], lt = {
|
|
257
|
+
$schema: Ye,
|
|
258
|
+
$id: Ze,
|
|
259
|
+
title: Ke,
|
|
260
|
+
description: et,
|
|
261
|
+
type: tt,
|
|
262
|
+
properties: nt,
|
|
263
|
+
required: ot
|
|
261
264
|
};
|
|
262
|
-
function
|
|
265
|
+
function it(e, t, n) {
|
|
263
266
|
return t;
|
|
264
267
|
}
|
|
265
|
-
const
|
|
268
|
+
const at = "order", rt = "A Farris Component", st = "object", ct = {
|
|
266
269
|
basic: {
|
|
267
270
|
description: "Basic Infomation",
|
|
268
271
|
title: "基本信息",
|
|
@@ -333,7 +336,7 @@ const bt = "order", vt = "A Farris Component", Ct = "object", wt = {
|
|
|
333
336
|
},
|
|
334
337
|
{
|
|
335
338
|
value: "center",
|
|
336
|
-
name: "
|
|
339
|
+
name: "居中"
|
|
337
340
|
},
|
|
338
341
|
{
|
|
339
342
|
value: "right",
|
|
@@ -344,12 +347,12 @@ const bt = "order", vt = "A Farris Component", Ct = "object", wt = {
|
|
|
344
347
|
}
|
|
345
348
|
}
|
|
346
349
|
}
|
|
347
|
-
},
|
|
348
|
-
title:
|
|
349
|
-
description:
|
|
350
|
-
type:
|
|
351
|
-
categories:
|
|
352
|
-
},
|
|
350
|
+
}, ut = {
|
|
351
|
+
title: at,
|
|
352
|
+
description: rt,
|
|
353
|
+
type: st,
|
|
354
|
+
categories: ct
|
|
355
|
+
}, K = {
|
|
353
356
|
dataSource: {
|
|
354
357
|
type: Array,
|
|
355
358
|
default: [
|
|
@@ -368,13 +371,13 @@ const bt = "order", vt = "A Farris Component", Ct = "object", wt = {
|
|
|
368
371
|
{ id: "3", name: "开票日期", order: "asc" }
|
|
369
372
|
]
|
|
370
373
|
}
|
|
371
|
-
},
|
|
372
|
-
["appearance",
|
|
374
|
+
}, le = _(K, lt, Qe, it, ut), dt = /* @__PURE__ */ new Map([
|
|
375
|
+
["appearance", Z]
|
|
373
376
|
]);
|
|
374
|
-
function
|
|
377
|
+
function pt(e, t, n) {
|
|
375
378
|
return t;
|
|
376
379
|
}
|
|
377
|
-
const
|
|
380
|
+
const ft = "https://json-schema.org/draft/2020-12/schema", mt = "https://farris-design.gitee.io/list-view.schema.json", yt = "list-view", gt = "A Farris Component", ht = "object", vt = {
|
|
378
381
|
id: {
|
|
379
382
|
description: "The unique identifier for list-view",
|
|
380
383
|
type: "string"
|
|
@@ -436,18 +439,18 @@ const It = "https://json-schema.org/draft/2020-12/schema", Mt = "https://farris-
|
|
|
436
439
|
type: "boolean",
|
|
437
440
|
default: !0
|
|
438
441
|
}
|
|
439
|
-
},
|
|
442
|
+
}, bt = [
|
|
440
443
|
"id",
|
|
441
444
|
"type"
|
|
442
|
-
],
|
|
443
|
-
$schema:
|
|
444
|
-
$id:
|
|
445
|
-
title:
|
|
446
|
-
description:
|
|
447
|
-
type:
|
|
448
|
-
properties:
|
|
449
|
-
required:
|
|
450
|
-
},
|
|
445
|
+
], Ct = {
|
|
446
|
+
$schema: ft,
|
|
447
|
+
$id: mt,
|
|
448
|
+
title: yt,
|
|
449
|
+
description: gt,
|
|
450
|
+
type: ht,
|
|
451
|
+
properties: vt,
|
|
452
|
+
required: bt
|
|
453
|
+
}, St = "list-view", wt = "A Farris Component", Ft = "object", kt = {
|
|
451
454
|
basic: {
|
|
452
455
|
description: "Basic Infomation",
|
|
453
456
|
title: "基本信息",
|
|
@@ -469,12 +472,12 @@ const It = "https://json-schema.org/draft/2020-12/schema", Mt = "https://farris-
|
|
|
469
472
|
}
|
|
470
473
|
}
|
|
471
474
|
}
|
|
472
|
-
},
|
|
473
|
-
title:
|
|
474
|
-
description:
|
|
475
|
-
type:
|
|
476
|
-
categories:
|
|
477
|
-
},
|
|
475
|
+
}, It = {
|
|
476
|
+
title: St,
|
|
477
|
+
description: wt,
|
|
478
|
+
type: Ft,
|
|
479
|
+
categories: kt
|
|
480
|
+
}, pe = {
|
|
478
481
|
/** 列集合 */
|
|
479
482
|
columns: {
|
|
480
483
|
type: Array,
|
|
@@ -516,193 +519,193 @@ const It = "https://json-schema.org/draft/2020-12/schema", Mt = "https://farris-
|
|
|
516
519
|
// 搜索启用高亮
|
|
517
520
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
518
521
|
};
|
|
519
|
-
|
|
520
|
-
function
|
|
521
|
-
function n(
|
|
522
|
-
const
|
|
523
|
-
let
|
|
524
|
-
for (;
|
|
525
|
-
|
|
526
|
-
return
|
|
527
|
-
}
|
|
528
|
-
function
|
|
529
|
-
const
|
|
530
|
-
return n(
|
|
531
|
-
const
|
|
532
|
-
let
|
|
533
|
-
for (;
|
|
534
|
-
const
|
|
535
|
-
if (
|
|
522
|
+
_(pe, Ct, dt, pt, It);
|
|
523
|
+
function Mt(e, t) {
|
|
524
|
+
function n(a) {
|
|
525
|
+
const r = [];
|
|
526
|
+
let c = a.nextNode();
|
|
527
|
+
for (; c; )
|
|
528
|
+
r.push(c), c = a.nextNode();
|
|
529
|
+
return r;
|
|
530
|
+
}
|
|
531
|
+
function l(a, r) {
|
|
532
|
+
const c = document.createTreeWalker(a, NodeFilter.SHOW_TEXT);
|
|
533
|
+
return n(c).map((o) => ({ textNode: o, text: (o.textContent || "").toLocaleLowerCase() })).map(({ textNode: o, text: s }) => {
|
|
534
|
+
const g = [];
|
|
535
|
+
let y = 0;
|
|
536
|
+
for (; y < s.length; ) {
|
|
537
|
+
const d = s.indexOf(r, y);
|
|
538
|
+
if (d === -1)
|
|
536
539
|
break;
|
|
537
|
-
|
|
540
|
+
g.push(d), y = d + r.length;
|
|
538
541
|
}
|
|
539
|
-
return
|
|
540
|
-
const
|
|
541
|
-
return
|
|
542
|
+
return g.map((d) => {
|
|
543
|
+
const f = new Range();
|
|
544
|
+
return f.setStart(o, d), f.setEnd(o, d + r.length), f;
|
|
542
545
|
});
|
|
543
546
|
}).flat();
|
|
544
547
|
}
|
|
545
|
-
function a
|
|
546
|
-
if (!CSS.highlights || (CSS.highlights.clear(), !
|
|
548
|
+
function i(a) {
|
|
549
|
+
if (!CSS.highlights || (CSS.highlights.clear(), !a || !t))
|
|
547
550
|
return;
|
|
548
|
-
const
|
|
549
|
-
CSS.highlights.set("search-result",
|
|
551
|
+
const r = l(t.value, a.toLocaleLowerCase()), c = new Highlight(...r);
|
|
552
|
+
CSS.highlights.set("search-result", c);
|
|
550
553
|
}
|
|
551
|
-
return { search:
|
|
554
|
+
return { search: i };
|
|
552
555
|
}
|
|
553
|
-
function
|
|
554
|
-
const
|
|
555
|
-
var F,
|
|
556
|
-
return ((F = e.selection) == null ? void 0 : F.multiSelect) && ((
|
|
556
|
+
function ie(e, t, n, l, i, a, r, c, m, p) {
|
|
557
|
+
const u = b(e.size), o = b(e.textField), s = b(e.titleField), g = b(e.disableField), y = B(() => {
|
|
558
|
+
var F, L;
|
|
559
|
+
return ((F = e.selection) == null ? void 0 : F.multiSelect) && ((L = e.selection) == null ? void 0 : L.showCheckbox);
|
|
557
560
|
}), {
|
|
558
|
-
onMouseenterItem:
|
|
559
|
-
onMouseoverItem:
|
|
560
|
-
onMouseoutItem:
|
|
561
|
-
} =
|
|
561
|
+
onMouseenterItem: d,
|
|
562
|
+
onMouseoverItem: f,
|
|
563
|
+
onMouseoutItem: v
|
|
564
|
+
} = a, {
|
|
562
565
|
getKey: S,
|
|
563
|
-
listViewItemClass:
|
|
564
|
-
onCheckItem:
|
|
565
|
-
onClickItem:
|
|
566
|
-
} =
|
|
567
|
-
margin:
|
|
566
|
+
listViewItemClass: w,
|
|
567
|
+
onCheckItem: M,
|
|
568
|
+
onClickItem: C
|
|
569
|
+
} = r, k = B(() => ({
|
|
570
|
+
margin: u.value === "small" ? "0.25rem 0" : "10px 0"
|
|
568
571
|
}));
|
|
569
|
-
function
|
|
570
|
-
return F.checked =
|
|
571
|
-
class:
|
|
572
|
-
id: S(F,
|
|
573
|
-
key: S(F,
|
|
574
|
-
onClick: (
|
|
575
|
-
onMouseenter: (
|
|
576
|
-
onMouseover: (
|
|
577
|
-
onMouseout: (
|
|
578
|
-
}, [
|
|
572
|
+
function O(F, L, D) {
|
|
573
|
+
return F.checked = c.findIndexInSelectedItems(F) > -1, h("li", {
|
|
574
|
+
class: w(F, L),
|
|
575
|
+
id: S(F, L),
|
|
576
|
+
key: S(F, L),
|
|
577
|
+
onClick: (V) => C(V, F, L),
|
|
578
|
+
onMouseenter: (V) => d(V, F, L),
|
|
579
|
+
onMouseover: (V) => f(V, F, L),
|
|
580
|
+
onMouseout: (V) => v(V, F, L)
|
|
581
|
+
}, [y.value && h("div", {
|
|
579
582
|
class: "f-list-select",
|
|
580
|
-
onClick: (
|
|
581
|
-
}, [h(
|
|
582
|
-
id: "list-" + S(F,
|
|
583
|
+
onClick: (V) => V.stopPropagation()
|
|
584
|
+
}, [h(Q, {
|
|
585
|
+
id: "list-" + S(F, L),
|
|
583
586
|
customClass: "listview-checkbox",
|
|
584
|
-
disabled: F[
|
|
587
|
+
disabled: F[g.value],
|
|
585
588
|
checked: F.checked,
|
|
586
|
-
"onUpdate:checked": (
|
|
587
|
-
onChange: (
|
|
588
|
-
|
|
589
|
+
"onUpdate:checked": (V) => F.checked = V,
|
|
590
|
+
onChange: (V) => {
|
|
591
|
+
M(F, L, !V.checked);
|
|
589
592
|
}
|
|
590
593
|
}, null)]), h("div", {
|
|
591
594
|
class: "f-list-content"
|
|
592
595
|
}, [h("div", {
|
|
593
|
-
style:
|
|
594
|
-
title: F.raw[
|
|
595
|
-
}, [F.raw[
|
|
596
|
+
style: k.value,
|
|
597
|
+
title: F.raw[s.value] || F.raw[o.value]
|
|
598
|
+
}, [F.raw[o.value]])])]);
|
|
596
599
|
}
|
|
597
600
|
return {
|
|
598
|
-
renderItem:
|
|
601
|
+
renderItem: O
|
|
599
602
|
};
|
|
600
603
|
}
|
|
601
|
-
function
|
|
602
|
-
const
|
|
603
|
-
onMouseenterItem:
|
|
604
|
-
onMouseoverItem:
|
|
605
|
-
onMouseoutItem:
|
|
606
|
-
} =
|
|
607
|
-
getKey:
|
|
608
|
-
listViewItemClass:
|
|
609
|
-
onCheckItem:
|
|
604
|
+
function Bt(e, t, n, l, i, a, r, c, m, p) {
|
|
605
|
+
const u = b(e.multiSelect), o = b(e.disableField), {
|
|
606
|
+
onMouseenterItem: s,
|
|
607
|
+
onMouseoverItem: g,
|
|
608
|
+
onMouseoutItem: y
|
|
609
|
+
} = a, {
|
|
610
|
+
getKey: d,
|
|
611
|
+
listViewItemClass: f,
|
|
612
|
+
onCheckItem: v,
|
|
610
613
|
onClickItem: S
|
|
611
|
-
} =
|
|
612
|
-
function
|
|
613
|
-
return t.slots.content ? h(
|
|
614
|
-
item:
|
|
615
|
-
index:
|
|
616
|
-
selectedItem:
|
|
614
|
+
} = r;
|
|
615
|
+
function w(C, k, O) {
|
|
616
|
+
return t.slots.content ? h(X, null, [t.slots.content && t.slots.content({
|
|
617
|
+
item: C.raw,
|
|
618
|
+
index: k,
|
|
619
|
+
selectedItem: O
|
|
617
620
|
})]) : h("div", {
|
|
618
621
|
style: "margin: 10px 0;"
|
|
619
|
-
}, [
|
|
622
|
+
}, [C.raw.name]);
|
|
620
623
|
}
|
|
621
|
-
function
|
|
624
|
+
function M(C, k, O) {
|
|
622
625
|
return h("li", {
|
|
623
|
-
class:
|
|
624
|
-
id:
|
|
625
|
-
key:
|
|
626
|
-
onClick: (F) => S(F,
|
|
627
|
-
onMouseenter: (F) =>
|
|
628
|
-
onMouseover: (F) =>
|
|
629
|
-
onMouseout: (F) =>
|
|
630
|
-
}, [
|
|
626
|
+
class: f(C, k),
|
|
627
|
+
id: d(C, k),
|
|
628
|
+
key: d(C, k),
|
|
629
|
+
onClick: (F) => S(F, C, k),
|
|
630
|
+
onMouseenter: (F) => s(F, C, k),
|
|
631
|
+
onMouseover: (F) => g(F, C, k),
|
|
632
|
+
onMouseout: (F) => y(F, C, k)
|
|
633
|
+
}, [u.value && h("div", {
|
|
631
634
|
class: "f-list-select",
|
|
632
635
|
onClick: (F) => F.stopPropagation()
|
|
633
|
-
}, [h(
|
|
634
|
-
id: "list-" +
|
|
636
|
+
}, [h(Q, {
|
|
637
|
+
id: "list-" + d(C, k),
|
|
635
638
|
customClass: "listview-checkbox",
|
|
636
|
-
disabled:
|
|
637
|
-
checked:
|
|
638
|
-
"onUpdate:checked": (F) =>
|
|
639
|
-
onChange: (F) =>
|
|
639
|
+
disabled: C[o.value] || !C.checked,
|
|
640
|
+
checked: C.checked,
|
|
641
|
+
"onUpdate:checked": (F) => C.checked = F,
|
|
642
|
+
onChange: (F) => v(C, k, !F.checked)
|
|
640
643
|
}, null)]), h("div", {
|
|
641
644
|
class: "f-list-content"
|
|
642
|
-
}, [
|
|
645
|
+
}, [w(C, k, O)])]);
|
|
643
646
|
}
|
|
644
647
|
return {
|
|
645
|
-
renderItem:
|
|
648
|
+
renderItem: M
|
|
646
649
|
};
|
|
647
650
|
}
|
|
648
|
-
function
|
|
649
|
-
const
|
|
650
|
-
onMouseenterItem:
|
|
651
|
-
onMouseoverItem:
|
|
652
|
-
onMouseoutItem:
|
|
653
|
-
} =
|
|
654
|
-
getKey:
|
|
655
|
-
listViewItemClass:
|
|
656
|
-
onCheckItem:
|
|
651
|
+
function Vt(e, t, n, l, i, a, r, c, m, p) {
|
|
652
|
+
const u = b(e.multiSelect), o = b(e.disableField), {
|
|
653
|
+
onMouseenterItem: s,
|
|
654
|
+
onMouseoverItem: g,
|
|
655
|
+
onMouseoutItem: y
|
|
656
|
+
} = a, {
|
|
657
|
+
getKey: d,
|
|
658
|
+
listViewItemClass: f,
|
|
659
|
+
onCheckItem: v,
|
|
657
660
|
onClickItem: S
|
|
658
|
-
} =
|
|
659
|
-
dragstart:
|
|
660
|
-
dragenter:
|
|
661
|
-
dragover:
|
|
662
|
-
dragend:
|
|
663
|
-
} =
|
|
664
|
-
removeItem:
|
|
665
|
-
} =
|
|
666
|
-
margin:
|
|
661
|
+
} = r, {
|
|
662
|
+
dragstart: w,
|
|
663
|
+
dragenter: M,
|
|
664
|
+
dragover: C,
|
|
665
|
+
dragend: k
|
|
666
|
+
} = l, {
|
|
667
|
+
removeItem: O
|
|
668
|
+
} = m, F = B(() => ({
|
|
669
|
+
margin: u.value ? "10px 0" : "10px 0px 10px 14px"
|
|
667
670
|
}));
|
|
668
|
-
function
|
|
671
|
+
function L(P) {
|
|
669
672
|
return h("div", {
|
|
670
673
|
style: F.value
|
|
671
674
|
}, [P.raw.name]);
|
|
672
675
|
}
|
|
673
|
-
function
|
|
674
|
-
return t.slots.itemContent ? t.slots.itemContent :
|
|
676
|
+
function D() {
|
|
677
|
+
return t.slots.itemContent ? t.slots.itemContent : L;
|
|
675
678
|
}
|
|
676
|
-
const
|
|
677
|
-
function
|
|
679
|
+
const V = D();
|
|
680
|
+
function A(P, $, R) {
|
|
678
681
|
return h("li", {
|
|
679
|
-
class:
|
|
680
|
-
id:
|
|
681
|
-
key:
|
|
682
|
-
onClick: (
|
|
683
|
-
onMouseenter: (
|
|
684
|
-
onMouseover: (
|
|
685
|
-
onMouseout: (
|
|
682
|
+
class: f(P, $),
|
|
683
|
+
id: d(P, $),
|
|
684
|
+
key: d(P, $),
|
|
685
|
+
onClick: (E) => S(E, P, $),
|
|
686
|
+
onMouseenter: (E) => s(E, P, $),
|
|
687
|
+
onMouseover: (E) => g(E, P, $),
|
|
688
|
+
onMouseout: (E) => y(E, P, $),
|
|
686
689
|
draggable: "true",
|
|
687
|
-
onDragstart: (
|
|
688
|
-
onDragenter: (
|
|
689
|
-
onDragend: (
|
|
690
|
-
onDragover: (
|
|
691
|
-
}, [
|
|
690
|
+
onDragstart: (E) => w(E, P, $),
|
|
691
|
+
onDragenter: (E) => M(E, $),
|
|
692
|
+
onDragend: (E) => k(E, P),
|
|
693
|
+
onDragover: (E) => C(E, $)
|
|
694
|
+
}, [u.value && h("div", {
|
|
692
695
|
class: "f-list-select",
|
|
693
|
-
onClick: (
|
|
694
|
-
}, [h(
|
|
695
|
-
id: "list-" +
|
|
696
|
+
onClick: (E) => E.stopPropagation()
|
|
697
|
+
}, [h(Q, {
|
|
698
|
+
id: "list-" + d(P, $),
|
|
696
699
|
customClass: "listview-checkbox",
|
|
697
|
-
disabled: P[
|
|
700
|
+
disabled: P[o.value] || !P.checked,
|
|
698
701
|
checked: P.checked,
|
|
699
|
-
"onUpdate:checked": (
|
|
700
|
-
onChange: (
|
|
702
|
+
"onUpdate:checked": (E) => P.checked = E,
|
|
703
|
+
onChange: (E) => v(P, $, !E.checked)
|
|
701
704
|
}, null)]), h("div", {
|
|
702
705
|
class: "f-list-content"
|
|
703
|
-
}, [
|
|
706
|
+
}, [V(P)]), h("div", {
|
|
704
707
|
class: "f-list-remove",
|
|
705
|
-
onClick: (
|
|
708
|
+
onClick: (E) => O($)
|
|
706
709
|
}, [h("div", {
|
|
707
710
|
class: "f-list-remove-icon"
|
|
708
711
|
}, [h("i", {
|
|
@@ -714,299 +717,299 @@ function Nt(e, t, n, o, a, r, s, f, c, l) {
|
|
|
714
717
|
}, null)])])]);
|
|
715
718
|
}
|
|
716
719
|
return {
|
|
717
|
-
renderItem:
|
|
720
|
+
renderItem: A
|
|
718
721
|
};
|
|
719
722
|
}
|
|
720
|
-
function
|
|
721
|
-
var
|
|
722
|
-
const
|
|
723
|
-
collpaseGroupIconClass:
|
|
724
|
-
} =
|
|
725
|
-
toggleGroupRow:
|
|
726
|
-
} =
|
|
727
|
-
function
|
|
728
|
-
|
|
729
|
-
}
|
|
730
|
-
function
|
|
731
|
-
return
|
|
723
|
+
function Ot(e, t, n, l, i, a, r, c, m, p) {
|
|
724
|
+
var d;
|
|
725
|
+
const u = b(((d = e.group) == null ? void 0 : d.groupFields) || []), {
|
|
726
|
+
collpaseGroupIconClass: o
|
|
727
|
+
} = i, {
|
|
728
|
+
toggleGroupRow: s
|
|
729
|
+
} = p;
|
|
730
|
+
function g(f, v) {
|
|
731
|
+
v.collapse = !v.collapse, n.value = s(v.collapse ? "collapse" : "expand", v, n.value);
|
|
732
|
+
}
|
|
733
|
+
function y(f, v, S) {
|
|
734
|
+
return f.layer > -1 && h("div", {
|
|
732
735
|
class: "f-navlookup-recentHeader",
|
|
733
|
-
onClick: (
|
|
736
|
+
onClick: (w) => g(w, f)
|
|
734
737
|
}, [h("div", {
|
|
735
738
|
class: "fv-grid-group-row-icon"
|
|
736
739
|
}, [h("span", {
|
|
737
|
-
class:
|
|
740
|
+
class: o(f)
|
|
738
741
|
}, null)]), h("div", {
|
|
739
742
|
class: "f-navlookup-recommandLabel"
|
|
740
|
-
}, [
|
|
743
|
+
}, [f.raw[u.value[f.layer]]])]);
|
|
741
744
|
}
|
|
742
745
|
return {
|
|
743
|
-
renderItem:
|
|
746
|
+
renderItem: y
|
|
744
747
|
};
|
|
745
748
|
}
|
|
746
|
-
function
|
|
747
|
-
const e =
|
|
748
|
-
function
|
|
749
|
-
n.value =
|
|
749
|
+
function Tt() {
|
|
750
|
+
const e = b(-1), t = b(""), n = b(-1), l = b(!1);
|
|
751
|
+
function i(p, u, o) {
|
|
752
|
+
n.value = o;
|
|
750
753
|
}
|
|
751
|
-
function
|
|
752
|
-
|
|
754
|
+
function a(p, u, o) {
|
|
755
|
+
l.value || (n.value = o);
|
|
753
756
|
}
|
|
754
|
-
function
|
|
757
|
+
function r(p, u, o) {
|
|
755
758
|
n.value = -1;
|
|
756
759
|
}
|
|
757
|
-
function f() {
|
|
758
|
-
o.value = !0;
|
|
759
|
-
}
|
|
760
760
|
function c() {
|
|
761
|
-
|
|
761
|
+
l.value = !0;
|
|
762
|
+
}
|
|
763
|
+
function m() {
|
|
764
|
+
l.value = !1;
|
|
762
765
|
}
|
|
763
766
|
return {
|
|
764
767
|
activeIndex: e,
|
|
765
768
|
focusedItemId: t,
|
|
766
769
|
hoverIndex: n,
|
|
767
|
-
onMouseenterItem:
|
|
768
|
-
onMouseoverItem:
|
|
769
|
-
onMouseoutItem:
|
|
770
|
-
resumeHover:
|
|
771
|
-
suspendHover:
|
|
770
|
+
onMouseenterItem: i,
|
|
771
|
+
onMouseoverItem: a,
|
|
772
|
+
onMouseoutItem: r,
|
|
773
|
+
resumeHover: m,
|
|
774
|
+
suspendHover: c
|
|
772
775
|
};
|
|
773
776
|
}
|
|
774
|
-
function
|
|
775
|
-
const
|
|
776
|
-
function
|
|
777
|
-
|
|
778
|
-
|
|
777
|
+
function Pt(e, t, n, l) {
|
|
778
|
+
const i = b(e.idField), { dataView: a } = n, r = b(-1), c = b(!1), { activeIndex: m, focusedItemId: p, hoverIndex: u, resumeHover: o, suspendHover: s } = l;
|
|
779
|
+
function g(v, S, w) {
|
|
780
|
+
v.stopPropagation(), s(), S && setTimeout(() => {
|
|
781
|
+
r.value = w, c.value = !0, S.moving = !0;
|
|
779
782
|
});
|
|
780
783
|
}
|
|
781
|
-
function
|
|
782
|
-
if (
|
|
783
|
-
const
|
|
784
|
-
|
|
784
|
+
function y(v, S) {
|
|
785
|
+
if (v.preventDefault(), r.value !== S) {
|
|
786
|
+
const w = a.value[r.value], M = a.value;
|
|
787
|
+
M.splice(r.value, 1), M.splice(S, 0, w), r.value = S;
|
|
785
788
|
}
|
|
786
789
|
}
|
|
787
|
-
function
|
|
788
|
-
|
|
790
|
+
function d(v, S) {
|
|
791
|
+
v.preventDefault(), v.dataTransfer && (v.dataTransfer.dropEffect = "move");
|
|
789
792
|
}
|
|
790
|
-
function
|
|
791
|
-
S && (S.moving = !1),
|
|
792
|
-
|
|
793
|
-
}),
|
|
793
|
+
function f(v, S) {
|
|
794
|
+
S && (S.moving = !1), a.value.forEach((w, M) => {
|
|
795
|
+
w.__fv_index__ = M;
|
|
796
|
+
}), c.value = !1, o(), u.value = S.raw.__fv_index__, m.value = S.raw.__fv_index__, p.value = S.raw[i.value], t.emit("change", a.value), t.emit("activeChange", S);
|
|
794
797
|
}
|
|
795
798
|
return {
|
|
796
|
-
dragstart:
|
|
797
|
-
dragenter:
|
|
798
|
-
dragover:
|
|
799
|
-
dragend:
|
|
800
|
-
isDragging:
|
|
799
|
+
dragstart: g,
|
|
800
|
+
dragenter: y,
|
|
801
|
+
dragover: d,
|
|
802
|
+
dragend: f,
|
|
803
|
+
isDragging: c
|
|
801
804
|
};
|
|
802
805
|
}
|
|
803
|
-
function
|
|
804
|
-
const { dataView:
|
|
805
|
-
function a
|
|
806
|
-
if (
|
|
807
|
-
const
|
|
808
|
-
t.emit("removeItem",
|
|
806
|
+
function Lt(e, t, n) {
|
|
807
|
+
const { dataView: l } = n;
|
|
808
|
+
function i(a) {
|
|
809
|
+
if (a > -1 && a < l.value.length) {
|
|
810
|
+
const r = l.value.splice(a, 1);
|
|
811
|
+
t.emit("removeItem", r[0]);
|
|
809
812
|
}
|
|
810
813
|
}
|
|
811
|
-
return { removeItem:
|
|
814
|
+
return { removeItem: i };
|
|
812
815
|
}
|
|
813
|
-
function
|
|
814
|
-
const
|
|
815
|
-
function
|
|
816
|
+
function Et(e, t, n, l, i, a) {
|
|
817
|
+
const r = b(e.idField), c = b(e.disableField), m = b(e.draggable), p = b(e.itemClass), u = b(e.selection.multiSelect ?? !1), o = b(e.selection.multiSelectMode), { isDragging: s } = l, { activeIndex: g, focusedItemId: y, hoverIndex: d } = i, { clearSelection: f, getSelectedItems: v, toggleSelectItem: S } = a, w = b(v());
|
|
818
|
+
function M(V, A) {
|
|
816
819
|
const P = {
|
|
817
820
|
"f-listview-item": !0,
|
|
818
821
|
"f-list-view-group-item": !0,
|
|
819
|
-
"f-list-view-draggable-item":
|
|
820
|
-
"f-un-click": !
|
|
821
|
-
"f-un-select": !!
|
|
822
|
+
"f-list-view-draggable-item": m.value,
|
|
823
|
+
"f-un-click": !V.checked,
|
|
824
|
+
"f-un-select": !!V.raw[c.value],
|
|
822
825
|
// 'f-listview-active': item.raw.__fv_index__ === activeIndex.value,
|
|
823
826
|
// 多选
|
|
824
|
-
"f-listview-active":
|
|
825
|
-
(
|
|
827
|
+
"f-listview-active": w.value.findIndex(
|
|
828
|
+
(R) => R[r.value] === V.raw[r.value]
|
|
826
829
|
) > -1,
|
|
827
|
-
"f-listview-item-active":
|
|
828
|
-
(
|
|
830
|
+
"f-listview-item-active": w.value.findIndex(
|
|
831
|
+
(R) => R[r.value] === V.raw[r.value]
|
|
829
832
|
) > -1,
|
|
830
|
-
"f-listview-hover": !
|
|
831
|
-
"f-listview-item-hover": !
|
|
832
|
-
moving: !!
|
|
833
|
+
"f-listview-hover": !s.value && A === d.value,
|
|
834
|
+
"f-listview-item-hover": !s.value && A === d.value,
|
|
835
|
+
moving: !!V.moving
|
|
833
836
|
};
|
|
834
|
-
return
|
|
837
|
+
return p.value.split(" ").reduce((R, E) => (R[E] = !0, R), P), P;
|
|
835
838
|
}
|
|
836
|
-
function
|
|
837
|
-
return
|
|
839
|
+
function C(V, A) {
|
|
840
|
+
return V.raw[r.value] || "";
|
|
838
841
|
}
|
|
839
|
-
const
|
|
840
|
-
function
|
|
841
|
-
|
|
842
|
+
const k = B(() => !u.value);
|
|
843
|
+
function O(V, A, P) {
|
|
844
|
+
V.checked = P, !V.raw[c.value] && (k.value && (y.value = V.raw[r.value]), S(V));
|
|
842
845
|
}
|
|
843
|
-
const F =
|
|
844
|
-
function
|
|
845
|
-
if (
|
|
846
|
-
|
|
846
|
+
const F = B(() => u.value && o.value === "OnCheckClearByClick"), L = B(() => !u.value || u.value && (o.value === "OnCheckAndClick" || o.value === "OnClick"));
|
|
847
|
+
function D(V, A, P) {
|
|
848
|
+
if (A.raw[c.value]) {
|
|
849
|
+
V.preventDefault(), V.stopPropagation();
|
|
847
850
|
return;
|
|
848
851
|
}
|
|
849
|
-
|
|
852
|
+
y.value = A.raw[r.value], g.value = P, F.value && f(), L.value && (S(A), w.value = v()), t.emit("clickItem", { data: w.value, index: P }), t.emit("activeChange", w.value);
|
|
850
853
|
}
|
|
851
854
|
return {
|
|
852
|
-
getKey:
|
|
853
|
-
listViewItemClass:
|
|
854
|
-
onCheckItem:
|
|
855
|
-
onClickItem:
|
|
855
|
+
getKey: C,
|
|
856
|
+
listViewItemClass: M,
|
|
857
|
+
onCheckItem: O,
|
|
858
|
+
onClickItem: D
|
|
856
859
|
};
|
|
857
860
|
}
|
|
858
|
-
function
|
|
859
|
-
const
|
|
861
|
+
function $t(e, t, n, l, i, a, r) {
|
|
862
|
+
const c = b(e.view), m = b(e.view === "CardView"), p = b({}), u = b("暂无数据"), o = Tt(), s = Pt(e, t, l, o), g = Lt(e, t, l), y = Et(e, t, n, s, o, a), d = B(() => ({
|
|
860
863
|
"f-list-view-group": !0,
|
|
861
|
-
"d-flex":
|
|
862
|
-
"flex-wrap":
|
|
863
|
-
})),
|
|
864
|
-
|
|
864
|
+
"d-flex": m.value,
|
|
865
|
+
"flex-wrap": m.value
|
|
866
|
+
})), f = B(() => !!n.value && n.value.length > 0), v = B(() => n.value.length === 0);
|
|
867
|
+
B(() => v.value && !t.slots.empty);
|
|
865
868
|
function S() {
|
|
866
|
-
return
|
|
869
|
+
return c.value === "SingleView" ? ie : c.value === "DraggableView" ? Vt : (c.value === "ContentView" || c.value === "CardView") && t.slots.content ? Bt : ie;
|
|
867
870
|
}
|
|
868
|
-
const
|
|
869
|
-
renderItem:
|
|
870
|
-
} =
|
|
871
|
-
renderItem:
|
|
872
|
-
} =
|
|
873
|
-
function
|
|
874
|
-
return n.value.filter((
|
|
871
|
+
const w = S(), {
|
|
872
|
+
renderItem: M
|
|
873
|
+
} = w(e, t, n, s, i, o, y, a, g, r), {
|
|
874
|
+
renderItem: C
|
|
875
|
+
} = Ot(e, t, n, s, i, o, y, a, g, r), k = [M, C];
|
|
876
|
+
function O() {
|
|
877
|
+
return n.value.filter((D) => D.visible !== !1).map((D, V) => k[D.type](D, V, p));
|
|
875
878
|
}
|
|
876
879
|
function F() {
|
|
877
880
|
return h("div", {
|
|
878
881
|
class: "f-list-view-emptydata"
|
|
879
882
|
}, [h("p", {
|
|
880
883
|
class: "f-empty-title"
|
|
881
|
-
}, [t.slots.empty ? t.slots.empty() :
|
|
884
|
+
}, [t.slots.empty ? t.slots.empty() : u.value])]);
|
|
882
885
|
}
|
|
883
|
-
function
|
|
886
|
+
function L() {
|
|
884
887
|
return h("ul", {
|
|
885
|
-
class:
|
|
888
|
+
class: d.value,
|
|
886
889
|
style: "list-style: none;"
|
|
887
|
-
}, [
|
|
890
|
+
}, [f.value && O(), v.value && F()]);
|
|
888
891
|
}
|
|
889
892
|
return {
|
|
890
|
-
renderListArea:
|
|
893
|
+
renderListArea: L
|
|
891
894
|
};
|
|
892
895
|
}
|
|
893
|
-
function
|
|
894
|
-
function
|
|
896
|
+
function Dt(e, t, n) {
|
|
897
|
+
function l() {
|
|
895
898
|
return t.slots.header && h("div", {
|
|
896
899
|
class: "f-list-view-header"
|
|
897
900
|
}, [t.slots.header()]);
|
|
898
901
|
}
|
|
899
902
|
return {
|
|
900
|
-
renderHeader:
|
|
903
|
+
renderHeader: l
|
|
901
904
|
};
|
|
902
905
|
}
|
|
903
|
-
function
|
|
904
|
-
const
|
|
905
|
-
function
|
|
906
|
-
|
|
906
|
+
function ae(e, t, n) {
|
|
907
|
+
const l = b(e.headerClass), i = b(e.placeholder), a = b(""), r = B(() => !a.value), c = B(() => !!a.value);
|
|
908
|
+
function m(s) {
|
|
909
|
+
a.value = "";
|
|
907
910
|
}
|
|
908
|
-
|
|
909
|
-
e.enableHighlightSearch && n.search(
|
|
911
|
+
H(a, (s) => {
|
|
912
|
+
e.enableHighlightSearch && n.search(s), t.emit("afterSearch", s);
|
|
910
913
|
});
|
|
911
|
-
const
|
|
912
|
-
const
|
|
914
|
+
const p = B(() => {
|
|
915
|
+
const s = {
|
|
913
916
|
"form-group": !0,
|
|
914
917
|
"farris-form-group": !0
|
|
915
918
|
};
|
|
916
|
-
return
|
|
919
|
+
return l.value && l.value.split(" ").reduce((y, d) => (y[d] = !0, y), s), s;
|
|
917
920
|
});
|
|
918
|
-
function
|
|
921
|
+
function u(s) {
|
|
919
922
|
}
|
|
920
|
-
function
|
|
923
|
+
function o() {
|
|
921
924
|
return h("div", {
|
|
922
925
|
class: "f-list-view-header",
|
|
923
|
-
onClick:
|
|
926
|
+
onClick: Ce(() => u, ["prevent", "stop"])
|
|
924
927
|
}, [h("div", {
|
|
925
|
-
class:
|
|
928
|
+
class: p.value
|
|
926
929
|
}, [h("div", {
|
|
927
930
|
class: "farris-input-wrap"
|
|
928
931
|
}, [h("div", {
|
|
929
932
|
class: "f-cmp-inputgroup"
|
|
930
933
|
}, [h("div", {
|
|
931
934
|
class: "input-group f-state-editable"
|
|
932
|
-
}, [
|
|
935
|
+
}, [Se(h("input", {
|
|
933
936
|
class: "form-control f-utils-fill text-left",
|
|
934
|
-
"onUpdate:modelValue": (
|
|
937
|
+
"onUpdate:modelValue": (s) => a.value = s,
|
|
935
938
|
name: "input-group-value",
|
|
936
939
|
type: "text",
|
|
937
|
-
placeholder:
|
|
940
|
+
placeholder: i.value,
|
|
938
941
|
autocomplete: "off"
|
|
939
|
-
}, null), [[
|
|
942
|
+
}, null), [[we, a.value]]), h("div", {
|
|
940
943
|
class: "input-group-append"
|
|
941
|
-
}, [
|
|
944
|
+
}, [c.value && h("span", {
|
|
942
945
|
class: "input-group-text input-group-clear",
|
|
943
|
-
onClick: (
|
|
946
|
+
onClick: (s) => m()
|
|
944
947
|
}, [h("i", {
|
|
945
948
|
class: "f-icon f-icon-close-circle"
|
|
946
|
-
}, null)]),
|
|
949
|
+
}, null)]), r.value && h("span", {
|
|
947
950
|
class: "input-group-text"
|
|
948
951
|
}, [h("span", {
|
|
949
952
|
class: "f-icon f-icon-search"
|
|
950
953
|
}, null)])])])])])])]);
|
|
951
954
|
}
|
|
952
955
|
return {
|
|
953
|
-
renderHeader:
|
|
956
|
+
renderHeader: o
|
|
954
957
|
};
|
|
955
958
|
}
|
|
956
|
-
const
|
|
959
|
+
const fe = /* @__PURE__ */ x({
|
|
957
960
|
name: "FListView",
|
|
958
|
-
props:
|
|
961
|
+
props: pe,
|
|
959
962
|
emits: ["afterSearch", "checkValuesChange", "clickItem", "selectionChange", "removeItem", "change", "activeChange"],
|
|
960
963
|
setup(e, t) {
|
|
961
|
-
const n =
|
|
962
|
-
getVisualData:
|
|
963
|
-
} =
|
|
964
|
-
|
|
965
|
-
const F =
|
|
966
|
-
const
|
|
964
|
+
const n = b(), l = b(!0), i = b(!1), a = b([]), r = 0, c = b(e.columns), m = Be(e), p = Ve(e), u = Oe(e, m), o = Te(e), s = Pe(e, /* @__PURE__ */ new Map(), p, m, o), g = Le(e, s, m, a, t), y = Mt(e, n), d = B(() => s.dataView.value.length), f = Ee(e, t, m), v = $e(), S = De(e, {}, v), w = Ae(e, f, p, m, v, S), M = je(e, m, S, w), C = Re(e, m, S, w), k = xe(e, c, s, d, r, w, M, C), {
|
|
965
|
+
getVisualData: O
|
|
966
|
+
} = k;
|
|
967
|
+
a.value = O(0, d.value + r - 1);
|
|
968
|
+
const F = B(() => {
|
|
969
|
+
const j = {
|
|
967
970
|
"f-list-view": !0,
|
|
968
971
|
"f-list-view-multiple": e.multiSelect
|
|
969
972
|
};
|
|
970
|
-
return e.size !== "default" && (
|
|
971
|
-
}),
|
|
972
|
-
function
|
|
973
|
-
return e.header === "SearchBar" ?
|
|
973
|
+
return e.size !== "default" && (j[`${e.size}-item`] = !0), j;
|
|
974
|
+
}), L = B(() => !!t.slots.footer || l.value);
|
|
975
|
+
function D() {
|
|
976
|
+
return e.header === "SearchBar" ? ae : e.header === "ContentHeader" ? Dt : ae;
|
|
974
977
|
}
|
|
975
|
-
const
|
|
976
|
-
renderHeader:
|
|
977
|
-
} =
|
|
978
|
+
const V = D(), {
|
|
979
|
+
renderHeader: A
|
|
980
|
+
} = V(e, t, y), {
|
|
978
981
|
renderListArea: P
|
|
979
|
-
} =
|
|
980
|
-
function
|
|
981
|
-
|
|
982
|
+
} = $t(e, t, a, s, u, g, k);
|
|
983
|
+
function $(j) {
|
|
984
|
+
y.search(j);
|
|
982
985
|
}
|
|
983
|
-
function
|
|
984
|
-
|
|
986
|
+
function R(j) {
|
|
987
|
+
j && (s.load(j), a.value = O(0, d.value + r - 1));
|
|
985
988
|
}
|
|
986
989
|
t.expose({
|
|
987
|
-
search:
|
|
988
|
-
updateDataSource:
|
|
990
|
+
search: $,
|
|
991
|
+
updateDataSource: R
|
|
989
992
|
});
|
|
990
|
-
function
|
|
991
|
-
e.multiSelect && (
|
|
993
|
+
function E(j) {
|
|
994
|
+
e.multiSelect && (j.preventDefault(), j.stopPropagation());
|
|
992
995
|
}
|
|
993
996
|
return () => h("div", {
|
|
994
997
|
class: F.value,
|
|
995
|
-
onClick:
|
|
996
|
-
}, [
|
|
998
|
+
onClick: E
|
|
999
|
+
}, [A(), h("div", {
|
|
997
1000
|
ref: n,
|
|
998
1001
|
class: "f-list-view-content",
|
|
999
1002
|
onMouseover: () => {
|
|
1000
|
-
|
|
1003
|
+
i.value = !0;
|
|
1001
1004
|
},
|
|
1002
1005
|
onMouseleave: () => {
|
|
1003
|
-
|
|
1006
|
+
i.value = !1;
|
|
1004
1007
|
}
|
|
1005
|
-
}, [P()]),
|
|
1008
|
+
}, [P()]), L.value && h("div", {
|
|
1006
1009
|
class: "f-list-view-footer"
|
|
1007
1010
|
}, [t.slots.footer && t.slots.footer()])]);
|
|
1008
1011
|
}
|
|
1009
|
-
}),
|
|
1012
|
+
}), At = {
|
|
1010
1013
|
/**
|
|
1011
1014
|
* 组件标识
|
|
1012
1015
|
*/
|
|
@@ -1032,58 +1035,58 @@ const ve = /* @__PURE__ */ R({
|
|
|
1032
1035
|
*/
|
|
1033
1036
|
customClass: { type: Object, default: {} }
|
|
1034
1037
|
};
|
|
1035
|
-
function
|
|
1036
|
-
function n(
|
|
1037
|
-
|
|
1038
|
+
function jt(e, t) {
|
|
1039
|
+
function n(l) {
|
|
1040
|
+
l.stopPropagation(), e.disabled || t.emit("click", l);
|
|
1038
1041
|
}
|
|
1039
1042
|
return {
|
|
1040
1043
|
onClickButton: n
|
|
1041
1044
|
};
|
|
1042
1045
|
}
|
|
1043
|
-
function
|
|
1044
|
-
const t =
|
|
1045
|
-
const
|
|
1046
|
+
function Rt(e) {
|
|
1047
|
+
const t = B(() => {
|
|
1048
|
+
const l = {
|
|
1046
1049
|
"f-icon": !0
|
|
1047
1050
|
};
|
|
1048
1051
|
if (e.icon) {
|
|
1049
|
-
const
|
|
1050
|
-
|
|
1052
|
+
const i = e.icon.trim().split(" ");
|
|
1053
|
+
i && i.length && i.reduce((a, r) => (a[r] = !0, a), l);
|
|
1051
1054
|
}
|
|
1052
|
-
return
|
|
1053
|
-
}), n =
|
|
1055
|
+
return l;
|
|
1056
|
+
}), n = B(() => !!(e.icon && e.icon.trim()));
|
|
1054
1057
|
return { iconClass: t, shouldShowIcon: n };
|
|
1055
1058
|
}
|
|
1056
|
-
const
|
|
1059
|
+
const me = /* @__PURE__ */ x({
|
|
1057
1060
|
name: "FButton",
|
|
1058
|
-
props:
|
|
1061
|
+
props: At,
|
|
1059
1062
|
emits: ["click"],
|
|
1060
1063
|
setup(e, t) {
|
|
1061
1064
|
const {
|
|
1062
1065
|
onClickButton: n
|
|
1063
|
-
} =
|
|
1064
|
-
iconClass:
|
|
1065
|
-
shouldShowIcon:
|
|
1066
|
-
} =
|
|
1067
|
-
const
|
|
1066
|
+
} = jt(e, t), {
|
|
1067
|
+
iconClass: l,
|
|
1068
|
+
shouldShowIcon: i
|
|
1069
|
+
} = Rt(e), a = B(() => {
|
|
1070
|
+
const r = {
|
|
1068
1071
|
btn: !0,
|
|
1069
1072
|
"btn-lg": e.size === "large",
|
|
1070
1073
|
"btn-md": e.size !== "large" && e.size !== "small",
|
|
1071
1074
|
"btn-sm": e.size === "small",
|
|
1072
|
-
"btn-icontext":
|
|
1075
|
+
"btn-icontext": i.value
|
|
1073
1076
|
};
|
|
1074
|
-
return
|
|
1077
|
+
return r[`btn-${e.type}`] = !0, e.customClass && Object.keys(e.customClass).reduce((c, m) => (c[m] = e.customClass[m], c), r), r;
|
|
1075
1078
|
});
|
|
1076
1079
|
return () => h("button", {
|
|
1077
|
-
class:
|
|
1080
|
+
class: a.value,
|
|
1078
1081
|
disabled: e.disabled,
|
|
1079
|
-
onClick: (
|
|
1080
|
-
}, [
|
|
1081
|
-
class:
|
|
1082
|
+
onClick: (r) => n(r)
|
|
1083
|
+
}, [i.value && h("i", {
|
|
1084
|
+
class: l.value
|
|
1082
1085
|
}, null), t.slots.default && t.slots.default()]);
|
|
1083
1086
|
}
|
|
1084
|
-
}),
|
|
1085
|
-
["appearance",
|
|
1086
|
-
]),
|
|
1087
|
+
}), xt = /* @__PURE__ */ new Map([
|
|
1088
|
+
["appearance", Z]
|
|
1089
|
+
]), Ht = "https://json-schema.org/draft/2020-12/schema", Gt = "https://farris-design.gitee.io/combo-list.schema.json", Nt = "combo-list", Ut = "A Farris Input Component", qt = "object", Wt = {
|
|
1087
1090
|
id: {
|
|
1088
1091
|
description: "The unique identifier for a combo list",
|
|
1089
1092
|
type: "string"
|
|
@@ -1116,6 +1119,11 @@ const Ce = /* @__PURE__ */ R({
|
|
|
1116
1119
|
type: "boolean",
|
|
1117
1120
|
default: !1
|
|
1118
1121
|
},
|
|
1122
|
+
enableClear: {
|
|
1123
|
+
description: "",
|
|
1124
|
+
type: "boolean",
|
|
1125
|
+
default: !0
|
|
1126
|
+
},
|
|
1119
1127
|
editable: {
|
|
1120
1128
|
description: "",
|
|
1121
1129
|
type: "boolean",
|
|
@@ -1140,6 +1148,11 @@ const Ce = /* @__PURE__ */ R({
|
|
|
1140
1148
|
type: "string",
|
|
1141
1149
|
default: ""
|
|
1142
1150
|
},
|
|
1151
|
+
idField: {
|
|
1152
|
+
description: "",
|
|
1153
|
+
type: "string",
|
|
1154
|
+
default: "id"
|
|
1155
|
+
},
|
|
1143
1156
|
valueField: {
|
|
1144
1157
|
description: "",
|
|
1145
1158
|
type: "string",
|
|
@@ -1199,27 +1212,28 @@ const Ce = /* @__PURE__ */ R({
|
|
|
1199
1212
|
type: "sting",
|
|
1200
1213
|
default: ""
|
|
1201
1214
|
}
|
|
1202
|
-
},
|
|
1215
|
+
}, _t = [
|
|
1203
1216
|
"id",
|
|
1204
1217
|
"type"
|
|
1205
|
-
],
|
|
1218
|
+
], zt = [
|
|
1206
1219
|
"id",
|
|
1207
1220
|
"appearance",
|
|
1208
|
-
"binding"
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
$
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1221
|
+
"binding",
|
|
1222
|
+
"visible"
|
|
1223
|
+
], Xt = {
|
|
1224
|
+
$schema: Ht,
|
|
1225
|
+
$id: Gt,
|
|
1226
|
+
title: Nt,
|
|
1227
|
+
description: Ut,
|
|
1228
|
+
type: qt,
|
|
1229
|
+
properties: Wt,
|
|
1230
|
+
required: _t,
|
|
1231
|
+
ignore: zt
|
|
1218
1232
|
};
|
|
1219
|
-
function
|
|
1233
|
+
function Jt(e, t, n) {
|
|
1220
1234
|
return t;
|
|
1221
1235
|
}
|
|
1222
|
-
const
|
|
1236
|
+
const ee = {
|
|
1223
1237
|
/**
|
|
1224
1238
|
* 组件标识
|
|
1225
1239
|
*/
|
|
@@ -1380,12 +1394,12 @@ const re = {
|
|
|
1380
1394
|
*/
|
|
1381
1395
|
beforeOpen: { type: Function, default: null },
|
|
1382
1396
|
searchOption: {
|
|
1383
|
-
type:
|
|
1397
|
+
type: [Boolean, Function],
|
|
1384
1398
|
default: !1
|
|
1385
1399
|
},
|
|
1386
1400
|
// 搜索启用高亮
|
|
1387
1401
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
1388
|
-
},
|
|
1402
|
+
}, ye = _(ee, Xt, xt, Jt), Qt = {
|
|
1389
1403
|
dataSource: { type: Array, default: [] },
|
|
1390
1404
|
enableSearch: { type: Boolean, default: !1 },
|
|
1391
1405
|
idField: { type: String, default: "id" },
|
|
@@ -1401,201 +1415,204 @@ const re = {
|
|
|
1401
1415
|
onSelectionChange: { type: Function, default: () => {
|
|
1402
1416
|
} },
|
|
1403
1417
|
searchOption: {
|
|
1404
|
-
type:
|
|
1418
|
+
type: [Boolean, Function],
|
|
1405
1419
|
default: !1
|
|
1406
1420
|
},
|
|
1407
1421
|
// 搜索启用高亮
|
|
1408
1422
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
1409
|
-
},
|
|
1423
|
+
}, Yt = /* @__PURE__ */ x({
|
|
1410
1424
|
name: "FComboListContainer",
|
|
1411
|
-
props:
|
|
1425
|
+
props: Qt,
|
|
1412
1426
|
emits: ["selectionChange"],
|
|
1413
1427
|
setup(e, t) {
|
|
1414
|
-
const n =
|
|
1428
|
+
const n = b(), l = b(e.dataSource), i = b([]), a = b(e.separator), r = b(e.width), c = b(e.maxHeight), m = b(String(e.selectedValues).split(a.value)), p = B(() => e.multiSelect), u = B(() => ({
|
|
1415
1429
|
enableSelectRow: !0,
|
|
1416
1430
|
multiSelect: e.multiSelect,
|
|
1417
1431
|
multiSelectMode: "OnCheckAndClick",
|
|
1418
|
-
showCheckbox:
|
|
1432
|
+
showCheckbox: p.value,
|
|
1419
1433
|
showSelectAll: !1,
|
|
1420
1434
|
showSelection: !0
|
|
1421
1435
|
}));
|
|
1422
|
-
|
|
1423
|
-
|
|
1436
|
+
H(e.dataSource, () => {
|
|
1437
|
+
l.value = e.dataSource;
|
|
1424
1438
|
});
|
|
1425
|
-
const
|
|
1426
|
-
const
|
|
1427
|
-
return
|
|
1439
|
+
const o = B(() => e.enableSearch ? "SearchBar" : "ContentHeader"), s = B(() => {
|
|
1440
|
+
const d = {};
|
|
1441
|
+
return r.value !== void 0 && (d.width = `${r.value}px`), c.value !== void 0 && c.value > 0 && (d.maxHeight = `${c.value}px`), d;
|
|
1428
1442
|
});
|
|
1429
|
-
function
|
|
1430
|
-
|
|
1443
|
+
function g(d) {
|
|
1444
|
+
i.value = d.map((f) => Object.assign({}, f)), m.value = d.map((f) => f[e.idField]), t.emit("selectionChange", i.value);
|
|
1431
1445
|
}
|
|
1432
|
-
function
|
|
1446
|
+
function y(d) {
|
|
1433
1447
|
if (e.enableHighlightSearch)
|
|
1434
1448
|
return;
|
|
1435
|
-
let
|
|
1436
|
-
|
|
1449
|
+
let f = [];
|
|
1450
|
+
const {
|
|
1451
|
+
searchOption: v
|
|
1452
|
+
} = e;
|
|
1453
|
+
typeof v == "function" ? f = l.value.filter((S) => v(d, S)) : f = l.value.filter((S) => S[e.valueField].indexOf(d) > -1 || S[e.textField].indexOf(d) > -1), n.value.updateDataSource(f);
|
|
1437
1454
|
}
|
|
1438
|
-
return
|
|
1439
|
-
|
|
1455
|
+
return H([() => e.selectedValues], ([d]) => {
|
|
1456
|
+
m.value = d.split(a.value);
|
|
1440
1457
|
}), () => h("div", {
|
|
1441
1458
|
class: "f-combo-list-container pl-1",
|
|
1442
|
-
style:
|
|
1443
|
-
}, [h(
|
|
1459
|
+
style: s.value
|
|
1460
|
+
}, [h(He, {
|
|
1444
1461
|
ref: n,
|
|
1445
1462
|
size: "small",
|
|
1446
1463
|
itemClass: "f-combo-list-item",
|
|
1447
|
-
header:
|
|
1464
|
+
header: o.value,
|
|
1448
1465
|
headerClass: "f-combo-list-search-box",
|
|
1449
|
-
data:
|
|
1466
|
+
data: l.value,
|
|
1450
1467
|
idField: e.idField,
|
|
1451
1468
|
textField: e.textField,
|
|
1452
1469
|
titleField: e.titleField,
|
|
1453
1470
|
multiSelect: e.multiSelect,
|
|
1454
|
-
selection:
|
|
1471
|
+
selection: u.value,
|
|
1455
1472
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
1456
|
-
selectionValues:
|
|
1457
|
-
onSelectionChange:
|
|
1458
|
-
onAfterSearch:
|
|
1473
|
+
selectionValues: m.value,
|
|
1474
|
+
onSelectionChange: g,
|
|
1475
|
+
onAfterSearch: y
|
|
1459
1476
|
}, null)]);
|
|
1460
1477
|
}
|
|
1461
1478
|
});
|
|
1462
|
-
function
|
|
1463
|
-
const t =
|
|
1464
|
-
function
|
|
1465
|
-
const
|
|
1466
|
-
return
|
|
1467
|
-
const S =
|
|
1468
|
-
return S -
|
|
1479
|
+
function Zt(e) {
|
|
1480
|
+
const t = b(""), n = b(e.modelValue), l = b(e.data || []), i = b(e.editable);
|
|
1481
|
+
function a(o) {
|
|
1482
|
+
const s = String(o).split(e.separator), g = s.map((f) => [f, !0]), y = new Map(g);
|
|
1483
|
+
return l.value.filter((f) => y.has(String(f[e.valueField]))).sort((f, v) => {
|
|
1484
|
+
const S = s.indexOf(f[e.valueField]), w = s.indexOf(v[e.valueField]);
|
|
1485
|
+
return S - w;
|
|
1469
1486
|
});
|
|
1470
1487
|
}
|
|
1471
|
-
function
|
|
1472
|
-
const
|
|
1473
|
-
t.value =
|
|
1488
|
+
function r(o) {
|
|
1489
|
+
const s = a(o).map((g) => g[e.textField]).join(e.separator);
|
|
1490
|
+
t.value = i.value ? s || o : s;
|
|
1474
1491
|
}
|
|
1475
|
-
function
|
|
1476
|
-
const
|
|
1477
|
-
return
|
|
1492
|
+
function c(o) {
|
|
1493
|
+
const s = o.split(e.separator).map((y) => [y, !0]), g = new Map(s);
|
|
1494
|
+
return l.value.filter((y) => g.has(y[e.textField]));
|
|
1478
1495
|
}
|
|
1479
|
-
function
|
|
1480
|
-
const
|
|
1481
|
-
return
|
|
1496
|
+
function m(o) {
|
|
1497
|
+
const s = {};
|
|
1498
|
+
return s[e.idField] = o, s[e.textField] = o, [s];
|
|
1482
1499
|
}
|
|
1483
|
-
function
|
|
1484
|
-
let
|
|
1485
|
-
const
|
|
1486
|
-
return
|
|
1500
|
+
function p(o) {
|
|
1501
|
+
let s = c(o);
|
|
1502
|
+
const g = s && s.length > 0;
|
|
1503
|
+
return i.value && !g && (s = m(o)), s;
|
|
1487
1504
|
}
|
|
1488
|
-
function
|
|
1489
|
-
const { url:
|
|
1490
|
-
let
|
|
1491
|
-
fetch(
|
|
1492
|
-
var
|
|
1493
|
-
if (
|
|
1494
|
-
return
|
|
1495
|
-
throw new Error(
|
|
1496
|
-
}).then((
|
|
1497
|
-
|
|
1498
|
-
}).catch((
|
|
1499
|
-
console.error(
|
|
1505
|
+
function u() {
|
|
1506
|
+
const { url: o, method: s = "GET", headers: g = {}, body: y = null } = e.remote, d = s.toLowerCase() === "get" ? { method: s, headers: g } : { method: s, headers: g, body: y };
|
|
1507
|
+
let f = !1;
|
|
1508
|
+
fetch(o, d).then((v) => {
|
|
1509
|
+
var w, M;
|
|
1510
|
+
if (v.status === 200)
|
|
1511
|
+
return f = !!((M = (w = v.headers) == null ? void 0 : w.get("content-type")) != null && M.includes("application/json")), f ? v.text() : v.json();
|
|
1512
|
+
throw new Error(v.statusText);
|
|
1513
|
+
}).then((v) => {
|
|
1514
|
+
l.value = f ? JSON.parse(v) : v;
|
|
1515
|
+
}).catch((v) => {
|
|
1516
|
+
console.error(v);
|
|
1500
1517
|
});
|
|
1501
1518
|
}
|
|
1502
|
-
return e.remote &&
|
|
1503
|
-
|
|
1504
|
-
}),
|
|
1519
|
+
return e.remote && u(), H(() => e.data, () => {
|
|
1520
|
+
l.value = e.data;
|
|
1521
|
+
}), H([l], ([o]) => {
|
|
1505
1522
|
if (e.modelValue != null) {
|
|
1506
|
-
const
|
|
1507
|
-
|
|
1523
|
+
const s = o.find((g) => g[e.valueField] === e.modelValue);
|
|
1524
|
+
s && (t.value = s[e.textField]);
|
|
1508
1525
|
}
|
|
1509
|
-
}),
|
|
1510
|
-
n.value =
|
|
1511
|
-
}),
|
|
1526
|
+
}), H(() => e.modelValue, (o) => {
|
|
1527
|
+
n.value = o, r(o);
|
|
1528
|
+
}), r(e.modelValue), { dataSource: l, displayText: t, editable: i, modelValue: n, getItemsByDisplayText: c, getItemsByValue: a, getSelectedItemsByDisplayText: p };
|
|
1512
1529
|
}
|
|
1513
|
-
const
|
|
1530
|
+
const U = /* @__PURE__ */ x({
|
|
1514
1531
|
name: "FComboList",
|
|
1515
|
-
props:
|
|
1532
|
+
props: ee,
|
|
1516
1533
|
emits: ["clear", "update:modelValue", "change", "input"],
|
|
1517
1534
|
setup(e, t) {
|
|
1518
|
-
const n =
|
|
1519
|
-
dataSource:
|
|
1520
|
-
displayText:
|
|
1521
|
-
editable:
|
|
1522
|
-
modelValue:
|
|
1523
|
-
getSelectedItemsByDisplayText:
|
|
1524
|
-
} =
|
|
1525
|
-
function
|
|
1526
|
-
!
|
|
1535
|
+
const n = b(), l = b(e.disabled), i = b(e.enableClear), a = b(e.enableSearch), r = b(e.readonly), {
|
|
1536
|
+
dataSource: c,
|
|
1537
|
+
displayText: m,
|
|
1538
|
+
editable: p,
|
|
1539
|
+
modelValue: u,
|
|
1540
|
+
getSelectedItemsByDisplayText: o
|
|
1541
|
+
} = Zt(e), s = B(() => e.multiSelect), g = B(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
|
|
1542
|
+
function y() {
|
|
1543
|
+
!s.value && n.value && n.value.hidePopup();
|
|
1527
1544
|
}
|
|
1528
|
-
function
|
|
1529
|
-
|
|
1545
|
+
function d(C) {
|
|
1546
|
+
m.value = C.map((k) => k[e.textField]).join(e.separator), C.length === 1 ? u.value = C[0][e.valueField] : u.value = C.map((k) => k[e.valueField]).join(e.separator), t.emit("update:modelValue", u.value), t.emit("change", C, u.value), y();
|
|
1530
1547
|
}
|
|
1531
|
-
function
|
|
1532
|
-
|
|
1548
|
+
function f() {
|
|
1549
|
+
r.value || n.value.togglePopup();
|
|
1533
1550
|
}
|
|
1534
|
-
function
|
|
1535
|
-
|
|
1551
|
+
function v(C) {
|
|
1552
|
+
u.value = "", t.emit("update:modelValue", ""), t.emit("clear");
|
|
1536
1553
|
}
|
|
1537
|
-
function S(
|
|
1538
|
-
const
|
|
1539
|
-
|
|
1554
|
+
function S(C) {
|
|
1555
|
+
const k = o(C);
|
|
1556
|
+
d(k);
|
|
1540
1557
|
}
|
|
1541
|
-
function
|
|
1542
|
-
return
|
|
1558
|
+
function w() {
|
|
1559
|
+
return m.value;
|
|
1543
1560
|
}
|
|
1544
|
-
function
|
|
1545
|
-
t.emit("input",
|
|
1561
|
+
function M(C) {
|
|
1562
|
+
t.emit("input", C);
|
|
1546
1563
|
}
|
|
1547
1564
|
return t.expose({
|
|
1548
|
-
getDisplayText:
|
|
1549
|
-
}),
|
|
1550
|
-
|
|
1551
|
-
}), () => h(
|
|
1565
|
+
getDisplayText: w
|
|
1566
|
+
}), H([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([C, k, O, F, L]) => {
|
|
1567
|
+
l.value = C, p.value = k, i.value = O, a.value = F, r.value = L;
|
|
1568
|
+
}), () => h(Ge, {
|
|
1552
1569
|
ref: n,
|
|
1553
1570
|
id: e.id,
|
|
1554
|
-
disable:
|
|
1555
|
-
readonly:
|
|
1571
|
+
disable: l.value,
|
|
1572
|
+
readonly: r.value,
|
|
1556
1573
|
forcePlaceholder: e.forcePlaceholder,
|
|
1557
|
-
editable:
|
|
1574
|
+
editable: p.value,
|
|
1558
1575
|
buttonContent: e.dropDownIcon,
|
|
1559
1576
|
placeholder: e.placeholder,
|
|
1560
|
-
enableClear:
|
|
1577
|
+
enableClear: i.value,
|
|
1561
1578
|
maxLength: e.maxLength,
|
|
1562
1579
|
tabIndex: e.tabIndex,
|
|
1563
1580
|
enableTitle: e.enableTitle,
|
|
1564
1581
|
multiSelect: e.multiSelect,
|
|
1565
1582
|
inputType: e.multiSelect ? e.viewType : "text",
|
|
1566
|
-
modelValue:
|
|
1567
|
-
"onUpdate:modelValue": (
|
|
1583
|
+
modelValue: m.value,
|
|
1584
|
+
"onUpdate:modelValue": (C) => m.value = C,
|
|
1568
1585
|
focusOnCreated: e.focusOnCreated,
|
|
1569
1586
|
selectOnCreated: e.selectOnCreated,
|
|
1570
|
-
onClear:
|
|
1571
|
-
onClick:
|
|
1587
|
+
onClear: v,
|
|
1588
|
+
onClick: f,
|
|
1572
1589
|
onChange: S,
|
|
1573
|
-
onInput:
|
|
1590
|
+
onInput: M,
|
|
1574
1591
|
beforeOpen: e.beforeOpen
|
|
1575
1592
|
}, {
|
|
1576
|
-
default: () => [h(
|
|
1593
|
+
default: () => [h(Yt, {
|
|
1577
1594
|
idField: e.idField,
|
|
1578
1595
|
valueField: e.valueField,
|
|
1579
1596
|
textField: e.textField,
|
|
1580
1597
|
titleField: e.titleField,
|
|
1581
|
-
dataSource:
|
|
1582
|
-
selectedValues:
|
|
1598
|
+
dataSource: c.value,
|
|
1599
|
+
selectedValues: u.value,
|
|
1583
1600
|
multiSelect: e.multiSelect,
|
|
1584
|
-
enableSearch:
|
|
1601
|
+
enableSearch: a.value,
|
|
1585
1602
|
maxHeight: e.maxHeight,
|
|
1586
1603
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
1587
|
-
width: e.fitEditor ?
|
|
1588
|
-
onSelectionChange:
|
|
1604
|
+
width: e.fitEditor ? g.value : void 0,
|
|
1605
|
+
onSelectionChange: d
|
|
1589
1606
|
}, null)]
|
|
1590
1607
|
});
|
|
1591
1608
|
}
|
|
1592
|
-
}),
|
|
1593
|
-
["appearance",
|
|
1609
|
+
}), Kt = /* @__PURE__ */ new Map([
|
|
1610
|
+
["appearance", Ne]
|
|
1594
1611
|
]);
|
|
1595
|
-
function
|
|
1612
|
+
function en(e, t, n) {
|
|
1596
1613
|
return t;
|
|
1597
1614
|
}
|
|
1598
|
-
const
|
|
1615
|
+
const tn = "https://json-schema.org/draft/2020-12/schema", nn = "https://farris-design.gitee.io/button-edit.schema.json", on = "button-edit", ln = "A Farris Input Component", an = "object", rn = {
|
|
1599
1616
|
id: {
|
|
1600
1617
|
description: "The unique identifier for a Input Group",
|
|
1601
1618
|
type: "string"
|
|
@@ -1779,18 +1796,18 @@ const mn = "https://json-schema.org/draft/2020-12/schema", yn = "https://farris-
|
|
|
1779
1796
|
type: "string",
|
|
1780
1797
|
default: ""
|
|
1781
1798
|
}
|
|
1782
|
-
},
|
|
1799
|
+
}, sn = [
|
|
1783
1800
|
"id",
|
|
1784
1801
|
"type"
|
|
1785
|
-
],
|
|
1786
|
-
$schema:
|
|
1787
|
-
$id:
|
|
1788
|
-
title:
|
|
1789
|
-
description:
|
|
1790
|
-
type:
|
|
1791
|
-
properties:
|
|
1792
|
-
required:
|
|
1793
|
-
},
|
|
1802
|
+
], cn = {
|
|
1803
|
+
$schema: tn,
|
|
1804
|
+
$id: nn,
|
|
1805
|
+
title: on,
|
|
1806
|
+
description: ln,
|
|
1807
|
+
type: an,
|
|
1808
|
+
properties: rn,
|
|
1809
|
+
required: sn
|
|
1810
|
+
}, un = "buttonEdit", dn = "A Farris Component", pn = "object", fn = {
|
|
1794
1811
|
basic: {
|
|
1795
1812
|
description: "Basic Infomation",
|
|
1796
1813
|
title: "基本信息",
|
|
@@ -1861,7 +1878,7 @@ const mn = "https://json-schema.org/draft/2020-12/schema", yn = "https://farris-
|
|
|
1861
1878
|
},
|
|
1862
1879
|
{
|
|
1863
1880
|
value: "center",
|
|
1864
|
-
name: "
|
|
1881
|
+
name: "居中"
|
|
1865
1882
|
},
|
|
1866
1883
|
{
|
|
1867
1884
|
value: "right",
|
|
@@ -1872,12 +1889,12 @@ const mn = "https://json-schema.org/draft/2020-12/schema", yn = "https://farris-
|
|
|
1872
1889
|
}
|
|
1873
1890
|
}
|
|
1874
1891
|
}
|
|
1875
|
-
},
|
|
1876
|
-
title:
|
|
1877
|
-
description:
|
|
1878
|
-
type:
|
|
1879
|
-
categories:
|
|
1880
|
-
},
|
|
1892
|
+
}, mn = {
|
|
1893
|
+
title: un,
|
|
1894
|
+
description: dn,
|
|
1895
|
+
type: pn,
|
|
1896
|
+
categories: fn
|
|
1897
|
+
}, ge = {
|
|
1881
1898
|
/**
|
|
1882
1899
|
* 组件标识
|
|
1883
1900
|
*/
|
|
@@ -1986,295 +2003,262 @@ const mn = "https://json-schema.org/draft/2020-12/schema", yn = "https://farris-
|
|
|
1986
2003
|
/** 更新方式 blur | change */
|
|
1987
2004
|
updateOn: { type: String, default: "change" }
|
|
1988
2005
|
};
|
|
1989
|
-
|
|
1990
|
-
const
|
|
2006
|
+
_(ge, cn, Kt, en, mn);
|
|
2007
|
+
const yn = {
|
|
1991
2008
|
popupContentPosition: { type: Object, default: { left: 0, top: 0 } },
|
|
1992
2009
|
host: { type: Object },
|
|
1993
2010
|
backgroundColor: { type: String, default: "" }
|
|
1994
|
-
},
|
|
2011
|
+
}, gn = /* @__PURE__ */ x({
|
|
1995
2012
|
name: "FOverlay",
|
|
1996
|
-
props:
|
|
2013
|
+
props: yn,
|
|
1997
2014
|
emits: ["click"],
|
|
1998
2015
|
setup(e, t) {
|
|
1999
|
-
const n =
|
|
2016
|
+
const n = b(e.popupContentPosition), l = b(e.host), i = B(() => ({
|
|
2000
2017
|
backgroundColor: e.backgroundColor || "",
|
|
2001
2018
|
pointerEvents: "auto"
|
|
2002
2019
|
}));
|
|
2003
|
-
function
|
|
2004
|
-
t.emit("click"),
|
|
2020
|
+
function a(c) {
|
|
2021
|
+
t.emit("click"), c.preventDefault(), c.stopPropagation();
|
|
2005
2022
|
}
|
|
2006
|
-
|
|
2007
|
-
const
|
|
2008
|
-
if (
|
|
2009
|
-
const
|
|
2010
|
-
left:
|
|
2011
|
-
top:
|
|
2012
|
-
height:
|
|
2013
|
-
} =
|
|
2023
|
+
B(() => {
|
|
2024
|
+
const c = l.value;
|
|
2025
|
+
if (c) {
|
|
2026
|
+
const m = c.getBoundingClientRect(), {
|
|
2027
|
+
left: p,
|
|
2028
|
+
top: u,
|
|
2029
|
+
height: o
|
|
2030
|
+
} = m;
|
|
2014
2031
|
return {
|
|
2015
|
-
left:
|
|
2016
|
-
top:
|
|
2032
|
+
left: p,
|
|
2033
|
+
top: u + o
|
|
2017
2034
|
};
|
|
2018
2035
|
}
|
|
2019
2036
|
return n.value;
|
|
2020
2037
|
});
|
|
2021
|
-
const
|
|
2038
|
+
const r = B(() => ({
|
|
2022
2039
|
// position: 'relative',
|
|
2023
2040
|
// left: `${position.value.left}px`,
|
|
2024
2041
|
// top: `${position.value.top}px`
|
|
2025
2042
|
}));
|
|
2026
|
-
return () => h(
|
|
2043
|
+
return () => h(Fe, {
|
|
2027
2044
|
to: "body"
|
|
2028
2045
|
}, {
|
|
2029
2046
|
default: () => {
|
|
2030
|
-
var
|
|
2047
|
+
var c, m;
|
|
2031
2048
|
return [h("div", {
|
|
2032
2049
|
class: "overlay-container",
|
|
2033
|
-
onClick: (
|
|
2034
|
-
style:
|
|
2050
|
+
onClick: (p) => a(p),
|
|
2051
|
+
style: i.value
|
|
2035
2052
|
}, [h("div", {
|
|
2036
|
-
style:
|
|
2037
|
-
}, [(
|
|
2053
|
+
style: r.value
|
|
2054
|
+
}, [(m = (c = t.slots).default) == null ? void 0 : m.call(c)])])];
|
|
2038
2055
|
}
|
|
2039
2056
|
});
|
|
2040
2057
|
}
|
|
2041
2058
|
});
|
|
2042
|
-
function
|
|
2059
|
+
function hn(e) {
|
|
2043
2060
|
if (e.content && e.content.render)
|
|
2044
2061
|
return e.content.render;
|
|
2045
2062
|
if (e.render && typeof e.render == "function")
|
|
2046
2063
|
return e.render;
|
|
2047
2064
|
}
|
|
2048
|
-
function
|
|
2065
|
+
function vn(e) {
|
|
2049
2066
|
const t = document.createElement("div");
|
|
2050
2067
|
t.style.display = "contents";
|
|
2051
2068
|
let n;
|
|
2052
|
-
const
|
|
2053
|
-
}),
|
|
2054
|
-
|
|
2069
|
+
const l = e.onClickCallback || (() => {
|
|
2070
|
+
}), i = () => {
|
|
2071
|
+
l(), n && n.unmount();
|
|
2055
2072
|
};
|
|
2056
|
-
return n =
|
|
2073
|
+
return n = ke({
|
|
2057
2074
|
setup() {
|
|
2058
|
-
|
|
2075
|
+
Ie(() => {
|
|
2059
2076
|
document.body.removeChild(t);
|
|
2060
2077
|
});
|
|
2061
|
-
const
|
|
2062
|
-
return () => h(
|
|
2078
|
+
const a = hn(e);
|
|
2079
|
+
return () => h(gn, {
|
|
2063
2080
|
"popup-content-position": e.popupPosition,
|
|
2064
2081
|
host: e.host,
|
|
2065
|
-
onClick:
|
|
2082
|
+
onClick: i,
|
|
2066
2083
|
backgroundColor: e.backgroundColor
|
|
2067
2084
|
}, {
|
|
2068
|
-
default: () => [
|
|
2085
|
+
default: () => [a && a()]
|
|
2069
2086
|
});
|
|
2070
2087
|
}
|
|
2071
2088
|
}), document.body.appendChild(t), n.mount(t), n;
|
|
2072
2089
|
}
|
|
2073
|
-
class
|
|
2090
|
+
class bn {
|
|
2074
2091
|
static show(t) {
|
|
2075
|
-
return
|
|
2092
|
+
return vn(t);
|
|
2076
2093
|
}
|
|
2077
2094
|
}
|
|
2078
|
-
const
|
|
2079
|
-
function
|
|
2095
|
+
const Cn = Symbol("FModalService");
|
|
2096
|
+
function he(e, t) {
|
|
2080
2097
|
function n() {
|
|
2081
|
-
const
|
|
2082
|
-
let
|
|
2083
|
-
if (
|
|
2084
|
-
const
|
|
2085
|
-
if (typeof
|
|
2086
|
-
return
|
|
2087
|
-
typeof
|
|
2098
|
+
const l = e.beforeOpen || e.beforeClickButton || null;
|
|
2099
|
+
let i = Promise.resolve(!0);
|
|
2100
|
+
if (l) {
|
|
2101
|
+
const a = l(t.value);
|
|
2102
|
+
if (typeof a > "u")
|
|
2103
|
+
return i;
|
|
2104
|
+
typeof a == "boolean" ? i = Promise.resolve(a) : i = a;
|
|
2088
2105
|
}
|
|
2089
|
-
return
|
|
2106
|
+
return i;
|
|
2090
2107
|
}
|
|
2091
2108
|
return { judgeCanOpen: n };
|
|
2092
2109
|
}
|
|
2093
|
-
function
|
|
2094
|
-
const
|
|
2110
|
+
function Sn(e, t, n, l, i) {
|
|
2111
|
+
const a = b(e.buttonBehavior), r = b(e.popupOnInput), c = B(() => ({
|
|
2095
2112
|
"input-group-append": !0,
|
|
2096
2113
|
"append-force-show": e.showButtonWhenDisabled && (e.readonly || e.disable)
|
|
2097
|
-
})), { judgeCanOpen:
|
|
2098
|
-
async function d
|
|
2099
|
-
if (await
|
|
2100
|
-
const
|
|
2101
|
-
if (
|
|
2102
|
-
const
|
|
2103
|
-
...
|
|
2114
|
+
})), { judgeCanOpen: m } = he(e, i), p = B(() => e.showButtonWhenDisabled || (!e.editable || !e.readonly) && !e.disable), u = N(Cn, null), o = b();
|
|
2115
|
+
async function s(d) {
|
|
2116
|
+
if (await m() && p.value) {
|
|
2117
|
+
const f = !!t.slots.default;
|
|
2118
|
+
if (a.value === "Modal") {
|
|
2119
|
+
const v = e.modalOptions, S = u == null ? void 0 : u.open({
|
|
2120
|
+
...v,
|
|
2104
2121
|
render: () => t.slots.default && t.slots.default()
|
|
2105
2122
|
});
|
|
2106
|
-
|
|
2123
|
+
o.value = S == null ? void 0 : S.modalRef;
|
|
2107
2124
|
}
|
|
2108
|
-
|
|
2125
|
+
a.value === "Overlay" && bn.show({
|
|
2109
2126
|
// host: buttonEditRef.value,
|
|
2110
2127
|
host: document.body,
|
|
2111
2128
|
backgroundColor: "rgba(0,0,0,.15)",
|
|
2112
2129
|
render: () => t.slots.default && t.slots.default()
|
|
2113
|
-
}),
|
|
2130
|
+
}), f && a.value === "Popup" && l.togglePopup(!0), f && r.value && l.hidePopup(), t.emit("clickButton", { origin: d, value: e.modelValue });
|
|
2114
2131
|
}
|
|
2115
2132
|
}
|
|
2116
|
-
function
|
|
2117
|
-
t.emit("mouseEnterIcon",
|
|
2133
|
+
function g(d) {
|
|
2134
|
+
t.emit("mouseEnterIcon", d);
|
|
2118
2135
|
}
|
|
2119
|
-
function
|
|
2120
|
-
t.emit("mouseLeaveIcon",
|
|
2136
|
+
function y(d) {
|
|
2137
|
+
t.emit("mouseLeaveIcon", d);
|
|
2121
2138
|
}
|
|
2122
2139
|
return {
|
|
2123
|
-
buttonGroupClass:
|
|
2124
|
-
onClickButton:
|
|
2125
|
-
onMouseEnterButton:
|
|
2126
|
-
onMouseLeaveButton:
|
|
2127
|
-
modalRef:
|
|
2140
|
+
buttonGroupClass: c,
|
|
2141
|
+
onClickButton: s,
|
|
2142
|
+
onMouseEnterButton: g,
|
|
2143
|
+
onMouseLeaveButton: y,
|
|
2144
|
+
modalRef: o
|
|
2128
2145
|
};
|
|
2129
2146
|
}
|
|
2130
|
-
function
|
|
2131
|
-
const
|
|
2132
|
-
function
|
|
2133
|
-
const
|
|
2134
|
-
|
|
2147
|
+
function wn(e, t, n, l) {
|
|
2148
|
+
const i = b(), a = b(!1), { judgeCanOpen: r } = he(e, l);
|
|
2149
|
+
function c() {
|
|
2150
|
+
const o = i.value;
|
|
2151
|
+
o && o.show(n.value);
|
|
2135
2152
|
}
|
|
2136
|
-
async function
|
|
2153
|
+
async function m(o = !1) {
|
|
2137
2154
|
if (!!t.slots.default) {
|
|
2138
|
-
if (!
|
|
2155
|
+
if (!o && !a.value && !await r())
|
|
2139
2156
|
return;
|
|
2140
|
-
|
|
2157
|
+
a.value = !a.value, await te(), c();
|
|
2141
2158
|
}
|
|
2142
2159
|
}
|
|
2143
|
-
async function
|
|
2160
|
+
async function p(o = !1) {
|
|
2144
2161
|
if (!!t.slots.default) {
|
|
2145
|
-
if (!
|
|
2162
|
+
if (!o && !await r())
|
|
2146
2163
|
return;
|
|
2147
|
-
|
|
2164
|
+
a.value = !0, await te(), c();
|
|
2148
2165
|
}
|
|
2149
2166
|
}
|
|
2150
|
-
function
|
|
2151
|
-
|
|
2167
|
+
function u() {
|
|
2168
|
+
a.value = !1;
|
|
2152
2169
|
}
|
|
2153
|
-
return { hidePopup:
|
|
2170
|
+
return { hidePopup: u, popup: p, shouldPopupContent: a, togglePopup: m, popoverRef: i };
|
|
2154
2171
|
}
|
|
2155
|
-
function
|
|
2172
|
+
function Fn(e, t, n) {
|
|
2156
2173
|
const {
|
|
2157
|
-
buttonGroupClass:
|
|
2158
|
-
} = n,
|
|
2174
|
+
buttonGroupClass: l
|
|
2175
|
+
} = n, i = b();
|
|
2159
2176
|
return {
|
|
2160
2177
|
renderButtonGroup: () => h("div", {
|
|
2161
2178
|
id: `${e.id}-button-group`,
|
|
2162
|
-
class:
|
|
2179
|
+
class: l.value
|
|
2163
2180
|
}, [t.slots.buttonContent ? h("span", {
|
|
2164
2181
|
class: "input-group-text input-group-append-button"
|
|
2165
2182
|
}, [t.slots.buttonContent()]) : e.buttonContent ? h("span", {
|
|
2166
2183
|
class: "input-group-text input-group-append-button",
|
|
2167
2184
|
innerHTML: e.buttonContent,
|
|
2168
|
-
ref:
|
|
2185
|
+
ref: i
|
|
2169
2186
|
}, null) : null]),
|
|
2170
|
-
buttonHandleElement:
|
|
2187
|
+
buttonHandleElement: i
|
|
2171
2188
|
};
|
|
2172
2189
|
}
|
|
2173
|
-
const
|
|
2190
|
+
const kn = /* @__PURE__ */ x({
|
|
2174
2191
|
name: "FButtonEdit",
|
|
2175
|
-
props:
|
|
2192
|
+
props: ge,
|
|
2176
2193
|
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue"],
|
|
2177
2194
|
setup(e, t) {
|
|
2178
|
-
const n =
|
|
2195
|
+
const n = b(), l = N("design-item-context"), i = se(n, l), a = b(e.customClass), r = b(e.modelValue), c = wn(e, t, n, r), m = Sn(e, t, n, c, r), p = b(), u = B(() => ({
|
|
2179
2196
|
"f-cmp-inputgroup": !0,
|
|
2180
2197
|
"input-group": !0,
|
|
2181
2198
|
"f-state-disable": !0,
|
|
2182
2199
|
"f-state-editable": !1,
|
|
2183
2200
|
"f-state-readonly": !0
|
|
2184
2201
|
}));
|
|
2185
|
-
|
|
2186
|
-
n.value.componentInstance =
|
|
2187
|
-
}), t.expose(
|
|
2188
|
-
const
|
|
2189
|
-
const
|
|
2202
|
+
J(() => {
|
|
2203
|
+
n.value.componentInstance = i;
|
|
2204
|
+
}), t.expose(i.value);
|
|
2205
|
+
const o = B(() => {
|
|
2206
|
+
const g = {
|
|
2190
2207
|
"f-button-edit": !0,
|
|
2191
2208
|
"f-cmp-inputgroup": !0,
|
|
2192
2209
|
"f-button-edit-nowrap": !e.wrapText
|
|
2193
2210
|
};
|
|
2194
|
-
return
|
|
2211
|
+
return a.value && a.value.split(" ").reduce((y, d) => (y[d] = !0, y), g), g;
|
|
2195
2212
|
}), {
|
|
2196
|
-
renderButtonGroup:
|
|
2197
|
-
} =
|
|
2198
|
-
return () => h("div",
|
|
2213
|
+
renderButtonGroup: s
|
|
2214
|
+
} = Fn(e, t, m);
|
|
2215
|
+
return () => h("div", Me(t.attrs, {
|
|
2199
2216
|
ref: n,
|
|
2200
|
-
class:
|
|
2217
|
+
class: o.value,
|
|
2201
2218
|
id: e.id
|
|
2202
2219
|
}), [h("div", {
|
|
2203
|
-
class:
|
|
2220
|
+
class: u.value
|
|
2204
2221
|
}, [h("input", {
|
|
2205
|
-
ref:
|
|
2222
|
+
ref: p,
|
|
2206
2223
|
class: "form-control",
|
|
2207
2224
|
readonly: !0,
|
|
2208
2225
|
placeholder: e.placeholder
|
|
2209
|
-
}, null),
|
|
2226
|
+
}, null), s()])]);
|
|
2210
2227
|
}
|
|
2211
2228
|
});
|
|
2212
|
-
|
|
2213
|
-
e.schema;
|
|
2214
|
-
const n = v(!0), o = v(!0);
|
|
2215
|
-
function a(i) {
|
|
2216
|
-
return !1;
|
|
2217
|
-
}
|
|
2218
|
-
function r() {
|
|
2219
|
-
return !1;
|
|
2220
|
-
}
|
|
2221
|
-
function s() {
|
|
2222
|
-
return !1;
|
|
2223
|
-
}
|
|
2224
|
-
function f() {
|
|
2225
|
-
return !0;
|
|
2226
|
-
}
|
|
2227
|
-
function c(i) {
|
|
2228
|
-
}
|
|
2229
|
-
function l() {
|
|
2230
|
-
}
|
|
2231
|
-
function g(i) {
|
|
2232
|
-
return null;
|
|
2233
|
-
}
|
|
2234
|
-
return {
|
|
2235
|
-
canAccepts: a,
|
|
2236
|
-
checkCanDeleteComponent: r,
|
|
2237
|
-
checkCanMoveComponent: s,
|
|
2238
|
-
hideNestedPaddingInDesginerView: f,
|
|
2239
|
-
onAcceptMovedChildElement: c,
|
|
2240
|
-
resolveComponentContext: l,
|
|
2241
|
-
triggerBelongedComponentToMoveWhenMoved: n,
|
|
2242
|
-
triggerBelongedComponentToDeleteWhenDeleted: o,
|
|
2243
|
-
getPropsConfig: g
|
|
2244
|
-
};
|
|
2245
|
-
}
|
|
2246
|
-
class xn {
|
|
2229
|
+
class In {
|
|
2247
2230
|
constructor(t, n) {
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2231
|
+
T(this, "componentId");
|
|
2232
|
+
T(this, "viewModelId");
|
|
2233
|
+
T(this, "eventsEditorUtils");
|
|
2234
|
+
T(this, "formSchemaUtils");
|
|
2235
|
+
T(this, "formMetadataConverter");
|
|
2236
|
+
T(this, "designViewModelUtils");
|
|
2237
|
+
T(this, "designViewModelField");
|
|
2238
|
+
T(this, "controlCreatorUtils");
|
|
2239
|
+
T(this, "designerHostService");
|
|
2240
|
+
T(this, "schemaService", null);
|
|
2241
|
+
T(this, "metadataService", null);
|
|
2242
|
+
T(this, "propertyConfig", {
|
|
2260
2243
|
type: "object",
|
|
2261
2244
|
categories: {}
|
|
2262
2245
|
});
|
|
2263
|
-
var
|
|
2264
|
-
this.componentId = t, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((
|
|
2246
|
+
var l;
|
|
2247
|
+
this.componentId = t, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((l = this.formSchemaUtils) == null ? void 0 : l.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
|
|
2265
2248
|
}
|
|
2266
2249
|
getTableInfo() {
|
|
2267
2250
|
var t;
|
|
2268
2251
|
return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
|
|
2269
2252
|
}
|
|
2270
2253
|
setDesignViewModelField(t) {
|
|
2254
|
+
var l;
|
|
2271
2255
|
const n = t.binding && t.binding.type === "Form" && t.binding.field;
|
|
2272
2256
|
if (n) {
|
|
2273
2257
|
if (!this.designViewModelField) {
|
|
2274
|
-
const
|
|
2275
|
-
this.designViewModelField =
|
|
2258
|
+
const i = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
2259
|
+
this.designViewModelField = i.fields.find((a) => a.id === n);
|
|
2276
2260
|
}
|
|
2277
|
-
t.updateOn = this.designViewModelField.updateOn;
|
|
2261
|
+
t.updateOn = (l = this.designViewModelField) == null ? void 0 : l.updateOn;
|
|
2278
2262
|
}
|
|
2279
2263
|
}
|
|
2280
2264
|
changeFieldEditorType(t, n) {
|
|
@@ -2298,7 +2282,7 @@ class xn {
|
|
|
2298
2282
|
type: "combo-list",
|
|
2299
2283
|
textField: "name",
|
|
2300
2284
|
valueField: "value",
|
|
2301
|
-
data: [{ value: t.type, name:
|
|
2285
|
+
data: [{ value: t.type, name: I[t.type].name }]
|
|
2302
2286
|
}
|
|
2303
2287
|
}
|
|
2304
2288
|
}
|
|
@@ -2331,19 +2315,19 @@ class xn {
|
|
|
2331
2315
|
* @returns
|
|
2332
2316
|
*/
|
|
2333
2317
|
updateElementByParentContainer(t, n) {
|
|
2334
|
-
const
|
|
2335
|
-
if (!
|
|
2318
|
+
const l = n && n.parent && n.parent.schema;
|
|
2319
|
+
if (!l)
|
|
2336
2320
|
return;
|
|
2337
|
-
const
|
|
2338
|
-
|
|
2321
|
+
const i = l.contents.findIndex((r) => r.id === t), a = re(l.contents[i]);
|
|
2322
|
+
l.contents.splice(i, 1), l.contents.splice(i, 0, a);
|
|
2339
2323
|
}
|
|
2340
2324
|
}
|
|
2341
|
-
const
|
|
2325
|
+
const G = class G {
|
|
2342
2326
|
/**
|
|
2343
2327
|
* 根据绑定字段类型获取可用的输入类控件
|
|
2344
2328
|
*/
|
|
2345
2329
|
static getEditorTypesByMDataType(t) {
|
|
2346
|
-
const n =
|
|
2330
|
+
const n = G.fieldControlTypeMapping[t];
|
|
2347
2331
|
return n || [{ key: "", value: "" }];
|
|
2348
2332
|
}
|
|
2349
2333
|
/**
|
|
@@ -2351,9 +2335,9 @@ const U = class U {
|
|
|
2351
2335
|
*/
|
|
2352
2336
|
static getAllInputTypes() {
|
|
2353
2337
|
const t = [];
|
|
2354
|
-
for (
|
|
2355
|
-
|
|
2356
|
-
t.find((
|
|
2338
|
+
for (const n in G.fieldControlTypeMapping)
|
|
2339
|
+
G.fieldControlTypeMapping[n].forEach((l) => {
|
|
2340
|
+
t.find((i) => i.key === l.key && i.value === l.value) || t.push({ key: l.key, value: l.value });
|
|
2357
2341
|
});
|
|
2358
2342
|
return t;
|
|
2359
2343
|
}
|
|
@@ -2361,69 +2345,174 @@ const U = class U {
|
|
|
2361
2345
|
/**
|
|
2362
2346
|
* <字段类型,可配置的控件类型列表>的映射
|
|
2363
2347
|
*/
|
|
2364
|
-
|
|
2348
|
+
T(G, "fieldControlTypeMapping", {
|
|
2365
2349
|
String: [
|
|
2366
|
-
{ key:
|
|
2367
|
-
{ key:
|
|
2368
|
-
{ key:
|
|
2369
|
-
{ key:
|
|
2370
|
-
{ key:
|
|
2371
|
-
{ key:
|
|
2372
|
-
{ key:
|
|
2350
|
+
{ key: I["input-group"].type, value: I["input-group"].name },
|
|
2351
|
+
{ key: I.lookup.type, value: I.lookup.name },
|
|
2352
|
+
{ key: I["date-picker"].type, value: I["date-picker"].name },
|
|
2353
|
+
{ key: I["check-box"].type, value: I["check-box"].name },
|
|
2354
|
+
{ key: I["check-group"].type, value: I["check-group"].name },
|
|
2355
|
+
{ key: I["radio-group"].type, value: I["radio-group"].name },
|
|
2356
|
+
{ key: I["combo-list"].type, value: I["combo-list"].name },
|
|
2357
|
+
{ key: I.textarea.type, value: I.textarea.name }
|
|
2373
2358
|
],
|
|
2374
2359
|
Text: [
|
|
2375
|
-
{ key:
|
|
2376
|
-
{ key:
|
|
2360
|
+
{ key: I.textarea.type, value: I.textarea.name },
|
|
2361
|
+
{ key: I.lookup.type, value: I.lookup.name }
|
|
2377
2362
|
],
|
|
2378
2363
|
Decimal: [
|
|
2379
|
-
{ key:
|
|
2364
|
+
{ key: I["number-spinner"].type, value: I["number-spinner"].name }
|
|
2380
2365
|
],
|
|
2381
2366
|
Integer: [
|
|
2382
|
-
{ key:
|
|
2367
|
+
{ key: I["number-spinner"].type, value: I["number-spinner"].name }
|
|
2383
2368
|
],
|
|
2384
2369
|
Number: [
|
|
2385
|
-
{ key:
|
|
2370
|
+
{ key: I["number-spinner"].type, value: I["number-spinner"].name }
|
|
2386
2371
|
],
|
|
2387
2372
|
BigNumber: [
|
|
2388
|
-
{ key:
|
|
2373
|
+
{ key: I["number-spinner"].type, value: I["number-spinner"].name }
|
|
2389
2374
|
],
|
|
2390
2375
|
Date: [
|
|
2391
|
-
{ key:
|
|
2376
|
+
{ key: I["date-picker"].type, value: I["date-picker"].name }
|
|
2392
2377
|
],
|
|
2393
2378
|
DateTime: [
|
|
2394
|
-
{ key:
|
|
2379
|
+
{ key: I["date-picker"].type, value: I["date-picker"].name }
|
|
2395
2380
|
],
|
|
2396
2381
|
Boolean: [
|
|
2397
|
-
{ key:
|
|
2398
|
-
{ key:
|
|
2382
|
+
{ key: I.switch.type, value: I.switch.name },
|
|
2383
|
+
{ key: I["check-box"].type, value: I["check-box"].name }
|
|
2399
2384
|
],
|
|
2400
2385
|
Enum: [
|
|
2401
|
-
{ key:
|
|
2402
|
-
{ key:
|
|
2386
|
+
{ key: I["combo-list"].type, value: I["combo-list"].name },
|
|
2387
|
+
{ key: I["radio-group"].type, value: I["radio-group"].name }
|
|
2403
2388
|
],
|
|
2404
2389
|
Object: [
|
|
2405
|
-
{ key:
|
|
2406
|
-
{ key:
|
|
2407
|
-
{ key:
|
|
2390
|
+
{ key: I.lookup.type, value: I.lookup.name },
|
|
2391
|
+
{ key: I["combo-list"].type, value: I["combo-list"].name },
|
|
2392
|
+
{ key: I["radio-group"].type, value: I["radio-group"].name }
|
|
2408
2393
|
]
|
|
2409
2394
|
});
|
|
2410
|
-
let
|
|
2411
|
-
const
|
|
2412
|
-
class
|
|
2413
|
-
constructor(
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
this
|
|
2425
|
-
|
|
2395
|
+
let q = G;
|
|
2396
|
+
const Mn = b(0);
|
|
2397
|
+
class Bn {
|
|
2398
|
+
constructor() {
|
|
2399
|
+
/** 控件标题 */
|
|
2400
|
+
T(this, "label", "");
|
|
2401
|
+
/** 控件id */
|
|
2402
|
+
T(this, "id", "");
|
|
2403
|
+
/** 每个控件占用的栅格数 */
|
|
2404
|
+
T(this, "columnInSM", 12);
|
|
2405
|
+
T(this, "columnInMD", 6);
|
|
2406
|
+
T(this, "columnInLG", 3);
|
|
2407
|
+
T(this, "columnInEL", 2);
|
|
2408
|
+
/** 每个控件占用的列数 */
|
|
2409
|
+
T(this, "displayWidthInSM", 1);
|
|
2410
|
+
T(this, "displayWidthInMD", 1);
|
|
2411
|
+
T(this, "displayWidthInLG", 1);
|
|
2412
|
+
T(this, "displayWidthInEL", 1);
|
|
2413
|
+
/** 编辑器内部默认显示的屏幕大小-----可以去掉 */
|
|
2414
|
+
T(this, "displayColumnCountAtBreakPoint", "md");
|
|
2415
|
+
/** 控件所在行,传0即可-----编辑器内部使用 */
|
|
2416
|
+
T(this, "tagRow", 0);
|
|
2417
|
+
/** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
|
|
2418
|
+
T(this, "showTopBorder", 0);
|
|
2419
|
+
/** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
|
|
2420
|
+
T(this, "group", 1);
|
|
2421
|
+
/** 控件是否符合标准的class配置(设计器用的) */
|
|
2422
|
+
T(this, "isSupportedClass", !0);
|
|
2423
|
+
/** 控件所在分组id(设计器用的) */
|
|
2424
|
+
T(this, "fieldSetId", "");
|
|
2425
|
+
}
|
|
2426
|
+
}
|
|
2427
|
+
function Vn(e) {
|
|
2428
|
+
let t, n;
|
|
2429
|
+
const l = /* @__PURE__ */ new Map();
|
|
2430
|
+
let i = [];
|
|
2431
|
+
function a(u, o) {
|
|
2432
|
+
const g = u.split(" ").filter((S) => S.startsWith("col-"));
|
|
2433
|
+
if (g.length === 0) {
|
|
2434
|
+
o.isSupportedClass = !1;
|
|
2435
|
+
return;
|
|
2436
|
+
}
|
|
2437
|
+
let y = g.find((S) => /^col-([1-9]|10|11|12)$/.test(S)), d = g.find((S) => /^col-md-([1-9]|10|11|12)$/.test(S)), f = g.find((S) => /^col-xl-([1-9]|10|11|12)$/.test(S)), v = g.find((S) => /^col-el-([1-9]|10|11|12)$/.test(S));
|
|
2438
|
+
y = y || "col-12", o.columnInSM = parseInt(y.replace("col-", ""), 10), o.displayWidthInSM = o.columnInSM / 12, o.displayWidthInSM !== 1 && (o.isSupportedClass = !1), d = d || "col-md-" + o.columnInSM, o.columnInMD = parseInt(d.replace("col-md-", ""), 10), o.displayWidthInMD = o.columnInMD / 6, [1, 2].includes(o.displayWidthInMD) || (o.isSupportedClass = !1), f = f || "col-xl-" + o.columnInMD, o.columnInLG = parseInt(f.replace("col-xl-", ""), 10), o.displayWidthInLG = o.columnInLG / 3, [1, 2, 3, 4].includes(o.displayWidthInLG) || (o.isSupportedClass = !1), v = v || "col-el-" + o.columnInLG, o.columnInEL = parseInt(v.replace("col-el-", ""), 10), o.displayWidthInEL = o.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(o.displayWidthInEL) || (o.isSupportedClass = !1);
|
|
2439
|
+
}
|
|
2440
|
+
function r(u, o, s, g = !1) {
|
|
2441
|
+
let y = !1;
|
|
2442
|
+
u.contents.forEach((d) => {
|
|
2443
|
+
if (d.type === "fieldset") {
|
|
2444
|
+
s += 1, r(d, o, s, !0), y = !0;
|
|
2445
|
+
return;
|
|
2446
|
+
}
|
|
2447
|
+
y && (s += 1, y = !1);
|
|
2448
|
+
const f = d.appearance && d.appearance.class, v = new Bn();
|
|
2449
|
+
f ? a(f, v) : v.isSupportedClass = !1, v.label = d.label || d.id, v.id = d.id, v.group = s, g && (v.fieldSetId = u.id), n === d.id && (t = s), l.set(d.id, d), o.push(v);
|
|
2450
|
+
});
|
|
2451
|
+
}
|
|
2452
|
+
function c(u) {
|
|
2453
|
+
const o = e.getComponentById(u);
|
|
2454
|
+
if (!o || !o.componentType || !o.componentType.startsWith("form"))
|
|
2455
|
+
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
2456
|
+
const s = e.selectNode(o, (g) => g.type === oe["response-form"].type);
|
|
2457
|
+
return !s || !s.contents || s.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: s };
|
|
2458
|
+
}
|
|
2459
|
+
function m(u, o) {
|
|
2460
|
+
o = o || u.id;
|
|
2461
|
+
const { result: s, message: g, formNode: y } = c(o);
|
|
2462
|
+
if (!s)
|
|
2463
|
+
return { result: s, message: g };
|
|
2464
|
+
n = u.id, i = [], l.clear();
|
|
2465
|
+
const d = y.contents[0].type === oe.fieldset.type ? 0 : 1;
|
|
2466
|
+
r(y, i, d);
|
|
2467
|
+
const f = i.find((S) => !S.isSupportedClass);
|
|
2426
2468
|
return {
|
|
2469
|
+
defaultState: {
|
|
2470
|
+
defaultGroupNumber: t || 1,
|
|
2471
|
+
model: f ? "customize" : "standard"
|
|
2472
|
+
},
|
|
2473
|
+
importData: i
|
|
2474
|
+
};
|
|
2475
|
+
}
|
|
2476
|
+
function p(u, o) {
|
|
2477
|
+
o = o;
|
|
2478
|
+
const { result: s, formNode: g } = c(o);
|
|
2479
|
+
if (!s)
|
|
2480
|
+
return "";
|
|
2481
|
+
const y = [];
|
|
2482
|
+
return u.forEach((d) => {
|
|
2483
|
+
var S;
|
|
2484
|
+
const f = l.get(d.id), v = f.appearance && f.appearance.class;
|
|
2485
|
+
if (v) {
|
|
2486
|
+
const M = v.split(" ").filter((D) => !D.startsWith("col-")), C = "col-" + d.columnInSM, k = "col-md-" + d.columnInMD, O = "col-xl-" + d.columnInLG, F = "col-el-" + d.columnInEL, L = [C, k, O, F].concat(M);
|
|
2487
|
+
f.appearance.class = L.join(" ");
|
|
2488
|
+
}
|
|
2489
|
+
if (d.fieldSetId) {
|
|
2490
|
+
const w = g.contents.find((C) => C.id === d.fieldSetId), M = y.find((C) => C.id === d.fieldSetId);
|
|
2491
|
+
M ? (S = M.contents) == null || S.push(f) : (y.push(w), w.contents = [f]);
|
|
2492
|
+
} else
|
|
2493
|
+
y.push(f);
|
|
2494
|
+
}), g.contents = y, g.id;
|
|
2495
|
+
}
|
|
2496
|
+
return {
|
|
2497
|
+
checkCanFindFormNode: c,
|
|
2498
|
+
checkCanOpenLayoutEditor: m,
|
|
2499
|
+
changeFormControlsByResponseLayoutConfig: p,
|
|
2500
|
+
getResonseFormLayoutConfig: r
|
|
2501
|
+
};
|
|
2502
|
+
}
|
|
2503
|
+
class On extends In {
|
|
2504
|
+
constructor(n, l) {
|
|
2505
|
+
super(n, l);
|
|
2506
|
+
T(this, "responseLayoutEditorFunction");
|
|
2507
|
+
this.responseLayoutEditorFunction = Vn(this.formSchemaUtils);
|
|
2508
|
+
}
|
|
2509
|
+
getPropertyConfig(n, l) {
|
|
2510
|
+
return this.propertyConfig.categories.basic = this.getBasicProperties(n, l), this.propertyConfig.categories.appearance = this.getAppearanceProperties(n, l), this.propertyConfig.categories.editor = this.getEditorProperties(n), this.propertyConfig;
|
|
2511
|
+
}
|
|
2512
|
+
getBasicProperties(n, l) {
|
|
2513
|
+
var a;
|
|
2514
|
+
const i = this;
|
|
2515
|
+
return this.setDesignViewModelField(n), this.formSchemaUtils.getFormMetadataBasicInfo(), {
|
|
2427
2516
|
description: "Basic Information",
|
|
2428
2517
|
title: "基本信息",
|
|
2429
2518
|
properties: {
|
|
@@ -2444,7 +2533,7 @@ class Nn extends xn {
|
|
|
2444
2533
|
textField: "value",
|
|
2445
2534
|
valueField: "key",
|
|
2446
2535
|
editable: !1,
|
|
2447
|
-
data:
|
|
2536
|
+
data: i.designViewModelField ? q.getEditorTypesByMDataType((a = i.designViewModelField.type) == null ? void 0 : a.name) : q.getAllInputTypes()
|
|
2448
2537
|
}
|
|
2449
2538
|
},
|
|
2450
2539
|
label: {
|
|
@@ -2455,41 +2544,37 @@ class Nn extends xn {
|
|
|
2455
2544
|
binding: {
|
|
2456
2545
|
description: "绑定的表单字段",
|
|
2457
2546
|
title: "绑定",
|
|
2458
|
-
$converter: "/converter/field-selector.converter",
|
|
2459
2547
|
editor: {
|
|
2460
|
-
type: "
|
|
2548
|
+
type: "binding-selector",
|
|
2461
2549
|
bindingType: { enable: !1 },
|
|
2462
2550
|
editorParams: {
|
|
2463
|
-
|
|
2464
|
-
|
|
2551
|
+
componentSchema: n,
|
|
2552
|
+
needSyncToViewModel: !0,
|
|
2553
|
+
viewModelId: this.viewModelId,
|
|
2554
|
+
designerHostService: this.designerHostService,
|
|
2555
|
+
disableOccupiedFields: !0
|
|
2465
2556
|
},
|
|
2466
|
-
|
|
2467
|
-
{ field: "name", title: "字段名称" },
|
|
2468
|
-
{ field: "bindingField", title: "绑定字段" },
|
|
2469
|
-
{ field: "fieldType", title: "字段类型" }
|
|
2470
|
-
],
|
|
2471
|
-
textField: "bindingField",
|
|
2472
|
-
data: s
|
|
2557
|
+
textField: "bindingField"
|
|
2473
2558
|
}
|
|
2474
2559
|
}
|
|
2475
2560
|
},
|
|
2476
|
-
setPropertyRelates(
|
|
2477
|
-
if (
|
|
2478
|
-
switch (
|
|
2561
|
+
setPropertyRelates(r, c) {
|
|
2562
|
+
if (r)
|
|
2563
|
+
switch (r && r.propertyID) {
|
|
2479
2564
|
case "type": {
|
|
2480
|
-
|
|
2565
|
+
i.changeControlType(n, r, l);
|
|
2481
2566
|
break;
|
|
2482
2567
|
}
|
|
2483
2568
|
case "label": {
|
|
2484
|
-
|
|
2569
|
+
r.needRefreshControlTree = !0;
|
|
2485
2570
|
break;
|
|
2486
2571
|
}
|
|
2487
2572
|
}
|
|
2488
2573
|
}
|
|
2489
2574
|
};
|
|
2490
2575
|
}
|
|
2491
|
-
getAppearanceProperties(n,
|
|
2492
|
-
|
|
2576
|
+
getAppearanceProperties(n, l) {
|
|
2577
|
+
const i = this;
|
|
2493
2578
|
return {
|
|
2494
2579
|
title: "样式",
|
|
2495
2580
|
description: "Appearance",
|
|
@@ -2515,18 +2600,18 @@ class Nn extends xn {
|
|
|
2515
2600
|
refreshPanelAfterChanged: !0,
|
|
2516
2601
|
editor: {
|
|
2517
2602
|
type: "response-layout-editor-setting",
|
|
2518
|
-
initialState:
|
|
2603
|
+
initialState: i.responseLayoutEditorFunction.checkCanOpenLayoutEditor(n, i.componentId)
|
|
2519
2604
|
}
|
|
2520
2605
|
}
|
|
2521
2606
|
},
|
|
2522
|
-
setPropertyRelates(
|
|
2523
|
-
if (
|
|
2524
|
-
switch (
|
|
2607
|
+
setPropertyRelates(a, r) {
|
|
2608
|
+
if (a)
|
|
2609
|
+
switch (a && a.propertyID) {
|
|
2525
2610
|
case "responseLayout":
|
|
2526
|
-
|
|
2611
|
+
i.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(a.propertyValue, i.componentId || n.id), i.updateUnifiedLayoutAfterResponseLayoutChanged(i.componentId), i.updateElementByParentContainer(n.id, l), delete n.responseLayout;
|
|
2527
2612
|
break;
|
|
2528
2613
|
case "class":
|
|
2529
|
-
|
|
2614
|
+
i.updateUnifiedLayoutAfterControlChanged(a.propertyValue, n.id, this.componentId), i.updateElementByParentContainer(n.id, l);
|
|
2530
2615
|
break;
|
|
2531
2616
|
}
|
|
2532
2617
|
}
|
|
@@ -2540,44 +2625,44 @@ class Nn extends xn {
|
|
|
2540
2625
|
* @param propertyData 控件DOM属性
|
|
2541
2626
|
* @param newControlType 新控件类型
|
|
2542
2627
|
*/
|
|
2543
|
-
changeControlType(n,
|
|
2544
|
-
var
|
|
2545
|
-
const
|
|
2546
|
-
if (!
|
|
2628
|
+
changeControlType(n, l, i) {
|
|
2629
|
+
var u, o, s, g;
|
|
2630
|
+
const a = l.propertyValue, r = i && i.parent && i.parent.schema;
|
|
2631
|
+
if (!r)
|
|
2547
2632
|
return;
|
|
2548
|
-
const
|
|
2549
|
-
let
|
|
2633
|
+
const c = r.contents.findIndex((y) => y.id === n.id), m = r.contents[c];
|
|
2634
|
+
let p;
|
|
2550
2635
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
2551
2636
|
editor: {
|
|
2552
|
-
$type:
|
|
2637
|
+
$type: a
|
|
2553
2638
|
},
|
|
2554
2639
|
name: this.designViewModelField.name,
|
|
2555
2640
|
require: this.designViewModelField.require,
|
|
2556
2641
|
readonly: this.designViewModelField.readonly
|
|
2557
|
-
}, !1),
|
|
2558
|
-
id:
|
|
2559
|
-
appearance:
|
|
2560
|
-
size:
|
|
2561
|
-
label:
|
|
2562
|
-
binding:
|
|
2563
|
-
visible:
|
|
2564
|
-
}), Object.assign(
|
|
2565
|
-
isTextArea:
|
|
2566
|
-
placeholder: (
|
|
2567
|
-
holdPlace: (
|
|
2568
|
-
readonly: (
|
|
2569
|
-
require: (
|
|
2570
|
-
}),
|
|
2571
|
-
(
|
|
2572
|
-
),
|
|
2573
|
-
}
|
|
2574
|
-
getComponentConfig(n,
|
|
2575
|
-
const
|
|
2642
|
+
}, !1), p = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, a)), p || (p = this.controlCreatorUtils.createFormGroupWithoutField(a)), Object.assign(p, {
|
|
2643
|
+
id: m.id,
|
|
2644
|
+
appearance: m.appearance,
|
|
2645
|
+
size: m.size,
|
|
2646
|
+
label: m.label,
|
|
2647
|
+
binding: m.binding,
|
|
2648
|
+
visible: m.visible
|
|
2649
|
+
}), Object.assign(p.editor, {
|
|
2650
|
+
isTextArea: p.isTextArea && m.isTextArea,
|
|
2651
|
+
placeholder: (u = m.editor) == null ? void 0 : u.placeholder,
|
|
2652
|
+
holdPlace: (o = m.editor) == null ? void 0 : o.holdPlace,
|
|
2653
|
+
readonly: (s = m.editor) == null ? void 0 : s.readonly,
|
|
2654
|
+
require: (g = m.editor) == null ? void 0 : g.require
|
|
2655
|
+
}), r.contents.splice(c, 1), r.contents.splice(c, 0, p), i.schema = Object.assign(m, p), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
2656
|
+
(y) => y.classList.remove("dgComponentSelected")
|
|
2657
|
+
), Mn.value++;
|
|
2658
|
+
}
|
|
2659
|
+
getComponentConfig(n, l = {}, i = {}) {
|
|
2660
|
+
const a = Object.assign({
|
|
2576
2661
|
description: "编辑器",
|
|
2577
2662
|
title: "编辑器",
|
|
2578
2663
|
type: "input-group",
|
|
2579
2664
|
$converter: "/converter/property-editor.converter"
|
|
2580
|
-
},
|
|
2665
|
+
}, l), r = Object.assign({
|
|
2581
2666
|
readonly: {
|
|
2582
2667
|
description: "",
|
|
2583
2668
|
title: "只读",
|
|
@@ -2598,8 +2683,8 @@ class Nn extends xn {
|
|
|
2598
2683
|
title: "提示文本",
|
|
2599
2684
|
type: "string"
|
|
2600
2685
|
}
|
|
2601
|
-
},
|
|
2602
|
-
return { ...
|
|
2686
|
+
}, i);
|
|
2687
|
+
return { ...a, properties: { ...r } };
|
|
2603
2688
|
}
|
|
2604
2689
|
/**
|
|
2605
2690
|
* 修改某一输入控件的样式后更新Form的统一布局配置
|
|
@@ -2607,108 +2692,132 @@ class Nn extends xn {
|
|
|
2607
2692
|
* @param controlId 控件Id
|
|
2608
2693
|
* @param componentId 控件所在组件id
|
|
2609
2694
|
*/
|
|
2610
|
-
updateUnifiedLayoutAfterControlChanged(n,
|
|
2611
|
-
const
|
|
2612
|
-
let
|
|
2613
|
-
|
|
2614
|
-
const
|
|
2615
|
-
id:
|
|
2616
|
-
columnInSM: parseInt(
|
|
2617
|
-
columnInMD: parseInt(
|
|
2618
|
-
columnInLG: parseInt(
|
|
2619
|
-
columnInEL: parseInt(
|
|
2695
|
+
updateUnifiedLayoutAfterControlChanged(n, l, i) {
|
|
2696
|
+
const a = n.split(" ");
|
|
2697
|
+
let r = a.find((o) => /^col-([1-9]|10|11|12)$/.test(o)), c = a.find((o) => /^col-md-([1-9]|10|11|12)$/.test(o)), m = a.find((o) => /^col-xl-([1-9]|10|11|12)$/.test(o)), p = a.find((o) => /^col-el-([1-9]|10|11|12)$/.test(o));
|
|
2698
|
+
r = r || "col-12", c = c || "col-md-" + r.replace("col-", ""), m = m || "col-xl-" + c.replace("col-md-", ""), p = p || "col-el-" + m.replace("col-xl-", "");
|
|
2699
|
+
const u = {
|
|
2700
|
+
id: l,
|
|
2701
|
+
columnInSM: parseInt(r.replace("col-", ""), 10),
|
|
2702
|
+
columnInMD: parseInt(c.replace("col-md-", ""), 10),
|
|
2703
|
+
columnInLG: parseInt(m.replace("col-xl-", ""), 10),
|
|
2704
|
+
columnInEL: parseInt(p.replace("col-el-", ""), 10)
|
|
2620
2705
|
};
|
|
2621
|
-
this.updateUnifiedLayoutAfterResponseLayoutChanged(
|
|
2706
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(i, u);
|
|
2622
2707
|
}
|
|
2623
2708
|
/**
|
|
2624
2709
|
* 修改控件布局配置后更新Form统一布局配置
|
|
2625
2710
|
* @param componentId 组件Id
|
|
2626
2711
|
* @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
|
|
2627
2712
|
*/
|
|
2628
|
-
updateUnifiedLayoutAfterResponseLayoutChanged(n,
|
|
2629
|
-
const { formNode:
|
|
2630
|
-
if (!
|
|
2713
|
+
updateUnifiedLayoutAfterResponseLayoutChanged(n, l) {
|
|
2714
|
+
const { formNode: i } = this.responseLayoutEditorFunction.checkCanFindFormNode(n);
|
|
2715
|
+
if (!i || !i.unifiedLayout)
|
|
2631
2716
|
return;
|
|
2632
|
-
const
|
|
2633
|
-
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(
|
|
2634
|
-
const
|
|
2635
|
-
Object.assign(
|
|
2717
|
+
const a = [];
|
|
2718
|
+
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(i, a, 1), l) {
|
|
2719
|
+
const y = a.find((d) => d.id === l.id);
|
|
2720
|
+
Object.assign(y || {}, l);
|
|
2636
2721
|
}
|
|
2637
|
-
const
|
|
2638
|
-
Object.assign(
|
|
2639
|
-
uniqueColClassInSM:
|
|
2640
|
-
uniqueColClassInMD:
|
|
2641
|
-
uniqueColClassInLG:
|
|
2642
|
-
uniqueColClassInEL:
|
|
2722
|
+
const r = a.map((y) => y.columnInSM), c = a.map((y) => y.columnInMD), m = a.map((y) => y.columnInLG), p = a.map((y) => y.columnInEL), u = this.checkIsUniqueColumn(r) ? r[0] : null, o = this.checkIsUniqueColumn(c) ? c[0] : null, s = this.checkIsUniqueColumn(m) ? m[0] : null, g = this.checkIsUniqueColumn(p) ? p[0] : null;
|
|
2723
|
+
Object.assign(i.unifiedLayout, {
|
|
2724
|
+
uniqueColClassInSM: u,
|
|
2725
|
+
uniqueColClassInMD: o,
|
|
2726
|
+
uniqueColClassInLG: s,
|
|
2727
|
+
uniqueColClassInEL: g
|
|
2643
2728
|
});
|
|
2644
2729
|
}
|
|
2645
2730
|
/**
|
|
2646
2731
|
* 校验宽度样式值是否一致
|
|
2647
2732
|
*/
|
|
2648
2733
|
checkIsUniqueColumn(n) {
|
|
2649
|
-
const
|
|
2650
|
-
return Array.from(
|
|
2734
|
+
const l = new Set(n);
|
|
2735
|
+
return Array.from(l).length === 1;
|
|
2651
2736
|
}
|
|
2652
2737
|
}
|
|
2653
|
-
class
|
|
2738
|
+
class Tn extends On {
|
|
2654
2739
|
constructor(t, n) {
|
|
2655
2740
|
super(t, n);
|
|
2656
2741
|
}
|
|
2657
2742
|
getEditorProperties(t) {
|
|
2658
|
-
|
|
2743
|
+
const n = this.getComponentConfig(t, { type: "combo-list" }, {
|
|
2659
2744
|
editable: {
|
|
2660
2745
|
description: "",
|
|
2661
2746
|
title: "允许编辑",
|
|
2662
2747
|
type: "boolean"
|
|
2663
2748
|
},
|
|
2749
|
+
enableClear: {
|
|
2750
|
+
description: "",
|
|
2751
|
+
title: "启用清空",
|
|
2752
|
+
type: "boolean"
|
|
2753
|
+
},
|
|
2664
2754
|
textField: {
|
|
2755
|
+
visible: !1,
|
|
2665
2756
|
description: "",
|
|
2666
2757
|
title: "数据源显示字段",
|
|
2667
2758
|
type: "string"
|
|
2668
2759
|
},
|
|
2669
|
-
|
|
2760
|
+
valueField: {
|
|
2761
|
+
visible: !1,
|
|
2670
2762
|
description: "",
|
|
2671
2763
|
title: "数据源值字段",
|
|
2672
2764
|
type: "string"
|
|
2765
|
+
},
|
|
2766
|
+
idField: {
|
|
2767
|
+
visible: !1,
|
|
2768
|
+
description: "",
|
|
2769
|
+
title: "数据源标识字段",
|
|
2770
|
+
type: "string"
|
|
2771
|
+
},
|
|
2772
|
+
data: {
|
|
2773
|
+
description: "",
|
|
2774
|
+
title: "数据",
|
|
2775
|
+
type: "array",
|
|
2776
|
+
editor: {
|
|
2777
|
+
columns: [
|
|
2778
|
+
{ field: t.editor.valueField, title: "值", dataType: "string" },
|
|
2779
|
+
{ field: t.editor.textField, title: "名称", dataType: "string" },
|
|
2780
|
+
{ field: "disabled", title: "禁用", visible: !1, dataType: "boolean", editor: { type: "switch" } }
|
|
2781
|
+
],
|
|
2782
|
+
type: "item-collection-editor",
|
|
2783
|
+
valueField: t.editor.valueField,
|
|
2784
|
+
nameField: t.editor.textField,
|
|
2785
|
+
requiredFields: [t.editor.valueField, t.editor.textField],
|
|
2786
|
+
uniqueFields: [t.editor.valueField, t.editor.textField]
|
|
2787
|
+
},
|
|
2788
|
+
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
2789
|
+
refreshPanelAfterChanged: !0
|
|
2673
2790
|
}
|
|
2674
2791
|
});
|
|
2792
|
+
return n.setPropertyRelates = function(l) {
|
|
2793
|
+
if (l)
|
|
2794
|
+
switch (l.propertyID) {
|
|
2795
|
+
case "data": {
|
|
2796
|
+
l.propertyValue.parameters && (t.editor.valueField = l.propertyValue.parameters.valueField, t.editor.textField = l.propertyValue.parameters.nameField), t.editor.data = l.propertyValue.value;
|
|
2797
|
+
break;
|
|
2798
|
+
}
|
|
2799
|
+
}
|
|
2800
|
+
}, n;
|
|
2675
2801
|
}
|
|
2676
2802
|
}
|
|
2677
|
-
function
|
|
2678
|
-
const
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
checkCanMoveComponent: a,
|
|
2682
|
-
hideNestedPaddingInDesginerView: r,
|
|
2683
|
-
onAcceptMovedChildElement: s,
|
|
2684
|
-
resolveComponentContext: f,
|
|
2685
|
-
triggerBelongedComponentToMoveWhenMoved: c,
|
|
2686
|
-
triggerBelongedComponentToDeleteWhenDeleted: l
|
|
2687
|
-
} = $n(e), g = e.schema;
|
|
2688
|
-
function i(d, C) {
|
|
2689
|
-
return new Un(d, t).getPropertyConfig(g, C);
|
|
2803
|
+
function Pn(e, t) {
|
|
2804
|
+
const n = e.schema;
|
|
2805
|
+
function l(i, a) {
|
|
2806
|
+
return new Tn(i, t).getPropertyConfig(n, a);
|
|
2690
2807
|
}
|
|
2691
2808
|
return {
|
|
2692
|
-
|
|
2693
|
-
checkCanDeleteComponent: o,
|
|
2694
|
-
checkCanMoveComponent: a,
|
|
2695
|
-
hideNestedPaddingInDesginerView: r,
|
|
2696
|
-
onAcceptMovedChildElement: s,
|
|
2697
|
-
resolveComponentContext: f,
|
|
2698
|
-
triggerBelongedComponentToMoveWhenMoved: c,
|
|
2699
|
-
triggerBelongedComponentToDeleteWhenDeleted: l,
|
|
2700
|
-
getPropsConfig: i
|
|
2809
|
+
getPropsConfig: l
|
|
2701
2810
|
};
|
|
2702
2811
|
}
|
|
2703
|
-
const
|
|
2812
|
+
const Ln = /* @__PURE__ */ x({
|
|
2704
2813
|
name: "FComboListDesign",
|
|
2705
|
-
props:
|
|
2814
|
+
props: ee,
|
|
2706
2815
|
emits: ["clear", "update:modelValue", "change"],
|
|
2707
2816
|
setup(e, t) {
|
|
2708
|
-
const n =
|
|
2709
|
-
return
|
|
2710
|
-
n.value.componentInstance =
|
|
2711
|
-
}), t.expose(
|
|
2817
|
+
const n = b(), l = N("designer-host-service"), i = N("design-item-context"), a = Pn(i, l), r = se(n, i, a);
|
|
2818
|
+
return J(() => {
|
|
2819
|
+
n.value.componentInstance = r;
|
|
2820
|
+
}), t.expose(r.value), () => h(kn, {
|
|
2712
2821
|
ref: n,
|
|
2713
2822
|
buttonContent: e.dropDownIcon,
|
|
2714
2823
|
readonly: !0,
|
|
@@ -2718,1269 +2827,313 @@ const Hn = /* @__PURE__ */ R({
|
|
|
2718
2827
|
enableClear: !0
|
|
2719
2828
|
}, null);
|
|
2720
2829
|
}
|
|
2721
|
-
})
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
n.component(t.name, e);
|
|
2725
|
-
}, e;
|
|
2726
|
-
};
|
|
2727
|
-
G.register = (e, t, n, o) => {
|
|
2728
|
-
e["combo-list"] = G, t["combo-list"] = we;
|
|
2830
|
+
});
|
|
2831
|
+
U.register = (e, t, n, l) => {
|
|
2832
|
+
e["combo-list"] = U, t["combo-list"] = ye;
|
|
2729
2833
|
};
|
|
2730
|
-
|
|
2731
|
-
e["combo-list"] =
|
|
2834
|
+
U.registerDesigner = (e, t, n) => {
|
|
2835
|
+
e["combo-list"] = Ln, t["combo-list"] = ye;
|
|
2732
2836
|
};
|
|
2733
|
-
const
|
|
2837
|
+
const W = Ue(U), z = /* @__PURE__ */ x({
|
|
2734
2838
|
name: "FOrder",
|
|
2735
|
-
props:
|
|
2839
|
+
props: K,
|
|
2736
2840
|
emits: ["change"],
|
|
2737
2841
|
setup(e, t) {
|
|
2738
|
-
const n =
|
|
2842
|
+
const n = b(e.items), l = b("排序列"), i = b("排序方式"), a = b("添加排序列"), r = [{
|
|
2739
2843
|
id: "asc",
|
|
2740
2844
|
name: "升序"
|
|
2741
2845
|
}, {
|
|
2742
2846
|
id: "desc",
|
|
2743
2847
|
name: "降序"
|
|
2744
|
-
}],
|
|
2745
|
-
function
|
|
2746
|
-
const
|
|
2747
|
-
|
|
2848
|
+
}], c = b(/* @__PURE__ */ new Map());
|
|
2849
|
+
function m() {
|
|
2850
|
+
const f = n.value.map((v) => [v.id, !0]);
|
|
2851
|
+
c.value = new Map(f);
|
|
2748
2852
|
}
|
|
2749
|
-
|
|
2750
|
-
const
|
|
2853
|
+
m();
|
|
2854
|
+
const p = B(() => e.dataSource.map((f) => (f.disabled = c.value.has(f.id), f))), u = B(() => ({
|
|
2751
2855
|
"f-order": !0
|
|
2752
2856
|
}));
|
|
2753
|
-
function
|
|
2754
|
-
n.value = n.value.filter((
|
|
2857
|
+
function o(f) {
|
|
2858
|
+
n.value = n.value.filter((v) => v.id !== f.id), m(), t.emit("change", n.value);
|
|
2755
2859
|
}
|
|
2756
|
-
function
|
|
2860
|
+
function s() {
|
|
2757
2861
|
n.value = [...n.value, {
|
|
2758
2862
|
id: Date.now().toString(),
|
|
2759
2863
|
name: "",
|
|
2760
2864
|
order: "asc"
|
|
2761
|
-
}],
|
|
2865
|
+
}], m(), t.emit("change", n.value);
|
|
2762
2866
|
}
|
|
2763
|
-
function
|
|
2764
|
-
if (
|
|
2765
|
-
const
|
|
2766
|
-
S && (S.name =
|
|
2867
|
+
function g(f) {
|
|
2868
|
+
if (f && f.length === 1) {
|
|
2869
|
+
const v = f[0], S = n.value.find((w) => w.id === v.id);
|
|
2870
|
+
S && (S.name = v.name);
|
|
2767
2871
|
}
|
|
2768
|
-
|
|
2872
|
+
m(), t.emit("change", n.value);
|
|
2769
2873
|
}
|
|
2770
|
-
function
|
|
2771
|
-
if (
|
|
2772
|
-
const
|
|
2773
|
-
|
|
2874
|
+
function y(f) {
|
|
2875
|
+
if (f && f.length) {
|
|
2876
|
+
const v = /* @__PURE__ */ new Map();
|
|
2877
|
+
f.reduce((S, w) => (S.set(w.id, w), S), v), n.value = f.map((S) => v.get(S.id)), t.emit("change", n.value);
|
|
2774
2878
|
}
|
|
2775
2879
|
}
|
|
2776
|
-
function
|
|
2777
|
-
return h(
|
|
2880
|
+
function d() {
|
|
2881
|
+
return h(fe, {
|
|
2778
2882
|
style: "flex:1",
|
|
2779
2883
|
data: n.value,
|
|
2780
2884
|
draggable: !0,
|
|
2781
2885
|
view: "DraggableView",
|
|
2782
2886
|
"keep-order": !0,
|
|
2783
2887
|
itemClass: "f-order-item",
|
|
2784
|
-
onRemoveItem:
|
|
2785
|
-
onChange:
|
|
2888
|
+
onRemoveItem: o,
|
|
2889
|
+
onChange: y
|
|
2786
2890
|
}, {
|
|
2787
2891
|
header: () => h("div", {
|
|
2788
2892
|
class: "f-order-header"
|
|
2789
2893
|
}, [h("span", {
|
|
2790
2894
|
class: "f-order-header-order-field"
|
|
2791
|
-
}, [
|
|
2895
|
+
}, [l.value]), h("span", {
|
|
2792
2896
|
class: "f-order-header-order-type"
|
|
2793
|
-
}, [
|
|
2794
|
-
itemContent: (
|
|
2897
|
+
}, [i.value])]),
|
|
2898
|
+
itemContent: (f) => h("div", {
|
|
2795
2899
|
class: "f-order-item-content"
|
|
2796
|
-
}, [h(
|
|
2900
|
+
}, [h(W, {
|
|
2797
2901
|
class: "f-order-item-content-order-field",
|
|
2798
|
-
data:
|
|
2902
|
+
data: p.value,
|
|
2799
2903
|
valueField: "id",
|
|
2800
2904
|
textField: "name",
|
|
2801
2905
|
idField: "id",
|
|
2802
|
-
modelValue:
|
|
2803
|
-
"onUpdate:modelValue": (
|
|
2804
|
-
onChange:
|
|
2805
|
-
onClear:
|
|
2806
|
-
}, null), h(
|
|
2906
|
+
modelValue: f.id,
|
|
2907
|
+
"onUpdate:modelValue": (v) => f.id = v,
|
|
2908
|
+
onChange: g,
|
|
2909
|
+
onClear: g
|
|
2910
|
+
}, null), h(W, {
|
|
2807
2911
|
class: "f-order-item-content-order-type",
|
|
2808
|
-
data:
|
|
2912
|
+
data: r,
|
|
2809
2913
|
valueField: "id",
|
|
2810
2914
|
textField: "name",
|
|
2811
2915
|
idField: "id",
|
|
2812
|
-
modelValue:
|
|
2813
|
-
"onUpdate:modelValue": (
|
|
2814
|
-
onChange:
|
|
2916
|
+
modelValue: f.order,
|
|
2917
|
+
"onUpdate:modelValue": (v) => f.order = v,
|
|
2918
|
+
onChange: g
|
|
2815
2919
|
}, null)]),
|
|
2816
2920
|
footer: () => h("div", {
|
|
2817
2921
|
class: "f-order-footer"
|
|
2818
|
-
}, [h(
|
|
2922
|
+
}, [h(me, {
|
|
2819
2923
|
type: "link",
|
|
2820
2924
|
class: "f-order-add-button",
|
|
2821
|
-
onClick:
|
|
2925
|
+
onClick: s
|
|
2822
2926
|
}, {
|
|
2823
|
-
default: () => h(
|
|
2927
|
+
default: () => h(X, null, [h("span", {
|
|
2824
2928
|
class: "f-order-add-icon"
|
|
2825
2929
|
}, [h("i", {
|
|
2826
2930
|
class: "f-icon f-icon-add"
|
|
2827
|
-
}, null)]),
|
|
2931
|
+
}, null)]), a.value])
|
|
2828
2932
|
})])
|
|
2829
2933
|
});
|
|
2830
2934
|
}
|
|
2831
2935
|
return () => h("div", {
|
|
2832
|
-
class:
|
|
2833
|
-
}, [
|
|
2936
|
+
class: u.value
|
|
2937
|
+
}, [d()]);
|
|
2834
2938
|
}
|
|
2835
2939
|
});
|
|
2836
|
-
function
|
|
2837
|
-
var
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
o();
|
|
2842
|
-
const a = n && n.getStyles && n.getStyles() || "", r = n && n.getDesignerClass && n.getDesignerClass() || "", s = v();
|
|
2843
|
-
function f() {
|
|
2844
|
-
return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
|
|
2940
|
+
function En(e, t, n) {
|
|
2941
|
+
var M;
|
|
2942
|
+
const l = "", i = "", a = b();
|
|
2943
|
+
function r() {
|
|
2944
|
+
return (t == null ? void 0 : t.schema.componentType) !== "frame";
|
|
2845
2945
|
}
|
|
2846
2946
|
function c() {
|
|
2847
2947
|
return !1;
|
|
2848
2948
|
}
|
|
2849
|
-
function
|
|
2850
|
-
return (t == null ? void 0 : t.schema.componentType)
|
|
2949
|
+
function m() {
|
|
2950
|
+
return (t == null ? void 0 : t.schema.componentType) !== "frame";
|
|
2851
2951
|
}
|
|
2852
|
-
function
|
|
2853
|
-
return (t == null ? void 0 : t.schema.componentType) === "frame"
|
|
2952
|
+
function p() {
|
|
2953
|
+
return (t == null ? void 0 : t.schema.componentType) === "frame";
|
|
2854
2954
|
}
|
|
2855
|
-
function
|
|
2856
|
-
if (!
|
|
2955
|
+
function u(C) {
|
|
2956
|
+
if (!C || !C.value)
|
|
2857
2957
|
return null;
|
|
2858
|
-
if (
|
|
2859
|
-
return
|
|
2860
|
-
const
|
|
2861
|
-
return
|
|
2958
|
+
if (C.value.schema && C.value.schema.type === "component")
|
|
2959
|
+
return C.value;
|
|
2960
|
+
const k = b(C == null ? void 0 : C.value.parent), O = u(k);
|
|
2961
|
+
return O || null;
|
|
2862
2962
|
}
|
|
2863
|
-
function
|
|
2864
|
-
const { componentInstance:
|
|
2865
|
-
return !
|
|
2963
|
+
function o(C = t) {
|
|
2964
|
+
const { componentInstance: k, designerItemElementRef: O } = C;
|
|
2965
|
+
return !k || !k.value ? null : k.value.canMove ? O : o(C.parent);
|
|
2866
2966
|
}
|
|
2867
|
-
function C
|
|
2868
|
-
return !!n
|
|
2967
|
+
function s(C) {
|
|
2968
|
+
return !!n;
|
|
2869
2969
|
}
|
|
2870
|
-
function
|
|
2970
|
+
function g() {
|
|
2871
2971
|
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
2872
2972
|
}
|
|
2873
|
-
function
|
|
2973
|
+
function y() {
|
|
2874
2974
|
}
|
|
2875
|
-
function
|
|
2876
|
-
T && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(T);
|
|
2975
|
+
function d(C, k) {
|
|
2877
2976
|
}
|
|
2878
|
-
function
|
|
2879
|
-
const { componentType:
|
|
2880
|
-
let
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
return I && !I.id && I.type === F && (I.id = `${O}_${Math.random().toString().slice(2, 6)}`), I;
|
|
2977
|
+
function f(C, k) {
|
|
2978
|
+
const { componentType: O } = C;
|
|
2979
|
+
let F = de(O, C, k);
|
|
2980
|
+
const L = O.toLowerCase().replace(/-/g, "_");
|
|
2981
|
+
return F && !F.id && F.type === O && (F.id = `${L}_${Math.random().toString().slice(2, 6)}`), F;
|
|
2884
2982
|
}
|
|
2885
|
-
function
|
|
2886
|
-
const F = String(b.getAttribute("data-controltype")), I = b.getAttribute("data-feature"), O = I ? JSON.parse(I) : {};
|
|
2887
|
-
O.parentComponentInstance = s.value;
|
|
2888
|
-
let M = H(F, O);
|
|
2889
|
-
n && n.onAcceptNewChildElement && (M = n.onAcceptNewChildElement(b, T, M));
|
|
2890
|
-
const D = F.toLowerCase().replace("-", "_");
|
|
2891
|
-
return M && !M.id && M.type === F && (M.id = `${D}_${Math.random().toString().slice(2, 6)}`), M;
|
|
2983
|
+
function v(C) {
|
|
2892
2984
|
}
|
|
2893
|
-
function
|
|
2985
|
+
function S(...C) {
|
|
2894
2986
|
}
|
|
2895
|
-
function
|
|
2896
|
-
|
|
2897
|
-
|
|
2987
|
+
function w() {
|
|
2988
|
+
t != null && t.schema.contents && t.schema.contents.map((C) => {
|
|
2989
|
+
var F;
|
|
2990
|
+
let k = C.id;
|
|
2991
|
+
C.type === "component-ref" && (k = C.component);
|
|
2992
|
+
const O = e.value.querySelector(`#${k}-design-item`);
|
|
2993
|
+
(F = O == null ? void 0 : O.componentInstance) != null && F.value.onRemoveComponent && O.componentInstance.value.onRemoveComponent();
|
|
2994
|
+
});
|
|
2898
2995
|
}
|
|
2899
|
-
return
|
|
2900
|
-
canMove:
|
|
2996
|
+
return a.value = {
|
|
2997
|
+
canMove: r(),
|
|
2901
2998
|
canSelectParent: c(),
|
|
2902
|
-
canDelete:
|
|
2903
|
-
canNested: !
|
|
2999
|
+
canDelete: m(),
|
|
3000
|
+
canNested: !p(),
|
|
2904
3001
|
contents: t == null ? void 0 : t.schema.contents,
|
|
2905
3002
|
elementRef: e,
|
|
2906
|
-
parent: (
|
|
3003
|
+
parent: (M = t == null ? void 0 : t.parent) == null ? void 0 : M.componentInstance,
|
|
2907
3004
|
schema: t == null ? void 0 : t.schema,
|
|
2908
|
-
styles:
|
|
2909
|
-
designerClass:
|
|
2910
|
-
canAccepts:
|
|
2911
|
-
getBelongedComponentInstance:
|
|
2912
|
-
getDraggableDesignItemElement:
|
|
2913
|
-
getDraggingDisplayText:
|
|
2914
|
-
getPropConfig:
|
|
2915
|
-
getDragScopeElement:
|
|
2916
|
-
onAcceptMovedChildElement:
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
}, s;
|
|
2924
|
-
}
|
|
2925
|
-
function _n() {
|
|
2926
|
-
function e(t) {
|
|
2927
|
-
var a, r;
|
|
2928
|
-
if (!t)
|
|
2929
|
-
return !1;
|
|
2930
|
-
const n = ((a = t.targetContainer) == null ? void 0 : a.componentInstance) && t.targetContainer.componentInstance.value;
|
|
2931
|
-
if (!n)
|
|
2932
|
-
return !1;
|
|
2933
|
-
const o = (r = n.schema.appearance) == null ? void 0 : r.class;
|
|
2934
|
-
if (t.controlCategory === "input" || t.controlType === "form-group") {
|
|
2935
|
-
const s = n.schema.type, f = (s === "response-form" || s === "content-container") && o && o.includes("farris-form");
|
|
2936
|
-
if (n.schema.type !== "response-layout-item" && !f)
|
|
2937
|
-
return !1;
|
|
2938
|
-
}
|
|
2939
|
-
return t.controlType !== "field-set";
|
|
2940
|
-
}
|
|
2941
|
-
return {
|
|
2942
|
-
basalDragulaRuleForContainer: e
|
|
2943
|
-
};
|
|
2944
|
-
}
|
|
2945
|
-
const zn = "https://json-schema.org/draft/2020-12/schema", Xn = "https://farris-design.gitee.io/dragging-rules.schema.json", Jn = "Dragging Rules", Qn = "The rules of designer canvas", Yn = "object", Zn = {
|
|
2946
|
-
"f-page": {
|
|
2947
|
-
description: "The root class of page designed by farris.",
|
|
2948
|
-
type: "object",
|
|
2949
|
-
properties: {
|
|
2950
|
-
contents: {
|
|
2951
|
-
type: "object",
|
|
2952
|
-
properties: {
|
|
2953
|
-
"f-page-header": {
|
|
2954
|
-
description: "The class of page header designed by farris.",
|
|
2955
|
-
type: "string"
|
|
2956
|
-
},
|
|
2957
|
-
"f-page-main": {
|
|
2958
|
-
description: "The class of page body designed by farris.",
|
|
2959
|
-
type: "object",
|
|
2960
|
-
properties: {
|
|
2961
|
-
contents: {
|
|
2962
|
-
type: "object",
|
|
2963
|
-
properties: {
|
|
2964
|
-
"f-struct-like-card": {
|
|
2965
|
-
description: "",
|
|
2966
|
-
type: "object",
|
|
2967
|
-
properties: {
|
|
2968
|
-
contents: {
|
|
2969
|
-
type: "object",
|
|
2970
|
-
properties: {
|
|
2971
|
-
"f-struct-form": {
|
|
2972
|
-
description: "The class of form component which has a hierarchical structure of component -> section -> respnse-form.",
|
|
2973
|
-
type: "object",
|
|
2974
|
-
properties: {
|
|
2975
|
-
contents: {
|
|
2976
|
-
type: "object",
|
|
2977
|
-
properties: {
|
|
2978
|
-
"f-section-form": {
|
|
2979
|
-
description: "The class of section which has wrapped a reponse-form component.",
|
|
2980
|
-
type: "object",
|
|
2981
|
-
properties: {
|
|
2982
|
-
contents: {
|
|
2983
|
-
type: "object",
|
|
2984
|
-
properties: {
|
|
2985
|
-
"f-form-layout": {
|
|
2986
|
-
description: "The class of reponse form",
|
|
2987
|
-
type: "object",
|
|
2988
|
-
properties: {
|
|
2989
|
-
rules: {
|
|
2990
|
-
type: "object",
|
|
2991
|
-
properties: {
|
|
2992
|
-
canAccept: {
|
|
2993
|
-
type: "boolean",
|
|
2994
|
-
const: !0
|
|
2995
|
-
},
|
|
2996
|
-
fixed: {
|
|
2997
|
-
type: "boolean",
|
|
2998
|
-
const: !0
|
|
2999
|
-
},
|
|
3000
|
-
hidePadding: {
|
|
3001
|
-
type: "boolean",
|
|
3002
|
-
const: !1
|
|
3003
|
-
}
|
|
3004
|
-
}
|
|
3005
|
-
}
|
|
3006
|
-
}
|
|
3007
|
-
}
|
|
3008
|
-
}
|
|
3009
|
-
},
|
|
3010
|
-
rules: {
|
|
3011
|
-
type: "object",
|
|
3012
|
-
properties: {
|
|
3013
|
-
canAccept: {
|
|
3014
|
-
type: "boolean",
|
|
3015
|
-
const: !1
|
|
3016
|
-
},
|
|
3017
|
-
fixed: {
|
|
3018
|
-
type: "boolean",
|
|
3019
|
-
const: !0
|
|
3020
|
-
},
|
|
3021
|
-
hidePadding: {
|
|
3022
|
-
type: "boolean",
|
|
3023
|
-
const: !0
|
|
3024
|
-
}
|
|
3025
|
-
}
|
|
3026
|
-
}
|
|
3027
|
-
}
|
|
3028
|
-
}
|
|
3029
|
-
}
|
|
3030
|
-
},
|
|
3031
|
-
rules: {
|
|
3032
|
-
type: "object",
|
|
3033
|
-
properties: {
|
|
3034
|
-
canAccept: {
|
|
3035
|
-
type: "boolean",
|
|
3036
|
-
const: !1
|
|
3037
|
-
},
|
|
3038
|
-
fixed: {
|
|
3039
|
-
type: "boolean",
|
|
3040
|
-
const: !1
|
|
3041
|
-
},
|
|
3042
|
-
hidePadding: {
|
|
3043
|
-
type: "boolean",
|
|
3044
|
-
const: !0
|
|
3045
|
-
}
|
|
3046
|
-
}
|
|
3047
|
-
}
|
|
3048
|
-
}
|
|
3049
|
-
},
|
|
3050
|
-
"f-struct-wrapper": {
|
|
3051
|
-
description: "",
|
|
3052
|
-
type: "object",
|
|
3053
|
-
properties: {
|
|
3054
|
-
contents: {
|
|
3055
|
-
type: "object",
|
|
3056
|
-
properties: {
|
|
3057
|
-
"f-section-tabs": {
|
|
3058
|
-
description: "The class of section which has wrapped sub-grid tabs.",
|
|
3059
|
-
type: "object",
|
|
3060
|
-
properties: {
|
|
3061
|
-
contents: {
|
|
3062
|
-
type: "object",
|
|
3063
|
-
properties: {
|
|
3064
|
-
"f-tabs-in-card": {
|
|
3065
|
-
description: "The class of tabs which contains sub-grid.",
|
|
3066
|
-
type: "object",
|
|
3067
|
-
properties: {
|
|
3068
|
-
contents: {
|
|
3069
|
-
type: "object",
|
|
3070
|
-
properties: {
|
|
3071
|
-
"f-struct-data-grid-in-card": {
|
|
3072
|
-
description: "The class of sub-grid component",
|
|
3073
|
-
type: "object",
|
|
3074
|
-
properties: {
|
|
3075
|
-
contents: {
|
|
3076
|
-
type: "object",
|
|
3077
|
-
properties: {
|
|
3078
|
-
"f-grid-is-sub": {
|
|
3079
|
-
description: "The class of sub-grid",
|
|
3080
|
-
type: "object",
|
|
3081
|
-
properties: {
|
|
3082
|
-
rules: {
|
|
3083
|
-
type: "object",
|
|
3084
|
-
properties: {
|
|
3085
|
-
canAccept: {
|
|
3086
|
-
type: "boolean",
|
|
3087
|
-
const: !0
|
|
3088
|
-
},
|
|
3089
|
-
fixed: {
|
|
3090
|
-
type: "boolean",
|
|
3091
|
-
const: !0
|
|
3092
|
-
},
|
|
3093
|
-
hidePadding: {
|
|
3094
|
-
type: "boolean",
|
|
3095
|
-
const: !1
|
|
3096
|
-
}
|
|
3097
|
-
}
|
|
3098
|
-
}
|
|
3099
|
-
}
|
|
3100
|
-
}
|
|
3101
|
-
}
|
|
3102
|
-
},
|
|
3103
|
-
rules: {
|
|
3104
|
-
type: "object",
|
|
3105
|
-
properties: {
|
|
3106
|
-
canAccept: {
|
|
3107
|
-
type: "boolean",
|
|
3108
|
-
const: !1
|
|
3109
|
-
},
|
|
3110
|
-
fixed: {
|
|
3111
|
-
type: "boolean",
|
|
3112
|
-
const: !1
|
|
3113
|
-
},
|
|
3114
|
-
hidePadding: {
|
|
3115
|
-
type: "boolean",
|
|
3116
|
-
const: !0
|
|
3117
|
-
}
|
|
3118
|
-
}
|
|
3119
|
-
}
|
|
3120
|
-
}
|
|
3121
|
-
}
|
|
3122
|
-
}
|
|
3123
|
-
},
|
|
3124
|
-
rules: {
|
|
3125
|
-
type: "object",
|
|
3126
|
-
properties: {
|
|
3127
|
-
canAccept: {
|
|
3128
|
-
type: "boolean",
|
|
3129
|
-
const: !1
|
|
3130
|
-
},
|
|
3131
|
-
fixed: {
|
|
3132
|
-
type: "boolean",
|
|
3133
|
-
const: !0
|
|
3134
|
-
},
|
|
3135
|
-
hidePadding: {
|
|
3136
|
-
type: "boolean",
|
|
3137
|
-
const: !0
|
|
3138
|
-
}
|
|
3139
|
-
}
|
|
3140
|
-
}
|
|
3141
|
-
}
|
|
3142
|
-
}
|
|
3143
|
-
}
|
|
3144
|
-
},
|
|
3145
|
-
rules: {
|
|
3146
|
-
type: "object",
|
|
3147
|
-
properties: {
|
|
3148
|
-
canAccept: {
|
|
3149
|
-
type: "boolean",
|
|
3150
|
-
const: !1
|
|
3151
|
-
},
|
|
3152
|
-
fixed: {
|
|
3153
|
-
type: "boolean",
|
|
3154
|
-
const: !0
|
|
3155
|
-
},
|
|
3156
|
-
hidePadding: {
|
|
3157
|
-
type: "boolean",
|
|
3158
|
-
const: !0
|
|
3159
|
-
}
|
|
3160
|
-
}
|
|
3161
|
-
}
|
|
3162
|
-
}
|
|
3163
|
-
},
|
|
3164
|
-
"f-section-in-main": {
|
|
3165
|
-
description: "The class of section which has wrapped a reponse-form component.",
|
|
3166
|
-
type: "object",
|
|
3167
|
-
properties: {
|
|
3168
|
-
rules: {
|
|
3169
|
-
type: "object",
|
|
3170
|
-
properties: {
|
|
3171
|
-
canAccept: {
|
|
3172
|
-
type: "boolean",
|
|
3173
|
-
const: !0
|
|
3174
|
-
},
|
|
3175
|
-
fixed: {
|
|
3176
|
-
type: "boolean",
|
|
3177
|
-
const: !0
|
|
3178
|
-
},
|
|
3179
|
-
hidePadding: {
|
|
3180
|
-
type: "boolean",
|
|
3181
|
-
const: !1
|
|
3182
|
-
}
|
|
3183
|
-
}
|
|
3184
|
-
}
|
|
3185
|
-
}
|
|
3186
|
-
}
|
|
3187
|
-
}
|
|
3188
|
-
},
|
|
3189
|
-
rules: {
|
|
3190
|
-
type: "object",
|
|
3191
|
-
properties: {
|
|
3192
|
-
canAccept: {
|
|
3193
|
-
type: "boolean",
|
|
3194
|
-
const: !1
|
|
3195
|
-
},
|
|
3196
|
-
fixed: {
|
|
3197
|
-
type: "boolean",
|
|
3198
|
-
const: !1
|
|
3199
|
-
},
|
|
3200
|
-
hidePadding: {
|
|
3201
|
-
type: "boolean",
|
|
3202
|
-
const: !0
|
|
3203
|
-
}
|
|
3204
|
-
}
|
|
3205
|
-
}
|
|
3206
|
-
}
|
|
3207
|
-
}
|
|
3208
|
-
}
|
|
3209
|
-
},
|
|
3210
|
-
rules: {
|
|
3211
|
-
type: "object",
|
|
3212
|
-
properties: {
|
|
3213
|
-
canAccept: {
|
|
3214
|
-
type: "boolean",
|
|
3215
|
-
const: !0
|
|
3216
|
-
},
|
|
3217
|
-
fixed: {
|
|
3218
|
-
type: "boolean",
|
|
3219
|
-
const: !0
|
|
3220
|
-
},
|
|
3221
|
-
hidePadding: {
|
|
3222
|
-
type: "object",
|
|
3223
|
-
const: {
|
|
3224
|
-
allOf: [
|
|
3225
|
-
{
|
|
3226
|
-
sibling: 0,
|
|
3227
|
-
parent: {
|
|
3228
|
-
"f-page-main": !0
|
|
3229
|
-
}
|
|
3230
|
-
}
|
|
3231
|
-
]
|
|
3232
|
-
}
|
|
3233
|
-
}
|
|
3234
|
-
}
|
|
3235
|
-
}
|
|
3236
|
-
}
|
|
3237
|
-
},
|
|
3238
|
-
"f-struct-data-grid": {
|
|
3239
|
-
description: "",
|
|
3240
|
-
type: "object",
|
|
3241
|
-
properties: {
|
|
3242
|
-
rules: {
|
|
3243
|
-
type: "object",
|
|
3244
|
-
properties: {
|
|
3245
|
-
canAccept: {
|
|
3246
|
-
type: "object",
|
|
3247
|
-
const: !0
|
|
3248
|
-
},
|
|
3249
|
-
fixed: {
|
|
3250
|
-
type: "boolean",
|
|
3251
|
-
const: !0
|
|
3252
|
-
},
|
|
3253
|
-
hidePadding: {
|
|
3254
|
-
type: "boolean",
|
|
3255
|
-
const: !0
|
|
3256
|
-
}
|
|
3257
|
-
}
|
|
3258
|
-
}
|
|
3259
|
-
}
|
|
3260
|
-
},
|
|
3261
|
-
"f-page-main-content": {
|
|
3262
|
-
description: "",
|
|
3263
|
-
type: "object",
|
|
3264
|
-
properties: {
|
|
3265
|
-
contents: {
|
|
3266
|
-
type: "object",
|
|
3267
|
-
properties: {
|
|
3268
|
-
"f-page-content-nav": {
|
|
3269
|
-
description: "",
|
|
3270
|
-
type: "object",
|
|
3271
|
-
properties: {
|
|
3272
|
-
contents: {
|
|
3273
|
-
type: "object",
|
|
3274
|
-
properties: {
|
|
3275
|
-
"f-struct-data-grid-in-nav": {
|
|
3276
|
-
description: "",
|
|
3277
|
-
type: "object",
|
|
3278
|
-
properties: {
|
|
3279
|
-
contents: {
|
|
3280
|
-
type: "object",
|
|
3281
|
-
properties: {
|
|
3282
|
-
"f-page-content-nav-extend": {
|
|
3283
|
-
description: "",
|
|
3284
|
-
type: "object"
|
|
3285
|
-
},
|
|
3286
|
-
"f-section-in-nav": {
|
|
3287
|
-
description: "",
|
|
3288
|
-
type: "object",
|
|
3289
|
-
properties: {
|
|
3290
|
-
rules: {
|
|
3291
|
-
type: "object",
|
|
3292
|
-
properties: {
|
|
3293
|
-
canAccept: {
|
|
3294
|
-
type: "boolean",
|
|
3295
|
-
const: !1
|
|
3296
|
-
},
|
|
3297
|
-
fixed: {
|
|
3298
|
-
type: "boolean",
|
|
3299
|
-
const: !0
|
|
3300
|
-
},
|
|
3301
|
-
hidePadding: {
|
|
3302
|
-
type: "boolean",
|
|
3303
|
-
const: !1
|
|
3304
|
-
}
|
|
3305
|
-
}
|
|
3306
|
-
}
|
|
3307
|
-
}
|
|
3308
|
-
}
|
|
3309
|
-
}
|
|
3310
|
-
},
|
|
3311
|
-
rules: {
|
|
3312
|
-
type: "object",
|
|
3313
|
-
properties: {
|
|
3314
|
-
canAccept: {
|
|
3315
|
-
type: "boolean",
|
|
3316
|
-
const: !0
|
|
3317
|
-
},
|
|
3318
|
-
fixed: {
|
|
3319
|
-
type: "boolean",
|
|
3320
|
-
const: !1
|
|
3321
|
-
},
|
|
3322
|
-
hidePadding: {
|
|
3323
|
-
type: "boolean",
|
|
3324
|
-
const: !0
|
|
3325
|
-
}
|
|
3326
|
-
}
|
|
3327
|
-
}
|
|
3328
|
-
}
|
|
3329
|
-
}
|
|
3330
|
-
}
|
|
3331
|
-
}
|
|
3332
|
-
}
|
|
3333
|
-
},
|
|
3334
|
-
"f-page-content-main": {
|
|
3335
|
-
description: "",
|
|
3336
|
-
type: "object",
|
|
3337
|
-
properties: {}
|
|
3338
|
-
}
|
|
3339
|
-
}
|
|
3340
|
-
}
|
|
3341
|
-
}
|
|
3342
|
-
},
|
|
3343
|
-
"f-page-content": {
|
|
3344
|
-
description: "",
|
|
3345
|
-
type: "object",
|
|
3346
|
-
properties: {
|
|
3347
|
-
contents: {
|
|
3348
|
-
type: "object",
|
|
3349
|
-
properties: {
|
|
3350
|
-
"f-page-content-nav": {
|
|
3351
|
-
description: "",
|
|
3352
|
-
type: "object",
|
|
3353
|
-
properties: {
|
|
3354
|
-
contents: {
|
|
3355
|
-
type: "object",
|
|
3356
|
-
properties: {
|
|
3357
|
-
"f-list-nav": {
|
|
3358
|
-
description: "",
|
|
3359
|
-
type: "object"
|
|
3360
|
-
},
|
|
3361
|
-
"f-list-nav-left": {
|
|
3362
|
-
description: "",
|
|
3363
|
-
type: "object"
|
|
3364
|
-
},
|
|
3365
|
-
"f-struct-data-grid-in-nav": {
|
|
3366
|
-
description: "",
|
|
3367
|
-
type: "object",
|
|
3368
|
-
properties: {
|
|
3369
|
-
contents: {
|
|
3370
|
-
type: "object",
|
|
3371
|
-
properties: {
|
|
3372
|
-
"f-section-form": {
|
|
3373
|
-
description: "",
|
|
3374
|
-
type: "object",
|
|
3375
|
-
properties: {
|
|
3376
|
-
rules: {
|
|
3377
|
-
type: "object",
|
|
3378
|
-
properties: {
|
|
3379
|
-
canAccept: {
|
|
3380
|
-
type: "boolean",
|
|
3381
|
-
const: !1
|
|
3382
|
-
},
|
|
3383
|
-
fixed: {
|
|
3384
|
-
type: "boolean",
|
|
3385
|
-
const: !0
|
|
3386
|
-
},
|
|
3387
|
-
hidePadding: {
|
|
3388
|
-
type: "boolean",
|
|
3389
|
-
const: !0
|
|
3390
|
-
}
|
|
3391
|
-
}
|
|
3392
|
-
}
|
|
3393
|
-
}
|
|
3394
|
-
},
|
|
3395
|
-
"f-section-grid": {
|
|
3396
|
-
description: "",
|
|
3397
|
-
type: "object",
|
|
3398
|
-
properties: {
|
|
3399
|
-
rules: {
|
|
3400
|
-
type: "object",
|
|
3401
|
-
properties: {
|
|
3402
|
-
canAccept: {
|
|
3403
|
-
type: "boolean",
|
|
3404
|
-
const: !1
|
|
3405
|
-
},
|
|
3406
|
-
fixed: {
|
|
3407
|
-
type: "boolean",
|
|
3408
|
-
const: !0
|
|
3409
|
-
},
|
|
3410
|
-
hidePadding: {
|
|
3411
|
-
type: "boolean",
|
|
3412
|
-
const: !0
|
|
3413
|
-
}
|
|
3414
|
-
}
|
|
3415
|
-
}
|
|
3416
|
-
}
|
|
3417
|
-
}
|
|
3418
|
-
}
|
|
3419
|
-
},
|
|
3420
|
-
rules: {
|
|
3421
|
-
type: "object",
|
|
3422
|
-
properties: {
|
|
3423
|
-
canAccept: {
|
|
3424
|
-
type: "boolean",
|
|
3425
|
-
const: !1
|
|
3426
|
-
},
|
|
3427
|
-
fixed: {
|
|
3428
|
-
type: "boolean",
|
|
3429
|
-
const: !0
|
|
3430
|
-
},
|
|
3431
|
-
hidePadding: {
|
|
3432
|
-
type: "boolean",
|
|
3433
|
-
const: !0
|
|
3434
|
-
}
|
|
3435
|
-
}
|
|
3436
|
-
}
|
|
3437
|
-
}
|
|
3438
|
-
}
|
|
3439
|
-
}
|
|
3440
|
-
}
|
|
3441
|
-
},
|
|
3442
|
-
rules: {
|
|
3443
|
-
type: "object",
|
|
3444
|
-
properties: {
|
|
3445
|
-
canAccept: {
|
|
3446
|
-
type: "boolean",
|
|
3447
|
-
const: !1
|
|
3448
|
-
},
|
|
3449
|
-
fixed: {
|
|
3450
|
-
type: "boolean",
|
|
3451
|
-
const: !0
|
|
3452
|
-
},
|
|
3453
|
-
hidePadding: {
|
|
3454
|
-
type: "boolean",
|
|
3455
|
-
const: !0
|
|
3456
|
-
}
|
|
3457
|
-
}
|
|
3458
|
-
}
|
|
3459
|
-
},
|
|
3460
|
-
"f-page-content-main": {
|
|
3461
|
-
description: "",
|
|
3462
|
-
type: "object",
|
|
3463
|
-
properties: {
|
|
3464
|
-
rules: {
|
|
3465
|
-
type: "object",
|
|
3466
|
-
properties: {
|
|
3467
|
-
canAccept: {
|
|
3468
|
-
type: "boolean",
|
|
3469
|
-
const: !1
|
|
3470
|
-
},
|
|
3471
|
-
fixed: {
|
|
3472
|
-
type: "boolean",
|
|
3473
|
-
const: !1
|
|
3474
|
-
},
|
|
3475
|
-
hidePadding: {
|
|
3476
|
-
type: "boolean",
|
|
3477
|
-
const: !0
|
|
3478
|
-
}
|
|
3479
|
-
}
|
|
3480
|
-
}
|
|
3481
|
-
}
|
|
3482
|
-
}
|
|
3483
|
-
}
|
|
3484
|
-
},
|
|
3485
|
-
rules: {
|
|
3486
|
-
type: "object",
|
|
3487
|
-
properties: {
|
|
3488
|
-
canAccept: {
|
|
3489
|
-
type: "boolean",
|
|
3490
|
-
const: !1
|
|
3491
|
-
},
|
|
3492
|
-
fixed: {
|
|
3493
|
-
type: "boolean",
|
|
3494
|
-
const: !0
|
|
3495
|
-
},
|
|
3496
|
-
hidePadding: {
|
|
3497
|
-
type: "boolean",
|
|
3498
|
-
const: !0
|
|
3499
|
-
}
|
|
3500
|
-
}
|
|
3501
|
-
}
|
|
3502
|
-
}
|
|
3503
|
-
}
|
|
3504
|
-
}
|
|
3505
|
-
},
|
|
3506
|
-
rules: {
|
|
3507
|
-
type: "object",
|
|
3508
|
-
properties: {
|
|
3509
|
-
canAccept: {
|
|
3510
|
-
type: "object",
|
|
3511
|
-
const: {
|
|
3512
|
-
anyOf: [
|
|
3513
|
-
{
|
|
3514
|
-
children: 0
|
|
3515
|
-
},
|
|
3516
|
-
{
|
|
3517
|
-
children: {
|
|
3518
|
-
length: {
|
|
3519
|
-
not: 1
|
|
3520
|
-
},
|
|
3521
|
-
"f-struct-like-card": !0
|
|
3522
|
-
}
|
|
3523
|
-
},
|
|
3524
|
-
{
|
|
3525
|
-
children: {
|
|
3526
|
-
"scroll-spy": !1,
|
|
3527
|
-
"f-page-content": !1,
|
|
3528
|
-
"f-struct-like-card": !1
|
|
3529
|
-
}
|
|
3530
|
-
}
|
|
3531
|
-
]
|
|
3532
|
-
}
|
|
3533
|
-
},
|
|
3534
|
-
fixed: {
|
|
3535
|
-
type: "boolean",
|
|
3536
|
-
const: !0
|
|
3537
|
-
},
|
|
3538
|
-
hidePadding: {
|
|
3539
|
-
type: "boolean",
|
|
3540
|
-
const: !0
|
|
3541
|
-
}
|
|
3542
|
-
}
|
|
3543
|
-
}
|
|
3544
|
-
}
|
|
3545
|
-
},
|
|
3546
|
-
"f-page-footer": {
|
|
3547
|
-
description: "The class of page footer designed by farris.",
|
|
3548
|
-
type: "string"
|
|
3549
|
-
}
|
|
3550
|
-
}
|
|
3551
|
-
},
|
|
3552
|
-
rules: {
|
|
3553
|
-
type: "object",
|
|
3554
|
-
properties: {
|
|
3555
|
-
canAccept: {
|
|
3556
|
-
type: "boolean",
|
|
3557
|
-
const: !1
|
|
3558
|
-
},
|
|
3559
|
-
fixed: {
|
|
3560
|
-
type: "boolean",
|
|
3561
|
-
const: !0
|
|
3562
|
-
},
|
|
3563
|
-
hidePadding: {
|
|
3564
|
-
type: "boolean",
|
|
3565
|
-
const: !0
|
|
3566
|
-
}
|
|
3567
|
-
}
|
|
3568
|
-
}
|
|
3569
|
-
}
|
|
3570
|
-
},
|
|
3571
|
-
"f-page-is-managelist": {
|
|
3572
|
-
description: "The root class of mangement list page.",
|
|
3573
|
-
type: "string"
|
|
3574
|
-
},
|
|
3575
|
-
"f-page-card": {
|
|
3576
|
-
description: "",
|
|
3577
|
-
type: "object"
|
|
3578
|
-
},
|
|
3579
|
-
"f-page-is-mainsubcard": {
|
|
3580
|
-
description: "",
|
|
3581
|
-
type: "object"
|
|
3582
|
-
}
|
|
3583
|
-
}, Kn = {
|
|
3584
|
-
$schema: zn,
|
|
3585
|
-
$id: Xn,
|
|
3586
|
-
title: Jn,
|
|
3587
|
-
description: Qn,
|
|
3588
|
-
type: Yn,
|
|
3589
|
-
properties: Zn
|
|
3590
|
-
}, Y = /* @__PURE__ */ new Map();
|
|
3591
|
-
function eo() {
|
|
3592
|
-
function e(u, m, p, y) {
|
|
3593
|
-
var S;
|
|
3594
|
-
if (typeof p == "number")
|
|
3595
|
-
return ((S = y[u]) == null ? void 0 : S.length) === p;
|
|
3596
|
-
if (typeof p == "object") {
|
|
3597
|
-
const k = Object.keys(p)[0], j = p[k];
|
|
3598
|
-
if (k === "not")
|
|
3599
|
-
return Number(y[u].length) !== Number(j);
|
|
3600
|
-
if (k === "moreThan")
|
|
3601
|
-
return Number(y[u].length) >= Number(j);
|
|
3602
|
-
if (k === "lessThan")
|
|
3603
|
-
return Number(y[u].length) <= Number(j);
|
|
3604
|
-
}
|
|
3605
|
-
return !1;
|
|
3606
|
-
}
|
|
3607
|
-
function t(u, m, p, y) {
|
|
3608
|
-
return typeof p == "boolean" ? y.childrenClassList.includes(m) === !!p : !1;
|
|
3609
|
-
}
|
|
3610
|
-
function n(u, m, p, y) {
|
|
3611
|
-
return typeof p == "boolean" ? y.parentClassList.includes(m) === !!p : !1;
|
|
3612
|
-
}
|
|
3613
|
-
function o(u, m, p, y) {
|
|
3614
|
-
return typeof p == "boolean" ? y.parentClassList.includes(m) === !!p : !1;
|
|
3615
|
-
}
|
|
3616
|
-
const a = /* @__PURE__ */ new Map([
|
|
3617
|
-
["length", e],
|
|
3618
|
-
["hasChildren", t],
|
|
3619
|
-
["hasSibling", o],
|
|
3620
|
-
["hasParent", n]
|
|
3621
|
-
]);
|
|
3622
|
-
function r(u, m) {
|
|
3623
|
-
const p = u;
|
|
3624
|
-
return typeof m == "number" ? [{ target: p, operator: "length", param: null, value: Number(m) }] : typeof m == "object" ? Object.keys(m).map((y) => {
|
|
3625
|
-
if (y === "length")
|
|
3626
|
-
return { target: p, operator: "length", param: null, value: m[y] };
|
|
3627
|
-
const S = y, k = m[y];
|
|
3628
|
-
return { target: p, operator: u === "children" ? "hasChildren" : u === "parent" ? "hasParent" : "hasSibling", param: S, value: k };
|
|
3629
|
-
}) : [];
|
|
3630
|
-
}
|
|
3631
|
-
function s(u, m) {
|
|
3632
|
-
if (a.has(u.operator)) {
|
|
3633
|
-
const p = a.get(u.operator);
|
|
3634
|
-
return p && p(u.target, u.param, u.value, m) || !1;
|
|
3635
|
-
}
|
|
3636
|
-
return !1;
|
|
3637
|
-
}
|
|
3638
|
-
function f(u, m) {
|
|
3639
|
-
return Object.keys(u).reduce((k, j) => {
|
|
3640
|
-
const w = r(j, u[j]);
|
|
3641
|
-
return k.push(...w), k;
|
|
3642
|
-
}, []).reduce((k, j) => k && s(j, m), !0);
|
|
3643
|
-
}
|
|
3644
|
-
function c(u, m) {
|
|
3645
|
-
const p = Object.keys(u), y = p.includes("allOf"), S = p.includes("anyOf"), k = y || S, b = (k ? u[k ? y ? "allOf" : "anyOf" : "allOf"] : [u]).map((F) => f(F, m));
|
|
3646
|
-
return y ? !b.includes(!1) : b.includes(!0);
|
|
3647
|
-
}
|
|
3648
|
-
function l(u, m) {
|
|
3649
|
-
const p = u.const;
|
|
3650
|
-
return p ? typeof p == "boolean" ? p : typeof p == "object" ? c(p, m) : !1 : !1;
|
|
3651
|
-
}
|
|
3652
|
-
function g(u) {
|
|
3653
|
-
return (m) => {
|
|
3654
|
-
const p = { canAccept: !0, fixed: !1, hidePadding: !1 };
|
|
3655
|
-
return u && u.properties && Object.keys(u.properties).reduce((y, S) => {
|
|
3656
|
-
const k = u.properties[S];
|
|
3657
|
-
return y[S] = l(k, m), y;
|
|
3658
|
-
}, p), p;
|
|
3659
|
-
};
|
|
3660
|
-
}
|
|
3661
|
-
function i(u, m, p) {
|
|
3662
|
-
if (m.type === "object" && m.properties) {
|
|
3663
|
-
const { rules: y, contents: S } = m.properties;
|
|
3664
|
-
p.set(u, g(y)), S && Object.keys(S.properties).forEach(
|
|
3665
|
-
(k) => i(k, S.properties[k], p)
|
|
3666
|
-
);
|
|
3667
|
-
}
|
|
3668
|
-
}
|
|
3669
|
-
function d() {
|
|
3670
|
-
const { properties: u } = Kn;
|
|
3671
|
-
Object.keys(u).forEach((m) => {
|
|
3672
|
-
i(m, u[m], Y);
|
|
3673
|
-
});
|
|
3674
|
-
}
|
|
3675
|
-
function C(u, m) {
|
|
3676
|
-
const p = { canAccept: !0, fixed: !1, hidePadding: !0 };
|
|
3677
|
-
return Y.has(u) ? Y.get(u)(m) : p;
|
|
3678
|
-
}
|
|
3679
|
-
return d(), { getRuleValue: C };
|
|
3680
|
-
}
|
|
3681
|
-
function to(e, t) {
|
|
3682
|
-
function n(c, l = null) {
|
|
3683
|
-
if (l) return l;
|
|
3684
|
-
const g = e.getComponentById(t);
|
|
3685
|
-
return e.selectNode(g, (i) => i.id === c);
|
|
3686
|
-
}
|
|
3687
|
-
function o(c) {
|
|
3688
|
-
const l = e.getComponentById(c);
|
|
3689
|
-
return !(!l || !l.componentType || !l.componentType.startsWith("form"));
|
|
3690
|
-
}
|
|
3691
|
-
function a(c) {
|
|
3692
|
-
const l = n(c.id), g = ye(e), i = [];
|
|
3693
|
-
g.getResonseFormLayoutConfig(l, i, 1);
|
|
3694
|
-
const d = i.map((j) => j.columnInSM), C = i.map((j) => j.columnInMD), u = i.map((j) => j.columnInLG), m = i.map((j) => j.columnInEL), p = r(d) ? d[0] : 0, y = r(C) ? C[0] : 0, S = r(u) ? u[0] : 0, k = r(m) ? m[0] : 0;
|
|
3695
|
-
return {
|
|
3696
|
-
uniqueColClassInSM: p,
|
|
3697
|
-
uniqueColClassInMD: y,
|
|
3698
|
-
uniqueColClassInLG: S,
|
|
3699
|
-
uniqueColClassInEL: k
|
|
3700
|
-
};
|
|
3701
|
-
}
|
|
3702
|
-
function r(c) {
|
|
3703
|
-
const l = new Set(c);
|
|
3704
|
-
return Array.from(l).length === 1;
|
|
3705
|
-
}
|
|
3706
|
-
function s(c, l, g) {
|
|
3707
|
-
c = n(g, c), c.contents.forEach((i) => {
|
|
3708
|
-
if (i.type === tt.fieldset.type) {
|
|
3709
|
-
s(i, l, i.id);
|
|
3710
|
-
return;
|
|
3711
|
-
}
|
|
3712
|
-
i.appearance || (i.appearance = {});
|
|
3713
|
-
const d = i.appearance.class;
|
|
3714
|
-
i.appearance.class = f(d, l);
|
|
3715
|
-
});
|
|
3716
|
-
}
|
|
3717
|
-
function f(c, l) {
|
|
3718
|
-
let g, i, d, C, u = [];
|
|
3719
|
-
if (c) {
|
|
3720
|
-
const j = c.split(" "), w = j.filter((b) => b.startsWith("col-"));
|
|
3721
|
-
g = w.find((b) => /^col-([1-9]|10|11|12)$/.test(b)), i = w.find((b) => /^col-md-([1-9]|10|11|12)$/.test(b)), d = w.find((b) => /^col-xl-([1-9]|10|11|12)$/.test(b)), C = w.find((b) => /^col-el-([1-9]|10|11|12)$/.test(b)), u = j.filter((b) => !b.startsWith("col-"));
|
|
3722
|
-
}
|
|
3723
|
-
const m = l.uniqueColClassInSM ? "col-" + l.uniqueColClassInSM : g, p = l.uniqueColClassInMD ? "col-md-" + l.uniqueColClassInMD : i, y = l.uniqueColClassInLG ? "col-xl-" + l.uniqueColClassInLG : d, S = l.uniqueColClassInEL ? "col-el-" + l.uniqueColClassInEL : C;
|
|
3724
|
-
return [m, p, y, S].concat(u).join(" ");
|
|
3725
|
-
}
|
|
3726
|
-
return { checkIsInFormComponent: o, assembleUnifiedLayoutContext: a, changeFormControlsByUnifiedLayoutConfig: s };
|
|
3727
|
-
}
|
|
3728
|
-
class no extends et {
|
|
3729
|
-
constructor(t, n) {
|
|
3730
|
-
super(t, n);
|
|
3731
|
-
}
|
|
3732
|
-
getPropertyConfig(t, n) {
|
|
3733
|
-
var o = this;
|
|
3734
|
-
this.propertyConfig.categories.basic = this.getBasicPropConfig(t);
|
|
3735
|
-
const { checkIsInFormComponent: a, assembleUnifiedLayoutContext: r, changeFormControlsByUnifiedLayoutConfig: s } = to(this.formSchemaUtils, this.componentId), f = this.getAppearanceConfig(t);
|
|
3736
|
-
return f.properties.unifiedLayout = {
|
|
3737
|
-
title: "统一布局配置",
|
|
3738
|
-
description: "统一配置卡片区域内所有控件的宽度,只支持标准模式",
|
|
3739
|
-
visible: a(this.componentId),
|
|
3740
|
-
refreshPanelAfterChanged: !0,
|
|
3741
|
-
editor: {
|
|
3742
|
-
type: "response-form-layout-setting",
|
|
3743
|
-
initialState: r(t)
|
|
3744
|
-
}
|
|
3745
|
-
}, f.setPropertyRelates = function(c, l) {
|
|
3746
|
-
if (c)
|
|
3747
|
-
switch (c && c.propertyID) {
|
|
3748
|
-
case "unifiedLayout": {
|
|
3749
|
-
s(null, c.propertyValue, t.id), o.updateElementByParentContainer(t.id, n);
|
|
3750
|
-
break;
|
|
3751
|
-
}
|
|
3752
|
-
}
|
|
3753
|
-
}, this.propertyConfig.categories.appearance = f, this.propertyConfig;
|
|
3754
|
-
}
|
|
3755
|
-
}
|
|
3756
|
-
function oo(e, t) {
|
|
3757
|
-
var F;
|
|
3758
|
-
const n = e.schema, o = (F = e.parent) == null ? void 0 : F.schema, a = eo(), r = v(!1), s = v(!1);
|
|
3759
|
-
let f = !0, c = !1, l, g = !1;
|
|
3760
|
-
function i(I) {
|
|
3761
|
-
return l && l.componentClassList && l.componentClassList.includes("f-form-layout") && l.componentClassList.includes("farris-form") ? I.sourceType === "control" && I.controlCategory === "input" || I.sourceType === "move" && I.controlType === "form-group" : !0;
|
|
3762
|
-
}
|
|
3763
|
-
function d(I) {
|
|
3764
|
-
return !(!_n().basalDragulaRuleForContainer(I) || !f || !i(I));
|
|
3765
|
-
}
|
|
3766
|
-
function C() {
|
|
3767
|
-
r.value = !1, s.value = !1;
|
|
3768
|
-
const I = n, O = I.appearance && I.appearance.class || "", M = O.split(" "), D = I.contents || [], P = D.length ? D[0] : null, L = P && P.appearance ? P.appearance.class : "", E = L ? L.split(" ") : [], A = D.length ? D.reduce((ie, J) => {
|
|
3769
|
-
const le = J && J.appearance ? J.appearance.class : "", Be = le ? le.split(" ") : [];
|
|
3770
|
-
return ie.push(...Be), ie;
|
|
3771
|
-
}, []) : [], $ = o, X = $ && $.appearance && $.appearance.class || "", Fe = X ? X.split(" ") : [];
|
|
3772
|
-
l = {
|
|
3773
|
-
componentClass: O,
|
|
3774
|
-
componentClassList: M,
|
|
3775
|
-
childContents: D,
|
|
3776
|
-
firstChildContent: P,
|
|
3777
|
-
firstChildClass: L,
|
|
3778
|
-
firstChildClassList: E,
|
|
3779
|
-
parent: $,
|
|
3780
|
-
parentClass: X,
|
|
3781
|
-
parentClassList: Fe,
|
|
3782
|
-
children: D,
|
|
3783
|
-
childrenClassList: A
|
|
3784
|
-
};
|
|
3785
|
-
const { canAccept: Ie, fixed: Me, hidePadding: je } = a.getRuleValue(M[0], l);
|
|
3786
|
-
return f = Ie, c = je, g = Me, !0;
|
|
3787
|
-
}
|
|
3788
|
-
function u(I) {
|
|
3789
|
-
Z();
|
|
3790
|
-
}
|
|
3791
|
-
function m() {
|
|
3792
|
-
return n.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
|
|
3793
|
-
}
|
|
3794
|
-
function p(I, O) {
|
|
3795
|
-
const M = n;
|
|
3796
|
-
if ((M.appearance && M.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
3797
|
-
const { label: L } = I, E = H("form-group");
|
|
3798
|
-
return E.editor = O, E.label = L, y(E), delete E.editor.id, delete E.editor.binding, delete E.editor.appearance, delete E.editor.visible, E;
|
|
3799
|
-
}
|
|
3800
|
-
return O;
|
|
3801
|
-
}
|
|
3802
|
-
function y(I) {
|
|
3803
|
-
const O = e.componentInstance.value.getBelongedComponentInstance(e.componentInstance);
|
|
3804
|
-
if (O && O.schema && O.schema.componentType) {
|
|
3805
|
-
const M = O.schema.formColumns;
|
|
3806
|
-
let D = S(M);
|
|
3807
|
-
D = t.formSchemaUtils.getControlClassByFormUnifiedLayout(D, "", e.schema), I.appearance || (I.appearance = {}), I.appearance.class = D;
|
|
3808
|
-
}
|
|
3809
|
-
}
|
|
3810
|
-
function S(I) {
|
|
3811
|
-
let O = "";
|
|
3812
|
-
switch (I) {
|
|
3813
|
-
case 1: {
|
|
3814
|
-
O = "col-12 col-md-12 col-xl-12 col-el-12";
|
|
3815
|
-
break;
|
|
3816
|
-
}
|
|
3817
|
-
case 2: {
|
|
3818
|
-
O = "col-12 col-md-6 col-xl-6 col-el-6";
|
|
3819
|
-
break;
|
|
3820
|
-
}
|
|
3821
|
-
case 3: {
|
|
3822
|
-
O = "col-12 col-md-6 col-xl-4 col-el-4";
|
|
3823
|
-
break;
|
|
3824
|
-
}
|
|
3825
|
-
case 4: {
|
|
3826
|
-
O = "col-12 col-md-6 col-xl-3 col-el-2";
|
|
3827
|
-
break;
|
|
3828
|
-
}
|
|
3829
|
-
}
|
|
3830
|
-
return O;
|
|
3831
|
-
}
|
|
3832
|
-
function k(I, O, M) {
|
|
3833
|
-
const D = n;
|
|
3834
|
-
if ((D.appearance && D.appearance.class || "").split(" ").includes("f-form-layout")) {
|
|
3835
|
-
const E = String(I.innerText), A = H("form-group");
|
|
3836
|
-
return A.editor = M, A.label = E, A;
|
|
3837
|
-
}
|
|
3838
|
-
return M;
|
|
3839
|
-
}
|
|
3840
|
-
function j() {
|
|
3841
|
-
return !g;
|
|
3842
|
-
}
|
|
3843
|
-
function w() {
|
|
3844
|
-
return !g;
|
|
3845
|
-
}
|
|
3846
|
-
function b() {
|
|
3847
|
-
return c;
|
|
3848
|
-
}
|
|
3849
|
-
function T(I) {
|
|
3850
|
-
return new no(I, t).getPropertyConfig(n, e.componentInstance.value);
|
|
3851
|
-
}
|
|
3852
|
-
return {
|
|
3853
|
-
canAccepts: d,
|
|
3854
|
-
checkCanDeleteComponent: w,
|
|
3855
|
-
checkCanMoveComponent: j,
|
|
3856
|
-
getStyles: m,
|
|
3857
|
-
getPropsConfig: T,
|
|
3858
|
-
hideNestedPaddingInDesginerView: b,
|
|
3859
|
-
onAcceptNewChildElement: k,
|
|
3860
|
-
onAcceptMovedChildElement: u,
|
|
3861
|
-
resolveComponentContext: C,
|
|
3862
|
-
onResolveNewComponentSchema: p,
|
|
3863
|
-
triggerBelongedComponentToMoveWhenMoved: r,
|
|
3864
|
-
triggerBelongedComponentToDeleteWhenDeleted: s
|
|
3865
|
-
};
|
|
3005
|
+
styles: l,
|
|
3006
|
+
designerClass: i,
|
|
3007
|
+
canAccepts: s,
|
|
3008
|
+
getBelongedComponentInstance: u,
|
|
3009
|
+
getDraggableDesignItemElement: o,
|
|
3010
|
+
getDraggingDisplayText: g,
|
|
3011
|
+
getPropConfig: S,
|
|
3012
|
+
getDragScopeElement: y,
|
|
3013
|
+
onAcceptMovedChildElement: d,
|
|
3014
|
+
onChildElementMovedOut: v,
|
|
3015
|
+
addNewChildComponentSchema: f,
|
|
3016
|
+
triggerBelongedComponentToMoveWhenMoved: b(!1),
|
|
3017
|
+
triggerBelongedComponentToDeleteWhenDeleted: b(!1),
|
|
3018
|
+
onRemoveComponent: w
|
|
3019
|
+
}, a;
|
|
3866
3020
|
}
|
|
3867
|
-
const
|
|
3021
|
+
const $n = /* @__PURE__ */ x({
|
|
3868
3022
|
name: "FOrderDesign",
|
|
3869
|
-
props:
|
|
3023
|
+
props: K,
|
|
3870
3024
|
emits: ["change"],
|
|
3871
3025
|
setup(e, t) {
|
|
3872
|
-
|
|
3873
|
-
const n = v(e.items), o = v("排序列"), a = v("排序方式"), r = v("添加排序列"), s = [{
|
|
3026
|
+
const n = b(e.items), l = b("排序列"), i = b("排序方式"), a = b("添加排序列"), r = [{
|
|
3874
3027
|
id: "asc",
|
|
3875
3028
|
name: "升序"
|
|
3876
3029
|
}, {
|
|
3877
3030
|
id: "desc",
|
|
3878
3031
|
name: "降序"
|
|
3879
|
-
}],
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
}), t.expose(
|
|
3883
|
-
function
|
|
3884
|
-
const w = n.value.map((
|
|
3885
|
-
|
|
3032
|
+
}], c = b(/* @__PURE__ */ new Map()), m = b(), p = N("design-item-context"), u = En(m, p);
|
|
3033
|
+
J(() => {
|
|
3034
|
+
m.value.componentInstance = u;
|
|
3035
|
+
}), t.expose(u.value);
|
|
3036
|
+
function o() {
|
|
3037
|
+
const w = n.value.map((M) => [M.id, !0]);
|
|
3038
|
+
c.value = new Map(w);
|
|
3886
3039
|
}
|
|
3887
|
-
|
|
3888
|
-
const
|
|
3040
|
+
o();
|
|
3041
|
+
const s = B(() => e.dataSource.map((w) => (w.disabled = c.value.has(w.id), w))), g = B(() => ({
|
|
3889
3042
|
"f-order": !0
|
|
3890
3043
|
}));
|
|
3891
|
-
function
|
|
3892
|
-
n.value = n.value.filter((
|
|
3044
|
+
function y(w) {
|
|
3045
|
+
n.value = n.value.filter((M) => M.id !== w.id), o(), t.emit("change", n.value);
|
|
3893
3046
|
}
|
|
3894
|
-
function
|
|
3047
|
+
function d() {
|
|
3895
3048
|
n.value = [...n.value, {
|
|
3896
3049
|
id: Date.now().toString(),
|
|
3897
3050
|
name: "",
|
|
3898
3051
|
order: "asc"
|
|
3899
|
-
}],
|
|
3052
|
+
}], o(), t.emit("change", n.value);
|
|
3900
3053
|
}
|
|
3901
|
-
function
|
|
3902
|
-
|
|
3054
|
+
function f(w) {
|
|
3055
|
+
o(), t.emit("change", n.value);
|
|
3903
3056
|
}
|
|
3904
|
-
function
|
|
3057
|
+
function v(w) {
|
|
3905
3058
|
if (w && w.length) {
|
|
3906
|
-
const
|
|
3907
|
-
w.reduce((
|
|
3059
|
+
const M = /* @__PURE__ */ new Map();
|
|
3060
|
+
w.reduce((C, k) => (C.set(k.id, k), C), M), n.value = w.map((C) => M.get(C.id)), t.emit("change", n.value);
|
|
3908
3061
|
}
|
|
3909
3062
|
}
|
|
3910
|
-
function
|
|
3911
|
-
return h(
|
|
3063
|
+
function S() {
|
|
3064
|
+
return h(fe, {
|
|
3912
3065
|
style: "flex:1",
|
|
3913
3066
|
data: n.value,
|
|
3914
3067
|
draggable: !0,
|
|
3915
3068
|
view: "DraggableView",
|
|
3916
3069
|
"keep-order": !0,
|
|
3917
3070
|
itemClass: "f-order-item",
|
|
3918
|
-
onRemoveItem:
|
|
3919
|
-
onChange:
|
|
3071
|
+
onRemoveItem: y,
|
|
3072
|
+
onChange: v
|
|
3920
3073
|
}, {
|
|
3921
3074
|
header: () => h("div", {
|
|
3922
3075
|
class: "f-order-header"
|
|
3923
3076
|
}, [h("span", {
|
|
3924
3077
|
class: "f-order-header-order-field"
|
|
3925
|
-
}, [
|
|
3078
|
+
}, [l.value]), h("span", {
|
|
3926
3079
|
class: "f-order-header-order-type"
|
|
3927
|
-
}, [
|
|
3080
|
+
}, [i.value])]),
|
|
3928
3081
|
itemContent: (w) => h("div", {
|
|
3929
3082
|
class: "f-order-item-content"
|
|
3930
|
-
}, [h(
|
|
3083
|
+
}, [h(W, {
|
|
3931
3084
|
class: "f-order-item-content-order-field",
|
|
3932
|
-
data:
|
|
3085
|
+
data: s.value,
|
|
3933
3086
|
valueField: "id",
|
|
3934
3087
|
textField: "name",
|
|
3935
3088
|
idField: "id",
|
|
3936
3089
|
modelValue: w.id,
|
|
3937
|
-
"onUpdate:modelValue": (
|
|
3938
|
-
onChange:
|
|
3939
|
-
onClear:
|
|
3940
|
-
}, null), h(
|
|
3090
|
+
"onUpdate:modelValue": (M) => w.id = M,
|
|
3091
|
+
onChange: f,
|
|
3092
|
+
onClear: f
|
|
3093
|
+
}, null), h(W, {
|
|
3941
3094
|
class: "f-order-item-content-order-type",
|
|
3942
|
-
data:
|
|
3095
|
+
data: r,
|
|
3943
3096
|
valueField: "id",
|
|
3944
3097
|
textField: "name",
|
|
3945
3098
|
idField: "id",
|
|
3946
3099
|
modelValue: w.order,
|
|
3947
|
-
"onUpdate:modelValue": (
|
|
3948
|
-
onChange:
|
|
3100
|
+
"onUpdate:modelValue": (M) => w.order = M,
|
|
3101
|
+
onChange: f
|
|
3949
3102
|
}, null)]),
|
|
3950
3103
|
footer: () => h("div", {
|
|
3951
3104
|
class: "f-order-footer"
|
|
3952
|
-
}, [h(
|
|
3105
|
+
}, [h(me, {
|
|
3953
3106
|
type: "link",
|
|
3954
3107
|
class: "f-order-add-button",
|
|
3955
|
-
onClick:
|
|
3108
|
+
onClick: d
|
|
3956
3109
|
}, {
|
|
3957
|
-
default: () => h(
|
|
3110
|
+
default: () => h(X, null, [h("span", {
|
|
3958
3111
|
class: "f-order-add-icon"
|
|
3959
3112
|
}, [h("i", {
|
|
3960
3113
|
class: "f-icon f-icon-add"
|
|
3961
|
-
}, null)]),
|
|
3114
|
+
}, null)]), a.value])
|
|
3962
3115
|
})])
|
|
3963
3116
|
});
|
|
3964
3117
|
}
|
|
3965
3118
|
return () => h("div", {
|
|
3966
|
-
ref:
|
|
3967
|
-
class:
|
|
3968
|
-
}, [
|
|
3119
|
+
ref: m,
|
|
3120
|
+
class: g.value
|
|
3121
|
+
}, [S()]);
|
|
3969
3122
|
}
|
|
3970
|
-
}),
|
|
3123
|
+
}), Wn = {
|
|
3971
3124
|
install(e) {
|
|
3972
|
-
e.component(
|
|
3125
|
+
e.component(z.name, z);
|
|
3973
3126
|
},
|
|
3974
|
-
register(e, t, n,
|
|
3975
|
-
e.order =
|
|
3127
|
+
register(e, t, n, l) {
|
|
3128
|
+
e.order = z, t.order = le;
|
|
3976
3129
|
},
|
|
3977
3130
|
registerDesigner(e, t, n) {
|
|
3978
|
-
e.order =
|
|
3131
|
+
e.order = $n, t.order = le;
|
|
3979
3132
|
}
|
|
3980
3133
|
};
|
|
3981
3134
|
export {
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3135
|
+
z as FOrder,
|
|
3136
|
+
Wn as default,
|
|
3137
|
+
K as orderProps,
|
|
3138
|
+
le as propsResolver
|
|
3986
3139
|
};
|