@farris/ui-vue 1.7.0-beta.4 → 1.7.0
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 +61 -312
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +56 -1481
- package/components/avatar/index.umd.cjs +1 -1
- package/components/binding-selector/index.esm.js +8 -752
- package/components/binding-selector/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +358 -351
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/button-group/index.esm.js +110 -266
- package/components/button-group/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +1371 -1284
- package/components/calendar/index.umd.cjs +30 -30
- package/components/code-editor/index.esm.js +169 -237
- package/components/code-editor/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +382 -351
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/color-picker/index.esm.js +502 -812
- package/components/color-picker/index.umd.cjs +1 -1
- package/components/combo-list/index.esm.js +197 -183
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +199 -364
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +1501 -1465
- package/components/comment/index.umd.cjs +6 -6
- package/components/common/index.esm.js +136 -100
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.css +1 -1
- package/components/component/index.esm.js +2662 -3647
- package/components/component/index.umd.cjs +1 -8
- package/components/condition/index.esm.js +492 -2449
- package/components/condition/index.umd.cjs +1 -8
- package/components/content-container/index.esm.js +252 -241
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +505 -409
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3326 -3258
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +1709 -1634
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +2693 -3021
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +102 -98
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +409 -358
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dropdown/index.esm.js +124 -373
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +760 -573
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +354 -327
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/dynamic-view/index.esm.js +413 -359
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +1 -1
- package/components/event-parameter/index.umd.cjs +1 -1
- package/components/events-editor/index.css +1 -1
- package/components/events-editor/index.esm.js +1535 -1941
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.css +1 -1
- package/components/expression-editor/index.esm.js +2 -7317
- package/components/expression-editor/index.umd.cjs +1 -427
- package/components/field-selector/index.esm.js +13 -13
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/fieldset/index.esm.js +140 -123
- package/components/fieldset/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +1021 -1012
- package/components/filter-bar/index.umd.cjs +2 -2
- package/components/filter-condition-editor/index.css +1 -1
- package/components/filter-condition-editor/index.esm.js +448 -9000
- package/components/filter-condition-editor/index.umd.cjs +1 -427
- package/components/html-template/index.esm.js +167 -147
- package/components/html-template/index.umd.cjs +1 -1
- package/components/image/index.esm.js +372 -352
- package/components/image/index.umd.cjs +2 -2
- package/components/image-cropper/index.esm.js +361 -615
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/json-editor/index.esm.js +247 -325
- package/components/json-editor/index.umd.cjs +1 -1
- package/components/language-textbox/index.esm.js +835 -421
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/layout/index.esm.js +163 -549
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +39 -836
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +690 -474
- package/components/list-view/index.umd.cjs +6 -8
- package/components/loading/index.esm.js +128 -97
- package/components/loading/index.umd.cjs +2 -2
- package/components/locale/index.esm.js +361 -340
- package/components/locale/index.umd.cjs +5 -5
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +3396 -3368
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +1684 -1584
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/menu-lookup/index.esm.js +586 -609
- package/components/menu-lookup/index.umd.cjs +6 -6
- package/components/message-box/index.css +1 -1
- package/components/message-box/index.esm.js +357 -353
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +325 -318
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +31 -311
- package/components/nav/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +189 -1633
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +195 -175
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +761 -1057
- package/components/order/index.umd.cjs +7 -9
- package/components/page-footer/index.esm.js +48 -331
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +92 -73
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +195 -472
- package/components/pagination/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +77 -76
- package/components/popover/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +148 -353
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +74 -68
- package/components/property-editor/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +872 -1800
- package/components/property-panel/index.umd.cjs +5 -12
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +4223 -6205
- package/components/query-solution/index.umd.cjs +6 -13
- package/components/response-layout/index.esm.js +206 -170
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +1 -1
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +378 -359
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +2491 -2653
- package/components/schema-selector/index.umd.cjs +8 -10
- package/components/search-box/index.esm.js +79 -240
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +304 -289
- package/components/section/index.umd.cjs +2 -2
- package/components/smoke-detector/index.esm.js +8 -179
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/sort-condition-editor/index.esm.js +4 -9421
- package/components/sort-condition-editor/index.umd.cjs +1 -427
- package/components/splitter/index.esm.js +142 -1171
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +48 -47
- package/components/step/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +460 -513
- package/components/tabs/index.umd.cjs +1 -1
- package/components/text/index.esm.js +73 -217
- package/components/text/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +380 -375
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/tooltip/index.esm.js +40 -40
- package/components/tooltip/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +551 -771
- package/components/transfer/index.umd.cjs +6 -8
- package/components/tree-grid/index.esm.js +250 -235
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +157 -314
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +634 -1125
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +106 -359
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +89 -222
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +199 -290
- package/components/weather/index.umd.cjs +1 -1
- package/designer/accordion/index.esm.js +257 -0
- package/designer/accordion/index.umd.cjs +1 -0
- package/designer/avatar/index.esm.js +227 -0
- package/designer/avatar/index.umd.cjs +1 -0
- package/designer/binding-selector/index.esm.js +792 -0
- package/designer/binding-selector/index.umd.cjs +1 -0
- package/designer/button-edit/index.esm.js +210 -203
- package/designer/button-edit/index.umd.cjs +1 -1
- package/designer/button-group/index.esm.js +282 -0
- package/designer/button-group/index.umd.cjs +1 -0
- package/designer/checkbox/index.esm.js +51 -45
- package/designer/checkbox/index.umd.cjs +1 -1
- package/designer/checkbox-group/index.esm.js +89 -83
- package/designer/checkbox-group/index.umd.cjs +1 -1
- package/designer/code-editor/index.esm.js +75 -0
- package/designer/code-editor/index.umd.cjs +1 -0
- package/designer/color-picker/index.esm.js +1096 -0
- package/designer/color-picker/index.umd.cjs +1 -0
- package/designer/combo-list/index.esm.js +1095 -0
- package/designer/combo-list/index.umd.cjs +1 -0
- package/designer/combo-tree/index.esm.js +186 -0
- package/designer/combo-tree/index.umd.cjs +1 -0
- package/designer/component/index.css +1 -0
- package/designer/component/index.esm.js +5002 -0
- package/designer/component/index.umd.cjs +1 -0
- package/designer/condition/index.esm.js +1899 -0
- package/designer/condition/index.umd.cjs +1 -0
- package/designer/data-grid/index.esm.js +5580 -6213
- package/designer/data-grid/index.umd.cjs +10 -17
- package/designer/data-view/index.esm.js +212 -191
- package/designer/data-view/index.umd.cjs +2 -2
- package/designer/date-picker/index.esm.js +621 -607
- package/designer/date-picker/index.umd.cjs +1 -1
- package/designer/drawer/index.css +1 -1
- package/designer/drawer/index.esm.js +869 -620
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dropdown/index.esm.js +261 -0
- package/designer/dropdown/index.umd.cjs +1 -0
- package/designer/dynamic-form/index.esm.js +1166 -1384
- package/designer/dynamic-form/index.umd.cjs +1 -8
- package/designer/expression-editor/index.css +1 -0
- package/designer/expression-editor/index.esm.js +7006 -0
- package/designer/expression-editor/index.umd.cjs +427 -0
- package/designer/farris-designer.all.esm.js +10309 -10617
- package/designer/farris-designer.all.umd.cjs +17 -19
- package/designer/filter-condition-editor/index.css +1 -0
- package/designer/filter-condition-editor/index.esm.js +4795 -0
- package/designer/filter-condition-editor/index.umd.cjs +1 -0
- package/designer/html-template/index.esm.js +718 -0
- package/designer/html-template/index.umd.cjs +1 -0
- package/designer/image-cropper/index.esm.js +765 -0
- package/designer/image-cropper/index.umd.cjs +1 -0
- package/designer/index.css +1 -1
- package/designer/input-group/index.esm.js +72 -66
- package/designer/input-group/index.umd.cjs +1 -1
- package/designer/json-editor/index.esm.js +83 -0
- package/designer/json-editor/index.umd.cjs +1 -0
- package/designer/language-textbox/index.esm.js +783 -0
- package/designer/language-textbox/index.umd.cjs +8 -0
- package/designer/layout/index.esm.js +430 -0
- package/designer/layout/index.umd.cjs +1 -0
- package/designer/list-nav/index.esm.js +802 -0
- package/designer/list-nav/index.umd.cjs +1 -0
- package/designer/list-view/index.esm.js +864 -844
- package/designer/list-view/index.umd.cjs +7 -9
- package/designer/lookup/index.esm.js +2083 -0
- package/designer/lookup/index.umd.cjs +1 -0
- package/designer/menu-lookup/index.esm.js +46 -0
- package/designer/menu-lookup/index.umd.cjs +1 -0
- package/designer/modal/index.esm.js +137 -29
- package/designer/modal/index.umd.cjs +1 -1
- package/designer/nav/index.esm.js +284 -0
- package/designer/nav/index.umd.cjs +1 -0
- package/designer/number-range/index.esm.js +1616 -0
- package/designer/number-range/index.umd.cjs +1 -0
- package/designer/number-spinner/index.esm.js +19 -17
- package/designer/number-spinner/index.umd.cjs +1 -1
- package/designer/order/index.css +1 -0
- package/designer/order/index.esm.js +2196 -0
- package/designer/order/index.umd.cjs +18 -0
- package/designer/page-footer/index.esm.js +290 -0
- package/designer/page-footer/index.umd.cjs +1 -0
- package/designer/page-header/index.esm.js +1003 -0
- package/designer/page-header/index.umd.cjs +1 -0
- package/designer/pagination/index.esm.js +591 -0
- package/designer/pagination/index.umd.cjs +1 -0
- package/designer/progress/index.esm.js +213 -0
- package/designer/progress/index.umd.cjs +1 -0
- package/designer/radio-group/index.esm.js +978 -949
- package/designer/radio-group/index.umd.cjs +1 -1
- package/designer/response-layout-editor/index.esm.js +1 -1
- package/designer/response-layout-editor/index.umd.cjs +1 -1
- package/designer/response-toolbar/index.esm.js +1471 -1416
- package/designer/response-toolbar/index.umd.cjs +1 -1
- package/designer/search-box/index.esm.js +245 -0
- package/designer/search-box/index.umd.cjs +1 -0
- package/designer/section/index.esm.js +83 -78
- package/designer/section/index.umd.cjs +1 -1
- package/designer/smoke-detector/index.css +1 -0
- package/designer/smoke-detector/index.esm.js +178 -0
- package/designer/smoke-detector/index.umd.cjs +1 -0
- package/designer/sort-condition-editor/index.esm.js +138 -0
- package/designer/sort-condition-editor/index.umd.cjs +1 -0
- package/designer/splitter/index.esm.js +1120 -0
- package/designer/splitter/index.umd.cjs +1 -0
- package/designer/step/index.esm.js +226 -0
- package/designer/step/index.umd.cjs +1 -0
- package/designer/switch/index.esm.js +10 -10
- package/designer/switch/index.umd.cjs +1 -1
- package/designer/tabs/index.css +1 -1
- package/designer/tabs/index.esm.js +2447 -2698
- package/designer/tabs/index.umd.cjs +2 -2
- package/designer/text/index.esm.js +147 -0
- package/designer/text/index.umd.cjs +1 -0
- package/designer/time-picker/index.esm.js +101 -100
- package/designer/time-picker/index.umd.cjs +1 -1
- package/designer/transfer/index.esm.js +254 -0
- package/designer/transfer/index.umd.cjs +1 -0
- package/designer/tree-grid/index.esm.js +473 -810
- package/designer/tree-grid/index.umd.cjs +1 -1
- package/designer/tree-view/index.esm.js +313 -0
- package/designer/tree-view/index.umd.cjs +1 -0
- package/designer/uploader/index.esm.js +1190 -0
- package/designer/uploader/index.umd.cjs +2 -0
- package/designer/verify-detail/index.esm.js +258 -0
- package/designer/verify-detail/index.umd.cjs +1 -0
- package/designer/video/index.esm.js +136 -0
- package/designer/video/index.umd.cjs +1 -0
- package/designer/weather/index.css +1 -0
- package/designer/weather/index.esm.js +6244 -0
- package/designer/weather/index.umd.cjs +14 -0
- package/farris.all.esm.js +69941 -70514
- package/farris.all.umd.cjs +117 -117
- package/index.css +1 -1
- package/locales/filter-bar/ui/en.json +2 -1
- package/locales/filter-bar/ui/zh-CHS.json +2 -1
- package/locales/filter-bar/ui/zh-CHT.json +2 -1
- package/locales/query-solution/ui/en.json +1 -1
- package/locales/query-solution/ui/zh-CHS.json +1 -1
- package/locales/query-solution/ui/zh-CHT.json +1 -1
- package/locales/ui/en.json +3 -2
- package/locales/ui/zh-CHS.json +3 -2
- package/locales/ui/zh-CHT.json +3 -2
- package/package.json +1 -1
- package/types/accordion/designer.d.ts +44 -0
- package/types/accordion/src/accordion.props.d.ts +0 -1
- package/types/accordion/src/components/accordion-item.props.d.ts +0 -1
- package/types/avatar/designer.d.ts +29 -0
- package/types/avatar/src/avatar.props.d.ts +0 -1
- package/types/avatar/src/property-config/avatar.property-config.d.ts +1 -1
- package/types/{expression-editor/index.d.ts → binding-selector/designer.d.ts} +6 -6
- package/types/binding-selector/index.d.ts +0 -54
- package/types/binding-selector/src/binding-selector.props.d.ts +0 -1
- package/types/button-group/designer.d.ts +29 -0
- package/types/button-group/index.d.ts +15 -0
- package/types/button-group/src/button-group.props.d.ts +0 -1
- package/types/calendar/src/calendar.props.d.ts +1 -0
- package/types/calendar/src/components/month/month-view.component.d.ts +6 -6
- package/types/calendar/src/composition/use-calendar-events.d.ts +1 -1
- package/types/calendar/src/composition/use-locales.d.ts +1 -0
- package/types/calendar/src/property-config/calendar.property-config.d.ts +2 -0
- package/types/capsule/src/capsule-item.component.d.ts +6 -6
- package/types/checkbox/designer.d.ts +2 -0
- package/types/checkbox-group/designer.d.ts +2 -0
- package/types/code-editor/designer.d.ts +5 -0
- package/types/code-editor/index.d.ts +0 -1
- package/types/code-editor/src/code-textbox.component.d.ts +6 -6
- package/types/code-editor/src/code-textbox.props.d.ts +0 -2
- package/types/color-picker/designer.d.ts +29 -0
- package/types/color-picker/index.d.ts +0 -15
- package/types/color-picker/src/color-picker.props.d.ts +0 -1
- package/types/combo-list/designer.d.ts +29 -0
- package/types/combo-list/src/combo-list.props.d.ts +1 -0
- package/types/combo-list/src/designer/combo-list.design.props.d.ts +6 -0
- package/types/combo-tree/designer.d.ts +5 -0
- package/types/combo-tree/src/combo-tree.props.d.ts +0 -1
- package/types/combo-tree/src/components/tree-container.component.d.ts +7 -7
- package/types/comment/src/comment.props.d.ts +4 -0
- package/types/comment/src/designer/comment.design.props.d.ts +4 -0
- package/types/common/index.d.ts +1 -0
- package/types/common/utils/use-mobile.d.ts +1 -0
- package/types/component/designer.d.ts +35 -0
- package/types/component/index.d.ts +0 -2
- package/types/component/src/component.props.d.ts +0 -8
- package/types/component/src/composition/field-tree-builder.d.ts +1 -0
- package/types/components.d.ts +2 -6
- package/types/condition/designer.d.ts +56 -0
- package/types/condition/index.d.ts +0 -55
- package/types/content-container/index.d.ts +3 -2
- package/types/content-container/src/content-container.props.d.ts +1 -0
- package/types/data-grid/designer.d.ts +2 -0
- package/types/data-grid/index.d.ts +5 -2
- package/types/data-grid/src/data-grid.component.d.ts +2 -1
- package/types/data-grid/src/designer/grid-field-editor.props.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +7 -1
- package/types/data-view/composition/use-mobile.d.ts +3 -0
- package/types/data-view/designer/property-config/use-command-option.d.ts +11 -0
- package/types/data-view/index.d.ts +1 -0
- package/types/designer-canvas/src/composition/designer-canvas-changed.d.ts +3 -3
- package/types/designer-canvas/src/composition/dg-control.d.ts +8 -0
- package/types/designer-outline/src/designer-outline.component.d.ts +3 -3
- package/types/designer-outline/src/types.d.ts +5 -1
- package/types/drawer/designer.d.ts +12 -0
- package/types/drawer/src/designer/drawer-toolbar.design.props.d.ts +12 -0
- package/types/drawer/src/designer/drawer.design.component.d.ts +8 -0
- package/types/drawer/src/designer/drawer.design.props.d.ts +4 -0
- package/types/drawer/src/schema/schema-mapper.d.ts +1 -0
- package/types/drawer/src/schema/schema-resolver.d.ts +1 -0
- package/types/dropdown/designer.d.ts +6 -0
- package/types/dropdown/index.d.ts +27 -6
- package/types/dropdown/src/dropdown.item.component.d.ts +2 -2
- package/types/dropdown/src/dropdown.props.d.ts +0 -1
- package/types/dynamic-form/designer.d.ts +3 -1
- package/types/dynamic-form/index.d.ts +4 -3
- package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.component.d.ts +6 -6
- package/types/dynamic-form/src/composition/use-input-type-resolver.d.ts +11 -0
- package/types/dynamic-resolver/index.d.ts +3 -0
- package/types/dynamic-resolver/src/props-resolver.d.ts +2 -0
- package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver-design.d.ts +1 -1
- package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver.d.ts +1 -1
- package/types/dynamic-resolver/src/resolver/property-config/use-property-config-resolver.d.ts +2 -2
- package/types/dynamic-resolver/src/resolver/schema/schema-resolver-design.d.ts +1 -1
- package/types/dynamic-resolver/src/resolver/schema/schema-resolver.d.ts +1 -1
- package/types/dynamic-view/src/components/maps.d.ts +883 -1
- package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
- package/types/dynamic-view/src/types.d.ts +4 -0
- package/types/expression-editor/designer.d.ts +9 -0
- package/types/field-selector/index.d.ts +2 -1
- package/types/fieldset/index.d.ts +3 -2
- package/types/fieldset/src/fieldset.props.d.ts +1 -0
- package/types/filter-bar/src/composition/types.d.ts +1 -1
- package/types/filter-bar/src/composition/use-size.d.ts +2 -2
- package/types/filter-bar/src/locale/locale.d.ts +1 -0
- package/types/filter-condition-editor/designer.d.ts +10 -0
- package/types/filter-condition-editor/index.d.ts +0 -9
- package/types/filter-condition-editor/src/components/filter-condition-grid.component.d.ts +12 -12
- package/types/filter-condition-editor/src/components/sort-editor-grid.component.d.ts +12 -12
- package/types/filter-condition-editor/src/filter-condition-editor.props.d.ts +0 -1
- package/types/html-template/designer.d.ts +31 -0
- package/types/html-template/src/designer/html-template.design.props.d.ts +9 -0
- package/types/html-template/src/html-template.props.d.ts +2 -0
- package/types/image-cropper/designer.d.ts +4 -0
- package/types/image-cropper/src/image-cropper.props.d.ts +0 -1
- package/types/index.d.ts +0 -1
- package/types/input-group/designer.d.ts +2 -0
- package/types/json-editor/designer.d.ts +5 -0
- package/types/json-editor/src/components/editable-combo/editable-combo.component.d.ts +3 -3
- package/types/json-editor/src/components/editable-combo/popup-container.component.d.ts +3 -3
- package/types/json-editor/src/json-editor.props.d.ts +0 -1
- package/types/language-textbox/index.d.ts +6 -6
- package/types/language-textbox/src/language-textbox.component.d.ts +2 -2
- package/types/language-textbox/src/language-textbox.props.d.ts +1 -0
- package/types/layout/index.d.ts +1 -0
- package/types/layout/src/components/layout-pane.props.d.ts +0 -1
- package/types/layout/src/layout.props.d.ts +0 -1
- package/types/list-nav/index.d.ts +24 -5
- package/types/list-nav/src/list-nav.props.d.ts +0 -1
- package/types/list-view/index.d.ts +1 -0
- package/types/list-view/src/composition/use-draggable.d.ts +1 -1
- package/types/list-view/src/designer/list-view.design.props.d.ts +1 -0
- package/types/list-view/src/list-view-table.props.d.ts +1 -0
- package/types/loading/index.d.ts +6 -6
- package/types/loading/src/loading.component.d.ts +3 -3
- package/types/lookup/index.d.ts +1 -1
- package/types/lookup/src/components/popup-container.component.d.ts +6 -6
- package/types/lookup/src/lookup.props.d.ts +1 -0
- package/types/lookup/src/property-config/external-lookup.property-config.d.ts +1 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +1 -0
- package/types/menu-lookup/designer.d.ts +5 -0
- package/types/menu-lookup/src/menu-lookup.props.d.ts +0 -1
- package/types/message-box/index.d.ts +6 -6
- package/types/message-box/src/message-box.component.d.ts +3 -3
- package/types/modal/designer.d.ts +2 -0
- package/types/modal/index.d.ts +30 -24
- package/types/modal/src/modal.component.d.ts +15 -12
- package/types/modal/src/modal.props.d.ts +4 -0
- package/types/nav/designer.d.ts +6 -0
- package/types/nav/index.d.ts +24 -20
- package/types/nav/src/nav.props.d.ts +0 -1
- package/types/notify/index.d.ts +3 -3
- package/types/notify/src/notify.component.d.ts +2 -2
- package/types/number-range/designer.d.ts +29 -0
- package/types/number-range/src/number-range.props.d.ts +0 -1
- package/types/number-spinner/src/composition/types.d.ts +1 -0
- package/types/order/designer.d.ts +6 -0
- package/types/order/index.d.ts +36 -5
- package/types/order/src/designer/order.design.component.d.ts +1 -1
- package/types/order/src/order.props.d.ts +0 -1
- package/types/page-footer/designer.d.ts +6 -0
- package/types/page-footer/index.d.ts +0 -2
- package/types/page-footer/src/page-footer.props.d.ts +0 -1
- package/types/page-header/index.d.ts +3 -2
- package/types/page-header/src/designer/page-header.design.props.d.ts +20 -0
- package/types/page-header/src/page-header.props.d.ts +2 -0
- package/types/pagination/designer.d.ts +29 -0
- package/types/pagination/index.d.ts +15 -0
- package/types/pagination/src/pagination.props.d.ts +0 -1
- package/types/popover/index.d.ts +3 -3
- package/types/popover/src/composition/use-resize.d.ts +1 -1
- package/types/popover/src/popover.component.d.ts +2 -2
- package/types/progress/designer.d.ts +29 -0
- package/types/progress/src/progress.props.d.ts +0 -1
- package/types/property-panel/src/property-panel.component.d.ts +3 -3
- package/types/query-solution/index.d.ts +4 -4
- package/types/query-solution/src/composition/types.d.ts +8 -2
- package/types/query-solution/src/composition/use-header.d.ts +2 -2
- package/types/query-solution/src/composition/use-solution-utils.d.ts +1 -1
- package/types/query-solution/src/designer/query-solution-config/composition/use-util.d.ts +1 -1
- package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +1 -0
- package/types/query-solution/src/designer/solution-preset-config/solution-preset.props.d.ts +1 -0
- package/types/query-solution/src/query-solution.props.d.ts +1 -0
- package/types/radio-group/designer.d.ts +4 -1
- package/types/radio-group/src/designer/item-collection-editor.props.d.ts +1 -0
- package/types/response-layout/index.d.ts +3 -2
- package/types/response-layout/src/component/response-layout-item.props.d.ts +1 -0
- package/types/response-layout/src/property-config/response-layout-splitter/response-layout-splitter.props.d.ts +1 -0
- package/types/response-layout/src/response-layout.props.d.ts +1 -0
- package/types/response-toolbar/designer.d.ts +2 -1
- package/types/response-toolbar/src/designer/response-toolbar.design.props.d.ts +1 -0
- package/types/search-box/designer.d.ts +52 -0
- package/types/search-box/index.d.ts +1 -17
- package/types/search-box/src/components/search-box-container.component.d.ts +3 -3
- package/types/search-box/src/search-box.props.d.ts +0 -1
- package/types/section/designer.d.ts +1 -0
- package/types/smoke-detector/designer.d.ts +6 -0
- package/types/smoke-detector/index.d.ts +0 -2
- package/types/smoke-detector/src/smoke-detector.props.d.ts +0 -1
- package/types/sort-condition-editor/designer.d.ts +9 -0
- package/types/sort-condition-editor/index.d.ts +2 -7
- package/types/sort-condition-editor/src/sort-condition-editor.props.d.ts +0 -1
- package/types/splitter/designer.d.ts +32 -0
- package/types/splitter/index.d.ts +1 -0
- package/types/splitter/src/components/splitter-pane.props.d.ts +0 -1
- package/types/splitter/src/splitter.props.d.ts +0 -1
- package/types/step/designer.d.ts +6 -0
- package/types/tabs/designer.d.ts +1 -0
- package/types/tabs/index.d.ts +0 -1
- package/types/tabs/src/composition/types.d.ts +1 -0
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +1 -0
- package/types/tags/index.d.ts +3 -3
- package/types/tags/src/tags.component.d.ts +1 -1
- package/types/text/designer.d.ts +6 -0
- package/types/text/index.d.ts +24 -20
- package/types/text/src/text.props.d.ts +0 -1
- package/types/time-picker/src/components/time.component.d.ts +3 -3
- package/types/transfer/designer.d.ts +35 -0
- package/types/transfer/src/transfer.props.d.ts +0 -1
- package/types/tree-view/designer.d.ts +29 -0
- package/types/tree-view/src/tree-view.props.d.ts +0 -1
- package/types/uploader/designer.d.ts +141 -0
- package/types/uploader/index.d.ts +6 -6
- package/types/uploader/src/components/upload-progress.component.d.ts +3 -3
- package/types/uploader/src/uploader.component.d.ts +3 -3
- package/types/uploader/src/uploader.props.d.ts +0 -1
- package/types/verify-detail/designer.d.ts +6 -0
- package/types/verify-detail/index.d.ts +58 -5
- package/types/verify-detail/src/designer/verify-detail.design.component.d.ts +8 -8
- package/types/verify-detail/src/verify-detail.props.d.ts +0 -1
- package/types/video/designer.d.ts +6 -0
- package/types/video/index.d.ts +24 -20
- package/types/video/src/video.props.d.ts +0 -1
- package/components/sort-condition-editor/index.css +0 -1
- package/package.zip +0 -0
- package/types/designer-toolbox/index.d.ts +0 -3
- package/types/designer-toolbox/src/toolbox.component.d.ts +0 -14
- package/types/designer-toolbox/src/toolbox.props.d.ts +0 -29
- package/types/designer-toolbox/src/types.d.ts +0 -21
- package/types/designer.d.ts +0 -13
- package/types/flow-canvas/index.d.ts +0 -3
- package/types/flow-canvas/src/components/flow-node-item.component.d.ts +0 -8
- package/types/flow-canvas/src/components/flow-node-item.props.d.ts +0 -3
- package/types/flow-canvas/src/composition/types.d.ts +0 -42
- package/types/flow-canvas/src/composition/use-bezier-curve.d.ts +0 -2
- package/types/flow-canvas/src/composition/use-connections.d.ts +0 -2
- package/types/flow-canvas/src/composition/use-curve.d.ts +0 -4
- package/types/flow-canvas/src/composition/use-drawing-bezier.d.ts +0 -2
- package/types/flow-canvas/src/composition/use-drawing.d.ts +0 -4
- package/types/flow-canvas/src/flow-canvas.component.d.ts +0 -8
- package/types/flow-canvas/src/flow-canvas.props.d.ts +0 -3
- package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +0 -2
- package/types/layout/src/designer/layout-pane.design.component.d.ts +0 -8
- package/types/layout/src/designer/layout-use-designer-rules.d.ts +0 -2
- package/types/layout/src/designer/layout.design.component.d.ts +0 -8
- package/types/layout/src/schema/schema-mapper.d.ts +0 -2
- package/types/layout/src/schema/schema-resolver.d.ts +0 -2
- package/types/list-nav/src/designer/use-designer-rules.d.ts +0 -2
- package/types/list-nav/src/property-config/list-nav.property-config.d.ts +0 -8
- package/types/list-nav/src/schema/schema-mapper.d.ts +0 -2
- package/types/list-nav/src/schema/schema-resolver.d.ts +0 -2
- /package/{components → designer}/condition/index.css +0 -0
- /package/{components → designer}/uploader/index.css +0 -0
- /package/types/{list-nav/src/designer/list-nav.design.component.d.ts → dynamic-form/src/component/form-control/form-control.component.d.ts} +0 -0
|
@@ -0,0 +1,4795 @@
|
|
|
1
|
+
var wt = Object.defineProperty;
|
|
2
|
+
var St = (e, t, l) => t in e ? wt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[t] = l;
|
|
3
|
+
var Z = (e, t, l) => St(e, typeof t != "symbol" ? t + "" : t, l);
|
|
4
|
+
import { filterConditionEditorProps as Bt } from "../../components/filter-condition-editor/index.esm.js";
|
|
5
|
+
import { resolveAppearance as Tt, createPropsResolver as Fe, getPropsResolverGenerator as Ft } from "../../components/dynamic-resolver/index.esm.js";
|
|
6
|
+
import { defineComponent as K, ref as s, computed as S, createVNode as i, Teleport as ze, createApp as ke, onUnmounted as ye, Fragment as ie, watch as A, nextTick as de, onBeforeMount as kt, onMounted as le, watchEffect as Mt, Transition as We, shallowRef as It, render as we, h as Ot, cloneVNode as Et, mergeProps as ve, inject as oe, withDirectives as Pt, vShow as Rt, onUpdated as Me, onBeforeUnmount as Vt, createTextVNode as X, reactive as te } from "vue";
|
|
7
|
+
import { LocaleService as _ } from "../../components/locale/index.esm.js";
|
|
8
|
+
import { isMobilePhone as Lt, getMaxZIndex as je, useGuid as Ht, FormSchemaEntityFieldType$Type as Nt, withInstall as Ie } from "../../components/common/index.esm.js";
|
|
9
|
+
import { InputBaseProperty as jt } from "../../components/property-panel/index.esm.js";
|
|
10
|
+
import At from "../../components/tags/index.esm.js";
|
|
11
|
+
import { debounce as $e, isUndefined as zt, cloneDeep as Be } from "lodash-es";
|
|
12
|
+
import Wt from "../../components/popover/index.esm.js";
|
|
13
|
+
import De from "../../components/button-edit/index.esm.js";
|
|
14
|
+
import $t from "../../components/list-view/index.esm.js";
|
|
15
|
+
import Dt from "../button-edit/index.esm.js";
|
|
16
|
+
import { useDesignerComponent as Ut } from "../../components/designer-canvas/index.esm.js";
|
|
17
|
+
import { comboListProps as Ue } from "../../components/combo-list/index.esm.js";
|
|
18
|
+
import { FExpressionTextbox as qt } from "../expression-editor/index.esm.js";
|
|
19
|
+
import Gt from "../../components/event-parameter/index.esm.js";
|
|
20
|
+
import Xt from "../../components/tree-view/index.esm.js";
|
|
21
|
+
import { FInputGroup as Yt } from "../../components/input-group/index.esm.js";
|
|
22
|
+
const Kt = "https://json-schema.org/draft/2020-12/schema", _t = "https://farris-design.gitee.io/field-selector.schema.json", Jt = "field-selector", Zt = "A Farris Input Component", Qt = "object", el = {
|
|
23
|
+
disabled: {
|
|
24
|
+
description: "",
|
|
25
|
+
type: "boolean",
|
|
26
|
+
default: !1
|
|
27
|
+
},
|
|
28
|
+
readonly: {
|
|
29
|
+
description: "",
|
|
30
|
+
type: "boolean",
|
|
31
|
+
default: !1
|
|
32
|
+
},
|
|
33
|
+
modelValue: {
|
|
34
|
+
description: "",
|
|
35
|
+
type: "string",
|
|
36
|
+
default: ""
|
|
37
|
+
},
|
|
38
|
+
repositoryToken: {
|
|
39
|
+
description: "",
|
|
40
|
+
type: "object",
|
|
41
|
+
default: null
|
|
42
|
+
},
|
|
43
|
+
fields: {
|
|
44
|
+
description: "",
|
|
45
|
+
type: "array",
|
|
46
|
+
default: null
|
|
47
|
+
},
|
|
48
|
+
editorParams: {
|
|
49
|
+
type: "object",
|
|
50
|
+
default: null
|
|
51
|
+
},
|
|
52
|
+
displayText: {
|
|
53
|
+
description: "",
|
|
54
|
+
type: "string",
|
|
55
|
+
default: ""
|
|
56
|
+
},
|
|
57
|
+
enableClear: {
|
|
58
|
+
description: "",
|
|
59
|
+
type: "boolean",
|
|
60
|
+
default: !0
|
|
61
|
+
},
|
|
62
|
+
beforeOpen: {
|
|
63
|
+
description: "",
|
|
64
|
+
type: "function",
|
|
65
|
+
default: null
|
|
66
|
+
},
|
|
67
|
+
onSubmitModal: {
|
|
68
|
+
description: "",
|
|
69
|
+
type: "function",
|
|
70
|
+
default: null
|
|
71
|
+
},
|
|
72
|
+
editorType: {
|
|
73
|
+
description: "",
|
|
74
|
+
type: "string",
|
|
75
|
+
default: "filter"
|
|
76
|
+
},
|
|
77
|
+
enableExpression: {
|
|
78
|
+
description: "",
|
|
79
|
+
type: "boolean",
|
|
80
|
+
default: !1
|
|
81
|
+
},
|
|
82
|
+
expressionOptions: {
|
|
83
|
+
description: "",
|
|
84
|
+
type: "object",
|
|
85
|
+
default: null
|
|
86
|
+
},
|
|
87
|
+
formContextData: {
|
|
88
|
+
description: "",
|
|
89
|
+
type: "object",
|
|
90
|
+
default: {}
|
|
91
|
+
},
|
|
92
|
+
singleValue: {
|
|
93
|
+
description: "",
|
|
94
|
+
type: "boolean",
|
|
95
|
+
default: !0
|
|
96
|
+
},
|
|
97
|
+
idField: {
|
|
98
|
+
description: "",
|
|
99
|
+
type: "string",
|
|
100
|
+
default: "id"
|
|
101
|
+
},
|
|
102
|
+
textField: {
|
|
103
|
+
type: "string",
|
|
104
|
+
default: ""
|
|
105
|
+
},
|
|
106
|
+
valueField: {
|
|
107
|
+
type: "string",
|
|
108
|
+
default: ""
|
|
109
|
+
},
|
|
110
|
+
editable: {
|
|
111
|
+
type: "boolean",
|
|
112
|
+
default: !0
|
|
113
|
+
},
|
|
114
|
+
enableTitle: {
|
|
115
|
+
type: "boolean",
|
|
116
|
+
default: !0
|
|
117
|
+
}
|
|
118
|
+
}, tl = {
|
|
119
|
+
$schema: Kt,
|
|
120
|
+
$id: _t,
|
|
121
|
+
title: Jt,
|
|
122
|
+
description: Zt,
|
|
123
|
+
type: Qt,
|
|
124
|
+
properties: el
|
|
125
|
+
}, ll = {
|
|
126
|
+
/**
|
|
127
|
+
* 组件标识
|
|
128
|
+
*/
|
|
129
|
+
id: { type: String, default: "" },
|
|
130
|
+
/**
|
|
131
|
+
* 扩展按钮显示内容,这是一段现在扩展按钮中的html标签
|
|
132
|
+
*/
|
|
133
|
+
buttonContent: { type: String, default: '<i class="f-icon f-icon-lookup"></i>' },
|
|
134
|
+
buttonBehavior: { type: String, default: "Popup" },
|
|
135
|
+
/**
|
|
136
|
+
* 启用输入框自动完成功能
|
|
137
|
+
*/
|
|
138
|
+
autoComplete: { type: Boolean, default: !1 },
|
|
139
|
+
/**
|
|
140
|
+
* 组件自定义样式
|
|
141
|
+
*/
|
|
142
|
+
customClass: { type: String, default: "" },
|
|
143
|
+
/**
|
|
144
|
+
* 禁用组件,既不允许在输入框中录入,也不允许点击扩展按钮。
|
|
145
|
+
*/
|
|
146
|
+
disable: { type: Boolean, default: !1 },
|
|
147
|
+
/**
|
|
148
|
+
* 允许在输入框中录入文本。
|
|
149
|
+
*/
|
|
150
|
+
editable: { type: Boolean, default: !0 },
|
|
151
|
+
/**
|
|
152
|
+
* 显示清空文本按钮
|
|
153
|
+
*/
|
|
154
|
+
enableClear: { type: Boolean, default: !1 },
|
|
155
|
+
/**
|
|
156
|
+
* 组件值
|
|
157
|
+
*/
|
|
158
|
+
modelValue: { type: String, default: "" },
|
|
159
|
+
/**
|
|
160
|
+
* 将组件设置为只读,既不允许在输入框中录入,也不允许点击扩展按钮,但是允许复制输入框中的内容。
|
|
161
|
+
*/
|
|
162
|
+
readonly: { type: Boolean, default: !1 },
|
|
163
|
+
/**
|
|
164
|
+
* 禁用组件时,是否显示扩展按钮
|
|
165
|
+
*/
|
|
166
|
+
showButtonWhenDisabled: { type: Boolean, default: !1 },
|
|
167
|
+
/**
|
|
168
|
+
* 鼠标悬停在组件上时显示文本框内容。
|
|
169
|
+
*/
|
|
170
|
+
enableTitle: { type: Boolean, default: !1 },
|
|
171
|
+
/**
|
|
172
|
+
* 输入框类型
|
|
173
|
+
*/
|
|
174
|
+
inputType: { type: String, default: "text" },
|
|
175
|
+
/**
|
|
176
|
+
* 显示输入框提示信息
|
|
177
|
+
*/
|
|
178
|
+
forcePlaceholder: { type: Boolean, default: !1 },
|
|
179
|
+
/**
|
|
180
|
+
* 输入框提示文本
|
|
181
|
+
*/
|
|
182
|
+
placeholder: { type: String, default: "" },
|
|
183
|
+
/**
|
|
184
|
+
* 输入框最小长度
|
|
185
|
+
*/
|
|
186
|
+
minLength: Number,
|
|
187
|
+
/**
|
|
188
|
+
* 输入框最大长度
|
|
189
|
+
*/
|
|
190
|
+
maxLength: { type: Number },
|
|
191
|
+
/**
|
|
192
|
+
* 输入框Tab键索引
|
|
193
|
+
*/
|
|
194
|
+
tabIndex: Number,
|
|
195
|
+
popupHost: { type: Object },
|
|
196
|
+
popupRightBoundary: { type: Object },
|
|
197
|
+
popupOffsetX: { type: Object },
|
|
198
|
+
popupOnInput: { type: Boolean, default: !1 },
|
|
199
|
+
popupOnFocus: { type: Boolean, default: !1 },
|
|
200
|
+
popupOnClick: { type: Boolean, default: !1 },
|
|
201
|
+
/**
|
|
202
|
+
* 样式追加到弹出窗口
|
|
203
|
+
*/
|
|
204
|
+
popupClass: { type: String, default: "" },
|
|
205
|
+
popupMinWidth: { type: Number, default: 160 },
|
|
206
|
+
modalOptions: { type: Object, default: {} },
|
|
207
|
+
wrapText: { type: Boolean, default: !1 },
|
|
208
|
+
/**
|
|
209
|
+
* 可选,是否支持多选
|
|
210
|
+
* 默认`false`
|
|
211
|
+
*/
|
|
212
|
+
multiSelect: { type: Boolean, default: !1 },
|
|
213
|
+
/**
|
|
214
|
+
* 可选,分隔符
|
|
215
|
+
* 默认`,`
|
|
216
|
+
*/
|
|
217
|
+
separator: { type: String, default: "," },
|
|
218
|
+
/** 对齐方式 */
|
|
219
|
+
textAlign: { type: String, default: "left" },
|
|
220
|
+
/**
|
|
221
|
+
* 废弃
|
|
222
|
+
*/
|
|
223
|
+
beforeClickButton: { type: Function, default: null },
|
|
224
|
+
/**
|
|
225
|
+
* 作为内嵌编辑器被创建后默认获得焦点
|
|
226
|
+
*/
|
|
227
|
+
focusOnCreated: { type: Boolean, default: !1 },
|
|
228
|
+
/**
|
|
229
|
+
* 作为内嵌编辑器被创建后默认选中文本
|
|
230
|
+
*/
|
|
231
|
+
selectOnCreated: { type: Boolean, default: !1 },
|
|
232
|
+
/**
|
|
233
|
+
* 打开前
|
|
234
|
+
*/
|
|
235
|
+
beforeOpen: { type: Function, default: null },
|
|
236
|
+
/** 更新方式 blur | change */
|
|
237
|
+
updateOn: { type: String, default: "change" },
|
|
238
|
+
keepWidthWithReference: { type: Boolean, default: !0 },
|
|
239
|
+
placement: { type: String, default: "bottom-left" },
|
|
240
|
+
/**
|
|
241
|
+
* 根据空间大小重新调整,原下拉面板内容指定的高度
|
|
242
|
+
*/
|
|
243
|
+
limitContentBySpace: { type: Boolean, default: !1 },
|
|
244
|
+
beforeClosePopup: { type: Function, default: null }
|
|
245
|
+
}, nl = {
|
|
246
|
+
popupContentPosition: { type: Object, default: { left: 0, top: 0 } },
|
|
247
|
+
host: { type: Object },
|
|
248
|
+
backgroundColor: { type: String, default: "" }
|
|
249
|
+
}, al = /* @__PURE__ */ K({
|
|
250
|
+
name: "FOverlay",
|
|
251
|
+
props: nl,
|
|
252
|
+
emits: ["click"],
|
|
253
|
+
setup(e, t) {
|
|
254
|
+
const l = s(e.popupContentPosition), n = s(e.host), a = S(() => ({
|
|
255
|
+
backgroundColor: e.backgroundColor || "",
|
|
256
|
+
pointerEvents: "auto"
|
|
257
|
+
}));
|
|
258
|
+
function o(u) {
|
|
259
|
+
t.emit("click"), u.preventDefault(), u.stopPropagation();
|
|
260
|
+
}
|
|
261
|
+
S(() => {
|
|
262
|
+
const u = n.value;
|
|
263
|
+
if (u) {
|
|
264
|
+
const c = u.getBoundingClientRect(), {
|
|
265
|
+
left: m,
|
|
266
|
+
top: C,
|
|
267
|
+
height: h
|
|
268
|
+
} = c;
|
|
269
|
+
return {
|
|
270
|
+
left: m,
|
|
271
|
+
top: C + h
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
return l.value;
|
|
275
|
+
});
|
|
276
|
+
const r = S(() => ({
|
|
277
|
+
// position: 'relative',
|
|
278
|
+
// left: `${position.value.left}px`,
|
|
279
|
+
// top: `${position.value.top}px`
|
|
280
|
+
}));
|
|
281
|
+
return () => i(ze, {
|
|
282
|
+
to: "body"
|
|
283
|
+
}, {
|
|
284
|
+
default: () => {
|
|
285
|
+
var u, c;
|
|
286
|
+
return [i("div", {
|
|
287
|
+
class: "overlay-container",
|
|
288
|
+
onClick: (m) => o(m),
|
|
289
|
+
style: a.value
|
|
290
|
+
}, [i("div", {
|
|
291
|
+
style: r.value
|
|
292
|
+
}, [(c = (u = t.slots).default) == null ? void 0 : c.call(u)])])];
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
function ol(e) {
|
|
298
|
+
if (e.content && e.content.render)
|
|
299
|
+
return e.content.render;
|
|
300
|
+
if (e.render && typeof e.render == "function")
|
|
301
|
+
return e.render;
|
|
302
|
+
}
|
|
303
|
+
function il(e) {
|
|
304
|
+
const t = document.createElement("div");
|
|
305
|
+
t.style.display = "contents";
|
|
306
|
+
let l;
|
|
307
|
+
const n = e.onClickCallback || (() => {
|
|
308
|
+
}), a = () => {
|
|
309
|
+
n(), l && l.unmount();
|
|
310
|
+
};
|
|
311
|
+
return l = ke({
|
|
312
|
+
setup() {
|
|
313
|
+
ye(() => {
|
|
314
|
+
document.body.removeChild(t);
|
|
315
|
+
});
|
|
316
|
+
const o = ol(e);
|
|
317
|
+
return () => i(al, {
|
|
318
|
+
"popup-content-position": e.popupPosition,
|
|
319
|
+
host: e.host,
|
|
320
|
+
onClick: a,
|
|
321
|
+
backgroundColor: e.backgroundColor
|
|
322
|
+
}, {
|
|
323
|
+
default: () => [o && o()]
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
}), document.body.appendChild(t), l.mount(t), l;
|
|
327
|
+
}
|
|
328
|
+
class ul {
|
|
329
|
+
static show(t) {
|
|
330
|
+
return il(t);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
const sl = {
|
|
334
|
+
/**
|
|
335
|
+
* 允许点击遮罩关闭对话框
|
|
336
|
+
*/
|
|
337
|
+
allowClickMaskToClose: { type: Boolean, default: !1 },
|
|
338
|
+
/**
|
|
339
|
+
* 关闭对话框前事件, 是个函数,返回true或者false
|
|
340
|
+
*/
|
|
341
|
+
beforeClose: { type: Function, default: () => !0 },
|
|
342
|
+
/**
|
|
343
|
+
* 自定义类
|
|
344
|
+
*/
|
|
345
|
+
class: { type: String, default: "" },
|
|
346
|
+
/**
|
|
347
|
+
* 自定义遮罩类
|
|
348
|
+
*/
|
|
349
|
+
maskClass: { type: String, default: "" },
|
|
350
|
+
/**
|
|
351
|
+
* 模态框标题
|
|
352
|
+
*/
|
|
353
|
+
title: { type: String, default: "" },
|
|
354
|
+
/**
|
|
355
|
+
* 模态框宽度
|
|
356
|
+
*/
|
|
357
|
+
width: { type: Number, default: 500 },
|
|
358
|
+
/**
|
|
359
|
+
* 模态框高度
|
|
360
|
+
*/
|
|
361
|
+
height: { type: Number, default: 320 },
|
|
362
|
+
/**
|
|
363
|
+
* 自定义按钮列表
|
|
364
|
+
*/
|
|
365
|
+
buttons: {
|
|
366
|
+
type: Array,
|
|
367
|
+
default: []
|
|
368
|
+
},
|
|
369
|
+
/**
|
|
370
|
+
* 是否展示模态框
|
|
371
|
+
*/
|
|
372
|
+
modelValue: { type: Boolean, default: !1 },
|
|
373
|
+
/**
|
|
374
|
+
* 是否模态
|
|
375
|
+
*/
|
|
376
|
+
mask: { type: Boolean, default: !0 },
|
|
377
|
+
/**
|
|
378
|
+
* 是否展示头部
|
|
379
|
+
*/
|
|
380
|
+
showHeader: { type: Boolean, default: !0 },
|
|
381
|
+
/**
|
|
382
|
+
* 是否展示默认按钮
|
|
383
|
+
*/
|
|
384
|
+
showButtons: { type: Boolean, default: !0 },
|
|
385
|
+
/**
|
|
386
|
+
* 是否启用自适应样式
|
|
387
|
+
*/
|
|
388
|
+
fitContent: { type: Boolean, default: !0 },
|
|
389
|
+
/**
|
|
390
|
+
* 是否展示右上角按钮
|
|
391
|
+
*/
|
|
392
|
+
showCloseButton: { type: Boolean, default: !0 },
|
|
393
|
+
showMaxButton: { type: Boolean, default: !1 },
|
|
394
|
+
minHeight: { type: Number },
|
|
395
|
+
maxHeight: { type: Number },
|
|
396
|
+
minWidth: { type: Number },
|
|
397
|
+
maxWidth: { type: Number },
|
|
398
|
+
containment: { type: Object, default: null },
|
|
399
|
+
resizeable: { type: Boolean, default: !1 },
|
|
400
|
+
draggable: { type: Boolean, default: !1 },
|
|
401
|
+
dragHandle: { type: Object, default: null },
|
|
402
|
+
closedCallback: { type: Function, default: null },
|
|
403
|
+
resizeHandle: { type: Function, default: null },
|
|
404
|
+
render: { type: Function, default: null },
|
|
405
|
+
acceptCallback: { type: Function, default: null },
|
|
406
|
+
rejectCallback: { type: Function, default: null },
|
|
407
|
+
enableEsc: { type: Boolean, default: !0 },
|
|
408
|
+
enableEnter: { type: Boolean, default: !1 },
|
|
409
|
+
dialogType: { type: String, default: "" },
|
|
410
|
+
src: { type: String, default: "" },
|
|
411
|
+
footerHeight: { type: Number, default: 60 },
|
|
412
|
+
host: { type: Object, default: "body" },
|
|
413
|
+
isMessager: { type: Boolean, default: !1 }
|
|
414
|
+
};
|
|
415
|
+
class q {
|
|
416
|
+
constructor(t, l) {
|
|
417
|
+
this.x = t, this.y = l;
|
|
418
|
+
}
|
|
419
|
+
static getTransformInfo(t) {
|
|
420
|
+
const n = window.getComputedStyle(t).getPropertyValue("transform").replace(/[^-\d,]/g, "").split(",");
|
|
421
|
+
if (n.length >= 6) {
|
|
422
|
+
const a = parseInt(n[4], 10), o = parseInt(n[5], 10);
|
|
423
|
+
return { x: a, y: o };
|
|
424
|
+
}
|
|
425
|
+
return { x: 0, y: 0 };
|
|
426
|
+
}
|
|
427
|
+
static fromEvent(t, l = null) {
|
|
428
|
+
if (this.isMouseEvent(t))
|
|
429
|
+
return new q(t.clientX, t.clientY);
|
|
430
|
+
if (l === null || t.changedTouches.length === 1)
|
|
431
|
+
return new q(t.changedTouches[0].clientX, t.changedTouches[0].clientY);
|
|
432
|
+
for (let n = 0; n < t.changedTouches.length; n++)
|
|
433
|
+
if (t.changedTouches[n].target === l)
|
|
434
|
+
return new q(t.changedTouches[n].clientX, t.changedTouches[n].clientY);
|
|
435
|
+
}
|
|
436
|
+
static isMouseEvent(t) {
|
|
437
|
+
return Object.prototype.toString.apply(t).indexOf("MouseEvent") === 8;
|
|
438
|
+
}
|
|
439
|
+
static isIPosition(t) {
|
|
440
|
+
return !!t && "x" in t && "y" in t;
|
|
441
|
+
}
|
|
442
|
+
static getCurrent(t) {
|
|
443
|
+
const l = new q(0, 0);
|
|
444
|
+
if (window) {
|
|
445
|
+
const n = window.getComputedStyle(t);
|
|
446
|
+
if (n) {
|
|
447
|
+
const a = parseInt(n.getPropertyValue("left"), 10), o = parseInt(n.getPropertyValue("top"), 10);
|
|
448
|
+
l.x = isNaN(a) ? 0 : a, l.y = isNaN(o) ? 0 : o;
|
|
449
|
+
}
|
|
450
|
+
return l;
|
|
451
|
+
}
|
|
452
|
+
return null;
|
|
453
|
+
}
|
|
454
|
+
static copy(t) {
|
|
455
|
+
return new q(0, 0).set(t);
|
|
456
|
+
}
|
|
457
|
+
get value() {
|
|
458
|
+
return { x: this.x, y: this.y };
|
|
459
|
+
}
|
|
460
|
+
add(t) {
|
|
461
|
+
return this.x += t.x, this.y += t.y, this;
|
|
462
|
+
}
|
|
463
|
+
subtract(t) {
|
|
464
|
+
return this.x -= t.x, this.y -= t.y, this;
|
|
465
|
+
}
|
|
466
|
+
multiply(t) {
|
|
467
|
+
this.x *= t, this.y *= t;
|
|
468
|
+
}
|
|
469
|
+
divide(t) {
|
|
470
|
+
this.x /= t, this.y /= t;
|
|
471
|
+
}
|
|
472
|
+
reset() {
|
|
473
|
+
return this.x = 0, this.y = 0, this;
|
|
474
|
+
}
|
|
475
|
+
set(t) {
|
|
476
|
+
return this.x = t.x, this.y = t.y, this;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
class ae {
|
|
480
|
+
constructor(t, l) {
|
|
481
|
+
this.width = t, this.height = l;
|
|
482
|
+
}
|
|
483
|
+
static getCurrent(t) {
|
|
484
|
+
const l = new ae(0, 0);
|
|
485
|
+
if (window) {
|
|
486
|
+
const n = window.getComputedStyle(t);
|
|
487
|
+
return n && (l.width = parseInt(n.getPropertyValue("width"), 10), l.height = parseInt(n.getPropertyValue("height"), 10)), l;
|
|
488
|
+
}
|
|
489
|
+
return null;
|
|
490
|
+
}
|
|
491
|
+
static copy(t) {
|
|
492
|
+
return new ae(0, 0).set(t);
|
|
493
|
+
}
|
|
494
|
+
set(t) {
|
|
495
|
+
return this.width = t.width, this.height = t.height, this;
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
function rl(e, t) {
|
|
499
|
+
const l = s(), n = s(), a = s(), o = s(), r = s(), u = s(), c = s(), m = s(), C = s(), h = s(), v = s(), y = s(e.resizeable), d = s(), g = s(e.draggable), f = s(!1);
|
|
500
|
+
function p() {
|
|
501
|
+
const k = n.value || document.body, T = window.getComputedStyle(k);
|
|
502
|
+
if (!T || !l.value)
|
|
503
|
+
return;
|
|
504
|
+
const H = q.getTransformInfo(l.value), N = {};
|
|
505
|
+
c.value && (N.deltaL = l.value.offsetLeft - c.value.x, N.deltaT = l.value.offsetTop - c.value.y);
|
|
506
|
+
const U = T.getPropertyValue("position");
|
|
507
|
+
N.width = k.clientWidth, N.height = k.clientHeight, N.pr = parseInt(T.getPropertyValue("padding-right"), 10), N.pb = parseInt(T.getPropertyValue("padding-bottom"), 10), N.position = T.getPropertyValue("position"), U === "static" && (k.style.position = "relative"), N.translateX = H.x, N.translateY = H.y, h.value = N;
|
|
508
|
+
}
|
|
509
|
+
function b(k) {
|
|
510
|
+
if (l.value) {
|
|
511
|
+
o.value = ae.getCurrent(l.value), r.value = q.getCurrent(l.value), u.value = o.value ? ae.copy(o.value) : null, c.value = r.value ? q.copy(r.value) : null, p();
|
|
512
|
+
const T = k.target.getAttribute("type") || "";
|
|
513
|
+
m.value = {
|
|
514
|
+
n: !!T.match(/n/),
|
|
515
|
+
s: !!T.match(/s/),
|
|
516
|
+
w: !!T.match(/w/),
|
|
517
|
+
e: !!T.match(/e/)
|
|
518
|
+
};
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
function F() {
|
|
522
|
+
var k, T, H, N;
|
|
523
|
+
if (l.value) {
|
|
524
|
+
const U = l.value;
|
|
525
|
+
m.value && ((m.value.n || m.value.s) && ((k = u.value) != null && k.height) && (U.style.height = u.value.height + "px"), (m.value.w || m.value.e) && ((T = u.value) != null && T.width) && (U.style.width = u.value.width + "px"), c.value && ((H = c.value) != null && H.x && (U.style.left = c.value.x + "px"), (N = c.value) != null && N.y && (U.style.top = c.value.y + "px")));
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
function P() {
|
|
529
|
+
const k = e.minHeight ? e.minHeight : 1, T = e.minWidth ? e.minWidth : 1;
|
|
530
|
+
u.value && c.value && m.value && o.value && (u.value.height < k && (u.value.height = k, m.value.n && r.value && (c.value.y = r.value.y + (o.value.height - k))), u.value.width < T && (u.value.width = T, m.value.w && r.value && (c.value.x = r.value.x + (o.value.width - T))), e.maxHeight && u.value.height > e.maxHeight && (u.value.height = e.maxHeight, r.value && m.value.n && (c.value.y = r.value.y + (o.value.height - e.maxHeight))), e.maxWidth && u.value.width > e.maxWidth && (u.value.width = e.maxWidth, m.value.w && r.value && (c.value.x = r.value.x + (o.value.width - e.maxWidth))));
|
|
531
|
+
}
|
|
532
|
+
function M() {
|
|
533
|
+
if (n.value) {
|
|
534
|
+
const k = h.value;
|
|
535
|
+
if (c.value && u.value && m.value && o.value) {
|
|
536
|
+
const T = k.width - k.pr - k.deltaL - k.translateX - c.value.x, H = k.height - k.pb - k.deltaT - k.translateY - c.value.y;
|
|
537
|
+
m.value.n && c.value.y + k.translateY < 0 && r.value && (c.value.y = -k.translateY, u.value.height = o.value.height + r.value.y + k.translateY), m.value.w && c.value.x + k.translateX < 0 && r.value && (c.value.x = -k.translateX, u.value.width = o.value.width + r.value.x + k.translateX), u.value.width > T && (u.value.width = T), u.value.height > H && (u.value.height = H);
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
function B(k) {
|
|
542
|
+
if (!a.value || !o.value || !r.value || !m.value)
|
|
543
|
+
return;
|
|
544
|
+
k.subtract(a.value);
|
|
545
|
+
const T = k.x, H = k.y;
|
|
546
|
+
m.value.n ? (c.value.y = r.value.y + H, u.value.height = o.value.height - H) : m.value.s && (u.value.height = o.value.height + H), m.value.e ? u.value.width = o.value.width + T : m.value.w && (u.value.width = o.value.width - T, c.value.x = r.value.x + T), M(), P(), F();
|
|
547
|
+
}
|
|
548
|
+
function x(k) {
|
|
549
|
+
if (!C.value)
|
|
550
|
+
return;
|
|
551
|
+
const T = q.fromEvent(k);
|
|
552
|
+
T && B(T);
|
|
553
|
+
}
|
|
554
|
+
function E() {
|
|
555
|
+
if (l.value) {
|
|
556
|
+
const {
|
|
557
|
+
width: k,
|
|
558
|
+
height: T,
|
|
559
|
+
x: H,
|
|
560
|
+
y: N
|
|
561
|
+
} = l.value.getBoundingClientRect(), U = q.getTransformInfo(l.value);
|
|
562
|
+
return {
|
|
563
|
+
size: {
|
|
564
|
+
width: k,
|
|
565
|
+
height: T
|
|
566
|
+
},
|
|
567
|
+
position: {
|
|
568
|
+
x: H - U.x,
|
|
569
|
+
y: N - U.y
|
|
570
|
+
}
|
|
571
|
+
};
|
|
572
|
+
}
|
|
573
|
+
return null;
|
|
574
|
+
}
|
|
575
|
+
function j(k) {
|
|
576
|
+
if (l.value) {
|
|
577
|
+
const T = E();
|
|
578
|
+
v.value = T;
|
|
579
|
+
}
|
|
580
|
+
a.value = void 0, o.value = null, r.value = null, u.value = null, c.value = null, m.value = null, C.value = null, document.removeEventListener("mousemove", x), document.removeEventListener("mouseup", j);
|
|
581
|
+
}
|
|
582
|
+
function $() {
|
|
583
|
+
document.addEventListener("mousemove", x), document.addEventListener("mouseup", j);
|
|
584
|
+
}
|
|
585
|
+
function I(k) {
|
|
586
|
+
k instanceof MouseEvent && k.button === 2 || g.value && (document.body.click(), k.stopPropagation(), k.preventDefault(), a.value = q.fromEvent(k), C.value = k.target, b(k), $());
|
|
587
|
+
}
|
|
588
|
+
function O(k) {
|
|
589
|
+
return l.value = k, y.value && i(ie, null, [i("div", {
|
|
590
|
+
class: "fv-resizable-handle fv-resizable-n",
|
|
591
|
+
type: "n",
|
|
592
|
+
onMousedown: (T) => I(T)
|
|
593
|
+
}, null), i("div", {
|
|
594
|
+
class: "fv-resizable-handle fv-resizable-e",
|
|
595
|
+
type: "e",
|
|
596
|
+
onMousedown: (T) => I(T)
|
|
597
|
+
}, null), i("div", {
|
|
598
|
+
class: "fv-resizable-handle fv-resizable-s",
|
|
599
|
+
type: "s",
|
|
600
|
+
onMousedown: (T) => I(T)
|
|
601
|
+
}, null), i("div", {
|
|
602
|
+
class: "fv-resizable-handle fv-resizable-w",
|
|
603
|
+
type: "w",
|
|
604
|
+
onMousedown: (T) => I(T)
|
|
605
|
+
}, null), i("div", {
|
|
606
|
+
class: "fv-resizable-handle fv-resizable-ne",
|
|
607
|
+
type: "ne",
|
|
608
|
+
onMousedown: (T) => I(T)
|
|
609
|
+
}, null), i("div", {
|
|
610
|
+
class: "fv-resizable-handle fv-resizable-se fv-resizable-diagonal",
|
|
611
|
+
type: "se",
|
|
612
|
+
onMousedown: (T) => I(T)
|
|
613
|
+
}, null), i("div", {
|
|
614
|
+
class: "fv-resizable-handle fv-resizable-sw",
|
|
615
|
+
type: "sw",
|
|
616
|
+
onMousedown: (T) => I(T)
|
|
617
|
+
}, null), i("div", {
|
|
618
|
+
class: "fv-resizable-handle fv-resizable-nw",
|
|
619
|
+
type: "nw",
|
|
620
|
+
onMousedown: (T) => I(T)
|
|
621
|
+
}, null)]);
|
|
622
|
+
}
|
|
623
|
+
function z(k = !0) {
|
|
624
|
+
document.body.click();
|
|
625
|
+
const T = n.value || document.body, H = ae.getCurrent(T), N = l.value;
|
|
626
|
+
k && N && (d.value = E(), d.value.transform = N.style.transform), H && N && (u.value = H, u.value.height -= 14, u.value.width -= 14, N.style.height = u.value.height + "px", N.style.width = u.value.width + "px", N.style.left = "7px", N.style.top = "7px", N.style.transform = "", v.value = {
|
|
627
|
+
size: u.value,
|
|
628
|
+
position: {
|
|
629
|
+
x: 0,
|
|
630
|
+
y: 0
|
|
631
|
+
}
|
|
632
|
+
}, g.value = !1, f.value = !0);
|
|
633
|
+
}
|
|
634
|
+
function D() {
|
|
635
|
+
var k, T;
|
|
636
|
+
if (document.body.click(), d.value) {
|
|
637
|
+
const H = {
|
|
638
|
+
width: d.value.size.width || 0,
|
|
639
|
+
height: d.value.size.height || 0
|
|
640
|
+
}, N = {
|
|
641
|
+
x: (window.innerWidth - H.width) / 2,
|
|
642
|
+
y: (window.innerHeight - H.height) / 2
|
|
643
|
+
};
|
|
644
|
+
(k = u.value) == null || k.set(H), (T = c.value) == null || T.set(N);
|
|
645
|
+
const U = l.value;
|
|
646
|
+
U.style.height = H.height + "px", U.style.width = H.width + "px", U.style.left = `${N.x}px`, U.style.top = `${N.y}px`, U.style.transform = "", v.value = {
|
|
647
|
+
size: H,
|
|
648
|
+
position: N
|
|
649
|
+
}, g.value = e.draggable, f.value = !1;
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
function V() {
|
|
653
|
+
if (l.value) {
|
|
654
|
+
const k = ae.getCurrent(l.value);
|
|
655
|
+
if (k) {
|
|
656
|
+
const {
|
|
657
|
+
width: T,
|
|
658
|
+
height: H
|
|
659
|
+
} = k;
|
|
660
|
+
l.value.style.left = `${(window.innerWidth - T) / 2}px`, l.value.style.top = `${(window.innerHeight - H) / 2}px`, l.value.style.transform = "";
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
function R() {
|
|
665
|
+
const k = () => {
|
|
666
|
+
f.value ? z(!1) : V(), document.body.click();
|
|
667
|
+
};
|
|
668
|
+
return window.addEventListener("resize", k), () => {
|
|
669
|
+
window.removeEventListener("resize", k);
|
|
670
|
+
};
|
|
671
|
+
}
|
|
672
|
+
const W = R();
|
|
673
|
+
return {
|
|
674
|
+
renderResizeBar: O,
|
|
675
|
+
boundingElement: n,
|
|
676
|
+
resizedEventParam: v,
|
|
677
|
+
maximize: z,
|
|
678
|
+
restore: D,
|
|
679
|
+
allowDrag: g,
|
|
680
|
+
isMaximized: f,
|
|
681
|
+
unWindowResizeHandle: W,
|
|
682
|
+
moveToCenter: V
|
|
683
|
+
};
|
|
684
|
+
}
|
|
685
|
+
function cl(e, t, l) {
|
|
686
|
+
const n = s(), a = s(e.draggable), o = s(e.lockAxis), r = s(), u = s(), c = s(!1), m = s(new q(0, 0)), C = s(new q(0, 0)), h = s(new q(0, 0)), v = s(new q(0, 0));
|
|
687
|
+
A(() => l.value, (x) => {
|
|
688
|
+
r.value.style.cursor = x ? "move" : "default";
|
|
689
|
+
});
|
|
690
|
+
function y(x, E) {
|
|
691
|
+
if (E.tagName === "BUTTON")
|
|
692
|
+
return !1;
|
|
693
|
+
if (E === x)
|
|
694
|
+
return !0;
|
|
695
|
+
for (const j in E.children)
|
|
696
|
+
if (Object.prototype.hasOwnProperty.call(E.children, j) && y(x, E.children[j]))
|
|
697
|
+
return !0;
|
|
698
|
+
return !1;
|
|
699
|
+
}
|
|
700
|
+
function d() {
|
|
701
|
+
var $, I;
|
|
702
|
+
let x = h.value.x + C.value.x, E = h.value.y + C.value.y;
|
|
703
|
+
o.value === "x" ? (x = (($ = m.value) == null ? void 0 : $.x) || 0, h.value.x = 0) : o.value === "y" && (E = ((I = m.value) == null ? void 0 : I.y) || 0, h.value.y = 0);
|
|
704
|
+
const j = `translate3d(${Math.round(x)}px, ${Math.round(E)}px, 0px)`;
|
|
705
|
+
n.value && (n.value.style.transform = j), v.value.x = x, v.value.y = E;
|
|
706
|
+
}
|
|
707
|
+
function g() {
|
|
708
|
+
if (!u.value || !n.value)
|
|
709
|
+
return null;
|
|
710
|
+
const x = u.value.getBoundingClientRect(), E = n.value.getBoundingClientRect(), j = {
|
|
711
|
+
top: x.top < E.top,
|
|
712
|
+
right: x.right > E.right,
|
|
713
|
+
bottom: x.bottom > E.bottom,
|
|
714
|
+
left: x.left < E.left
|
|
715
|
+
};
|
|
716
|
+
return j.top || (h.value.y -= E.top - x.top), j.bottom || (h.value.y -= E.bottom - x.bottom), j.right || (h.value.x -= E.right - x.right), j.left || (h.value.x -= E.left - x.left), d(), j;
|
|
717
|
+
}
|
|
718
|
+
function f(x) {
|
|
719
|
+
x && (m.value && x.subtract(m.value), h.value.set(x), d(), g());
|
|
720
|
+
}
|
|
721
|
+
function p(x) {
|
|
722
|
+
c.value && a.value && (x.stopPropagation(), x.preventDefault(), f(q.fromEvent(x, r.value)));
|
|
723
|
+
}
|
|
724
|
+
function b() {
|
|
725
|
+
var x;
|
|
726
|
+
c.value && (c.value = !1, C.value.add(h.value), h.value.reset(), (x = n.value) == null || x.classList.remove("ng-dragging"), t.emit("stopMove"), document.removeEventListener("mousemove", p), document.removeEventListener("mouseup", b));
|
|
727
|
+
}
|
|
728
|
+
function F() {
|
|
729
|
+
!c.value && r.value && (c.value = !0, r.value.classList.add("ng-dragging"), document.addEventListener("mousemove", p), document.addEventListener("mouseup", b));
|
|
730
|
+
}
|
|
731
|
+
function P() {
|
|
732
|
+
if (n.value) {
|
|
733
|
+
const x = q.getTransformInfo(n.value);
|
|
734
|
+
C.value.set(x);
|
|
735
|
+
return;
|
|
736
|
+
}
|
|
737
|
+
C.value.reset();
|
|
738
|
+
}
|
|
739
|
+
function M(x) {
|
|
740
|
+
if (!l.value || x instanceof MouseEvent && x.button === 2)
|
|
741
|
+
return;
|
|
742
|
+
const E = x.target || x.srcElement;
|
|
743
|
+
r.value !== void 0 && E && !y(E, r.value) || a.value !== !1 && (document.body.click(), x.stopPropagation(), x.preventDefault(), m.value = q.fromEvent(x, n.value), P(), F());
|
|
744
|
+
}
|
|
745
|
+
function B(x, E, j) {
|
|
746
|
+
if (a.value && E) {
|
|
747
|
+
if (x)
|
|
748
|
+
r.value = x;
|
|
749
|
+
else if (e.dragHandle) {
|
|
750
|
+
if (e.dragHandle instanceof HTMLElement)
|
|
751
|
+
r.value = e.dragHandle;
|
|
752
|
+
else if (typeof e.dragHandle == "string") {
|
|
753
|
+
const $ = E.querySelector(e.dragHandle);
|
|
754
|
+
$ && (r.value = $);
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
n.value = E, u.value = j, r.value ? (r.value.classList.add("ng-draggable"), r.value.addEventListener("mousedown", M)) : a.value = !1;
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
return {
|
|
761
|
+
registerDraggle: B,
|
|
762
|
+
resetTranslate: P
|
|
763
|
+
};
|
|
764
|
+
}
|
|
765
|
+
function qe(e, t) {
|
|
766
|
+
if (e) {
|
|
767
|
+
const l = (n) => {
|
|
768
|
+
n.key.toLowerCase() === e.toLowerCase() && t({ event: n, key: e });
|
|
769
|
+
};
|
|
770
|
+
return document.addEventListener("keydown", l), () => {
|
|
771
|
+
document.removeEventListener("keydown", l);
|
|
772
|
+
};
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
function dl(e, t) {
|
|
776
|
+
const l = s(e.enableEsc);
|
|
777
|
+
let n = null;
|
|
778
|
+
return l.value ? (n = qe("Escape", (a) => {
|
|
779
|
+
t.emit("esc", { event: a.event, type: "esc" });
|
|
780
|
+
}), {
|
|
781
|
+
remove: n
|
|
782
|
+
}) : null;
|
|
783
|
+
}
|
|
784
|
+
function fl(e, t) {
|
|
785
|
+
const l = s(e.enableEnter);
|
|
786
|
+
let n = null;
|
|
787
|
+
return l.value ? (n = qe("Enter", (a) => {
|
|
788
|
+
t.emit("enter", { event: a.event, type: "enter" });
|
|
789
|
+
}), {
|
|
790
|
+
remove: n
|
|
791
|
+
}) : null;
|
|
792
|
+
}
|
|
793
|
+
const fe = /* @__PURE__ */ K({
|
|
794
|
+
name: "FModal",
|
|
795
|
+
props: sl,
|
|
796
|
+
emits: ["update:modelValue", "accept", "cancel", "closed", "resize", "esc", "enter", "stopMove"],
|
|
797
|
+
setup(e, t) {
|
|
798
|
+
const l = s(e.width || 300), n = s(e.height || 200), a = s(e.modelValue), o = s(""), r = s(e.class), u = s(e.fitContent), c = s(e.showHeader), m = s(""), C = s(e.showCloseButton), h = s(e.showMaxButton), v = s(!1), y = s(e.dialogType), d = s(e.src), g = s(""), f = s(e.showButtons), p = s(e.title), b = s(e.containment || null), F = s();
|
|
799
|
+
p.value === "错误提示" && (p.value = _.getLocaleValue("messageBox.errorTitle"));
|
|
800
|
+
const P = s(!1);
|
|
801
|
+
function M(w, L) {
|
|
802
|
+
const Y = L ? "accept" : "cancel";
|
|
803
|
+
Promise.resolve().then(() => {
|
|
804
|
+
var G;
|
|
805
|
+
return (G = e.beforeClose) == null ? void 0 : G.call(e, {
|
|
806
|
+
closeType: Y
|
|
807
|
+
});
|
|
808
|
+
}).then((G) => {
|
|
809
|
+
G && (a.value = !1, t.emit("update:modelValue", !1), L != null && t.emit(L ? "accept" : "cancel"), t.emit("closed", w));
|
|
810
|
+
});
|
|
811
|
+
}
|
|
812
|
+
const B = [{
|
|
813
|
+
name: "cancel",
|
|
814
|
+
text: _.getLocaleValue("messageBox.cancel") || "取消",
|
|
815
|
+
class: "btn btn-secondary",
|
|
816
|
+
handle: (w) => {
|
|
817
|
+
M(w, !1);
|
|
818
|
+
}
|
|
819
|
+
}, {
|
|
820
|
+
name: "accept",
|
|
821
|
+
text: _.getLocaleValue("messageBox.ok") || "确定",
|
|
822
|
+
class: "btn btn-primary",
|
|
823
|
+
handle: (w) => {
|
|
824
|
+
M(w, !0);
|
|
825
|
+
}
|
|
826
|
+
}], x = s(e.buttons && e.buttons.length ? e.buttons : B), E = S(() => !!m.value), j = S(() => !!f.value && !!x.value), $ = s(), I = s(), O = s(!1), {
|
|
827
|
+
renderResizeBar: z,
|
|
828
|
+
maximize: D,
|
|
829
|
+
restore: V,
|
|
830
|
+
boundingElement: R,
|
|
831
|
+
resizedEventParam: W,
|
|
832
|
+
allowDrag: k,
|
|
833
|
+
unWindowResizeHandle: T,
|
|
834
|
+
moveToCenter: H
|
|
835
|
+
} = rl(e), {
|
|
836
|
+
registerDraggle: N
|
|
837
|
+
} = cl(e, t, k);
|
|
838
|
+
function U() {
|
|
839
|
+
return !!document.querySelectorAll(".farris-modal").length && document.body.classList.contains("modal-open");
|
|
840
|
+
}
|
|
841
|
+
function pe() {
|
|
842
|
+
const w = document.querySelectorAll(".farris-modal").length;
|
|
843
|
+
(!w || w - 1 <= 0) && document.body.classList.remove("modal-open"), F.value && F.value.classList.remove("show");
|
|
844
|
+
}
|
|
845
|
+
A(() => e.title, (w, L) => {
|
|
846
|
+
w !== L && (p.value = w);
|
|
847
|
+
}), A(() => e.modelValue, (w, L) => {
|
|
848
|
+
w !== L && (a.value = w, a.value && e.draggable && de(() => {
|
|
849
|
+
I.value && !b.value && (b.value = I.value.parentElement, R.value = b.value, N($.value, I.value, R.value), H());
|
|
850
|
+
}), w || (b.value && (b.value = null), pe())), a.value ? P.value = U() : (O.value = !1, k.value = e.draggable);
|
|
851
|
+
}), A(() => e.showHeader, (w, L) => {
|
|
852
|
+
w !== L && (c.value = w);
|
|
853
|
+
}), A(() => e.showButtons, (w, L) => {
|
|
854
|
+
w !== L && (f.value = w);
|
|
855
|
+
}), A(() => W.value, (w, L) => {
|
|
856
|
+
const Y = w || {}, G = L || {};
|
|
857
|
+
JSON.stringify(Y) !== JSON.stringify(G) && t.emit("resize", {
|
|
858
|
+
newSize: w,
|
|
859
|
+
oldSize: L,
|
|
860
|
+
isMaximized: O.value
|
|
861
|
+
});
|
|
862
|
+
}), A([() => e.width, () => e.height], (w, L) => {
|
|
863
|
+
(w[0] !== L[0] || w[1] !== L[1]) && (l.value = w[0] || 500, n.value = w[1] || 600);
|
|
864
|
+
}), A(() => e.class, (w, L) => {
|
|
865
|
+
r.value = w;
|
|
866
|
+
});
|
|
867
|
+
const ue = S(() => (a.value && document.body.classList.add("modal-open"), a.value)), be = S(() => {
|
|
868
|
+
var Y;
|
|
869
|
+
const w = {
|
|
870
|
+
modal: !0,
|
|
871
|
+
"farris-modal": !0,
|
|
872
|
+
fade: !0
|
|
873
|
+
};
|
|
874
|
+
w["f-modal-fitContent"] = !!u.value, w.show = !!ue.value;
|
|
875
|
+
const L = (Y = e.maskClass) == null ? void 0 : Y.split(" ");
|
|
876
|
+
return L == null || L.reduce((G, J) => (G[J] = !0, G), w), w;
|
|
877
|
+
}), at = S(() => {
|
|
878
|
+
var Y;
|
|
879
|
+
const w = {
|
|
880
|
+
"modal-dialog": !0
|
|
881
|
+
}, L = (Y = r.value) == null ? void 0 : Y.split(" ");
|
|
882
|
+
return L == null || L.reduce((G, J) => (G[J] = !0, G), w), w;
|
|
883
|
+
}), Le = () => Lt() && !e.isMessager, ot = S(() => {
|
|
884
|
+
const w = document.documentElement.clientWidth, L = document.documentElement.clientHeight, Y = Math.min(l.value, w), G = u.value ? "auto" : `${Math.min(n.value, L - 10)}px`, J = {
|
|
885
|
+
position: "absolute",
|
|
886
|
+
top: `${(window.innerHeight - parseInt(G === "auto" ? "0" : G)) / 2}px`,
|
|
887
|
+
left: `${(window.innerWidth - Y) / 2}px`,
|
|
888
|
+
width: `${Y}px`,
|
|
889
|
+
height: G
|
|
890
|
+
};
|
|
891
|
+
return Le() && (J.top = "0px", J.left = "0px", J.width = `${window.innerWidth}px`, J.height = `${window.innerHeight}px`), e.mask || (J.pointerEvents = "auto"), J;
|
|
892
|
+
}), He = s(je() || 1050), it = S(() => {
|
|
893
|
+
const w = {
|
|
894
|
+
display: "block",
|
|
895
|
+
overflow: "hidden"
|
|
896
|
+
};
|
|
897
|
+
return e.mask || (w.pointerEvents = "none", w.backgroundColor = "transparent"), P.value && (w.backgroundColor = "transparent"), w.zIndex = He.value, w;
|
|
898
|
+
}), ut = S(() => ({
|
|
899
|
+
"modal-content": !0,
|
|
900
|
+
"modal-content-has-header": c.value,
|
|
901
|
+
"is-mobile": Le()
|
|
902
|
+
})), st = S(() => {
|
|
903
|
+
const w = {
|
|
904
|
+
display: c.value ? "" : "none"
|
|
905
|
+
};
|
|
906
|
+
return w["pointer-events"] = k.value ? "auto" : "none", w;
|
|
907
|
+
}), rt = S(() => ({
|
|
908
|
+
"f-icon": !0,
|
|
909
|
+
modal_maximize: !0,
|
|
910
|
+
modalrevert: O.value
|
|
911
|
+
})), ct = S(() => ({
|
|
912
|
+
"modal-body": !0,
|
|
913
|
+
"f-utils-flex-column": y.value === "iframe",
|
|
914
|
+
"f-utils-fill": !0
|
|
915
|
+
}));
|
|
916
|
+
function dt() {
|
|
917
|
+
return {
|
|
918
|
+
height: `${e.footerHeight || 60}px`
|
|
919
|
+
};
|
|
920
|
+
}
|
|
921
|
+
const ft = S(() => {
|
|
922
|
+
const w = {
|
|
923
|
+
textAlgin: g.value
|
|
924
|
+
}, L = dt();
|
|
925
|
+
return Object.assign(w, L);
|
|
926
|
+
});
|
|
927
|
+
function Ne(w) {
|
|
928
|
+
if (w == null || w.stopPropagation(), O.value) {
|
|
929
|
+
O.value = !1, V();
|
|
930
|
+
return;
|
|
931
|
+
}
|
|
932
|
+
D(), O.value = !0;
|
|
933
|
+
}
|
|
934
|
+
async function vt(w, L) {
|
|
935
|
+
w.handle && await w.handle(L, w) && t.emit("closed", L);
|
|
936
|
+
}
|
|
937
|
+
function mt(w) {
|
|
938
|
+
w.width && (l.value = w.width), w.height && (n.value = w.height), w.buttons && (x.value = w.buttons), w.title && (p.value = w.title);
|
|
939
|
+
}
|
|
940
|
+
let Ce = null, xe = null;
|
|
941
|
+
kt(() => {
|
|
942
|
+
P.value = U();
|
|
943
|
+
}), le(() => {
|
|
944
|
+
I.value && !b.value && (b.value = I.value.parentElement, R.value = b.value, N($.value, I.value, R.value)), ue.value && document.body.classList.add("modal-open"), Ce = dl(e, t), xe = fl(e, t);
|
|
945
|
+
}), ye(() => {
|
|
946
|
+
T && T(), Ce && Ce.remove(), xe && xe.remove();
|
|
947
|
+
}), t.expose({
|
|
948
|
+
modalElementRef: I,
|
|
949
|
+
updateModalOptions: mt,
|
|
950
|
+
close: M,
|
|
951
|
+
maxDialog: Ne,
|
|
952
|
+
isMaximized: O
|
|
953
|
+
});
|
|
954
|
+
function ht() {
|
|
955
|
+
return i("ul", null, [v.value && i("li", {
|
|
956
|
+
class: "f-btn-icon f-bare"
|
|
957
|
+
}, [i("span", {
|
|
958
|
+
class: "f-icon modal_minimize"
|
|
959
|
+
}, null)]), h.value && i("li", {
|
|
960
|
+
onClick: Ne,
|
|
961
|
+
class: "f-btn-icon f-bare",
|
|
962
|
+
style: "pointer-events: auto;"
|
|
963
|
+
}, [i("span", {
|
|
964
|
+
class: rt.value
|
|
965
|
+
}, null)]), C.value && i("li", {
|
|
966
|
+
class: "f-btn-icon f-bare",
|
|
967
|
+
onClick: (w) => M(w, !1),
|
|
968
|
+
style: "pointer-events: auto;"
|
|
969
|
+
}, [i("span", {
|
|
970
|
+
class: "f-icon modal_close"
|
|
971
|
+
}, null)])]);
|
|
972
|
+
}
|
|
973
|
+
function yt() {
|
|
974
|
+
return i("div", {
|
|
975
|
+
class: "modal-footer",
|
|
976
|
+
style: ft.value
|
|
977
|
+
}, [x.value && x.value.map((w) => {
|
|
978
|
+
const L = s(w.disabled);
|
|
979
|
+
return i("button", {
|
|
980
|
+
name: w.name,
|
|
981
|
+
type: "button",
|
|
982
|
+
disabled: L.value,
|
|
983
|
+
class: w.class + (w.iconClass ? " btn-icontext" : ""),
|
|
984
|
+
onClick: (Y) => {
|
|
985
|
+
vt(w, Y);
|
|
986
|
+
}
|
|
987
|
+
}, [!!w.iconClass && i("i", {
|
|
988
|
+
class: w.iconClass
|
|
989
|
+
}, null), w.text]);
|
|
990
|
+
})]);
|
|
991
|
+
}
|
|
992
|
+
function gt() {
|
|
993
|
+
return i("div", {
|
|
994
|
+
ref: $,
|
|
995
|
+
class: "modal-header",
|
|
996
|
+
style: st.value
|
|
997
|
+
}, [t.slots.headerTemplate ? t.slots.headerTemplate() : i("div", {
|
|
998
|
+
class: "modal-title"
|
|
999
|
+
}, [E.value && i("span", {
|
|
1000
|
+
class: m.value,
|
|
1001
|
+
style: "margin-right: 8px"
|
|
1002
|
+
}, null), i("span", {
|
|
1003
|
+
class: "modal-title-label"
|
|
1004
|
+
}, [p.value])]), i("div", {
|
|
1005
|
+
class: "actions"
|
|
1006
|
+
}, [ht()])]);
|
|
1007
|
+
}
|
|
1008
|
+
function pt() {
|
|
1009
|
+
return t.slots.footerTemplate ? t.slots.footerTemplate() : j.value && yt();
|
|
1010
|
+
}
|
|
1011
|
+
function bt(w) {
|
|
1012
|
+
if (w.stopPropagation(), e.allowClickMaskToClose) {
|
|
1013
|
+
if (w.target !== F.value)
|
|
1014
|
+
return;
|
|
1015
|
+
M(w, !1);
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
function Ct() {
|
|
1019
|
+
var w, L;
|
|
1020
|
+
return i("div", {
|
|
1021
|
+
id: o.value,
|
|
1022
|
+
class: at.value,
|
|
1023
|
+
style: ot.value,
|
|
1024
|
+
ref: I
|
|
1025
|
+
}, [i("div", {
|
|
1026
|
+
class: ut.value
|
|
1027
|
+
}, [c.value && gt(), i("div", {
|
|
1028
|
+
class: ct.value
|
|
1029
|
+
}, [(L = (w = t.slots).default) == null ? void 0 : L.call(w), y.value === "iframe" && i("iframe", {
|
|
1030
|
+
title: o.value,
|
|
1031
|
+
class: "f-utils-fill",
|
|
1032
|
+
width: "100%",
|
|
1033
|
+
frameborder: "0",
|
|
1034
|
+
src: d.value
|
|
1035
|
+
}, null)]), pt()]), !u.value && I.value && !O.value && z(I.value)]);
|
|
1036
|
+
}
|
|
1037
|
+
function xt(w) {
|
|
1038
|
+
return w || "body";
|
|
1039
|
+
}
|
|
1040
|
+
return Mt(() => {
|
|
1041
|
+
ue.value && (He.value = je() || 1050);
|
|
1042
|
+
}), () => i(ze, {
|
|
1043
|
+
to: xt(e.host)
|
|
1044
|
+
}, {
|
|
1045
|
+
default: () => [ue.value && i(We, {
|
|
1046
|
+
name: "fade",
|
|
1047
|
+
appear: !0
|
|
1048
|
+
}, {
|
|
1049
|
+
default: () => [i("div", {
|
|
1050
|
+
ref: F,
|
|
1051
|
+
class: be.value,
|
|
1052
|
+
style: it.value,
|
|
1053
|
+
onClick: bt
|
|
1054
|
+
}, [Ct()])]
|
|
1055
|
+
})]
|
|
1056
|
+
});
|
|
1057
|
+
}
|
|
1058
|
+
});
|
|
1059
|
+
function Ge(e) {
|
|
1060
|
+
if (e.content && e.content.render)
|
|
1061
|
+
return e.content.render;
|
|
1062
|
+
if (e.render && typeof e.render == "function")
|
|
1063
|
+
return e.render;
|
|
1064
|
+
}
|
|
1065
|
+
function vl(e) {
|
|
1066
|
+
const t = document.createElement("div");
|
|
1067
|
+
t.style.display = "contents";
|
|
1068
|
+
const l = ke({
|
|
1069
|
+
setup(n, a) {
|
|
1070
|
+
ye(() => {
|
|
1071
|
+
document.body.removeChild(t);
|
|
1072
|
+
});
|
|
1073
|
+
const o = s(), r = s(e.class || ""), u = s(!!e.showButtons), c = s(!!e.showHeader), m = s(e.showCloseButton == null ? !0 : e.showCloseButton), C = s(!0), h = s(e.title || ""), v = e.acceptCallback || (() => {
|
|
1074
|
+
}), y = e.rejectCallback || (() => {
|
|
1075
|
+
}), d = e.closedCallback || ((F) => {
|
|
1076
|
+
}), g = e.resizeHandle || ((F) => {
|
|
1077
|
+
}), f = e.stopMoveHandle || ((F) => {
|
|
1078
|
+
}), p = Ge(e), b = (F) => {
|
|
1079
|
+
C.value = !1, l.unmount(), d(F);
|
|
1080
|
+
};
|
|
1081
|
+
return le(() => {
|
|
1082
|
+
}), a.expose({
|
|
1083
|
+
modalRef: o
|
|
1084
|
+
}), () => i(fe, {
|
|
1085
|
+
ref: o,
|
|
1086
|
+
class: r.value,
|
|
1087
|
+
modelValue: C.value,
|
|
1088
|
+
"onUpdate:modelValue": (F) => C.value = F,
|
|
1089
|
+
title: h.value,
|
|
1090
|
+
width: e.width,
|
|
1091
|
+
height: e.height,
|
|
1092
|
+
buttons: e.buttons,
|
|
1093
|
+
"show-header": c.value,
|
|
1094
|
+
"show-buttons": u.value,
|
|
1095
|
+
"show-close-button": m.value,
|
|
1096
|
+
"show-max-button": !1,
|
|
1097
|
+
onAccept: v,
|
|
1098
|
+
onCancel: y,
|
|
1099
|
+
fitContent: e.fitContent == null ? !0 : e.fitContent,
|
|
1100
|
+
onClosed: b,
|
|
1101
|
+
onResize: g,
|
|
1102
|
+
onStopMove: f
|
|
1103
|
+
}, {
|
|
1104
|
+
default: () => [p && p(l)]
|
|
1105
|
+
});
|
|
1106
|
+
}
|
|
1107
|
+
});
|
|
1108
|
+
return document.body.appendChild(t), l.use(_.i18n), l.mount(t), l;
|
|
1109
|
+
}
|
|
1110
|
+
class Xe {
|
|
1111
|
+
constructor(t) {
|
|
1112
|
+
Z(this, "appContext", null);
|
|
1113
|
+
Z(this, "modalRef", s());
|
|
1114
|
+
Z(this, "activeModalIndex", s(0));
|
|
1115
|
+
Z(this, "modalRefs", {});
|
|
1116
|
+
Z(this, "isUseEscCloseModal", s(!1));
|
|
1117
|
+
Z(this, "activeModalInstance", S(() => this.modalRefs[this.activeModalIndex.value]));
|
|
1118
|
+
this.app = t, this.appContext = t ? t._context : null;
|
|
1119
|
+
}
|
|
1120
|
+
getCurrentModal() {
|
|
1121
|
+
return this.activeModalInstance.value;
|
|
1122
|
+
}
|
|
1123
|
+
adaptToWindow(t, l) {
|
|
1124
|
+
const {
|
|
1125
|
+
width: n,
|
|
1126
|
+
height: a
|
|
1127
|
+
} = {
|
|
1128
|
+
width: window.innerWidth,
|
|
1129
|
+
height: window.innerHeight
|
|
1130
|
+
};
|
|
1131
|
+
return n < t && (t = n - 14), a < l && (l = a - 14), {
|
|
1132
|
+
width: t,
|
|
1133
|
+
height: l
|
|
1134
|
+
};
|
|
1135
|
+
}
|
|
1136
|
+
static show(t) {
|
|
1137
|
+
const l = Object.assign({
|
|
1138
|
+
title: "",
|
|
1139
|
+
showButtons: !0,
|
|
1140
|
+
showHeader: !0
|
|
1141
|
+
}, t);
|
|
1142
|
+
return vl(l);
|
|
1143
|
+
}
|
|
1144
|
+
close(t) {
|
|
1145
|
+
var l, n;
|
|
1146
|
+
t ? (n = t.value) == null || n.close() : (l = this.getCurrentModal()) == null || l.close();
|
|
1147
|
+
}
|
|
1148
|
+
open(t) {
|
|
1149
|
+
const l = document.createDocumentFragment();
|
|
1150
|
+
t.showMaxButton && t.fitContent && (t.showMaxButton = !1);
|
|
1151
|
+
const n = It(Object.assign({
|
|
1152
|
+
title: "",
|
|
1153
|
+
showButtons: !0,
|
|
1154
|
+
showHeader: !0
|
|
1155
|
+
}, t)), a = s(!0), o = n.value.acceptCallback || (() => {
|
|
1156
|
+
}), r = n.value.rejectCallback || (() => {
|
|
1157
|
+
}), u = n.value.closedCallback || ((M, B) => {
|
|
1158
|
+
}), c = n.value.resizeHandle || ((M) => {
|
|
1159
|
+
}), m = t.stopMoveHandle || ((M) => {
|
|
1160
|
+
});
|
|
1161
|
+
let C;
|
|
1162
|
+
const h = Ge(n.value), v = (M) => {
|
|
1163
|
+
var x;
|
|
1164
|
+
a.value = !1;
|
|
1165
|
+
const B = (x = M == null ? void 0 : M.target) == null ? void 0 : x.classList.contains("modal_close");
|
|
1166
|
+
u(M, this.isUseEscCloseModal.value ? "esc" : B ? "icon" : "button");
|
|
1167
|
+
}, y = (M) => {
|
|
1168
|
+
v(M), C && de(() => {
|
|
1169
|
+
if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value], we(null, l), C = null, this.modalRef.value = null, this.modalRefs) {
|
|
1170
|
+
const B = Object.keys(this.modalRefs).map((x) => Number(x));
|
|
1171
|
+
B.length > 0 ? this.activeModalIndex.value = Math.max(...B) : this.activeModalIndex.value = 0;
|
|
1172
|
+
}
|
|
1173
|
+
this.isUseEscCloseModal.value = !1;
|
|
1174
|
+
});
|
|
1175
|
+
}, d = (M) => {
|
|
1176
|
+
var B;
|
|
1177
|
+
this.isUseEscCloseModal.value = !0, this.activeModalInstance && ((B = this.activeModalInstance.value) == null || B.close(M == null ? void 0 : M.event));
|
|
1178
|
+
}, {
|
|
1179
|
+
width: g,
|
|
1180
|
+
height: f
|
|
1181
|
+
} = n.value, p = this.adaptToWindow(g || 500, f || 320);
|
|
1182
|
+
Object.assign(n.value, p);
|
|
1183
|
+
const b = () => i(fe, ve({
|
|
1184
|
+
ref: this.modalRef,
|
|
1185
|
+
modelValue: a.value,
|
|
1186
|
+
"onUpdate:modelValue": (M) => a.value = M
|
|
1187
|
+
}, n.value, {
|
|
1188
|
+
isMessager: n.value.class && n.value.class.indexOf("modal-message") > -1,
|
|
1189
|
+
onAccept: o,
|
|
1190
|
+
onCancel: r,
|
|
1191
|
+
onClosed: y,
|
|
1192
|
+
onResize: c,
|
|
1193
|
+
onEsc: d,
|
|
1194
|
+
onStopMove: m
|
|
1195
|
+
}), {
|
|
1196
|
+
default: () => [h && h(this.app)]
|
|
1197
|
+
});
|
|
1198
|
+
return C = ((M) => {
|
|
1199
|
+
const B = Ot(b, M);
|
|
1200
|
+
return B.appContext = this.appContext, we(B, l), B;
|
|
1201
|
+
})({
|
|
1202
|
+
...n.value
|
|
1203
|
+
// 'onUpdate:modelValue': onUpdateModelValue,
|
|
1204
|
+
}), this.activeModalIndex.value++, this.modalRefs[this.activeModalIndex.value] = this.modalRef.value, {
|
|
1205
|
+
update: (M) => {
|
|
1206
|
+
n.value = {
|
|
1207
|
+
...n.value,
|
|
1208
|
+
...M
|
|
1209
|
+
}, C && we(Et(C, {
|
|
1210
|
+
...n
|
|
1211
|
+
}), l);
|
|
1212
|
+
},
|
|
1213
|
+
destroy: y,
|
|
1214
|
+
modalRef: this.activeModalInstance,
|
|
1215
|
+
close: () => this.close()
|
|
1216
|
+
};
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
const Ye = Symbol("FModalService");
|
|
1220
|
+
fe.install = (e) => {
|
|
1221
|
+
e.component(fe.name, fe);
|
|
1222
|
+
const t = new Xe(e);
|
|
1223
|
+
e.provide(Ye, t), e.provide("FModalService", t);
|
|
1224
|
+
};
|
|
1225
|
+
function Ke(e, t) {
|
|
1226
|
+
function l() {
|
|
1227
|
+
const n = e.beforeOpen || e.beforeClickButton || null;
|
|
1228
|
+
let a = Promise.resolve(!0);
|
|
1229
|
+
if (n) {
|
|
1230
|
+
const o = n(t.value);
|
|
1231
|
+
if (typeof o > "u")
|
|
1232
|
+
return a;
|
|
1233
|
+
typeof o == "boolean" ? a = Promise.resolve(o) : a = o;
|
|
1234
|
+
}
|
|
1235
|
+
return a;
|
|
1236
|
+
}
|
|
1237
|
+
return { judgeCanOpen: l };
|
|
1238
|
+
}
|
|
1239
|
+
function ml(e, t, l, n, a) {
|
|
1240
|
+
const o = s(e.buttonBehavior), r = s(e.popupOnInput), u = S(() => ({
|
|
1241
|
+
"input-group-append": !0,
|
|
1242
|
+
"append-force-show": e.showButtonWhenDisabled && (e.readonly || e.disable)
|
|
1243
|
+
})), { judgeCanOpen: c } = Ke(e, a), m = S(() => e.showButtonWhenDisabled || (!e.editable || !e.readonly) && !e.disable), C = oe(Ye, null), h = s();
|
|
1244
|
+
async function v(g) {
|
|
1245
|
+
if (await c() && m.value) {
|
|
1246
|
+
const f = !!t.slots.default;
|
|
1247
|
+
if (o.value === "Modal") {
|
|
1248
|
+
const p = e.modalOptions, b = C == null ? void 0 : C.open({
|
|
1249
|
+
...p,
|
|
1250
|
+
render: () => t.slots.default && t.slots.default()
|
|
1251
|
+
});
|
|
1252
|
+
h.value = b == null ? void 0 : b.modalRef;
|
|
1253
|
+
}
|
|
1254
|
+
o.value === "Overlay" && ul.show({
|
|
1255
|
+
// host: buttonEditRef.value,
|
|
1256
|
+
host: document.body,
|
|
1257
|
+
backgroundColor: "rgba(0,0,0,.15)",
|
|
1258
|
+
render: () => t.slots.default && t.slots.default()
|
|
1259
|
+
}), f && o.value === "Popup" && n.togglePopup(!0), f && r.value && n.hidePopup(), t.emit("clickButton", { origin: g, value: e.modelValue });
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
function y(g) {
|
|
1263
|
+
t.emit("mouseEnterIcon", g);
|
|
1264
|
+
}
|
|
1265
|
+
function d(g) {
|
|
1266
|
+
t.emit("mouseLeaveIcon", g);
|
|
1267
|
+
}
|
|
1268
|
+
return {
|
|
1269
|
+
buttonGroupClass: u,
|
|
1270
|
+
onClickButton: v,
|
|
1271
|
+
onMouseEnterButton: y,
|
|
1272
|
+
onMouseLeaveButton: d,
|
|
1273
|
+
modalRef: h
|
|
1274
|
+
};
|
|
1275
|
+
}
|
|
1276
|
+
function hl(e, t, l, n, a, o) {
|
|
1277
|
+
const r = s(!1), u = S(() => e.enableClear && !e.readonly && !e.disable), { changeTextBoxValue: c, hasClearClass: m } = o;
|
|
1278
|
+
function C(d) {
|
|
1279
|
+
r.value = d, m.value = d;
|
|
1280
|
+
}
|
|
1281
|
+
A(a, () => {
|
|
1282
|
+
C(!!a.value);
|
|
1283
|
+
});
|
|
1284
|
+
function h(d) {
|
|
1285
|
+
const g = !e.readonly && !e.disable && e.editable, f = !e.editable;
|
|
1286
|
+
d.stopPropagation(), (g || f) && (c(""), a.value = "", C(!r.value), t.emit("clear"));
|
|
1287
|
+
}
|
|
1288
|
+
function v(d) {
|
|
1289
|
+
if (u.value) {
|
|
1290
|
+
if (!l.value) {
|
|
1291
|
+
C(!1);
|
|
1292
|
+
return;
|
|
1293
|
+
}
|
|
1294
|
+
!e.disable && !e.readonly && C(!0);
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
function y(d) {
|
|
1298
|
+
u.value && C(!1);
|
|
1299
|
+
}
|
|
1300
|
+
return {
|
|
1301
|
+
enableClearButton: u,
|
|
1302
|
+
showClearButton: r,
|
|
1303
|
+
onClearValue: h,
|
|
1304
|
+
onMouseEnterTextBox: v,
|
|
1305
|
+
onMouseLeaveTextBox: y
|
|
1306
|
+
};
|
|
1307
|
+
}
|
|
1308
|
+
function yl(e, t, l, n, a) {
|
|
1309
|
+
const o = S(() => e.popupOnInput), r = S(() => e.popupOnFocus), { shouldPopupContent: u, closeAllPopover: c } = a, m = s(!1), C = S(() => e.enableTitle ? l.value : ""), h = S(() => (e.disable || e.readonly) && !e.forcePlaceholder ? "" : e.placeholder), v = S(() => e.readonly || !e.editable), y = s(!1), d = S(() => !e.disable && y.value), g = S(() => ({
|
|
1310
|
+
"text-left": e.textAlign === "left",
|
|
1311
|
+
"text-center": e.textAlign === "center",
|
|
1312
|
+
"text-right": e.textAlign === "right",
|
|
1313
|
+
"form-control": !0,
|
|
1314
|
+
"f-utils-fill": !0
|
|
1315
|
+
})), f = S(() => ({
|
|
1316
|
+
"input-group": !0,
|
|
1317
|
+
"f-state-disabled": e.disable,
|
|
1318
|
+
"f-state-editable": e.editable && !e.disable && !e.readonly,
|
|
1319
|
+
"f-state-readonly": e.readonly,
|
|
1320
|
+
"f-state-focus": d.value,
|
|
1321
|
+
"input-group--has-clear": e.enableClear && m.value
|
|
1322
|
+
}));
|
|
1323
|
+
function p(I, O = !0) {
|
|
1324
|
+
l.value = I, O && (t.emit("change", I), t.emit("update:modelValue", I));
|
|
1325
|
+
}
|
|
1326
|
+
function b(I) {
|
|
1327
|
+
u.value = !1, p(I, !0);
|
|
1328
|
+
}
|
|
1329
|
+
A(
|
|
1330
|
+
() => e.modelValue,
|
|
1331
|
+
(I) => {
|
|
1332
|
+
l.value = I;
|
|
1333
|
+
}
|
|
1334
|
+
);
|
|
1335
|
+
function F(I) {
|
|
1336
|
+
y.value = !1, t.emit("blur", I), I.stopPropagation();
|
|
1337
|
+
}
|
|
1338
|
+
function P(I) {
|
|
1339
|
+
t.emit("click", I), c(), t.slots.default && !e.disable && !e.readonly && e.popupOnClick && a.togglePopup();
|
|
1340
|
+
}
|
|
1341
|
+
function M(I) {
|
|
1342
|
+
!e.disable && !e.readonly && (y.value = !0, v.value || (t.emit("focus", I), r.value && !u.value && a.popup()));
|
|
1343
|
+
}
|
|
1344
|
+
function B(I) {
|
|
1345
|
+
t.emit("input", I);
|
|
1346
|
+
const O = I.target.value;
|
|
1347
|
+
n.value = O, l.value !== O && p(O, e.updateOn === "change"), o.value && !u.value && a.popup();
|
|
1348
|
+
}
|
|
1349
|
+
function x(I) {
|
|
1350
|
+
I.target.tagName !== "INPUT" && I.preventDefault(), I.stopPropagation();
|
|
1351
|
+
}
|
|
1352
|
+
function E(I) {
|
|
1353
|
+
t.emit("keydown", I);
|
|
1354
|
+
}
|
|
1355
|
+
function j(I) {
|
|
1356
|
+
I.key === "Enter" && (o.value || r.value) && a.hidePopup(), t.emit("keyup", I);
|
|
1357
|
+
}
|
|
1358
|
+
function $(I) {
|
|
1359
|
+
const O = I.target.value;
|
|
1360
|
+
I.stopPropagation(), p(O);
|
|
1361
|
+
}
|
|
1362
|
+
return {
|
|
1363
|
+
hasFocusedTextBox: d,
|
|
1364
|
+
isTextBoxReadonly: v,
|
|
1365
|
+
textBoxClass: g,
|
|
1366
|
+
textBoxPlaceholder: h,
|
|
1367
|
+
textBoxTitle: C,
|
|
1368
|
+
inputGroupClass: f,
|
|
1369
|
+
hasClearClass: m,
|
|
1370
|
+
changeTextBoxValue: p,
|
|
1371
|
+
commitValue: b,
|
|
1372
|
+
onBlurTextBox: F,
|
|
1373
|
+
onClickTextBox: P,
|
|
1374
|
+
onFocusTextBox: M,
|
|
1375
|
+
onInput: B,
|
|
1376
|
+
onKeyDownTextBox: E,
|
|
1377
|
+
onKeyUpTextBox: j,
|
|
1378
|
+
onMouseDownTextBox: x,
|
|
1379
|
+
onTextBoxValueChange: $
|
|
1380
|
+
};
|
|
1381
|
+
}
|
|
1382
|
+
const ne = "FarrisVue_PopoverInstancesKey";
|
|
1383
|
+
function gl(e, t, l, n) {
|
|
1384
|
+
const a = s(), o = s(!1), { judgeCanOpen: r } = Ke(e, n);
|
|
1385
|
+
A(() => a.value, (y, d) => {
|
|
1386
|
+
window[ne] = window[ne] || /* @__PURE__ */ new WeakMap(), y ? window[ne].set(l.value, y) : window[ne].delete(l.value);
|
|
1387
|
+
});
|
|
1388
|
+
function u() {
|
|
1389
|
+
if (window[ne]) {
|
|
1390
|
+
const y = window[ne];
|
|
1391
|
+
document.querySelectorAll(".f-button-edit,.v-popover").forEach((d) => {
|
|
1392
|
+
const g = y.get(d);
|
|
1393
|
+
g && d !== l.value && !l.value.closest(".popover-fitcontent") && g.hide();
|
|
1394
|
+
});
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
function c() {
|
|
1398
|
+
const y = a.value;
|
|
1399
|
+
y && y.show(l.value);
|
|
1400
|
+
}
|
|
1401
|
+
async function m(y = !1) {
|
|
1402
|
+
if (!!t.slots.default) {
|
|
1403
|
+
if (!y && !o.value && !await r())
|
|
1404
|
+
return;
|
|
1405
|
+
o.value = !o.value, o.value && (await de(), c());
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
async function C(y = !1) {
|
|
1409
|
+
if (!!t.slots.default) {
|
|
1410
|
+
if (!y && !await r())
|
|
1411
|
+
return;
|
|
1412
|
+
o.value = !0, await de(), c();
|
|
1413
|
+
}
|
|
1414
|
+
}
|
|
1415
|
+
function h() {
|
|
1416
|
+
o.value = !1;
|
|
1417
|
+
}
|
|
1418
|
+
function v() {
|
|
1419
|
+
o.value = !0, de(() => {
|
|
1420
|
+
c();
|
|
1421
|
+
});
|
|
1422
|
+
}
|
|
1423
|
+
return { hidePopup: h, showPopup: v, popup: C, shouldPopupContent: o, togglePopup: m, popoverRef: a, closeAllPopover: u };
|
|
1424
|
+
}
|
|
1425
|
+
function pl(e, t, l) {
|
|
1426
|
+
const n = s(), {
|
|
1427
|
+
isTextBoxReadonly: a,
|
|
1428
|
+
textBoxClass: o,
|
|
1429
|
+
textBoxPlaceholder: r,
|
|
1430
|
+
textBoxTitle: u,
|
|
1431
|
+
onBlurTextBox: c,
|
|
1432
|
+
onClickTextBox: m,
|
|
1433
|
+
onFocusTextBox: C,
|
|
1434
|
+
onInput: h,
|
|
1435
|
+
onKeyDownTextBox: v,
|
|
1436
|
+
onKeyUpTextBox: y,
|
|
1437
|
+
onMouseDownTextBox: d,
|
|
1438
|
+
onTextBoxValueChange: g
|
|
1439
|
+
} = l, f = s(e.id), {
|
|
1440
|
+
uuid: p
|
|
1441
|
+
} = Ht(), b = S(() => ({
|
|
1442
|
+
// 'border-top-right-radius': '6px',
|
|
1443
|
+
// 'border-bottom-right-radius': '6px'
|
|
1444
|
+
}));
|
|
1445
|
+
le(() => {
|
|
1446
|
+
var x, E;
|
|
1447
|
+
e.selectOnCreated && ((x = n.value) == null || x.select()), e.focusOnCreated && ((E = n.value) == null || E.focus({
|
|
1448
|
+
preventScroll: !0
|
|
1449
|
+
})), f.value || (f.value = "button-edit_" + p(8)), f.value = f.value + "-textbox";
|
|
1450
|
+
});
|
|
1451
|
+
const F = s(!1), P = (x) => {
|
|
1452
|
+
x.preventDefault(), F.value = !0;
|
|
1453
|
+
}, M = (x) => {
|
|
1454
|
+
x.preventDefault(), F.value = !1, h(x);
|
|
1455
|
+
};
|
|
1456
|
+
function B(x) {
|
|
1457
|
+
F.value || h(x);
|
|
1458
|
+
}
|
|
1459
|
+
return () => i("input", {
|
|
1460
|
+
id: e.id ? e.id + "-textbox" : void 0,
|
|
1461
|
+
ref: n,
|
|
1462
|
+
name: "input-group-value",
|
|
1463
|
+
autocomplete: e.autoComplete ? "on" : "off",
|
|
1464
|
+
class: o.value,
|
|
1465
|
+
style: b.value,
|
|
1466
|
+
disabled: e.disable,
|
|
1467
|
+
maxlength: e.maxLength,
|
|
1468
|
+
minlength: e.minLength,
|
|
1469
|
+
placeholder: r.value,
|
|
1470
|
+
readonly: a.value,
|
|
1471
|
+
tabindex: e.tabIndex,
|
|
1472
|
+
title: u.value,
|
|
1473
|
+
type: e.inputType,
|
|
1474
|
+
value: t.value,
|
|
1475
|
+
onBlur: c,
|
|
1476
|
+
onChange: g,
|
|
1477
|
+
onClick: m,
|
|
1478
|
+
onFocus: C,
|
|
1479
|
+
onInput: B,
|
|
1480
|
+
onKeydown: v,
|
|
1481
|
+
onKeyup: y,
|
|
1482
|
+
onMousedown: d,
|
|
1483
|
+
onCompositionend: M,
|
|
1484
|
+
onCompositionstart: P
|
|
1485
|
+
}, null);
|
|
1486
|
+
}
|
|
1487
|
+
function bl(e, t, l) {
|
|
1488
|
+
const n = s(e.separator), a = S(() => e.readonly || e.disable), {
|
|
1489
|
+
changeTextBoxValue: o,
|
|
1490
|
+
onFocusTextBox: r,
|
|
1491
|
+
onBlurTextBox: u,
|
|
1492
|
+
onClickTextBox: c,
|
|
1493
|
+
textBoxPlaceholder: m
|
|
1494
|
+
} = l, C = S(() => t.value ? t.value.split(n.value).map((d) => ({
|
|
1495
|
+
name: d,
|
|
1496
|
+
selectable: !0
|
|
1497
|
+
})) : []);
|
|
1498
|
+
function h(d) {
|
|
1499
|
+
o(d.map((g) => g.name).join(n.value), !0);
|
|
1500
|
+
}
|
|
1501
|
+
A(() => e.separator, (d) => {
|
|
1502
|
+
n.value = d;
|
|
1503
|
+
});
|
|
1504
|
+
const v = s(!e.disable && !e.readonly);
|
|
1505
|
+
A([() => e.disable, () => e.readonly], ([d, g], [f, p]) => {
|
|
1506
|
+
v.value = !d && !g;
|
|
1507
|
+
});
|
|
1508
|
+
function y(d) {
|
|
1509
|
+
c(d);
|
|
1510
|
+
}
|
|
1511
|
+
return () => i(At, {
|
|
1512
|
+
tabindex: e.tabIndex,
|
|
1513
|
+
onFocus: r,
|
|
1514
|
+
onBlur: u,
|
|
1515
|
+
id: `${e.id}-tag-editor`,
|
|
1516
|
+
class: "form-control",
|
|
1517
|
+
placeholder: m.value,
|
|
1518
|
+
data: C.value,
|
|
1519
|
+
showClose: !a.value,
|
|
1520
|
+
showInput: !0,
|
|
1521
|
+
disable: a.value,
|
|
1522
|
+
onChange: h,
|
|
1523
|
+
onClick: y
|
|
1524
|
+
}, null);
|
|
1525
|
+
}
|
|
1526
|
+
function Cl(e, t, l, n) {
|
|
1527
|
+
const {
|
|
1528
|
+
buttonGroupClass: a,
|
|
1529
|
+
onClickButton: o,
|
|
1530
|
+
onMouseEnterButton: r,
|
|
1531
|
+
onMouseLeaveButton: u
|
|
1532
|
+
} = l, {
|
|
1533
|
+
enableClearButton: c,
|
|
1534
|
+
showClearButton: m,
|
|
1535
|
+
onClearValue: C
|
|
1536
|
+
} = n, h = s(), v = $e((d) => {
|
|
1537
|
+
o(d);
|
|
1538
|
+
}, e.buttonBehavior === "Modal" ? 0 : 200), y = () => {
|
|
1539
|
+
t.emit("beforeClearValue");
|
|
1540
|
+
};
|
|
1541
|
+
return {
|
|
1542
|
+
renderButtonGroup: () => i("div", {
|
|
1543
|
+
id: e.id ? `${e.id}-button-group` : void 0,
|
|
1544
|
+
class: a.value
|
|
1545
|
+
}, [c.value && Pt(i("span", {
|
|
1546
|
+
class: "input-group-text input-group-clear",
|
|
1547
|
+
onClick: C,
|
|
1548
|
+
onMousedown: y
|
|
1549
|
+
}, [i("i", {
|
|
1550
|
+
class: "f-icon modal_close"
|
|
1551
|
+
}, null)]), [[Rt, m.value]]), t.slots.buttonContent ? i("span", {
|
|
1552
|
+
class: "input-group-text input-group-append-button",
|
|
1553
|
+
onClick: v,
|
|
1554
|
+
onMouseenter: r,
|
|
1555
|
+
onMouseleave: u
|
|
1556
|
+
}, [t.slots.buttonContent()]) : e.buttonContent ? i("span", {
|
|
1557
|
+
class: "input-group-text input-group-append-button",
|
|
1558
|
+
innerHTML: e.buttonContent,
|
|
1559
|
+
ref: h,
|
|
1560
|
+
onClick: (d) => v(d),
|
|
1561
|
+
onMouseenter: r,
|
|
1562
|
+
onMouseleave: u
|
|
1563
|
+
}, null) : null]),
|
|
1564
|
+
buttonHandleElement: h
|
|
1565
|
+
};
|
|
1566
|
+
}
|
|
1567
|
+
function xl(e, t, l) {
|
|
1568
|
+
const n = s(e.popupMinWidth), {
|
|
1569
|
+
hidePopup: a,
|
|
1570
|
+
popoverRef: o
|
|
1571
|
+
} = l, r = () => {
|
|
1572
|
+
t.emit("shown");
|
|
1573
|
+
};
|
|
1574
|
+
return () => i(Wt, {
|
|
1575
|
+
id: `${e.id}-popover`,
|
|
1576
|
+
ref: o,
|
|
1577
|
+
placement: e.placement,
|
|
1578
|
+
host: e.popupHost,
|
|
1579
|
+
"keep-width-with-reference": e.keepWidthWithReference,
|
|
1580
|
+
fitContent: !0,
|
|
1581
|
+
"right-boundary": e.popupRightBoundary,
|
|
1582
|
+
minWidth: n.value,
|
|
1583
|
+
class: e.popupClass,
|
|
1584
|
+
offsetX: e.popupOffsetX,
|
|
1585
|
+
onHidden: a,
|
|
1586
|
+
onShown: r,
|
|
1587
|
+
beforeClose: e.beforeClosePopup,
|
|
1588
|
+
limitContentBySpace: e.limitContentBySpace
|
|
1589
|
+
}, {
|
|
1590
|
+
default: () => {
|
|
1591
|
+
var u, c;
|
|
1592
|
+
return [(c = (u = t.slots).default) == null ? void 0 : c.call(u)];
|
|
1593
|
+
}
|
|
1594
|
+
});
|
|
1595
|
+
}
|
|
1596
|
+
const Oe = /* @__PURE__ */ K({
|
|
1597
|
+
name: "FButtonEdit",
|
|
1598
|
+
props: ll,
|
|
1599
|
+
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue", "beforeClearValue"],
|
|
1600
|
+
setup(e, t) {
|
|
1601
|
+
const l = s(), n = s(e.customClass), a = s(e.modelValue), o = gl(e, t, l, a), {
|
|
1602
|
+
shouldPopupContent: r,
|
|
1603
|
+
hidePopup: u,
|
|
1604
|
+
showPopup: c,
|
|
1605
|
+
togglePopup: m
|
|
1606
|
+
} = o, C = ml(e, t, l, o, a), h = s(""), v = yl(e, t, a, h, o), {
|
|
1607
|
+
hasFocusedTextBox: y,
|
|
1608
|
+
commitValue: d,
|
|
1609
|
+
inputGroupClass: g
|
|
1610
|
+
} = v, f = hl(e, t, a, y, h, v), {
|
|
1611
|
+
onMouseEnterTextBox: p,
|
|
1612
|
+
onMouseLeaveTextBox: b
|
|
1613
|
+
} = f, F = s(!1), P = S(() => {
|
|
1614
|
+
const R = {
|
|
1615
|
+
"f-button-edit": !0,
|
|
1616
|
+
"f-cmp-inputgroup": !0,
|
|
1617
|
+
"f-button-edit-nowrap": !e.wrapText
|
|
1618
|
+
};
|
|
1619
|
+
return n.value && n.value.split(" ").reduce((W, k) => (W[k] = !0, W), R), R;
|
|
1620
|
+
}), M = S(() => ({
|
|
1621
|
+
overflow: e.wrapText ? "hidden" : ""
|
|
1622
|
+
})), B = S(() => ({
|
|
1623
|
+
// paddingLeft: '3px',
|
|
1624
|
+
// backgroundColor: '#fff'
|
|
1625
|
+
}));
|
|
1626
|
+
function x() {
|
|
1627
|
+
if (!e.multiSelect || e.inputType !== "tag" || !l.value)
|
|
1628
|
+
return 0;
|
|
1629
|
+
let R = 0;
|
|
1630
|
+
const W = Array.from(l.value.querySelectorAll(".farris-tag-item"));
|
|
1631
|
+
return W && W.length && (R = W.map((k) => k.offsetTop).filter((k) => k > 20).length), R;
|
|
1632
|
+
}
|
|
1633
|
+
const E = s(x());
|
|
1634
|
+
Me(() => {
|
|
1635
|
+
E.value = x();
|
|
1636
|
+
});
|
|
1637
|
+
function j() {
|
|
1638
|
+
return e.multiSelect && e.inputType === "tag" ? () => i(ie, null, [bl(e, a, v)(), !!E.value && i("div", {
|
|
1639
|
+
class: "d-flex flex-row mr-2 more-tags",
|
|
1640
|
+
"more-tags": !0
|
|
1641
|
+
}, [i("span", {
|
|
1642
|
+
class: "multi--more-text"
|
|
1643
|
+
}, [X("+"), E.value])])]) : pl(e, a, v);
|
|
1644
|
+
}
|
|
1645
|
+
let $ = j();
|
|
1646
|
+
A([() => e.multiSelect, () => e.inputType], () => {
|
|
1647
|
+
$ = j();
|
|
1648
|
+
});
|
|
1649
|
+
const {
|
|
1650
|
+
renderButtonGroup: I,
|
|
1651
|
+
buttonHandleElement: O
|
|
1652
|
+
} = Cl(e, t, C, f), z = xl(e, t, o), D = s(r.value), V = {
|
|
1653
|
+
displayText: h,
|
|
1654
|
+
commitValue: d,
|
|
1655
|
+
elementRef: l,
|
|
1656
|
+
hidePopup: u,
|
|
1657
|
+
showPopup: c,
|
|
1658
|
+
popoverRef: o.popoverRef,
|
|
1659
|
+
shouldPopupContent: r,
|
|
1660
|
+
togglePopup: m,
|
|
1661
|
+
openDialog: () => {
|
|
1662
|
+
O.value && e.buttonBehavior === "Modal" && O.value.click();
|
|
1663
|
+
},
|
|
1664
|
+
getModal: () => {
|
|
1665
|
+
var R;
|
|
1666
|
+
return e.buttonBehavior === "Modal" ? (R = C.modalRef.value) == null ? void 0 : R.value : null;
|
|
1667
|
+
},
|
|
1668
|
+
getTextbox: () => {
|
|
1669
|
+
var R;
|
|
1670
|
+
return (R = l.value) == null ? void 0 : R.querySelector("input");
|
|
1671
|
+
},
|
|
1672
|
+
forceClosePopup: () => {
|
|
1673
|
+
D.value = !1, F.value = !0, r.value = !1;
|
|
1674
|
+
}
|
|
1675
|
+
};
|
|
1676
|
+
return le(() => {
|
|
1677
|
+
l.value.componentInstance = V, window.onresize = () => {
|
|
1678
|
+
document.body.click();
|
|
1679
|
+
};
|
|
1680
|
+
}), Vt(() => {
|
|
1681
|
+
var R;
|
|
1682
|
+
window.onresize = null, (R = window[ne]) == null || R.delete(l.value);
|
|
1683
|
+
}), t.expose(V), A(() => r.value, async (R, W) => {
|
|
1684
|
+
if (F.value) {
|
|
1685
|
+
D.value = R, F.value = !1;
|
|
1686
|
+
return;
|
|
1687
|
+
}
|
|
1688
|
+
if (!R && e.beforeClosePopup && typeof e.beforeClosePopup == "function") {
|
|
1689
|
+
try {
|
|
1690
|
+
const k = await e.beforeClosePopup();
|
|
1691
|
+
D.value = !k, (!k || e.readonly) && (r.value = !0);
|
|
1692
|
+
} catch (k) {
|
|
1693
|
+
console.error("Error in beforeClosePopup:", k), D.value = W, r.value = W;
|
|
1694
|
+
}
|
|
1695
|
+
return;
|
|
1696
|
+
}
|
|
1697
|
+
D.value = R;
|
|
1698
|
+
}), () => {
|
|
1699
|
+
var R, W;
|
|
1700
|
+
return i(ie, null, [i("div", ve(t.attrs, {
|
|
1701
|
+
ref: l,
|
|
1702
|
+
class: P.value,
|
|
1703
|
+
id: e.id ? e.id : void 0,
|
|
1704
|
+
style: M.value
|
|
1705
|
+
}), [i("div", {
|
|
1706
|
+
id: e.id ? `${e.id}-input-group` : void 0,
|
|
1707
|
+
class: g.value,
|
|
1708
|
+
style: B.value,
|
|
1709
|
+
onMouseenter: p,
|
|
1710
|
+
onMouseleave: b
|
|
1711
|
+
}, [(W = (R = t.slots).precontent) == null ? void 0 : W.call(R), $(), I()])]), D.value && z()]);
|
|
1712
|
+
};
|
|
1713
|
+
}
|
|
1714
|
+
}), wl = {
|
|
1715
|
+
disabled: {
|
|
1716
|
+
type: Boolean,
|
|
1717
|
+
default: !1
|
|
1718
|
+
},
|
|
1719
|
+
readonly: {
|
|
1720
|
+
type: Boolean,
|
|
1721
|
+
default: !1
|
|
1722
|
+
},
|
|
1723
|
+
enableClear: {
|
|
1724
|
+
type: Boolean,
|
|
1725
|
+
default: !0
|
|
1726
|
+
},
|
|
1727
|
+
displayText: {
|
|
1728
|
+
type: String,
|
|
1729
|
+
default: ""
|
|
1730
|
+
},
|
|
1731
|
+
enableExpression: {
|
|
1732
|
+
type: Boolean,
|
|
1733
|
+
default: !1
|
|
1734
|
+
},
|
|
1735
|
+
modelValue: {
|
|
1736
|
+
type: String,
|
|
1737
|
+
default: ""
|
|
1738
|
+
},
|
|
1739
|
+
insertType: {
|
|
1740
|
+
type: String,
|
|
1741
|
+
default: "below"
|
|
1742
|
+
// 'above'|'below'
|
|
1743
|
+
},
|
|
1744
|
+
fields: {
|
|
1745
|
+
type: Array,
|
|
1746
|
+
default: []
|
|
1747
|
+
},
|
|
1748
|
+
repositoryToken: {
|
|
1749
|
+
type: Object,
|
|
1750
|
+
default: null
|
|
1751
|
+
},
|
|
1752
|
+
editorParams: {
|
|
1753
|
+
type: Object,
|
|
1754
|
+
default: null
|
|
1755
|
+
},
|
|
1756
|
+
onSubmitModal: {
|
|
1757
|
+
type: Function,
|
|
1758
|
+
default: null
|
|
1759
|
+
},
|
|
1760
|
+
beforeOpen: {
|
|
1761
|
+
type: Function,
|
|
1762
|
+
default: null
|
|
1763
|
+
},
|
|
1764
|
+
editorType: {
|
|
1765
|
+
type: String,
|
|
1766
|
+
default: "filter"
|
|
1767
|
+
},
|
|
1768
|
+
expressionOptions: {
|
|
1769
|
+
type: Object,
|
|
1770
|
+
default: null
|
|
1771
|
+
},
|
|
1772
|
+
formContextData: {
|
|
1773
|
+
type: Object,
|
|
1774
|
+
default: {}
|
|
1775
|
+
},
|
|
1776
|
+
singleValue: {
|
|
1777
|
+
type: Boolean,
|
|
1778
|
+
default: !0
|
|
1779
|
+
},
|
|
1780
|
+
idField: {
|
|
1781
|
+
type: String,
|
|
1782
|
+
default: "id"
|
|
1783
|
+
},
|
|
1784
|
+
textField: {
|
|
1785
|
+
type: String,
|
|
1786
|
+
default: ""
|
|
1787
|
+
},
|
|
1788
|
+
valueField: {
|
|
1789
|
+
type: String,
|
|
1790
|
+
default: ""
|
|
1791
|
+
},
|
|
1792
|
+
editable: {
|
|
1793
|
+
type: Boolean,
|
|
1794
|
+
default: !0
|
|
1795
|
+
},
|
|
1796
|
+
enableTitle: {
|
|
1797
|
+
type: Boolean,
|
|
1798
|
+
default: !0
|
|
1799
|
+
},
|
|
1800
|
+
disableConfirmWhenUnchanged: {
|
|
1801
|
+
type: Boolean,
|
|
1802
|
+
default: !1
|
|
1803
|
+
}
|
|
1804
|
+
}, _e = {
|
|
1805
|
+
conditions: {
|
|
1806
|
+
type: Array,
|
|
1807
|
+
default: []
|
|
1808
|
+
},
|
|
1809
|
+
fields: {
|
|
1810
|
+
type: Array,
|
|
1811
|
+
default: []
|
|
1812
|
+
},
|
|
1813
|
+
activeIndex: {
|
|
1814
|
+
type: Number,
|
|
1815
|
+
default: -1
|
|
1816
|
+
},
|
|
1817
|
+
formatter: {
|
|
1818
|
+
type: Function,
|
|
1819
|
+
default: (e, t) => `${t.raw.name} [${t.raw.path}]`
|
|
1820
|
+
},
|
|
1821
|
+
enableExpression: {
|
|
1822
|
+
type: Boolean,
|
|
1823
|
+
default: !1
|
|
1824
|
+
},
|
|
1825
|
+
expressionOptions: {
|
|
1826
|
+
type: Object,
|
|
1827
|
+
default: null
|
|
1828
|
+
},
|
|
1829
|
+
formContextData: {
|
|
1830
|
+
type: Object,
|
|
1831
|
+
default: {}
|
|
1832
|
+
},
|
|
1833
|
+
singleValue: {
|
|
1834
|
+
type: Boolean,
|
|
1835
|
+
default: !0
|
|
1836
|
+
},
|
|
1837
|
+
idField: {
|
|
1838
|
+
type: String,
|
|
1839
|
+
default: "id"
|
|
1840
|
+
},
|
|
1841
|
+
textField: {
|
|
1842
|
+
type: String,
|
|
1843
|
+
default: ""
|
|
1844
|
+
},
|
|
1845
|
+
valueField: {
|
|
1846
|
+
type: String,
|
|
1847
|
+
default: ""
|
|
1848
|
+
}
|
|
1849
|
+
}, Ee = /* @__PURE__ */ new Map([
|
|
1850
|
+
["appearance", Tt]
|
|
1851
|
+
]), Sl = "https://json-schema.org/draft/2020-12/schema", Bl = "https://farris-design.gitee.io/combo-list.schema.json", Tl = "combo-list", Fl = "A Farris Input Component", kl = "object", Ml = {
|
|
1852
|
+
id: {
|
|
1853
|
+
description: "The unique identifier for a combo list",
|
|
1854
|
+
type: "string"
|
|
1855
|
+
},
|
|
1856
|
+
type: {
|
|
1857
|
+
description: "The type string of number combo list component",
|
|
1858
|
+
type: "string",
|
|
1859
|
+
default: "combo-list"
|
|
1860
|
+
},
|
|
1861
|
+
appearance: {
|
|
1862
|
+
description: "",
|
|
1863
|
+
type: "object",
|
|
1864
|
+
properties: {
|
|
1865
|
+
class: {
|
|
1866
|
+
type: "string"
|
|
1867
|
+
},
|
|
1868
|
+
style: {
|
|
1869
|
+
type: "string"
|
|
1870
|
+
}
|
|
1871
|
+
},
|
|
1872
|
+
default: {}
|
|
1873
|
+
},
|
|
1874
|
+
binding: {
|
|
1875
|
+
description: "",
|
|
1876
|
+
type: "object",
|
|
1877
|
+
default: {}
|
|
1878
|
+
},
|
|
1879
|
+
disabled: {
|
|
1880
|
+
description: "",
|
|
1881
|
+
type: "boolean",
|
|
1882
|
+
default: !1
|
|
1883
|
+
},
|
|
1884
|
+
enableClear: {
|
|
1885
|
+
description: "",
|
|
1886
|
+
type: "boolean",
|
|
1887
|
+
default: !1
|
|
1888
|
+
},
|
|
1889
|
+
editable: {
|
|
1890
|
+
description: "",
|
|
1891
|
+
type: "boolean",
|
|
1892
|
+
default: !1
|
|
1893
|
+
},
|
|
1894
|
+
enableLinkLabel: {
|
|
1895
|
+
description: "",
|
|
1896
|
+
type: "boolean",
|
|
1897
|
+
default: !1
|
|
1898
|
+
},
|
|
1899
|
+
label: {
|
|
1900
|
+
description: "",
|
|
1901
|
+
type: "string",
|
|
1902
|
+
default: ""
|
|
1903
|
+
},
|
|
1904
|
+
lableWidth: {
|
|
1905
|
+
description: "",
|
|
1906
|
+
type: "number"
|
|
1907
|
+
},
|
|
1908
|
+
placeholder: {
|
|
1909
|
+
description: "",
|
|
1910
|
+
type: "string",
|
|
1911
|
+
default: "请选择"
|
|
1912
|
+
},
|
|
1913
|
+
idField: {
|
|
1914
|
+
description: "",
|
|
1915
|
+
type: "string",
|
|
1916
|
+
default: "id"
|
|
1917
|
+
},
|
|
1918
|
+
valueField: {
|
|
1919
|
+
description: "",
|
|
1920
|
+
type: "string",
|
|
1921
|
+
default: "id"
|
|
1922
|
+
},
|
|
1923
|
+
titleField: {
|
|
1924
|
+
description: "",
|
|
1925
|
+
type: "string",
|
|
1926
|
+
default: "name"
|
|
1927
|
+
},
|
|
1928
|
+
textField: {
|
|
1929
|
+
description: "",
|
|
1930
|
+
type: "string",
|
|
1931
|
+
default: "name"
|
|
1932
|
+
},
|
|
1933
|
+
dataSourceType: {
|
|
1934
|
+
description: "",
|
|
1935
|
+
type: "string",
|
|
1936
|
+
default: "static"
|
|
1937
|
+
},
|
|
1938
|
+
data: {
|
|
1939
|
+
description: "",
|
|
1940
|
+
type: "array"
|
|
1941
|
+
},
|
|
1942
|
+
remote: {
|
|
1943
|
+
description: "",
|
|
1944
|
+
type: "string"
|
|
1945
|
+
},
|
|
1946
|
+
readonly: {
|
|
1947
|
+
description: "",
|
|
1948
|
+
type: "boolean",
|
|
1949
|
+
default: !1
|
|
1950
|
+
},
|
|
1951
|
+
required: {
|
|
1952
|
+
description: "",
|
|
1953
|
+
type: "boolean",
|
|
1954
|
+
default: !1
|
|
1955
|
+
},
|
|
1956
|
+
tabindex: {
|
|
1957
|
+
description: "",
|
|
1958
|
+
type: "number",
|
|
1959
|
+
default: -1
|
|
1960
|
+
},
|
|
1961
|
+
textAlign: {
|
|
1962
|
+
description: "",
|
|
1963
|
+
type: "string",
|
|
1964
|
+
enum: [
|
|
1965
|
+
"left",
|
|
1966
|
+
"middle",
|
|
1967
|
+
"right"
|
|
1968
|
+
],
|
|
1969
|
+
default: "left"
|
|
1970
|
+
},
|
|
1971
|
+
multiSelect: {
|
|
1972
|
+
description: "",
|
|
1973
|
+
type: "boolean",
|
|
1974
|
+
default: !1
|
|
1975
|
+
},
|
|
1976
|
+
maxLength: {
|
|
1977
|
+
description: "",
|
|
1978
|
+
type: "number",
|
|
1979
|
+
default: null
|
|
1980
|
+
},
|
|
1981
|
+
visible: {
|
|
1982
|
+
description: "",
|
|
1983
|
+
type: "boolean",
|
|
1984
|
+
default: !0
|
|
1985
|
+
},
|
|
1986
|
+
onBlur: {
|
|
1987
|
+
description: "",
|
|
1988
|
+
type: "string",
|
|
1989
|
+
default: ""
|
|
1990
|
+
},
|
|
1991
|
+
onClickLinkLabel: {
|
|
1992
|
+
description: "",
|
|
1993
|
+
type: "string",
|
|
1994
|
+
default: ""
|
|
1995
|
+
},
|
|
1996
|
+
maxHeight: {
|
|
1997
|
+
description: "",
|
|
1998
|
+
type: "number",
|
|
1999
|
+
default: 350
|
|
2000
|
+
},
|
|
2001
|
+
minPanelWidth: {
|
|
2002
|
+
description: "",
|
|
2003
|
+
type: "number",
|
|
2004
|
+
default: 160
|
|
2005
|
+
},
|
|
2006
|
+
popupOnClick: {
|
|
2007
|
+
description: "",
|
|
2008
|
+
type: "boolean",
|
|
2009
|
+
default: !0
|
|
2010
|
+
},
|
|
2011
|
+
separator: {
|
|
2012
|
+
description: "",
|
|
2013
|
+
type: "string",
|
|
2014
|
+
default: ","
|
|
2015
|
+
},
|
|
2016
|
+
viewType: {
|
|
2017
|
+
description: "",
|
|
2018
|
+
type: "string",
|
|
2019
|
+
default: "tag"
|
|
2020
|
+
},
|
|
2021
|
+
enableSearch: {
|
|
2022
|
+
description: "启用搜索",
|
|
2023
|
+
type: "boolean",
|
|
2024
|
+
default: !0
|
|
2025
|
+
},
|
|
2026
|
+
enableHighlightSearch: {
|
|
2027
|
+
description: "启用高亮搜索",
|
|
2028
|
+
type: "boolean",
|
|
2029
|
+
default: !1
|
|
2030
|
+
},
|
|
2031
|
+
beforeOpen: {
|
|
2032
|
+
description: "打卡面板前回调",
|
|
2033
|
+
type: "string"
|
|
2034
|
+
},
|
|
2035
|
+
onChange: {
|
|
2036
|
+
description: "值变化事件",
|
|
2037
|
+
type: "string",
|
|
2038
|
+
default: ""
|
|
2039
|
+
},
|
|
2040
|
+
onInput: {
|
|
2041
|
+
description: "输入事件",
|
|
2042
|
+
type: "string",
|
|
2043
|
+
default: ""
|
|
2044
|
+
},
|
|
2045
|
+
onClear: {
|
|
2046
|
+
description: "清空事件",
|
|
2047
|
+
type: "string",
|
|
2048
|
+
default: ""
|
|
2049
|
+
}
|
|
2050
|
+
}, Il = [
|
|
2051
|
+
"type"
|
|
2052
|
+
], Ol = [
|
|
2053
|
+
"id",
|
|
2054
|
+
"appearance",
|
|
2055
|
+
"binding",
|
|
2056
|
+
"visible"
|
|
2057
|
+
], El = {
|
|
2058
|
+
onClear: "清空事件",
|
|
2059
|
+
onChange: "值变化事件",
|
|
2060
|
+
beforeOpen: "打开下拉面板前事件"
|
|
2061
|
+
}, Pe = {
|
|
2062
|
+
$schema: Sl,
|
|
2063
|
+
$id: Bl,
|
|
2064
|
+
title: Tl,
|
|
2065
|
+
description: Fl,
|
|
2066
|
+
type: kl,
|
|
2067
|
+
properties: Ml,
|
|
2068
|
+
required: Il,
|
|
2069
|
+
ignore: Ol,
|
|
2070
|
+
events: El
|
|
2071
|
+
};
|
|
2072
|
+
function Re(e, t, l) {
|
|
2073
|
+
return t;
|
|
2074
|
+
}
|
|
2075
|
+
function Pl() {
|
|
2076
|
+
function e(t, l, n) {
|
|
2077
|
+
const a = {};
|
|
2078
|
+
return a.beforeOpen = (o) => l.call("beforeOpen", t, [o, t], n), a;
|
|
2079
|
+
}
|
|
2080
|
+
return {
|
|
2081
|
+
resolve: e
|
|
2082
|
+
};
|
|
2083
|
+
}
|
|
2084
|
+
const ge = {
|
|
2085
|
+
/**
|
|
2086
|
+
* 组件标识
|
|
2087
|
+
*/
|
|
2088
|
+
id: { type: String },
|
|
2089
|
+
/**
|
|
2090
|
+
* 下拉数据源
|
|
2091
|
+
*/
|
|
2092
|
+
data: { type: Array, default: [] },
|
|
2093
|
+
/**
|
|
2094
|
+
* 可选,展示文本
|
|
2095
|
+
* 默认为空字符串 -----内部需要根据value重新生成展示文本,此属性不生效
|
|
2096
|
+
* displayText: { type: String, default: '' },
|
|
2097
|
+
*/
|
|
2098
|
+
/**
|
|
2099
|
+
* 可选,是否禁用
|
|
2100
|
+
* 默认为`false`
|
|
2101
|
+
*/
|
|
2102
|
+
disabled: { default: !1, type: Boolean },
|
|
2103
|
+
/**
|
|
2104
|
+
* 可选,下拉图标
|
|
2105
|
+
* 默认为'<span class="f-icon f-icon-arrow-60-down"></span>'
|
|
2106
|
+
*/
|
|
2107
|
+
dropDownIcon: { type: String, default: '<span class="f-icon f-icon-arrow-chevron-down"></span>' },
|
|
2108
|
+
/**
|
|
2109
|
+
* 可选,是否可编辑
|
|
2110
|
+
* 默认`false`
|
|
2111
|
+
*/
|
|
2112
|
+
editable: { default: !1, type: Boolean },
|
|
2113
|
+
/**
|
|
2114
|
+
* 可选,是否启用清空
|
|
2115
|
+
* 默认启用
|
|
2116
|
+
*/
|
|
2117
|
+
enableClear: { default: !0, type: Boolean },
|
|
2118
|
+
/**
|
|
2119
|
+
* 可选,启用搜索
|
|
2120
|
+
* 默认为`false`
|
|
2121
|
+
*/
|
|
2122
|
+
enableSearch: { type: Boolean, default: !1 },
|
|
2123
|
+
/**
|
|
2124
|
+
* 可选,鼠标悬停时是否显示控件值
|
|
2125
|
+
* 默认显示
|
|
2126
|
+
*/
|
|
2127
|
+
enableTitle: { default: !0, type: Boolean },
|
|
2128
|
+
fitEditor: { default: !1, type: Boolean },
|
|
2129
|
+
/**
|
|
2130
|
+
* 可选,强制显示占位符
|
|
2131
|
+
* 默认`false`
|
|
2132
|
+
*/
|
|
2133
|
+
forcePlaceholder: { default: !1, type: Boolean },
|
|
2134
|
+
/**
|
|
2135
|
+
* 可选,清空值时隐藏面板
|
|
2136
|
+
* 默认`true`
|
|
2137
|
+
*/
|
|
2138
|
+
hidePanelOnClear: { default: !0, type: Boolean },
|
|
2139
|
+
/**
|
|
2140
|
+
* 可选,数据源id字段
|
|
2141
|
+
* 默认为`id`
|
|
2142
|
+
*/
|
|
2143
|
+
idField: { default: "id", type: String },
|
|
2144
|
+
/**
|
|
2145
|
+
* 可选,字段映射
|
|
2146
|
+
*/
|
|
2147
|
+
mapFields: { type: Object },
|
|
2148
|
+
/**
|
|
2149
|
+
* 可选,最大高度
|
|
2150
|
+
* 默认`350`
|
|
2151
|
+
*/
|
|
2152
|
+
maxHeight: { default: 350, type: Number },
|
|
2153
|
+
/**
|
|
2154
|
+
* 最大输入长度
|
|
2155
|
+
*/
|
|
2156
|
+
maxLength: { type: Number },
|
|
2157
|
+
/**
|
|
2158
|
+
* 可选,是否支持多选
|
|
2159
|
+
* 默认`false`
|
|
2160
|
+
*/
|
|
2161
|
+
multiSelect: { type: Boolean, default: !1 },
|
|
2162
|
+
/**
|
|
2163
|
+
* 绑定值
|
|
2164
|
+
*/
|
|
2165
|
+
modelValue: {},
|
|
2166
|
+
/**
|
|
2167
|
+
* 占位符
|
|
2168
|
+
*/
|
|
2169
|
+
placeholder: { type: String, default: "请选择" },
|
|
2170
|
+
/**
|
|
2171
|
+
* 可选,下拉面板展示位置
|
|
2172
|
+
* 默认为`auto`
|
|
2173
|
+
*/
|
|
2174
|
+
placement: {
|
|
2175
|
+
type: String,
|
|
2176
|
+
default: "auto"
|
|
2177
|
+
/* auto */
|
|
2178
|
+
},
|
|
2179
|
+
/**
|
|
2180
|
+
* 可选,是否只读
|
|
2181
|
+
* 默认为`false`
|
|
2182
|
+
*/
|
|
2183
|
+
readonly: { default: !1, type: Boolean },
|
|
2184
|
+
/**
|
|
2185
|
+
* 远端数据源信息
|
|
2186
|
+
*/
|
|
2187
|
+
remote: { default: null, type: Object },
|
|
2188
|
+
/**
|
|
2189
|
+
* 可选,是否支持远端过滤
|
|
2190
|
+
* 默认`false`
|
|
2191
|
+
*/
|
|
2192
|
+
remoteSearch: { default: !1, type: Boolean },
|
|
2193
|
+
/**
|
|
2194
|
+
* 可选,分隔符
|
|
2195
|
+
* 默认`,`
|
|
2196
|
+
*/
|
|
2197
|
+
separator: { default: ",", type: String },
|
|
2198
|
+
/**
|
|
2199
|
+
* tabIndex
|
|
2200
|
+
*/
|
|
2201
|
+
tabIndex: { type: Number, default: -1 },
|
|
2202
|
+
/**
|
|
2203
|
+
* 可选,数据源显示字段
|
|
2204
|
+
* 默认为`name`
|
|
2205
|
+
*/
|
|
2206
|
+
textField: { default: "name", type: String },
|
|
2207
|
+
/**
|
|
2208
|
+
* 可选,数据源的title
|
|
2209
|
+
* 默认为`name`
|
|
2210
|
+
*/
|
|
2211
|
+
titleField: { default: "name", type: String },
|
|
2212
|
+
/**
|
|
2213
|
+
* 可选,数据源值字段
|
|
2214
|
+
* 默认为`id`
|
|
2215
|
+
*/
|
|
2216
|
+
valueField: { default: "id", type: String },
|
|
2217
|
+
/**
|
|
2218
|
+
* 可选,启用多选下,下拉列表值在输入框中的展示方式
|
|
2219
|
+
* 支持text | tag
|
|
2220
|
+
* 因为ButtonEdit内部处理类型只有在批量的情况下才会有展示类型区分
|
|
2221
|
+
*/
|
|
2222
|
+
viewType: { default: "tag", type: String },
|
|
2223
|
+
/**
|
|
2224
|
+
* 值变化事件
|
|
2225
|
+
*/
|
|
2226
|
+
change: { type: Function, default: () => {
|
|
2227
|
+
} },
|
|
2228
|
+
/**
|
|
2229
|
+
* 作为内嵌编辑器被创建后默认获得焦点
|
|
2230
|
+
*/
|
|
2231
|
+
focusOnCreated: { type: Boolean, default: !1 },
|
|
2232
|
+
/**
|
|
2233
|
+
* 作为内嵌编辑器被创建后默认选中文本
|
|
2234
|
+
*/
|
|
2235
|
+
selectOnCreated: { type: Boolean, default: !1 },
|
|
2236
|
+
/**
|
|
2237
|
+
* 此属性废弃
|
|
2238
|
+
*/
|
|
2239
|
+
autoHeight: { type: Boolean, default: !0 },
|
|
2240
|
+
/**
|
|
2241
|
+
* 打开前
|
|
2242
|
+
*/
|
|
2243
|
+
beforeOpen: { type: Function, default: null },
|
|
2244
|
+
load: { type: Function },
|
|
2245
|
+
searchOption: {
|
|
2246
|
+
type: [Boolean, Function],
|
|
2247
|
+
default: !1
|
|
2248
|
+
},
|
|
2249
|
+
// 搜索启用高亮
|
|
2250
|
+
enableHighlightSearch: { type: Boolean, default: !0 },
|
|
2251
|
+
minPanelWidth: { type: Number, default: 160 },
|
|
2252
|
+
popupOnClick: { type: Boolean, default: !0 }
|
|
2253
|
+
};
|
|
2254
|
+
Object.assign({}, ge, {
|
|
2255
|
+
readonly: {}
|
|
2256
|
+
});
|
|
2257
|
+
Fe(ge, Pe, Ee, Re);
|
|
2258
|
+
const Je = Ft(
|
|
2259
|
+
ge,
|
|
2260
|
+
Pe,
|
|
2261
|
+
Ee,
|
|
2262
|
+
Re
|
|
2263
|
+
), Rl = Pl(), Vl = {
|
|
2264
|
+
dataSource: { type: Array, default: [] },
|
|
2265
|
+
enableSearch: { type: Boolean, default: !1 },
|
|
2266
|
+
idField: { type: String, default: "id" },
|
|
2267
|
+
multiSelect: { type: Boolean, default: !1 },
|
|
2268
|
+
selectedValues: { type: String, default: "" },
|
|
2269
|
+
separator: { type: String, default: "," },
|
|
2270
|
+
textField: { type: String, default: "name" },
|
|
2271
|
+
titleField: { type: String, default: "name" },
|
|
2272
|
+
width: { type: Number },
|
|
2273
|
+
maxHeight: { type: Number },
|
|
2274
|
+
valueField: { type: String, default: "id" },
|
|
2275
|
+
/** 值变化事件 */
|
|
2276
|
+
onSelectionChange: { type: Function, default: () => {
|
|
2277
|
+
} },
|
|
2278
|
+
searchOption: {
|
|
2279
|
+
type: [Boolean, Function],
|
|
2280
|
+
default: !1
|
|
2281
|
+
},
|
|
2282
|
+
// 搜索启用高亮
|
|
2283
|
+
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
2284
|
+
}, Ll = /* @__PURE__ */ K({
|
|
2285
|
+
name: "FComboListContainer",
|
|
2286
|
+
props: Vl,
|
|
2287
|
+
emits: ["selectionChange"],
|
|
2288
|
+
setup(e, t) {
|
|
2289
|
+
const l = s(), n = s(e.dataSource), a = s([]), o = s(e.separator), r = s(e.width), u = s(e.maxHeight), c = S(() => e.multiSelect), m = s(e.multiSelect ? String(e.selectedValues).split(o.value) : [e.selectedValues]), C = S(() => ({
|
|
2290
|
+
enableSelectRow: !0,
|
|
2291
|
+
multiSelect: e.multiSelect,
|
|
2292
|
+
multiSelectMode: "OnCheckAndClick",
|
|
2293
|
+
showCheckbox: c.value,
|
|
2294
|
+
showSelectAll: !1,
|
|
2295
|
+
showSelection: !0
|
|
2296
|
+
}));
|
|
2297
|
+
A(e.dataSource, () => {
|
|
2298
|
+
n.value = e.dataSource;
|
|
2299
|
+
}), S(() => e.enableSearch ? "SearchBar" : "ContentHeader");
|
|
2300
|
+
const h = S(() => {
|
|
2301
|
+
const f = {};
|
|
2302
|
+
return r.value !== void 0 && (f.width = `${r.value}px`), u.value !== void 0 && u.value > 0 && (f.maxHeight = `${u.value}px`), f;
|
|
2303
|
+
});
|
|
2304
|
+
function v(f) {
|
|
2305
|
+
l.value.search(f);
|
|
2306
|
+
}
|
|
2307
|
+
function y(f) {
|
|
2308
|
+
a.value = f.map((p) => Object.assign({}, p)), m.value = f.map((p) => p[e.idField]), t.emit("selectionChange", a.value);
|
|
2309
|
+
}
|
|
2310
|
+
function d(f) {
|
|
2311
|
+
if (e.enableHighlightSearch)
|
|
2312
|
+
return;
|
|
2313
|
+
let p = [];
|
|
2314
|
+
const {
|
|
2315
|
+
searchOption: b
|
|
2316
|
+
} = e;
|
|
2317
|
+
typeof b == "function" ? p = n.value.filter((F) => b(f, F)) : p = n.value.filter((F) => F[e.valueField].indexOf(f) > -1 || F[e.textField].indexOf(f) > -1), l.value.updateDataSource(p);
|
|
2318
|
+
}
|
|
2319
|
+
A([() => e.selectedValues], ([f]) => {
|
|
2320
|
+
e.multiSelect ? m.value = f.split(o.value) : m.value = [f];
|
|
2321
|
+
});
|
|
2322
|
+
function g(f) {
|
|
2323
|
+
l.value.activeRowById(f);
|
|
2324
|
+
}
|
|
2325
|
+
return le(() => {
|
|
2326
|
+
var f, p;
|
|
2327
|
+
if (!e.multiSelect) {
|
|
2328
|
+
const b = (f = m.value) == null ? void 0 : f[0];
|
|
2329
|
+
let F = b;
|
|
2330
|
+
const P = n.value.map((M) => M[e.valueField || e.idField]);
|
|
2331
|
+
if (!zt(b) && P.includes(b)) {
|
|
2332
|
+
const M = typeof b, B = typeof ((p = n.value[0]) == null ? void 0 : p[e.valueField || e.idField]);
|
|
2333
|
+
B === "number" && M !== B && (F = Number(b)), B === "boolean" && M !== B && (F = b === "true" ? !0 : b === "false" ? !1 : b), g(F);
|
|
2334
|
+
}
|
|
2335
|
+
}
|
|
2336
|
+
}), t.expose({
|
|
2337
|
+
search: v,
|
|
2338
|
+
activeRowById: g
|
|
2339
|
+
}), () => i("div", {
|
|
2340
|
+
class: "f-combo-list-container",
|
|
2341
|
+
style: h.value
|
|
2342
|
+
}, [i($t, {
|
|
2343
|
+
ref: l,
|
|
2344
|
+
size: "small",
|
|
2345
|
+
itemClass: "f-combo-list-item",
|
|
2346
|
+
itemContentClass: "text-truncate",
|
|
2347
|
+
header: "ContentHeader",
|
|
2348
|
+
headerClass: "f-combo-list-search-box",
|
|
2349
|
+
data: n.value,
|
|
2350
|
+
idField: e.idField,
|
|
2351
|
+
textField: e.textField,
|
|
2352
|
+
titleField: e.titleField,
|
|
2353
|
+
multiSelect: e.multiSelect,
|
|
2354
|
+
selection: C.value,
|
|
2355
|
+
enableHighlightSearch: e.enableHighlightSearch,
|
|
2356
|
+
selectionValues: m.value,
|
|
2357
|
+
onSelectionUpdate: y,
|
|
2358
|
+
onAfterSearch: d
|
|
2359
|
+
}, null)]);
|
|
2360
|
+
}
|
|
2361
|
+
});
|
|
2362
|
+
function Hl(e) {
|
|
2363
|
+
const t = s(""), l = s(e.modelValue), n = s(e.data || []), a = s(e.editable);
|
|
2364
|
+
function o(g) {
|
|
2365
|
+
const f = e.multiSelect ? String(g).split(e.separator) : [String(g)], p = f.map((P) => [P, !0]), b = new Map(p);
|
|
2366
|
+
return n.value.filter((P) => b.has(String(P[e.valueField]))).sort((P, M) => {
|
|
2367
|
+
const B = f.indexOf(P[e.valueField]), x = f.indexOf(M[e.valueField]);
|
|
2368
|
+
return B - x;
|
|
2369
|
+
});
|
|
2370
|
+
}
|
|
2371
|
+
function r(g) {
|
|
2372
|
+
const f = o(g).map((p) => p[e.textField]).join(e.separator);
|
|
2373
|
+
t.value = a.value ? f || g : f;
|
|
2374
|
+
}
|
|
2375
|
+
function u(g) {
|
|
2376
|
+
if (e.multiSelect) {
|
|
2377
|
+
const f = g.split(e.separator).map((b) => [b, !0]), p = new Map(f);
|
|
2378
|
+
return n.value.filter((b) => p.has(b[e.textField]));
|
|
2379
|
+
}
|
|
2380
|
+
return n.value.filter((f) => "" + f[e.textField] === g);
|
|
2381
|
+
}
|
|
2382
|
+
function c(g) {
|
|
2383
|
+
const f = {};
|
|
2384
|
+
return f[e.idField] = g, f[e.textField] = g, [f];
|
|
2385
|
+
}
|
|
2386
|
+
function m(g) {
|
|
2387
|
+
let f = u(g);
|
|
2388
|
+
const p = f && f.length > 0;
|
|
2389
|
+
return a.value && !p && (f = c(g)), f;
|
|
2390
|
+
}
|
|
2391
|
+
function C() {
|
|
2392
|
+
const { url: g, method: f = "GET", headers: p = { "Content-Type": "application/json;charset=utf-8;" }, body: b = null } = e.remote;
|
|
2393
|
+
if (!g)
|
|
2394
|
+
return;
|
|
2395
|
+
const F = f.toLowerCase() === "get" ? { method: f, headers: p } : { method: f, headers: p, body: b };
|
|
2396
|
+
let P = !1;
|
|
2397
|
+
fetch(new Request(g, F)).then((M) => {
|
|
2398
|
+
var x, E;
|
|
2399
|
+
if (M.status === 200)
|
|
2400
|
+
return P = !!((E = (x = M.headers) == null ? void 0 : x.get("content-type")) != null && E.includes("application/json")), P ? M.text() : M.json();
|
|
2401
|
+
throw M.status === 405 ? new Error(_.getLocaleValue("comboList.remoteError")) : new Error(M.statusText);
|
|
2402
|
+
}).then((M) => {
|
|
2403
|
+
M.length && (n.value = P ? JSON.parse(M) : M);
|
|
2404
|
+
}).catch((M) => {
|
|
2405
|
+
console.warn(M);
|
|
2406
|
+
});
|
|
2407
|
+
}
|
|
2408
|
+
e.remote && (e.load ? e.load().then((g) => {
|
|
2409
|
+
n.value = g;
|
|
2410
|
+
}).catch((g) => {
|
|
2411
|
+
console.log(g);
|
|
2412
|
+
}) : C()), A(() => e.data, () => {
|
|
2413
|
+
n.value = e.data;
|
|
2414
|
+
}), A([n], ([g]) => {
|
|
2415
|
+
if (e.modelValue != null) {
|
|
2416
|
+
const f = g.find((p) => p[e.valueField] === e.modelValue);
|
|
2417
|
+
f && (t.value = f[e.textField]);
|
|
2418
|
+
}
|
|
2419
|
+
}), A(() => e.modelValue, (g) => {
|
|
2420
|
+
l.value = g, r(g);
|
|
2421
|
+
});
|
|
2422
|
+
function h(g) {
|
|
2423
|
+
n.value = g;
|
|
2424
|
+
}
|
|
2425
|
+
function v() {
|
|
2426
|
+
return n.value;
|
|
2427
|
+
}
|
|
2428
|
+
function y() {
|
|
2429
|
+
return t.value;
|
|
2430
|
+
}
|
|
2431
|
+
function d() {
|
|
2432
|
+
const g = typeof e.beforeOpen == "function";
|
|
2433
|
+
return !e.beforeOpen || !g ? Promise.resolve(!0) : Promise.resolve().then(() => e.beforeOpen({ instance: { updateDataSource: h, getData: v, getDisplayText: y } })).then((f) => typeof (f == null ? void 0 : f.canOpen) == "boolean" ? f == null ? void 0 : f.canOpen : !0);
|
|
2434
|
+
}
|
|
2435
|
+
return r(e.modelValue), {
|
|
2436
|
+
dataSource: n,
|
|
2437
|
+
displayText: t,
|
|
2438
|
+
editable: a,
|
|
2439
|
+
modelValue: l,
|
|
2440
|
+
beforeOpenList: d,
|
|
2441
|
+
getItemsByDisplayText: u,
|
|
2442
|
+
getItemsByValue: o,
|
|
2443
|
+
getSelectedItemsByDisplayText: m
|
|
2444
|
+
};
|
|
2445
|
+
}
|
|
2446
|
+
const re = /* @__PURE__ */ K({
|
|
2447
|
+
name: "FComboList",
|
|
2448
|
+
props: ge,
|
|
2449
|
+
emits: ["clear", "update:modelValue", "change", "input"],
|
|
2450
|
+
setup(e, t) {
|
|
2451
|
+
const l = s(), n = s(), a = s(e.disabled || e.readonly), o = s(e.enableClear), r = s(e.enableSearch), u = s(e.readonly), {
|
|
2452
|
+
dataSource: c,
|
|
2453
|
+
displayText: m,
|
|
2454
|
+
editable: C,
|
|
2455
|
+
modelValue: h,
|
|
2456
|
+
getItemsByDisplayText: v,
|
|
2457
|
+
getItemsByValue: y,
|
|
2458
|
+
beforeOpenList: d
|
|
2459
|
+
} = Hl(e), g = s(e.dropDownIcon);
|
|
2460
|
+
g.value === '<span class="f-icon f-icon-arrow-chevron-down"></span>' && (g.value = '<span id="' + e.id + '-icon-dropdown" class="f-icon f-icon-arrow-chevron-down"></span>');
|
|
2461
|
+
const f = S(() => e.multiSelect), p = S(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
|
|
2462
|
+
function b() {
|
|
2463
|
+
!f.value && n.value && n.value.hidePopup();
|
|
2464
|
+
}
|
|
2465
|
+
function F(V) {
|
|
2466
|
+
m.value = V.map((W) => W[e.textField]).join(e.separator) || h.value;
|
|
2467
|
+
let R = "";
|
|
2468
|
+
V.length === 1 ? R = V[0][e.valueField] : R = V.map((W) => W[e.valueField]).join(e.separator), h.value !== R && (h.value = R, t.emit("update:modelValue", h.value), t.emit("change", V, h.value));
|
|
2469
|
+
}
|
|
2470
|
+
function P() {
|
|
2471
|
+
const V = y(h.value);
|
|
2472
|
+
F(V);
|
|
2473
|
+
}
|
|
2474
|
+
function M() {
|
|
2475
|
+
u.value || m.value;
|
|
2476
|
+
}
|
|
2477
|
+
function B(V) {
|
|
2478
|
+
var R;
|
|
2479
|
+
h.value = "", (R = l.value) == null || R.activeRowById(""), t.emit("clear");
|
|
2480
|
+
}
|
|
2481
|
+
function x(V) {
|
|
2482
|
+
var R, W;
|
|
2483
|
+
e.enableSearch && e.enableHighlightSearch && ((R = l.value) == null || R.search(V)), (W = l.value) == null || W.activeRowById(V), t.emit("change", [h.value], h.value);
|
|
2484
|
+
}
|
|
2485
|
+
function E(V) {
|
|
2486
|
+
if (e.multiSelect) {
|
|
2487
|
+
const R = v(V);
|
|
2488
|
+
e.viewType;
|
|
2489
|
+
const k = R.map((T) => T[e.idField || e.valueField]).join(e.separator);
|
|
2490
|
+
h.value !== k && (h.value = k, t.emit("update:modelValue", h.value), t.emit("change", R, h.value));
|
|
2491
|
+
} else V !== h.value && (h.value = V, t.emit("update:modelValue", h.value), t.emit("change", [], V));
|
|
2492
|
+
}
|
|
2493
|
+
function j() {
|
|
2494
|
+
return m.value;
|
|
2495
|
+
}
|
|
2496
|
+
function $(V) {
|
|
2497
|
+
const {
|
|
2498
|
+
value: R
|
|
2499
|
+
} = V.target;
|
|
2500
|
+
x(R), t.emit("input", R);
|
|
2501
|
+
}
|
|
2502
|
+
function I() {
|
|
2503
|
+
n.value.hidePopup();
|
|
2504
|
+
}
|
|
2505
|
+
function O(V) {
|
|
2506
|
+
c.value = V;
|
|
2507
|
+
}
|
|
2508
|
+
function z() {
|
|
2509
|
+
return c.value;
|
|
2510
|
+
}
|
|
2511
|
+
const D = {
|
|
2512
|
+
getDisplayText: j,
|
|
2513
|
+
hidePopup: I,
|
|
2514
|
+
updateDataSource: O,
|
|
2515
|
+
getData: z
|
|
2516
|
+
};
|
|
2517
|
+
return t.expose(D), A([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([V, R, W, k, T]) => {
|
|
2518
|
+
a.value = V, C.value = R, o.value = W, r.value = k, u.value = T;
|
|
2519
|
+
}), () => i(De, {
|
|
2520
|
+
ref: n,
|
|
2521
|
+
id: e.id,
|
|
2522
|
+
disable: a.value,
|
|
2523
|
+
readonly: u.value,
|
|
2524
|
+
forcePlaceholder: e.forcePlaceholder,
|
|
2525
|
+
editable: C.value,
|
|
2526
|
+
buttonContent: g.value,
|
|
2527
|
+
placeholder: e.placeholder === "请选择" ? _.getLocaleValue("comboList.placeholder") : e.placeholder,
|
|
2528
|
+
enableClear: o.value,
|
|
2529
|
+
maxLength: e.maxLength,
|
|
2530
|
+
tabIndex: e.tabIndex,
|
|
2531
|
+
enableTitle: e.enableTitle,
|
|
2532
|
+
multiSelect: e.multiSelect,
|
|
2533
|
+
inputType: e.multiSelect ? e.viewType : "text",
|
|
2534
|
+
modelValue: m.value,
|
|
2535
|
+
"onUpdate:modelValue": (V) => m.value = V,
|
|
2536
|
+
focusOnCreated: e.focusOnCreated,
|
|
2537
|
+
selectOnCreated: e.selectOnCreated,
|
|
2538
|
+
onClear: B,
|
|
2539
|
+
onClick: M,
|
|
2540
|
+
onChange: E,
|
|
2541
|
+
onBlur: P,
|
|
2542
|
+
onInput: $,
|
|
2543
|
+
beforeOpen: d,
|
|
2544
|
+
placement: e.placement,
|
|
2545
|
+
popupMinWidth: e.minPanelWidth,
|
|
2546
|
+
popupClass: "f-combo-list-wrapper",
|
|
2547
|
+
popupOnClick: e.popupOnClick,
|
|
2548
|
+
limitContentBySpace: !0
|
|
2549
|
+
}, {
|
|
2550
|
+
default: () => [i(Ll, {
|
|
2551
|
+
ref: l,
|
|
2552
|
+
idField: e.idField,
|
|
2553
|
+
valueField: e.valueField,
|
|
2554
|
+
textField: e.textField,
|
|
2555
|
+
titleField: e.titleField,
|
|
2556
|
+
dataSource: c.value,
|
|
2557
|
+
selectedValues: h.value,
|
|
2558
|
+
separator: e.separator,
|
|
2559
|
+
multiSelect: e.multiSelect,
|
|
2560
|
+
enableSearch: r.value,
|
|
2561
|
+
maxHeight: e.maxHeight,
|
|
2562
|
+
enableHighlightSearch: e.enableHighlightSearch,
|
|
2563
|
+
width: e.fitEditor ? p.value : void 0,
|
|
2564
|
+
onSelectionChange: (V) => {
|
|
2565
|
+
F(V), b();
|
|
2566
|
+
}
|
|
2567
|
+
}, null)]
|
|
2568
|
+
});
|
|
2569
|
+
}
|
|
2570
|
+
}), Nl = Object.assign({}, Ue, {
|
|
2571
|
+
readonly: {}
|
|
2572
|
+
});
|
|
2573
|
+
Fe(Ue, Pe, Ee, Re);
|
|
2574
|
+
const Ae = {
|
|
2575
|
+
convertFrom: (e, t) => (e.editor.remote || {})[t],
|
|
2576
|
+
convertTo: (e, t, l) => {
|
|
2577
|
+
e.editor.remote = e.editor.remote || {}, e.editor.remote[t] = l;
|
|
2578
|
+
}
|
|
2579
|
+
};
|
|
2580
|
+
class jl extends jt {
|
|
2581
|
+
constructor(t, l) {
|
|
2582
|
+
super(t, l);
|
|
2583
|
+
}
|
|
2584
|
+
getCommonEditorProperties(t) {
|
|
2585
|
+
var l, n, a;
|
|
2586
|
+
return {
|
|
2587
|
+
viewType: {
|
|
2588
|
+
visible: !!((l = t.editor) != null && l.multiSelect),
|
|
2589
|
+
description: "数据展示类型,有标签和文本两种方式",
|
|
2590
|
+
title: "数据展示类型",
|
|
2591
|
+
type: "enum",
|
|
2592
|
+
editor: {
|
|
2593
|
+
data: [
|
|
2594
|
+
{ id: "tag", name: "标签" },
|
|
2595
|
+
{ id: "text", name: "文本" }
|
|
2596
|
+
]
|
|
2597
|
+
},
|
|
2598
|
+
refreshPanelAfterChanged: !0
|
|
2599
|
+
},
|
|
2600
|
+
separator: {
|
|
2601
|
+
visible: !!((n = t.editor) != null && n.multiSelect) && ((a = t.editor) == null ? void 0 : a.viewType) === "text",
|
|
2602
|
+
description: "下拉列表启用多选且数据展示类型为文本时的分隔符",
|
|
2603
|
+
title: "分隔符",
|
|
2604
|
+
type: "enum",
|
|
2605
|
+
editor: {
|
|
2606
|
+
data: [
|
|
2607
|
+
{ id: ",", name: "逗号(,)" },
|
|
2608
|
+
{ id: "#", name: "井号(#)" },
|
|
2609
|
+
{ id: ".", name: "句号(.)" },
|
|
2610
|
+
{ id: "|", name: "竖线(|)" }
|
|
2611
|
+
]
|
|
2612
|
+
}
|
|
2613
|
+
},
|
|
2614
|
+
editable: {
|
|
2615
|
+
description: "",
|
|
2616
|
+
title: "允许编辑",
|
|
2617
|
+
type: "boolean",
|
|
2618
|
+
refreshPanelAfterChanged: !0,
|
|
2619
|
+
readonly: !0
|
|
2620
|
+
// readonly: !!propertyData.editor?.multiSelect && (propertyData.editor?.viewType === 'tag' || !propertyData.editor!.viewType)
|
|
2621
|
+
}
|
|
2622
|
+
// enableHighlightSearch: {
|
|
2623
|
+
// visible: !!propertyData.editor?.editable,
|
|
2624
|
+
// description: "编辑状态下启用高亮搜索",
|
|
2625
|
+
// title: "启用高亮搜索",
|
|
2626
|
+
// type: "boolean"
|
|
2627
|
+
// },
|
|
2628
|
+
};
|
|
2629
|
+
}
|
|
2630
|
+
getEditorProperties(t) {
|
|
2631
|
+
var o, r;
|
|
2632
|
+
const l = this;
|
|
2633
|
+
let n = "";
|
|
2634
|
+
if (((o = t == null ? void 0 : t.binding) == null ? void 0 : o.type) === "Form") {
|
|
2635
|
+
const u = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
|
|
2636
|
+
(r = u == null ? void 0 : u.schemaField) != null && r.type && (n = u.schemaField.type.$type);
|
|
2637
|
+
}
|
|
2638
|
+
return l.getComponentConfig(t, { type: "combo-list" }, {
|
|
2639
|
+
// enableSearch: {
|
|
2640
|
+
// description: "编辑状态下启用搜索",
|
|
2641
|
+
// title: "允许编辑",
|
|
2642
|
+
// type: "boolean",
|
|
2643
|
+
// },
|
|
2644
|
+
enableClear: {
|
|
2645
|
+
description: "",
|
|
2646
|
+
title: "启用清空",
|
|
2647
|
+
type: "boolean"
|
|
2648
|
+
},
|
|
2649
|
+
dataSourceType: {
|
|
2650
|
+
description: "",
|
|
2651
|
+
title: "数据源类型",
|
|
2652
|
+
type: "enum",
|
|
2653
|
+
editor: {
|
|
2654
|
+
default: "static",
|
|
2655
|
+
data: [
|
|
2656
|
+
{ id: "static", name: "静态" },
|
|
2657
|
+
{ id: "dynamic", name: "动态" }
|
|
2658
|
+
]
|
|
2659
|
+
},
|
|
2660
|
+
refreshPanelAfterChanged: !0
|
|
2661
|
+
},
|
|
2662
|
+
data: {
|
|
2663
|
+
description: "",
|
|
2664
|
+
title: "数据",
|
|
2665
|
+
type: "array",
|
|
2666
|
+
visible: !t.editor.dataSourceType || t.editor.dataSourceType === "static",
|
|
2667
|
+
...l.getItemCollectionEditor(t, t.editor.valueField, t.editor.textField),
|
|
2668
|
+
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
2669
|
+
refreshPanelAfterChanged: !0
|
|
2670
|
+
},
|
|
2671
|
+
url: {
|
|
2672
|
+
visible: t.editor.dataSourceType === "dynamic",
|
|
2673
|
+
$converter: Ae,
|
|
2674
|
+
description: "",
|
|
2675
|
+
title: "服务端API",
|
|
2676
|
+
type: "string"
|
|
2677
|
+
},
|
|
2678
|
+
// method: {
|
|
2679
|
+
// visible: propertyData.editor.dataSourceType === "dynamic",
|
|
2680
|
+
// $converter: comboListRemoteConverter,
|
|
2681
|
+
// description: "",
|
|
2682
|
+
// title: "服务端API类型",
|
|
2683
|
+
// type: "enum",
|
|
2684
|
+
// editor: {
|
|
2685
|
+
// default: "GET",
|
|
2686
|
+
// data: [
|
|
2687
|
+
// { id: "GET", name: "GET" },
|
|
2688
|
+
// { id: "PUT", name: "PUT" },
|
|
2689
|
+
// { id: "POST", name: "POST" }
|
|
2690
|
+
// ]
|
|
2691
|
+
// },
|
|
2692
|
+
// },
|
|
2693
|
+
body: {
|
|
2694
|
+
visible: !1,
|
|
2695
|
+
$converter: Ae,
|
|
2696
|
+
description: "",
|
|
2697
|
+
title: "服务端API参数",
|
|
2698
|
+
type: "string"
|
|
2699
|
+
},
|
|
2700
|
+
textField: {
|
|
2701
|
+
description: "",
|
|
2702
|
+
title: "数据源显示字段",
|
|
2703
|
+
type: "string",
|
|
2704
|
+
readonly: t.editor.dataSourceType !== "dynamic"
|
|
2705
|
+
},
|
|
2706
|
+
valueField: {
|
|
2707
|
+
description: "",
|
|
2708
|
+
title: "数据源值字段",
|
|
2709
|
+
type: "string",
|
|
2710
|
+
readonly: t.editor.dataSourceType !== "dynamic"
|
|
2711
|
+
},
|
|
2712
|
+
multiSelect: {
|
|
2713
|
+
description: "",
|
|
2714
|
+
title: "启用多选",
|
|
2715
|
+
visible: !n || n === "StringType",
|
|
2716
|
+
type: "boolean",
|
|
2717
|
+
refreshPanelAfterChanged: !0
|
|
2718
|
+
},
|
|
2719
|
+
maxLength: {
|
|
2720
|
+
description: "",
|
|
2721
|
+
title: "最大输入长度",
|
|
2722
|
+
type: "number",
|
|
2723
|
+
editor: {
|
|
2724
|
+
nullable: !0,
|
|
2725
|
+
min: 0,
|
|
2726
|
+
useThousands: !1,
|
|
2727
|
+
needValid: !0
|
|
2728
|
+
}
|
|
2729
|
+
},
|
|
2730
|
+
...this.getCommonEditorProperties(t)
|
|
2731
|
+
}, (u, c) => {
|
|
2732
|
+
if (!u || !c.editor)
|
|
2733
|
+
return;
|
|
2734
|
+
const m = this;
|
|
2735
|
+
switch (u.propertyID) {
|
|
2736
|
+
case "dataSourceType": {
|
|
2737
|
+
u.propertyValue === "static" ? (c.editor.valueField = "value", c.editor.textField = "name", c.editor.remote = null) : u.propertyValue === "dynamic" && (c.editor.remote = { method: "GET" }, c.editor.valueField = "value", c.editor.textField = "name");
|
|
2738
|
+
break;
|
|
2739
|
+
}
|
|
2740
|
+
case "data": {
|
|
2741
|
+
!m.checkEnumDataReadonly(c) && c.formatter && (c.formatter.data = [...u.propertyValue]);
|
|
2742
|
+
break;
|
|
2743
|
+
}
|
|
2744
|
+
case "viewType":
|
|
2745
|
+
u.propertyValue === "tag" && (c.editor.editable = !1);
|
|
2746
|
+
}
|
|
2747
|
+
});
|
|
2748
|
+
}
|
|
2749
|
+
getGridFieldEdtiorProperties(t, l) {
|
|
2750
|
+
var r, u, c, m, C, h;
|
|
2751
|
+
const n = this;
|
|
2752
|
+
let a = "";
|
|
2753
|
+
if (((r = t == null ? void 0 : t.binding) == null ? void 0 : r.type) === "Form") {
|
|
2754
|
+
const v = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
|
|
2755
|
+
(u = v == null ? void 0 : v.schemaField) != null && u.type && (a = v.schemaField.type.$type);
|
|
2756
|
+
}
|
|
2757
|
+
return n.getComponentConfig(t, { type: "combo-list" }, {
|
|
2758
|
+
// editable: {
|
|
2759
|
+
// description: "",
|
|
2760
|
+
// title: "允许编辑",
|
|
2761
|
+
// type: "boolean",
|
|
2762
|
+
// readonly: propertyData.editor?.type === 'combo-list'
|
|
2763
|
+
// },
|
|
2764
|
+
enableClear: {
|
|
2765
|
+
description: "",
|
|
2766
|
+
title: "启用清空",
|
|
2767
|
+
type: "boolean"
|
|
2768
|
+
},
|
|
2769
|
+
// dataSourceType: {
|
|
2770
|
+
// description: "",
|
|
2771
|
+
// title: "数据源类型",
|
|
2772
|
+
// type: "enum",
|
|
2773
|
+
// editor: {
|
|
2774
|
+
// default: "static",
|
|
2775
|
+
// data: [
|
|
2776
|
+
// { id: "static", name: "静态" },
|
|
2777
|
+
// { id: "dynamic", name: "动态" }
|
|
2778
|
+
// ]
|
|
2779
|
+
// },
|
|
2780
|
+
// refreshPanelAfterChanged: true
|
|
2781
|
+
// },
|
|
2782
|
+
data: {
|
|
2783
|
+
description: "",
|
|
2784
|
+
title: "数据",
|
|
2785
|
+
type: "array",
|
|
2786
|
+
visible: !((c = t.editor) != null && c.dataSourceType) || ((m = t.editor) == null ? void 0 : m.dataSourceType) === "static",
|
|
2787
|
+
...n.getItemCollectionEditor(t, (C = t.editor) == null ? void 0 : C.valueField, (h = t.editor) == null ? void 0 : h.textField),
|
|
2788
|
+
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
2789
|
+
refreshPanelAfterChanged: !0
|
|
2790
|
+
},
|
|
2791
|
+
textField: {
|
|
2792
|
+
description: "",
|
|
2793
|
+
title: "数据源显示字段",
|
|
2794
|
+
type: "string",
|
|
2795
|
+
readonly: !0
|
|
2796
|
+
},
|
|
2797
|
+
valueField: {
|
|
2798
|
+
description: "",
|
|
2799
|
+
title: "数据源值字段",
|
|
2800
|
+
type: "string",
|
|
2801
|
+
readonly: !0
|
|
2802
|
+
},
|
|
2803
|
+
multiSelect: {
|
|
2804
|
+
description: "",
|
|
2805
|
+
title: "启用多选",
|
|
2806
|
+
visible: a === "StringType",
|
|
2807
|
+
type: "boolean",
|
|
2808
|
+
refreshPanelAfterChanged: !0
|
|
2809
|
+
},
|
|
2810
|
+
maxLength: {
|
|
2811
|
+
description: "",
|
|
2812
|
+
title: "最大输入长度",
|
|
2813
|
+
type: "number",
|
|
2814
|
+
editor: {
|
|
2815
|
+
nullable: !0,
|
|
2816
|
+
min: 0,
|
|
2817
|
+
useThousands: !1,
|
|
2818
|
+
needValid: !0
|
|
2819
|
+
}
|
|
2820
|
+
},
|
|
2821
|
+
...this.getCommonEditorProperties(t)
|
|
2822
|
+
}, (v, y) => {
|
|
2823
|
+
if (!v || !y.editor)
|
|
2824
|
+
return;
|
|
2825
|
+
const d = this;
|
|
2826
|
+
switch (v.propertyID) {
|
|
2827
|
+
case "dataSourceType": {
|
|
2828
|
+
v.propertyValue === "static" ? (y.editor.valueField = "value", y.editor.textField = "name", y.editor.remote = null) : v.propertyValue === "dynamic" && (y.editor.remote = { method: "GET" }, y.editor.valueField = "value", y.editor.textField = "name");
|
|
2829
|
+
break;
|
|
2830
|
+
}
|
|
2831
|
+
case "data": {
|
|
2832
|
+
!d.checkEnumDataReadonly(y) && y.formatter && (y.formatter.data = [...v.propertyValue]);
|
|
2833
|
+
break;
|
|
2834
|
+
}
|
|
2835
|
+
}
|
|
2836
|
+
});
|
|
2837
|
+
}
|
|
2838
|
+
setEditorPropertyRelates(t, l, n) {
|
|
2839
|
+
if (!t || !l.editor)
|
|
2840
|
+
return;
|
|
2841
|
+
const a = this;
|
|
2842
|
+
switch (t.propertyID) {
|
|
2843
|
+
case "dataSourceType": {
|
|
2844
|
+
t.propertyValue === "static" && (l.editor.valueField = "value", l.editor.textField = "name", l.editor.remote = {});
|
|
2845
|
+
break;
|
|
2846
|
+
}
|
|
2847
|
+
case "data": {
|
|
2848
|
+
!a.checkEnumDataReadonly(l) && l.formatter && (l.formatter.data = [...t.propertyValue]);
|
|
2849
|
+
break;
|
|
2850
|
+
}
|
|
2851
|
+
}
|
|
2852
|
+
}
|
|
2853
|
+
/**
|
|
2854
|
+
* 切换绑定属性
|
|
2855
|
+
*/
|
|
2856
|
+
changeBindingField(t, l, n) {
|
|
2857
|
+
var o;
|
|
2858
|
+
super.changeBindingField(t, l);
|
|
2859
|
+
const a = n;
|
|
2860
|
+
t.editor && ((o = a == null ? void 0 : a.type) == null ? void 0 : o.$type) === Nt.EnumType && (t.editor.data = a.type.enumValues || []);
|
|
2861
|
+
}
|
|
2862
|
+
/**
|
|
2863
|
+
* 组装输入类控件的交互面板:包含标签超链、绑定字段值变化前后事件等。
|
|
2864
|
+
* @param propertyData 属性值
|
|
2865
|
+
* @param viewModelId 视图模型id
|
|
2866
|
+
* @param showPosition 面板展示位置
|
|
2867
|
+
* @param customEvent 输入控件特有的事件配置
|
|
2868
|
+
*/
|
|
2869
|
+
getEventPropertyConfig(t, l = "card", n, a) {
|
|
2870
|
+
const o = this;
|
|
2871
|
+
let r = [
|
|
2872
|
+
{
|
|
2873
|
+
label: "onChange",
|
|
2874
|
+
name: "值变化事件"
|
|
2875
|
+
},
|
|
2876
|
+
// {
|
|
2877
|
+
// label: 'onClear',
|
|
2878
|
+
// name: '清空事件'
|
|
2879
|
+
// },
|
|
2880
|
+
{
|
|
2881
|
+
label: "beforeOpen",
|
|
2882
|
+
name: "下拉面板前事件"
|
|
2883
|
+
}
|
|
2884
|
+
];
|
|
2885
|
+
n && (r = r.concat(n)), this.appendFieldValueChangeEvents(t, r);
|
|
2886
|
+
const u = o.eventsEditorUtils.formProperties(t, o.viewModelId, r);
|
|
2887
|
+
return {
|
|
2888
|
+
title: "事件",
|
|
2889
|
+
hideTitle: !0,
|
|
2890
|
+
properties: o.createBaseEventProperty(u),
|
|
2891
|
+
tabId: "commands",
|
|
2892
|
+
tabName: "交互",
|
|
2893
|
+
setPropertyRelates(C, h) {
|
|
2894
|
+
const v = C.propertyValue;
|
|
2895
|
+
delete t[o.viewModelId], v && (v.setPropertyRelates = this.setPropertyRelates, o.eventsEditorUtils.saveRelatedParameters(t, o.viewModelId, v.events, v)), a && a(C, h, v);
|
|
2896
|
+
const y = o.designViewModelUtils.getDgViewModel(o.viewModelId);
|
|
2897
|
+
y && o.designViewModelField && y.changeField(o.designViewModelField.id, { valueChanging: t.fieldValueChanging, valueChanged: t.fieldValueChanged }), t.editor.beforeOpen !== t.beforeOpen && (t.editor.beforeOpen = t.beforeOpen), t.editor.onChange !== t.onChange && (t.editor.onChange = t.onChange), t.editor.onClear !== t.onClear && (t.editor.onClear = t.onClear);
|
|
2898
|
+
}
|
|
2899
|
+
};
|
|
2900
|
+
}
|
|
2901
|
+
}
|
|
2902
|
+
function Al(e, t) {
|
|
2903
|
+
const l = e.schema;
|
|
2904
|
+
function n(a, o) {
|
|
2905
|
+
return new jl(a, t).getPropertyConfig(l, o);
|
|
2906
|
+
}
|
|
2907
|
+
return {
|
|
2908
|
+
getPropsConfig: n
|
|
2909
|
+
};
|
|
2910
|
+
}
|
|
2911
|
+
const zl = /* @__PURE__ */ K({
|
|
2912
|
+
name: "FComboListDesign",
|
|
2913
|
+
props: Nl,
|
|
2914
|
+
emits: ["clear", "update:modelValue", "change"],
|
|
2915
|
+
setup(e, t) {
|
|
2916
|
+
const l = s(), n = oe("designer-host-service"), a = oe("design-item-context"), o = Al(a, n), r = Ut(l, a, o);
|
|
2917
|
+
return le(() => {
|
|
2918
|
+
l.value.componentInstance = r;
|
|
2919
|
+
}), t.expose(r.value), () => i(Dt, {
|
|
2920
|
+
ref: l,
|
|
2921
|
+
buttonContent: e.dropDownIcon,
|
|
2922
|
+
readonly: !0,
|
|
2923
|
+
editable: !1,
|
|
2924
|
+
forcePlaceholder: !0,
|
|
2925
|
+
placeholder: e.placeholder,
|
|
2926
|
+
enableClear: !0
|
|
2927
|
+
}, null);
|
|
2928
|
+
}
|
|
2929
|
+
});
|
|
2930
|
+
re.register = (e, t, l, n, a) => {
|
|
2931
|
+
e["combo-list"] = re, t["combo-list"] = Je(a), n["combo-list"] = { callbackResolver: Rl };
|
|
2932
|
+
};
|
|
2933
|
+
re.registerDesigner = (e, t, l, n) => {
|
|
2934
|
+
e["combo-list"] = zl, t["combo-list"] = Je(n);
|
|
2935
|
+
};
|
|
2936
|
+
Ie(re);
|
|
2937
|
+
Ie(Oe);
|
|
2938
|
+
var Ze = /* @__PURE__ */ ((e) => (e[e.Equal = 0] = "Equal", e[e.NotEqual = 1] = "NotEqual", e[e.Greater = 2] = "Greater", e[e.GreaterOrEqual = 3] = "GreaterOrEqual", e[e.Less = 4] = "Less", e[e.LessOrEqual = 5] = "LessOrEqual", e[e.Like = 6] = "Like", e[e.LikeStartWith = 7] = "LikeStartWith", e[e.LikeEndWith = 8] = "LikeEndWith", e[e.NotLike = 9] = "NotLike", e[e.NotLikeStartWith = 10] = "NotLikeStartWith", e[e.NotLikeEndWith = 11] = "NotLikeEndWith", e[e.Is = 12] = "Is", e[e.IsNot = 13] = "IsNot", e[e.In = 14] = "In", e[e.NotIn = 15] = "NotIn", e))(Ze || {}), se = /* @__PURE__ */ ((e) => (e[e.Empty = 0] = "Empty", e[e.And = 1] = "And", e[e.Or = 2] = "Or", e))(se || {}), ee = /* @__PURE__ */ ((e) => (e[e.Value = 0] = "Value", e[e.Expression = 1] = "Expression", e[e.Variable = 2] = "Variable", e))(ee || {});
|
|
2939
|
+
const Wl = (e) => ((e.raw.$type !== "SimpleField" || e.raw.selectable === !1) && (e.disabled = !0), e);
|
|
2940
|
+
function Qe(e) {
|
|
2941
|
+
const t = [
|
|
2942
|
+
{ value: "", label: " " },
|
|
2943
|
+
{ value: "(", label: "(" },
|
|
2944
|
+
{ value: "((", label: "((" },
|
|
2945
|
+
{ value: "(((", label: "(((" }
|
|
2946
|
+
], l = [
|
|
2947
|
+
{ value: "", label: " " },
|
|
2948
|
+
{ value: ")", label: ")" },
|
|
2949
|
+
{ value: "))", label: "))" },
|
|
2950
|
+
{ value: ")))", label: ")))" }
|
|
2951
|
+
], n = [
|
|
2952
|
+
{ label: "=", value: 0 },
|
|
2953
|
+
{ label: "<>", value: 1 },
|
|
2954
|
+
{ label: ">", value: 2 },
|
|
2955
|
+
{ label: ">=", value: 3 },
|
|
2956
|
+
{ label: "<", value: 4 },
|
|
2957
|
+
{ label: "<=", value: 5 },
|
|
2958
|
+
{ label: "like %...%", value: 6 },
|
|
2959
|
+
{ label: "like ...%", value: 7 },
|
|
2960
|
+
{ label: "like %...", value: 8 },
|
|
2961
|
+
{ label: "not like %...%", value: 9 },
|
|
2962
|
+
{ label: "not like ...%", value: 10 },
|
|
2963
|
+
{ label: "not like %...", value: 11 },
|
|
2964
|
+
{ label: "is", value: 12 },
|
|
2965
|
+
{ label: "is not", value: 13 },
|
|
2966
|
+
{ label: "in", value: 14 },
|
|
2967
|
+
{ label: "not in", value: 15 }
|
|
2968
|
+
], a = [
|
|
2969
|
+
{ label: " ", value: 0 },
|
|
2970
|
+
{ label: "并且", value: 1 },
|
|
2971
|
+
{ label: "或者", value: 2 }
|
|
2972
|
+
], o = [{ label: "值", value: e != null && e.singleValue ? ee.Value : ee.Variable }], r = { label: "表达式", value: ee.Expression }, u = e != null && e.enableExpression ? [...o, r] : o;
|
|
2973
|
+
return {
|
|
2974
|
+
leftBracketItems: t,
|
|
2975
|
+
righttBracketItems: l,
|
|
2976
|
+
compareOperators: n,
|
|
2977
|
+
relationItems: a,
|
|
2978
|
+
valueTypes: u,
|
|
2979
|
+
sortTypes: [
|
|
2980
|
+
{ label: "升序", value: "asc" },
|
|
2981
|
+
{ label: "降序", value: "desc" }
|
|
2982
|
+
]
|
|
2983
|
+
};
|
|
2984
|
+
}
|
|
2985
|
+
const $l = {
|
|
2986
|
+
/**
|
|
2987
|
+
* 组件标识
|
|
2988
|
+
*/
|
|
2989
|
+
id: { type: String },
|
|
2990
|
+
/**
|
|
2991
|
+
* 下拉数据源
|
|
2992
|
+
*/
|
|
2993
|
+
data: { type: Array, default: [] },
|
|
2994
|
+
/**
|
|
2995
|
+
* 可选,展示文本
|
|
2996
|
+
* 默认为空字符串
|
|
2997
|
+
*/
|
|
2998
|
+
displayText: { type: String, default: "" },
|
|
2999
|
+
/**
|
|
3000
|
+
* 可选,是否禁用
|
|
3001
|
+
* 默认为`false`
|
|
3002
|
+
*/
|
|
3003
|
+
disabled: { type: Boolean, default: !1 },
|
|
3004
|
+
/**
|
|
3005
|
+
* 可选,下拉图标
|
|
3006
|
+
* 默认为'<span class="f-icon f-icon-arrow-60-down"></span>'
|
|
3007
|
+
*/
|
|
3008
|
+
dropDownIcon: { type: String, default: '<span class="f-icon f-icon-arrow-chevron-down"></span>' },
|
|
3009
|
+
/**
|
|
3010
|
+
* 可选,是否可编辑
|
|
3011
|
+
* 默认`false`
|
|
3012
|
+
*/
|
|
3013
|
+
editable: { type: Boolean, default: !1 },
|
|
3014
|
+
/**
|
|
3015
|
+
* 可选,是否启用清空
|
|
3016
|
+
* 默认启用
|
|
3017
|
+
*/
|
|
3018
|
+
enableClear: { type: Boolean, default: !0 },
|
|
3019
|
+
/**
|
|
3020
|
+
* 可选,启用搜索
|
|
3021
|
+
* 默认为`false`
|
|
3022
|
+
*/
|
|
3023
|
+
enableSearch: { type: Boolean, default: !1 },
|
|
3024
|
+
/**
|
|
3025
|
+
* 可选,鼠标悬停时是否显示控件值
|
|
3026
|
+
* 默认显示
|
|
3027
|
+
*/
|
|
3028
|
+
enableTitle: { type: Boolean, default: !0 },
|
|
3029
|
+
fitEditor: { type: Boolean, default: !1 },
|
|
3030
|
+
/**
|
|
3031
|
+
* 可选,强制显示占位符
|
|
3032
|
+
* 默认`false`
|
|
3033
|
+
*/
|
|
3034
|
+
forcePlaceholder: { type: Boolean, default: !1 },
|
|
3035
|
+
/**
|
|
3036
|
+
* 可选,清空值时隐藏面板
|
|
3037
|
+
* 默认`true`
|
|
3038
|
+
*/
|
|
3039
|
+
hidePanelOnClear: { type: Boolean, default: !0 },
|
|
3040
|
+
/**
|
|
3041
|
+
* 可选,数据源id字段
|
|
3042
|
+
* 默认为`id`
|
|
3043
|
+
*/
|
|
3044
|
+
idField: { type: String, default: "id" },
|
|
3045
|
+
/**
|
|
3046
|
+
* 可选,字段映射
|
|
3047
|
+
*/
|
|
3048
|
+
mapFields: { type: Object },
|
|
3049
|
+
/**
|
|
3050
|
+
* 可选,最大高度
|
|
3051
|
+
* 默认`350`
|
|
3052
|
+
*/
|
|
3053
|
+
maxHeight: { type: Number, default: 350 },
|
|
3054
|
+
/**
|
|
3055
|
+
* 最大输入长度
|
|
3056
|
+
*/
|
|
3057
|
+
maxLength: { type: Number },
|
|
3058
|
+
/**
|
|
3059
|
+
* 可选,是否支持多选
|
|
3060
|
+
* 默认`false`
|
|
3061
|
+
*/
|
|
3062
|
+
multiSelect: { type: Boolean, default: !1 },
|
|
3063
|
+
/**
|
|
3064
|
+
* 绑定值
|
|
3065
|
+
*/
|
|
3066
|
+
modelValue: { type: String, default: "" },
|
|
3067
|
+
/**
|
|
3068
|
+
* 占位符
|
|
3069
|
+
*/
|
|
3070
|
+
placeholder: { type: String },
|
|
3071
|
+
/**
|
|
3072
|
+
* 可选,下拉面板展示位置
|
|
3073
|
+
* 默认为`auto`
|
|
3074
|
+
*/
|
|
3075
|
+
placement: {
|
|
3076
|
+
type: String,
|
|
3077
|
+
default: "auto"
|
|
3078
|
+
/* auto */
|
|
3079
|
+
},
|
|
3080
|
+
/**
|
|
3081
|
+
* 可选,是否只读
|
|
3082
|
+
* 默认为`false`
|
|
3083
|
+
*/
|
|
3084
|
+
readonly: { type: Boolean, default: !1 },
|
|
3085
|
+
/**
|
|
3086
|
+
* 可选,是否支持远端过滤
|
|
3087
|
+
* 默认`false`
|
|
3088
|
+
*/
|
|
3089
|
+
remoteSearch: { type: Boolean, default: !1 },
|
|
3090
|
+
/**
|
|
3091
|
+
* 可选,分隔符
|
|
3092
|
+
* 默认`,`
|
|
3093
|
+
*/
|
|
3094
|
+
separator: { type: String, default: "," },
|
|
3095
|
+
/**
|
|
3096
|
+
* tabIndex
|
|
3097
|
+
*/
|
|
3098
|
+
tabIndex: { type: Number, default: -1 },
|
|
3099
|
+
/**
|
|
3100
|
+
* 可选,数据源显示字段
|
|
3101
|
+
* 默认为`name`
|
|
3102
|
+
*/
|
|
3103
|
+
textField: { type: String, default: "name" },
|
|
3104
|
+
/**
|
|
3105
|
+
* 可选,数据源的title
|
|
3106
|
+
* 默认为`name`
|
|
3107
|
+
*/
|
|
3108
|
+
titleField: { type: String, default: "name" },
|
|
3109
|
+
/**
|
|
3110
|
+
* 可选,数据源值字段
|
|
3111
|
+
* 默认为`id`
|
|
3112
|
+
*/
|
|
3113
|
+
valueField: { type: String, default: "id" },
|
|
3114
|
+
/**
|
|
3115
|
+
* 可选,下拉列表值展示方式
|
|
3116
|
+
* 支持text | tag,即文本或标签,默认为`ViewType.Text`,即文本方式`text`
|
|
3117
|
+
*/
|
|
3118
|
+
viewType: {
|
|
3119
|
+
type: String,
|
|
3120
|
+
default: "text"
|
|
3121
|
+
/* Text */
|
|
3122
|
+
},
|
|
3123
|
+
/**
|
|
3124
|
+
* 作为内嵌编辑器被创建后默认获得焦点
|
|
3125
|
+
*/
|
|
3126
|
+
focusOnCreated: { type: Boolean, default: !1 },
|
|
3127
|
+
/**
|
|
3128
|
+
* 作为内嵌编辑器被创建后默认选中文本
|
|
3129
|
+
*/
|
|
3130
|
+
selectOnCreated: { type: Boolean, default: !1 },
|
|
3131
|
+
/**
|
|
3132
|
+
* 树表展示格式化函数
|
|
3133
|
+
*/
|
|
3134
|
+
formatter: { type: Function, default: null },
|
|
3135
|
+
/**
|
|
3136
|
+
* 显示文本格式化函数
|
|
3137
|
+
*/
|
|
3138
|
+
displayFormatter: { type: Function, default: null },
|
|
3139
|
+
editorParams: { type: Object },
|
|
3140
|
+
repositoryToken: { type: Symbol, default: null },
|
|
3141
|
+
/** 自定义行状态 */
|
|
3142
|
+
customRowStatus: { type: Object, default: null },
|
|
3143
|
+
minPanelWidth: { type: Number, default: 160 },
|
|
3144
|
+
/** 查询字段集合 */
|
|
3145
|
+
searchFields: { type: Array, default: ["name"] }
|
|
3146
|
+
}, Dl = {
|
|
3147
|
+
data: { type: Array, default: [] },
|
|
3148
|
+
enableSearch: { type: Boolean, default: !1 },
|
|
3149
|
+
idField: { type: String, default: "id" },
|
|
3150
|
+
multiSelect: { default: !1, type: Boolean },
|
|
3151
|
+
selectedValues: { type: String, default: "" },
|
|
3152
|
+
separator: { type: String, default: "," },
|
|
3153
|
+
textField: { type: String, default: "name" },
|
|
3154
|
+
titleField: { type: String, default: "name" },
|
|
3155
|
+
width: { type: Number },
|
|
3156
|
+
height: { type: Number },
|
|
3157
|
+
valueField: { type: String, default: "id" },
|
|
3158
|
+
formatter: { type: Function },
|
|
3159
|
+
maxHeight: { type: Number, default: 350 },
|
|
3160
|
+
repositoryToken: { type: Symbol, default: null },
|
|
3161
|
+
editorParams: { type: Object },
|
|
3162
|
+
customRowStatus: { type: Object, default: null },
|
|
3163
|
+
searchHandler: { type: Function, default: () => {
|
|
3164
|
+
} }
|
|
3165
|
+
}, Ul = /* @__PURE__ */ K({
|
|
3166
|
+
name: "FComboTreeContainer",
|
|
3167
|
+
props: Dl,
|
|
3168
|
+
emits: ["selectionChange", "selectItem", "unSelectItem"],
|
|
3169
|
+
setup(e, t) {
|
|
3170
|
+
const l = s(e.data), n = s([]), a = s(e.separator), o = s(e.width), r = s(e.height), u = s(e.maxHeight), c = s(String(e.selectedValues).split(a.value)), m = s(), C = {
|
|
3171
|
+
customRowStatus: e.customRowStatus
|
|
3172
|
+
};
|
|
3173
|
+
A(() => e.selectedValues, (p) => {
|
|
3174
|
+
c.value = String(p).split(a.value);
|
|
3175
|
+
}), A(() => e.data, (p) => {
|
|
3176
|
+
var b;
|
|
3177
|
+
l.value = p, (b = m.value) == null || b.updateDataSource(p);
|
|
3178
|
+
});
|
|
3179
|
+
const h = {
|
|
3180
|
+
enableSelectRow: !0,
|
|
3181
|
+
multiSelect: e.multiSelect,
|
|
3182
|
+
showCheckbox: e.multiSelect,
|
|
3183
|
+
multiSelectMode: "OnCheckAndClick"
|
|
3184
|
+
};
|
|
3185
|
+
let v = null;
|
|
3186
|
+
e.repositoryToken && (v = oe(e.repositoryToken));
|
|
3187
|
+
const y = S(() => [{
|
|
3188
|
+
field: e.textField,
|
|
3189
|
+
title: "",
|
|
3190
|
+
dataType: "string",
|
|
3191
|
+
formatter: e.formatter
|
|
3192
|
+
}]), d = S(() => {
|
|
3193
|
+
const p = {};
|
|
3194
|
+
return o.value !== void 0 && (p.width = `${o.value}px`), r.value !== void 0 && (p.height = `${r.value}px`), u.value !== void 0 && u.value > 0 && (p.maxHeight = `${u.value}px`, p.overflow = "auto"), l.value.length === 0 && (p.height = "200px"), p.position = "relative", p;
|
|
3195
|
+
});
|
|
3196
|
+
function g(p = []) {
|
|
3197
|
+
p && p.length > 0 ? (n.value = [...p], c.value = n.value.map((b) => b[e.idField])) : (n.value = [], c.value = []), t.emit("selectionChange", n.value);
|
|
3198
|
+
}
|
|
3199
|
+
le(() => {
|
|
3200
|
+
v && v.getData(e.editorParams).then((p) => {
|
|
3201
|
+
l.value = p;
|
|
3202
|
+
}), c.value && m.value.activeRowById(c.value[0]);
|
|
3203
|
+
});
|
|
3204
|
+
const f = (p) => {
|
|
3205
|
+
m.value.selectItemByIds(p);
|
|
3206
|
+
};
|
|
3207
|
+
return t.expose({
|
|
3208
|
+
treeInstance: m,
|
|
3209
|
+
checkItems: f
|
|
3210
|
+
}), () => i("div", {
|
|
3211
|
+
class: "f-combo-tree-container",
|
|
3212
|
+
style: d.value
|
|
3213
|
+
}, [e.multiSelect && e.enableSearch && i("div", {
|
|
3214
|
+
class: "p-2",
|
|
3215
|
+
style: "position: sticky;top:0;z-index: 2; background:white",
|
|
3216
|
+
onMousedown: (p) => p.stopPropagation()
|
|
3217
|
+
}, [i(Yt, {
|
|
3218
|
+
buttonContent: '<i class="f-icon f-icon-search"></i>',
|
|
3219
|
+
enableClear: !0,
|
|
3220
|
+
placeholder: "请输入搜索内容",
|
|
3221
|
+
onClear: () => t.emit("clearSearch"),
|
|
3222
|
+
onInput: (p, b) => e.searchHandler(b)
|
|
3223
|
+
}, null)]), i(Xt, {
|
|
3224
|
+
ref: m,
|
|
3225
|
+
fit: !0,
|
|
3226
|
+
data: l.value,
|
|
3227
|
+
idField: e.idField,
|
|
3228
|
+
columns: y.value,
|
|
3229
|
+
"selection-values": c.value,
|
|
3230
|
+
onSelectionUpdate: g,
|
|
3231
|
+
columnOption: {
|
|
3232
|
+
fitColumns: !0,
|
|
3233
|
+
fitMode: "expand"
|
|
3234
|
+
},
|
|
3235
|
+
rowOption: C,
|
|
3236
|
+
selection: h,
|
|
3237
|
+
rowNumber: {
|
|
3238
|
+
enable: !1
|
|
3239
|
+
},
|
|
3240
|
+
onSelectItem: (p) => t.emit("selectItem", p.raw),
|
|
3241
|
+
onUnSelectItem: (p) => t.emit("unSelectItem", p.raw)
|
|
3242
|
+
}, null)]);
|
|
3243
|
+
}
|
|
3244
|
+
});
|
|
3245
|
+
function ql(e) {
|
|
3246
|
+
const t = s(""), l = s(e.modelValue), n = s(e.data || []), a = s(e.editable);
|
|
3247
|
+
function o(h, v = []) {
|
|
3248
|
+
return h = h || [], h.reduce((y, d) => (d.id = d.id || d.data[e.idField], y.push(d), d.children && d.children.length && o(d.children, y), y), v);
|
|
3249
|
+
}
|
|
3250
|
+
function r(h) {
|
|
3251
|
+
const v = String(h).split(e.separator).map((f, p) => [f, p]), y = new Map(v), d = [];
|
|
3252
|
+
return o(n.value, d), d.filter((f) => {
|
|
3253
|
+
const p = f.data ? String(f.data[e.valueField]) : String(f[e.valueField]);
|
|
3254
|
+
return y.has(p);
|
|
3255
|
+
}).map((f) => f.data ? f.data : f).sort((f, p) => {
|
|
3256
|
+
const b = y.get(String(f[e.valueField])) || 0, F = y.get(String(p[e.valueField])) || 0;
|
|
3257
|
+
return b - F;
|
|
3258
|
+
});
|
|
3259
|
+
}
|
|
3260
|
+
function u(h) {
|
|
3261
|
+
const v = r(h), y = e.displayFormatter ? e.displayFormatter(v) : v.map((d) => d[e.textField]).join(e.separator);
|
|
3262
|
+
t.value = a.value ? y || h : y;
|
|
3263
|
+
}
|
|
3264
|
+
function c(h) {
|
|
3265
|
+
const v = h.split(e.separator).map((g) => [g, !0]), y = new Map(v);
|
|
3266
|
+
let d = [];
|
|
3267
|
+
return n.value[0].data ? o(n.value, d) : d = n.value, d = d.map((g) => g.data ? g.data : g), d.filter((g) => y.has(g[e.textField]) || y.has(g[e.valueField]));
|
|
3268
|
+
}
|
|
3269
|
+
function m(h) {
|
|
3270
|
+
const v = {};
|
|
3271
|
+
return v[e.idField] = h, v[e.textField] = h, [v];
|
|
3272
|
+
}
|
|
3273
|
+
function C(h) {
|
|
3274
|
+
let v = c(h);
|
|
3275
|
+
const y = v && v.length > 0;
|
|
3276
|
+
return a.value && !y && (v = m(h)), v;
|
|
3277
|
+
}
|
|
3278
|
+
return A(() => e.data, () => {
|
|
3279
|
+
n.value = e.data;
|
|
3280
|
+
}), A([n], ([h]) => {
|
|
3281
|
+
if (e.modelValue) {
|
|
3282
|
+
const v = h.find((y) => y[e.valueField] === e.modelValue);
|
|
3283
|
+
v && (t.value = v[e.textField]);
|
|
3284
|
+
}
|
|
3285
|
+
}), A(() => e.modelValue, (h, v) => {
|
|
3286
|
+
h !== v && (l.value = h, u(h));
|
|
3287
|
+
}), u(e.modelValue), { dataSource: n, displayText: t, editable: a, modelValue: l, getItemsByDisplayText: c, getItemsByValue: r, getSelectedItemsByDisplayText: C, flatTreeNodes: o };
|
|
3288
|
+
}
|
|
3289
|
+
function Gl(e, t) {
|
|
3290
|
+
const { comboEditorRef: l, dataSource: n, searchFields: a, originalValue: o, showPopover: r, flatTreeNodes: u } = e;
|
|
3291
|
+
function c(d, g) {
|
|
3292
|
+
d.forEach((f) => {
|
|
3293
|
+
const p = g.find((b) => b.id === f.id);
|
|
3294
|
+
f.selectable = p.selectable != null ? !!p.selectable : !0, f.children && c(f.children, g);
|
|
3295
|
+
});
|
|
3296
|
+
}
|
|
3297
|
+
function m(d, g) {
|
|
3298
|
+
const f = (d.children || []).map((b) => m(b, g)).filter((b) => b !== null);
|
|
3299
|
+
return a.value.some((b) => {
|
|
3300
|
+
var F;
|
|
3301
|
+
return (F = d.data[b]) == null ? void 0 : F.toString().toLowerCase().includes(g.toLowerCase());
|
|
3302
|
+
}) ? {
|
|
3303
|
+
data: { ...d.data },
|
|
3304
|
+
children: d.children,
|
|
3305
|
+
// 注意这里保留原始子节点
|
|
3306
|
+
id: d.data[t]
|
|
3307
|
+
} : f.length > 0 ? {
|
|
3308
|
+
data: { ...d.data },
|
|
3309
|
+
children: f,
|
|
3310
|
+
id: d.data[t]
|
|
3311
|
+
} : null;
|
|
3312
|
+
}
|
|
3313
|
+
function C() {
|
|
3314
|
+
o.value = Be(n.value);
|
|
3315
|
+
}
|
|
3316
|
+
function h(d) {
|
|
3317
|
+
var f;
|
|
3318
|
+
if (r.value || (f = l.value) == null || f.showPopup(), !d) {
|
|
3319
|
+
C();
|
|
3320
|
+
return;
|
|
3321
|
+
}
|
|
3322
|
+
const g = n.value.map((p) => m(p, d)).filter((p) => p !== null);
|
|
3323
|
+
if (g.length) {
|
|
3324
|
+
const p = [];
|
|
3325
|
+
u(n.value, p), c(g, p);
|
|
3326
|
+
}
|
|
3327
|
+
o.value = Be(g);
|
|
3328
|
+
}
|
|
3329
|
+
const v = $e((d) => {
|
|
3330
|
+
var f;
|
|
3331
|
+
const g = (f = d.target) == null ? void 0 : f.value;
|
|
3332
|
+
h(g);
|
|
3333
|
+
}, 200);
|
|
3334
|
+
function y(d) {
|
|
3335
|
+
var f;
|
|
3336
|
+
let g = (f = d.target) == null ? void 0 : f.value;
|
|
3337
|
+
g !== "" && (g = g.trim()), d.target._value !== g && v(d);
|
|
3338
|
+
}
|
|
3339
|
+
return {
|
|
3340
|
+
onValueChange: y,
|
|
3341
|
+
resetDataSource: C
|
|
3342
|
+
};
|
|
3343
|
+
}
|
|
3344
|
+
const et = /* @__PURE__ */ K({
|
|
3345
|
+
name: "FComboTree",
|
|
3346
|
+
props: $l,
|
|
3347
|
+
emits: ["clear", "update:modelValue", "change", "search"],
|
|
3348
|
+
setup(e, t) {
|
|
3349
|
+
const l = s(), n = s(e.disabled), a = s(e.enableClear), o = s(e.enableSearch), r = s(e.readonly), u = s(e.searchFields || [e.textField]), c = s(), m = s();
|
|
3350
|
+
let C = {};
|
|
3351
|
+
const {
|
|
3352
|
+
dataSource: h,
|
|
3353
|
+
displayText: v,
|
|
3354
|
+
editable: y,
|
|
3355
|
+
modelValue: d,
|
|
3356
|
+
flatTreeNodes: g
|
|
3357
|
+
} = ql(e), f = S(() => e.multiSelect);
|
|
3358
|
+
S(() => l.value ? l.value.elementRef.getBoundingClientRect().width : 0);
|
|
3359
|
+
const p = S(() => {
|
|
3360
|
+
var z;
|
|
3361
|
+
const O = (z = l.value) == null ? void 0 : z.popoverRef;
|
|
3362
|
+
return O ? O.shown : !1;
|
|
3363
|
+
}), {
|
|
3364
|
+
onValueChange: b,
|
|
3365
|
+
resetDataSource: F
|
|
3366
|
+
} = Gl({
|
|
3367
|
+
comboEditorRef: l,
|
|
3368
|
+
dataSource: h,
|
|
3369
|
+
searchFields: u,
|
|
3370
|
+
originalValue: c,
|
|
3371
|
+
showPopover: p,
|
|
3372
|
+
flatTreeNodes: g
|
|
3373
|
+
}, e.idField);
|
|
3374
|
+
function P() {
|
|
3375
|
+
!f.value && l.value && l.value.hidePopup();
|
|
3376
|
+
}
|
|
3377
|
+
const M = (O) => {
|
|
3378
|
+
const z = O == null ? void 0 : O.map((D) => D.data || D);
|
|
3379
|
+
return e.displayFormatter ? e.displayFormatter(z) : z.map((D) => D[e.textField]).join(e.separator);
|
|
3380
|
+
};
|
|
3381
|
+
function B(O = []) {
|
|
3382
|
+
if (!f.value)
|
|
3383
|
+
v.value = M(O), d.value = O.map((z) => z.data ? z.data[e.valueField] : z[e.valueField]).join(e.separator), t.emit("update:modelValue", d.value), t.emit("change", O, d.value);
|
|
3384
|
+
else {
|
|
3385
|
+
const z = Object.keys(C), D = Object.values(C);
|
|
3386
|
+
v.value = M(D), d.value = z.join(e.separator), t.emit("update:modelValue", d.value), t.emit("change", D, d.value);
|
|
3387
|
+
}
|
|
3388
|
+
P();
|
|
3389
|
+
}
|
|
3390
|
+
function x(O) {
|
|
3391
|
+
var z;
|
|
3392
|
+
d.value = "", C = {}, p.value && ((z = l.value) == null || z.hidePopup()), t.emit("update:modelValue", ""), t.emit("change", null, d.value), t.emit("clear");
|
|
3393
|
+
}
|
|
3394
|
+
function E(O) {
|
|
3395
|
+
f.value && (delete C[O.id], B());
|
|
3396
|
+
}
|
|
3397
|
+
function j(O) {
|
|
3398
|
+
f.value && (C[O.id] = O.data, B());
|
|
3399
|
+
}
|
|
3400
|
+
A([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([O, z, D, V, R]) => {
|
|
3401
|
+
n.value = O, y.value = z, a.value = D, o.value = V, r.value = R;
|
|
3402
|
+
});
|
|
3403
|
+
const $ = () => {
|
|
3404
|
+
if (c.value = Be(h.value), f.value && d.value) {
|
|
3405
|
+
const O = [];
|
|
3406
|
+
g(h.value, O), d.value.split(e.separator).reduce((z, D) => (z[D] = O.find((V) => V.id === D), z), C);
|
|
3407
|
+
}
|
|
3408
|
+
};
|
|
3409
|
+
function I() {
|
|
3410
|
+
F(), setTimeout(() => {
|
|
3411
|
+
var O;
|
|
3412
|
+
(O = m.value) == null || O.checkItems(d.value.split(e.separator));
|
|
3413
|
+
});
|
|
3414
|
+
}
|
|
3415
|
+
return () => i(De, {
|
|
3416
|
+
ref: l,
|
|
3417
|
+
id: e.id,
|
|
3418
|
+
disable: n.value,
|
|
3419
|
+
readonly: r.value,
|
|
3420
|
+
forcePlaceholder: e.forcePlaceholder,
|
|
3421
|
+
editable: y.value && !e.multiSelect,
|
|
3422
|
+
buttonContent: e.dropDownIcon,
|
|
3423
|
+
placeholder: e.placeholder,
|
|
3424
|
+
enableClear: a.value,
|
|
3425
|
+
maxLength: e.maxLength,
|
|
3426
|
+
tabIndex: e.tabIndex,
|
|
3427
|
+
enableTitle: e.enableTitle,
|
|
3428
|
+
inputType: e.viewType,
|
|
3429
|
+
popupOnClick: !0,
|
|
3430
|
+
modelValue: v.value,
|
|
3431
|
+
"onUpdate:modelValue": (O) => v.value = O,
|
|
3432
|
+
onClear: x,
|
|
3433
|
+
onInput: b,
|
|
3434
|
+
focusOnCreated: e.focusOnCreated,
|
|
3435
|
+
selectOnCreated: e.selectOnCreated,
|
|
3436
|
+
beforeOpen: $,
|
|
3437
|
+
placement: e.placement,
|
|
3438
|
+
popupMinWidth: e.minPanelWidth
|
|
3439
|
+
}, {
|
|
3440
|
+
default: () => [p.value && i(Ul, {
|
|
3441
|
+
ref: m,
|
|
3442
|
+
maxHeight: e.maxHeight,
|
|
3443
|
+
multiSelect: e.multiSelect,
|
|
3444
|
+
enableSearch: e.enableSearch,
|
|
3445
|
+
idField: e.idField,
|
|
3446
|
+
valueField: e.valueField,
|
|
3447
|
+
textField: e.textField,
|
|
3448
|
+
titleField: e.titleField,
|
|
3449
|
+
data: c.value,
|
|
3450
|
+
selectedValues: d.value,
|
|
3451
|
+
onSelectionChange: B,
|
|
3452
|
+
formatter: e.formatter,
|
|
3453
|
+
editorParams: e.editorParams,
|
|
3454
|
+
repositoryToken: e.repositoryToken,
|
|
3455
|
+
customRowStatus: e.customRowStatus,
|
|
3456
|
+
searchHandler: b,
|
|
3457
|
+
onUnSelectItem: E,
|
|
3458
|
+
onSelectItem: j,
|
|
3459
|
+
onClearSearch: I
|
|
3460
|
+
}, null)]
|
|
3461
|
+
});
|
|
3462
|
+
}
|
|
3463
|
+
});
|
|
3464
|
+
Ie(et);
|
|
3465
|
+
function tt(e) {
|
|
3466
|
+
function t(l, n, a = "filterField") {
|
|
3467
|
+
return i(et, {
|
|
3468
|
+
formatter: e.formatter,
|
|
3469
|
+
modelValue: l[a],
|
|
3470
|
+
"onUpdate:modelValue": (o) => l[a] = o,
|
|
3471
|
+
data: n,
|
|
3472
|
+
textField: e.textField || "name",
|
|
3473
|
+
valueField: e.valueField || "path",
|
|
3474
|
+
idField: e.idField || "id",
|
|
3475
|
+
enableClear: !1,
|
|
3476
|
+
minPanelWidth: 220,
|
|
3477
|
+
customRowStatus: Wl
|
|
3478
|
+
}, null);
|
|
3479
|
+
}
|
|
3480
|
+
return {
|
|
3481
|
+
renderFieldsComboTree: t
|
|
3482
|
+
};
|
|
3483
|
+
}
|
|
3484
|
+
function lt(e, t, l) {
|
|
3485
|
+
const n = s(e.activeIndex), a = s(e.conditions), o = s(e.fields);
|
|
3486
|
+
A(() => e.fields, (v) => {
|
|
3487
|
+
o.value = v;
|
|
3488
|
+
}), A(() => e.conditions, (v) => {
|
|
3489
|
+
a.value = v;
|
|
3490
|
+
}), A(() => e.activeIndex, (v) => {
|
|
3491
|
+
n.value = v;
|
|
3492
|
+
});
|
|
3493
|
+
const r = S(() => l.value.querySelector(`tr[index="${n.value}"]`));
|
|
3494
|
+
function u() {
|
|
3495
|
+
const v = r.value;
|
|
3496
|
+
v && (v.scrollIntoView ? v.scrollIntoView({ block: "center", behavior: "smooth" }) : v.scrollIntoViewIfNeeded && v.scrollIntoViewIfNeeded(!1));
|
|
3497
|
+
}
|
|
3498
|
+
const c = S(() => (v) => ({
|
|
3499
|
+
"fv-grid-row-selected": v === n.value
|
|
3500
|
+
}));
|
|
3501
|
+
function m(v, y) {
|
|
3502
|
+
y.stopPropagation(), t.emit("insert", { index: v, $event: y });
|
|
3503
|
+
}
|
|
3504
|
+
function C(v, y) {
|
|
3505
|
+
y.stopPropagation(), t.emit("remove", { index: v, $event: y });
|
|
3506
|
+
}
|
|
3507
|
+
function h(v, y) {
|
|
3508
|
+
t.emit("rowClick", { item: v, index: y });
|
|
3509
|
+
}
|
|
3510
|
+
return {
|
|
3511
|
+
itemIntoView: u,
|
|
3512
|
+
activeRowCls: c,
|
|
3513
|
+
fields: o,
|
|
3514
|
+
activeIndex: n,
|
|
3515
|
+
selectedRowRef: r,
|
|
3516
|
+
conditions: a,
|
|
3517
|
+
tbodyRef: l,
|
|
3518
|
+
onInsert: m,
|
|
3519
|
+
onRemove: C,
|
|
3520
|
+
onRowClick: h
|
|
3521
|
+
};
|
|
3522
|
+
}
|
|
3523
|
+
const Xl = /* @__PURE__ */ K({
|
|
3524
|
+
name: "filter-condition-grid",
|
|
3525
|
+
props: _e,
|
|
3526
|
+
emits: ["insert", "remove", "rowClick"],
|
|
3527
|
+
setup(e, t) {
|
|
3528
|
+
const {
|
|
3529
|
+
compareOperators: l,
|
|
3530
|
+
leftBracketItems: n,
|
|
3531
|
+
valueTypes: a,
|
|
3532
|
+
relationItems: o,
|
|
3533
|
+
righttBracketItems: r
|
|
3534
|
+
} = Qe(e), {
|
|
3535
|
+
renderFieldsComboTree: u
|
|
3536
|
+
} = tt(e), c = s(), {
|
|
3537
|
+
conditions: m,
|
|
3538
|
+
fields: C,
|
|
3539
|
+
onInsert: h,
|
|
3540
|
+
onRemove: v,
|
|
3541
|
+
onRowClick: y,
|
|
3542
|
+
activeRowCls: d,
|
|
3543
|
+
itemIntoView: g
|
|
3544
|
+
} = lt(e, t, c), f = s(e.expressionOptions || {});
|
|
3545
|
+
function p(F) {
|
|
3546
|
+
var P, M;
|
|
3547
|
+
switch (F.expresstype) {
|
|
3548
|
+
case ee.Variable:
|
|
3549
|
+
return i(Gt, {
|
|
3550
|
+
modelValue: F.value,
|
|
3551
|
+
"onUpdate:modelValue": (B) => F.value = B,
|
|
3552
|
+
showOutline: !1,
|
|
3553
|
+
fieldData: (P = e.formContextData) == null ? void 0 : P.fieldData,
|
|
3554
|
+
varData: (M = e.formContextData) == null ? void 0 : M.varData
|
|
3555
|
+
}, null);
|
|
3556
|
+
case ee.Expression:
|
|
3557
|
+
return i(qt, ve({
|
|
3558
|
+
modelValue: F.value,
|
|
3559
|
+
"onUpdate:modelValue": (B) => F.value = B
|
|
3560
|
+
}, f.value), null);
|
|
3561
|
+
case ee.Value:
|
|
3562
|
+
default:
|
|
3563
|
+
return i(Oe, {
|
|
3564
|
+
enableTitle: !0,
|
|
3565
|
+
buttonContent: "",
|
|
3566
|
+
popupOnClick: !0,
|
|
3567
|
+
modelValue: F.value,
|
|
3568
|
+
"onUpdate:modelValue": (B) => F.value = B
|
|
3569
|
+
}, null);
|
|
3570
|
+
}
|
|
3571
|
+
}
|
|
3572
|
+
function b(F, P, M) {
|
|
3573
|
+
return i(re, {
|
|
3574
|
+
data: P,
|
|
3575
|
+
modelValue: F[M],
|
|
3576
|
+
"onUpdate:modelValue": (B) => F[M] = B,
|
|
3577
|
+
textField: "label",
|
|
3578
|
+
valueField: "value",
|
|
3579
|
+
idField: "value",
|
|
3580
|
+
enableClear: !1,
|
|
3581
|
+
minPanelWidth: 130,
|
|
3582
|
+
placement: "auto"
|
|
3583
|
+
}, null);
|
|
3584
|
+
}
|
|
3585
|
+
return Me(() => {
|
|
3586
|
+
g();
|
|
3587
|
+
}), () => i("div", {
|
|
3588
|
+
class: "fv-filter-condition-grid table-body f-utils-fill win11Scroll show nobtn",
|
|
3589
|
+
style: "margin-left:14px; margin-right: 0; overflow-y: scroll;"
|
|
3590
|
+
}, [i("table", {
|
|
3591
|
+
class: "table table-bordered",
|
|
3592
|
+
style: "margin-bottom: 0;"
|
|
3593
|
+
}, [i("thead", {
|
|
3594
|
+
style: "position: sticky; top: 0; z-index: 1;"
|
|
3595
|
+
}, [i("tr", null, [i("th", {
|
|
3596
|
+
style: "width: 40px"
|
|
3597
|
+
}, null), i("th", {
|
|
3598
|
+
style: "width: 45px"
|
|
3599
|
+
}, [i("b", null, [X("左括号")])]), i("th", {
|
|
3600
|
+
style: "width: 90px"
|
|
3601
|
+
}, [i("b", null, [X("字段")])]), i("th", {
|
|
3602
|
+
style: "width: 70px"
|
|
3603
|
+
}, [i("b", null, [X("操作符")])]), i("th", {
|
|
3604
|
+
style: "width: 60px"
|
|
3605
|
+
}, [i("b", null, [X("值类型")])]), i("th", {
|
|
3606
|
+
style: "width: 100px"
|
|
3607
|
+
}, [i("b", null, [X("值")])]), i("th", {
|
|
3608
|
+
style: "width: 45px"
|
|
3609
|
+
}, [i("b", null, [X("右括号")])]), i("th", {
|
|
3610
|
+
style: "width: 60px"
|
|
3611
|
+
}, [i("b", null, [X("关系")])])])]), i("tbody", {
|
|
3612
|
+
ref: c
|
|
3613
|
+
}, [m.value.map((F, P) => i("tr", {
|
|
3614
|
+
index: P,
|
|
3615
|
+
class: d.value(P),
|
|
3616
|
+
onClick: (M) => y(F, P)
|
|
3617
|
+
}, [i("td", {
|
|
3618
|
+
style: "text-overflow: unset;",
|
|
3619
|
+
align: "center",
|
|
3620
|
+
class: "px-1"
|
|
3621
|
+
}, [i("button", {
|
|
3622
|
+
title: "插入",
|
|
3623
|
+
onClick: (M) => h(P, M),
|
|
3624
|
+
type: "button",
|
|
3625
|
+
class: "btn btn-link p-1 mr-0"
|
|
3626
|
+
}, [i("span", {
|
|
3627
|
+
class: "f-icon f-icon-plus"
|
|
3628
|
+
}, null)]), i("button", {
|
|
3629
|
+
title: "移除",
|
|
3630
|
+
onClick: (M) => v(P, M),
|
|
3631
|
+
type: "button",
|
|
3632
|
+
class: "btn btn-link p-1 m-0"
|
|
3633
|
+
}, [i("span", {
|
|
3634
|
+
class: "f-icon f-icon-minus"
|
|
3635
|
+
}, null)])]), i("td", {
|
|
3636
|
+
class: "px-1"
|
|
3637
|
+
}, [b(F, n, "lbracket")]), i("td", {
|
|
3638
|
+
class: "px-1"
|
|
3639
|
+
}, [u(F, C.value, "filterField")]), i("td", {
|
|
3640
|
+
class: "px-1"
|
|
3641
|
+
}, [b(F, l, "compare")]), i("td", {
|
|
3642
|
+
class: "px-1"
|
|
3643
|
+
}, [b(F, a, "expresstype")]), i("td", {
|
|
3644
|
+
class: "px-1"
|
|
3645
|
+
}, [p(F)]), i("td", {
|
|
3646
|
+
class: "px-1"
|
|
3647
|
+
}, [b(F, r, "rbracket")]), i("td", {
|
|
3648
|
+
class: "px-1"
|
|
3649
|
+
}, [b(F, o, "relation")])]))])])]);
|
|
3650
|
+
}
|
|
3651
|
+
}), Yl = {
|
|
3652
|
+
width: { Type: Number, default: 400 },
|
|
3653
|
+
type: { Type: String, default: "info" },
|
|
3654
|
+
title: { Type: String, default: "" },
|
|
3655
|
+
detail: { Type: String, default: "" },
|
|
3656
|
+
okButtonText: { Type: String, default: "确定" },
|
|
3657
|
+
showOkButton: { Type: Boolean, default: !0 },
|
|
3658
|
+
showCancelButton: { Type: Boolean, default: !0 },
|
|
3659
|
+
cancelButtonText: { Type: String, default: "取消" },
|
|
3660
|
+
exceptionInfo: { Type: Object, default: null },
|
|
3661
|
+
promptEditorType: { Type: String, default: "text-area" },
|
|
3662
|
+
buttons: { type: Object, default: [] }
|
|
3663
|
+
};
|
|
3664
|
+
function Ve() {
|
|
3665
|
+
return new DOMException("The request is not allowed", "NotAllowedError");
|
|
3666
|
+
}
|
|
3667
|
+
async function Kl(e) {
|
|
3668
|
+
if (!navigator.clipboard)
|
|
3669
|
+
throw Ve();
|
|
3670
|
+
return navigator.clipboard.writeText(e);
|
|
3671
|
+
}
|
|
3672
|
+
async function _l(e) {
|
|
3673
|
+
const t = document.createElement("span");
|
|
3674
|
+
t.textContent = e, t.style.whiteSpace = "pre", t.style.webkitUserSelect = "auto", t.style.userSelect = "all", document.body.appendChild(t);
|
|
3675
|
+
const l = window.getSelection(), n = window.document.createRange();
|
|
3676
|
+
l == null || l.removeAllRanges(), n.selectNode(t), l == null || l.addRange(n);
|
|
3677
|
+
let a = !1;
|
|
3678
|
+
try {
|
|
3679
|
+
a = window.document.execCommand("copy");
|
|
3680
|
+
} finally {
|
|
3681
|
+
l == null || l.removeAllRanges(), window.document.body.removeChild(t);
|
|
3682
|
+
}
|
|
3683
|
+
if (!a)
|
|
3684
|
+
throw Ve();
|
|
3685
|
+
}
|
|
3686
|
+
async function Jl(e) {
|
|
3687
|
+
try {
|
|
3688
|
+
await Kl(e);
|
|
3689
|
+
} catch (t) {
|
|
3690
|
+
try {
|
|
3691
|
+
await _l(e);
|
|
3692
|
+
} catch (l) {
|
|
3693
|
+
throw l || t || Ve();
|
|
3694
|
+
}
|
|
3695
|
+
}
|
|
3696
|
+
}
|
|
3697
|
+
function Zl() {
|
|
3698
|
+
async function e(t) {
|
|
3699
|
+
await Jl(t);
|
|
3700
|
+
}
|
|
3701
|
+
return { onCopy: e };
|
|
3702
|
+
}
|
|
3703
|
+
function Ql(e, t, l, n) {
|
|
3704
|
+
const a = s(14), o = s(140), r = s(""), u = s(n.value.length), c = S(() => n.value), m = S(() => ({
|
|
3705
|
+
"font-size": `${a.value}px`,
|
|
3706
|
+
height: "100%"
|
|
3707
|
+
}));
|
|
3708
|
+
function C(h) {
|
|
3709
|
+
if (h.currentTarget) {
|
|
3710
|
+
const v = h.currentTarget.value || "";
|
|
3711
|
+
u.value = v.length;
|
|
3712
|
+
}
|
|
3713
|
+
}
|
|
3714
|
+
return () => i(ie, null, [i("textarea", {
|
|
3715
|
+
title: "promptMessage",
|
|
3716
|
+
name: "promptMessage",
|
|
3717
|
+
class: "form-control",
|
|
3718
|
+
style: m.value,
|
|
3719
|
+
rows: "4",
|
|
3720
|
+
maxlength: o.value,
|
|
3721
|
+
onInput: (h) => C(h)
|
|
3722
|
+
}, [c.value]), i("span", {
|
|
3723
|
+
class: "textarea-wordcount",
|
|
3724
|
+
title: r.value,
|
|
3725
|
+
style: "position: absolute; bottom: 76px; right: 32px; cursor: pointer; text-align: right;"
|
|
3726
|
+
}, [u.value + " / " + o.value])]);
|
|
3727
|
+
}
|
|
3728
|
+
function en(e, t, l, n) {
|
|
3729
|
+
const a = Ql(e, t, l, n), o = /* @__PURE__ */ new Map([["text-area", a]]);
|
|
3730
|
+
function r(u) {
|
|
3731
|
+
return o.get(u) || null;
|
|
3732
|
+
}
|
|
3733
|
+
return { getEditorRender: r };
|
|
3734
|
+
}
|
|
3735
|
+
function tn() {
|
|
3736
|
+
const e = s(!1), t = s("复制成功");
|
|
3737
|
+
return {
|
|
3738
|
+
feedbackStyle: S(() => {
|
|
3739
|
+
const n = {
|
|
3740
|
+
position: "absolute",
|
|
3741
|
+
left: "50%",
|
|
3742
|
+
top: "50%",
|
|
3743
|
+
"min-width": "100px",
|
|
3744
|
+
height: "40px",
|
|
3745
|
+
background: "#303C53",
|
|
3746
|
+
"line-height": "40px",
|
|
3747
|
+
"text-align": "center",
|
|
3748
|
+
"margin-left": "-30px",
|
|
3749
|
+
"margin-top": "-50px",
|
|
3750
|
+
"border-radius": "10px",
|
|
3751
|
+
"box-shadow": "0px 2px 8px 0px",
|
|
3752
|
+
color: "#fff",
|
|
3753
|
+
transition: "all .3s ease",
|
|
3754
|
+
padding: "0 10px"
|
|
3755
|
+
};
|
|
3756
|
+
return n.opacity = e.value ? "0.8" : "0", n.display = e.value ? "" : "none", n;
|
|
3757
|
+
}),
|
|
3758
|
+
feedbackMessage: t,
|
|
3759
|
+
toShowFeedback: e
|
|
3760
|
+
};
|
|
3761
|
+
}
|
|
3762
|
+
function ln(e, t) {
|
|
3763
|
+
const l = t.getEditorRender(e.promptEditorType);
|
|
3764
|
+
return () => l && l();
|
|
3765
|
+
}
|
|
3766
|
+
function nn(e, t) {
|
|
3767
|
+
function l(y) {
|
|
3768
|
+
if (y == null)
|
|
3769
|
+
return 0;
|
|
3770
|
+
let d = 0;
|
|
3771
|
+
for (let g = 0; g < y.length; g++) {
|
|
3772
|
+
const f = y.charCodeAt(g);
|
|
3773
|
+
f >= 0 && f <= 128 ? d++ : d = d + 2;
|
|
3774
|
+
}
|
|
3775
|
+
return d;
|
|
3776
|
+
}
|
|
3777
|
+
function n(y, d) {
|
|
3778
|
+
if (y !== "" && y !== void 0 && y !== null) {
|
|
3779
|
+
y = "" + y;
|
|
3780
|
+
const g = y.length;
|
|
3781
|
+
let f = "", p = 0;
|
|
3782
|
+
for (let b = 0; b < g; b++) {
|
|
3783
|
+
const F = y.charAt(b);
|
|
3784
|
+
if (p++, encodeURI(F).length > 4 && p++, f = f.concat(F), p >= d)
|
|
3785
|
+
return f = f.concat("..."), f;
|
|
3786
|
+
}
|
|
3787
|
+
if (p < d)
|
|
3788
|
+
return y;
|
|
3789
|
+
}
|
|
3790
|
+
return "";
|
|
3791
|
+
}
|
|
3792
|
+
const a = S(() => !!e.value && !!e.value.date), o = S(() => {
|
|
3793
|
+
const y = e.value && e.value.date || "";
|
|
3794
|
+
return `${t.exception.happend} : ${y}`;
|
|
3795
|
+
}), r = S(() => !!e.value && !!e.value.detail), u = S(() => e.value ? l(e.value.detail) > 160 : !1), c = s(!1), m = S(() => c.value ? t.exception.collapse : t.exception.expand), C = S(() => {
|
|
3796
|
+
const y = t.exception.detail + " : " + (e.value && e.value.detail) || "";
|
|
3797
|
+
return c.value ? y : n(y, 160);
|
|
3798
|
+
}), h = S(() => ({
|
|
3799
|
+
bottom: c.value ? 0 : "2px"
|
|
3800
|
+
}));
|
|
3801
|
+
function v() {
|
|
3802
|
+
c.value = !c.value;
|
|
3803
|
+
}
|
|
3804
|
+
return () => i("div", {
|
|
3805
|
+
class: "toast-msg-detail",
|
|
3806
|
+
style: "max-height: calc(100vh - 200px);overflow: auto;"
|
|
3807
|
+
}, [a.value && i("div", null, [o.value]), r.value && i("div", {
|
|
3808
|
+
class: "exception_wrap"
|
|
3809
|
+
}, [i("div", {
|
|
3810
|
+
class: "exception_error_msg"
|
|
3811
|
+
}, [i("div", {
|
|
3812
|
+
innerHTML: C.value
|
|
3813
|
+
}, null), u.value && i("span", {
|
|
3814
|
+
class: "exception_toggle_detail",
|
|
3815
|
+
style: h.value,
|
|
3816
|
+
onClick: v
|
|
3817
|
+
}, [m.value])])])]);
|
|
3818
|
+
}
|
|
3819
|
+
function an(e) {
|
|
3820
|
+
return () => i("p", {
|
|
3821
|
+
class: "toast-msg-detail",
|
|
3822
|
+
innerHTML: e.value,
|
|
3823
|
+
style: "max-height: calc(100vh - 200px);overflow: auto;"
|
|
3824
|
+
}, null);
|
|
3825
|
+
}
|
|
3826
|
+
function on(e, t, l, n, a) {
|
|
3827
|
+
const o = s(e.exceptionInfo), r = S(() => {
|
|
3828
|
+
const d = t.value === "question" ? "warning" : t.value, g = {
|
|
3829
|
+
"f-icon": !0
|
|
3830
|
+
}, f = `f-icon-${d}`;
|
|
3831
|
+
return g[f] = !0, g;
|
|
3832
|
+
}), u = S(() => l.value || o.value && o.value.message), c = S(() => n.value), m = S(() => !!n.value), C = S(() => !!o.value);
|
|
3833
|
+
function h() {
|
|
3834
|
+
return C.value ? nn(o, a) : m.value ? an(c) : () => null;
|
|
3835
|
+
}
|
|
3836
|
+
const v = h(), y = S(() => a.locale === "en" ? {
|
|
3837
|
+
wordBreak: "keep-all",
|
|
3838
|
+
overflowWrap: "break-word"
|
|
3839
|
+
} : {});
|
|
3840
|
+
return () => i(ie, null, [i("div", {
|
|
3841
|
+
class: "float-left modal-tips-iconwrap"
|
|
3842
|
+
}, [i("span", {
|
|
3843
|
+
class: r.value
|
|
3844
|
+
}, null)]), i("div", {
|
|
3845
|
+
class: "modal-tips-content"
|
|
3846
|
+
}, [i("p", {
|
|
3847
|
+
class: "toast-msg-title",
|
|
3848
|
+
innerHTML: u.value,
|
|
3849
|
+
style: y.value
|
|
3850
|
+
}, null), v()])]);
|
|
3851
|
+
}
|
|
3852
|
+
function un(e, t, l, n) {
|
|
3853
|
+
const {
|
|
3854
|
+
onCopy: a
|
|
3855
|
+
} = t, {
|
|
3856
|
+
toShowFeedback: o
|
|
3857
|
+
} = l, r = s(n.exception.copySuccess || "复制成功"), u = s(n.exception.copy || "复制详细信息"), c = s(e.exceptionInfo || {
|
|
3858
|
+
date: "",
|
|
3859
|
+
message: "",
|
|
3860
|
+
detail: ""
|
|
3861
|
+
}), m = S(() => c.value && c.value.detail || "");
|
|
3862
|
+
function C(h) {
|
|
3863
|
+
a(m.value).catch((v) => {
|
|
3864
|
+
r.value = n.exception.copyFailed || "复制失败";
|
|
3865
|
+
}).finally(() => {
|
|
3866
|
+
o.value = !0, setTimeout(() => {
|
|
3867
|
+
o.value = !1;
|
|
3868
|
+
}, 700);
|
|
3869
|
+
});
|
|
3870
|
+
}
|
|
3871
|
+
return () => i("span", {
|
|
3872
|
+
class: "copy-exception-info"
|
|
3873
|
+
}, [i("span", {
|
|
3874
|
+
onClick: C,
|
|
3875
|
+
style: "cursor: pointer;"
|
|
3876
|
+
}, [u.value])]);
|
|
3877
|
+
}
|
|
3878
|
+
function sn(e, t, l, n, a) {
|
|
3879
|
+
const o = s(e.type), r = s(e.buttons), u = s(e.exceptionInfo), c = s(a.ok || e.okButtonText), m = s(a.cancel || e.cancelButtonText), C = s(e.showCancelButton), h = s(e.showOkButton), v = S(() => !!(r.value && r.value.length)), y = S(() => !!(u.value && u.value.detail)), d = S(() => !(r.value && r.value.length) && (h.value || C.value)), g = un(e, l, n, a);
|
|
3880
|
+
c.value === "关闭" ? c.value = a.close : c.value === "知道了" && (c.value = a.exception.roger);
|
|
3881
|
+
function f(b) {
|
|
3882
|
+
o.value === "question" && t.emit("reject"), t.emit("close");
|
|
3883
|
+
}
|
|
3884
|
+
function p(b) {
|
|
3885
|
+
o.value === "question" && t.emit("accept"), t.emit("close");
|
|
3886
|
+
}
|
|
3887
|
+
return () => i("div", {
|
|
3888
|
+
class: "modal-footer"
|
|
3889
|
+
}, [y.value && g(), d.value && C.value && i("button", {
|
|
3890
|
+
type: "button",
|
|
3891
|
+
class: "btn btn-secondary btn-lg",
|
|
3892
|
+
onClick: f
|
|
3893
|
+
}, [m.value]), d.value && h.value && i("button", {
|
|
3894
|
+
type: "button",
|
|
3895
|
+
class: "btn btn-primary btn-lg",
|
|
3896
|
+
onClick: p
|
|
3897
|
+
}, [c.value]), v.value && r.value.length && r.value.map((b) => i("button", {
|
|
3898
|
+
type: "button",
|
|
3899
|
+
onClick: b.handle,
|
|
3900
|
+
class: b.class
|
|
3901
|
+
}, [b.iconClass && i("span", {
|
|
3902
|
+
class: b.iconClass
|
|
3903
|
+
}, null), b.text]))]);
|
|
3904
|
+
}
|
|
3905
|
+
function rn(e) {
|
|
3906
|
+
const { getLocaleValue: t } = _, l = _.getLocale();
|
|
3907
|
+
function n(a, o, r) {
|
|
3908
|
+
return o === r ? t(a) : o;
|
|
3909
|
+
}
|
|
3910
|
+
return {
|
|
3911
|
+
yes: n("messageBox.yes") || "是",
|
|
3912
|
+
no: n("messageBox.no") || "否",
|
|
3913
|
+
close: n("messageBox.close") || "关闭",
|
|
3914
|
+
ok: n("messageBox.ok", e.okButtonText, "确定") || "确定",
|
|
3915
|
+
cancel: n("messageBox.cancel", e.cancelButtonText, "取消") || "取消",
|
|
3916
|
+
title: n("messageBox.title") || "系统提示",
|
|
3917
|
+
errorTitle: n("messageBox.errorTitle") || "错误提示",
|
|
3918
|
+
exception: {
|
|
3919
|
+
expand: n("messageBox.exception.expand") || "展开",
|
|
3920
|
+
collapse: n("messageBox.exception.collapse") || "收起",
|
|
3921
|
+
happend: n("messageBox.exception.happend") || "发生时间",
|
|
3922
|
+
detail: n("messageBox.exception.detail") || "详细信息",
|
|
3923
|
+
copy: n("messageBox.exception.copy") || "复制详细信息",
|
|
3924
|
+
copySuccess: n("messageBox.exception.copySuccess") || "复制成功",
|
|
3925
|
+
copyFailed: n("messageBox.exception.copyFailed") || "复制失败",
|
|
3926
|
+
roger: n("messageBox.exception.roger") || "知道了"
|
|
3927
|
+
},
|
|
3928
|
+
locale: l
|
|
3929
|
+
};
|
|
3930
|
+
}
|
|
3931
|
+
const me = /* @__PURE__ */ K({
|
|
3932
|
+
name: "FMessageBox",
|
|
3933
|
+
props: Yl,
|
|
3934
|
+
emits: ["accept", "reject", "close"],
|
|
3935
|
+
setup(e, t) {
|
|
3936
|
+
const l = rn(e), n = s(e.type), a = s(e.title), o = s(e.detail), r = S(() => {
|
|
3937
|
+
const p = {
|
|
3938
|
+
"modal-tips": !0,
|
|
3939
|
+
"d-flex": !0,
|
|
3940
|
+
"flex-row": !0
|
|
3941
|
+
}, b = `messager-type-${n.value}`;
|
|
3942
|
+
return p[b] = !0, p;
|
|
3943
|
+
}), u = S(() => {
|
|
3944
|
+
const p = {
|
|
3945
|
+
cursor: "default"
|
|
3946
|
+
};
|
|
3947
|
+
return n.value === "prompt" ? p.padding = "0.5rem 0.5rem 1rem 1.5rem" : n.value === "error" && (p.padding = "0.5rem 1.5rem 1rem 1.5rem"), p;
|
|
3948
|
+
}), c = Zl(), m = en(e, n, a, o), C = tn(), {
|
|
3949
|
+
feedbackStyle: h,
|
|
3950
|
+
feedbackMessage: v
|
|
3951
|
+
} = C;
|
|
3952
|
+
v.value = l.exception.copySuccess;
|
|
3953
|
+
function y() {
|
|
3954
|
+
return i("div", {
|
|
3955
|
+
style: h.value
|
|
3956
|
+
}, [v.value]);
|
|
3957
|
+
}
|
|
3958
|
+
function d() {
|
|
3959
|
+
switch (n.value) {
|
|
3960
|
+
case "prompt":
|
|
3961
|
+
return ln(e, m);
|
|
3962
|
+
default:
|
|
3963
|
+
return on(e, n, a, o, l);
|
|
3964
|
+
}
|
|
3965
|
+
}
|
|
3966
|
+
const g = d(), f = sn(e, t, c, C, l);
|
|
3967
|
+
return () => i("div", {
|
|
3968
|
+
class: "farris-messager"
|
|
3969
|
+
}, [!e.exceptionInfo && i("div", {
|
|
3970
|
+
style: "height: 30px;width: 100%;position: absolute;",
|
|
3971
|
+
class: "messager-draggable"
|
|
3972
|
+
}, null), i("section", {
|
|
3973
|
+
class: r.value,
|
|
3974
|
+
style: u.value
|
|
3975
|
+
}, [g()]), f(), y()]);
|
|
3976
|
+
}
|
|
3977
|
+
}), Q = class Q {
|
|
3978
|
+
static show(t) {
|
|
3979
|
+
const l = te({
|
|
3980
|
+
...t
|
|
3981
|
+
}), n = !1, a = l.type === "error" || l.type === "prompt", o = l.type === "error" ? "错误提示" : l.type === "prompt" && l.title || "", r = l.acceptCallback || (() => {
|
|
3982
|
+
}), u = l.rejectCallback || (() => {
|
|
3983
|
+
});
|
|
3984
|
+
let c = null, m = new Xe(Q.app);
|
|
3985
|
+
const C = () => {
|
|
3986
|
+
c && (c == null || c.destroy(), m = null);
|
|
3987
|
+
};
|
|
3988
|
+
return c = m == null ? void 0 : m.open({
|
|
3989
|
+
class: "modal-message modal-message-type-info",
|
|
3990
|
+
title: o,
|
|
3991
|
+
showButtons: n,
|
|
3992
|
+
showHeader: a,
|
|
3993
|
+
width: l.width || 400,
|
|
3994
|
+
fitContent: !0,
|
|
3995
|
+
showMaxButton: !1,
|
|
3996
|
+
draggable: !0,
|
|
3997
|
+
dragHandle: ".messager-draggable",
|
|
3998
|
+
render: () => i(me, ve(l, {
|
|
3999
|
+
onAccept: r,
|
|
4000
|
+
onReject: u,
|
|
4001
|
+
onClose: C
|
|
4002
|
+
}), null)
|
|
4003
|
+
}), m == null ? void 0 : m.getCurrentModal();
|
|
4004
|
+
}
|
|
4005
|
+
static info(t, l) {
|
|
4006
|
+
const n = te({
|
|
4007
|
+
type: "info",
|
|
4008
|
+
title: t,
|
|
4009
|
+
detail: l,
|
|
4010
|
+
okButtonText: "知道了",
|
|
4011
|
+
showCancelButton: !1
|
|
4012
|
+
});
|
|
4013
|
+
Q.show(n);
|
|
4014
|
+
}
|
|
4015
|
+
static warning(t, l) {
|
|
4016
|
+
const n = te({
|
|
4017
|
+
type: "warning",
|
|
4018
|
+
title: t,
|
|
4019
|
+
detail: l,
|
|
4020
|
+
okButtonText: "知道了",
|
|
4021
|
+
showCancelButton: !1
|
|
4022
|
+
});
|
|
4023
|
+
Q.show(n);
|
|
4024
|
+
}
|
|
4025
|
+
static success(t, l) {
|
|
4026
|
+
const n = te({
|
|
4027
|
+
type: "success",
|
|
4028
|
+
title: t,
|
|
4029
|
+
detail: l,
|
|
4030
|
+
okButtonText: "关闭",
|
|
4031
|
+
showCancelButton: !1
|
|
4032
|
+
});
|
|
4033
|
+
Q.show(n);
|
|
4034
|
+
}
|
|
4035
|
+
static error(t, l, n) {
|
|
4036
|
+
const a = te({
|
|
4037
|
+
width: 500,
|
|
4038
|
+
type: "error",
|
|
4039
|
+
okButtonText: "关闭",
|
|
4040
|
+
showCancelButton: !1,
|
|
4041
|
+
exceptionInfo: {
|
|
4042
|
+
date: n,
|
|
4043
|
+
message: t,
|
|
4044
|
+
detail: l
|
|
4045
|
+
}
|
|
4046
|
+
});
|
|
4047
|
+
Q.show(a);
|
|
4048
|
+
}
|
|
4049
|
+
static prompt(t, l) {
|
|
4050
|
+
const n = te({
|
|
4051
|
+
type: "prompt",
|
|
4052
|
+
title: t,
|
|
4053
|
+
detail: l,
|
|
4054
|
+
okButtonText: "确定",
|
|
4055
|
+
cancelButtonText: "取消"
|
|
4056
|
+
});
|
|
4057
|
+
Q.show(n);
|
|
4058
|
+
}
|
|
4059
|
+
static question(t, l, n, a) {
|
|
4060
|
+
const o = te({
|
|
4061
|
+
type: "question",
|
|
4062
|
+
title: t,
|
|
4063
|
+
detail: l,
|
|
4064
|
+
okButtonText: "确定",
|
|
4065
|
+
cancelButtonText: "取消",
|
|
4066
|
+
acceptCallback: n,
|
|
4067
|
+
rejectCallback: a
|
|
4068
|
+
});
|
|
4069
|
+
Q.show(o);
|
|
4070
|
+
}
|
|
4071
|
+
};
|
|
4072
|
+
Z(Q, "app", null);
|
|
4073
|
+
let ce = Q;
|
|
4074
|
+
me.install = (e) => {
|
|
4075
|
+
e.component(me.name, me), ce.app = e, e.provide("FMessageBoxService", ce);
|
|
4076
|
+
};
|
|
4077
|
+
const cn = /* @__PURE__ */ K({
|
|
4078
|
+
name: "filter-condition-actions",
|
|
4079
|
+
props: ["canClear", "canMove", "questionMessage"],
|
|
4080
|
+
emits: ["add", "clear", "moveTop", "movePrev", "moveNext", "moveBottom"],
|
|
4081
|
+
setup(e, t) {
|
|
4082
|
+
const l = s(e.questionMessage || "确定要清空所有数据吗?"), n = {
|
|
4083
|
+
position: "relative",
|
|
4084
|
+
top: "2px"
|
|
4085
|
+
};
|
|
4086
|
+
function a() {
|
|
4087
|
+
t.emit("add");
|
|
4088
|
+
}
|
|
4089
|
+
function o() {
|
|
4090
|
+
ce.question(l.value, "", () => {
|
|
4091
|
+
t.emit("clear");
|
|
4092
|
+
}, () => {
|
|
4093
|
+
});
|
|
4094
|
+
}
|
|
4095
|
+
function r() {
|
|
4096
|
+
t.emit("moveTop");
|
|
4097
|
+
}
|
|
4098
|
+
function u() {
|
|
4099
|
+
t.emit("movePrev");
|
|
4100
|
+
}
|
|
4101
|
+
function c() {
|
|
4102
|
+
t.emit("moveNext");
|
|
4103
|
+
}
|
|
4104
|
+
function m() {
|
|
4105
|
+
t.emit("moveBottom");
|
|
4106
|
+
}
|
|
4107
|
+
return () => i("div", {
|
|
4108
|
+
class: "px-2 d-flex align-items-center",
|
|
4109
|
+
style: "height: 36px;background: #f0f0f0; margin-left: 14px; margin-right: 14px;"
|
|
4110
|
+
}, [i("button", {
|
|
4111
|
+
type: "button",
|
|
4112
|
+
onClick: a,
|
|
4113
|
+
class: "btn btn-default f-btn-ml"
|
|
4114
|
+
}, [i("span", {
|
|
4115
|
+
class: "f-icon f-icon-add",
|
|
4116
|
+
style: n
|
|
4117
|
+
}, null), X("添加")]), i("button", {
|
|
4118
|
+
type: "button",
|
|
4119
|
+
onClick: o,
|
|
4120
|
+
disabled: !e.canClear.value,
|
|
4121
|
+
class: "btn btn-default f-btn-ml"
|
|
4122
|
+
}, [i("span", {
|
|
4123
|
+
class: "f-icon f-icon-close",
|
|
4124
|
+
style: n
|
|
4125
|
+
}, null), X("清空")]), i("button", {
|
|
4126
|
+
type: "button",
|
|
4127
|
+
onClick: r,
|
|
4128
|
+
disabled: !e.canMove.value("up"),
|
|
4129
|
+
class: "btn btn-default f-btn-ml"
|
|
4130
|
+
}, [i("span", {
|
|
4131
|
+
class: "f-icon f-icon-arrow-end-up",
|
|
4132
|
+
style: n
|
|
4133
|
+
}, null), X("置顶")]), i("button", {
|
|
4134
|
+
type: "button",
|
|
4135
|
+
onClick: u,
|
|
4136
|
+
disabled: !e.canMove.value("up"),
|
|
4137
|
+
class: "btn btn-default f-btn-ml"
|
|
4138
|
+
}, [i("span", {
|
|
4139
|
+
class: "f-icon f-icon-arrow-60-up",
|
|
4140
|
+
style: n
|
|
4141
|
+
}, null), X("上移")]), i("button", {
|
|
4142
|
+
type: "button",
|
|
4143
|
+
onClick: c,
|
|
4144
|
+
disabled: !e.canMove.value("down"),
|
|
4145
|
+
class: "btn btn-default f-btn-ml"
|
|
4146
|
+
}, [i("span", {
|
|
4147
|
+
class: "f-icon f-icon-arrow-60-down",
|
|
4148
|
+
style: n
|
|
4149
|
+
}, null), X("下移")]), i("button", {
|
|
4150
|
+
type: "button",
|
|
4151
|
+
onClick: m,
|
|
4152
|
+
disabled: !e.canMove.value("down"),
|
|
4153
|
+
class: "btn btn-default f-btn-ml"
|
|
4154
|
+
}, [i("span", {
|
|
4155
|
+
class: "f-icon f-icon-arrow-end-down",
|
|
4156
|
+
style: n
|
|
4157
|
+
}, null), X("置底")])]);
|
|
4158
|
+
}
|
|
4159
|
+
}), dn = /* @__PURE__ */ K({
|
|
4160
|
+
name: "sort-editor-grid",
|
|
4161
|
+
props: _e,
|
|
4162
|
+
emits: ["insert", "remove", "rowClick"],
|
|
4163
|
+
setup(e, t) {
|
|
4164
|
+
const {
|
|
4165
|
+
sortTypes: l
|
|
4166
|
+
} = Qe(), {
|
|
4167
|
+
renderFieldsComboTree: n
|
|
4168
|
+
} = tt(e), a = s(), {
|
|
4169
|
+
conditions: o,
|
|
4170
|
+
fields: r,
|
|
4171
|
+
onInsert: u,
|
|
4172
|
+
onRemove: c,
|
|
4173
|
+
onRowClick: m,
|
|
4174
|
+
activeRowCls: C,
|
|
4175
|
+
itemIntoView: h
|
|
4176
|
+
} = lt(e, t, a);
|
|
4177
|
+
return Me(() => {
|
|
4178
|
+
h();
|
|
4179
|
+
}), () => i("div", {
|
|
4180
|
+
class: "table-body f-utils-fill win11Scroll show nobtn ",
|
|
4181
|
+
style: "margin-left:14px; margin-right: 0; overflow-y: scroll;"
|
|
4182
|
+
}, [i("table", {
|
|
4183
|
+
class: "table table-bordered",
|
|
4184
|
+
style: "margin-bottom: 0;"
|
|
4185
|
+
}, [i("thead", {
|
|
4186
|
+
style: "position: sticky; top: 0; z-index: 1;"
|
|
4187
|
+
}, [i("tr", null, [i("th", {
|
|
4188
|
+
style: "width: 40px"
|
|
4189
|
+
}, null), i("th", {
|
|
4190
|
+
style: "width: 100px"
|
|
4191
|
+
}, [i("b", null, [X("字段")])]), i("th", {
|
|
4192
|
+
style: "width: 60px"
|
|
4193
|
+
}, [i("b", null, [X("排序")])])])]), i("tbody", {
|
|
4194
|
+
ref: a
|
|
4195
|
+
}, [o.value.map((v, y) => i("tr", {
|
|
4196
|
+
index: y,
|
|
4197
|
+
class: C.value(y),
|
|
4198
|
+
onClick: (d) => m(v, y)
|
|
4199
|
+
}, [i("td", {
|
|
4200
|
+
style: "text-overflow: unset;",
|
|
4201
|
+
align: "center",
|
|
4202
|
+
class: "px-1"
|
|
4203
|
+
}, [i("button", {
|
|
4204
|
+
title: "插入",
|
|
4205
|
+
onClick: (d) => u(y, d),
|
|
4206
|
+
type: "button",
|
|
4207
|
+
class: "btn btn-link p-1 mr-0"
|
|
4208
|
+
}, [i("span", {
|
|
4209
|
+
class: "f-icon f-icon-plus"
|
|
4210
|
+
}, null)]), i("button", {
|
|
4211
|
+
title: "移除",
|
|
4212
|
+
onClick: (d) => c(y, d),
|
|
4213
|
+
type: "button",
|
|
4214
|
+
class: "btn btn-link p-1 m-0"
|
|
4215
|
+
}, [i("span", {
|
|
4216
|
+
class: "f-icon f-icon-minus"
|
|
4217
|
+
}, null)])]), i("td", {
|
|
4218
|
+
class: "px-1"
|
|
4219
|
+
}, [n(v, r.value, "sortField")]), i("td", {
|
|
4220
|
+
class: "px-1"
|
|
4221
|
+
}, [i(re, {
|
|
4222
|
+
data: l,
|
|
4223
|
+
textField: "label",
|
|
4224
|
+
valueField: "value",
|
|
4225
|
+
idField: "value",
|
|
4226
|
+
modelValue: v.sortType,
|
|
4227
|
+
"onUpdate:modelValue": (d) => v.sortType = d,
|
|
4228
|
+
enableClear: !1,
|
|
4229
|
+
minPanelWidth: 130,
|
|
4230
|
+
placement: "auto"
|
|
4231
|
+
}, null)])]))])])]);
|
|
4232
|
+
}
|
|
4233
|
+
});
|
|
4234
|
+
function fn(e, t) {
|
|
4235
|
+
const l = s(-1);
|
|
4236
|
+
function n() {
|
|
4237
|
+
return t.value[l.value];
|
|
4238
|
+
}
|
|
4239
|
+
function a() {
|
|
4240
|
+
t.value.length > 0 ? l.value = 0 : l.value = -1;
|
|
4241
|
+
}
|
|
4242
|
+
const o = S(() => e.displayText ? e.displayText : typeof e.modelValue == "string" ? e.modelValue : ""), r = e.editorType !== "sort" ? "filterField" : "sortField", u = e.editorType !== "sort" ? {
|
|
4243
|
+
filterField: "",
|
|
4244
|
+
value: "",
|
|
4245
|
+
lbracket: "",
|
|
4246
|
+
rbracket: "",
|
|
4247
|
+
relation: se.Empty,
|
|
4248
|
+
compare: Ze.Equal,
|
|
4249
|
+
expresstype: e.singleValue ? ee.Value : ee.Variable
|
|
4250
|
+
} : {
|
|
4251
|
+
sortField: "",
|
|
4252
|
+
sortType: "asc"
|
|
4253
|
+
}, c = S(() => t.value.length > 0), m = S(() => (B = "down") => t.value.length > 1 ? B === "up" ? l.value > 0 : l.value < t.value.length - 1 : !1);
|
|
4254
|
+
function C() {
|
|
4255
|
+
if (e.editorType === "filter")
|
|
4256
|
+
for (let B = 0; B < t.value.length - 1; B++) {
|
|
4257
|
+
const x = t.value[B];
|
|
4258
|
+
(x.relation === se.Empty || !x.relation) && (x.relation = se.And);
|
|
4259
|
+
}
|
|
4260
|
+
}
|
|
4261
|
+
function h() {
|
|
4262
|
+
const B = Object.assign({}, u);
|
|
4263
|
+
t.value = [...t.value, B];
|
|
4264
|
+
const x = t.value.length - 1;
|
|
4265
|
+
l.value = x, C();
|
|
4266
|
+
}
|
|
4267
|
+
function v({ index: B }) {
|
|
4268
|
+
const x = Object.assign({}, u);
|
|
4269
|
+
e.insertType === "above" ? B === 0 ? t.value.unshift(x) : t.value.splice(B, 0, x) : t.value.splice(B + 1, 0, x), t.value = [...t.value], C();
|
|
4270
|
+
}
|
|
4271
|
+
function y({ index: B }) {
|
|
4272
|
+
t.value.splice(B, 1), t.value = [...t.value], !(l.value < 0) && (B === l.value ? t.value[B] ? l.value = B : t.value[B - 1] ? l.value = B - 1 : l.value = -1 : B < l.value && (t.value[l.value - 1] ? l.value = l.value - 1 : t.value[l.value] || (l.value = -1)));
|
|
4273
|
+
}
|
|
4274
|
+
function d() {
|
|
4275
|
+
t.value = [];
|
|
4276
|
+
}
|
|
4277
|
+
function g() {
|
|
4278
|
+
l.value >= 0 && (t.value.unshift(n()), t.value.splice(l.value + 1, 1), l.value = 0);
|
|
4279
|
+
}
|
|
4280
|
+
function f() {
|
|
4281
|
+
if (l.value >= 0) {
|
|
4282
|
+
const B = l.value, x = t.value.splice(B, 1);
|
|
4283
|
+
t.value.splice(B - 1, 0, ...x), l.value = B - 1;
|
|
4284
|
+
}
|
|
4285
|
+
}
|
|
4286
|
+
function p() {
|
|
4287
|
+
if (l.value >= 0) {
|
|
4288
|
+
const B = l.value, x = t.value.splice(B, 1);
|
|
4289
|
+
t.value.splice(B + 1, 0, ...x), l.value = B + 1;
|
|
4290
|
+
}
|
|
4291
|
+
}
|
|
4292
|
+
function b() {
|
|
4293
|
+
l.value >= 0 && (t.value.push(n()), t.value.splice(l.value, 1), l.value = t.value.length - 1);
|
|
4294
|
+
}
|
|
4295
|
+
function F({ index: B }) {
|
|
4296
|
+
l.value = B;
|
|
4297
|
+
}
|
|
4298
|
+
function P(B) {
|
|
4299
|
+
if (B.length % 2 !== 0)
|
|
4300
|
+
return !1;
|
|
4301
|
+
let x = "";
|
|
4302
|
+
for (const E of B)
|
|
4303
|
+
if (E === "(")
|
|
4304
|
+
x += E;
|
|
4305
|
+
else if (E === ")") {
|
|
4306
|
+
if (!x.endsWith("("))
|
|
4307
|
+
return !1;
|
|
4308
|
+
x = x.slice(0, -1);
|
|
4309
|
+
}
|
|
4310
|
+
return x.length === 0;
|
|
4311
|
+
}
|
|
4312
|
+
function M() {
|
|
4313
|
+
const B = t.value.length;
|
|
4314
|
+
if (!B)
|
|
4315
|
+
return !0;
|
|
4316
|
+
let x = !0, E = !0;
|
|
4317
|
+
if (e.editorType !== "sort") {
|
|
4318
|
+
t.value[B - 1].relation = se.Empty, E = !t.value.slice(0, -1).some(
|
|
4319
|
+
(O) => O.relation === se.Empty || !O.relation
|
|
4320
|
+
);
|
|
4321
|
+
const I = t.value.flatMap((O) => [O.lbracket, O.rbracket]).join("");
|
|
4322
|
+
x = P(I);
|
|
4323
|
+
}
|
|
4324
|
+
const j = t.value.some(($) => !$[r]);
|
|
4325
|
+
return [
|
|
4326
|
+
{ result: x, message: "括号不匹配,请检查。" },
|
|
4327
|
+
{ result: E, message: "关系设置不完整,请检查。" },
|
|
4328
|
+
{ result: !j, message: "字段不允许为空,请检查。" }
|
|
4329
|
+
].find(($) => !$.result);
|
|
4330
|
+
}
|
|
4331
|
+
return {
|
|
4332
|
+
displayText: o,
|
|
4333
|
+
activeRowIndex: l,
|
|
4334
|
+
canClear: c,
|
|
4335
|
+
canMove: m,
|
|
4336
|
+
onAddFilter: h,
|
|
4337
|
+
onRemove: y,
|
|
4338
|
+
onInsert: v,
|
|
4339
|
+
onClear: d,
|
|
4340
|
+
onMoveTop: g,
|
|
4341
|
+
onMovePrev: f,
|
|
4342
|
+
onMoveNext: p,
|
|
4343
|
+
onMoveBottom: b,
|
|
4344
|
+
onSelectRow: F,
|
|
4345
|
+
validateCondition: M,
|
|
4346
|
+
resetActiveRow: a
|
|
4347
|
+
};
|
|
4348
|
+
}
|
|
4349
|
+
const vn = {
|
|
4350
|
+
showCloseButton: { type: Boolean, default: !0 },
|
|
4351
|
+
position: { type: String, default: "top-center" },
|
|
4352
|
+
timeout: { type: Number, default: 3e3 },
|
|
4353
|
+
theme: { type: String, default: "bootstrap" },
|
|
4354
|
+
left: { type: Number },
|
|
4355
|
+
right: { type: Number },
|
|
4356
|
+
top: { type: Number },
|
|
4357
|
+
bottom: { type: Number },
|
|
4358
|
+
id: { type: String },
|
|
4359
|
+
animate: { type: String, default: "fadeIn" },
|
|
4360
|
+
options: { type: Object },
|
|
4361
|
+
safeHtml: { type: Boolean, default: !0 }
|
|
4362
|
+
}, mn = {
|
|
4363
|
+
showCloseButton: { type: Boolean, default: !0 },
|
|
4364
|
+
animate: { type: String, default: "fadeIn" },
|
|
4365
|
+
options: { type: Object }
|
|
4366
|
+
}, Te = /* @__PURE__ */ K({
|
|
4367
|
+
name: "Toast",
|
|
4368
|
+
props: mn,
|
|
4369
|
+
emits: ["close", "click"],
|
|
4370
|
+
setup: (e, t) => {
|
|
4371
|
+
const l = s(e.animate), n = "fadeOut", a = S(() => e.options), o = s(!1), r = S(() => a.value.title && a.value.message), u = S(() => !a.value.title && a.value.message), c = S(() => {
|
|
4372
|
+
const b = {
|
|
4373
|
+
animated: o.value,
|
|
4374
|
+
toast: !0,
|
|
4375
|
+
"toast--only-content": !r.value
|
|
4376
|
+
};
|
|
4377
|
+
return b[e.animate] = !1, b[n] = o.value, b["toasty-type-" + a.value.type] = !0, a.value.theme && (b[a.value.theme] = !0), b;
|
|
4378
|
+
}), m = S(() => {
|
|
4379
|
+
const P = `f-icon-${a.value && a.value.type ? a.value.type.replace("toasty-type-", "") : "default"}`, M = {
|
|
4380
|
+
"f-icon": !0
|
|
4381
|
+
};
|
|
4382
|
+
return M[P] = !0, M;
|
|
4383
|
+
}), C = S(() => a.value.title || a.value.message), h = S(() => e.showCloseButton), v = S(() => !!a.value.buttons || !!t.slots.default), y = S(() => _.getLocale() === "en" ? {
|
|
4384
|
+
wordBreak: "keep-all",
|
|
4385
|
+
overflowWrap: "break-word"
|
|
4386
|
+
} : {});
|
|
4387
|
+
function d(b) {
|
|
4388
|
+
b.stopPropagation(), b.preventDefault(), o.value = !1, setTimeout(() => {
|
|
4389
|
+
t.emit("close", a.value);
|
|
4390
|
+
}, 200);
|
|
4391
|
+
}
|
|
4392
|
+
function g(b, F) {
|
|
4393
|
+
}
|
|
4394
|
+
function f(b) {
|
|
4395
|
+
return `f-preten-link ${b.customClass ? b.customClass : ""}`;
|
|
4396
|
+
}
|
|
4397
|
+
A(l, () => {
|
|
4398
|
+
l.value;
|
|
4399
|
+
});
|
|
4400
|
+
const p = () => {
|
|
4401
|
+
var b;
|
|
4402
|
+
return i(ie, null, [i("div", {
|
|
4403
|
+
class: "after-toast-msg text-right"
|
|
4404
|
+
}, [!t.slots.default && ((b = a.value.buttons) == null ? void 0 : b.map((F) => i("span", {
|
|
4405
|
+
class: f(F),
|
|
4406
|
+
onClick: (P) => void 0
|
|
4407
|
+
}, [F.text]))), t.slots.default && t.slots.default()])]);
|
|
4408
|
+
};
|
|
4409
|
+
return () => i("div", {
|
|
4410
|
+
class: c.value,
|
|
4411
|
+
style: "min-height:44px"
|
|
4412
|
+
}, [h.value && i("button", {
|
|
4413
|
+
title: _.getLocaleValue("messageBox.close"),
|
|
4414
|
+
class: "toast-close f-btn-icon f-bare",
|
|
4415
|
+
onClick: d
|
|
4416
|
+
}, [i("span", {
|
|
4417
|
+
class: "f-icon modal_close"
|
|
4418
|
+
}, null)]), C.value && i("section", {
|
|
4419
|
+
class: "modal-tips"
|
|
4420
|
+
}, [!r.value && i("div", {
|
|
4421
|
+
class: "float-left modal-tips-iconwrap"
|
|
4422
|
+
}, [i("span", {
|
|
4423
|
+
class: m.value
|
|
4424
|
+
}, null)]), i("div", {
|
|
4425
|
+
class: "modal-tips-content"
|
|
4426
|
+
}, [r.value && i(ie, null, [i("h5", {
|
|
4427
|
+
class: "toast-title modal-tips-title",
|
|
4428
|
+
innerHTML: a.value.title
|
|
4429
|
+
}, null), i("p", {
|
|
4430
|
+
class: "toast-msg",
|
|
4431
|
+
innerHTML: a.value.message,
|
|
4432
|
+
style: y.value
|
|
4433
|
+
}, null), v.value && p()]), u.value && (a.value.buttons ? i("div", {
|
|
4434
|
+
class: "toast-title-btns-wrapper d-flex"
|
|
4435
|
+
}, [i("h5", {
|
|
4436
|
+
class: "toast-title modal-tips-title only-toast-msg",
|
|
4437
|
+
style: y.value,
|
|
4438
|
+
innerHTML: a.value.message
|
|
4439
|
+
}, null), i("div", {
|
|
4440
|
+
class: "after-toast-title text-right ml-auto"
|
|
4441
|
+
}, [p()])]) : i("h5", {
|
|
4442
|
+
class: "toast-title modal-tips-title only-toast-msg",
|
|
4443
|
+
style: y.value,
|
|
4444
|
+
innerHTML: a.value.message
|
|
4445
|
+
}, null))])])]);
|
|
4446
|
+
}
|
|
4447
|
+
}), he = /* @__PURE__ */ K({
|
|
4448
|
+
name: "Notify",
|
|
4449
|
+
props: vn,
|
|
4450
|
+
emits: ["close", "empty"],
|
|
4451
|
+
setup(e, t) {
|
|
4452
|
+
const l = S(() => ({
|
|
4453
|
+
"farris-notify": !0
|
|
4454
|
+
})), n = {
|
|
4455
|
+
left: 12,
|
|
4456
|
+
right: 12,
|
|
4457
|
+
top: 20,
|
|
4458
|
+
bottom: 12
|
|
4459
|
+
}, a = s(), o = s(e.options), r = s(e.showCloseButton), u = S(() => e.position || "bottom-right"), c = S(() => e.timeout != null ? e.timeout : 3e3), m = S(() => {
|
|
4460
|
+
const v = e.bottom ? e.bottom : n.bottom, y = e.top ? e.top : n.top, d = {
|
|
4461
|
+
transition: "all 0.2s ease",
|
|
4462
|
+
left: u.value.indexOf("left") > -1 ? `${e.left ? e.left : n.left}px` : "",
|
|
4463
|
+
right: u.value.indexOf("right") > -1 ? `${e.right ? e.right : n.right}px` : "",
|
|
4464
|
+
top: u.value.indexOf("top") > -1 ? `${y}px` : "",
|
|
4465
|
+
bottom: u.value.indexOf("bottom") > -1 ? `${v}px` : ""
|
|
4466
|
+
};
|
|
4467
|
+
return u.value.indexOf("center") > -1 && (d.left = "50%", d.marginLeft = "calc(-24rem / 2)", u.value === "center-center" && (d.top = "50%", d.transform = "translate(-50%, -50%)")), d;
|
|
4468
|
+
});
|
|
4469
|
+
function C(v) {
|
|
4470
|
+
t.emit("close");
|
|
4471
|
+
}
|
|
4472
|
+
c.value && setTimeout(() => {
|
|
4473
|
+
C();
|
|
4474
|
+
}, c.value), t.expose({
|
|
4475
|
+
closeToast: C,
|
|
4476
|
+
container: a,
|
|
4477
|
+
notifyPosition: u
|
|
4478
|
+
});
|
|
4479
|
+
function h(v, y) {
|
|
4480
|
+
C();
|
|
4481
|
+
}
|
|
4482
|
+
return () => i("div", {
|
|
4483
|
+
class: l.value,
|
|
4484
|
+
style: m.value,
|
|
4485
|
+
ref: a
|
|
4486
|
+
}, [i(Te, {
|
|
4487
|
+
options: o.value,
|
|
4488
|
+
showCloseButton: r.value,
|
|
4489
|
+
animate: e.animate,
|
|
4490
|
+
onClose: (v) => h(v, o.value)
|
|
4491
|
+
}, null)]);
|
|
4492
|
+
}
|
|
4493
|
+
});
|
|
4494
|
+
class hn {
|
|
4495
|
+
constructor() {
|
|
4496
|
+
Z(this, "notifyRefs", []);
|
|
4497
|
+
Z(this, "globalConfig", te({}));
|
|
4498
|
+
}
|
|
4499
|
+
escapeAllHtml(t) {
|
|
4500
|
+
if (typeof t != "string" || !t)
|
|
4501
|
+
return "";
|
|
4502
|
+
const l = document.createElement("div");
|
|
4503
|
+
return l.textContent = t || "", l.innerHTML.replace(/\\n/g, "<br>").replace(/\\t/g, " ").replace(/\\r/g, "");
|
|
4504
|
+
}
|
|
4505
|
+
createNotifyInstance(t) {
|
|
4506
|
+
const l = this, a = Object.assign({
|
|
4507
|
+
timeout: 3e3,
|
|
4508
|
+
position: "bottom-right",
|
|
4509
|
+
showCloseButton: !0,
|
|
4510
|
+
safeHtml: !0
|
|
4511
|
+
}, this.globalConfig, {
|
|
4512
|
+
...t
|
|
4513
|
+
}), o = document.createElement("div");
|
|
4514
|
+
o.style.display = "contents";
|
|
4515
|
+
const r = ke({
|
|
4516
|
+
setup() {
|
|
4517
|
+
var m;
|
|
4518
|
+
const u = s();
|
|
4519
|
+
function c() {
|
|
4520
|
+
u.value.container.style.transform = "scale(0)", setTimeout(() => {
|
|
4521
|
+
l.updateNotifyPositionForClose(a, u), r.unmount();
|
|
4522
|
+
}, 220);
|
|
4523
|
+
}
|
|
4524
|
+
if (a.position.indexOf("top") > -1) {
|
|
4525
|
+
const C = l.getNotifyInstances(a.position), h = C[C.length - 1];
|
|
4526
|
+
if (h) {
|
|
4527
|
+
const v = h.value.container.getBoundingClientRect();
|
|
4528
|
+
a.top = v.bottom;
|
|
4529
|
+
}
|
|
4530
|
+
}
|
|
4531
|
+
return a.safeHtml && ((m = a.options) != null && m.message) && (a.options.message = l.escapeAllHtml(a.options.message)), ye(() => {
|
|
4532
|
+
document.body.removeChild(o);
|
|
4533
|
+
}), le(() => {
|
|
4534
|
+
l.updateNotifyPositionForCreate(a, u);
|
|
4535
|
+
}), () => i(We, {
|
|
4536
|
+
mode: "out-in",
|
|
4537
|
+
name: "fade",
|
|
4538
|
+
appear: !0
|
|
4539
|
+
}, {
|
|
4540
|
+
default: () => [i(he, ve({
|
|
4541
|
+
ref: u
|
|
4542
|
+
}, a, {
|
|
4543
|
+
onClose: c
|
|
4544
|
+
}), null)]
|
|
4545
|
+
});
|
|
4546
|
+
}
|
|
4547
|
+
});
|
|
4548
|
+
return r.provide("NotifyService", this), document.body.appendChild(o), r.use(_.i18n), r.mount(o), r;
|
|
4549
|
+
}
|
|
4550
|
+
getNotifyInstances(t) {
|
|
4551
|
+
return this.notifyRefs.filter((l) => l.value.notifyPosition === t);
|
|
4552
|
+
}
|
|
4553
|
+
updateNotifyPositionForCreate(t, l) {
|
|
4554
|
+
if (this.notifyRefs && this.notifyRefs.length) {
|
|
4555
|
+
const n = window.innerHeight;
|
|
4556
|
+
t.position.indexOf("bottom") > -1 && this.getNotifyInstances(t.position).forEach((a) => {
|
|
4557
|
+
const o = a.value.container.getBoundingClientRect();
|
|
4558
|
+
a.value.container.style.bottom = o.height + n - o.bottom + "px";
|
|
4559
|
+
});
|
|
4560
|
+
}
|
|
4561
|
+
this.notifyRefs = [...this.notifyRefs, l];
|
|
4562
|
+
}
|
|
4563
|
+
updateNotifyPositionForClose(t, l) {
|
|
4564
|
+
const n = this.notifyRefs.indexOf(l);
|
|
4565
|
+
if (t.position.indexOf("top") > -1) {
|
|
4566
|
+
const a = this.getNotifyInstances(t.position), o = a.indexOf(l);
|
|
4567
|
+
a.slice(o + 1).forEach((r) => {
|
|
4568
|
+
r.value.container.style.top = r.value.container.offsetTop - r.value.container.offsetHeight + "px";
|
|
4569
|
+
});
|
|
4570
|
+
}
|
|
4571
|
+
n > -1 && this.notifyRefs.splice(n, 1);
|
|
4572
|
+
}
|
|
4573
|
+
show(t) {
|
|
4574
|
+
return this.createNotifyInstance(t);
|
|
4575
|
+
}
|
|
4576
|
+
buildNotifyProps(t, l) {
|
|
4577
|
+
let n = "", a = "", o, r, u;
|
|
4578
|
+
typeof l == "string" ? n = l : l && (n = l.message || "", a = l.title || "", r = l.position || null, u = l.showCloseButton != null ? l.showCloseButton : null, o = l.timeout != null ? l.timeout : null);
|
|
4579
|
+
const m = {
|
|
4580
|
+
options: {
|
|
4581
|
+
type: t,
|
|
4582
|
+
message: n,
|
|
4583
|
+
title: a
|
|
4584
|
+
}
|
|
4585
|
+
};
|
|
4586
|
+
return r != null && (m.position = r), u != null && (m.showCloseButton = u), o != null && (m.timeout = o), m;
|
|
4587
|
+
}
|
|
4588
|
+
info(t) {
|
|
4589
|
+
const l = this.buildNotifyProps("info", t);
|
|
4590
|
+
return this.show(l);
|
|
4591
|
+
}
|
|
4592
|
+
success(t) {
|
|
4593
|
+
const l = this.buildNotifyProps("success", t);
|
|
4594
|
+
return this.show(l);
|
|
4595
|
+
}
|
|
4596
|
+
warning(t) {
|
|
4597
|
+
const l = this.buildNotifyProps("warning", t);
|
|
4598
|
+
return this.show(l);
|
|
4599
|
+
}
|
|
4600
|
+
error(t) {
|
|
4601
|
+
const l = this.buildNotifyProps("error", t);
|
|
4602
|
+
return this.show(l);
|
|
4603
|
+
}
|
|
4604
|
+
close(t) {
|
|
4605
|
+
t && t.unmount();
|
|
4606
|
+
}
|
|
4607
|
+
closeAll() {
|
|
4608
|
+
this.notifyRefs.forEach((t) => {
|
|
4609
|
+
t == null || t.value.closeToast();
|
|
4610
|
+
}), this.notifyRefs.length = 0;
|
|
4611
|
+
}
|
|
4612
|
+
}
|
|
4613
|
+
const nt = Symbol("NOTIFY_SERVICE_TOKEN");
|
|
4614
|
+
he.install = (e) => {
|
|
4615
|
+
e.component(he.name, he), e.component(Te.name, Te);
|
|
4616
|
+
const t = new hn();
|
|
4617
|
+
e.provide(nt, t), e.provide("FNotifyService", t);
|
|
4618
|
+
};
|
|
4619
|
+
const Se = /* @__PURE__ */ K({
|
|
4620
|
+
name: "filter-condition-editor",
|
|
4621
|
+
props: wl,
|
|
4622
|
+
emits: ["update:modelValue"],
|
|
4623
|
+
setup(e, t) {
|
|
4624
|
+
const l = oe(e.repositoryToken), n = oe(nt), a = oe("FLoadingService");
|
|
4625
|
+
n && (n.globalConfig = {
|
|
4626
|
+
position: "top-center"
|
|
4627
|
+
});
|
|
4628
|
+
const o = s(e.expressionOptions || {}), r = s(e.formContextData || {}), u = s(e.fields || []), c = '<i class="f-icon f-icon-lookup"></i>', m = s([]), C = s([]), {
|
|
4629
|
+
displayText: h,
|
|
4630
|
+
onAddFilter: v,
|
|
4631
|
+
onClear: y,
|
|
4632
|
+
onMoveBottom: d,
|
|
4633
|
+
onMoveNext: g,
|
|
4634
|
+
onMovePrev: f,
|
|
4635
|
+
onMoveTop: p,
|
|
4636
|
+
onInsert: b,
|
|
4637
|
+
onRemove: F,
|
|
4638
|
+
activeRowIndex: P,
|
|
4639
|
+
onSelectRow: M,
|
|
4640
|
+
canClear: B,
|
|
4641
|
+
canMove: x,
|
|
4642
|
+
validateCondition: E,
|
|
4643
|
+
resetActiveRow: j
|
|
4644
|
+
} = fn(e, m), $ = S(() => e.editorType === "sort" ? "排序条件编辑器" : "过滤条件编辑器");
|
|
4645
|
+
function I() {
|
|
4646
|
+
return e.editorType === "sort" ? i(dn, {
|
|
4647
|
+
conditions: m.value,
|
|
4648
|
+
fields: u.value,
|
|
4649
|
+
activeIndex: P.value,
|
|
4650
|
+
onInsert: (T) => b(T),
|
|
4651
|
+
onRemove: (T) => F(T),
|
|
4652
|
+
idField: e.idField,
|
|
4653
|
+
onRowClick: (T) => M(T)
|
|
4654
|
+
}, null) : i(Xl, {
|
|
4655
|
+
singleValue: e.singleValue,
|
|
4656
|
+
expressionOptions: o.value,
|
|
4657
|
+
enableExpression: e.enableExpression,
|
|
4658
|
+
conditions: m.value,
|
|
4659
|
+
fields: u.value,
|
|
4660
|
+
idField: e.idField,
|
|
4661
|
+
activeIndex: P.value,
|
|
4662
|
+
onInsert: (T) => b(T),
|
|
4663
|
+
onRemove: (T) => F(T),
|
|
4664
|
+
onRowClick: (T) => M(T),
|
|
4665
|
+
formContextData: r.value
|
|
4666
|
+
}, null);
|
|
4667
|
+
}
|
|
4668
|
+
const O = S(() => JSON.stringify(m.value) === JSON.stringify(C.value)), z = S(() => e.disableConfirmWhenUnchanged && O.value);
|
|
4669
|
+
async function D() {
|
|
4670
|
+
if (t.emit("update:modelValue", m.value), e.onSubmitModal) {
|
|
4671
|
+
a == null || a.show();
|
|
4672
|
+
const T = await e.onSubmitModal({
|
|
4673
|
+
loadingService: a,
|
|
4674
|
+
repository: l,
|
|
4675
|
+
conditions: m,
|
|
4676
|
+
originalConditions: C,
|
|
4677
|
+
FMessageBoxService: ce
|
|
4678
|
+
});
|
|
4679
|
+
return a == null || a.clearAll(), T && (P.value = -1, n.success("过滤条件配置成功!")), T;
|
|
4680
|
+
}
|
|
4681
|
+
return !0;
|
|
4682
|
+
}
|
|
4683
|
+
const V = {
|
|
4684
|
+
title: $.value,
|
|
4685
|
+
width: 800,
|
|
4686
|
+
height: 600,
|
|
4687
|
+
fitContent: !1,
|
|
4688
|
+
minWidth: 300,
|
|
4689
|
+
minHeight: 200,
|
|
4690
|
+
showMaxButton: !0,
|
|
4691
|
+
resizeable: !0,
|
|
4692
|
+
draggable: !0,
|
|
4693
|
+
closedCallback: () => {
|
|
4694
|
+
P.value = -1;
|
|
4695
|
+
},
|
|
4696
|
+
buttons: [{
|
|
4697
|
+
name: "cancel",
|
|
4698
|
+
text: "取消",
|
|
4699
|
+
class: "btn btn-secondary",
|
|
4700
|
+
handle: (T) => !0
|
|
4701
|
+
}, {
|
|
4702
|
+
name: "accept",
|
|
4703
|
+
text: "确定",
|
|
4704
|
+
class: "btn btn-primary",
|
|
4705
|
+
disabled: z,
|
|
4706
|
+
handle: async (T) => {
|
|
4707
|
+
const H = E();
|
|
4708
|
+
return O.value ? !0 : typeof H == "object" && H !== null && H && H.message ? (n.warning(H.message), !1) : await D();
|
|
4709
|
+
}
|
|
4710
|
+
}]
|
|
4711
|
+
};
|
|
4712
|
+
async function R() {
|
|
4713
|
+
if (e.beforeOpen)
|
|
4714
|
+
try {
|
|
4715
|
+
a == null || a.show();
|
|
4716
|
+
const T = await e.beforeOpen({
|
|
4717
|
+
repository: l,
|
|
4718
|
+
notifyService: n
|
|
4719
|
+
});
|
|
4720
|
+
if (T) {
|
|
4721
|
+
const {
|
|
4722
|
+
fieldList: H,
|
|
4723
|
+
conditionList: N,
|
|
4724
|
+
entities: U,
|
|
4725
|
+
variables: pe,
|
|
4726
|
+
formContextData: ue,
|
|
4727
|
+
isServerSide: be
|
|
4728
|
+
} = T;
|
|
4729
|
+
return u.value = H || [], m.value = N || [], C.value = JSON.parse(JSON.stringify(m.value)), o.value = {
|
|
4730
|
+
entities: U,
|
|
4731
|
+
variables: pe,
|
|
4732
|
+
isServerSide: be
|
|
4733
|
+
}, r.value = ue || {}, a == null || a.clearAll(), j(), !0;
|
|
4734
|
+
}
|
|
4735
|
+
} catch {
|
|
4736
|
+
return n == null || n.error({
|
|
4737
|
+
message: "获取数据失败!"
|
|
4738
|
+
}), !1;
|
|
4739
|
+
} finally {
|
|
4740
|
+
a == null || a.clearAll();
|
|
4741
|
+
}
|
|
4742
|
+
return j(), !0;
|
|
4743
|
+
}
|
|
4744
|
+
function W() {
|
|
4745
|
+
t.emit("update:modelValue", "");
|
|
4746
|
+
}
|
|
4747
|
+
function k(T) {
|
|
4748
|
+
t.emit("update:modelValue", T);
|
|
4749
|
+
}
|
|
4750
|
+
return () => i(Oe, {
|
|
4751
|
+
modelValue: h.value,
|
|
4752
|
+
editable: e.editable,
|
|
4753
|
+
disabled: e.disabled,
|
|
4754
|
+
readonly: e.readonly,
|
|
4755
|
+
inputType: "text",
|
|
4756
|
+
enableClear: e.enableClear,
|
|
4757
|
+
buttonContent: c,
|
|
4758
|
+
buttonBehavior: "Modal",
|
|
4759
|
+
modalOptions: V,
|
|
4760
|
+
beforeOpen: R,
|
|
4761
|
+
onClear: W,
|
|
4762
|
+
enableTitle: e.enableTitle,
|
|
4763
|
+
"onUpdate:modelValue": k
|
|
4764
|
+
}, {
|
|
4765
|
+
default: () => [i("div", {
|
|
4766
|
+
class: "h-100 d-flex flex-column"
|
|
4767
|
+
}, [i("div", {
|
|
4768
|
+
style: "border-top: 1px solid white; position: absolute; top: 0; width: 100%; z-index: 2;",
|
|
4769
|
+
class: "shading-border-top"
|
|
4770
|
+
}, null), I(), i(cn, {
|
|
4771
|
+
canClear: B,
|
|
4772
|
+
canMove: x,
|
|
4773
|
+
onAdd: v,
|
|
4774
|
+
onClear: y,
|
|
4775
|
+
onMoveBottom: d,
|
|
4776
|
+
onMoveNext: g,
|
|
4777
|
+
onMovePrev: f,
|
|
4778
|
+
onMoveTop: p
|
|
4779
|
+
}, null)])]
|
|
4780
|
+
});
|
|
4781
|
+
}
|
|
4782
|
+
}), yn = Fe(Bt, tl), Hn = {
|
|
4783
|
+
install(e) {
|
|
4784
|
+
e.component(Se.name, Se);
|
|
4785
|
+
},
|
|
4786
|
+
register(e, t, l, n) {
|
|
4787
|
+
e["filter-condition-editor"] = Se, t["filter-condition-editor"] = yn;
|
|
4788
|
+
}
|
|
4789
|
+
};
|
|
4790
|
+
export {
|
|
4791
|
+
cn as ConditionActions,
|
|
4792
|
+
Se as FilterConditionEditor,
|
|
4793
|
+
Hn as default,
|
|
4794
|
+
yn as propsResolver
|
|
4795
|
+
};
|