@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,116 +1,121 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { isPlainObject as
|
|
3
|
-
import { useIdentify as re, useHierarchy as ce, useGroupData as ue, usePagination as fe, useDataView as de, useSelection as pe, useEdit as ve, useVisualDataBound as
|
|
4
|
-
import { FCheckBox as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { ref as g, computed as $, createVNode as n, Fragment as B, watch as J, withModifiers as ne, withDirectives as le, vModelText as se, defineComponent as N, createTextVNode as _, inject as ae, onMounted as oe } from "vue";
|
|
2
|
+
import { isPlainObject as U, cloneDeep as ie } from "lodash-es";
|
|
3
|
+
import { useIdentify as re, useHierarchy as ce, useGroupData as ue, usePagination as fe, useDataView as de, useSelection as pe, useEdit as ve, useVisualDataBound as he, useVisualDataCell as ge, useVisualDataRow as me, useVisualGroupRow as ye, useVisualSummaryRow as we, useVisualData as Se } from "../data-view/index.esm.js";
|
|
4
|
+
import { FCheckBox as G } from "../checkbox/index.esm.js";
|
|
5
|
+
import { withInstall as be } from "../common/index.esm.js";
|
|
6
|
+
const Q = {}, Y = {};
|
|
7
|
+
function q(t) {
|
|
8
|
+
const { properties: e, title: l, ignore: c } = t, p = c && Array.isArray(c), s = Object.keys(e).reduce((o, m) => ((!p || !c.find((i) => i === m)) && (o[m] = e[m].type === "object" && e[m].properties ? q(e[m]) : ie(e[m].default)), o), {});
|
|
9
|
+
if (l && (!p || !c.find((o) => o === "id"))) {
|
|
10
|
+
const o = l.toLowerCase().replace(/-/g, "_");
|
|
11
|
+
s.id = `${o}_${Math.random().toString().slice(2, 6)}`;
|
|
12
|
+
}
|
|
13
|
+
return s;
|
|
9
14
|
}
|
|
10
|
-
function
|
|
11
|
-
const
|
|
12
|
-
if (
|
|
13
|
-
let
|
|
14
|
-
const
|
|
15
|
-
return
|
|
15
|
+
function Z(t, e = {}, l) {
|
|
16
|
+
const c = Q[t];
|
|
17
|
+
if (c) {
|
|
18
|
+
let p = q(c);
|
|
19
|
+
const s = Y[t];
|
|
20
|
+
return p = s ? s({ getSchemaByType: Z }, p, e, l) : p, p;
|
|
16
21
|
}
|
|
17
22
|
return null;
|
|
18
23
|
}
|
|
19
|
-
function
|
|
20
|
-
const
|
|
21
|
-
return Object.keys(
|
|
24
|
+
function Ce(t, e) {
|
|
25
|
+
const l = q(e);
|
|
26
|
+
return Object.keys(l).reduce((c, p) => (c[p] && U(c[p]) && U(t[p] || !t[p]) ? Object.assign(c[p], t[p] || {}) : c[p] = t[p], c), l), l;
|
|
22
27
|
}
|
|
23
|
-
function
|
|
24
|
-
return Object.keys(t).filter((
|
|
25
|
-
if (e.has(
|
|
26
|
-
const
|
|
27
|
-
if (typeof
|
|
28
|
-
|
|
28
|
+
function ke(t, e) {
|
|
29
|
+
return Object.keys(t).filter((c) => t[c] != null).reduce((c, p) => {
|
|
30
|
+
if (e.has(p)) {
|
|
31
|
+
const s = e.get(p);
|
|
32
|
+
if (typeof s == "string")
|
|
33
|
+
c[s] = t[p];
|
|
29
34
|
else {
|
|
30
|
-
const
|
|
31
|
-
Object.assign(
|
|
35
|
+
const o = s(p, t[p], t);
|
|
36
|
+
Object.assign(c, o);
|
|
32
37
|
}
|
|
33
38
|
} else
|
|
34
|
-
|
|
35
|
-
return
|
|
39
|
+
c[p] = t[p];
|
|
40
|
+
return c;
|
|
36
41
|
}, {});
|
|
37
42
|
}
|
|
38
|
-
function
|
|
39
|
-
const
|
|
40
|
-
return
|
|
43
|
+
function Me(t, e, l = /* @__PURE__ */ new Map()) {
|
|
44
|
+
const c = Ce(t, e);
|
|
45
|
+
return ke(c, l);
|
|
41
46
|
}
|
|
42
|
-
function
|
|
43
|
-
function e(
|
|
44
|
-
if (typeof
|
|
45
|
-
return
|
|
46
|
-
if (typeof
|
|
47
|
-
const
|
|
48
|
-
if (
|
|
49
|
-
return Number(
|
|
50
|
-
if (
|
|
51
|
-
return Number(
|
|
52
|
-
if (
|
|
53
|
-
return Number(
|
|
47
|
+
function Ve(t = {}) {
|
|
48
|
+
function e(d, u, a, r) {
|
|
49
|
+
if (typeof a == "number")
|
|
50
|
+
return r[d].length === a;
|
|
51
|
+
if (typeof a == "object") {
|
|
52
|
+
const V = Object.keys(a)[0], S = a[V];
|
|
53
|
+
if (V === "not")
|
|
54
|
+
return Number(r[d].length) !== Number(S);
|
|
55
|
+
if (V === "moreThan")
|
|
56
|
+
return Number(r[d].length) >= Number(S);
|
|
57
|
+
if (V === "lessThan")
|
|
58
|
+
return Number(r[d].length) <= Number(S);
|
|
54
59
|
}
|
|
55
60
|
return !1;
|
|
56
61
|
}
|
|
57
|
-
function
|
|
58
|
-
return
|
|
62
|
+
function l(d, u, a, r) {
|
|
63
|
+
return r[d] && r[d].propertyValue && String(r[d].propertyValue.value) === String(a);
|
|
59
64
|
}
|
|
60
|
-
const
|
|
65
|
+
const c = /* @__PURE__ */ new Map([
|
|
61
66
|
["length", e],
|
|
62
|
-
["getProperty",
|
|
67
|
+
["getProperty", l]
|
|
63
68
|
]);
|
|
64
|
-
Object.keys(t).reduce((
|
|
65
|
-
function
|
|
66
|
-
const
|
|
67
|
-
return typeof
|
|
68
|
-
if (
|
|
69
|
-
return { target:
|
|
70
|
-
const
|
|
71
|
-
return { target:
|
|
69
|
+
Object.keys(t).reduce((d, u) => (d.set(u, t[u]), d), c);
|
|
70
|
+
function p(d, u) {
|
|
71
|
+
const a = d;
|
|
72
|
+
return typeof u == "number" ? [{ target: a, operator: "length", param: null, value: Number(u) }] : typeof u == "boolean" ? [{ target: a, operator: "getProperty", param: d, value: !!u }] : typeof u == "object" ? Object.keys(u).map((r) => {
|
|
73
|
+
if (r === "length")
|
|
74
|
+
return { target: a, operator: "length", param: null, value: u[r] };
|
|
75
|
+
const V = r, S = u[r];
|
|
76
|
+
return { target: a, operator: "getProperty", param: V, value: S };
|
|
72
77
|
}) : [];
|
|
73
78
|
}
|
|
74
|
-
function
|
|
75
|
-
return Object.keys(
|
|
76
|
-
const
|
|
77
|
-
return
|
|
79
|
+
function s(d) {
|
|
80
|
+
return Object.keys(d).reduce((a, r) => {
|
|
81
|
+
const V = p(r, d[r]);
|
|
82
|
+
return a.push(...V), a;
|
|
78
83
|
}, []);
|
|
79
84
|
}
|
|
80
|
-
function
|
|
81
|
-
if (
|
|
82
|
-
const
|
|
83
|
-
return
|
|
85
|
+
function o(d, u) {
|
|
86
|
+
if (c.has(d.operator)) {
|
|
87
|
+
const a = c.get(d.operator);
|
|
88
|
+
return a && a(d.target, d.param, d.value, u) || !1;
|
|
84
89
|
}
|
|
85
90
|
return !1;
|
|
86
91
|
}
|
|
87
|
-
function m(
|
|
88
|
-
return
|
|
92
|
+
function m(d, u) {
|
|
93
|
+
return s(d).reduce((V, S) => V && o(S, u), !0);
|
|
89
94
|
}
|
|
90
|
-
function
|
|
91
|
-
const
|
|
92
|
-
return
|
|
95
|
+
function i(d, u) {
|
|
96
|
+
const a = Object.keys(d), r = a.includes("allOf"), V = a.includes("anyOf"), S = r || V, D = (S ? d[S ? r ? "allOf" : "anyOf" : "allOf"] : [d]).map((F) => m(F, u));
|
|
97
|
+
return r ? !D.includes(!1) : D.includes(!0);
|
|
93
98
|
}
|
|
94
|
-
return { parseValueSchema:
|
|
99
|
+
return { parseValueSchema: i };
|
|
95
100
|
}
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
function K(t, e,
|
|
99
|
-
return
|
|
100
|
-
const m =
|
|
101
|
-
return Object.assign(
|
|
101
|
+
const Oe = {}, De = {};
|
|
102
|
+
Ve();
|
|
103
|
+
function K(t, e, l = /* @__PURE__ */ new Map(), c = (o, m, i, d) => m, p = {}, s = (o) => o) {
|
|
104
|
+
return Q[e.title] = e, Y[e.title] = c, Oe[e.title] = p, De[e.title] = s, (o = {}) => {
|
|
105
|
+
const m = Me(o, e, l), i = Object.keys(t).reduce((d, u) => (d[u] = t[u].default, d), {});
|
|
106
|
+
return Object.assign(i, m);
|
|
102
107
|
};
|
|
103
108
|
}
|
|
104
109
|
function x(t, e) {
|
|
105
110
|
return { customClass: e.class, customStyle: e.style };
|
|
106
111
|
}
|
|
107
|
-
const
|
|
112
|
+
const Te = /* @__PURE__ */ new Map([
|
|
108
113
|
["appearance", x]
|
|
109
114
|
]);
|
|
110
|
-
function
|
|
115
|
+
function Fe(t, e, l) {
|
|
111
116
|
return e;
|
|
112
117
|
}
|
|
113
|
-
const Ie = "transfer",
|
|
118
|
+
const Ie = "transfer", je = "A Farris Component", Re = "object", $e = {
|
|
114
119
|
basic: {
|
|
115
120
|
description: "Basic Infomation",
|
|
116
121
|
title: "基本信息",
|
|
@@ -132,12 +137,12 @@ const Ie = "transfer", Fe = "A Farris Component", je = "object", Re = {
|
|
|
132
137
|
}
|
|
133
138
|
}
|
|
134
139
|
}
|
|
135
|
-
},
|
|
140
|
+
}, Pe = {
|
|
136
141
|
title: Ie,
|
|
137
|
-
description:
|
|
138
|
-
type:
|
|
139
|
-
categories:
|
|
140
|
-
},
|
|
142
|
+
description: je,
|
|
143
|
+
type: Re,
|
|
144
|
+
categories: $e
|
|
145
|
+
}, Ae = "https://json-schema.org/draft/2020-12/schema", Le = "https://farris-design.gitee.io/transfer.schema.json", He = "transfer", Ee = "A Farris Component", _e = "object", Be = {
|
|
141
146
|
id: {
|
|
142
147
|
description: "The unique identifier for transfer",
|
|
143
148
|
type: "string"
|
|
@@ -202,15 +207,15 @@ const Ie = "transfer", Fe = "A Farris Component", je = "object", Re = {
|
|
|
202
207
|
}, Ne = [
|
|
203
208
|
"id",
|
|
204
209
|
"type"
|
|
205
|
-
],
|
|
206
|
-
$schema:
|
|
207
|
-
$id:
|
|
208
|
-
title:
|
|
210
|
+
], Ge = {
|
|
211
|
+
$schema: Ae,
|
|
212
|
+
$id: Le,
|
|
213
|
+
title: He,
|
|
209
214
|
description: Ee,
|
|
210
|
-
type:
|
|
211
|
-
properties:
|
|
215
|
+
type: _e,
|
|
216
|
+
properties: Be,
|
|
212
217
|
required: Ne
|
|
213
|
-
},
|
|
218
|
+
}, z = {
|
|
214
219
|
dataSource: {
|
|
215
220
|
type: Array,
|
|
216
221
|
default: []
|
|
@@ -222,13 +227,13 @@ const Ie = "transfer", Fe = "A Farris Component", je = "object", Re = {
|
|
|
222
227
|
placeholder: { type: String, default: "" },
|
|
223
228
|
selections: { type: Array, default: [] },
|
|
224
229
|
selectionValues: { type: Array, default: [] }
|
|
225
|
-
}, ee = K(
|
|
230
|
+
}, ee = K(z, Ge, Te, Fe, Pe), qe = /* @__PURE__ */ new Map([
|
|
226
231
|
["appearance", x]
|
|
227
232
|
]);
|
|
228
|
-
function
|
|
233
|
+
function ze(t, e, l) {
|
|
229
234
|
return e;
|
|
230
235
|
}
|
|
231
|
-
const
|
|
236
|
+
const Ue = "https://json-schema.org/draft/2020-12/schema", We = "https://farris-design.gitee.io/list-view.schema.json", Xe = "list-view", Je = "A Farris Component", Qe = "object", Ye = {
|
|
232
237
|
id: {
|
|
233
238
|
description: "The unique identifier for list-view",
|
|
234
239
|
type: "string"
|
|
@@ -290,18 +295,18 @@ const ze = "https://json-schema.org/draft/2020-12/schema", Ue = "https://farris-
|
|
|
290
295
|
type: "boolean",
|
|
291
296
|
default: !0
|
|
292
297
|
}
|
|
293
|
-
},
|
|
298
|
+
}, Ze = [
|
|
294
299
|
"id",
|
|
295
300
|
"type"
|
|
296
|
-
],
|
|
297
|
-
$schema:
|
|
298
|
-
$id:
|
|
299
|
-
title:
|
|
301
|
+
], Ke = {
|
|
302
|
+
$schema: Ue,
|
|
303
|
+
$id: We,
|
|
304
|
+
title: Xe,
|
|
300
305
|
description: Je,
|
|
301
|
-
type:
|
|
302
|
-
properties:
|
|
303
|
-
required:
|
|
304
|
-
},
|
|
306
|
+
type: Qe,
|
|
307
|
+
properties: Ye,
|
|
308
|
+
required: Ze
|
|
309
|
+
}, xe = "list-view", et = "A Farris Component", tt = "object", nt = {
|
|
305
310
|
basic: {
|
|
306
311
|
description: "Basic Infomation",
|
|
307
312
|
title: "基本信息",
|
|
@@ -323,11 +328,11 @@ const ze = "https://json-schema.org/draft/2020-12/schema", Ue = "https://farris-
|
|
|
323
328
|
}
|
|
324
329
|
}
|
|
325
330
|
}
|
|
326
|
-
},
|
|
327
|
-
title:
|
|
328
|
-
description:
|
|
329
|
-
type:
|
|
330
|
-
categories:
|
|
331
|
+
}, lt = {
|
|
332
|
+
title: xe,
|
|
333
|
+
description: et,
|
|
334
|
+
type: tt,
|
|
335
|
+
categories: nt
|
|
331
336
|
}, te = {
|
|
332
337
|
/** 列集合 */
|
|
333
338
|
columns: {
|
|
@@ -370,472 +375,472 @@ const ze = "https://json-schema.org/draft/2020-12/schema", Ue = "https://farris-
|
|
|
370
375
|
// 搜索启用高亮
|
|
371
376
|
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
372
377
|
};
|
|
373
|
-
K(te,
|
|
374
|
-
function
|
|
375
|
-
function
|
|
376
|
-
const
|
|
377
|
-
let m =
|
|
378
|
+
K(te, Ke, qe, ze, lt);
|
|
379
|
+
function st(t, e) {
|
|
380
|
+
function l(s) {
|
|
381
|
+
const o = [];
|
|
382
|
+
let m = s.nextNode();
|
|
378
383
|
for (; m; )
|
|
379
|
-
|
|
380
|
-
return
|
|
384
|
+
o.push(m), m = s.nextNode();
|
|
385
|
+
return o;
|
|
381
386
|
}
|
|
382
|
-
function
|
|
383
|
-
const m = document.createTreeWalker(
|
|
384
|
-
return
|
|
385
|
-
const
|
|
386
|
-
let
|
|
387
|
-
for (;
|
|
388
|
-
const k =
|
|
387
|
+
function c(s, o) {
|
|
388
|
+
const m = document.createTreeWalker(s, NodeFilter.SHOW_TEXT);
|
|
389
|
+
return l(m).map((a) => ({ textNode: a, text: (a.textContent || "").toLocaleLowerCase() })).map(({ textNode: a, text: r }) => {
|
|
390
|
+
const V = [];
|
|
391
|
+
let S = 0;
|
|
392
|
+
for (; S < r.length; ) {
|
|
393
|
+
const k = r.indexOf(o, S);
|
|
389
394
|
if (k === -1)
|
|
390
395
|
break;
|
|
391
|
-
|
|
396
|
+
V.push(k), S = k + o.length;
|
|
392
397
|
}
|
|
393
|
-
return
|
|
398
|
+
return V.map((k) => {
|
|
394
399
|
const I = new Range();
|
|
395
|
-
return I.setStart(
|
|
400
|
+
return I.setStart(a, k), I.setEnd(a, k + o.length), I;
|
|
396
401
|
});
|
|
397
402
|
}).flat();
|
|
398
403
|
}
|
|
399
|
-
function
|
|
400
|
-
if (!CSS.highlights || (CSS.highlights.clear(), !
|
|
404
|
+
function p(s) {
|
|
405
|
+
if (!CSS.highlights || (CSS.highlights.clear(), !s || !e))
|
|
401
406
|
return;
|
|
402
|
-
const
|
|
407
|
+
const o = c(e.value, s.toLocaleLowerCase()), m = new Highlight(...o);
|
|
403
408
|
CSS.highlights.set("search-result", m);
|
|
404
409
|
}
|
|
405
|
-
return { search:
|
|
410
|
+
return { search: p };
|
|
406
411
|
}
|
|
407
|
-
function
|
|
408
|
-
const
|
|
409
|
-
var
|
|
410
|
-
return ((
|
|
412
|
+
function W(t, e, l, c, p, s, o, m, i, d) {
|
|
413
|
+
const u = g(t.size), a = g(t.textField), r = g(t.titleField), V = g(t.disableField), S = $(() => {
|
|
414
|
+
var v, w;
|
|
415
|
+
return ((v = t.selection) == null ? void 0 : v.multiSelect) && ((w = t.selection) == null ? void 0 : w.showCheckbox);
|
|
411
416
|
}), {
|
|
412
417
|
onMouseenterItem: k,
|
|
413
418
|
onMouseoverItem: I,
|
|
414
419
|
onMouseoutItem: D
|
|
415
|
-
} =
|
|
416
|
-
getKey:
|
|
417
|
-
listViewItemClass:
|
|
420
|
+
} = s, {
|
|
421
|
+
getKey: O,
|
|
422
|
+
listViewItemClass: F,
|
|
418
423
|
onCheckItem: P,
|
|
419
|
-
onClickItem:
|
|
420
|
-
} =
|
|
421
|
-
margin:
|
|
424
|
+
onClickItem: y
|
|
425
|
+
} = o, M = $(() => ({
|
|
426
|
+
margin: u.value === "small" ? "0.25rem 0" : "10px 0"
|
|
422
427
|
}));
|
|
423
|
-
function
|
|
424
|
-
return
|
|
425
|
-
class:
|
|
426
|
-
id:
|
|
427
|
-
key:
|
|
428
|
-
onClick: (
|
|
429
|
-
onMouseenter: (
|
|
430
|
-
onMouseover: (
|
|
431
|
-
onMouseout: (
|
|
432
|
-
}, [
|
|
428
|
+
function T(v, w, C) {
|
|
429
|
+
return v.checked = m.findIndexInSelectedItems(v) > -1, n("li", {
|
|
430
|
+
class: F(v, w),
|
|
431
|
+
id: O(v, w),
|
|
432
|
+
key: O(v, w),
|
|
433
|
+
onClick: (f) => y(f, v, w),
|
|
434
|
+
onMouseenter: (f) => k(f, v, w),
|
|
435
|
+
onMouseover: (f) => I(f, v, w),
|
|
436
|
+
onMouseout: (f) => D(f, v, w)
|
|
437
|
+
}, [S.value && n("div", {
|
|
433
438
|
class: "f-list-select",
|
|
434
|
-
onClick: (
|
|
435
|
-
}, [
|
|
436
|
-
id: "list-" +
|
|
439
|
+
onClick: (f) => f.stopPropagation()
|
|
440
|
+
}, [n(G, {
|
|
441
|
+
id: "list-" + O(v, w),
|
|
437
442
|
customClass: "listview-checkbox",
|
|
438
|
-
disabled:
|
|
439
|
-
checked:
|
|
440
|
-
"onUpdate:checked": (
|
|
441
|
-
onChange: (
|
|
442
|
-
P(
|
|
443
|
+
disabled: v[V.value],
|
|
444
|
+
checked: v.checked,
|
|
445
|
+
"onUpdate:checked": (f) => v.checked = f,
|
|
446
|
+
onChange: (f) => {
|
|
447
|
+
P(v, w, !f.checked);
|
|
443
448
|
}
|
|
444
|
-
}, null)]),
|
|
449
|
+
}, null)]), n("div", {
|
|
445
450
|
class: "f-list-content"
|
|
446
|
-
}, [
|
|
447
|
-
style:
|
|
448
|
-
title:
|
|
449
|
-
}, [
|
|
451
|
+
}, [n("div", {
|
|
452
|
+
style: M.value,
|
|
453
|
+
title: v.raw[r.value] || v.raw[a.value]
|
|
454
|
+
}, [v.raw[a.value]])])]);
|
|
450
455
|
}
|
|
451
456
|
return {
|
|
452
|
-
renderItem:
|
|
457
|
+
renderItem: T
|
|
453
458
|
};
|
|
454
459
|
}
|
|
455
|
-
function
|
|
456
|
-
const
|
|
457
|
-
onMouseenterItem:
|
|
458
|
-
onMouseoverItem:
|
|
459
|
-
onMouseoutItem:
|
|
460
|
-
} =
|
|
460
|
+
function at(t, e, l, c, p, s, o, m, i, d) {
|
|
461
|
+
const u = g(t.multiSelect), a = g(t.disableField), {
|
|
462
|
+
onMouseenterItem: r,
|
|
463
|
+
onMouseoverItem: V,
|
|
464
|
+
onMouseoutItem: S
|
|
465
|
+
} = s, {
|
|
461
466
|
getKey: k,
|
|
462
467
|
listViewItemClass: I,
|
|
463
468
|
onCheckItem: D,
|
|
464
|
-
onClickItem:
|
|
465
|
-
} =
|
|
466
|
-
function
|
|
467
|
-
return e.slots.content ?
|
|
468
|
-
item:
|
|
469
|
-
index:
|
|
470
|
-
selectedItem:
|
|
471
|
-
})]) :
|
|
469
|
+
onClickItem: O
|
|
470
|
+
} = o;
|
|
471
|
+
function F(y, M, T) {
|
|
472
|
+
return e.slots.content ? n(B, null, [e.slots.content && e.slots.content({
|
|
473
|
+
item: y.raw,
|
|
474
|
+
index: M,
|
|
475
|
+
selectedItem: T
|
|
476
|
+
})]) : n("div", {
|
|
472
477
|
style: "margin: 10px 0;"
|
|
473
|
-
}, [
|
|
478
|
+
}, [y.raw.name]);
|
|
474
479
|
}
|
|
475
|
-
function P(
|
|
476
|
-
return
|
|
477
|
-
class: I(
|
|
478
|
-
id: k(
|
|
479
|
-
key: k(
|
|
480
|
-
onClick: (
|
|
481
|
-
onMouseenter: (
|
|
482
|
-
onMouseover: (
|
|
483
|
-
onMouseout: (
|
|
484
|
-
}, [
|
|
480
|
+
function P(y, M, T) {
|
|
481
|
+
return n("li", {
|
|
482
|
+
class: I(y, M),
|
|
483
|
+
id: k(y, M),
|
|
484
|
+
key: k(y, M),
|
|
485
|
+
onClick: (v) => O(v, y, M),
|
|
486
|
+
onMouseenter: (v) => r(v, y, M),
|
|
487
|
+
onMouseover: (v) => V(v, y, M),
|
|
488
|
+
onMouseout: (v) => S(v, y, M)
|
|
489
|
+
}, [u.value && n("div", {
|
|
485
490
|
class: "f-list-select",
|
|
486
|
-
onClick: (
|
|
487
|
-
}, [
|
|
488
|
-
id: "list-" + k(
|
|
491
|
+
onClick: (v) => v.stopPropagation()
|
|
492
|
+
}, [n(G, {
|
|
493
|
+
id: "list-" + k(y, M),
|
|
489
494
|
customClass: "listview-checkbox",
|
|
490
|
-
disabled:
|
|
491
|
-
checked:
|
|
492
|
-
"onUpdate:checked": (
|
|
493
|
-
onChange: (
|
|
494
|
-
}, null)]),
|
|
495
|
+
disabled: y[a.value] || !y.checked,
|
|
496
|
+
checked: y.checked,
|
|
497
|
+
"onUpdate:checked": (v) => y.checked = v,
|
|
498
|
+
onChange: (v) => D(y, M, !v.checked)
|
|
499
|
+
}, null)]), n("div", {
|
|
495
500
|
class: "f-list-content"
|
|
496
|
-
}, [
|
|
501
|
+
}, [F(y, M, T)])]);
|
|
497
502
|
}
|
|
498
503
|
return {
|
|
499
504
|
renderItem: P
|
|
500
505
|
};
|
|
501
506
|
}
|
|
502
|
-
function
|
|
503
|
-
const
|
|
504
|
-
onMouseenterItem:
|
|
505
|
-
onMouseoverItem:
|
|
506
|
-
onMouseoutItem:
|
|
507
|
-
} =
|
|
507
|
+
function ot(t, e, l, c, p, s, o, m, i, d) {
|
|
508
|
+
const u = g(t.multiSelect), a = g(t.disableField), {
|
|
509
|
+
onMouseenterItem: r,
|
|
510
|
+
onMouseoverItem: V,
|
|
511
|
+
onMouseoutItem: S
|
|
512
|
+
} = s, {
|
|
508
513
|
getKey: k,
|
|
509
514
|
listViewItemClass: I,
|
|
510
515
|
onCheckItem: D,
|
|
511
|
-
onClickItem:
|
|
512
|
-
} =
|
|
513
|
-
dragstart:
|
|
516
|
+
onClickItem: O
|
|
517
|
+
} = o, {
|
|
518
|
+
dragstart: F,
|
|
514
519
|
dragenter: P,
|
|
515
|
-
dragover:
|
|
516
|
-
dragend:
|
|
517
|
-
} =
|
|
518
|
-
removeItem:
|
|
519
|
-
} =
|
|
520
|
-
margin:
|
|
520
|
+
dragover: y,
|
|
521
|
+
dragend: M
|
|
522
|
+
} = c, {
|
|
523
|
+
removeItem: T
|
|
524
|
+
} = i, v = $(() => ({
|
|
525
|
+
margin: u.value ? "10px 0" : "10px 0px 10px 14px"
|
|
521
526
|
}));
|
|
522
|
-
function
|
|
523
|
-
return
|
|
524
|
-
style:
|
|
525
|
-
}, [
|
|
527
|
+
function w(h) {
|
|
528
|
+
return n("div", {
|
|
529
|
+
style: v.value
|
|
530
|
+
}, [h.raw.name]);
|
|
526
531
|
}
|
|
527
532
|
function C() {
|
|
528
|
-
return e.slots.itemContent ? e.slots.itemContent :
|
|
533
|
+
return e.slots.itemContent ? e.slots.itemContent : w;
|
|
529
534
|
}
|
|
530
|
-
const
|
|
531
|
-
function
|
|
532
|
-
return
|
|
533
|
-
class: I(
|
|
534
|
-
id: k(
|
|
535
|
-
key: k(
|
|
536
|
-
onClick: (R) =>
|
|
537
|
-
onMouseenter: (R) =>
|
|
538
|
-
onMouseover: (R) =>
|
|
539
|
-
onMouseout: (R) =>
|
|
535
|
+
const f = C();
|
|
536
|
+
function b(h, j, A) {
|
|
537
|
+
return n("li", {
|
|
538
|
+
class: I(h, j),
|
|
539
|
+
id: k(h, j),
|
|
540
|
+
key: k(h, j),
|
|
541
|
+
onClick: (R) => O(R, h, j),
|
|
542
|
+
onMouseenter: (R) => r(R, h, j),
|
|
543
|
+
onMouseover: (R) => V(R, h, j),
|
|
544
|
+
onMouseout: (R) => S(R, h, j),
|
|
540
545
|
draggable: "true",
|
|
541
|
-
onDragstart: (R) =>
|
|
546
|
+
onDragstart: (R) => F(R, h, j),
|
|
542
547
|
onDragenter: (R) => P(R, j),
|
|
543
|
-
onDragend: (R) =>
|
|
544
|
-
onDragover: (R) =>
|
|
545
|
-
}, [
|
|
548
|
+
onDragend: (R) => M(R, h),
|
|
549
|
+
onDragover: (R) => y(R, j)
|
|
550
|
+
}, [u.value && n("div", {
|
|
546
551
|
class: "f-list-select",
|
|
547
552
|
onClick: (R) => R.stopPropagation()
|
|
548
|
-
}, [
|
|
549
|
-
id: "list-" + k(
|
|
553
|
+
}, [n(G, {
|
|
554
|
+
id: "list-" + k(h, j),
|
|
550
555
|
customClass: "listview-checkbox",
|
|
551
|
-
disabled:
|
|
552
|
-
checked:
|
|
553
|
-
"onUpdate:checked": (R) =>
|
|
554
|
-
onChange: (R) => D(
|
|
555
|
-
}, null)]),
|
|
556
|
+
disabled: h[a.value] || !h.checked,
|
|
557
|
+
checked: h.checked,
|
|
558
|
+
"onUpdate:checked": (R) => h.checked = R,
|
|
559
|
+
onChange: (R) => D(h, j, !R.checked)
|
|
560
|
+
}, null)]), n("div", {
|
|
556
561
|
class: "f-list-content"
|
|
557
|
-
}, [
|
|
562
|
+
}, [f(h)]), n("div", {
|
|
558
563
|
class: "f-list-remove",
|
|
559
|
-
onClick: (R) =>
|
|
560
|
-
}, [
|
|
564
|
+
onClick: (R) => T(j)
|
|
565
|
+
}, [n("div", {
|
|
561
566
|
class: "f-list-remove-icon"
|
|
562
|
-
}, [
|
|
567
|
+
}, [n("i", {
|
|
563
568
|
class: "f-icon f-icon-remove_face"
|
|
564
|
-
}, null)])]),
|
|
569
|
+
}, null)])]), n("div", {
|
|
565
570
|
class: "f-list-handle"
|
|
566
|
-
}, [
|
|
571
|
+
}, [n("div", null, [n("i", {
|
|
567
572
|
class: "f-icon f-icon-drag-vertical"
|
|
568
573
|
}, null)])])]);
|
|
569
574
|
}
|
|
570
575
|
return {
|
|
571
|
-
renderItem:
|
|
576
|
+
renderItem: b
|
|
572
577
|
};
|
|
573
578
|
}
|
|
574
|
-
function
|
|
579
|
+
function it(t, e, l, c, p, s, o, m, i, d) {
|
|
575
580
|
var k;
|
|
576
|
-
const
|
|
577
|
-
collpaseGroupIconClass:
|
|
578
|
-
} =
|
|
579
|
-
toggleGroupRow:
|
|
580
|
-
} =
|
|
581
|
-
function
|
|
582
|
-
D.collapse = !D.collapse,
|
|
581
|
+
const u = g(((k = t.group) == null ? void 0 : k.groupFields) || []), {
|
|
582
|
+
collpaseGroupIconClass: a
|
|
583
|
+
} = p, {
|
|
584
|
+
toggleGroupRow: r
|
|
585
|
+
} = d;
|
|
586
|
+
function V(I, D) {
|
|
587
|
+
D.collapse = !D.collapse, l.value = r(D.collapse ? "collapse" : "expand", D, l.value);
|
|
583
588
|
}
|
|
584
|
-
function
|
|
585
|
-
return I.layer > -1 &&
|
|
589
|
+
function S(I, D, O) {
|
|
590
|
+
return I.layer > -1 && n("div", {
|
|
586
591
|
class: "f-navlookup-recentHeader",
|
|
587
|
-
onClick: (
|
|
588
|
-
}, [
|
|
592
|
+
onClick: (F) => V(F, I)
|
|
593
|
+
}, [n("div", {
|
|
589
594
|
class: "fv-grid-group-row-icon"
|
|
590
|
-
}, [
|
|
591
|
-
class:
|
|
592
|
-
}, null)]),
|
|
595
|
+
}, [n("span", {
|
|
596
|
+
class: a(I)
|
|
597
|
+
}, null)]), n("div", {
|
|
593
598
|
class: "f-navlookup-recommandLabel"
|
|
594
|
-
}, [I.raw[
|
|
599
|
+
}, [I.raw[u.value[I.layer]]])]);
|
|
595
600
|
}
|
|
596
601
|
return {
|
|
597
|
-
renderItem:
|
|
602
|
+
renderItem: S
|
|
598
603
|
};
|
|
599
604
|
}
|
|
600
|
-
function
|
|
601
|
-
const t =
|
|
602
|
-
function
|
|
603
|
-
|
|
605
|
+
function rt() {
|
|
606
|
+
const t = g(-1), e = g(""), l = g(-1), c = g(!1);
|
|
607
|
+
function p(d, u, a) {
|
|
608
|
+
l.value = a;
|
|
604
609
|
}
|
|
605
|
-
function
|
|
606
|
-
|
|
610
|
+
function s(d, u, a) {
|
|
611
|
+
c.value || (l.value = a);
|
|
607
612
|
}
|
|
608
|
-
function
|
|
609
|
-
|
|
613
|
+
function o(d, u, a) {
|
|
614
|
+
l.value = -1;
|
|
610
615
|
}
|
|
611
616
|
function m() {
|
|
612
|
-
|
|
617
|
+
c.value = !0;
|
|
613
618
|
}
|
|
614
|
-
function
|
|
615
|
-
|
|
619
|
+
function i() {
|
|
620
|
+
c.value = !1;
|
|
616
621
|
}
|
|
617
622
|
return {
|
|
618
623
|
activeIndex: t,
|
|
619
624
|
focusedItemId: e,
|
|
620
|
-
hoverIndex:
|
|
621
|
-
onMouseenterItem:
|
|
622
|
-
onMouseoverItem:
|
|
623
|
-
onMouseoutItem:
|
|
624
|
-
resumeHover:
|
|
625
|
+
hoverIndex: l,
|
|
626
|
+
onMouseenterItem: p,
|
|
627
|
+
onMouseoverItem: s,
|
|
628
|
+
onMouseoutItem: o,
|
|
629
|
+
resumeHover: i,
|
|
625
630
|
suspendHover: m
|
|
626
631
|
};
|
|
627
632
|
}
|
|
628
|
-
function
|
|
629
|
-
const
|
|
630
|
-
function
|
|
631
|
-
D.stopPropagation(),
|
|
632
|
-
|
|
633
|
+
function ct(t, e, l, c) {
|
|
634
|
+
const p = g(t.idField), { dataView: s } = l, o = g(-1), m = g(!1), { activeIndex: i, focusedItemId: d, hoverIndex: u, resumeHover: a, suspendHover: r } = c;
|
|
635
|
+
function V(D, O, F) {
|
|
636
|
+
D.stopPropagation(), r(), O && setTimeout(() => {
|
|
637
|
+
o.value = F, m.value = !0, O.moving = !0;
|
|
633
638
|
});
|
|
634
639
|
}
|
|
635
|
-
function
|
|
636
|
-
if (D.preventDefault(),
|
|
637
|
-
const
|
|
638
|
-
P.splice(
|
|
640
|
+
function S(D, O) {
|
|
641
|
+
if (D.preventDefault(), o.value !== O) {
|
|
642
|
+
const F = s.value[o.value], P = s.value;
|
|
643
|
+
P.splice(o.value, 1), P.splice(O, 0, F), o.value = O;
|
|
639
644
|
}
|
|
640
645
|
}
|
|
641
|
-
function k(D,
|
|
646
|
+
function k(D, O) {
|
|
642
647
|
D.preventDefault(), D.dataTransfer && (D.dataTransfer.dropEffect = "move");
|
|
643
648
|
}
|
|
644
|
-
function I(D,
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
}), m.value = !1,
|
|
649
|
+
function I(D, O) {
|
|
650
|
+
O && (O.moving = !1), s.value.forEach((F, P) => {
|
|
651
|
+
F.__fv_index__ = P;
|
|
652
|
+
}), m.value = !1, a(), u.value = O.raw.__fv_index__, i.value = O.raw.__fv_index__, d.value = O.raw[p.value], e.emit("change", s.value), e.emit("activeChange", O);
|
|
648
653
|
}
|
|
649
654
|
return {
|
|
650
|
-
dragstart:
|
|
651
|
-
dragenter:
|
|
655
|
+
dragstart: V,
|
|
656
|
+
dragenter: S,
|
|
652
657
|
dragover: k,
|
|
653
658
|
dragend: I,
|
|
654
659
|
isDragging: m
|
|
655
660
|
};
|
|
656
661
|
}
|
|
657
|
-
function
|
|
658
|
-
const { dataView:
|
|
659
|
-
function
|
|
660
|
-
if (
|
|
661
|
-
const
|
|
662
|
-
e.emit("removeItem",
|
|
662
|
+
function ut(t, e, l) {
|
|
663
|
+
const { dataView: c } = l;
|
|
664
|
+
function p(s) {
|
|
665
|
+
if (s > -1 && s < c.value.length) {
|
|
666
|
+
const o = c.value.splice(s, 1);
|
|
667
|
+
e.emit("removeItem", o[0]);
|
|
663
668
|
}
|
|
664
669
|
}
|
|
665
|
-
return { removeItem:
|
|
670
|
+
return { removeItem: p };
|
|
666
671
|
}
|
|
667
|
-
function
|
|
668
|
-
const
|
|
669
|
-
function P(
|
|
670
|
-
const
|
|
672
|
+
function ft(t, e, l, c, p, s) {
|
|
673
|
+
const o = g(t.idField), m = g(t.disableField), i = g(t.draggable), d = g(t.itemClass), u = g(t.selection.multiSelect ?? !1), a = g(t.selection.multiSelectMode), { isDragging: r } = c, { activeIndex: V, focusedItemId: S, hoverIndex: k } = p, { clearSelection: I, getSelectedItems: D, toggleSelectItem: O } = s, F = g(D());
|
|
674
|
+
function P(f, b) {
|
|
675
|
+
const h = {
|
|
671
676
|
"f-listview-item": !0,
|
|
672
677
|
"f-list-view-group-item": !0,
|
|
673
|
-
"f-list-view-draggable-item":
|
|
674
|
-
"f-un-click": !
|
|
675
|
-
"f-un-select": !!
|
|
678
|
+
"f-list-view-draggable-item": i.value,
|
|
679
|
+
"f-un-click": !f.checked,
|
|
680
|
+
"f-un-select": !!f.raw[m.value],
|
|
676
681
|
// 'f-listview-active': item.raw.__fv_index__ === activeIndex.value,
|
|
677
682
|
// 多选
|
|
678
|
-
"f-listview-active":
|
|
679
|
-
(A) => A[
|
|
683
|
+
"f-listview-active": F.value.findIndex(
|
|
684
|
+
(A) => A[o.value] === f.raw[o.value]
|
|
680
685
|
) > -1,
|
|
681
|
-
"f-listview-item-active":
|
|
682
|
-
(A) => A[
|
|
686
|
+
"f-listview-item-active": F.value.findIndex(
|
|
687
|
+
(A) => A[o.value] === f.raw[o.value]
|
|
683
688
|
) > -1,
|
|
684
|
-
"f-listview-hover": !
|
|
685
|
-
"f-listview-item-hover": !
|
|
686
|
-
moving: !!
|
|
689
|
+
"f-listview-hover": !r.value && b === k.value,
|
|
690
|
+
"f-listview-item-hover": !r.value && b === k.value,
|
|
691
|
+
moving: !!f.moving
|
|
687
692
|
};
|
|
688
|
-
return
|
|
693
|
+
return d.value.split(" ").reduce((A, R) => (A[R] = !0, A), h), h;
|
|
689
694
|
}
|
|
690
|
-
function
|
|
691
|
-
return
|
|
695
|
+
function y(f, b) {
|
|
696
|
+
return f.raw[o.value] || "";
|
|
692
697
|
}
|
|
693
|
-
const
|
|
694
|
-
function
|
|
695
|
-
|
|
698
|
+
const M = $(() => !u.value);
|
|
699
|
+
function T(f, b, h) {
|
|
700
|
+
f.checked = h, !f.raw[m.value] && (M.value && (S.value = f.raw[o.value]), O(f));
|
|
696
701
|
}
|
|
697
|
-
const
|
|
698
|
-
function C(
|
|
699
|
-
if (
|
|
700
|
-
|
|
702
|
+
const v = $(() => u.value && a.value === "OnCheckClearByClick"), w = $(() => !u.value || u.value && (a.value === "OnCheckAndClick" || a.value === "OnClick"));
|
|
703
|
+
function C(f, b, h) {
|
|
704
|
+
if (b.raw[m.value]) {
|
|
705
|
+
f.preventDefault(), f.stopPropagation();
|
|
701
706
|
return;
|
|
702
707
|
}
|
|
703
|
-
|
|
708
|
+
S.value = b.raw[o.value], V.value = h, v.value && I(), w.value && (O(b), F.value = D()), e.emit("clickItem", { data: F.value, index: h }), e.emit("activeChange", F.value);
|
|
704
709
|
}
|
|
705
710
|
return {
|
|
706
|
-
getKey:
|
|
711
|
+
getKey: y,
|
|
707
712
|
listViewItemClass: P,
|
|
708
|
-
onCheckItem:
|
|
713
|
+
onCheckItem: T,
|
|
709
714
|
onClickItem: C
|
|
710
715
|
};
|
|
711
716
|
}
|
|
712
|
-
function
|
|
713
|
-
const m =
|
|
717
|
+
function dt(t, e, l, c, p, s, o) {
|
|
718
|
+
const m = g(t.view), i = g(t.view === "CardView"), d = g({}), u = g("暂无数据"), a = rt(), r = ct(t, e, c, a), V = ut(t, e, c), S = ft(t, e, l, r, a, s), k = $(() => ({
|
|
714
719
|
"f-list-view-group": !0,
|
|
715
|
-
"d-flex":
|
|
716
|
-
"flex-wrap":
|
|
717
|
-
})), I = $(() => !!
|
|
720
|
+
"d-flex": i.value,
|
|
721
|
+
"flex-wrap": i.value
|
|
722
|
+
})), I = $(() => !!l.value && l.value.length > 0), D = $(() => l.value.length === 0);
|
|
718
723
|
$(() => D.value && !e.slots.empty);
|
|
719
|
-
function
|
|
720
|
-
return m.value === "SingleView" ?
|
|
724
|
+
function O() {
|
|
725
|
+
return m.value === "SingleView" ? W : m.value === "DraggableView" ? ot : (m.value === "ContentView" || m.value === "CardView") && e.slots.content ? at : W;
|
|
721
726
|
}
|
|
722
|
-
const
|
|
727
|
+
const F = O(), {
|
|
723
728
|
renderItem: P
|
|
724
|
-
} =
|
|
725
|
-
renderItem:
|
|
726
|
-
} =
|
|
727
|
-
function
|
|
728
|
-
return
|
|
729
|
+
} = F(t, e, l, r, p, a, S, s, V, o), {
|
|
730
|
+
renderItem: y
|
|
731
|
+
} = it(t, e, l, r, p, a, S, s, V, o), M = [P, y];
|
|
732
|
+
function T() {
|
|
733
|
+
return l.value.filter((C) => C.visible !== !1).map((C, f) => M[C.type](C, f, d));
|
|
729
734
|
}
|
|
730
|
-
function
|
|
731
|
-
return
|
|
735
|
+
function v() {
|
|
736
|
+
return n("div", {
|
|
732
737
|
class: "f-list-view-emptydata"
|
|
733
|
-
}, [
|
|
738
|
+
}, [n("p", {
|
|
734
739
|
class: "f-empty-title"
|
|
735
|
-
}, [e.slots.empty ? e.slots.empty() :
|
|
740
|
+
}, [e.slots.empty ? e.slots.empty() : u.value])]);
|
|
736
741
|
}
|
|
737
|
-
function
|
|
738
|
-
return
|
|
742
|
+
function w() {
|
|
743
|
+
return n("ul", {
|
|
739
744
|
class: k.value,
|
|
740
745
|
style: "list-style: none;"
|
|
741
|
-
}, [I.value &&
|
|
746
|
+
}, [I.value && T(), D.value && v()]);
|
|
742
747
|
}
|
|
743
748
|
return {
|
|
744
|
-
renderListArea:
|
|
749
|
+
renderListArea: w
|
|
745
750
|
};
|
|
746
751
|
}
|
|
747
|
-
function
|
|
748
|
-
function
|
|
749
|
-
return e.slots.header &&
|
|
752
|
+
function pt(t, e, l) {
|
|
753
|
+
function c() {
|
|
754
|
+
return e.slots.header && n("div", {
|
|
750
755
|
class: "f-list-view-header"
|
|
751
756
|
}, [e.slots.header()]);
|
|
752
757
|
}
|
|
753
758
|
return {
|
|
754
|
-
renderHeader:
|
|
759
|
+
renderHeader: c
|
|
755
760
|
};
|
|
756
761
|
}
|
|
757
|
-
function X(t, e,
|
|
758
|
-
const
|
|
759
|
-
function
|
|
760
|
-
|
|
762
|
+
function X(t, e, l) {
|
|
763
|
+
const c = g(t.headerClass), p = g(t.placeholder), s = g(""), o = $(() => !s.value), m = $(() => !!s.value);
|
|
764
|
+
function i(r) {
|
|
765
|
+
s.value = "";
|
|
761
766
|
}
|
|
762
|
-
|
|
763
|
-
t.enableHighlightSearch &&
|
|
767
|
+
J(s, (r) => {
|
|
768
|
+
t.enableHighlightSearch && l.search(r), e.emit("afterSearch", r);
|
|
764
769
|
});
|
|
765
|
-
const
|
|
766
|
-
const
|
|
770
|
+
const d = $(() => {
|
|
771
|
+
const r = {
|
|
767
772
|
"form-group": !0,
|
|
768
773
|
"farris-form-group": !0
|
|
769
774
|
};
|
|
770
|
-
return
|
|
775
|
+
return c.value && c.value.split(" ").reduce((S, k) => (S[k] = !0, S), r), r;
|
|
771
776
|
});
|
|
772
|
-
function
|
|
777
|
+
function u(r) {
|
|
773
778
|
}
|
|
774
|
-
function
|
|
775
|
-
return
|
|
779
|
+
function a() {
|
|
780
|
+
return n("div", {
|
|
776
781
|
class: "f-list-view-header",
|
|
777
|
-
onClick: ne(() =>
|
|
778
|
-
}, [
|
|
779
|
-
class:
|
|
780
|
-
}, [
|
|
782
|
+
onClick: ne(() => u, ["prevent", "stop"])
|
|
783
|
+
}, [n("div", {
|
|
784
|
+
class: d.value
|
|
785
|
+
}, [n("div", {
|
|
781
786
|
class: "farris-input-wrap"
|
|
782
|
-
}, [
|
|
787
|
+
}, [n("div", {
|
|
783
788
|
class: "f-cmp-inputgroup"
|
|
784
|
-
}, [
|
|
789
|
+
}, [n("div", {
|
|
785
790
|
class: "input-group f-state-editable"
|
|
786
|
-
}, [le(
|
|
791
|
+
}, [le(n("input", {
|
|
787
792
|
class: "form-control f-utils-fill text-left",
|
|
788
|
-
"onUpdate:modelValue": (
|
|
793
|
+
"onUpdate:modelValue": (r) => s.value = r,
|
|
789
794
|
name: "input-group-value",
|
|
790
795
|
type: "text",
|
|
791
|
-
placeholder:
|
|
796
|
+
placeholder: p.value,
|
|
792
797
|
autocomplete: "off"
|
|
793
|
-
}, null), [[se,
|
|
798
|
+
}, null), [[se, s.value]]), n("div", {
|
|
794
799
|
class: "input-group-append"
|
|
795
|
-
}, [m.value &&
|
|
800
|
+
}, [m.value && n("span", {
|
|
796
801
|
class: "input-group-text input-group-clear",
|
|
797
|
-
onClick: (
|
|
798
|
-
}, [
|
|
802
|
+
onClick: (r) => i()
|
|
803
|
+
}, [n("i", {
|
|
799
804
|
class: "f-icon f-icon-close-circle"
|
|
800
|
-
}, null)]),
|
|
805
|
+
}, null)]), o.value && n("span", {
|
|
801
806
|
class: "input-group-text"
|
|
802
|
-
}, [
|
|
807
|
+
}, [n("span", {
|
|
803
808
|
class: "f-icon f-icon-search"
|
|
804
809
|
}, null)])])])])])])]);
|
|
805
810
|
}
|
|
806
811
|
return {
|
|
807
|
-
renderHeader:
|
|
812
|
+
renderHeader: a
|
|
808
813
|
};
|
|
809
814
|
}
|
|
810
|
-
const
|
|
815
|
+
const H = /* @__PURE__ */ N({
|
|
811
816
|
name: "FListView",
|
|
812
817
|
props: te,
|
|
813
818
|
emits: ["afterSearch", "checkValuesChange", "clickItem", "selectionChange", "removeItem", "change", "activeChange"],
|
|
814
819
|
setup(t, e) {
|
|
815
|
-
const
|
|
816
|
-
getVisualData:
|
|
817
|
-
} =
|
|
818
|
-
|
|
819
|
-
const
|
|
820
|
+
const l = g(), c = g(!0), p = g(!1), s = g([]), o = 0, m = g(t.columns), i = re(t), d = ce(t), u = ue(t, i), a = fe(t), r = de(t, /* @__PURE__ */ new Map(), d, i, a), V = pe(t, r, i, s, e), S = st(t, l), k = $(() => r.dataView.value.length), I = ve(t, e, i), D = he(), O = ge(t, {}, D), F = me(t, I, d, i, D, O), P = ye(t, i, O, F), y = we(t, i, O, F), M = Se(t, m, r, k, o, F, P, y), {
|
|
821
|
+
getVisualData: T
|
|
822
|
+
} = M;
|
|
823
|
+
s.value = T(0, k.value + o - 1);
|
|
824
|
+
const v = $(() => {
|
|
820
825
|
const L = {
|
|
821
826
|
"f-list-view": !0,
|
|
822
827
|
"f-list-view-multiple": t.multiSelect
|
|
823
828
|
};
|
|
824
829
|
return t.size !== "default" && (L[`${t.size}-item`] = !0), L;
|
|
825
|
-
}),
|
|
830
|
+
}), w = $(() => !!e.slots.footer || c.value);
|
|
826
831
|
function C() {
|
|
827
|
-
return t.header === "SearchBar" ? X : t.header === "ContentHeader" ?
|
|
832
|
+
return t.header === "SearchBar" ? X : t.header === "ContentHeader" ? pt : X;
|
|
828
833
|
}
|
|
829
|
-
const
|
|
830
|
-
renderHeader:
|
|
831
|
-
} =
|
|
832
|
-
renderListArea:
|
|
833
|
-
} =
|
|
834
|
+
const f = C(), {
|
|
835
|
+
renderHeader: b
|
|
836
|
+
} = f(t, e, S), {
|
|
837
|
+
renderListArea: h
|
|
838
|
+
} = dt(t, e, s, r, u, V, M);
|
|
834
839
|
function j(L) {
|
|
835
|
-
|
|
840
|
+
S.search(L);
|
|
836
841
|
}
|
|
837
842
|
function A(L) {
|
|
838
|
-
L && (
|
|
843
|
+
L && (r.load(L), s.value = T(0, k.value + o - 1));
|
|
839
844
|
}
|
|
840
845
|
e.expose({
|
|
841
846
|
search: j,
|
|
@@ -844,44 +849,44 @@ const E = /* @__PURE__ */ G({
|
|
|
844
849
|
function R(L) {
|
|
845
850
|
t.multiSelect && (L.preventDefault(), L.stopPropagation());
|
|
846
851
|
}
|
|
847
|
-
return () =>
|
|
848
|
-
class:
|
|
852
|
+
return () => n("div", {
|
|
853
|
+
class: v.value,
|
|
849
854
|
onClick: R
|
|
850
|
-
}, [
|
|
851
|
-
ref:
|
|
855
|
+
}, [b(), n("div", {
|
|
856
|
+
ref: l,
|
|
852
857
|
class: "f-list-view-content",
|
|
853
858
|
onMouseover: () => {
|
|
854
|
-
|
|
859
|
+
p.value = !0;
|
|
855
860
|
},
|
|
856
861
|
onMouseleave: () => {
|
|
857
|
-
|
|
862
|
+
p.value = !1;
|
|
858
863
|
}
|
|
859
|
-
}, [
|
|
864
|
+
}, [h()]), w.value && n("div", {
|
|
860
865
|
class: "f-list-view-footer"
|
|
861
866
|
}, [e.slots.footer && e.slots.footer()])]);
|
|
862
867
|
}
|
|
863
|
-
}),
|
|
868
|
+
}), E = /* @__PURE__ */ N({
|
|
864
869
|
name: "FTransfer",
|
|
865
|
-
props:
|
|
870
|
+
props: z,
|
|
866
871
|
emits: ["change", "activeChange"],
|
|
867
872
|
setup(t, e) {
|
|
868
|
-
const
|
|
869
|
-
function
|
|
870
|
-
const
|
|
871
|
-
C.length && C.reduce((
|
|
872
|
-
const
|
|
873
|
-
|
|
874
|
-
const
|
|
875
|
-
|
|
873
|
+
const l = g(t.identifyField), c = g("已选:"), p = g("项数据"), s = g(t.displayType), o = g(!1), m = g(t.dataSource), i = g(t.selections || []), d = $(() => i.value.map((w) => w[l.value])), u = /* @__PURE__ */ new Map(), a = g();
|
|
874
|
+
function r() {
|
|
875
|
+
const w = /* @__PURE__ */ new Map(), C = t.selectionValues || [];
|
|
876
|
+
C.length && C.reduce((b, h) => (b.set(h, !0), b), w);
|
|
877
|
+
const f = t.selections || [];
|
|
878
|
+
f.length && (w.clear(), f.reduce((b, h) => (b.set(h[l.value], !0), b), w)), i.value.length || (i.value = m.value.filter((b) => w.has(b[l.value])).map((b) => Object.assign({}, b))), m.value.forEach((b) => {
|
|
879
|
+
const h = b[l.value], j = w.has(h);
|
|
880
|
+
b.checked = j, j && u.set(h, b);
|
|
876
881
|
});
|
|
877
882
|
}
|
|
878
|
-
|
|
879
|
-
const
|
|
880
|
-
function k(
|
|
881
|
-
|
|
883
|
+
r();
|
|
884
|
+
const V = $(() => s.value === "List"), S = $(() => s.value === "Tree");
|
|
885
|
+
function k(w) {
|
|
886
|
+
i.value = w.map((C) => Object.assign({}, C)), e.emit("change", i.value);
|
|
882
887
|
}
|
|
883
888
|
function I() {
|
|
884
|
-
return
|
|
889
|
+
return n(H, {
|
|
885
890
|
class: "f-utils-fill",
|
|
886
891
|
data: m.value,
|
|
887
892
|
multiSelect: !0,
|
|
@@ -896,282 +901,276 @@ const E = /* @__PURE__ */ G({
|
|
|
896
901
|
draggable: !1,
|
|
897
902
|
header: "Search",
|
|
898
903
|
headerClass: "transfer-search-box",
|
|
899
|
-
"selection-values":
|
|
904
|
+
"selection-values": d.value,
|
|
900
905
|
onSelectionChange: k
|
|
901
906
|
}, {
|
|
902
907
|
default: () => [_(" ")]
|
|
903
908
|
});
|
|
904
909
|
}
|
|
905
910
|
function D() {
|
|
906
|
-
return
|
|
911
|
+
return n(B, null, null);
|
|
907
912
|
}
|
|
908
|
-
function
|
|
909
|
-
return
|
|
913
|
+
function O() {
|
|
914
|
+
return n("div", {
|
|
910
915
|
class: "f-utils-fill option-pane d-flex flex-column"
|
|
911
|
-
}, [
|
|
916
|
+
}, [n("div", {
|
|
912
917
|
class: "f-utils-flex-column option-pane-content f-utils-fill"
|
|
913
|
-
}, [
|
|
918
|
+
}, [n("div", {
|
|
914
919
|
class: "container columns-box d-flex f-utils-fill"
|
|
915
|
-
}, [
|
|
920
|
+
}, [V.value && I(), S.value && D()])])]);
|
|
916
921
|
}
|
|
917
|
-
function
|
|
918
|
-
const C =
|
|
922
|
+
function F(w) {
|
|
923
|
+
const C = w[l.value];
|
|
919
924
|
if (C !== null || C !== void 0) {
|
|
920
|
-
|
|
921
|
-
const
|
|
922
|
-
|
|
925
|
+
i.value = i.value.filter((b) => b[l.value] !== C);
|
|
926
|
+
const f = u.get(C);
|
|
927
|
+
f && (f.checked = !1, u.delete(C)), e.emit("change", i.value);
|
|
923
928
|
}
|
|
924
929
|
}
|
|
925
|
-
|
|
926
|
-
|
|
930
|
+
J(i, (w) => {
|
|
931
|
+
a.value.updateDataSource(w);
|
|
927
932
|
});
|
|
928
|
-
function P(
|
|
933
|
+
function P(w) {
|
|
929
934
|
const C = /* @__PURE__ */ new Map();
|
|
930
|
-
|
|
935
|
+
i.value.reduce((f, b) => (f.set(b[l.value], b), f), C), i.value = w.map((f) => C.get(f[l.value])), e.emit("change", i.value);
|
|
931
936
|
}
|
|
932
|
-
function
|
|
933
|
-
e.emit("activeChange",
|
|
937
|
+
function y(w) {
|
|
938
|
+
e.emit("activeChange", w);
|
|
934
939
|
}
|
|
935
|
-
function
|
|
936
|
-
return
|
|
937
|
-
ref:
|
|
940
|
+
function M() {
|
|
941
|
+
return n(H, {
|
|
942
|
+
ref: a,
|
|
938
943
|
style: "flex:1",
|
|
939
|
-
data:
|
|
944
|
+
data: i.value,
|
|
940
945
|
draggable: !0,
|
|
941
946
|
view: "DraggableView",
|
|
942
947
|
"keep-order": !0,
|
|
943
948
|
onChange: P,
|
|
944
|
-
onRemoveItem:
|
|
945
|
-
onActiveChange:
|
|
949
|
+
onRemoveItem: F,
|
|
950
|
+
onActiveChange: y
|
|
946
951
|
}, null);
|
|
947
952
|
}
|
|
948
|
-
function
|
|
949
|
-
return
|
|
953
|
+
function T() {
|
|
954
|
+
return n("div", {
|
|
950
955
|
class: "f-utils-fill selection-pane d-flex flex-column"
|
|
951
|
-
}, [
|
|
956
|
+
}, [n("div", {
|
|
952
957
|
class: "f-utils-flex-column selection-pane-content f-utils-fill"
|
|
953
|
-
}, [
|
|
958
|
+
}, [n("div", {
|
|
954
959
|
class: "selection-pane-title"
|
|
955
|
-
}, [
|
|
960
|
+
}, [n("span", {
|
|
956
961
|
class: "selection-title"
|
|
957
|
-
}, [
|
|
962
|
+
}, [c.value]), n("span", {
|
|
958
963
|
class: "selection-count"
|
|
959
|
-
}, [
|
|
964
|
+
}, [i.value && i.value.length]), n("span", {
|
|
960
965
|
class: "selection-item-title"
|
|
961
|
-
}, [
|
|
966
|
+
}, [p.value])]), n("div", {
|
|
962
967
|
class: "container columns-box f-utils-fill d-flex"
|
|
963
|
-
}, [
|
|
968
|
+
}, [M()])])]);
|
|
964
969
|
}
|
|
965
|
-
const
|
|
970
|
+
const v = $(() => ({
|
|
966
971
|
transfer: !0,
|
|
967
972
|
row: !0,
|
|
968
|
-
"f-utils-fill":
|
|
973
|
+
"f-utils-fill": o.value
|
|
969
974
|
}));
|
|
970
|
-
return () =>
|
|
971
|
-
class:
|
|
975
|
+
return () => n("div", {
|
|
976
|
+
class: v.value,
|
|
972
977
|
style: "height:480px"
|
|
973
|
-
}, [
|
|
978
|
+
}, [O(), T()]);
|
|
974
979
|
}
|
|
975
980
|
});
|
|
976
|
-
function
|
|
977
|
-
var
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
const v = "", a = "", r = h();
|
|
981
|
-
function m() {
|
|
981
|
+
function vt(t, e, l) {
|
|
982
|
+
var P;
|
|
983
|
+
const c = "", p = "", s = g();
|
|
984
|
+
function o() {
|
|
982
985
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
983
986
|
}
|
|
984
|
-
function
|
|
987
|
+
function m() {
|
|
985
988
|
return !1;
|
|
986
989
|
}
|
|
987
|
-
function
|
|
990
|
+
function i() {
|
|
988
991
|
return (e == null ? void 0 : e.schema.componentType) !== "frame";
|
|
989
992
|
}
|
|
990
993
|
function d() {
|
|
991
994
|
return (e == null ? void 0 : e.schema.componentType) === "frame";
|
|
992
995
|
}
|
|
993
|
-
function
|
|
994
|
-
if (!
|
|
996
|
+
function u(y) {
|
|
997
|
+
if (!y || !y.value)
|
|
995
998
|
return null;
|
|
996
|
-
if (
|
|
997
|
-
return
|
|
998
|
-
const
|
|
999
|
-
return
|
|
999
|
+
if (y.value.schema && y.value.schema.type === "component")
|
|
1000
|
+
return y.value;
|
|
1001
|
+
const M = g(y == null ? void 0 : y.value.parent), T = u(M);
|
|
1002
|
+
return T || null;
|
|
1000
1003
|
}
|
|
1001
|
-
function
|
|
1002
|
-
const { componentInstance:
|
|
1003
|
-
return !
|
|
1004
|
+
function a(y = e) {
|
|
1005
|
+
const { componentInstance: M, designerItemElementRef: T } = y;
|
|
1006
|
+
return !M || !M.value ? null : M.value.canMove ? T : a(y.parent);
|
|
1004
1007
|
}
|
|
1005
|
-
function
|
|
1006
|
-
return !!
|
|
1008
|
+
function r(y) {
|
|
1009
|
+
return !!l;
|
|
1007
1010
|
}
|
|
1008
|
-
function
|
|
1011
|
+
function V() {
|
|
1009
1012
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
1010
1013
|
}
|
|
1011
|
-
function
|
|
1014
|
+
function S() {
|
|
1012
1015
|
}
|
|
1013
|
-
function
|
|
1016
|
+
function k(y, M) {
|
|
1014
1017
|
}
|
|
1015
|
-
function
|
|
1016
|
-
const { componentType:
|
|
1017
|
-
let
|
|
1018
|
-
const
|
|
1019
|
-
return
|
|
1018
|
+
function I(y, M) {
|
|
1019
|
+
const { componentType: T } = y;
|
|
1020
|
+
let v = Z(T, y, M);
|
|
1021
|
+
const w = T.toLowerCase().replace(/-/g, "_");
|
|
1022
|
+
return v && !v.id && v.type === T && (v.id = `${w}_${Math.random().toString().slice(2, 6)}`), v;
|
|
1020
1023
|
}
|
|
1021
|
-
function
|
|
1022
|
-
const f = String(w.getAttribute("data-controltype")), y = w.getAttribute("data-feature"), C = y ? JSON.parse(y) : {};
|
|
1023
|
-
C.parentComponentInstance = r.value;
|
|
1024
|
-
let s = N(f, C);
|
|
1025
|
-
const S = f.toLowerCase().replace("-", "_");
|
|
1026
|
-
return s && !s.id && s.type === f && (s.id = `${S}_${Math.random().toString().slice(2, 6)}`), s;
|
|
1024
|
+
function D(y) {
|
|
1027
1025
|
}
|
|
1028
|
-
function
|
|
1026
|
+
function O(...y) {
|
|
1029
1027
|
}
|
|
1030
|
-
function
|
|
1028
|
+
function F() {
|
|
1029
|
+
e != null && e.schema.contents && e.schema.contents.map((y) => {
|
|
1030
|
+
var v;
|
|
1031
|
+
let M = y.id;
|
|
1032
|
+
y.type === "component-ref" && (M = y.component);
|
|
1033
|
+
const T = t.value.querySelector(`#${M}-design-item`);
|
|
1034
|
+
(v = T == null ? void 0 : T.componentInstance) != null && v.value.onRemoveComponent && T.componentInstance.value.onRemoveComponent();
|
|
1035
|
+
});
|
|
1031
1036
|
}
|
|
1032
|
-
return
|
|
1033
|
-
canMove:
|
|
1034
|
-
canSelectParent:
|
|
1035
|
-
canDelete:
|
|
1037
|
+
return s.value = {
|
|
1038
|
+
canMove: o(),
|
|
1039
|
+
canSelectParent: m(),
|
|
1040
|
+
canDelete: i(),
|
|
1036
1041
|
canNested: !d(),
|
|
1037
1042
|
contents: e == null ? void 0 : e.schema.contents,
|
|
1038
1043
|
elementRef: t,
|
|
1039
|
-
parent: (
|
|
1044
|
+
parent: (P = e == null ? void 0 : e.parent) == null ? void 0 : P.componentInstance,
|
|
1040
1045
|
schema: e == null ? void 0 : e.schema,
|
|
1041
|
-
styles:
|
|
1042
|
-
designerClass:
|
|
1043
|
-
canAccepts:
|
|
1044
|
-
getBelongedComponentInstance:
|
|
1045
|
-
getDraggableDesignItemElement:
|
|
1046
|
-
getDraggingDisplayText:
|
|
1047
|
-
getPropConfig:
|
|
1048
|
-
getDragScopeElement:
|
|
1049
|
-
onAcceptMovedChildElement:
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
}, r;
|
|
1046
|
+
styles: c,
|
|
1047
|
+
designerClass: p,
|
|
1048
|
+
canAccepts: r,
|
|
1049
|
+
getBelongedComponentInstance: u,
|
|
1050
|
+
getDraggableDesignItemElement: a,
|
|
1051
|
+
getDraggingDisplayText: V,
|
|
1052
|
+
getPropConfig: O,
|
|
1053
|
+
getDragScopeElement: S,
|
|
1054
|
+
onAcceptMovedChildElement: k,
|
|
1055
|
+
onChildElementMovedOut: D,
|
|
1056
|
+
addNewChildComponentSchema: I,
|
|
1057
|
+
triggerBelongedComponentToMoveWhenMoved: g(!1),
|
|
1058
|
+
triggerBelongedComponentToDeleteWhenDeleted: g(!1),
|
|
1059
|
+
onRemoveComponent: F
|
|
1060
|
+
}, s;
|
|
1057
1061
|
}
|
|
1058
|
-
const
|
|
1062
|
+
const ht = /* @__PURE__ */ N({
|
|
1059
1063
|
name: "FTransferDesign",
|
|
1060
|
-
props:
|
|
1064
|
+
props: z,
|
|
1061
1065
|
emits: ["change"],
|
|
1062
1066
|
setup(t, e) {
|
|
1063
|
-
const
|
|
1064
|
-
function
|
|
1065
|
-
const C = /* @__PURE__ */ new Map(),
|
|
1066
|
-
|
|
1067
|
-
const
|
|
1068
|
-
|
|
1069
|
-
const j =
|
|
1070
|
-
|
|
1067
|
+
const l = g(t.identifyField), c = g("已选:"), p = g("项数据"), s = g(t.displayType), o = g(!1), m = g(t.dataSource), i = g(t.selections || []), d = $(() => i.value.map((C) => C[l.value])), u = /* @__PURE__ */ new Map();
|
|
1068
|
+
function a() {
|
|
1069
|
+
const C = /* @__PURE__ */ new Map(), f = t.selectionValues || [];
|
|
1070
|
+
f.length && f.reduce((h, j) => (h.set(j, !0), h), C);
|
|
1071
|
+
const b = t.selections || [];
|
|
1072
|
+
b.length && (C.clear(), b.reduce((h, j) => (h.set(j[l.value], !0), h), C)), i.value.length || (i.value = m.value.filter((h) => C.has(h[l.value])).map((h) => Object.assign({}, h))), m.value.forEach((h) => {
|
|
1073
|
+
const j = h[l.value], A = C.has(j);
|
|
1074
|
+
h.checked = A, A && u.set(j, h);
|
|
1071
1075
|
});
|
|
1072
1076
|
}
|
|
1073
|
-
|
|
1074
|
-
const
|
|
1075
|
-
function
|
|
1076
|
-
|
|
1077
|
+
a();
|
|
1078
|
+
const r = $(() => s.value === "List"), V = $(() => s.value === "Tree");
|
|
1079
|
+
function S(C) {
|
|
1080
|
+
i.value = C.map((f) => Object.assign({}, f)), e.emit("change", i.value);
|
|
1077
1081
|
}
|
|
1078
1082
|
function k() {
|
|
1079
|
-
return
|
|
1083
|
+
return n(H, {
|
|
1080
1084
|
class: "f-utils-fill",
|
|
1081
1085
|
data: m.value,
|
|
1082
1086
|
"multi-select": !0,
|
|
1083
1087
|
draggable: !1,
|
|
1084
1088
|
header: "Search",
|
|
1085
1089
|
headerClass: "transfer-search-box",
|
|
1086
|
-
"selection-values":
|
|
1087
|
-
onSelectionChange:
|
|
1090
|
+
"selection-values": d.value,
|
|
1091
|
+
onSelectionChange: S
|
|
1088
1092
|
}, {
|
|
1089
1093
|
default: () => [_(" ")]
|
|
1090
1094
|
});
|
|
1091
1095
|
}
|
|
1092
1096
|
function I() {
|
|
1093
|
-
return
|
|
1097
|
+
return n(B, null, null);
|
|
1094
1098
|
}
|
|
1095
1099
|
function D() {
|
|
1096
|
-
return
|
|
1100
|
+
return n("div", {
|
|
1097
1101
|
class: "f-utils-fill option-pane d-flex flex-column"
|
|
1098
|
-
}, [
|
|
1102
|
+
}, [n("div", {
|
|
1099
1103
|
class: "f-utils-flex-column option-pane-content f-utils-fill"
|
|
1100
|
-
}, [
|
|
1104
|
+
}, [n("div", {
|
|
1101
1105
|
class: "container columns-box d-flex f-utils-fill"
|
|
1102
|
-
}, [
|
|
1106
|
+
}, [r.value && k(), V.value && I()])])]);
|
|
1103
1107
|
}
|
|
1104
|
-
function
|
|
1105
|
-
const
|
|
1106
|
-
if (
|
|
1107
|
-
|
|
1108
|
-
const
|
|
1109
|
-
|
|
1108
|
+
function O(C) {
|
|
1109
|
+
const f = C[l.value];
|
|
1110
|
+
if (f !== null || f !== void 0) {
|
|
1111
|
+
i.value = i.value.filter((h) => h[l.value] !== f);
|
|
1112
|
+
const b = u.get(f);
|
|
1113
|
+
b && (b.checked = !1, u.delete(f)), e.emit("change", i.value);
|
|
1110
1114
|
}
|
|
1111
1115
|
}
|
|
1112
|
-
function
|
|
1113
|
-
const
|
|
1114
|
-
|
|
1116
|
+
function F(C) {
|
|
1117
|
+
const f = /* @__PURE__ */ new Map();
|
|
1118
|
+
i.value.reduce((b, h) => (b.set(h[l.value], h), b), f), i.value = C.map((b) => f.get(b[l.value])), e.emit("change", i.value);
|
|
1115
1119
|
}
|
|
1116
1120
|
function P() {
|
|
1117
|
-
return
|
|
1121
|
+
return n(H, {
|
|
1118
1122
|
style: "flex:1",
|
|
1119
|
-
data:
|
|
1123
|
+
data: i.value,
|
|
1120
1124
|
draggable: !0,
|
|
1121
1125
|
view: "DraggableView",
|
|
1122
1126
|
"keep-order": !0,
|
|
1123
|
-
onChange:
|
|
1124
|
-
onRemoveItem:
|
|
1127
|
+
onChange: F,
|
|
1128
|
+
onRemoveItem: O
|
|
1125
1129
|
}, {
|
|
1126
1130
|
default: () => [_(" ")]
|
|
1127
1131
|
});
|
|
1128
1132
|
}
|
|
1129
|
-
function
|
|
1130
|
-
return
|
|
1133
|
+
function y() {
|
|
1134
|
+
return n("div", {
|
|
1131
1135
|
class: "f-utils-fill selection-pane d-flex flex-column"
|
|
1132
|
-
}, [
|
|
1136
|
+
}, [n("div", {
|
|
1133
1137
|
class: "f-utils-flex-column selection-pane-content f-utils-fill"
|
|
1134
|
-
}, [
|
|
1138
|
+
}, [n("div", {
|
|
1135
1139
|
class: "selection-pane-title"
|
|
1136
|
-
}, [
|
|
1140
|
+
}, [n("span", {
|
|
1137
1141
|
class: "selection-title"
|
|
1138
|
-
}, [
|
|
1142
|
+
}, [c.value]), n("span", {
|
|
1139
1143
|
class: "selection-count"
|
|
1140
|
-
}, [
|
|
1144
|
+
}, [i.value && i.value.length]), n("span", {
|
|
1141
1145
|
class: "selection-item-title"
|
|
1142
|
-
}, [
|
|
1146
|
+
}, [p.value])]), n("div", {
|
|
1143
1147
|
class: "container columns-box f-utils-fill d-flex"
|
|
1144
1148
|
}, [P()])])]);
|
|
1145
1149
|
}
|
|
1146
|
-
const
|
|
1150
|
+
const M = $(() => ({
|
|
1147
1151
|
transfer: !0,
|
|
1148
1152
|
row: !0,
|
|
1149
|
-
"f-utils-fill":
|
|
1150
|
-
})),
|
|
1153
|
+
"f-utils-fill": o.value
|
|
1154
|
+
})), T = g(), v = ae("design-item-context"), w = vt(T, v);
|
|
1151
1155
|
return oe(() => {
|
|
1152
|
-
|
|
1153
|
-
}), e.expose(
|
|
1154
|
-
ref:
|
|
1155
|
-
class:
|
|
1156
|
+
T.value.componentInstance = w;
|
|
1157
|
+
}), e.expose(w.value), () => n("div", {
|
|
1158
|
+
ref: T,
|
|
1159
|
+
class: M.value,
|
|
1156
1160
|
style: "height:480px"
|
|
1157
|
-
}, [D(),
|
|
1161
|
+
}, [D(), y()]);
|
|
1158
1162
|
}
|
|
1159
|
-
})
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
n.component(e.name, t);
|
|
1163
|
-
}, t;
|
|
1164
|
-
};
|
|
1165
|
-
H.register = (t, e, n) => {
|
|
1166
|
-
t.transfer = H, e.transfer = ee;
|
|
1163
|
+
});
|
|
1164
|
+
E.register = (t, e, l) => {
|
|
1165
|
+
t.transfer = E, e.transfer = ee;
|
|
1167
1166
|
};
|
|
1168
|
-
|
|
1169
|
-
t.transfer =
|
|
1167
|
+
E.registerDesigner = (t, e, l) => {
|
|
1168
|
+
t.transfer = ht, e.transfer = ee;
|
|
1170
1169
|
};
|
|
1171
|
-
const
|
|
1170
|
+
const bt = be(E);
|
|
1172
1171
|
export {
|
|
1173
|
-
|
|
1174
|
-
|
|
1172
|
+
E as FTransfer,
|
|
1173
|
+
bt as default,
|
|
1175
1174
|
ee as propsResolver,
|
|
1176
|
-
|
|
1175
|
+
z as transferProps
|
|
1177
1176
|
};
|