@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
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { LocaleService as
|
|
6
|
-
import { getMaxZIndex as
|
|
1
|
+
var wn = Object.defineProperty;
|
|
2
|
+
var xn = (e, t, n) => t in e ? wn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var me = (e, t, n) => xn(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { defineComponent as Se, ref as r, computed as y, createVNode as l, Teleport as Bt, createApp as rt, onUnmounted as Xe, Fragment as pe, watch as Z, nextTick as Ne, onBeforeMount as Bn, onMounted as ze, watchEffect as Sn, Transition as St, shallowRef as Tn, render as lt, h as Mn, cloneVNode as kn, mergeProps as tt, inject as Ze, withDirectives as On, vShow as Fn, onUpdated as In, onBeforeUnmount as En, createTextVNode as Be, reactive as ge, isVNode as Tt, Comment as Pn, provide as Rn } from "vue";
|
|
5
|
+
import { LocaleService as Ce } from "../locale/index.esm.js";
|
|
6
|
+
import { isMobilePhone as Dn, getMaxZIndex as bt, useGuid as Hn, withInstall as Mt, useCommonUtils as jn, getCustomClass as Vn } from "../common/index.esm.js";
|
|
7
7
|
import "../property-panel/index.esm.js";
|
|
8
|
-
import
|
|
9
|
-
import { debounce as
|
|
10
|
-
import
|
|
11
|
-
import { useResizeObserver as
|
|
12
|
-
import { CellMode as
|
|
13
|
-
import
|
|
14
|
-
|
|
8
|
+
import Nn from "../tags/index.esm.js";
|
|
9
|
+
import { debounce as zn, cloneDeep as Ln } from "lodash-es";
|
|
10
|
+
import An from "../popover/index.esm.js";
|
|
11
|
+
import { useResizeObserver as Wn } from "@vueuse/core";
|
|
12
|
+
import { CellMode as Gn, useMobile as $n, useIdentify as Un, useGroupData as Kn, useFilter as _n, useHierarchy as Yn, useLoading as qn, useDataView as Xn, usePagination as Jn, useSelection as Zn, useDataViewContainerStyle as Qn, useCommandColumn as ea, useSettingColumn as ta, useColumn as na, useSort as aa, useGroupColumn as oa, useRow as la, useEdit as sa, useVisualDataBound as ua, useVisualDataCell as ia, useVisualDataRow as ra, useVisualGroupRow as ca, useVisualSummaryRow as da, useVisualData as fa, useCellContentStyle as va, useCellPosition as ma, useSidebar as ha, useVirtualScroll as ga, useFitColumn as pa, useFilterHistory as ya, useColumnFilter as ba, useDragColumn as Ca, getColumnHeader as wa, getPagination as xa, getSidebar as Ba, getDisableMask as Sa, getSummary as Ta, getHorizontalScrollbar as Ma, getVerticalScrollbar as ka, getFilterPanel as Oa, getGroupPanel as Fa, useNavigation as Ia, getEmpty as Ea, COMMAND_COLUMN_DATA_TYPE as Ct, SETTING_COLUMN_DATA_TYPE as wt } from "../data-view/index.esm.js";
|
|
13
|
+
import xt from "../button/index.esm.js";
|
|
14
|
+
import Pa from "../drawer/index.esm.js";
|
|
15
|
+
import Ra, { FDynamicFormLabel as Da } from "../dynamic-form/index.esm.js";
|
|
16
|
+
import { createPropsResolver as Ha } from "../dynamic-resolver/index.esm.js";
|
|
17
|
+
const ja = {
|
|
15
18
|
/**
|
|
16
19
|
* 组件标识
|
|
17
20
|
*/
|
|
@@ -131,65 +134,65 @@ const ga = {
|
|
|
131
134
|
*/
|
|
132
135
|
limitContentBySpace: { type: Boolean, default: !1 },
|
|
133
136
|
beforeClosePopup: { type: Function, default: null }
|
|
134
|
-
},
|
|
137
|
+
}, Va = {
|
|
135
138
|
popupContentPosition: { type: Object, default: { left: 0, top: 0 } },
|
|
136
139
|
host: { type: Object },
|
|
137
140
|
backgroundColor: { type: String, default: "" }
|
|
138
|
-
},
|
|
141
|
+
}, Na = /* @__PURE__ */ Se({
|
|
139
142
|
name: "FOverlay",
|
|
140
|
-
props:
|
|
143
|
+
props: Va,
|
|
141
144
|
emits: ["click"],
|
|
142
145
|
setup(e, t) {
|
|
143
|
-
const n = r(e.popupContentPosition), a = r(e.host), o =
|
|
146
|
+
const n = r(e.popupContentPosition), a = r(e.host), o = y(() => ({
|
|
144
147
|
backgroundColor: e.backgroundColor || "",
|
|
145
148
|
pointerEvents: "auto"
|
|
146
149
|
}));
|
|
147
|
-
function
|
|
148
|
-
t.emit("click"),
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
const
|
|
152
|
-
if (
|
|
153
|
-
const
|
|
154
|
-
left:
|
|
155
|
-
top:
|
|
156
|
-
height:
|
|
157
|
-
} =
|
|
150
|
+
function s(u) {
|
|
151
|
+
t.emit("click"), u.preventDefault(), u.stopPropagation();
|
|
152
|
+
}
|
|
153
|
+
y(() => {
|
|
154
|
+
const u = a.value;
|
|
155
|
+
if (u) {
|
|
156
|
+
const v = u.getBoundingClientRect(), {
|
|
157
|
+
left: f,
|
|
158
|
+
top: p,
|
|
159
|
+
height: w
|
|
160
|
+
} = v;
|
|
158
161
|
return {
|
|
159
|
-
left:
|
|
160
|
-
top:
|
|
162
|
+
left: f,
|
|
163
|
+
top: p + w
|
|
161
164
|
};
|
|
162
165
|
}
|
|
163
166
|
return n.value;
|
|
164
167
|
});
|
|
165
|
-
const
|
|
168
|
+
const i = y(() => ({
|
|
166
169
|
// position: 'relative',
|
|
167
170
|
// left: `${position.value.left}px`,
|
|
168
171
|
// top: `${position.value.top}px`
|
|
169
172
|
}));
|
|
170
|
-
return () =>
|
|
173
|
+
return () => l(Bt, {
|
|
171
174
|
to: "body"
|
|
172
175
|
}, {
|
|
173
176
|
default: () => {
|
|
174
|
-
var
|
|
175
|
-
return [
|
|
177
|
+
var u, v;
|
|
178
|
+
return [l("div", {
|
|
176
179
|
class: "overlay-container",
|
|
177
|
-
onClick: (
|
|
180
|
+
onClick: (f) => s(f),
|
|
178
181
|
style: o.value
|
|
179
|
-
}, [
|
|
180
|
-
style:
|
|
181
|
-
}, [(
|
|
182
|
+
}, [l("div", {
|
|
183
|
+
style: i.value
|
|
184
|
+
}, [(v = (u = t.slots).default) == null ? void 0 : v.call(u)])])];
|
|
182
185
|
}
|
|
183
186
|
});
|
|
184
187
|
}
|
|
185
188
|
});
|
|
186
|
-
function
|
|
189
|
+
function za(e) {
|
|
187
190
|
if (e.content && e.content.render)
|
|
188
191
|
return e.content.render;
|
|
189
192
|
if (e.render && typeof e.render == "function")
|
|
190
193
|
return e.render;
|
|
191
194
|
}
|
|
192
|
-
function
|
|
195
|
+
function La(e) {
|
|
193
196
|
const t = document.createElement("div");
|
|
194
197
|
t.style.display = "contents";
|
|
195
198
|
let n;
|
|
@@ -197,29 +200,29 @@ function Ca(e) {
|
|
|
197
200
|
}), o = () => {
|
|
198
201
|
a(), n && n.unmount();
|
|
199
202
|
};
|
|
200
|
-
return n =
|
|
203
|
+
return n = rt({
|
|
201
204
|
setup() {
|
|
202
|
-
|
|
205
|
+
Xe(() => {
|
|
203
206
|
document.body.removeChild(t);
|
|
204
207
|
});
|
|
205
|
-
const
|
|
206
|
-
return () =>
|
|
208
|
+
const s = za(e);
|
|
209
|
+
return () => l(Na, {
|
|
207
210
|
"popup-content-position": e.popupPosition,
|
|
208
211
|
host: e.host,
|
|
209
212
|
onClick: o,
|
|
210
213
|
backgroundColor: e.backgroundColor
|
|
211
214
|
}, {
|
|
212
|
-
default: () => [
|
|
215
|
+
default: () => [s && s()]
|
|
213
216
|
});
|
|
214
217
|
}
|
|
215
218
|
}), document.body.appendChild(t), n.mount(t), n;
|
|
216
219
|
}
|
|
217
|
-
class
|
|
220
|
+
class Aa {
|
|
218
221
|
static show(t) {
|
|
219
|
-
return
|
|
222
|
+
return La(t);
|
|
220
223
|
}
|
|
221
224
|
}
|
|
222
|
-
const
|
|
225
|
+
const Wa = {
|
|
223
226
|
/**
|
|
224
227
|
* 允许点击遮罩关闭对话框
|
|
225
228
|
*/
|
|
@@ -298,28 +301,29 @@ const xa = {
|
|
|
298
301
|
dialogType: { type: String, default: "" },
|
|
299
302
|
src: { type: String, default: "" },
|
|
300
303
|
footerHeight: { type: Number, default: 60 },
|
|
301
|
-
host: { type: Object, default: "body" }
|
|
304
|
+
host: { type: Object, default: "body" },
|
|
305
|
+
isMessager: { type: Boolean, default: !1 }
|
|
302
306
|
};
|
|
303
|
-
class
|
|
307
|
+
class ne {
|
|
304
308
|
constructor(t, n) {
|
|
305
309
|
this.x = t, this.y = n;
|
|
306
310
|
}
|
|
307
311
|
static getTransformInfo(t) {
|
|
308
312
|
const a = window.getComputedStyle(t).getPropertyValue("transform").replace(/[^-\d,]/g, "").split(",");
|
|
309
313
|
if (a.length >= 6) {
|
|
310
|
-
const o = parseInt(a[4], 10),
|
|
311
|
-
return { x: o, y:
|
|
314
|
+
const o = parseInt(a[4], 10), s = parseInt(a[5], 10);
|
|
315
|
+
return { x: o, y: s };
|
|
312
316
|
}
|
|
313
317
|
return { x: 0, y: 0 };
|
|
314
318
|
}
|
|
315
319
|
static fromEvent(t, n = null) {
|
|
316
320
|
if (this.isMouseEvent(t))
|
|
317
|
-
return new
|
|
321
|
+
return new ne(t.clientX, t.clientY);
|
|
318
322
|
if (n === null || t.changedTouches.length === 1)
|
|
319
|
-
return new
|
|
323
|
+
return new ne(t.changedTouches[0].clientX, t.changedTouches[0].clientY);
|
|
320
324
|
for (let a = 0; a < t.changedTouches.length; a++)
|
|
321
325
|
if (t.changedTouches[a].target === n)
|
|
322
|
-
return new
|
|
326
|
+
return new ne(t.changedTouches[a].clientX, t.changedTouches[a].clientY);
|
|
323
327
|
}
|
|
324
328
|
static isMouseEvent(t) {
|
|
325
329
|
return Object.prototype.toString.apply(t).indexOf("MouseEvent") === 8;
|
|
@@ -328,19 +332,19 @@ class ee {
|
|
|
328
332
|
return !!t && "x" in t && "y" in t;
|
|
329
333
|
}
|
|
330
334
|
static getCurrent(t) {
|
|
331
|
-
const n = new
|
|
335
|
+
const n = new ne(0, 0);
|
|
332
336
|
if (window) {
|
|
333
337
|
const a = window.getComputedStyle(t);
|
|
334
338
|
if (a) {
|
|
335
|
-
const o = parseInt(a.getPropertyValue("left"), 10),
|
|
336
|
-
n.x = isNaN(o) ? 0 : o, n.y = isNaN(
|
|
339
|
+
const o = parseInt(a.getPropertyValue("left"), 10), s = parseInt(a.getPropertyValue("top"), 10);
|
|
340
|
+
n.x = isNaN(o) ? 0 : o, n.y = isNaN(s) ? 0 : s;
|
|
337
341
|
}
|
|
338
342
|
return n;
|
|
339
343
|
}
|
|
340
344
|
return null;
|
|
341
345
|
}
|
|
342
346
|
static copy(t) {
|
|
343
|
-
return new
|
|
347
|
+
return new ne(0, 0).set(t);
|
|
344
348
|
}
|
|
345
349
|
get value() {
|
|
346
350
|
return { x: this.x, y: this.y };
|
|
@@ -364,12 +368,12 @@ class ee {
|
|
|
364
368
|
return this.x = t.x, this.y = t.y, this;
|
|
365
369
|
}
|
|
366
370
|
}
|
|
367
|
-
class
|
|
371
|
+
class Re {
|
|
368
372
|
constructor(t, n) {
|
|
369
373
|
this.width = t, this.height = n;
|
|
370
374
|
}
|
|
371
375
|
static getCurrent(t) {
|
|
372
|
-
const n = new
|
|
376
|
+
const n = new Re(0, 0);
|
|
373
377
|
if (window) {
|
|
374
378
|
const a = window.getComputedStyle(t);
|
|
375
379
|
return a && (n.width = parseInt(a.getPropertyValue("width"), 10), n.height = parseInt(a.getPropertyValue("height"), 10)), n;
|
|
@@ -377,280 +381,280 @@ class Me {
|
|
|
377
381
|
return null;
|
|
378
382
|
}
|
|
379
383
|
static copy(t) {
|
|
380
|
-
return new
|
|
384
|
+
return new Re(0, 0).set(t);
|
|
381
385
|
}
|
|
382
386
|
set(t) {
|
|
383
387
|
return this.width = t.width, this.height = t.height, this;
|
|
384
388
|
}
|
|
385
389
|
}
|
|
386
|
-
function
|
|
387
|
-
const n = r(), a = r(), o = r(),
|
|
388
|
-
function
|
|
389
|
-
const
|
|
390
|
-
if (!
|
|
390
|
+
function Ga(e, t) {
|
|
391
|
+
const n = r(), a = r(), o = r(), s = r(), i = r(), u = r(), v = r(), f = r(), p = r(), w = r(), T = r(), h = r(e.resizeable), g = r(), F = r(e.draggable), E = r(!1);
|
|
392
|
+
function P() {
|
|
393
|
+
const d = a.value || document.body, x = window.getComputedStyle(d);
|
|
394
|
+
if (!x || !n.value)
|
|
391
395
|
return;
|
|
392
|
-
const
|
|
393
|
-
|
|
394
|
-
const
|
|
395
|
-
|
|
396
|
+
const R = ne.getTransformInfo(n.value), D = {};
|
|
397
|
+
v.value && (D.deltaL = n.value.offsetLeft - v.value.x, D.deltaT = n.value.offsetTop - v.value.y);
|
|
398
|
+
const A = x.getPropertyValue("position");
|
|
399
|
+
D.width = d.clientWidth, D.height = d.clientHeight, D.pr = parseInt(x.getPropertyValue("padding-right"), 10), D.pb = parseInt(x.getPropertyValue("padding-bottom"), 10), D.position = x.getPropertyValue("position"), A === "static" && (d.style.position = "relative"), D.translateX = R.x, D.translateY = R.y, w.value = D;
|
|
396
400
|
}
|
|
397
|
-
function
|
|
401
|
+
function C(d) {
|
|
398
402
|
if (n.value) {
|
|
399
|
-
|
|
400
|
-
const
|
|
401
|
-
|
|
402
|
-
n: !!
|
|
403
|
-
s: !!
|
|
404
|
-
w: !!
|
|
405
|
-
e: !!
|
|
403
|
+
s.value = Re.getCurrent(n.value), i.value = ne.getCurrent(n.value), u.value = s.value ? Re.copy(s.value) : null, v.value = i.value ? ne.copy(i.value) : null, P();
|
|
404
|
+
const x = d.target.getAttribute("type") || "";
|
|
405
|
+
f.value = {
|
|
406
|
+
n: !!x.match(/n/),
|
|
407
|
+
s: !!x.match(/s/),
|
|
408
|
+
w: !!x.match(/w/),
|
|
409
|
+
e: !!x.match(/e/)
|
|
406
410
|
};
|
|
407
411
|
}
|
|
408
412
|
}
|
|
409
413
|
function N() {
|
|
410
|
-
var
|
|
414
|
+
var d, x, R, D;
|
|
411
415
|
if (n.value) {
|
|
412
|
-
const
|
|
413
|
-
|
|
416
|
+
const A = n.value;
|
|
417
|
+
f.value && ((f.value.n || f.value.s) && ((d = u.value) != null && d.height) && (A.style.height = u.value.height + "px"), (f.value.w || f.value.e) && ((x = u.value) != null && x.width) && (A.style.width = u.value.width + "px"), v.value && ((R = v.value) != null && R.x && (A.style.left = v.value.x + "px"), (D = v.value) != null && D.y && (A.style.top = v.value.y + "px")));
|
|
414
418
|
}
|
|
415
419
|
}
|
|
416
|
-
function
|
|
417
|
-
const
|
|
418
|
-
|
|
420
|
+
function U() {
|
|
421
|
+
const d = e.minHeight ? e.minHeight : 1, x = e.minWidth ? e.minWidth : 1;
|
|
422
|
+
u.value && v.value && f.value && s.value && (u.value.height < d && (u.value.height = d, f.value.n && i.value && (v.value.y = i.value.y + (s.value.height - d))), u.value.width < x && (u.value.width = x, f.value.w && i.value && (v.value.x = i.value.x + (s.value.width - x))), e.maxHeight && u.value.height > e.maxHeight && (u.value.height = e.maxHeight, i.value && f.value.n && (v.value.y = i.value.y + (s.value.height - e.maxHeight))), e.maxWidth && u.value.width > e.maxWidth && (u.value.width = e.maxWidth, f.value.w && i.value && (v.value.x = i.value.x + (s.value.width - e.maxWidth))));
|
|
419
423
|
}
|
|
420
|
-
function
|
|
424
|
+
function B() {
|
|
421
425
|
if (a.value) {
|
|
422
|
-
const
|
|
423
|
-
if (
|
|
424
|
-
const
|
|
425
|
-
|
|
426
|
+
const d = w.value;
|
|
427
|
+
if (v.value && u.value && f.value && s.value) {
|
|
428
|
+
const x = d.width - d.pr - d.deltaL - d.translateX - v.value.x, R = d.height - d.pb - d.deltaT - d.translateY - v.value.y;
|
|
429
|
+
f.value.n && v.value.y + d.translateY < 0 && i.value && (v.value.y = -d.translateY, u.value.height = s.value.height + i.value.y + d.translateY), f.value.w && v.value.x + d.translateX < 0 && i.value && (v.value.x = -d.translateX, u.value.width = s.value.width + i.value.x + d.translateX), u.value.width > x && (u.value.width = x), u.value.height > R && (u.value.height = R);
|
|
426
430
|
}
|
|
427
431
|
}
|
|
428
432
|
}
|
|
429
|
-
function
|
|
430
|
-
if (!o.value || !
|
|
433
|
+
function L(d) {
|
|
434
|
+
if (!o.value || !s.value || !i.value || !f.value)
|
|
431
435
|
return;
|
|
432
|
-
|
|
433
|
-
const
|
|
434
|
-
|
|
436
|
+
d.subtract(o.value);
|
|
437
|
+
const x = d.x, R = d.y;
|
|
438
|
+
f.value.n ? (v.value.y = i.value.y + R, u.value.height = s.value.height - R) : f.value.s && (u.value.height = s.value.height + R), f.value.e ? u.value.width = s.value.width + x : f.value.w && (u.value.width = s.value.width - x, v.value.x = i.value.x + x), B(), U(), N();
|
|
435
439
|
}
|
|
436
|
-
function
|
|
437
|
-
if (!
|
|
440
|
+
function b(d) {
|
|
441
|
+
if (!p.value)
|
|
438
442
|
return;
|
|
439
|
-
const
|
|
440
|
-
|
|
443
|
+
const x = ne.fromEvent(d);
|
|
444
|
+
x && L(x);
|
|
441
445
|
}
|
|
442
|
-
function
|
|
446
|
+
function k() {
|
|
443
447
|
if (n.value) {
|
|
444
448
|
const {
|
|
445
|
-
width:
|
|
446
|
-
height:
|
|
447
|
-
x:
|
|
448
|
-
y:
|
|
449
|
-
} = n.value.getBoundingClientRect(),
|
|
449
|
+
width: d,
|
|
450
|
+
height: x,
|
|
451
|
+
x: R,
|
|
452
|
+
y: D
|
|
453
|
+
} = n.value.getBoundingClientRect(), A = ne.getTransformInfo(n.value);
|
|
450
454
|
return {
|
|
451
455
|
size: {
|
|
452
|
-
width:
|
|
453
|
-
height:
|
|
456
|
+
width: d,
|
|
457
|
+
height: x
|
|
454
458
|
},
|
|
455
459
|
position: {
|
|
456
|
-
x:
|
|
457
|
-
y:
|
|
460
|
+
x: R - A.x,
|
|
461
|
+
y: D - A.y
|
|
458
462
|
}
|
|
459
463
|
};
|
|
460
464
|
}
|
|
461
465
|
return null;
|
|
462
466
|
}
|
|
463
|
-
function W(
|
|
467
|
+
function W(d) {
|
|
464
468
|
if (n.value) {
|
|
465
|
-
const
|
|
466
|
-
|
|
469
|
+
const x = k();
|
|
470
|
+
T.value = x;
|
|
467
471
|
}
|
|
468
|
-
o.value = void 0,
|
|
472
|
+
o.value = void 0, s.value = null, i.value = null, u.value = null, v.value = null, f.value = null, p.value = null, document.removeEventListener("mousemove", b), document.removeEventListener("mouseup", W);
|
|
469
473
|
}
|
|
470
|
-
function
|
|
471
|
-
document.addEventListener("mousemove",
|
|
474
|
+
function K() {
|
|
475
|
+
document.addEventListener("mousemove", b), document.addEventListener("mouseup", W);
|
|
472
476
|
}
|
|
473
|
-
function
|
|
474
|
-
|
|
477
|
+
function O(d) {
|
|
478
|
+
d instanceof MouseEvent && d.button === 2 || F.value && (document.body.click(), d.stopPropagation(), d.preventDefault(), o.value = ne.fromEvent(d), p.value = d.target, C(d), K());
|
|
475
479
|
}
|
|
476
|
-
function G(
|
|
477
|
-
return n.value =
|
|
480
|
+
function G(d) {
|
|
481
|
+
return n.value = d, h.value && l(pe, null, [l("div", {
|
|
478
482
|
class: "fv-resizable-handle fv-resizable-n",
|
|
479
483
|
type: "n",
|
|
480
|
-
onMousedown: (
|
|
481
|
-
}, null),
|
|
484
|
+
onMousedown: (x) => O(x)
|
|
485
|
+
}, null), l("div", {
|
|
482
486
|
class: "fv-resizable-handle fv-resizable-e",
|
|
483
487
|
type: "e",
|
|
484
|
-
onMousedown: (
|
|
485
|
-
}, null),
|
|
488
|
+
onMousedown: (x) => O(x)
|
|
489
|
+
}, null), l("div", {
|
|
486
490
|
class: "fv-resizable-handle fv-resizable-s",
|
|
487
491
|
type: "s",
|
|
488
|
-
onMousedown: (
|
|
489
|
-
}, null),
|
|
492
|
+
onMousedown: (x) => O(x)
|
|
493
|
+
}, null), l("div", {
|
|
490
494
|
class: "fv-resizable-handle fv-resizable-w",
|
|
491
495
|
type: "w",
|
|
492
|
-
onMousedown: (
|
|
493
|
-
}, null),
|
|
496
|
+
onMousedown: (x) => O(x)
|
|
497
|
+
}, null), l("div", {
|
|
494
498
|
class: "fv-resizable-handle fv-resizable-ne",
|
|
495
499
|
type: "ne",
|
|
496
|
-
onMousedown: (
|
|
497
|
-
}, null),
|
|
500
|
+
onMousedown: (x) => O(x)
|
|
501
|
+
}, null), l("div", {
|
|
498
502
|
class: "fv-resizable-handle fv-resizable-se fv-resizable-diagonal",
|
|
499
503
|
type: "se",
|
|
500
|
-
onMousedown: (
|
|
501
|
-
}, null),
|
|
504
|
+
onMousedown: (x) => O(x)
|
|
505
|
+
}, null), l("div", {
|
|
502
506
|
class: "fv-resizable-handle fv-resizable-sw",
|
|
503
507
|
type: "sw",
|
|
504
|
-
onMousedown: (
|
|
505
|
-
}, null),
|
|
508
|
+
onMousedown: (x) => O(x)
|
|
509
|
+
}, null), l("div", {
|
|
506
510
|
class: "fv-resizable-handle fv-resizable-nw",
|
|
507
511
|
type: "nw",
|
|
508
|
-
onMousedown: (
|
|
512
|
+
onMousedown: (x) => O(x)
|
|
509
513
|
}, null)]);
|
|
510
514
|
}
|
|
511
|
-
function
|
|
515
|
+
function se(d = !0) {
|
|
512
516
|
document.body.click();
|
|
513
|
-
const
|
|
514
|
-
|
|
515
|
-
size:
|
|
517
|
+
const x = a.value || document.body, R = Re.getCurrent(x), D = n.value;
|
|
518
|
+
d && D && (g.value = k(), g.value.transform = D.style.transform), R && D && (u.value = R, u.value.height -= 14, u.value.width -= 14, D.style.height = u.value.height + "px", D.style.width = u.value.width + "px", D.style.left = "7px", D.style.top = "7px", D.style.transform = "", T.value = {
|
|
519
|
+
size: u.value,
|
|
516
520
|
position: {
|
|
517
521
|
x: 0,
|
|
518
522
|
y: 0
|
|
519
523
|
}
|
|
520
|
-
},
|
|
521
|
-
}
|
|
522
|
-
function
|
|
523
|
-
var
|
|
524
|
-
if (document.body.click(),
|
|
525
|
-
const
|
|
526
|
-
width:
|
|
527
|
-
height:
|
|
528
|
-
},
|
|
529
|
-
x: (window.innerWidth -
|
|
530
|
-
y: (window.innerHeight -
|
|
524
|
+
}, F.value = !1, E.value = !0);
|
|
525
|
+
}
|
|
526
|
+
function X() {
|
|
527
|
+
var d, x;
|
|
528
|
+
if (document.body.click(), g.value) {
|
|
529
|
+
const R = {
|
|
530
|
+
width: g.value.size.width || 0,
|
|
531
|
+
height: g.value.size.height || 0
|
|
532
|
+
}, D = {
|
|
533
|
+
x: (window.innerWidth - R.width) / 2,
|
|
534
|
+
y: (window.innerHeight - R.height) / 2
|
|
531
535
|
};
|
|
532
|
-
(
|
|
533
|
-
const
|
|
534
|
-
|
|
535
|
-
size:
|
|
536
|
-
position:
|
|
537
|
-
},
|
|
536
|
+
(d = u.value) == null || d.set(R), (x = v.value) == null || x.set(D);
|
|
537
|
+
const A = n.value;
|
|
538
|
+
A.style.height = R.height + "px", A.style.width = R.width + "px", A.style.left = `${D.x}px`, A.style.top = `${D.y}px`, A.style.transform = "", T.value = {
|
|
539
|
+
size: R,
|
|
540
|
+
position: D
|
|
541
|
+
}, F.value = e.draggable, E.value = !1;
|
|
538
542
|
}
|
|
539
543
|
}
|
|
540
|
-
function
|
|
544
|
+
function ue() {
|
|
541
545
|
if (n.value) {
|
|
542
|
-
const
|
|
543
|
-
if (
|
|
546
|
+
const d = Re.getCurrent(n.value);
|
|
547
|
+
if (d) {
|
|
544
548
|
const {
|
|
545
|
-
width:
|
|
546
|
-
height:
|
|
547
|
-
} =
|
|
548
|
-
n.value.style.left = `${(window.innerWidth -
|
|
549
|
+
width: x,
|
|
550
|
+
height: R
|
|
551
|
+
} = d;
|
|
552
|
+
n.value.style.left = `${(window.innerWidth - x) / 2}px`, n.value.style.top = `${(window.innerHeight - R) / 2}px`, n.value.style.transform = "";
|
|
549
553
|
}
|
|
550
554
|
}
|
|
551
555
|
}
|
|
552
|
-
function
|
|
553
|
-
const
|
|
554
|
-
|
|
556
|
+
function z() {
|
|
557
|
+
const d = () => {
|
|
558
|
+
E.value ? se(!1) : ue(), document.body.click();
|
|
555
559
|
};
|
|
556
|
-
return window.addEventListener("resize",
|
|
557
|
-
window.removeEventListener("resize",
|
|
560
|
+
return window.addEventListener("resize", d), () => {
|
|
561
|
+
window.removeEventListener("resize", d);
|
|
558
562
|
};
|
|
559
563
|
}
|
|
560
|
-
const
|
|
564
|
+
const M = z();
|
|
561
565
|
return {
|
|
562
566
|
renderResizeBar: G,
|
|
563
567
|
boundingElement: a,
|
|
564
|
-
resizedEventParam:
|
|
565
|
-
maximize:
|
|
566
|
-
restore:
|
|
567
|
-
allowDrag:
|
|
568
|
-
isMaximized:
|
|
569
|
-
unWindowResizeHandle:
|
|
570
|
-
moveToCenter:
|
|
568
|
+
resizedEventParam: T,
|
|
569
|
+
maximize: se,
|
|
570
|
+
restore: X,
|
|
571
|
+
allowDrag: F,
|
|
572
|
+
isMaximized: E,
|
|
573
|
+
unWindowResizeHandle: M,
|
|
574
|
+
moveToCenter: ue
|
|
571
575
|
};
|
|
572
576
|
}
|
|
573
|
-
function
|
|
574
|
-
const a = r(), o = r(e.draggable),
|
|
575
|
-
|
|
576
|
-
|
|
577
|
+
function $a(e, t, n) {
|
|
578
|
+
const a = r(), o = r(e.draggable), s = r(e.lockAxis), i = r(), u = r(), v = r(!1), f = r(new ne(0, 0)), p = r(new ne(0, 0)), w = r(new ne(0, 0)), T = r(new ne(0, 0));
|
|
579
|
+
Z(() => n.value, (b) => {
|
|
580
|
+
i.value.style.cursor = b ? "move" : "default";
|
|
577
581
|
});
|
|
578
|
-
function
|
|
579
|
-
if (
|
|
582
|
+
function h(b, k) {
|
|
583
|
+
if (k.tagName === "BUTTON")
|
|
580
584
|
return !1;
|
|
581
|
-
if (
|
|
585
|
+
if (k === b)
|
|
582
586
|
return !0;
|
|
583
|
-
for (const W in
|
|
584
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
587
|
+
for (const W in k.children)
|
|
588
|
+
if (Object.prototype.hasOwnProperty.call(k.children, W) && h(b, k.children[W]))
|
|
585
589
|
return !0;
|
|
586
590
|
return !1;
|
|
587
591
|
}
|
|
588
|
-
function
|
|
589
|
-
var
|
|
590
|
-
let
|
|
591
|
-
|
|
592
|
-
const W = `translate3d(${Math.round(
|
|
593
|
-
a.value && (a.value.style.transform = W),
|
|
592
|
+
function g() {
|
|
593
|
+
var K, O;
|
|
594
|
+
let b = w.value.x + p.value.x, k = w.value.y + p.value.y;
|
|
595
|
+
s.value === "x" ? (b = ((K = f.value) == null ? void 0 : K.x) || 0, w.value.x = 0) : s.value === "y" && (k = ((O = f.value) == null ? void 0 : O.y) || 0, w.value.y = 0);
|
|
596
|
+
const W = `translate3d(${Math.round(b)}px, ${Math.round(k)}px, 0px)`;
|
|
597
|
+
a.value && (a.value.style.transform = W), T.value.x = b, T.value.y = k;
|
|
594
598
|
}
|
|
595
|
-
function
|
|
596
|
-
if (!
|
|
599
|
+
function F() {
|
|
600
|
+
if (!u.value || !a.value)
|
|
597
601
|
return null;
|
|
598
|
-
const
|
|
599
|
-
top:
|
|
600
|
-
right:
|
|
601
|
-
bottom:
|
|
602
|
-
left:
|
|
602
|
+
const b = u.value.getBoundingClientRect(), k = a.value.getBoundingClientRect(), W = {
|
|
603
|
+
top: b.top < k.top,
|
|
604
|
+
right: b.right > k.right,
|
|
605
|
+
bottom: b.bottom > k.bottom,
|
|
606
|
+
left: b.left < k.left
|
|
603
607
|
};
|
|
604
|
-
return W.top || (
|
|
608
|
+
return W.top || (w.value.y -= k.top - b.top), W.bottom || (w.value.y -= k.bottom - b.bottom), W.right || (w.value.x -= k.right - b.right), W.left || (w.value.x -= k.left - b.left), g(), W;
|
|
605
609
|
}
|
|
606
|
-
function
|
|
607
|
-
|
|
610
|
+
function E(b) {
|
|
611
|
+
b && (f.value && b.subtract(f.value), w.value.set(b), g(), F());
|
|
608
612
|
}
|
|
609
|
-
function
|
|
610
|
-
|
|
613
|
+
function P(b) {
|
|
614
|
+
v.value && o.value && (b.stopPropagation(), b.preventDefault(), E(ne.fromEvent(b, i.value)));
|
|
611
615
|
}
|
|
612
|
-
function
|
|
613
|
-
var
|
|
614
|
-
|
|
616
|
+
function C() {
|
|
617
|
+
var b;
|
|
618
|
+
v.value && (v.value = !1, p.value.add(w.value), w.value.reset(), (b = a.value) == null || b.classList.remove("ng-dragging"), t.emit("stopMove"), document.removeEventListener("mousemove", P), document.removeEventListener("mouseup", C));
|
|
615
619
|
}
|
|
616
620
|
function N() {
|
|
617
|
-
!
|
|
621
|
+
!v.value && i.value && (v.value = !0, i.value.classList.add("ng-dragging"), document.addEventListener("mousemove", P), document.addEventListener("mouseup", C));
|
|
618
622
|
}
|
|
619
|
-
function
|
|
623
|
+
function U() {
|
|
620
624
|
if (a.value) {
|
|
621
|
-
const
|
|
622
|
-
|
|
625
|
+
const b = ne.getTransformInfo(a.value);
|
|
626
|
+
p.value.set(b);
|
|
623
627
|
return;
|
|
624
628
|
}
|
|
625
|
-
|
|
629
|
+
p.value.reset();
|
|
626
630
|
}
|
|
627
|
-
function
|
|
628
|
-
if (!n.value ||
|
|
631
|
+
function B(b) {
|
|
632
|
+
if (!n.value || b instanceof MouseEvent && b.button === 2)
|
|
629
633
|
return;
|
|
630
|
-
const
|
|
631
|
-
|
|
634
|
+
const k = b.target || b.srcElement;
|
|
635
|
+
i.value !== void 0 && k && !h(k, i.value) || o.value !== !1 && (document.body.click(), b.stopPropagation(), b.preventDefault(), f.value = ne.fromEvent(b, a.value), U(), N());
|
|
632
636
|
}
|
|
633
|
-
function
|
|
634
|
-
if (o.value &&
|
|
635
|
-
if (
|
|
636
|
-
|
|
637
|
+
function L(b, k, W) {
|
|
638
|
+
if (o.value && k) {
|
|
639
|
+
if (b)
|
|
640
|
+
i.value = b;
|
|
637
641
|
else if (e.dragHandle) {
|
|
638
642
|
if (e.dragHandle instanceof HTMLElement)
|
|
639
|
-
|
|
643
|
+
i.value = e.dragHandle;
|
|
640
644
|
else if (typeof e.dragHandle == "string") {
|
|
641
|
-
const
|
|
642
|
-
|
|
645
|
+
const K = k.querySelector(e.dragHandle);
|
|
646
|
+
K && (i.value = K);
|
|
643
647
|
}
|
|
644
648
|
}
|
|
645
|
-
a.value =
|
|
649
|
+
a.value = k, u.value = W, i.value ? (i.value.classList.add("ng-draggable"), i.value.addEventListener("mousedown", B)) : o.value = !1;
|
|
646
650
|
}
|
|
647
651
|
}
|
|
648
652
|
return {
|
|
649
|
-
registerDraggle:
|
|
650
|
-
resetTranslate:
|
|
653
|
+
registerDraggle: L,
|
|
654
|
+
resetTranslate: U
|
|
651
655
|
};
|
|
652
656
|
}
|
|
653
|
-
function
|
|
657
|
+
function kt(e, t) {
|
|
654
658
|
if (e) {
|
|
655
659
|
const n = (a) => {
|
|
656
660
|
a.key.toLowerCase() === e.toLowerCase() && t({ event: a, key: e });
|
|
@@ -660,344 +664,349 @@ function mt(e, t) {
|
|
|
660
664
|
};
|
|
661
665
|
}
|
|
662
666
|
}
|
|
663
|
-
function
|
|
667
|
+
function Ua(e, t) {
|
|
664
668
|
const n = r(e.enableEsc);
|
|
665
669
|
let a = null;
|
|
666
|
-
return n.value ? (a =
|
|
670
|
+
return n.value ? (a = kt("Escape", (o) => {
|
|
667
671
|
t.emit("esc", { event: o.event, type: "esc" });
|
|
668
672
|
}), {
|
|
669
673
|
remove: a
|
|
670
674
|
}) : null;
|
|
671
675
|
}
|
|
672
|
-
function
|
|
676
|
+
function Ka(e, t) {
|
|
673
677
|
const n = r(e.enableEnter);
|
|
674
678
|
let a = null;
|
|
675
|
-
return n.value ? (a =
|
|
679
|
+
return n.value ? (a = kt("Enter", (o) => {
|
|
676
680
|
t.emit("enter", { event: o.event, type: "enter" });
|
|
677
681
|
}), {
|
|
678
682
|
remove: a
|
|
679
683
|
}) : null;
|
|
680
684
|
}
|
|
681
|
-
const
|
|
685
|
+
const Ye = /* @__PURE__ */ Se({
|
|
682
686
|
name: "FModal",
|
|
683
|
-
props:
|
|
687
|
+
props: Wa,
|
|
684
688
|
emits: ["update:modelValue", "accept", "cancel", "closed", "resize", "esc", "enter", "stopMove"],
|
|
685
689
|
setup(e, t) {
|
|
686
|
-
const n = r(e.width || 300), a = r(e.height || 200), o = r(e.modelValue),
|
|
687
|
-
|
|
688
|
-
const
|
|
689
|
-
function
|
|
690
|
-
const
|
|
690
|
+
const n = r(e.width || 300), a = r(e.height || 200), o = r(e.modelValue), s = r(""), i = r(e.class), u = r(e.fitContent), v = r(e.showHeader), f = r(""), p = r(e.showCloseButton), w = r(e.showMaxButton), T = r(!1), h = r(e.dialogType), g = r(e.src), F = r(""), E = r(e.showButtons), P = r(e.title), C = r(e.containment || null), N = r();
|
|
691
|
+
P.value === "错误提示" && (P.value = Ce.getLocaleValue("messageBox.errorTitle"));
|
|
692
|
+
const U = r(!1);
|
|
693
|
+
function B(m, j) {
|
|
694
|
+
const Q = j ? "accept" : "cancel";
|
|
691
695
|
Promise.resolve().then(() => {
|
|
692
|
-
var
|
|
693
|
-
return (
|
|
694
|
-
closeType:
|
|
696
|
+
var ee;
|
|
697
|
+
return (ee = e.beforeClose) == null ? void 0 : ee.call(e, {
|
|
698
|
+
closeType: Q
|
|
695
699
|
});
|
|
696
|
-
}).then((
|
|
697
|
-
|
|
700
|
+
}).then((ee) => {
|
|
701
|
+
ee && (o.value = !1, t.emit("update:modelValue", !1), j != null && t.emit(j ? "accept" : "cancel"), t.emit("closed", m));
|
|
698
702
|
});
|
|
699
703
|
}
|
|
700
|
-
const
|
|
704
|
+
const L = [{
|
|
701
705
|
name: "cancel",
|
|
702
|
-
text:
|
|
706
|
+
text: Ce.getLocaleValue("messageBox.cancel") || "取消",
|
|
703
707
|
class: "btn btn-secondary",
|
|
704
|
-
handle: (
|
|
705
|
-
|
|
708
|
+
handle: (m) => {
|
|
709
|
+
B(m, !1);
|
|
706
710
|
}
|
|
707
711
|
}, {
|
|
708
712
|
name: "accept",
|
|
709
|
-
text:
|
|
713
|
+
text: Ce.getLocaleValue("messageBox.ok") || "确定",
|
|
710
714
|
class: "btn btn-primary",
|
|
711
|
-
handle: (
|
|
712
|
-
|
|
715
|
+
handle: (m) => {
|
|
716
|
+
B(m, !0);
|
|
713
717
|
}
|
|
714
|
-
}],
|
|
715
|
-
renderResizeBar:
|
|
716
|
-
maximize:
|
|
717
|
-
restore:
|
|
718
|
-
boundingElement:
|
|
719
|
-
resizedEventParam:
|
|
720
|
-
allowDrag:
|
|
721
|
-
unWindowResizeHandle:
|
|
722
|
-
moveToCenter:
|
|
723
|
-
} =
|
|
724
|
-
registerDraggle:
|
|
725
|
-
} =
|
|
726
|
-
function
|
|
718
|
+
}], b = r(e.buttons && e.buttons.length ? e.buttons : L), k = y(() => !!f.value), W = y(() => !!E.value && !!b.value), K = r(), O = r(), G = r(!1), {
|
|
719
|
+
renderResizeBar: se,
|
|
720
|
+
maximize: X,
|
|
721
|
+
restore: ue,
|
|
722
|
+
boundingElement: z,
|
|
723
|
+
resizedEventParam: M,
|
|
724
|
+
allowDrag: d,
|
|
725
|
+
unWindowResizeHandle: x,
|
|
726
|
+
moveToCenter: R
|
|
727
|
+
} = Ga(e), {
|
|
728
|
+
registerDraggle: D
|
|
729
|
+
} = $a(e, t, d);
|
|
730
|
+
function A() {
|
|
727
731
|
return !!document.querySelectorAll(".farris-modal").length && document.body.classList.contains("modal-open");
|
|
728
732
|
}
|
|
729
|
-
function
|
|
730
|
-
const
|
|
731
|
-
(!
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
}),
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
}),
|
|
739
|
-
}),
|
|
740
|
-
|
|
741
|
-
}),
|
|
742
|
-
|
|
743
|
-
}),
|
|
744
|
-
const
|
|
745
|
-
JSON.stringify(
|
|
746
|
-
newSize:
|
|
733
|
+
function q() {
|
|
734
|
+
const m = document.querySelectorAll(".farris-modal").length;
|
|
735
|
+
(!m || m - 1 <= 0) && document.body.classList.remove("modal-open"), N.value && N.value.classList.remove("show");
|
|
736
|
+
}
|
|
737
|
+
Z(() => e.title, (m, j) => {
|
|
738
|
+
m !== j && (P.value = m);
|
|
739
|
+
}), Z(() => e.modelValue, (m, j) => {
|
|
740
|
+
m !== j && (o.value = m, o.value && e.draggable && Ne(() => {
|
|
741
|
+
O.value && !C.value && (C.value = O.value.parentElement, z.value = C.value, D(K.value, O.value, z.value), R());
|
|
742
|
+
}), m || (C.value && (C.value = null), q())), o.value ? U.value = A() : (G.value = !1, d.value = e.draggable);
|
|
743
|
+
}), Z(() => e.showHeader, (m, j) => {
|
|
744
|
+
m !== j && (v.value = m);
|
|
745
|
+
}), Z(() => e.showButtons, (m, j) => {
|
|
746
|
+
m !== j && (E.value = m);
|
|
747
|
+
}), Z(() => M.value, (m, j) => {
|
|
748
|
+
const Q = m || {}, ee = j || {};
|
|
749
|
+
JSON.stringify(Q) !== JSON.stringify(ee) && t.emit("resize", {
|
|
750
|
+
newSize: m,
|
|
747
751
|
oldSize: j,
|
|
748
752
|
isMaximized: G.value
|
|
749
753
|
});
|
|
750
|
-
}),
|
|
751
|
-
(
|
|
754
|
+
}), Z([() => e.width, () => e.height], (m, j) => {
|
|
755
|
+
(m[0] !== j[0] || m[1] !== j[1]) && (n.value = m[0] || 500, a.value = m[1] || 600);
|
|
756
|
+
}), Z(() => e.class, (m, j) => {
|
|
757
|
+
i.value = m;
|
|
752
758
|
});
|
|
753
|
-
const
|
|
754
|
-
var
|
|
755
|
-
const
|
|
759
|
+
const oe = y(() => (o.value && document.body.classList.add("modal-open"), o.value)), re = y(() => {
|
|
760
|
+
var Q;
|
|
761
|
+
const m = {
|
|
756
762
|
modal: !0,
|
|
757
763
|
"farris-modal": !0,
|
|
758
764
|
fade: !0
|
|
759
765
|
};
|
|
760
|
-
|
|
761
|
-
const j = (
|
|
762
|
-
return j == null || j.reduce((
|
|
763
|
-
}),
|
|
764
|
-
var
|
|
765
|
-
const
|
|
766
|
+
m["f-modal-fitContent"] = !!u.value, m.show = !!oe.value;
|
|
767
|
+
const j = (Q = e.maskClass) == null ? void 0 : Q.split(" ");
|
|
768
|
+
return j == null || j.reduce((ee, le) => (ee[le] = !0, ee), m), m;
|
|
769
|
+
}), de = y(() => {
|
|
770
|
+
var Q;
|
|
771
|
+
const m = {
|
|
766
772
|
"modal-dialog": !0
|
|
767
|
-
}, j = (
|
|
768
|
-
return j == null || j.reduce((
|
|
769
|
-
}),
|
|
770
|
-
const
|
|
773
|
+
}, j = (Q = i.value) == null ? void 0 : Q.split(" ");
|
|
774
|
+
return j == null || j.reduce((ee, le) => (ee[le] = !0, ee), m), m;
|
|
775
|
+
}), te = () => Dn() && !e.isMessager, Te = y(() => {
|
|
776
|
+
const m = document.documentElement.clientWidth, j = document.documentElement.clientHeight, Q = Math.min(n.value, m), ee = u.value ? "auto" : `${Math.min(a.value, j - 10)}px`, le = {
|
|
771
777
|
position: "absolute",
|
|
772
|
-
top: `${(window.innerHeight - parseInt(
|
|
773
|
-
left: `${(window.innerWidth -
|
|
774
|
-
width: `${
|
|
775
|
-
height:
|
|
778
|
+
top: `${(window.innerHeight - parseInt(ee === "auto" ? "0" : ee)) / 2}px`,
|
|
779
|
+
left: `${(window.innerWidth - Q) / 2}px`,
|
|
780
|
+
width: `${Q}px`,
|
|
781
|
+
height: ee
|
|
776
782
|
};
|
|
777
|
-
return e.mask || (
|
|
778
|
-
}),
|
|
779
|
-
const
|
|
783
|
+
return te() && (le.top = "0px", le.left = "0px", le.width = `${window.innerWidth}px`, le.height = `${window.innerHeight}px`), e.mask || (le.pointerEvents = "auto"), le;
|
|
784
|
+
}), fe = r(bt() || 1050), ye = y(() => {
|
|
785
|
+
const m = {
|
|
780
786
|
display: "block",
|
|
781
|
-
|
|
787
|
+
overflow: "hidden"
|
|
782
788
|
};
|
|
783
|
-
return e.mask || (
|
|
784
|
-
}),
|
|
789
|
+
return e.mask || (m.pointerEvents = "none", m.backgroundColor = "transparent"), U.value && (m.backgroundColor = "transparent"), m.zIndex = fe.value, m;
|
|
790
|
+
}), Me = y(() => ({
|
|
785
791
|
"modal-content": !0,
|
|
786
|
-
"modal-content-has-header":
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
792
|
+
"modal-content-has-header": v.value,
|
|
793
|
+
"is-mobile": te()
|
|
794
|
+
})), Le = y(() => {
|
|
795
|
+
const m = {
|
|
796
|
+
display: v.value ? "" : "none"
|
|
790
797
|
};
|
|
791
|
-
return
|
|
792
|
-
}),
|
|
798
|
+
return m["pointer-events"] = d.value ? "auto" : "none", m;
|
|
799
|
+
}), ke = y(() => ({
|
|
793
800
|
"f-icon": !0,
|
|
794
801
|
modal_maximize: !0,
|
|
795
802
|
modalrevert: G.value
|
|
796
|
-
})),
|
|
803
|
+
})), De = y(() => ({
|
|
797
804
|
"modal-body": !0,
|
|
798
|
-
"f-utils-flex-column":
|
|
805
|
+
"f-utils-flex-column": h.value === "iframe",
|
|
799
806
|
"f-utils-fill": !0
|
|
800
807
|
}));
|
|
801
|
-
function
|
|
808
|
+
function Ae() {
|
|
802
809
|
return {
|
|
803
810
|
height: `${e.footerHeight || 60}px`
|
|
804
811
|
};
|
|
805
812
|
}
|
|
806
|
-
const
|
|
807
|
-
const
|
|
808
|
-
textAlgin:
|
|
809
|
-
}, j =
|
|
810
|
-
return Object.assign(
|
|
813
|
+
const We = y(() => {
|
|
814
|
+
const m = {
|
|
815
|
+
textAlgin: F.value
|
|
816
|
+
}, j = Ae();
|
|
817
|
+
return Object.assign(m, j);
|
|
811
818
|
});
|
|
812
|
-
function
|
|
813
|
-
if (
|
|
814
|
-
G.value = !1,
|
|
819
|
+
function we(m) {
|
|
820
|
+
if (m == null || m.stopPropagation(), G.value) {
|
|
821
|
+
G.value = !1, ue();
|
|
815
822
|
return;
|
|
816
823
|
}
|
|
817
|
-
|
|
824
|
+
X(), G.value = !0;
|
|
818
825
|
}
|
|
819
|
-
async function
|
|
820
|
-
|
|
826
|
+
async function Ge(m, j) {
|
|
827
|
+
m.handle && await m.handle(j, m) && t.emit("closed", j);
|
|
821
828
|
}
|
|
822
|
-
function
|
|
823
|
-
|
|
829
|
+
function $e(m) {
|
|
830
|
+
m.width && (n.value = m.width), m.height && (a.value = m.height), m.buttons && (b.value = m.buttons), m.title && (P.value = m.title);
|
|
824
831
|
}
|
|
825
|
-
let
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
}),
|
|
829
|
-
|
|
830
|
-
}),
|
|
831
|
-
|
|
832
|
+
let _ = null, Oe = null;
|
|
833
|
+
Bn(() => {
|
|
834
|
+
U.value = A();
|
|
835
|
+
}), ze(() => {
|
|
836
|
+
O.value && !C.value && (C.value = O.value.parentElement, z.value = C.value, D(K.value, O.value, z.value)), oe.value && document.body.classList.add("modal-open"), _ = Ua(e, t), Oe = Ka(e, t);
|
|
837
|
+
}), Xe(() => {
|
|
838
|
+
x && x(), _ && _.remove(), Oe && Oe.remove();
|
|
832
839
|
}), t.expose({
|
|
833
|
-
modalElementRef:
|
|
834
|
-
updateModalOptions:
|
|
835
|
-
close:
|
|
836
|
-
maxDialog:
|
|
840
|
+
modalElementRef: O,
|
|
841
|
+
updateModalOptions: $e,
|
|
842
|
+
close: B,
|
|
843
|
+
maxDialog: we,
|
|
837
844
|
isMaximized: G
|
|
838
845
|
});
|
|
839
|
-
function
|
|
840
|
-
return
|
|
846
|
+
function He() {
|
|
847
|
+
return l("ul", null, [T.value && l("li", {
|
|
841
848
|
class: "f-btn-icon f-bare"
|
|
842
|
-
}, [
|
|
849
|
+
}, [l("span", {
|
|
843
850
|
class: "f-icon modal_minimize"
|
|
844
|
-
}, null)]),
|
|
845
|
-
onClick:
|
|
851
|
+
}, null)]), w.value && l("li", {
|
|
852
|
+
onClick: we,
|
|
846
853
|
class: "f-btn-icon f-bare",
|
|
847
854
|
style: "pointer-events: auto;"
|
|
848
|
-
}, [
|
|
849
|
-
class:
|
|
850
|
-
}, null)]),
|
|
855
|
+
}, [l("span", {
|
|
856
|
+
class: ke.value
|
|
857
|
+
}, null)]), p.value && l("li", {
|
|
851
858
|
class: "f-btn-icon f-bare",
|
|
852
|
-
onClick: (
|
|
859
|
+
onClick: (m) => B(m, !1),
|
|
853
860
|
style: "pointer-events: auto;"
|
|
854
|
-
}, [
|
|
861
|
+
}, [l("span", {
|
|
855
862
|
class: "f-icon modal_close"
|
|
856
863
|
}, null)])]);
|
|
857
864
|
}
|
|
858
|
-
function
|
|
859
|
-
return
|
|
865
|
+
function je() {
|
|
866
|
+
return l("div", {
|
|
860
867
|
class: "modal-footer",
|
|
861
|
-
style:
|
|
862
|
-
}, [
|
|
863
|
-
const j = r(
|
|
864
|
-
return
|
|
865
|
-
name:
|
|
868
|
+
style: We.value
|
|
869
|
+
}, [b.value && b.value.map((m) => {
|
|
870
|
+
const j = r(m.disabled);
|
|
871
|
+
return l("button", {
|
|
872
|
+
name: m.name,
|
|
866
873
|
type: "button",
|
|
867
874
|
disabled: j.value,
|
|
868
|
-
class:
|
|
869
|
-
onClick: (
|
|
870
|
-
|
|
875
|
+
class: m.class + (m.iconClass ? " btn-icontext" : ""),
|
|
876
|
+
onClick: (Q) => {
|
|
877
|
+
Ge(m, Q);
|
|
871
878
|
}
|
|
872
|
-
}, [!!
|
|
873
|
-
class:
|
|
874
|
-
}, null),
|
|
879
|
+
}, [!!m.iconClass && l("i", {
|
|
880
|
+
class: m.iconClass
|
|
881
|
+
}, null), m.text]);
|
|
875
882
|
})]);
|
|
876
883
|
}
|
|
877
|
-
function
|
|
878
|
-
return
|
|
879
|
-
ref:
|
|
884
|
+
function xe() {
|
|
885
|
+
return l("div", {
|
|
886
|
+
ref: K,
|
|
880
887
|
class: "modal-header",
|
|
881
|
-
style:
|
|
882
|
-
}, [t.slots.headerTemplate ? t.slots.headerTemplate() :
|
|
888
|
+
style: Le.value
|
|
889
|
+
}, [t.slots.headerTemplate ? t.slots.headerTemplate() : l("div", {
|
|
883
890
|
class: "modal-title"
|
|
884
|
-
}, [
|
|
885
|
-
class:
|
|
891
|
+
}, [k.value && l("span", {
|
|
892
|
+
class: f.value,
|
|
886
893
|
style: "margin-right: 8px"
|
|
887
|
-
}, null),
|
|
894
|
+
}, null), l("span", {
|
|
888
895
|
class: "modal-title-label"
|
|
889
|
-
}, [
|
|
896
|
+
}, [P.value])]), l("div", {
|
|
890
897
|
class: "actions"
|
|
891
|
-
}, [
|
|
898
|
+
}, [He()])]);
|
|
892
899
|
}
|
|
893
|
-
function
|
|
894
|
-
return t.slots.footerTemplate ? t.slots.footerTemplate() : W.value &&
|
|
900
|
+
function ve() {
|
|
901
|
+
return t.slots.footerTemplate ? t.slots.footerTemplate() : W.value && je();
|
|
895
902
|
}
|
|
896
|
-
function
|
|
897
|
-
if (
|
|
898
|
-
if (
|
|
903
|
+
function Ue(m) {
|
|
904
|
+
if (m.stopPropagation(), e.allowClickMaskToClose) {
|
|
905
|
+
if (m.target !== N.value)
|
|
899
906
|
return;
|
|
900
|
-
|
|
907
|
+
B(m, !1);
|
|
901
908
|
}
|
|
902
909
|
}
|
|
903
|
-
function
|
|
904
|
-
var
|
|
905
|
-
return
|
|
906
|
-
id:
|
|
907
|
-
class:
|
|
908
|
-
style:
|
|
909
|
-
ref:
|
|
910
|
-
}, [
|
|
911
|
-
class:
|
|
912
|
-
}, [
|
|
913
|
-
class:
|
|
914
|
-
}, [(j = (
|
|
915
|
-
title:
|
|
910
|
+
function Fe() {
|
|
911
|
+
var m, j;
|
|
912
|
+
return l("div", {
|
|
913
|
+
id: s.value,
|
|
914
|
+
class: de.value,
|
|
915
|
+
style: Te.value,
|
|
916
|
+
ref: O
|
|
917
|
+
}, [l("div", {
|
|
918
|
+
class: Me.value
|
|
919
|
+
}, [v.value && xe(), l("div", {
|
|
920
|
+
class: De.value
|
|
921
|
+
}, [(j = (m = t.slots).default) == null ? void 0 : j.call(m), h.value === "iframe" && l("iframe", {
|
|
922
|
+
title: s.value,
|
|
916
923
|
class: "f-utils-fill",
|
|
917
924
|
width: "100%",
|
|
918
925
|
frameborder: "0",
|
|
919
|
-
src:
|
|
920
|
-
}, null)]),
|
|
926
|
+
src: g.value
|
|
927
|
+
}, null)]), ve()]), !u.value && O.value && !G.value && se(O.value)]);
|
|
921
928
|
}
|
|
922
|
-
function
|
|
923
|
-
return
|
|
929
|
+
function Ie(m) {
|
|
930
|
+
return m || "body";
|
|
924
931
|
}
|
|
925
|
-
return () =>
|
|
926
|
-
|
|
932
|
+
return Sn(() => {
|
|
933
|
+
oe.value && (fe.value = bt() || 1050);
|
|
934
|
+
}), () => l(Bt, {
|
|
935
|
+
to: Ie(e.host)
|
|
927
936
|
}, {
|
|
928
|
-
default: () => [
|
|
937
|
+
default: () => [oe.value && l(St, {
|
|
929
938
|
name: "fade",
|
|
930
939
|
appear: !0
|
|
931
940
|
}, {
|
|
932
|
-
default: () => [
|
|
941
|
+
default: () => [l("div", {
|
|
933
942
|
ref: N,
|
|
934
|
-
class:
|
|
935
|
-
style:
|
|
936
|
-
onClick:
|
|
937
|
-
}, [
|
|
943
|
+
class: re.value,
|
|
944
|
+
style: ye.value,
|
|
945
|
+
onClick: Ue
|
|
946
|
+
}, [Fe()])]
|
|
938
947
|
})]
|
|
939
948
|
});
|
|
940
949
|
}
|
|
941
950
|
});
|
|
942
|
-
function
|
|
951
|
+
function Ot(e) {
|
|
943
952
|
if (e.content && e.content.render)
|
|
944
953
|
return e.content.render;
|
|
945
954
|
if (e.render && typeof e.render == "function")
|
|
946
955
|
return e.render;
|
|
947
956
|
}
|
|
948
|
-
function
|
|
957
|
+
function _a(e) {
|
|
949
958
|
const t = document.createElement("div");
|
|
950
959
|
t.style.display = "contents";
|
|
951
|
-
const n =
|
|
960
|
+
const n = rt({
|
|
952
961
|
setup(a, o) {
|
|
953
|
-
|
|
962
|
+
Xe(() => {
|
|
954
963
|
document.body.removeChild(t);
|
|
955
964
|
});
|
|
956
|
-
const
|
|
957
|
-
}),
|
|
958
|
-
}),
|
|
959
|
-
}),
|
|
960
|
-
}),
|
|
961
|
-
}),
|
|
962
|
-
|
|
965
|
+
const s = r(), i = r(e.class || ""), u = r(!!e.showButtons), v = r(!!e.showHeader), f = r(e.showCloseButton == null ? !0 : e.showCloseButton), p = r(!0), w = r(e.title || ""), T = e.acceptCallback || (() => {
|
|
966
|
+
}), h = e.rejectCallback || (() => {
|
|
967
|
+
}), g = e.closedCallback || ((N) => {
|
|
968
|
+
}), F = e.resizeHandle || ((N) => {
|
|
969
|
+
}), E = e.stopMoveHandle || ((N) => {
|
|
970
|
+
}), P = Ot(e), C = (N) => {
|
|
971
|
+
p.value = !1, n.unmount(), g(N);
|
|
963
972
|
};
|
|
964
|
-
return
|
|
973
|
+
return ze(() => {
|
|
965
974
|
}), o.expose({
|
|
966
|
-
modalRef:
|
|
967
|
-
}), () =>
|
|
968
|
-
ref:
|
|
969
|
-
class:
|
|
970
|
-
modelValue:
|
|
971
|
-
"onUpdate:modelValue": (N) =>
|
|
972
|
-
title:
|
|
975
|
+
modalRef: s
|
|
976
|
+
}), () => l(Ye, {
|
|
977
|
+
ref: s,
|
|
978
|
+
class: i.value,
|
|
979
|
+
modelValue: p.value,
|
|
980
|
+
"onUpdate:modelValue": (N) => p.value = N,
|
|
981
|
+
title: w.value,
|
|
973
982
|
width: e.width,
|
|
974
983
|
height: e.height,
|
|
975
984
|
buttons: e.buttons,
|
|
976
|
-
"show-header":
|
|
977
|
-
"show-buttons":
|
|
978
|
-
"show-close-button":
|
|
985
|
+
"show-header": v.value,
|
|
986
|
+
"show-buttons": u.value,
|
|
987
|
+
"show-close-button": f.value,
|
|
979
988
|
"show-max-button": !1,
|
|
980
|
-
onAccept:
|
|
981
|
-
onCancel:
|
|
989
|
+
onAccept: T,
|
|
990
|
+
onCancel: h,
|
|
982
991
|
fitContent: e.fitContent == null ? !0 : e.fitContent,
|
|
983
|
-
onClosed:
|
|
984
|
-
onResize:
|
|
985
|
-
onStopMove:
|
|
992
|
+
onClosed: C,
|
|
993
|
+
onResize: F,
|
|
994
|
+
onStopMove: E
|
|
986
995
|
}, {
|
|
987
|
-
default: () => [
|
|
996
|
+
default: () => [P && P(n)]
|
|
988
997
|
});
|
|
989
998
|
}
|
|
990
999
|
});
|
|
991
|
-
return document.body.appendChild(t), n.use(
|
|
1000
|
+
return document.body.appendChild(t), n.use(Ce.i18n), n.mount(t), n;
|
|
992
1001
|
}
|
|
993
|
-
class
|
|
1002
|
+
class Ft {
|
|
994
1003
|
constructor(t) {
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1004
|
+
me(this, "appContext", null);
|
|
1005
|
+
me(this, "modalRef", r());
|
|
1006
|
+
me(this, "activeModalIndex", r(0));
|
|
1007
|
+
me(this, "modalRefs", {});
|
|
1008
|
+
me(this, "isUseEscCloseModal", r(!1));
|
|
1009
|
+
me(this, "activeModalInstance", y(() => this.modalRefs[this.activeModalIndex.value]));
|
|
1001
1010
|
this.app = t, this.appContext = t ? t._context : null;
|
|
1002
1011
|
}
|
|
1003
1012
|
getCurrentModal() {
|
|
@@ -1022,7 +1031,7 @@ class gt {
|
|
|
1022
1031
|
showButtons: !0,
|
|
1023
1032
|
showHeader: !0
|
|
1024
1033
|
}, t);
|
|
1025
|
-
return
|
|
1034
|
+
return _a(n);
|
|
1026
1035
|
}
|
|
1027
1036
|
close(t) {
|
|
1028
1037
|
var n, a;
|
|
@@ -1031,431 +1040,432 @@ class gt {
|
|
|
1031
1040
|
open(t) {
|
|
1032
1041
|
const n = document.createDocumentFragment();
|
|
1033
1042
|
t.showMaxButton && t.fitContent && (t.showMaxButton = !1);
|
|
1034
|
-
const a =
|
|
1043
|
+
const a = Tn(Object.assign({
|
|
1035
1044
|
title: "",
|
|
1036
1045
|
showButtons: !0,
|
|
1037
1046
|
showHeader: !0
|
|
1038
|
-
}, t)), o = r(!0),
|
|
1039
|
-
}),
|
|
1040
|
-
}),
|
|
1041
|
-
}),
|
|
1042
|
-
}),
|
|
1047
|
+
}, t)), o = r(!0), s = a.value.acceptCallback || (() => {
|
|
1048
|
+
}), i = a.value.rejectCallback || (() => {
|
|
1049
|
+
}), u = a.value.closedCallback || ((B, L) => {
|
|
1050
|
+
}), v = a.value.resizeHandle || ((B) => {
|
|
1051
|
+
}), f = t.stopMoveHandle || ((B) => {
|
|
1043
1052
|
});
|
|
1044
|
-
let
|
|
1045
|
-
const
|
|
1046
|
-
var
|
|
1053
|
+
let p;
|
|
1054
|
+
const w = Ot(a.value), T = (B) => {
|
|
1055
|
+
var b;
|
|
1047
1056
|
o.value = !1;
|
|
1048
|
-
const
|
|
1049
|
-
|
|
1050
|
-
},
|
|
1051
|
-
|
|
1052
|
-
if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value],
|
|
1053
|
-
const
|
|
1054
|
-
|
|
1057
|
+
const L = (b = B == null ? void 0 : B.target) == null ? void 0 : b.classList.contains("modal_close");
|
|
1058
|
+
u(B, this.isUseEscCloseModal.value ? "esc" : L ? "icon" : "button");
|
|
1059
|
+
}, h = (B) => {
|
|
1060
|
+
T(B), p && Ne(() => {
|
|
1061
|
+
if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value], lt(null, n), p = null, this.modalRef.value = null, this.modalRefs) {
|
|
1062
|
+
const L = Object.keys(this.modalRefs).map((b) => Number(b));
|
|
1063
|
+
L.length > 0 ? this.activeModalIndex.value = Math.max(...L) : this.activeModalIndex.value = 0;
|
|
1055
1064
|
}
|
|
1056
1065
|
this.isUseEscCloseModal.value = !1;
|
|
1057
1066
|
});
|
|
1058
|
-
},
|
|
1059
|
-
var
|
|
1060
|
-
this.isUseEscCloseModal.value = !0, this.activeModalInstance && ((
|
|
1067
|
+
}, g = (B) => {
|
|
1068
|
+
var L;
|
|
1069
|
+
this.isUseEscCloseModal.value = !0, this.activeModalInstance && ((L = this.activeModalInstance.value) == null || L.close(B == null ? void 0 : B.event));
|
|
1061
1070
|
}, {
|
|
1062
|
-
width:
|
|
1063
|
-
height:
|
|
1064
|
-
} = a.value,
|
|
1065
|
-
Object.assign(a.value,
|
|
1066
|
-
const
|
|
1071
|
+
width: F,
|
|
1072
|
+
height: E
|
|
1073
|
+
} = a.value, P = this.adaptToWindow(F || 500, E || 320);
|
|
1074
|
+
Object.assign(a.value, P);
|
|
1075
|
+
const C = () => l(Ye, tt({
|
|
1067
1076
|
ref: this.modalRef,
|
|
1068
1077
|
modelValue: o.value,
|
|
1069
|
-
"onUpdate:modelValue": (
|
|
1078
|
+
"onUpdate:modelValue": (B) => o.value = B
|
|
1070
1079
|
}, a.value, {
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1080
|
+
isMessager: a.value.class && a.value.class.indexOf("modal-message") > -1,
|
|
1081
|
+
onAccept: s,
|
|
1082
|
+
onCancel: i,
|
|
1083
|
+
onClosed: h,
|
|
1084
|
+
onResize: v,
|
|
1085
|
+
onEsc: g,
|
|
1086
|
+
onStopMove: f
|
|
1077
1087
|
}), {
|
|
1078
|
-
default: () => [
|
|
1088
|
+
default: () => [w && w(this.app)]
|
|
1079
1089
|
});
|
|
1080
|
-
return
|
|
1081
|
-
const
|
|
1082
|
-
return
|
|
1090
|
+
return p = ((B) => {
|
|
1091
|
+
const L = Mn(C, B);
|
|
1092
|
+
return L.appContext = this.appContext, lt(L, n), L;
|
|
1083
1093
|
})({
|
|
1084
1094
|
...a.value
|
|
1085
1095
|
// 'onUpdate:modelValue': onUpdateModelValue,
|
|
1086
1096
|
}), this.activeModalIndex.value++, this.modalRefs[this.activeModalIndex.value] = this.modalRef.value, {
|
|
1087
|
-
update: (
|
|
1097
|
+
update: (B) => {
|
|
1088
1098
|
a.value = {
|
|
1089
1099
|
...a.value,
|
|
1090
|
-
...
|
|
1091
|
-
},
|
|
1100
|
+
...B
|
|
1101
|
+
}, p && lt(kn(p, {
|
|
1092
1102
|
...a
|
|
1093
1103
|
}), n);
|
|
1094
1104
|
},
|
|
1095
|
-
destroy:
|
|
1105
|
+
destroy: h,
|
|
1096
1106
|
modalRef: this.activeModalInstance,
|
|
1097
1107
|
close: () => this.close()
|
|
1098
1108
|
};
|
|
1099
1109
|
}
|
|
1100
1110
|
}
|
|
1101
|
-
const
|
|
1102
|
-
|
|
1103
|
-
e.component(
|
|
1104
|
-
const t = new
|
|
1105
|
-
e.provide(
|
|
1111
|
+
const It = Symbol("FModalService");
|
|
1112
|
+
Ye.install = (e) => {
|
|
1113
|
+
e.component(Ye.name, Ye);
|
|
1114
|
+
const t = new Ft(e);
|
|
1115
|
+
e.provide(It, t), e.provide("FModalService", t);
|
|
1106
1116
|
};
|
|
1107
|
-
function
|
|
1117
|
+
function Et(e, t) {
|
|
1108
1118
|
function n() {
|
|
1109
1119
|
const a = e.beforeOpen || e.beforeClickButton || null;
|
|
1110
1120
|
let o = Promise.resolve(!0);
|
|
1111
1121
|
if (a) {
|
|
1112
|
-
const
|
|
1113
|
-
if (typeof
|
|
1122
|
+
const s = a(t.value);
|
|
1123
|
+
if (typeof s > "u")
|
|
1114
1124
|
return o;
|
|
1115
|
-
typeof
|
|
1125
|
+
typeof s == "boolean" ? o = Promise.resolve(s) : o = s;
|
|
1116
1126
|
}
|
|
1117
1127
|
return o;
|
|
1118
1128
|
}
|
|
1119
1129
|
return { judgeCanOpen: n };
|
|
1120
1130
|
}
|
|
1121
|
-
function
|
|
1122
|
-
const
|
|
1131
|
+
function Ya(e, t, n, a, o) {
|
|
1132
|
+
const s = r(e.buttonBehavior), i = r(e.popupOnInput), u = y(() => ({
|
|
1123
1133
|
"input-group-append": !0,
|
|
1124
1134
|
"append-force-show": e.showButtonWhenDisabled && (e.readonly || e.disable)
|
|
1125
|
-
})), { judgeCanOpen:
|
|
1126
|
-
async function
|
|
1127
|
-
if (await
|
|
1128
|
-
const
|
|
1129
|
-
if (
|
|
1130
|
-
const
|
|
1131
|
-
...
|
|
1135
|
+
})), { judgeCanOpen: v } = Et(e, o), f = y(() => e.showButtonWhenDisabled || (!e.editable || !e.readonly) && !e.disable), p = Ze(It, null), w = r();
|
|
1136
|
+
async function T(F) {
|
|
1137
|
+
if (await v() && f.value) {
|
|
1138
|
+
const E = !!t.slots.default;
|
|
1139
|
+
if (s.value === "Modal") {
|
|
1140
|
+
const P = e.modalOptions, C = p == null ? void 0 : p.open({
|
|
1141
|
+
...P,
|
|
1132
1142
|
render: () => t.slots.default && t.slots.default()
|
|
1133
1143
|
});
|
|
1134
|
-
|
|
1144
|
+
w.value = C == null ? void 0 : C.modalRef;
|
|
1135
1145
|
}
|
|
1136
|
-
|
|
1146
|
+
s.value === "Overlay" && Aa.show({
|
|
1137
1147
|
// host: buttonEditRef.value,
|
|
1138
1148
|
host: document.body,
|
|
1139
1149
|
backgroundColor: "rgba(0,0,0,.15)",
|
|
1140
1150
|
render: () => t.slots.default && t.slots.default()
|
|
1141
|
-
}),
|
|
1151
|
+
}), E && s.value === "Popup" && a.togglePopup(!0), E && i.value && a.hidePopup(), t.emit("clickButton", { origin: F, value: e.modelValue });
|
|
1142
1152
|
}
|
|
1143
1153
|
}
|
|
1144
|
-
function
|
|
1145
|
-
t.emit("mouseEnterIcon",
|
|
1154
|
+
function h(F) {
|
|
1155
|
+
t.emit("mouseEnterIcon", F);
|
|
1146
1156
|
}
|
|
1147
|
-
function
|
|
1148
|
-
t.emit("mouseLeaveIcon",
|
|
1157
|
+
function g(F) {
|
|
1158
|
+
t.emit("mouseLeaveIcon", F);
|
|
1149
1159
|
}
|
|
1150
1160
|
return {
|
|
1151
|
-
buttonGroupClass:
|
|
1152
|
-
onClickButton:
|
|
1153
|
-
onMouseEnterButton:
|
|
1154
|
-
onMouseLeaveButton:
|
|
1155
|
-
modalRef:
|
|
1161
|
+
buttonGroupClass: u,
|
|
1162
|
+
onClickButton: T,
|
|
1163
|
+
onMouseEnterButton: h,
|
|
1164
|
+
onMouseLeaveButton: g,
|
|
1165
|
+
modalRef: w
|
|
1156
1166
|
};
|
|
1157
1167
|
}
|
|
1158
|
-
function
|
|
1159
|
-
const
|
|
1160
|
-
function
|
|
1161
|
-
|
|
1168
|
+
function qa(e, t, n, a, o, s) {
|
|
1169
|
+
const i = r(!1), u = y(() => e.enableClear && !e.readonly && !e.disable), { changeTextBoxValue: v, hasClearClass: f } = s;
|
|
1170
|
+
function p(g) {
|
|
1171
|
+
i.value = g, f.value = g;
|
|
1162
1172
|
}
|
|
1163
|
-
|
|
1164
|
-
|
|
1173
|
+
Z(o, () => {
|
|
1174
|
+
p(!!o.value);
|
|
1165
1175
|
});
|
|
1166
|
-
function
|
|
1167
|
-
const
|
|
1168
|
-
|
|
1176
|
+
function w(g) {
|
|
1177
|
+
const F = !e.readonly && !e.disable && e.editable, E = !e.editable;
|
|
1178
|
+
g.stopPropagation(), (F || E) && (v(""), o.value = "", p(!i.value), t.emit("clear"));
|
|
1169
1179
|
}
|
|
1170
|
-
function
|
|
1171
|
-
if (
|
|
1180
|
+
function T(g) {
|
|
1181
|
+
if (u.value) {
|
|
1172
1182
|
if (!n.value) {
|
|
1173
|
-
|
|
1183
|
+
p(!1);
|
|
1174
1184
|
return;
|
|
1175
1185
|
}
|
|
1176
|
-
!e.disable && !e.readonly &&
|
|
1186
|
+
!e.disable && !e.readonly && p(!0);
|
|
1177
1187
|
}
|
|
1178
1188
|
}
|
|
1179
|
-
function
|
|
1180
|
-
|
|
1189
|
+
function h(g) {
|
|
1190
|
+
u.value && p(!1);
|
|
1181
1191
|
}
|
|
1182
1192
|
return {
|
|
1183
|
-
enableClearButton:
|
|
1184
|
-
showClearButton:
|
|
1185
|
-
onClearValue:
|
|
1186
|
-
onMouseEnterTextBox:
|
|
1187
|
-
onMouseLeaveTextBox:
|
|
1193
|
+
enableClearButton: u,
|
|
1194
|
+
showClearButton: i,
|
|
1195
|
+
onClearValue: w,
|
|
1196
|
+
onMouseEnterTextBox: T,
|
|
1197
|
+
onMouseLeaveTextBox: h
|
|
1188
1198
|
};
|
|
1189
1199
|
}
|
|
1190
|
-
function
|
|
1191
|
-
const
|
|
1200
|
+
function Xa(e, t, n, a, o) {
|
|
1201
|
+
const s = y(() => e.popupOnInput), i = y(() => e.popupOnFocus), { shouldPopupContent: u, closeAllPopover: v } = o, f = r(!1), p = y(() => e.enableTitle ? n.value : ""), w = y(() => (e.disable || e.readonly) && !e.forcePlaceholder ? "" : e.placeholder), T = y(() => e.readonly || !e.editable), h = r(!1), g = y(() => !e.disable && h.value), F = y(() => ({
|
|
1192
1202
|
"text-left": e.textAlign === "left",
|
|
1193
1203
|
"text-center": e.textAlign === "center",
|
|
1194
1204
|
"text-right": e.textAlign === "right",
|
|
1195
1205
|
"form-control": !0,
|
|
1196
1206
|
"f-utils-fill": !0
|
|
1197
|
-
})),
|
|
1207
|
+
})), E = y(() => ({
|
|
1198
1208
|
"input-group": !0,
|
|
1199
1209
|
"f-state-disabled": e.disable,
|
|
1200
1210
|
"f-state-editable": e.editable && !e.disable && !e.readonly,
|
|
1201
1211
|
"f-state-readonly": e.readonly,
|
|
1202
|
-
"f-state-focus":
|
|
1203
|
-
"input-group--has-clear": e.enableClear &&
|
|
1212
|
+
"f-state-focus": g.value,
|
|
1213
|
+
"input-group--has-clear": e.enableClear && f.value
|
|
1204
1214
|
}));
|
|
1205
|
-
function
|
|
1206
|
-
n.value =
|
|
1215
|
+
function P(O, G = !0) {
|
|
1216
|
+
n.value = O, G && (t.emit("change", O), t.emit("update:modelValue", O));
|
|
1207
1217
|
}
|
|
1208
|
-
function
|
|
1209
|
-
|
|
1218
|
+
function C(O) {
|
|
1219
|
+
u.value = !1, P(O, !0);
|
|
1210
1220
|
}
|
|
1211
|
-
|
|
1221
|
+
Z(
|
|
1212
1222
|
() => e.modelValue,
|
|
1213
|
-
(
|
|
1214
|
-
n.value =
|
|
1223
|
+
(O) => {
|
|
1224
|
+
n.value = O;
|
|
1215
1225
|
}
|
|
1216
1226
|
);
|
|
1217
|
-
function N(
|
|
1218
|
-
|
|
1227
|
+
function N(O) {
|
|
1228
|
+
h.value = !1, t.emit("blur", O), O.stopPropagation();
|
|
1219
1229
|
}
|
|
1220
|
-
function
|
|
1221
|
-
t.emit("click",
|
|
1230
|
+
function U(O) {
|
|
1231
|
+
t.emit("click", O), v(), t.slots.default && !e.disable && !e.readonly && e.popupOnClick && o.togglePopup();
|
|
1222
1232
|
}
|
|
1223
|
-
function
|
|
1224
|
-
!e.disable && !e.readonly && (
|
|
1233
|
+
function B(O) {
|
|
1234
|
+
!e.disable && !e.readonly && (h.value = !0, T.value || (t.emit("focus", O), i.value && !u.value && o.popup()));
|
|
1225
1235
|
}
|
|
1226
|
-
function
|
|
1227
|
-
t.emit("input",
|
|
1228
|
-
const G =
|
|
1229
|
-
a.value = G, n.value !== G &&
|
|
1236
|
+
function L(O) {
|
|
1237
|
+
t.emit("input", O);
|
|
1238
|
+
const G = O.target.value;
|
|
1239
|
+
a.value = G, n.value !== G && P(G, e.updateOn === "change"), s.value && !u.value && o.popup();
|
|
1230
1240
|
}
|
|
1231
|
-
function
|
|
1232
|
-
|
|
1241
|
+
function b(O) {
|
|
1242
|
+
O.target.tagName !== "INPUT" && O.preventDefault(), O.stopPropagation();
|
|
1233
1243
|
}
|
|
1234
|
-
function
|
|
1235
|
-
t.emit("keydown",
|
|
1244
|
+
function k(O) {
|
|
1245
|
+
t.emit("keydown", O);
|
|
1236
1246
|
}
|
|
1237
|
-
function W(
|
|
1238
|
-
|
|
1247
|
+
function W(O) {
|
|
1248
|
+
O.key === "Enter" && (s.value || i.value) && o.hidePopup(), t.emit("keyup", O);
|
|
1239
1249
|
}
|
|
1240
|
-
function
|
|
1241
|
-
const G =
|
|
1242
|
-
|
|
1250
|
+
function K(O) {
|
|
1251
|
+
const G = O.target.value;
|
|
1252
|
+
O.stopPropagation(), P(G);
|
|
1243
1253
|
}
|
|
1244
1254
|
return {
|
|
1245
|
-
hasFocusedTextBox:
|
|
1246
|
-
isTextBoxReadonly:
|
|
1247
|
-
textBoxClass:
|
|
1248
|
-
textBoxPlaceholder:
|
|
1249
|
-
textBoxTitle:
|
|
1250
|
-
inputGroupClass:
|
|
1251
|
-
hasClearClass:
|
|
1252
|
-
changeTextBoxValue:
|
|
1253
|
-
commitValue:
|
|
1255
|
+
hasFocusedTextBox: g,
|
|
1256
|
+
isTextBoxReadonly: T,
|
|
1257
|
+
textBoxClass: F,
|
|
1258
|
+
textBoxPlaceholder: w,
|
|
1259
|
+
textBoxTitle: p,
|
|
1260
|
+
inputGroupClass: E,
|
|
1261
|
+
hasClearClass: f,
|
|
1262
|
+
changeTextBoxValue: P,
|
|
1263
|
+
commitValue: C,
|
|
1254
1264
|
onBlurTextBox: N,
|
|
1255
|
-
onClickTextBox:
|
|
1256
|
-
onFocusTextBox:
|
|
1257
|
-
onInput:
|
|
1258
|
-
onKeyDownTextBox:
|
|
1265
|
+
onClickTextBox: U,
|
|
1266
|
+
onFocusTextBox: B,
|
|
1267
|
+
onInput: L,
|
|
1268
|
+
onKeyDownTextBox: k,
|
|
1259
1269
|
onKeyUpTextBox: W,
|
|
1260
|
-
onMouseDownTextBox:
|
|
1261
|
-
onTextBoxValueChange:
|
|
1270
|
+
onMouseDownTextBox: b,
|
|
1271
|
+
onTextBoxValueChange: K
|
|
1262
1272
|
};
|
|
1263
1273
|
}
|
|
1264
|
-
const
|
|
1265
|
-
function
|
|
1266
|
-
const o = r(),
|
|
1267
|
-
|
|
1268
|
-
window[
|
|
1274
|
+
const Pe = "FarrisVue_PopoverInstancesKey";
|
|
1275
|
+
function Ja(e, t, n, a) {
|
|
1276
|
+
const o = r(), s = r(!1), { judgeCanOpen: i } = Et(e, a);
|
|
1277
|
+
Z(() => o.value, (h, g) => {
|
|
1278
|
+
window[Pe] = window[Pe] || /* @__PURE__ */ new WeakMap(), h ? window[Pe].set(n.value, h) : window[Pe].delete(n.value);
|
|
1269
1279
|
});
|
|
1270
|
-
function
|
|
1271
|
-
if (window[
|
|
1272
|
-
const
|
|
1273
|
-
document.querySelectorAll(".f-button-edit,.v-popover").forEach((
|
|
1274
|
-
const
|
|
1275
|
-
|
|
1280
|
+
function u() {
|
|
1281
|
+
if (window[Pe]) {
|
|
1282
|
+
const h = window[Pe];
|
|
1283
|
+
document.querySelectorAll(".f-button-edit,.v-popover").forEach((g) => {
|
|
1284
|
+
const F = h.get(g);
|
|
1285
|
+
F && g !== n.value && !n.value.closest(".popover-fitcontent") && F.hide();
|
|
1276
1286
|
});
|
|
1277
1287
|
}
|
|
1278
1288
|
}
|
|
1279
|
-
function
|
|
1280
|
-
const
|
|
1281
|
-
|
|
1289
|
+
function v() {
|
|
1290
|
+
const h = o.value;
|
|
1291
|
+
h && h.show(n.value);
|
|
1282
1292
|
}
|
|
1283
|
-
async function
|
|
1293
|
+
async function f(h = !1) {
|
|
1284
1294
|
if (!!t.slots.default) {
|
|
1285
|
-
if (!
|
|
1295
|
+
if (!h && !s.value && !await i())
|
|
1286
1296
|
return;
|
|
1287
|
-
|
|
1297
|
+
s.value = !s.value, s.value && (await Ne(), v());
|
|
1288
1298
|
}
|
|
1289
1299
|
}
|
|
1290
|
-
async function
|
|
1300
|
+
async function p(h = !1) {
|
|
1291
1301
|
if (!!t.slots.default) {
|
|
1292
|
-
if (!
|
|
1302
|
+
if (!h && !await i())
|
|
1293
1303
|
return;
|
|
1294
|
-
|
|
1304
|
+
s.value = !0, await Ne(), v();
|
|
1295
1305
|
}
|
|
1296
1306
|
}
|
|
1297
|
-
function
|
|
1298
|
-
|
|
1307
|
+
function w() {
|
|
1308
|
+
s.value = !1;
|
|
1299
1309
|
}
|
|
1300
|
-
function
|
|
1301
|
-
|
|
1302
|
-
|
|
1310
|
+
function T() {
|
|
1311
|
+
s.value = !0, Ne(() => {
|
|
1312
|
+
v();
|
|
1303
1313
|
});
|
|
1304
1314
|
}
|
|
1305
|
-
return { hidePopup:
|
|
1315
|
+
return { hidePopup: w, showPopup: T, popup: p, shouldPopupContent: s, togglePopup: f, popoverRef: o, closeAllPopover: u };
|
|
1306
1316
|
}
|
|
1307
|
-
function
|
|
1317
|
+
function Za(e, t, n) {
|
|
1308
1318
|
const a = r(), {
|
|
1309
1319
|
isTextBoxReadonly: o,
|
|
1310
|
-
textBoxClass:
|
|
1311
|
-
textBoxPlaceholder:
|
|
1312
|
-
textBoxTitle:
|
|
1313
|
-
onBlurTextBox:
|
|
1314
|
-
onClickTextBox:
|
|
1315
|
-
onFocusTextBox:
|
|
1316
|
-
onInput:
|
|
1317
|
-
onKeyDownTextBox:
|
|
1318
|
-
onKeyUpTextBox:
|
|
1319
|
-
onMouseDownTextBox:
|
|
1320
|
-
onTextBoxValueChange:
|
|
1321
|
-
} = n,
|
|
1322
|
-
uuid:
|
|
1323
|
-
} =
|
|
1320
|
+
textBoxClass: s,
|
|
1321
|
+
textBoxPlaceholder: i,
|
|
1322
|
+
textBoxTitle: u,
|
|
1323
|
+
onBlurTextBox: v,
|
|
1324
|
+
onClickTextBox: f,
|
|
1325
|
+
onFocusTextBox: p,
|
|
1326
|
+
onInput: w,
|
|
1327
|
+
onKeyDownTextBox: T,
|
|
1328
|
+
onKeyUpTextBox: h,
|
|
1329
|
+
onMouseDownTextBox: g,
|
|
1330
|
+
onTextBoxValueChange: F
|
|
1331
|
+
} = n, E = r(e.id), {
|
|
1332
|
+
uuid: P
|
|
1333
|
+
} = Hn(), C = y(() => ({
|
|
1324
1334
|
// 'border-top-right-radius': '6px',
|
|
1325
1335
|
// 'border-bottom-right-radius': '6px'
|
|
1326
1336
|
}));
|
|
1327
|
-
|
|
1328
|
-
var
|
|
1329
|
-
e.selectOnCreated && ((
|
|
1337
|
+
ze(() => {
|
|
1338
|
+
var b, k;
|
|
1339
|
+
e.selectOnCreated && ((b = a.value) == null || b.select()), e.focusOnCreated && ((k = a.value) == null || k.focus({
|
|
1330
1340
|
preventScroll: !0
|
|
1331
|
-
})),
|
|
1341
|
+
})), E.value || (E.value = "button-edit_" + P(8)), E.value = E.value + "-textbox";
|
|
1332
1342
|
});
|
|
1333
|
-
const N = r(!1),
|
|
1334
|
-
|
|
1335
|
-
},
|
|
1336
|
-
|
|
1343
|
+
const N = r(!1), U = (b) => {
|
|
1344
|
+
b.preventDefault(), N.value = !0;
|
|
1345
|
+
}, B = (b) => {
|
|
1346
|
+
b.preventDefault(), N.value = !1, w(b);
|
|
1337
1347
|
};
|
|
1338
|
-
function
|
|
1339
|
-
N.value ||
|
|
1348
|
+
function L(b) {
|
|
1349
|
+
N.value || w(b);
|
|
1340
1350
|
}
|
|
1341
|
-
return () =>
|
|
1351
|
+
return () => l("input", {
|
|
1342
1352
|
id: e.id ? e.id + "-textbox" : void 0,
|
|
1343
1353
|
ref: a,
|
|
1344
1354
|
name: "input-group-value",
|
|
1345
1355
|
autocomplete: e.autoComplete ? "on" : "off",
|
|
1346
|
-
class:
|
|
1347
|
-
style:
|
|
1356
|
+
class: s.value,
|
|
1357
|
+
style: C.value,
|
|
1348
1358
|
disabled: e.disable,
|
|
1349
1359
|
maxlength: e.maxLength,
|
|
1350
1360
|
minlength: e.minLength,
|
|
1351
|
-
placeholder:
|
|
1361
|
+
placeholder: i.value,
|
|
1352
1362
|
readonly: o.value,
|
|
1353
1363
|
tabindex: e.tabIndex,
|
|
1354
|
-
title:
|
|
1364
|
+
title: u.value,
|
|
1355
1365
|
type: e.inputType,
|
|
1356
1366
|
value: t.value,
|
|
1357
|
-
onBlur:
|
|
1358
|
-
onChange:
|
|
1359
|
-
onClick:
|
|
1360
|
-
onFocus:
|
|
1361
|
-
onInput:
|
|
1362
|
-
onKeydown:
|
|
1363
|
-
onKeyup:
|
|
1364
|
-
onMousedown:
|
|
1365
|
-
onCompositionend:
|
|
1366
|
-
onCompositionstart:
|
|
1367
|
+
onBlur: v,
|
|
1368
|
+
onChange: F,
|
|
1369
|
+
onClick: f,
|
|
1370
|
+
onFocus: p,
|
|
1371
|
+
onInput: L,
|
|
1372
|
+
onKeydown: T,
|
|
1373
|
+
onKeyup: h,
|
|
1374
|
+
onMousedown: g,
|
|
1375
|
+
onCompositionend: B,
|
|
1376
|
+
onCompositionstart: U
|
|
1367
1377
|
}, null);
|
|
1368
1378
|
}
|
|
1369
|
-
function
|
|
1370
|
-
const a = r(e.separator), o =
|
|
1371
|
-
changeTextBoxValue:
|
|
1372
|
-
onFocusTextBox:
|
|
1373
|
-
onBlurTextBox:
|
|
1374
|
-
onClickTextBox:
|
|
1375
|
-
textBoxPlaceholder:
|
|
1376
|
-
} = n,
|
|
1377
|
-
name:
|
|
1379
|
+
function Qa(e, t, n) {
|
|
1380
|
+
const a = r(e.separator), o = y(() => e.readonly || e.disable), {
|
|
1381
|
+
changeTextBoxValue: s,
|
|
1382
|
+
onFocusTextBox: i,
|
|
1383
|
+
onBlurTextBox: u,
|
|
1384
|
+
onClickTextBox: v,
|
|
1385
|
+
textBoxPlaceholder: f
|
|
1386
|
+
} = n, p = y(() => t.value ? t.value.split(a.value).map((g) => ({
|
|
1387
|
+
name: g,
|
|
1378
1388
|
selectable: !0
|
|
1379
1389
|
})) : []);
|
|
1380
|
-
function
|
|
1381
|
-
|
|
1390
|
+
function w(g) {
|
|
1391
|
+
s(g.map((F) => F.name).join(a.value), !0);
|
|
1382
1392
|
}
|
|
1383
|
-
|
|
1384
|
-
a.value =
|
|
1393
|
+
Z(() => e.separator, (g) => {
|
|
1394
|
+
a.value = g;
|
|
1385
1395
|
});
|
|
1386
|
-
const
|
|
1387
|
-
|
|
1388
|
-
|
|
1396
|
+
const T = r(!e.disable && !e.readonly);
|
|
1397
|
+
Z([() => e.disable, () => e.readonly], ([g, F], [E, P]) => {
|
|
1398
|
+
T.value = !g && !F;
|
|
1389
1399
|
});
|
|
1390
|
-
function
|
|
1391
|
-
|
|
1400
|
+
function h(g) {
|
|
1401
|
+
v(g);
|
|
1392
1402
|
}
|
|
1393
|
-
return () =>
|
|
1403
|
+
return () => l(Nn, {
|
|
1394
1404
|
tabindex: e.tabIndex,
|
|
1395
|
-
onFocus:
|
|
1396
|
-
onBlur:
|
|
1405
|
+
onFocus: i,
|
|
1406
|
+
onBlur: u,
|
|
1397
1407
|
id: `${e.id}-tag-editor`,
|
|
1398
1408
|
class: "form-control",
|
|
1399
|
-
placeholder:
|
|
1400
|
-
data:
|
|
1409
|
+
placeholder: f.value,
|
|
1410
|
+
data: p.value,
|
|
1401
1411
|
showClose: !o.value,
|
|
1402
1412
|
showInput: !0,
|
|
1403
1413
|
disable: o.value,
|
|
1404
|
-
onChange:
|
|
1405
|
-
onClick:
|
|
1414
|
+
onChange: w,
|
|
1415
|
+
onClick: h
|
|
1406
1416
|
}, null);
|
|
1407
1417
|
}
|
|
1408
|
-
function
|
|
1418
|
+
function eo(e, t, n, a) {
|
|
1409
1419
|
const {
|
|
1410
1420
|
buttonGroupClass: o,
|
|
1411
|
-
onClickButton:
|
|
1412
|
-
onMouseEnterButton:
|
|
1413
|
-
onMouseLeaveButton:
|
|
1421
|
+
onClickButton: s,
|
|
1422
|
+
onMouseEnterButton: i,
|
|
1423
|
+
onMouseLeaveButton: u
|
|
1414
1424
|
} = n, {
|
|
1415
|
-
enableClearButton:
|
|
1416
|
-
showClearButton:
|
|
1417
|
-
onClearValue:
|
|
1418
|
-
} = a,
|
|
1419
|
-
|
|
1420
|
-
}, e.buttonBehavior === "Modal" ? 0 : 200),
|
|
1425
|
+
enableClearButton: v,
|
|
1426
|
+
showClearButton: f,
|
|
1427
|
+
onClearValue: p
|
|
1428
|
+
} = a, w = r(), T = zn((g) => {
|
|
1429
|
+
s(g);
|
|
1430
|
+
}, e.buttonBehavior === "Modal" ? 0 : 200), h = () => {
|
|
1421
1431
|
t.emit("beforeClearValue");
|
|
1422
1432
|
};
|
|
1423
1433
|
return {
|
|
1424
|
-
renderButtonGroup: () =>
|
|
1434
|
+
renderButtonGroup: () => l("div", {
|
|
1425
1435
|
id: e.id ? `${e.id}-button-group` : void 0,
|
|
1426
1436
|
class: o.value
|
|
1427
|
-
}, [
|
|
1437
|
+
}, [v.value && On(l("span", {
|
|
1428
1438
|
class: "input-group-text input-group-clear",
|
|
1429
|
-
onClick:
|
|
1430
|
-
onMousedown:
|
|
1431
|
-
}, [
|
|
1439
|
+
onClick: p,
|
|
1440
|
+
onMousedown: h
|
|
1441
|
+
}, [l("i", {
|
|
1432
1442
|
class: "f-icon modal_close"
|
|
1433
|
-
}, null)]), [[
|
|
1443
|
+
}, null)]), [[Fn, f.value]]), t.slots.buttonContent ? l("span", {
|
|
1434
1444
|
class: "input-group-text input-group-append-button",
|
|
1435
|
-
onClick:
|
|
1436
|
-
onMouseenter:
|
|
1437
|
-
onMouseleave:
|
|
1438
|
-
}, [t.slots.buttonContent()]) : e.buttonContent ?
|
|
1445
|
+
onClick: T,
|
|
1446
|
+
onMouseenter: i,
|
|
1447
|
+
onMouseleave: u
|
|
1448
|
+
}, [t.slots.buttonContent()]) : e.buttonContent ? l("span", {
|
|
1439
1449
|
class: "input-group-text input-group-append-button",
|
|
1440
1450
|
innerHTML: e.buttonContent,
|
|
1441
|
-
ref:
|
|
1442
|
-
onClick: (
|
|
1443
|
-
onMouseenter:
|
|
1444
|
-
onMouseleave:
|
|
1451
|
+
ref: w,
|
|
1452
|
+
onClick: (g) => T(g),
|
|
1453
|
+
onMouseenter: i,
|
|
1454
|
+
onMouseleave: u
|
|
1445
1455
|
}, null) : null]),
|
|
1446
|
-
buttonHandleElement:
|
|
1456
|
+
buttonHandleElement: w
|
|
1447
1457
|
};
|
|
1448
1458
|
}
|
|
1449
|
-
function
|
|
1459
|
+
function to(e, t, n) {
|
|
1450
1460
|
const a = r(e.popupMinWidth), {
|
|
1451
1461
|
hidePopup: o,
|
|
1452
|
-
popoverRef:
|
|
1453
|
-
} = n,
|
|
1462
|
+
popoverRef: s
|
|
1463
|
+
} = n, i = () => {
|
|
1454
1464
|
t.emit("shown");
|
|
1455
1465
|
};
|
|
1456
|
-
return () =>
|
|
1466
|
+
return () => l(An, {
|
|
1457
1467
|
id: `${e.id}-popover`,
|
|
1458
|
-
ref:
|
|
1468
|
+
ref: s,
|
|
1459
1469
|
placement: e.placement,
|
|
1460
1470
|
host: e.popupHost,
|
|
1461
1471
|
"keep-width-with-reference": e.keepWidthWithReference,
|
|
@@ -1465,137 +1475,137 @@ function Ha(e, t, n) {
|
|
|
1465
1475
|
class: e.popupClass,
|
|
1466
1476
|
offsetX: e.popupOffsetX,
|
|
1467
1477
|
onHidden: o,
|
|
1468
|
-
onShown:
|
|
1478
|
+
onShown: i,
|
|
1469
1479
|
beforeClose: e.beforeClosePopup,
|
|
1470
1480
|
limitContentBySpace: e.limitContentBySpace
|
|
1471
1481
|
}, {
|
|
1472
1482
|
default: () => {
|
|
1473
|
-
var
|
|
1474
|
-
return [(
|
|
1483
|
+
var u, v;
|
|
1484
|
+
return [(v = (u = t.slots).default) == null ? void 0 : v.call(u)];
|
|
1475
1485
|
}
|
|
1476
1486
|
});
|
|
1477
1487
|
}
|
|
1478
|
-
const
|
|
1488
|
+
const Pt = /* @__PURE__ */ Se({
|
|
1479
1489
|
name: "FButtonEdit",
|
|
1480
|
-
props:
|
|
1490
|
+
props: ja,
|
|
1481
1491
|
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue", "beforeClearValue"],
|
|
1482
1492
|
setup(e, t) {
|
|
1483
|
-
const n = r(), a = r(e.customClass), o = r(e.modelValue),
|
|
1484
|
-
shouldPopupContent:
|
|
1485
|
-
hidePopup:
|
|
1486
|
-
showPopup:
|
|
1487
|
-
togglePopup:
|
|
1488
|
-
} =
|
|
1489
|
-
hasFocusedTextBox:
|
|
1490
|
-
commitValue:
|
|
1491
|
-
inputGroupClass:
|
|
1492
|
-
} =
|
|
1493
|
-
onMouseEnterTextBox:
|
|
1494
|
-
onMouseLeaveTextBox:
|
|
1495
|
-
} =
|
|
1496
|
-
const
|
|
1493
|
+
const n = r(), a = r(e.customClass), o = r(e.modelValue), s = Ja(e, t, n, o), {
|
|
1494
|
+
shouldPopupContent: i,
|
|
1495
|
+
hidePopup: u,
|
|
1496
|
+
showPopup: v,
|
|
1497
|
+
togglePopup: f
|
|
1498
|
+
} = s, p = Ya(e, t, n, s, o), w = r(""), T = Xa(e, t, o, w, s), {
|
|
1499
|
+
hasFocusedTextBox: h,
|
|
1500
|
+
commitValue: g,
|
|
1501
|
+
inputGroupClass: F
|
|
1502
|
+
} = T, E = qa(e, t, o, h, w, T), {
|
|
1503
|
+
onMouseEnterTextBox: P,
|
|
1504
|
+
onMouseLeaveTextBox: C
|
|
1505
|
+
} = E, N = r(!1), U = y(() => {
|
|
1506
|
+
const z = {
|
|
1497
1507
|
"f-button-edit": !0,
|
|
1498
1508
|
"f-cmp-inputgroup": !0,
|
|
1499
1509
|
"f-button-edit-nowrap": !e.wrapText
|
|
1500
1510
|
};
|
|
1501
|
-
return a.value && a.value.split(" ").reduce((
|
|
1502
|
-
}),
|
|
1511
|
+
return a.value && a.value.split(" ").reduce((M, d) => (M[d] = !0, M), z), z;
|
|
1512
|
+
}), B = y(() => ({
|
|
1503
1513
|
overflow: e.wrapText ? "hidden" : ""
|
|
1504
|
-
})),
|
|
1514
|
+
})), L = y(() => ({
|
|
1505
1515
|
// paddingLeft: '3px',
|
|
1506
1516
|
// backgroundColor: '#fff'
|
|
1507
1517
|
}));
|
|
1508
|
-
function
|
|
1518
|
+
function b() {
|
|
1509
1519
|
if (!e.multiSelect || e.inputType !== "tag" || !n.value)
|
|
1510
1520
|
return 0;
|
|
1511
|
-
let
|
|
1512
|
-
const
|
|
1513
|
-
return
|
|
1521
|
+
let z = 0;
|
|
1522
|
+
const M = Array.from(n.value.querySelectorAll(".farris-tag-item"));
|
|
1523
|
+
return M && M.length && (z = M.map((d) => d.offsetTop).filter((d) => d > 20).length), z;
|
|
1514
1524
|
}
|
|
1515
|
-
const
|
|
1516
|
-
|
|
1517
|
-
|
|
1525
|
+
const k = r(b());
|
|
1526
|
+
In(() => {
|
|
1527
|
+
k.value = b();
|
|
1518
1528
|
});
|
|
1519
1529
|
function W() {
|
|
1520
|
-
return e.multiSelect && e.inputType === "tag" ? () =>
|
|
1530
|
+
return e.multiSelect && e.inputType === "tag" ? () => l(pe, null, [Qa(e, o, T)(), !!k.value && l("div", {
|
|
1521
1531
|
class: "d-flex flex-row mr-2 more-tags",
|
|
1522
1532
|
"more-tags": !0
|
|
1523
|
-
}, [
|
|
1533
|
+
}, [l("span", {
|
|
1524
1534
|
class: "multi--more-text"
|
|
1525
|
-
}, [
|
|
1535
|
+
}, [Be("+"), k.value])])]) : Za(e, o, T);
|
|
1526
1536
|
}
|
|
1527
|
-
let
|
|
1528
|
-
|
|
1529
|
-
|
|
1537
|
+
let K = W();
|
|
1538
|
+
Z([() => e.multiSelect, () => e.inputType], () => {
|
|
1539
|
+
K = W();
|
|
1530
1540
|
});
|
|
1531
1541
|
const {
|
|
1532
|
-
renderButtonGroup:
|
|
1542
|
+
renderButtonGroup: O,
|
|
1533
1543
|
buttonHandleElement: G
|
|
1534
|
-
} =
|
|
1535
|
-
displayText:
|
|
1536
|
-
commitValue:
|
|
1544
|
+
} = eo(e, t, p, E), se = to(e, t, s), X = r(i.value), ue = {
|
|
1545
|
+
displayText: w,
|
|
1546
|
+
commitValue: g,
|
|
1537
1547
|
elementRef: n,
|
|
1538
|
-
hidePopup:
|
|
1539
|
-
showPopup:
|
|
1540
|
-
popoverRef:
|
|
1541
|
-
shouldPopupContent:
|
|
1542
|
-
togglePopup:
|
|
1548
|
+
hidePopup: u,
|
|
1549
|
+
showPopup: v,
|
|
1550
|
+
popoverRef: s.popoverRef,
|
|
1551
|
+
shouldPopupContent: i,
|
|
1552
|
+
togglePopup: f,
|
|
1543
1553
|
openDialog: () => {
|
|
1544
1554
|
G.value && e.buttonBehavior === "Modal" && G.value.click();
|
|
1545
1555
|
},
|
|
1546
1556
|
getModal: () => {
|
|
1547
|
-
var
|
|
1548
|
-
return e.buttonBehavior === "Modal" ? (
|
|
1557
|
+
var z;
|
|
1558
|
+
return e.buttonBehavior === "Modal" ? (z = p.modalRef.value) == null ? void 0 : z.value : null;
|
|
1549
1559
|
},
|
|
1550
1560
|
getTextbox: () => {
|
|
1551
|
-
var
|
|
1552
|
-
return (
|
|
1561
|
+
var z;
|
|
1562
|
+
return (z = n.value) == null ? void 0 : z.querySelector("input");
|
|
1553
1563
|
},
|
|
1554
1564
|
forceClosePopup: () => {
|
|
1555
|
-
|
|
1565
|
+
X.value = !1, N.value = !0, i.value = !1;
|
|
1556
1566
|
}
|
|
1557
1567
|
};
|
|
1558
|
-
return
|
|
1559
|
-
n.value.componentInstance =
|
|
1568
|
+
return ze(() => {
|
|
1569
|
+
n.value.componentInstance = ue, window.onresize = () => {
|
|
1560
1570
|
document.body.click();
|
|
1561
1571
|
};
|
|
1562
|
-
}),
|
|
1563
|
-
var
|
|
1564
|
-
window.onresize = null, (
|
|
1565
|
-
}), t.expose(
|
|
1572
|
+
}), En(() => {
|
|
1573
|
+
var z;
|
|
1574
|
+
window.onresize = null, (z = window[Pe]) == null || z.delete(n.value);
|
|
1575
|
+
}), t.expose(ue), Z(() => i.value, async (z, M) => {
|
|
1566
1576
|
if (N.value) {
|
|
1567
|
-
|
|
1577
|
+
X.value = z, N.value = !1;
|
|
1568
1578
|
return;
|
|
1569
1579
|
}
|
|
1570
|
-
if (!
|
|
1580
|
+
if (!z && e.beforeClosePopup && typeof e.beforeClosePopup == "function") {
|
|
1571
1581
|
try {
|
|
1572
|
-
const
|
|
1573
|
-
|
|
1574
|
-
} catch (
|
|
1575
|
-
console.error("Error in beforeClosePopup:",
|
|
1582
|
+
const d = await e.beforeClosePopup();
|
|
1583
|
+
X.value = !d, (!d || e.readonly) && (i.value = !0);
|
|
1584
|
+
} catch (d) {
|
|
1585
|
+
console.error("Error in beforeClosePopup:", d), X.value = M, i.value = M;
|
|
1576
1586
|
}
|
|
1577
1587
|
return;
|
|
1578
1588
|
}
|
|
1579
|
-
|
|
1589
|
+
X.value = z;
|
|
1580
1590
|
}), () => {
|
|
1581
|
-
var
|
|
1582
|
-
return
|
|
1591
|
+
var z, M;
|
|
1592
|
+
return l(pe, null, [l("div", tt(t.attrs, {
|
|
1583
1593
|
ref: n,
|
|
1584
|
-
class:
|
|
1594
|
+
class: U.value,
|
|
1585
1595
|
id: e.id ? e.id : void 0,
|
|
1586
|
-
style:
|
|
1587
|
-
}), [
|
|
1596
|
+
style: B.value
|
|
1597
|
+
}), [l("div", {
|
|
1588
1598
|
id: e.id ? `${e.id}-input-group` : void 0,
|
|
1589
|
-
class:
|
|
1590
|
-
style:
|
|
1591
|
-
onMouseenter:
|
|
1592
|
-
onMouseleave:
|
|
1593
|
-
}, [(
|
|
1599
|
+
class: F.value,
|
|
1600
|
+
style: L.value,
|
|
1601
|
+
onMouseenter: P,
|
|
1602
|
+
onMouseleave: C
|
|
1603
|
+
}, [(M = (z = t.slots).precontent) == null ? void 0 : M.call(z), K(), O()])]), X.value && se()]);
|
|
1594
1604
|
};
|
|
1595
1605
|
}
|
|
1596
1606
|
});
|
|
1597
|
-
|
|
1598
|
-
const
|
|
1607
|
+
Mt(Pt);
|
|
1608
|
+
const no = {
|
|
1599
1609
|
/** 自定义样式 */
|
|
1600
1610
|
customClass: { type: String, default: "" },
|
|
1601
1611
|
/** 允许在最后一个单元回车新增一行 */
|
|
@@ -1726,518 +1736,611 @@ const ja = {
|
|
|
1726
1736
|
emptyTemplate: { type: Object },
|
|
1727
1737
|
beforeUpdate: { type: Function }
|
|
1728
1738
|
};
|
|
1729
|
-
function
|
|
1739
|
+
function ao(e, t, n, a, o, s, i, u, v, f, p, w, T, h, g, F) {
|
|
1730
1740
|
const {
|
|
1731
|
-
isNull:
|
|
1732
|
-
isUndefined:
|
|
1733
|
-
} =
|
|
1734
|
-
totalItems:
|
|
1741
|
+
isNull: E,
|
|
1742
|
+
isUndefined: P
|
|
1743
|
+
} = jn(), {
|
|
1744
|
+
totalItems: C,
|
|
1735
1745
|
rawView: N
|
|
1736
|
-
} =
|
|
1737
|
-
calculateCellPositionInRow:
|
|
1738
|
-
cellKey:
|
|
1739
|
-
cellPosition:
|
|
1740
|
-
rowKey:
|
|
1741
|
-
rowPosition:
|
|
1746
|
+
} = F, {
|
|
1747
|
+
calculateCellPositionInRow: U,
|
|
1748
|
+
cellKey: B,
|
|
1749
|
+
cellPosition: L,
|
|
1750
|
+
rowKey: b,
|
|
1751
|
+
rowPosition: k,
|
|
1742
1752
|
rowSpanCellPosition: W,
|
|
1743
|
-
groupCellPosition:
|
|
1744
|
-
summaryCellPosition:
|
|
1745
|
-
} = u, {
|
|
1746
|
-
cellContentClass: G,
|
|
1747
|
-
cellContentPosition: te,
|
|
1748
|
-
cellContentClassWithEllipsis: Z
|
|
1749
|
-
} = l, {
|
|
1750
|
-
collpaseGroupIconClass: le
|
|
1751
|
-
} = m, {
|
|
1752
|
-
gridCellClass: L,
|
|
1753
|
-
gridRowClass: S,
|
|
1754
|
-
onClickRow: f,
|
|
1755
|
-
onMouseoverRow: g,
|
|
1756
|
-
onMouseoutRow: P
|
|
1757
|
-
} = B, {
|
|
1758
|
-
onClickCell: R
|
|
1753
|
+
groupCellPosition: K,
|
|
1754
|
+
summaryCellPosition: O
|
|
1759
1755
|
} = i, {
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
} =
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1756
|
+
cellContentClass: G,
|
|
1757
|
+
cellContentPosition: se,
|
|
1758
|
+
cellContentClassWithEllipsis: X
|
|
1759
|
+
} = s, {
|
|
1760
|
+
collpaseGroupIconClass: ue
|
|
1761
|
+
} = f, {
|
|
1762
|
+
gridCellClass: z,
|
|
1763
|
+
gridRowClass: M,
|
|
1764
|
+
onClickRow: d,
|
|
1765
|
+
onMouseoverRow: x,
|
|
1766
|
+
onMouseoutRow: R
|
|
1767
|
+
} = w, {
|
|
1768
|
+
onClickCell: D
|
|
1769
|
+
} = v, {
|
|
1770
|
+
toggleGroupRow: A
|
|
1771
|
+
} = T, {
|
|
1772
|
+
columnContext: q,
|
|
1773
|
+
hasLeftFixedColumn: oe,
|
|
1774
|
+
hasRightFixedColumn: re
|
|
1775
|
+
} = u, {
|
|
1776
|
+
navigateOnKeyUp: de,
|
|
1777
|
+
navigateOnKeyDown: te
|
|
1778
|
+
} = p, Te = (c) => (c || []).some((V) => Tt(V) ? !(V.type === Pn || V.type === pe && !Te(V.children)) : !0) ? c : null, fe = (c) => {
|
|
1779
|
+
var V, $, I;
|
|
1780
|
+
return (($ = (V = c.column) == null ? void 0 : V.editor) == null ? void 0 : $.type) === "switch" || ((I = c.column) == null ? void 0 : I.dataType) === "boolean" ? {
|
|
1771
1781
|
display: "flex",
|
|
1772
1782
|
flexGrow: "1",
|
|
1773
1783
|
overflow: "hidden"
|
|
1774
1784
|
} : {
|
|
1775
1785
|
flexGrow: "1"
|
|
1776
1786
|
};
|
|
1777
|
-
},
|
|
1787
|
+
}, ye = ge({
|
|
1778
1788
|
"fv-grid-content-left-fixed": !0
|
|
1779
|
-
}),
|
|
1789
|
+
}), Me = ge({
|
|
1780
1790
|
"fv-grid-content-right-fixed": !0
|
|
1781
1791
|
});
|
|
1782
|
-
|
|
1783
|
-
!
|
|
1792
|
+
Z([C, N], (c) => {
|
|
1793
|
+
!c[0] && !c[1].length ? (ye["fv-grid-content-left-fixed"] = !1, Me["fv-grid-content-right-fixed"] = !1) : (ye["fv-grid-content-left-fixed"] = !0, Me["fv-grid-content-right-fixed"] = !0);
|
|
1784
1794
|
});
|
|
1785
1795
|
const {
|
|
1786
|
-
gridDataStyle:
|
|
1787
|
-
gridMergedDataStyle:
|
|
1788
|
-
leftFixedGridDataStyle:
|
|
1789
|
-
leftFixedGridMergedDataStyle:
|
|
1790
|
-
rightFixedGridDataStyle:
|
|
1791
|
-
rightFixedGridMergedDataStyle:
|
|
1792
|
-
} =
|
|
1793
|
-
function
|
|
1794
|
-
|
|
1795
|
-
}
|
|
1796
|
-
function
|
|
1796
|
+
gridDataStyle: Le,
|
|
1797
|
+
gridMergedDataStyle: ke,
|
|
1798
|
+
leftFixedGridDataStyle: De,
|
|
1799
|
+
leftFixedGridMergedDataStyle: Ae,
|
|
1800
|
+
rightFixedGridDataStyle: We,
|
|
1801
|
+
rightFixedGridMergedDataStyle: we
|
|
1802
|
+
} = h;
|
|
1803
|
+
function Ge(c, V) {
|
|
1804
|
+
V.collapse = !V.collapse, g.value = A(V.collapse ? "collapse" : "expand", V, g.value);
|
|
1805
|
+
}
|
|
1806
|
+
function $e(c, V) {
|
|
1797
1807
|
const $ = [];
|
|
1798
|
-
if (
|
|
1799
|
-
for (let
|
|
1800
|
-
$.push(
|
|
1808
|
+
if (c.groupField && V[c.groupField]) {
|
|
1809
|
+
for (let J = 0; J <= c.layer; J++)
|
|
1810
|
+
$.push(l("div", {
|
|
1801
1811
|
class: "fv-grid-group-row-icon",
|
|
1802
|
-
onClick: (
|
|
1803
|
-
}, [
|
|
1804
|
-
class:
|
|
1812
|
+
onClick: (Ve) => Ge(Ve, c)
|
|
1813
|
+
}, [l("span", {
|
|
1814
|
+
class: ue(c)
|
|
1805
1815
|
}, null)]));
|
|
1806
|
-
const
|
|
1807
|
-
$.push(
|
|
1808
|
-
ref:
|
|
1809
|
-
key:
|
|
1816
|
+
const I = c.data[c.groupField];
|
|
1817
|
+
$.push(l("div", {
|
|
1818
|
+
ref: I.setRef,
|
|
1819
|
+
key: B(c, c.layer + 1),
|
|
1810
1820
|
class: "fv-grid-cell",
|
|
1811
|
-
style:
|
|
1812
|
-
}, [
|
|
1813
|
-
$.push(
|
|
1814
|
-
ref:
|
|
1815
|
-
key:
|
|
1821
|
+
style: K(I, V, c.layer)
|
|
1822
|
+
}, [I.data])), Object.values(c.data).filter((J) => J.field !== c.groupField && J.colSpan !== 0).forEach((J) => {
|
|
1823
|
+
$.push(l("div", {
|
|
1824
|
+
ref: J.setRef,
|
|
1825
|
+
key: B(c, J.index),
|
|
1816
1826
|
class: "fv-grid-cell",
|
|
1817
|
-
style:
|
|
1818
|
-
}, [
|
|
1827
|
+
style: L(c, J, V)
|
|
1828
|
+
}, [J.data]));
|
|
1819
1829
|
});
|
|
1820
1830
|
}
|
|
1821
1831
|
return $;
|
|
1822
1832
|
}
|
|
1823
|
-
function
|
|
1824
|
-
return
|
|
1825
|
-
ref:
|
|
1826
|
-
key:
|
|
1827
|
-
class:
|
|
1828
|
-
style:
|
|
1829
|
-
onClick: (
|
|
1830
|
-
onMouseover: (
|
|
1831
|
-
}, [
|
|
1832
|
-
}
|
|
1833
|
-
function Oe(
|
|
1833
|
+
function _(c, V, $) {
|
|
1834
|
+
return c.layer > -1 && l("div", {
|
|
1835
|
+
ref: c.setRef,
|
|
1836
|
+
key: b(c),
|
|
1837
|
+
class: M(c, $),
|
|
1838
|
+
style: k(c),
|
|
1839
|
+
onClick: (I) => d(I, c),
|
|
1840
|
+
onMouseover: (I) => x(I, c)
|
|
1841
|
+
}, [$e(c, V)]);
|
|
1842
|
+
}
|
|
1843
|
+
function Oe(c, V) {
|
|
1834
1844
|
const $ = [];
|
|
1835
|
-
if (
|
|
1836
|
-
const
|
|
1837
|
-
$.push(
|
|
1838
|
-
ref:
|
|
1839
|
-
key:
|
|
1845
|
+
if (c.groupField && V[c.groupField]) {
|
|
1846
|
+
const I = c.data[c.groupField];
|
|
1847
|
+
$.push(l("div", {
|
|
1848
|
+
ref: I.setRef,
|
|
1849
|
+
key: B(c, c.layer + 1),
|
|
1840
1850
|
class: "fv-grid-cell",
|
|
1841
|
-
style:
|
|
1842
|
-
}, [
|
|
1851
|
+
style: O(I, V, c.layer)
|
|
1852
|
+
}, [I.data]));
|
|
1843
1853
|
}
|
|
1844
1854
|
return $;
|
|
1845
1855
|
}
|
|
1846
|
-
function
|
|
1847
|
-
return
|
|
1848
|
-
ref:
|
|
1849
|
-
key:
|
|
1850
|
-
class:
|
|
1851
|
-
style:
|
|
1852
|
-
onClick: (
|
|
1853
|
-
onMouseover: (
|
|
1854
|
-
}, [Oe(
|
|
1855
|
-
}
|
|
1856
|
-
function
|
|
1857
|
-
var $,
|
|
1858
|
-
return
|
|
1859
|
-
class:
|
|
1860
|
-
title:
|
|
1861
|
-
}, [
|
|
1862
|
-
class:
|
|
1863
|
-
}, [
|
|
1864
|
-
}
|
|
1865
|
-
function
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1856
|
+
function He(c, V, $) {
|
|
1857
|
+
return c.layer > -1 && l("div", {
|
|
1858
|
+
ref: c.setRef,
|
|
1859
|
+
key: b(c),
|
|
1860
|
+
class: M(c, $),
|
|
1861
|
+
style: k(c),
|
|
1862
|
+
onClick: (I) => d(I, c),
|
|
1863
|
+
onMouseover: (I) => x(I, c)
|
|
1864
|
+
}, [Oe(c, V)]);
|
|
1865
|
+
}
|
|
1866
|
+
function je(c, V) {
|
|
1867
|
+
var $, I, J;
|
|
1868
|
+
return c.showTips && typeof (($ = c.column) == null ? void 0 : $.formatter) != "function" && ((I = c.column) == null ? void 0 : I.dataType) !== "commands" && ((J = c.column) == null ? void 0 : J.dataType) !== "setting" ? l("div", {
|
|
1869
|
+
class: X(c),
|
|
1870
|
+
title: c.formatter(c, V)
|
|
1871
|
+
}, [c.formatter(c, V)]) : l("div", {
|
|
1872
|
+
class: X(c)
|
|
1873
|
+
}, [c.formatter(c, V)]);
|
|
1874
|
+
}
|
|
1875
|
+
function xe() {
|
|
1876
|
+
return l("div", null, [Be("******")]);
|
|
1877
|
+
}
|
|
1878
|
+
function ve(c) {
|
|
1879
|
+
var I, J;
|
|
1880
|
+
const V = !E(c.data) && !P(c.data) ? c.data.toString() : c.data;
|
|
1881
|
+
return ((J = (I = c.column) == null ? void 0 : I.editor) == null ? void 0 : J.showType) === "password" ? xe() : c.showTips ? l("div", {
|
|
1882
|
+
class: X(c),
|
|
1883
|
+
title: V
|
|
1884
|
+
}, [V]) : l("div", {
|
|
1885
|
+
class: X(c)
|
|
1886
|
+
}, [V]);
|
|
1887
|
+
}
|
|
1888
|
+
function Ue(c, V) {
|
|
1889
|
+
return c.mode === Gn.editing ? l("div", {
|
|
1890
|
+
style: fe(c)
|
|
1891
|
+
}, [c.getEditor(c)]) : c.column.columnTemplate ? c.column.columnTemplate(c, V) : c.formatter ? je(c, V) : ve(c);
|
|
1892
|
+
}
|
|
1893
|
+
function Fe(c, V, $) {
|
|
1894
|
+
return l("div", {
|
|
1895
|
+
ref: c.setRef,
|
|
1896
|
+
key: b(c),
|
|
1897
|
+
class: M(c, $),
|
|
1898
|
+
style: k(c),
|
|
1899
|
+
onClick: (I) => d(I, c),
|
|
1900
|
+
onMouseover: (I) => x(I, c),
|
|
1901
|
+
onMouseout: (I) => R(I, c)
|
|
1902
|
+
}, [Object.values(c.data).filter((I) => V[I.field] && I.rowSpan === 1).map((I) => {
|
|
1903
|
+
var Ve, Je;
|
|
1904
|
+
const J = t.slots.cellTemplate && Te(t.slots.cellTemplate({
|
|
1905
|
+
cell: I,
|
|
1906
|
+
row: c
|
|
1893
1907
|
}));
|
|
1894
|
-
return
|
|
1895
|
-
ref:
|
|
1896
|
-
key:
|
|
1897
|
-
class:
|
|
1898
|
-
style:
|
|
1899
|
-
onClick: (
|
|
1900
|
-
onKeydown: (
|
|
1901
|
-
}, [
|
|
1902
|
-
class: G(
|
|
1903
|
-
style:
|
|
1904
|
-
}, [
|
|
1905
|
-
cell:
|
|
1906
|
-
row:
|
|
1907
|
-
}) :
|
|
1908
|
+
return l("div", {
|
|
1909
|
+
ref: I.setRef,
|
|
1910
|
+
key: B(c, I.index),
|
|
1911
|
+
class: z(I, c),
|
|
1912
|
+
style: L(c, I, V),
|
|
1913
|
+
onClick: (Ke) => D(Ke, I, c, I.column),
|
|
1914
|
+
onKeydown: (Ke) => de(Ke, I)
|
|
1915
|
+
}, [l("div", {
|
|
1916
|
+
class: G(I),
|
|
1917
|
+
style: se(I)
|
|
1918
|
+
}, [J ? (Je = (Ve = t.slots).cellTemplate) == null ? void 0 : Je.call(Ve, {
|
|
1919
|
+
cell: I,
|
|
1920
|
+
row: c
|
|
1921
|
+
}) : Ue(I, c)])]);
|
|
1908
1922
|
})]);
|
|
1909
1923
|
}
|
|
1910
|
-
const
|
|
1911
|
-
function
|
|
1912
|
-
const $ =
|
|
1913
|
-
return
|
|
1924
|
+
const Ie = [Fe, _, He];
|
|
1925
|
+
function m(c, V) {
|
|
1926
|
+
const $ = U(c);
|
|
1927
|
+
return g.value.map((I, J) => Ie[I.type](I, $, J));
|
|
1914
1928
|
}
|
|
1915
|
-
function j(
|
|
1916
|
-
const
|
|
1917
|
-
return
|
|
1918
|
-
key:
|
|
1929
|
+
function j(c) {
|
|
1930
|
+
const V = U(c);
|
|
1931
|
+
return g.value.map(($) => Object.values($.data).filter((I) => V[I.field] && I.rowSpan > 1).map((I) => l("div", {
|
|
1932
|
+
key: B($, I.index),
|
|
1919
1933
|
class: "fv-grid-cell fv-grid-merged-cell",
|
|
1920
|
-
style: W($,
|
|
1921
|
-
}, [
|
|
1934
|
+
style: W($, I, V)
|
|
1935
|
+
}, [I.data])));
|
|
1922
1936
|
}
|
|
1923
|
-
function
|
|
1924
|
-
return
|
|
1937
|
+
function Q() {
|
|
1938
|
+
return l("div", {
|
|
1925
1939
|
ref: a,
|
|
1926
|
-
class:
|
|
1927
|
-
}, [
|
|
1940
|
+
class: ye
|
|
1941
|
+
}, [l("div", {
|
|
1928
1942
|
class: "fv-grid-data",
|
|
1929
|
-
style:
|
|
1930
|
-
}, [
|
|
1943
|
+
style: De.value
|
|
1944
|
+
}, [m(q.value.leftColumns.filter((c) => c.visible))]), l("div", {
|
|
1931
1945
|
class: "fv-grid-merge-date",
|
|
1932
|
-
style:
|
|
1933
|
-
}, [j(
|
|
1946
|
+
style: Ae.value
|
|
1947
|
+
}, [j(q.value.leftColumns.filter((c) => c.visible))])]);
|
|
1934
1948
|
}
|
|
1935
|
-
function
|
|
1936
|
-
return
|
|
1949
|
+
function ee() {
|
|
1950
|
+
return l("div", {
|
|
1937
1951
|
ref: n,
|
|
1938
1952
|
class: "fv-grid-content-primary"
|
|
1939
|
-
}, [
|
|
1953
|
+
}, [l("div", {
|
|
1940
1954
|
class: "fv-grid-data",
|
|
1941
|
-
style:
|
|
1942
|
-
}, [
|
|
1955
|
+
style: Le.value
|
|
1956
|
+
}, [m(q.value.primaryColumns.filter((c) => c.visible))]), l("div", {
|
|
1943
1957
|
class: "fv-grid-merge-date",
|
|
1944
|
-
style:
|
|
1945
|
-
}, [j(
|
|
1958
|
+
style: ke.value
|
|
1959
|
+
}, [j(q.value.primaryColumns.filter((c) => c.visible))])]);
|
|
1946
1960
|
}
|
|
1947
|
-
function
|
|
1948
|
-
return
|
|
1961
|
+
function le() {
|
|
1962
|
+
return l("div", {
|
|
1949
1963
|
ref: o,
|
|
1950
|
-
class:
|
|
1951
|
-
}, [
|
|
1964
|
+
class: Me
|
|
1965
|
+
}, [l("div", {
|
|
1952
1966
|
class: "fv-grid-data",
|
|
1953
|
-
style:
|
|
1954
|
-
}, [
|
|
1967
|
+
style: We.value
|
|
1968
|
+
}, [m(q.value.rightColumns.filter((c) => c.visible))]), l("div", {
|
|
1955
1969
|
class: "fv-grid-merge-date",
|
|
1956
|
-
style:
|
|
1957
|
-
}, [j(
|
|
1970
|
+
style: we.value
|
|
1971
|
+
}, [j(q.value.rightColumns.filter((c) => c.visible))])]);
|
|
1958
1972
|
}
|
|
1959
|
-
function
|
|
1960
|
-
const
|
|
1961
|
-
return
|
|
1973
|
+
function nt() {
|
|
1974
|
+
const c = [];
|
|
1975
|
+
return oe.value && c.push(Q()), c.push(ee()), re.value && c.push(le()), c;
|
|
1962
1976
|
}
|
|
1963
1977
|
return {
|
|
1964
|
-
renderDataArea:
|
|
1978
|
+
renderDataArea: nt
|
|
1965
1979
|
};
|
|
1966
1980
|
}
|
|
1967
|
-
|
|
1981
|
+
function oo(e) {
|
|
1982
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Tt(e);
|
|
1983
|
+
}
|
|
1984
|
+
const Rt = /* @__PURE__ */ Se({
|
|
1968
1985
|
name: "FDataGrid",
|
|
1969
|
-
props:
|
|
1970
|
-
emits: ["changed", "clickRow", "doubleClickRow", "selectionChange", "unSelectItem", "selectItem", "enterUpInLastCell", "selectAll", "unSelectAll", "pageIndexChanged", "pageSizeChanged", "beginEditCell", "endEditCell", "filterChanged", "sortChanged", "selectionUpdate"],
|
|
1986
|
+
props: no,
|
|
1987
|
+
emits: ["changed", "clickRow", "doubleClickRow", "selectionChange", "unSelectItem", "selectItem", "enterUpInLastCell", "selectAll", "unSelectAll", "pageIndexChanged", "pageSizeChanged", "beginEditCell", "endEditCell", "filterChanged", "sortChanged", "selectionUpdate", "endEditRow"],
|
|
1971
1988
|
setup(e, t) {
|
|
1972
|
-
var
|
|
1989
|
+
var mt, ht;
|
|
1990
|
+
const {
|
|
1991
|
+
isMobilePhone: n
|
|
1992
|
+
} = $n();
|
|
1973
1993
|
r();
|
|
1974
|
-
const
|
|
1975
|
-
showLoading:
|
|
1976
|
-
renderLoading:
|
|
1977
|
-
} =
|
|
1978
|
-
shouldRenderPagination:
|
|
1979
|
-
} =
|
|
1980
|
-
showSelectAll:
|
|
1981
|
-
showSelection:
|
|
1982
|
-
selectedValues:
|
|
1983
|
-
updateSelectAllStatus:
|
|
1984
|
-
} =
|
|
1985
|
-
|
|
1994
|
+
const a = 0, o = ((mt = e.rowOption) == null ? void 0 : mt.height) || 28, s = r(20), i = r(e.columns), u = Un(e), v = r(), f = r(), p = r(), w = r(), T = r(), h = r([]), g = r(!1), F = r(((ht = e.rowOption) == null ? void 0 : ht.wrapContent) || !1), E = Kn(e, u), P = _n(e, t), C = Yn(e), {
|
|
1995
|
+
showLoading: N,
|
|
1996
|
+
renderLoading: U
|
|
1997
|
+
} = qn(e, v), B = Xn(e, /* @__PURE__ */ new Map(), P, C, u), L = Jn(e, B), {
|
|
1998
|
+
shouldRenderPagination: b
|
|
1999
|
+
} = L, k = Zn(e, B, u, h, t), {
|
|
2000
|
+
showSelectAll: W,
|
|
2001
|
+
showSelection: K,
|
|
2002
|
+
selectedValues: O,
|
|
2003
|
+
updateSelectAllStatus: G
|
|
2004
|
+
} = k, se = y(() => e.disabled), X = y(() => e.virtualized ? Math.min(B.dataView.value.length, s.value) : B.dataView.value.length);
|
|
2005
|
+
y(() => e.loadingConfig.message);
|
|
1986
2006
|
const {
|
|
1987
|
-
containerStyleObject:
|
|
1988
|
-
} =
|
|
1989
|
-
applyCommands:
|
|
1990
|
-
} =
|
|
1991
|
-
|
|
2007
|
+
containerStyleObject: ue
|
|
2008
|
+
} = Qn(e), z = ea(e), {
|
|
2009
|
+
applyCommands: M
|
|
2010
|
+
} = z;
|
|
2011
|
+
M(i);
|
|
1992
2012
|
const {
|
|
1993
|
-
applyColumnSetting:
|
|
1994
|
-
removeColumnSetting:
|
|
1995
|
-
} =
|
|
1996
|
-
e.showSetting &&
|
|
1997
|
-
const
|
|
1998
|
-
applyColumnSorter:
|
|
1999
|
-
columnContext:
|
|
2000
|
-
updateColumnRenderContext:
|
|
2001
|
-
} =
|
|
2002
|
-
|
|
2003
|
-
const
|
|
2004
|
-
getVisualData:
|
|
2005
|
-
} =
|
|
2006
|
-
sidebarWidth:
|
|
2007
|
-
showSidebarCheckBox:
|
|
2008
|
-
} =
|
|
2009
|
-
onWheel:
|
|
2010
|
-
dataGridWidth:
|
|
2011
|
-
viewPortHeight:
|
|
2012
|
-
viewPortWidth:
|
|
2013
|
-
resetScroll:
|
|
2014
|
-
updateVisibleRowsOnLatestVisibleScope:
|
|
2015
|
-
} =
|
|
2016
|
-
calculateColumnsSize:
|
|
2017
|
-
} =
|
|
2018
|
-
const
|
|
2013
|
+
applyColumnSetting: d,
|
|
2014
|
+
removeColumnSetting: x
|
|
2015
|
+
} = ta(e);
|
|
2016
|
+
e.showSetting && d(i);
|
|
2017
|
+
const R = na(e, t), D = aa(e), {
|
|
2018
|
+
applyColumnSorter: A,
|
|
2019
|
+
columnContext: q,
|
|
2020
|
+
updateColumnRenderContext: oe
|
|
2021
|
+
} = R;
|
|
2022
|
+
A(B, D);
|
|
2023
|
+
const re = oa(e, q), de = la(e, t, k, u), te = sa(e, t, u, de, h), Te = ua(e), fe = ia(e, te, Te), ye = ra(e, B, te, C, u, Te, fe), Me = ca(e, u, fe, ye), Le = da(e, u, fe, ye), ke = fa(e, i, B, X, a, ye, Me, Le), {
|
|
2024
|
+
getVisualData: De
|
|
2025
|
+
} = ke, Ae = va(q), We = ma(e, q), we = ha(e, k), {
|
|
2026
|
+
sidebarWidth: Ge,
|
|
2027
|
+
showSidebarCheckBox: $e
|
|
2028
|
+
} = we, _ = ga(e, B, h, q, ke, X, a, Ge, te), {
|
|
2029
|
+
onWheel: Oe,
|
|
2030
|
+
dataGridWidth: He,
|
|
2031
|
+
viewPortHeight: je,
|
|
2032
|
+
viewPortWidth: xe,
|
|
2033
|
+
resetScroll: ve,
|
|
2034
|
+
updateVisibleRowsOnLatestVisibleScope: Ue
|
|
2035
|
+
} = _, Fe = pa(e, q, f, xe, re), {
|
|
2036
|
+
calculateColumnsSize: Ie
|
|
2037
|
+
} = Fe, m = ya(), j = ba(f, T, B, m, _), Q = Ca(e, t, R, B, re, E, _), ee = y(() => {
|
|
2038
|
+
const S = {
|
|
2019
2039
|
"fv-grid": !0,
|
|
2020
2040
|
"fv-grid-bordered": e.showBorder,
|
|
2021
2041
|
"fv-grid-horizontal-bordered": e.showHorizontalLines,
|
|
2022
2042
|
"fv-datagrid-strip": e.showStripe
|
|
2023
2043
|
};
|
|
2024
|
-
return
|
|
2025
|
-
}),
|
|
2044
|
+
return Vn(S, e.customClass);
|
|
2045
|
+
}), le = y(() => ({
|
|
2026
2046
|
"fv-grid-content": !0,
|
|
2027
|
-
"fv-grid-content-hover":
|
|
2028
|
-
"fv-grid-wrap-content":
|
|
2029
|
-
})),
|
|
2030
|
-
const
|
|
2031
|
-
return
|
|
2047
|
+
"fv-grid-content-hover": g.value,
|
|
2048
|
+
"fv-grid-wrap-content": F.value
|
|
2049
|
+
})), nt = y(() => {
|
|
2050
|
+
const S = {};
|
|
2051
|
+
return _.shouldShowHorizontalScrollbar.value && (S.paddingBottom = "10px"), _.shouldShowVirticalScrollbar.value && (S.paddingRight = "10px"), S;
|
|
2032
2052
|
}), {
|
|
2033
|
-
renderGridHeader:
|
|
2034
|
-
renderGridColumnResizeOverlay:
|
|
2053
|
+
renderGridHeader: c,
|
|
2054
|
+
renderGridColumnResizeOverlay: V,
|
|
2035
2055
|
shouldShowHeader: $
|
|
2036
|
-
} =
|
|
2037
|
-
renderDataGridPagination:
|
|
2038
|
-
} =
|
|
2039
|
-
renderDataGridSidebar:
|
|
2040
|
-
} =
|
|
2041
|
-
renderDisableMask:
|
|
2042
|
-
} =
|
|
2043
|
-
renderDataGridSummary:
|
|
2044
|
-
} =
|
|
2045
|
-
renderHorizontalScrollbar:
|
|
2046
|
-
} =
|
|
2047
|
-
renderVerticalScrollbar:
|
|
2048
|
-
} =
|
|
2049
|
-
renderFilterPanel:
|
|
2050
|
-
} =
|
|
2051
|
-
renderGroupPanel:
|
|
2052
|
-
} =
|
|
2053
|
-
function
|
|
2054
|
-
var
|
|
2055
|
-
const
|
|
2056
|
-
|
|
2057
|
-
}
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
})),
|
|
2062
|
-
}),
|
|
2063
|
-
}),
|
|
2056
|
+
} = wa(e, t, f, w, T, R, B, Q, j, P, m, Fe, re, k, we, D, _, xe, h), {
|
|
2057
|
+
renderDataGridPagination: I
|
|
2058
|
+
} = xa(e, t, B, _, L, k), {
|
|
2059
|
+
renderDataGridSidebar: J
|
|
2060
|
+
} = Ba(e, de, k, we, _), {
|
|
2061
|
+
renderDisableMask: Ve
|
|
2062
|
+
} = Sa(), {
|
|
2063
|
+
renderDataGridSummary: Je
|
|
2064
|
+
} = Ta(e, B, R), {
|
|
2065
|
+
renderHorizontalScrollbar: Ke
|
|
2066
|
+
} = Ma(e, f, _), {
|
|
2067
|
+
renderVerticalScrollbar: jt
|
|
2068
|
+
} = ka(e, f, _), {
|
|
2069
|
+
renderFilterPanel: Vt
|
|
2070
|
+
} = Oa(e, R, B, P, _), {
|
|
2071
|
+
renderGroupPanel: Nt
|
|
2072
|
+
} = Fa(e, B, Q, E, _);
|
|
2073
|
+
function zt() {
|
|
2074
|
+
var H, Y;
|
|
2075
|
+
const S = Math.ceil(f.value.clientHeight / o);
|
|
2076
|
+
S > s.value && (s.value = S, Ue()), je.value = ((H = p.value) == null ? void 0 : H.clientHeight) || 0, He.value = ((Y = f.value) == null ? void 0 : Y.clientWidth) || 0, Ie();
|
|
2077
|
+
}
|
|
2078
|
+
ze(() => {
|
|
2079
|
+
f.value && (s.value = Math.max(Math.ceil(f.value.clientHeight / o), s.value), h.value = De(0, X.value + a - 1), Wn(f.value, zt), Ie(), Ne(() => {
|
|
2080
|
+
f.value && (He.value = f.value.clientWidth), p.value && (xe.value = p.value.clientWidth, je.value = p.value.clientHeight);
|
|
2081
|
+
})), N.value && U();
|
|
2082
|
+
}), Xe(() => {
|
|
2083
|
+
}), Z(xe, () => {
|
|
2064
2084
|
});
|
|
2065
|
-
function
|
|
2066
|
-
|
|
2085
|
+
function Lt() {
|
|
2086
|
+
B.insertNewDataItem(), ve();
|
|
2067
2087
|
}
|
|
2068
|
-
function
|
|
2069
|
-
|
|
2088
|
+
function At() {
|
|
2089
|
+
B.insertNewDataItem(h.value.length), ve();
|
|
2070
2090
|
}
|
|
2071
|
-
function
|
|
2072
|
-
|
|
2091
|
+
function Wt(S) {
|
|
2092
|
+
te.onEditingRow(S);
|
|
2073
2093
|
}
|
|
2074
|
-
function
|
|
2075
|
-
|
|
2094
|
+
function Gt(S) {
|
|
2095
|
+
B.removeDataItem(S), ve();
|
|
2076
2096
|
}
|
|
2077
|
-
function
|
|
2078
|
-
|
|
2097
|
+
function $t(S) {
|
|
2098
|
+
B.removeDataItemById(S), ve();
|
|
2079
2099
|
}
|
|
2080
|
-
function
|
|
2081
|
-
|
|
2100
|
+
function Ut(S) {
|
|
2101
|
+
te.acceptEditingRow(S);
|
|
2082
2102
|
}
|
|
2083
|
-
function
|
|
2084
|
-
|
|
2103
|
+
function Kt(S) {
|
|
2104
|
+
te.cancelEditingRow(S);
|
|
2085
2105
|
}
|
|
2086
|
-
function
|
|
2087
|
-
|
|
2088
|
-
const
|
|
2089
|
-
|
|
2090
|
-
|
|
2106
|
+
function _t(S) {
|
|
2107
|
+
h.value.forEach((H, Y) => {
|
|
2108
|
+
const ae = B.visibleDataItems.value.findIndex((ie) => ie === H.raw), ce = h.value[Y - 1];
|
|
2109
|
+
S.forEach((ie) => {
|
|
2110
|
+
H.data[ie.field] ? fe.updateCellByColumn(H.data[ie.field], ie, ce, H.raw) : H.data[ie.field] = fe.createCellByColumn(ie, ae, H.raw, H, ce);
|
|
2091
2111
|
});
|
|
2092
2112
|
});
|
|
2093
2113
|
}
|
|
2094
|
-
function
|
|
2095
|
-
|
|
2114
|
+
function at(S) {
|
|
2115
|
+
S && (i.value = S, _t(i.value), M(i), e.showSetting && d(i), oe(i.value), A(B, D), Ie());
|
|
2116
|
+
}
|
|
2117
|
+
function Yt() {
|
|
2118
|
+
k.emptyCurrentRowId();
|
|
2096
2119
|
}
|
|
2097
|
-
|
|
2098
|
-
|
|
2120
|
+
Z(() => e.showSetting, (S, H) => {
|
|
2121
|
+
S !== H && at(i.value);
|
|
2099
2122
|
});
|
|
2100
|
-
function
|
|
2101
|
-
|
|
2123
|
+
function dt(S) {
|
|
2124
|
+
L.updatePagination(S);
|
|
2102
2125
|
}
|
|
2103
|
-
function
|
|
2104
|
-
|
|
2126
|
+
function qt(S, H) {
|
|
2127
|
+
S && (B.load(S), h.value = De(0, X.value + a - 1), H != null && H.keepScrollTop ? _.scrollTo(_.offsetY.value) : ve(), h.value.length || (O.value = []), $e.value && W.value && G()), te.clear();
|
|
2105
2128
|
}
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
}),
|
|
2109
|
-
|
|
2129
|
+
Z(B.shouldGroupingData, (S, H) => {
|
|
2130
|
+
S !== H && (B.updateDataView(), ve());
|
|
2131
|
+
}), Z(() => e.columns, (S) => {
|
|
2132
|
+
at(S);
|
|
2110
2133
|
});
|
|
2111
|
-
function
|
|
2112
|
-
|
|
2134
|
+
function ot(S) {
|
|
2135
|
+
de.activeRowById(S);
|
|
2113
2136
|
}
|
|
2114
|
-
function
|
|
2115
|
-
|
|
2116
|
-
|
|
2137
|
+
function Xt(S, H = {
|
|
2138
|
+
isCurrent: !0
|
|
2139
|
+
}) {
|
|
2140
|
+
H != null && H.isCurrent && ot(S), k.selectItemById(S);
|
|
2117
2141
|
}
|
|
2118
|
-
function
|
|
2119
|
-
|
|
2142
|
+
function Jt(S) {
|
|
2143
|
+
const H = u.idField.value, Y = h.value.find((ae) => ae.raw[H] === S);
|
|
2144
|
+
Y && de.clickRowItem(Y);
|
|
2120
2145
|
}
|
|
2121
|
-
function
|
|
2122
|
-
const
|
|
2123
|
-
|
|
2146
|
+
function Zt(S) {
|
|
2147
|
+
const H = u.idField.value, Y = h.value.find((ae) => ae.raw[H] === S);
|
|
2148
|
+
Y && de.changeRow(Y);
|
|
2124
2149
|
}
|
|
2125
|
-
function
|
|
2126
|
-
|
|
2150
|
+
function Qt(S) {
|
|
2151
|
+
k.selectItemByIds(S);
|
|
2127
2152
|
}
|
|
2128
|
-
function
|
|
2129
|
-
return
|
|
2153
|
+
function en() {
|
|
2154
|
+
return h.value;
|
|
2130
2155
|
}
|
|
2131
|
-
function
|
|
2132
|
-
return
|
|
2156
|
+
function tn(S) {
|
|
2157
|
+
return h.value.filter((H) => S.includes(H.raw[e.idField]));
|
|
2133
2158
|
}
|
|
2134
|
-
function
|
|
2135
|
-
return
|
|
2159
|
+
function nn() {
|
|
2160
|
+
return k.getSelectedItems();
|
|
2136
2161
|
}
|
|
2137
|
-
function
|
|
2138
|
-
return
|
|
2162
|
+
function an() {
|
|
2163
|
+
return k.getSelectionRow();
|
|
2139
2164
|
}
|
|
2140
|
-
function
|
|
2141
|
-
|
|
2165
|
+
function on() {
|
|
2166
|
+
te.endEditCell();
|
|
2142
2167
|
}
|
|
2143
|
-
function
|
|
2144
|
-
|
|
2168
|
+
function ln(S, H = {
|
|
2169
|
+
clearCurrent: !0
|
|
2170
|
+
}) {
|
|
2171
|
+
H != null && H.clearCurrent && ot(""), k.unSelectItemByIds(S);
|
|
2145
2172
|
}
|
|
2146
|
-
function
|
|
2147
|
-
|
|
2173
|
+
function ft() {
|
|
2174
|
+
k.clearSelection();
|
|
2148
2175
|
}
|
|
2149
|
-
function
|
|
2150
|
-
return
|
|
2176
|
+
function sn() {
|
|
2177
|
+
return k.currentSelectedDataId.value;
|
|
2151
2178
|
}
|
|
2152
|
-
function
|
|
2153
|
-
|
|
2179
|
+
function un() {
|
|
2180
|
+
_.scrollToBottom();
|
|
2154
2181
|
}
|
|
2155
|
-
function
|
|
2156
|
-
|
|
2182
|
+
function rn(S) {
|
|
2183
|
+
_.scrollToRowByIndex(S);
|
|
2157
2184
|
}
|
|
2158
|
-
function
|
|
2159
|
-
|
|
2160
|
-
total:
|
|
2185
|
+
function cn() {
|
|
2186
|
+
k.keepSelectingOnPaging.value || ft(), B.updateVisibleDataSummary(h.value), dt({
|
|
2187
|
+
total: B.dataView.value.length,
|
|
2161
2188
|
index: 1
|
|
2162
2189
|
});
|
|
2163
2190
|
}
|
|
2164
|
-
const
|
|
2165
|
-
activeRowById:
|
|
2166
|
-
selectRowById:
|
|
2167
|
-
addNewDataItem:
|
|
2168
|
-
addNewDataItemAtLast:
|
|
2169
|
-
removeDataItem:
|
|
2170
|
-
removeDataItemById:
|
|
2171
|
-
editDataItem:
|
|
2172
|
-
acceptDataItem:
|
|
2173
|
-
cancelDataItem:
|
|
2174
|
-
selectItemById:
|
|
2175
|
-
selectItemByIds:
|
|
2176
|
-
updateColumns:
|
|
2177
|
-
updateDataSource:
|
|
2178
|
-
updatePagination:
|
|
2179
|
-
getVisibleData:
|
|
2180
|
-
getVisibleDataByIds:
|
|
2181
|
-
getSelectedItems:
|
|
2182
|
-
getSelectionRow:
|
|
2183
|
-
getCurrentRowId:
|
|
2184
|
-
endEditCell:
|
|
2185
|
-
clickRowItemById:
|
|
2186
|
-
clearSelection:
|
|
2187
|
-
unSelectItemByIds:
|
|
2188
|
-
scrollToBottom:
|
|
2189
|
-
scrollToRowByIndex:
|
|
2190
|
-
updateDerivedData:
|
|
2191
|
+
const vt = {
|
|
2192
|
+
activeRowById: ot,
|
|
2193
|
+
selectRowById: Zt,
|
|
2194
|
+
addNewDataItem: Lt,
|
|
2195
|
+
addNewDataItemAtLast: At,
|
|
2196
|
+
removeDataItem: Gt,
|
|
2197
|
+
removeDataItemById: $t,
|
|
2198
|
+
editDataItem: Wt,
|
|
2199
|
+
acceptDataItem: Ut,
|
|
2200
|
+
cancelDataItem: Kt,
|
|
2201
|
+
selectItemById: Xt,
|
|
2202
|
+
selectItemByIds: Qt,
|
|
2203
|
+
updateColumns: at,
|
|
2204
|
+
updateDataSource: qt,
|
|
2205
|
+
updatePagination: dt,
|
|
2206
|
+
getVisibleData: en,
|
|
2207
|
+
getVisibleDataByIds: tn,
|
|
2208
|
+
getSelectedItems: nn,
|
|
2209
|
+
getSelectionRow: an,
|
|
2210
|
+
getCurrentRowId: sn,
|
|
2211
|
+
endEditCell: on,
|
|
2212
|
+
clickRowItemById: Jt,
|
|
2213
|
+
clearSelection: ft,
|
|
2214
|
+
unSelectItemByIds: ln,
|
|
2215
|
+
scrollToBottom: un,
|
|
2216
|
+
scrollToRowByIndex: rn,
|
|
2217
|
+
updateDerivedData: cn,
|
|
2218
|
+
emptyCurrentRowId: Yt
|
|
2191
2219
|
};
|
|
2192
|
-
t.expose(
|
|
2193
|
-
const
|
|
2194
|
-
renderDataArea:
|
|
2195
|
-
} =
|
|
2196
|
-
renderEmpty:
|
|
2197
|
-
} =
|
|
2220
|
+
t.expose(vt);
|
|
2221
|
+
const dn = Ia(e, t, vt, R, te, h), {
|
|
2222
|
+
renderDataArea: fn
|
|
2223
|
+
} = ao(e, t, p, w, T, Ae, We, R, te, E, dn, de, ke, _, h, B), vn = y(() => !h.value || !h.value.length), {
|
|
2224
|
+
renderEmpty: mn
|
|
2225
|
+
} = Ea(e, t), hn = y(() => ({
|
|
2198
2226
|
"d-flex": !0,
|
|
2199
|
-
"justify-content-between":
|
|
2200
|
-
"justify-content-end":
|
|
2227
|
+
"justify-content-between": b.value && K.value,
|
|
2228
|
+
"justify-content-end": b.value && !K.value,
|
|
2201
2229
|
"position-relative": !0,
|
|
2202
2230
|
"fv-datagrid-pagination": !0
|
|
2203
|
-
})),
|
|
2231
|
+
})), gn = y(() => ({
|
|
2204
2232
|
"flex-direction": "row"
|
|
2205
|
-
})),
|
|
2233
|
+
})), pn = y(() => ({
|
|
2206
2234
|
"d-flex": !0,
|
|
2207
2235
|
"align-items-center": !0
|
|
2208
2236
|
}));
|
|
2209
|
-
|
|
2210
|
-
useColumnComposition:
|
|
2211
|
-
dataView:
|
|
2212
|
-
useFilterComposition:
|
|
2213
|
-
useFitColumnComposition:
|
|
2214
|
-
useSortComposition:
|
|
2215
|
-
useVirtualScrollComposition:
|
|
2216
|
-
})
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2237
|
+
Rn("dataGridContext", {
|
|
2238
|
+
useColumnComposition: R,
|
|
2239
|
+
dataView: B,
|
|
2240
|
+
useFilterComposition: P,
|
|
2241
|
+
useFitColumnComposition: Fe,
|
|
2242
|
+
useSortComposition: D,
|
|
2243
|
+
useVirtualScrollComposition: _
|
|
2244
|
+
});
|
|
2245
|
+
function yn(S) {
|
|
2246
|
+
let H;
|
|
2247
|
+
return l(Ra, {
|
|
2248
|
+
class: "f-form-layout farris-form farris-form-controls-inline col-12 col-md-6 col-xl-3 col-el-2"
|
|
2249
|
+
}, oo(H = Object.keys(S.data).filter((Y) => {
|
|
2250
|
+
var ae, ce;
|
|
2251
|
+
return ((ae = S.data[Y].column) == null ? void 0 : ae.dataType) !== Ct && ((ce = S.data[Y].column) == null ? void 0 : ce.dataType) !== wt;
|
|
2252
|
+
}).map((Y) => {
|
|
2253
|
+
var ce, ie;
|
|
2254
|
+
const ae = S.data[Y];
|
|
2255
|
+
return l("div", {
|
|
2256
|
+
class: "farris-group-wrap w-100"
|
|
2257
|
+
}, [l("div", {
|
|
2258
|
+
class: "form-group farris-form-group common-group"
|
|
2259
|
+
}, [l(Da, {
|
|
2260
|
+
text: (ce = ae.column) == null ? void 0 : ce.title,
|
|
2261
|
+
title: (ie = ae.column) == null ? void 0 : ie.title
|
|
2262
|
+
}, null), l("div", {
|
|
2263
|
+
class: "farris-input-wrap"
|
|
2264
|
+
}, [ae.getEditor(ae)])])]);
|
|
2265
|
+
})) ? H : {
|
|
2266
|
+
default: () => [H]
|
|
2267
|
+
});
|
|
2268
|
+
}
|
|
2269
|
+
function bn(S, H) {
|
|
2270
|
+
const Y = {}, ae = {}, ce = [], ie = [], gt = {};
|
|
2271
|
+
Object.keys(H.data).filter((Ee) => {
|
|
2272
|
+
var be, _e;
|
|
2273
|
+
return ((be = H.data[Ee].column) == null ? void 0 : be.dataType) !== Ct && ((_e = H.data[Ee].column) == null ? void 0 : _e.dataType) !== wt;
|
|
2274
|
+
}).forEach((Ee) => {
|
|
2275
|
+
var _e, pt, yt;
|
|
2276
|
+
const be = H.data[Ee];
|
|
2277
|
+
Y[Ee] = be.data, te.endEditByCell(be), ae[Ee] = be.data, ce.push(be.column), ie.push(be), gt[Ee] = (yt = (pt = (_e = be.column) == null ? void 0 : _e.editor) == null ? void 0 : pt.context) == null ? void 0 : yt.editor;
|
|
2278
|
+
}), t.emit("endEditRow", {
|
|
2279
|
+
row: H,
|
|
2280
|
+
cells: ie,
|
|
2281
|
+
columns: ce,
|
|
2282
|
+
oldValues: Y,
|
|
2283
|
+
newValues: ae,
|
|
2284
|
+
editors: gt
|
|
2285
|
+
}), te.showRowEditPanel.value = !1;
|
|
2286
|
+
}
|
|
2287
|
+
function Cn() {
|
|
2288
|
+
const S = k.currentSelectedDataId.value, H = h.value.find((Y) => Y.raw[e.idField] === S);
|
|
2289
|
+
return H ? l(Pa, {
|
|
2290
|
+
showHeader: !1,
|
|
2291
|
+
modelValue: te.showRowEditPanel.value,
|
|
2292
|
+
"onUpdate:modelValue": (Y) => te.showRowEditPanel.value = Y,
|
|
2293
|
+
width: 600
|
|
2294
|
+
}, {
|
|
2295
|
+
default: () => yn(H),
|
|
2296
|
+
footerTemplate: () => l(pe, null, [l(xt, {
|
|
2297
|
+
class: "mr-3",
|
|
2298
|
+
type: "secondary",
|
|
2299
|
+
onClick: (Y) => {
|
|
2300
|
+
te.showRowEditPanel.value = !1;
|
|
2301
|
+
}
|
|
2302
|
+
}, {
|
|
2303
|
+
default: () => [Be("取消")]
|
|
2304
|
+
}), l(xt, {
|
|
2305
|
+
onClick: (Y) => {
|
|
2306
|
+
bn(Y, H);
|
|
2307
|
+
}
|
|
2308
|
+
}, {
|
|
2309
|
+
default: () => [Be("确定")]
|
|
2310
|
+
})])
|
|
2311
|
+
}) : null;
|
|
2312
|
+
}
|
|
2313
|
+
return () => l(pe, null, [l("div", {
|
|
2314
|
+
ref: v,
|
|
2315
|
+
class: ee.value,
|
|
2316
|
+
style: ue.value,
|
|
2317
|
+
onWheel: Oe
|
|
2318
|
+
}, [f.value && e.enableFilter && Vt(), f.value && Nt(), f.value && $.value && c(), l("div", {
|
|
2319
|
+
ref: f,
|
|
2320
|
+
class: le.value,
|
|
2321
|
+
style: nt.value,
|
|
2322
|
+
onTouchstart: (S) => {
|
|
2323
|
+
S.stopPropagation(), g.value = !0, _.onTouchstartScrollThumb(S, f);
|
|
2324
|
+
},
|
|
2325
|
+
onTouchend: (S) => {
|
|
2326
|
+
g.value = !1;
|
|
2227
2327
|
},
|
|
2228
|
-
|
|
2229
|
-
|
|
2328
|
+
onMouseover: (S) => {
|
|
2329
|
+
S.stopPropagation(), g.value = !0;
|
|
2330
|
+
},
|
|
2331
|
+
onMouseleave: (S) => {
|
|
2332
|
+
S.stopPropagation(), g.value = !1;
|
|
2230
2333
|
}
|
|
2231
|
-
}, [
|
|
2232
|
-
class:
|
|
2233
|
-
style:
|
|
2234
|
-
}, [
|
|
2235
|
-
class:
|
|
2236
|
-
}, [
|
|
2334
|
+
}, [f.value && J(h), f.value && fn(), f.value && vn.value && mn(), f.value && Ke(), f.value && jt()]), f.value && Je(), (b.value || K.value) && l("div", {
|
|
2335
|
+
class: hn.value,
|
|
2336
|
+
style: gn.value
|
|
2337
|
+
}, [K.value && l("div", {
|
|
2338
|
+
class: pn.value
|
|
2339
|
+
}, [l("div", null, ["已选:" + O.value.length, Be(" 条")])]), b.value && I()]), V(), se.value && Ve()]), n() && Cn()]);
|
|
2237
2340
|
}
|
|
2238
2341
|
});
|
|
2239
|
-
|
|
2240
|
-
const
|
|
2342
|
+
Mt(Rt);
|
|
2343
|
+
const lo = {
|
|
2241
2344
|
width: { Type: Number, default: 400 },
|
|
2242
2345
|
type: { Type: String, default: "info" },
|
|
2243
2346
|
title: { Type: String, default: "" },
|
|
@@ -2250,15 +2353,15 @@ const Na = {
|
|
|
2250
2353
|
promptEditorType: { Type: String, default: "text-area" },
|
|
2251
2354
|
buttons: { type: Object, default: [] }
|
|
2252
2355
|
};
|
|
2253
|
-
function
|
|
2356
|
+
function ct() {
|
|
2254
2357
|
return new DOMException("The request is not allowed", "NotAllowedError");
|
|
2255
2358
|
}
|
|
2256
|
-
async function
|
|
2359
|
+
async function so(e) {
|
|
2257
2360
|
if (!navigator.clipboard)
|
|
2258
|
-
throw
|
|
2361
|
+
throw ct();
|
|
2259
2362
|
return navigator.clipboard.writeText(e);
|
|
2260
2363
|
}
|
|
2261
|
-
async function
|
|
2364
|
+
async function uo(e) {
|
|
2262
2365
|
const t = document.createElement("span");
|
|
2263
2366
|
t.textContent = e, t.style.whiteSpace = "pre", t.style.webkitUserSelect = "auto", t.style.userSelect = "all", document.body.appendChild(t);
|
|
2264
2367
|
const n = window.getSelection(), a = window.document.createRange();
|
|
@@ -2270,61 +2373,61 @@ async function La(e) {
|
|
|
2270
2373
|
n == null || n.removeAllRanges(), window.document.body.removeChild(t);
|
|
2271
2374
|
}
|
|
2272
2375
|
if (!o)
|
|
2273
|
-
throw
|
|
2376
|
+
throw ct();
|
|
2274
2377
|
}
|
|
2275
|
-
async function
|
|
2378
|
+
async function io(e) {
|
|
2276
2379
|
try {
|
|
2277
|
-
await
|
|
2380
|
+
await so(e);
|
|
2278
2381
|
} catch (t) {
|
|
2279
2382
|
try {
|
|
2280
|
-
await
|
|
2383
|
+
await uo(e);
|
|
2281
2384
|
} catch (n) {
|
|
2282
|
-
throw n || t ||
|
|
2385
|
+
throw n || t || ct();
|
|
2283
2386
|
}
|
|
2284
2387
|
}
|
|
2285
2388
|
}
|
|
2286
|
-
function
|
|
2389
|
+
function ro() {
|
|
2287
2390
|
async function e(t) {
|
|
2288
|
-
await
|
|
2391
|
+
await io(t);
|
|
2289
2392
|
}
|
|
2290
2393
|
return { onCopy: e };
|
|
2291
2394
|
}
|
|
2292
|
-
function
|
|
2293
|
-
const o = r(14),
|
|
2395
|
+
function co(e, t, n, a) {
|
|
2396
|
+
const o = r(14), s = r(140), i = r(""), u = r(a.value.length), v = y(() => a.value), f = y(() => ({
|
|
2294
2397
|
"font-size": `${o.value}px`,
|
|
2295
2398
|
height: "100%"
|
|
2296
2399
|
}));
|
|
2297
|
-
function
|
|
2298
|
-
if (
|
|
2299
|
-
const
|
|
2300
|
-
|
|
2400
|
+
function p(w) {
|
|
2401
|
+
if (w.currentTarget) {
|
|
2402
|
+
const T = w.currentTarget.value || "";
|
|
2403
|
+
u.value = T.length;
|
|
2301
2404
|
}
|
|
2302
2405
|
}
|
|
2303
|
-
return () =>
|
|
2406
|
+
return () => l(pe, null, [l("textarea", {
|
|
2304
2407
|
title: "promptMessage",
|
|
2305
2408
|
name: "promptMessage",
|
|
2306
2409
|
class: "form-control",
|
|
2307
|
-
style:
|
|
2410
|
+
style: f.value,
|
|
2308
2411
|
rows: "4",
|
|
2309
|
-
maxlength:
|
|
2310
|
-
onInput: (
|
|
2311
|
-
}, [
|
|
2412
|
+
maxlength: s.value,
|
|
2413
|
+
onInput: (w) => p(w)
|
|
2414
|
+
}, [v.value]), l("span", {
|
|
2312
2415
|
class: "textarea-wordcount",
|
|
2313
|
-
title:
|
|
2416
|
+
title: i.value,
|
|
2314
2417
|
style: "position: absolute; bottom: 76px; right: 32px; cursor: pointer; text-align: right;"
|
|
2315
|
-
}, [
|
|
2418
|
+
}, [u.value + " / " + s.value])]);
|
|
2316
2419
|
}
|
|
2317
|
-
function
|
|
2318
|
-
const o =
|
|
2319
|
-
function u
|
|
2320
|
-
return
|
|
2420
|
+
function fo(e, t, n, a) {
|
|
2421
|
+
const o = co(e, t, n, a), s = /* @__PURE__ */ new Map([["text-area", o]]);
|
|
2422
|
+
function i(u) {
|
|
2423
|
+
return s.get(u) || null;
|
|
2321
2424
|
}
|
|
2322
|
-
return { getEditorRender:
|
|
2425
|
+
return { getEditorRender: i };
|
|
2323
2426
|
}
|
|
2324
|
-
function
|
|
2427
|
+
function vo() {
|
|
2325
2428
|
const e = r(!1), t = r("复制成功");
|
|
2326
2429
|
return {
|
|
2327
|
-
feedbackStyle:
|
|
2430
|
+
feedbackStyle: y(() => {
|
|
2328
2431
|
const a = {
|
|
2329
2432
|
position: "absolute",
|
|
2330
2433
|
left: "50%",
|
|
@@ -2348,156 +2451,153 @@ function Ua() {
|
|
|
2348
2451
|
toShowFeedback: e
|
|
2349
2452
|
};
|
|
2350
2453
|
}
|
|
2351
|
-
function
|
|
2454
|
+
function mo(e, t) {
|
|
2352
2455
|
const n = t.getEditorRender(e.promptEditorType);
|
|
2353
2456
|
return () => n && n();
|
|
2354
2457
|
}
|
|
2355
|
-
function
|
|
2356
|
-
function n(
|
|
2357
|
-
if (
|
|
2458
|
+
function ho(e, t) {
|
|
2459
|
+
function n(h) {
|
|
2460
|
+
if (h == null)
|
|
2358
2461
|
return 0;
|
|
2359
|
-
let
|
|
2360
|
-
for (let
|
|
2361
|
-
const
|
|
2362
|
-
|
|
2363
|
-
}
|
|
2364
|
-
return
|
|
2365
|
-
}
|
|
2366
|
-
function a(
|
|
2367
|
-
if (
|
|
2368
|
-
|
|
2369
|
-
const
|
|
2370
|
-
let
|
|
2371
|
-
for (let
|
|
2372
|
-
const N =
|
|
2373
|
-
if (
|
|
2374
|
-
return
|
|
2462
|
+
let g = 0;
|
|
2463
|
+
for (let F = 0; F < h.length; F++) {
|
|
2464
|
+
const E = h.charCodeAt(F);
|
|
2465
|
+
E >= 0 && E <= 128 ? g++ : g = g + 2;
|
|
2466
|
+
}
|
|
2467
|
+
return g;
|
|
2468
|
+
}
|
|
2469
|
+
function a(h, g) {
|
|
2470
|
+
if (h !== "" && h !== void 0 && h !== null) {
|
|
2471
|
+
h = "" + h;
|
|
2472
|
+
const F = h.length;
|
|
2473
|
+
let E = "", P = 0;
|
|
2474
|
+
for (let C = 0; C < F; C++) {
|
|
2475
|
+
const N = h.charAt(C);
|
|
2476
|
+
if (P++, encodeURI(N).length > 4 && P++, E = E.concat(N), P >= g)
|
|
2477
|
+
return E = E.concat("..."), E;
|
|
2375
2478
|
}
|
|
2376
|
-
if (
|
|
2377
|
-
return
|
|
2479
|
+
if (P < g)
|
|
2480
|
+
return h;
|
|
2378
2481
|
}
|
|
2379
2482
|
return "";
|
|
2380
2483
|
}
|
|
2381
|
-
const o =
|
|
2382
|
-
const
|
|
2383
|
-
return `${t.exception.happend} : ${
|
|
2384
|
-
}),
|
|
2385
|
-
const
|
|
2386
|
-
return
|
|
2387
|
-
}),
|
|
2388
|
-
|
|
2389
|
-
right: 0,
|
|
2390
|
-
bottom: i.value ? 0 : "2px",
|
|
2391
|
-
color: "#2A87FF",
|
|
2392
|
-
cursor: "pointer"
|
|
2484
|
+
const o = y(() => !!e.value && !!e.value.date), s = y(() => {
|
|
2485
|
+
const h = e.value && e.value.date || "";
|
|
2486
|
+
return `${t.exception.happend} : ${h}`;
|
|
2487
|
+
}), i = y(() => !!e.value && !!e.value.detail), u = y(() => e.value ? n(e.value.detail) > 160 : !1), v = r(!1), f = y(() => v.value ? t.exception.collapse : t.exception.expand), p = y(() => {
|
|
2488
|
+
const h = t.exception.detail + " : " + (e.value && e.value.detail) || "";
|
|
2489
|
+
return v.value ? h : a(h, 160);
|
|
2490
|
+
}), w = y(() => ({
|
|
2491
|
+
bottom: v.value ? 0 : "2px"
|
|
2393
2492
|
}));
|
|
2394
|
-
function
|
|
2395
|
-
|
|
2493
|
+
function T() {
|
|
2494
|
+
v.value = !v.value;
|
|
2396
2495
|
}
|
|
2397
|
-
return () =>
|
|
2496
|
+
return () => l("div", {
|
|
2398
2497
|
class: "toast-msg-detail",
|
|
2399
2498
|
style: "max-height: calc(100vh - 200px);overflow: auto;"
|
|
2400
|
-
}, [o.value &&
|
|
2499
|
+
}, [o.value && l("div", null, [s.value]), i.value && l("div", {
|
|
2401
2500
|
class: "exception_wrap"
|
|
2402
|
-
}, [
|
|
2501
|
+
}, [l("div", {
|
|
2403
2502
|
class: "exception_error_msg"
|
|
2404
|
-
}, [
|
|
2405
|
-
innerHTML:
|
|
2406
|
-
}, null),
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2503
|
+
}, [l("div", {
|
|
2504
|
+
innerHTML: p.value
|
|
2505
|
+
}, null), u.value && l("span", {
|
|
2506
|
+
class: "exception_toggle_detail",
|
|
2507
|
+
style: w.value,
|
|
2508
|
+
onClick: T
|
|
2509
|
+
}, [f.value])])])]);
|
|
2410
2510
|
}
|
|
2411
|
-
function
|
|
2412
|
-
return () =>
|
|
2511
|
+
function go(e) {
|
|
2512
|
+
return () => l("p", {
|
|
2413
2513
|
class: "toast-msg-detail",
|
|
2414
2514
|
innerHTML: e.value,
|
|
2415
2515
|
style: "max-height: calc(100vh - 200px);overflow: auto;"
|
|
2416
2516
|
}, null);
|
|
2417
2517
|
}
|
|
2418
|
-
function
|
|
2419
|
-
const
|
|
2420
|
-
const
|
|
2518
|
+
function po(e, t, n, a, o) {
|
|
2519
|
+
const s = r(e.exceptionInfo), i = y(() => {
|
|
2520
|
+
const g = t.value === "question" ? "warning" : t.value, F = {
|
|
2421
2521
|
"f-icon": !0
|
|
2422
|
-
},
|
|
2423
|
-
return
|
|
2424
|
-
}),
|
|
2425
|
-
function
|
|
2426
|
-
return
|
|
2522
|
+
}, E = `f-icon-${g}`;
|
|
2523
|
+
return F[E] = !0, F;
|
|
2524
|
+
}), u = y(() => n.value || s.value && s.value.message), v = y(() => a.value), f = y(() => !!a.value), p = y(() => !!s.value);
|
|
2525
|
+
function w() {
|
|
2526
|
+
return p.value ? ho(s, o) : f.value ? go(v) : () => null;
|
|
2427
2527
|
}
|
|
2428
|
-
const
|
|
2528
|
+
const T = w(), h = y(() => o.locale === "en" ? {
|
|
2429
2529
|
wordBreak: "keep-all",
|
|
2430
2530
|
overflowWrap: "break-word"
|
|
2431
2531
|
} : {});
|
|
2432
|
-
return () =>
|
|
2532
|
+
return () => l(pe, null, [l("div", {
|
|
2433
2533
|
class: "float-left modal-tips-iconwrap"
|
|
2434
|
-
}, [
|
|
2435
|
-
class:
|
|
2436
|
-
}, null)]),
|
|
2534
|
+
}, [l("span", {
|
|
2535
|
+
class: i.value
|
|
2536
|
+
}, null)]), l("div", {
|
|
2437
2537
|
class: "modal-tips-content"
|
|
2438
|
-
}, [
|
|
2538
|
+
}, [l("p", {
|
|
2439
2539
|
class: "toast-msg-title",
|
|
2440
|
-
innerHTML:
|
|
2441
|
-
style:
|
|
2442
|
-
}, null),
|
|
2540
|
+
innerHTML: u.value,
|
|
2541
|
+
style: h.value
|
|
2542
|
+
}, null), T()])]);
|
|
2443
2543
|
}
|
|
2444
|
-
function
|
|
2544
|
+
function yo(e, t, n, a) {
|
|
2445
2545
|
const {
|
|
2446
2546
|
onCopy: o
|
|
2447
2547
|
} = t, {
|
|
2448
|
-
toShowFeedback:
|
|
2449
|
-
} = n,
|
|
2548
|
+
toShowFeedback: s
|
|
2549
|
+
} = n, i = r(a.exception.copySuccess || "复制成功"), u = r(a.exception.copy || "复制详细信息"), v = r(e.exceptionInfo || {
|
|
2450
2550
|
date: "",
|
|
2451
2551
|
message: "",
|
|
2452
2552
|
detail: ""
|
|
2453
|
-
}),
|
|
2454
|
-
function
|
|
2455
|
-
o(
|
|
2456
|
-
|
|
2553
|
+
}), f = y(() => v.value && v.value.detail || "");
|
|
2554
|
+
function p(w) {
|
|
2555
|
+
o(f.value).catch((T) => {
|
|
2556
|
+
i.value = a.exception.copyFailed || "复制失败";
|
|
2457
2557
|
}).finally(() => {
|
|
2458
|
-
|
|
2459
|
-
|
|
2558
|
+
s.value = !0, setTimeout(() => {
|
|
2559
|
+
s.value = !1;
|
|
2460
2560
|
}, 700);
|
|
2461
2561
|
});
|
|
2462
2562
|
}
|
|
2463
|
-
return () =>
|
|
2464
|
-
|
|
2465
|
-
}, [
|
|
2466
|
-
onClick:
|
|
2563
|
+
return () => l("span", {
|
|
2564
|
+
class: "copy-exception-info"
|
|
2565
|
+
}, [l("span", {
|
|
2566
|
+
onClick: p,
|
|
2467
2567
|
style: "cursor: pointer;"
|
|
2468
|
-
}, [
|
|
2568
|
+
}, [u.value])]);
|
|
2469
2569
|
}
|
|
2470
|
-
function
|
|
2471
|
-
const
|
|
2472
|
-
|
|
2473
|
-
function
|
|
2474
|
-
|
|
2570
|
+
function bo(e, t, n, a, o) {
|
|
2571
|
+
const s = r(e.type), i = r(e.buttons), u = r(e.exceptionInfo), v = r(o.ok || e.okButtonText), f = r(o.cancel || e.cancelButtonText), p = r(e.showCancelButton), w = r(e.showOkButton), T = y(() => !!(i.value && i.value.length)), h = y(() => !!(u.value && u.value.detail)), g = y(() => !(i.value && i.value.length) && (w.value || p.value)), F = yo(e, n, a, o);
|
|
2572
|
+
v.value === "关闭" ? v.value = o.close : v.value === "知道了" && (v.value = o.exception.roger);
|
|
2573
|
+
function E(C) {
|
|
2574
|
+
s.value === "question" && t.emit("reject"), t.emit("close");
|
|
2475
2575
|
}
|
|
2476
|
-
function
|
|
2477
|
-
|
|
2576
|
+
function P(C) {
|
|
2577
|
+
s.value === "question" && t.emit("accept"), t.emit("close");
|
|
2478
2578
|
}
|
|
2479
|
-
return () =>
|
|
2579
|
+
return () => l("div", {
|
|
2480
2580
|
class: "modal-footer"
|
|
2481
|
-
}, [
|
|
2581
|
+
}, [h.value && F(), g.value && p.value && l("button", {
|
|
2482
2582
|
type: "button",
|
|
2483
2583
|
class: "btn btn-secondary btn-lg",
|
|
2484
|
-
onClick:
|
|
2485
|
-
}, [
|
|
2584
|
+
onClick: E
|
|
2585
|
+
}, [f.value]), g.value && w.value && l("button", {
|
|
2486
2586
|
type: "button",
|
|
2487
2587
|
class: "btn btn-primary btn-lg",
|
|
2488
|
-
onClick:
|
|
2489
|
-
}, [
|
|
2588
|
+
onClick: P
|
|
2589
|
+
}, [v.value]), T.value && i.value.length && i.value.map((C) => l("button", {
|
|
2490
2590
|
type: "button",
|
|
2491
|
-
onClick:
|
|
2492
|
-
class:
|
|
2493
|
-
}, [
|
|
2494
|
-
class:
|
|
2495
|
-
}, null),
|
|
2591
|
+
onClick: C.handle,
|
|
2592
|
+
class: C.class
|
|
2593
|
+
}, [C.iconClass && l("span", {
|
|
2594
|
+
class: C.iconClass
|
|
2595
|
+
}, null), C.text]))]);
|
|
2496
2596
|
}
|
|
2497
|
-
function
|
|
2498
|
-
const { getLocaleValue: t } =
|
|
2499
|
-
function a(o,
|
|
2500
|
-
return
|
|
2597
|
+
function Co(e) {
|
|
2598
|
+
const { getLocaleValue: t } = Ce, n = Ce.getLocale();
|
|
2599
|
+
function a(o, s, i) {
|
|
2600
|
+
return s === i ? t(o) : s;
|
|
2501
2601
|
}
|
|
2502
2602
|
return {
|
|
2503
2603
|
yes: a("messageBox.yes") || "是",
|
|
@@ -2520,66 +2620,66 @@ function Za(e) {
|
|
|
2520
2620
|
locale: n
|
|
2521
2621
|
};
|
|
2522
2622
|
}
|
|
2523
|
-
const
|
|
2623
|
+
const Qe = /* @__PURE__ */ Se({
|
|
2524
2624
|
name: "FMessageBox",
|
|
2525
|
-
props:
|
|
2625
|
+
props: lo,
|
|
2526
2626
|
emits: ["accept", "reject", "close"],
|
|
2527
2627
|
setup(e, t) {
|
|
2528
|
-
const n =
|
|
2529
|
-
const
|
|
2628
|
+
const n = Co(e), a = r(e.type), o = r(e.title), s = r(e.detail), i = y(() => {
|
|
2629
|
+
const P = {
|
|
2530
2630
|
"modal-tips": !0,
|
|
2531
2631
|
"d-flex": !0,
|
|
2532
2632
|
"flex-row": !0
|
|
2533
|
-
},
|
|
2534
|
-
return
|
|
2535
|
-
}),
|
|
2536
|
-
const
|
|
2633
|
+
}, C = `messager-type-${a.value}`;
|
|
2634
|
+
return P[C] = !0, P;
|
|
2635
|
+
}), u = y(() => {
|
|
2636
|
+
const P = {
|
|
2537
2637
|
cursor: "default"
|
|
2538
2638
|
};
|
|
2539
|
-
return a.value === "prompt" ?
|
|
2540
|
-
}),
|
|
2541
|
-
feedbackStyle:
|
|
2542
|
-
feedbackMessage:
|
|
2543
|
-
} =
|
|
2544
|
-
|
|
2545
|
-
function
|
|
2546
|
-
return
|
|
2547
|
-
style:
|
|
2548
|
-
}, [
|
|
2639
|
+
return a.value === "prompt" ? P.padding = "0.5rem 0.5rem 1rem 1.5rem" : a.value === "error" && (P.padding = "0.5rem 1.5rem 1rem 1.5rem"), P;
|
|
2640
|
+
}), v = ro(), f = fo(e, a, o, s), p = vo(), {
|
|
2641
|
+
feedbackStyle: w,
|
|
2642
|
+
feedbackMessage: T
|
|
2643
|
+
} = p;
|
|
2644
|
+
T.value = n.exception.copySuccess;
|
|
2645
|
+
function h() {
|
|
2646
|
+
return l("div", {
|
|
2647
|
+
style: w.value
|
|
2648
|
+
}, [T.value]);
|
|
2549
2649
|
}
|
|
2550
|
-
function
|
|
2650
|
+
function g() {
|
|
2551
2651
|
switch (a.value) {
|
|
2552
2652
|
case "prompt":
|
|
2553
|
-
return
|
|
2653
|
+
return mo(e, f);
|
|
2554
2654
|
default:
|
|
2555
|
-
return
|
|
2655
|
+
return po(e, a, o, s, n);
|
|
2556
2656
|
}
|
|
2557
2657
|
}
|
|
2558
|
-
const
|
|
2559
|
-
return () =>
|
|
2658
|
+
const F = g(), E = bo(e, t, v, p, n);
|
|
2659
|
+
return () => l("div", {
|
|
2560
2660
|
class: "farris-messager"
|
|
2561
|
-
}, [!e.exceptionInfo &&
|
|
2661
|
+
}, [!e.exceptionInfo && l("div", {
|
|
2562
2662
|
style: "height: 30px;width: 100%;position: absolute;",
|
|
2563
2663
|
class: "messager-draggable"
|
|
2564
|
-
}, null),
|
|
2565
|
-
class:
|
|
2566
|
-
style:
|
|
2567
|
-
}, [
|
|
2664
|
+
}, null), l("section", {
|
|
2665
|
+
class: i.value,
|
|
2666
|
+
style: u.value
|
|
2667
|
+
}, [F()]), E(), h()]);
|
|
2568
2668
|
}
|
|
2569
|
-
}),
|
|
2669
|
+
}), he = class he {
|
|
2570
2670
|
static show(t) {
|
|
2571
|
-
const n =
|
|
2671
|
+
const n = ge({
|
|
2572
2672
|
...t
|
|
2573
|
-
}), a = !1, o = n.type === "error" || n.type === "prompt",
|
|
2574
|
-
}),
|
|
2673
|
+
}), a = !1, o = n.type === "error" || n.type === "prompt", s = n.type === "error" ? "错误提示" : n.type === "prompt" && n.title || "", i = n.acceptCallback || (() => {
|
|
2674
|
+
}), u = n.rejectCallback || (() => {
|
|
2575
2675
|
});
|
|
2576
|
-
let
|
|
2577
|
-
const
|
|
2578
|
-
|
|
2676
|
+
let v = null, f = new Ft(he.app);
|
|
2677
|
+
const p = () => {
|
|
2678
|
+
v && (v == null || v.destroy(), f = null);
|
|
2579
2679
|
};
|
|
2580
|
-
return
|
|
2680
|
+
return v = f == null ? void 0 : f.open({
|
|
2581
2681
|
class: "modal-message modal-message-type-info",
|
|
2582
|
-
title:
|
|
2682
|
+
title: s,
|
|
2583
2683
|
showButtons: a,
|
|
2584
2684
|
showHeader: o,
|
|
2585
2685
|
width: n.width || 400,
|
|
@@ -2587,45 +2687,45 @@ const Xe = /* @__PURE__ */ ye({
|
|
|
2587
2687
|
showMaxButton: !1,
|
|
2588
2688
|
draggable: !0,
|
|
2589
2689
|
dragHandle: ".messager-draggable",
|
|
2590
|
-
render: () =>
|
|
2591
|
-
onAccept:
|
|
2592
|
-
onReject:
|
|
2593
|
-
onClose:
|
|
2690
|
+
render: () => l(Qe, tt(n, {
|
|
2691
|
+
onAccept: i,
|
|
2692
|
+
onReject: u,
|
|
2693
|
+
onClose: p
|
|
2594
2694
|
}), null)
|
|
2595
|
-
}),
|
|
2695
|
+
}), f == null ? void 0 : f.getCurrentModal();
|
|
2596
2696
|
}
|
|
2597
2697
|
static info(t, n) {
|
|
2598
|
-
const a =
|
|
2698
|
+
const a = ge({
|
|
2599
2699
|
type: "info",
|
|
2600
2700
|
title: t,
|
|
2601
2701
|
detail: n,
|
|
2602
2702
|
okButtonText: "知道了",
|
|
2603
2703
|
showCancelButton: !1
|
|
2604
2704
|
});
|
|
2605
|
-
|
|
2705
|
+
he.show(a);
|
|
2606
2706
|
}
|
|
2607
2707
|
static warning(t, n) {
|
|
2608
|
-
const a =
|
|
2708
|
+
const a = ge({
|
|
2609
2709
|
type: "warning",
|
|
2610
2710
|
title: t,
|
|
2611
2711
|
detail: n,
|
|
2612
2712
|
okButtonText: "知道了",
|
|
2613
2713
|
showCancelButton: !1
|
|
2614
2714
|
});
|
|
2615
|
-
|
|
2715
|
+
he.show(a);
|
|
2616
2716
|
}
|
|
2617
2717
|
static success(t, n) {
|
|
2618
|
-
const a =
|
|
2718
|
+
const a = ge({
|
|
2619
2719
|
type: "success",
|
|
2620
2720
|
title: t,
|
|
2621
2721
|
detail: n,
|
|
2622
2722
|
okButtonText: "关闭",
|
|
2623
2723
|
showCancelButton: !1
|
|
2624
2724
|
});
|
|
2625
|
-
|
|
2725
|
+
he.show(a);
|
|
2626
2726
|
}
|
|
2627
2727
|
static error(t, n, a) {
|
|
2628
|
-
const o =
|
|
2728
|
+
const o = ge({
|
|
2629
2729
|
width: 500,
|
|
2630
2730
|
type: "error",
|
|
2631
2731
|
okButtonText: "关闭",
|
|
@@ -2636,20 +2736,20 @@ const Xe = /* @__PURE__ */ ye({
|
|
|
2636
2736
|
detail: n
|
|
2637
2737
|
}
|
|
2638
2738
|
});
|
|
2639
|
-
|
|
2739
|
+
he.show(o);
|
|
2640
2740
|
}
|
|
2641
2741
|
static prompt(t, n) {
|
|
2642
|
-
const a =
|
|
2742
|
+
const a = ge({
|
|
2643
2743
|
type: "prompt",
|
|
2644
2744
|
title: t,
|
|
2645
2745
|
detail: n,
|
|
2646
2746
|
okButtonText: "确定",
|
|
2647
2747
|
cancelButtonText: "取消"
|
|
2648
2748
|
});
|
|
2649
|
-
|
|
2749
|
+
he.show(a);
|
|
2650
2750
|
}
|
|
2651
2751
|
static question(t, n, a, o) {
|
|
2652
|
-
const
|
|
2752
|
+
const s = ge({
|
|
2653
2753
|
type: "question",
|
|
2654
2754
|
title: t,
|
|
2655
2755
|
detail: n,
|
|
@@ -2658,15 +2758,15 @@ const Xe = /* @__PURE__ */ ye({
|
|
|
2658
2758
|
acceptCallback: a,
|
|
2659
2759
|
rejectCallback: o
|
|
2660
2760
|
});
|
|
2661
|
-
|
|
2761
|
+
he.show(s);
|
|
2662
2762
|
}
|
|
2663
2763
|
};
|
|
2664
|
-
|
|
2665
|
-
let
|
|
2666
|
-
|
|
2667
|
-
e.component(
|
|
2764
|
+
me(he, "app", null);
|
|
2765
|
+
let qe = he;
|
|
2766
|
+
Qe.install = (e) => {
|
|
2767
|
+
e.component(Qe.name, Qe), qe.app = e, e.provide("FMessageBoxService", qe);
|
|
2668
2768
|
};
|
|
2669
|
-
const
|
|
2769
|
+
const wo = "https://json-schema.org/draft/2020-12/schema", xo = "https://farris-design.gitee.io/mapping-editor.schema.json", Bo = "mapping-editor", So = "A Farris Input Component", To = "object", Mo = {
|
|
2670
2770
|
fromData: {
|
|
2671
2771
|
type: "object",
|
|
2672
2772
|
default: null
|
|
@@ -2707,14 +2807,14 @@ const Qa = "https://json-schema.org/draft/2020-12/schema", eo = "https://farris-
|
|
|
2707
2807
|
type: "object",
|
|
2708
2808
|
default: null
|
|
2709
2809
|
}
|
|
2710
|
-
},
|
|
2711
|
-
$schema:
|
|
2712
|
-
$id:
|
|
2713
|
-
title:
|
|
2714
|
-
description:
|
|
2715
|
-
type:
|
|
2716
|
-
properties:
|
|
2717
|
-
},
|
|
2810
|
+
}, ko = {
|
|
2811
|
+
$schema: wo,
|
|
2812
|
+
$id: xo,
|
|
2813
|
+
title: Bo,
|
|
2814
|
+
description: So,
|
|
2815
|
+
type: To,
|
|
2816
|
+
properties: Mo
|
|
2817
|
+
}, Dt = {
|
|
2718
2818
|
fromData: { type: Object, default: {} },
|
|
2719
2819
|
toData: { type: Object, default: {} },
|
|
2720
2820
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -2726,7 +2826,7 @@ const Qa = "https://json-schema.org/draft/2020-12/schema", eo = "https://farris-
|
|
|
2726
2826
|
editorParams: { type: Object, default: null },
|
|
2727
2827
|
onMappingFieldsChanged: { type: Function, default: null },
|
|
2728
2828
|
beforeOpen: { type: Function }
|
|
2729
|
-
},
|
|
2829
|
+
}, Oo = Ha(Dt, ko), Fo = {
|
|
2730
2830
|
showCloseButton: { type: Boolean, default: !0 },
|
|
2731
2831
|
position: { type: String, default: "top-center" },
|
|
2732
2832
|
timeout: { type: Number, default: 3e3 },
|
|
@@ -2739,142 +2839,142 @@ const Qa = "https://json-schema.org/draft/2020-12/schema", eo = "https://farris-
|
|
|
2739
2839
|
animate: { type: String, default: "fadeIn" },
|
|
2740
2840
|
options: { type: Object },
|
|
2741
2841
|
safeHtml: { type: Boolean, default: !0 }
|
|
2742
|
-
},
|
|
2842
|
+
}, Io = {
|
|
2743
2843
|
showCloseButton: { type: Boolean, default: !0 },
|
|
2744
2844
|
animate: { type: String, default: "fadeIn" },
|
|
2745
2845
|
options: { type: Object }
|
|
2746
|
-
},
|
|
2846
|
+
}, ut = /* @__PURE__ */ Se({
|
|
2747
2847
|
name: "Toast",
|
|
2748
|
-
props:
|
|
2848
|
+
props: Io,
|
|
2749
2849
|
emits: ["close", "click"],
|
|
2750
2850
|
setup: (e, t) => {
|
|
2751
|
-
const n = r(e.animate), a = "fadeOut", o =
|
|
2752
|
-
const
|
|
2753
|
-
animated:
|
|
2851
|
+
const n = r(e.animate), a = "fadeOut", o = y(() => e.options), s = r(!1), i = y(() => o.value.title && o.value.message), u = y(() => !o.value.title && o.value.message), v = y(() => {
|
|
2852
|
+
const C = {
|
|
2853
|
+
animated: s.value,
|
|
2754
2854
|
toast: !0,
|
|
2755
|
-
"toast--only-content": !
|
|
2855
|
+
"toast--only-content": !i.value
|
|
2756
2856
|
};
|
|
2757
|
-
return
|
|
2758
|
-
}),
|
|
2759
|
-
const
|
|
2857
|
+
return C[e.animate] = !1, C[a] = s.value, C["toasty-type-" + o.value.type] = !0, o.value.theme && (C[o.value.theme] = !0), C;
|
|
2858
|
+
}), f = y(() => {
|
|
2859
|
+
const U = `f-icon-${o.value && o.value.type ? o.value.type.replace("toasty-type-", "") : "default"}`, B = {
|
|
2760
2860
|
"f-icon": !0
|
|
2761
2861
|
};
|
|
2762
|
-
return
|
|
2763
|
-
}),
|
|
2862
|
+
return B[U] = !0, B;
|
|
2863
|
+
}), p = y(() => o.value.title || o.value.message), w = y(() => e.showCloseButton), T = y(() => !!o.value.buttons || !!t.slots.default), h = y(() => Ce.getLocale() === "en" ? {
|
|
2764
2864
|
wordBreak: "keep-all",
|
|
2765
2865
|
overflowWrap: "break-word"
|
|
2766
2866
|
} : {});
|
|
2767
|
-
function
|
|
2768
|
-
|
|
2867
|
+
function g(C) {
|
|
2868
|
+
C.stopPropagation(), C.preventDefault(), s.value = !1, setTimeout(() => {
|
|
2769
2869
|
t.emit("close", o.value);
|
|
2770
2870
|
}, 200);
|
|
2771
2871
|
}
|
|
2772
|
-
function
|
|
2872
|
+
function F(C, N) {
|
|
2773
2873
|
}
|
|
2774
|
-
function
|
|
2775
|
-
return `f-preten-link ${
|
|
2874
|
+
function E(C) {
|
|
2875
|
+
return `f-preten-link ${C.customClass ? C.customClass : ""}`;
|
|
2776
2876
|
}
|
|
2777
|
-
|
|
2877
|
+
Z(n, () => {
|
|
2778
2878
|
n.value;
|
|
2779
2879
|
});
|
|
2780
|
-
const
|
|
2781
|
-
var
|
|
2782
|
-
return
|
|
2880
|
+
const P = () => {
|
|
2881
|
+
var C;
|
|
2882
|
+
return l(pe, null, [l("div", {
|
|
2783
2883
|
class: "after-toast-msg text-right"
|
|
2784
|
-
}, [!t.slots.default && ((
|
|
2785
|
-
class:
|
|
2786
|
-
onClick: (
|
|
2884
|
+
}, [!t.slots.default && ((C = o.value.buttons) == null ? void 0 : C.map((N) => l("span", {
|
|
2885
|
+
class: E(N),
|
|
2886
|
+
onClick: (U) => void 0
|
|
2787
2887
|
}, [N.text]))), t.slots.default && t.slots.default()])]);
|
|
2788
2888
|
};
|
|
2789
|
-
return () =>
|
|
2790
|
-
class:
|
|
2889
|
+
return () => l("div", {
|
|
2890
|
+
class: v.value,
|
|
2791
2891
|
style: "min-height:44px"
|
|
2792
|
-
}, [
|
|
2793
|
-
title:
|
|
2892
|
+
}, [w.value && l("button", {
|
|
2893
|
+
title: Ce.getLocaleValue("messageBox.close"),
|
|
2794
2894
|
class: "toast-close f-btn-icon f-bare",
|
|
2795
|
-
onClick:
|
|
2796
|
-
}, [
|
|
2895
|
+
onClick: g
|
|
2896
|
+
}, [l("span", {
|
|
2797
2897
|
class: "f-icon modal_close"
|
|
2798
|
-
}, null)]),
|
|
2898
|
+
}, null)]), p.value && l("section", {
|
|
2799
2899
|
class: "modal-tips"
|
|
2800
|
-
}, [!
|
|
2900
|
+
}, [!i.value && l("div", {
|
|
2801
2901
|
class: "float-left modal-tips-iconwrap"
|
|
2802
|
-
}, [
|
|
2803
|
-
class:
|
|
2804
|
-
}, null)]),
|
|
2902
|
+
}, [l("span", {
|
|
2903
|
+
class: f.value
|
|
2904
|
+
}, null)]), l("div", {
|
|
2805
2905
|
class: "modal-tips-content"
|
|
2806
|
-
}, [
|
|
2906
|
+
}, [i.value && l(pe, null, [l("h5", {
|
|
2807
2907
|
class: "toast-title modal-tips-title",
|
|
2808
2908
|
innerHTML: o.value.title
|
|
2809
|
-
}, null),
|
|
2909
|
+
}, null), l("p", {
|
|
2810
2910
|
class: "toast-msg",
|
|
2811
2911
|
innerHTML: o.value.message,
|
|
2812
|
-
style:
|
|
2813
|
-
}, null),
|
|
2912
|
+
style: h.value
|
|
2913
|
+
}, null), T.value && P()]), u.value && (o.value.buttons ? l("div", {
|
|
2814
2914
|
class: "toast-title-btns-wrapper d-flex"
|
|
2815
|
-
}, [
|
|
2915
|
+
}, [l("h5", {
|
|
2816
2916
|
class: "toast-title modal-tips-title only-toast-msg",
|
|
2817
|
-
style:
|
|
2917
|
+
style: h.value,
|
|
2818
2918
|
innerHTML: o.value.message
|
|
2819
|
-
}, null),
|
|
2919
|
+
}, null), l("div", {
|
|
2820
2920
|
class: "after-toast-title text-right ml-auto"
|
|
2821
|
-
}, [
|
|
2921
|
+
}, [P()])]) : l("h5", {
|
|
2822
2922
|
class: "toast-title modal-tips-title only-toast-msg",
|
|
2823
|
-
style:
|
|
2923
|
+
style: h.value,
|
|
2824
2924
|
innerHTML: o.value.message
|
|
2825
2925
|
}, null))])])]);
|
|
2826
2926
|
}
|
|
2827
|
-
}),
|
|
2927
|
+
}), et = /* @__PURE__ */ Se({
|
|
2828
2928
|
name: "Notify",
|
|
2829
|
-
props:
|
|
2929
|
+
props: Fo,
|
|
2830
2930
|
emits: ["close", "empty"],
|
|
2831
2931
|
setup(e, t) {
|
|
2832
|
-
const n =
|
|
2932
|
+
const n = y(() => ({
|
|
2833
2933
|
"farris-notify": !0
|
|
2834
2934
|
})), a = {
|
|
2835
2935
|
left: 12,
|
|
2836
2936
|
right: 12,
|
|
2837
2937
|
top: 20,
|
|
2838
2938
|
bottom: 12
|
|
2839
|
-
}, o = r(),
|
|
2840
|
-
const
|
|
2939
|
+
}, o = r(), s = r(e.options), i = r(e.showCloseButton), u = y(() => e.position || "bottom-right"), v = y(() => e.timeout != null ? e.timeout : 3e3), f = y(() => {
|
|
2940
|
+
const T = e.bottom ? e.bottom : a.bottom, h = e.top ? e.top : a.top, g = {
|
|
2841
2941
|
transition: "all 0.2s ease",
|
|
2842
|
-
left:
|
|
2843
|
-
right:
|
|
2844
|
-
top:
|
|
2845
|
-
bottom:
|
|
2942
|
+
left: u.value.indexOf("left") > -1 ? `${e.left ? e.left : a.left}px` : "",
|
|
2943
|
+
right: u.value.indexOf("right") > -1 ? `${e.right ? e.right : a.right}px` : "",
|
|
2944
|
+
top: u.value.indexOf("top") > -1 ? `${h}px` : "",
|
|
2945
|
+
bottom: u.value.indexOf("bottom") > -1 ? `${T}px` : ""
|
|
2846
2946
|
};
|
|
2847
|
-
return
|
|
2947
|
+
return u.value.indexOf("center") > -1 && (g.left = "50%", g.marginLeft = "calc(-24rem / 2)", u.value === "center-center" && (g.top = "50%", g.transform = "translate(-50%, -50%)")), g;
|
|
2848
2948
|
});
|
|
2849
|
-
function
|
|
2949
|
+
function p(T) {
|
|
2850
2950
|
t.emit("close");
|
|
2851
2951
|
}
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
},
|
|
2855
|
-
closeToast:
|
|
2952
|
+
v.value && setTimeout(() => {
|
|
2953
|
+
p();
|
|
2954
|
+
}, v.value), t.expose({
|
|
2955
|
+
closeToast: p,
|
|
2856
2956
|
container: o,
|
|
2857
|
-
notifyPosition:
|
|
2957
|
+
notifyPosition: u
|
|
2858
2958
|
});
|
|
2859
|
-
function
|
|
2860
|
-
|
|
2959
|
+
function w(T, h) {
|
|
2960
|
+
p();
|
|
2861
2961
|
}
|
|
2862
|
-
return () =>
|
|
2962
|
+
return () => l("div", {
|
|
2863
2963
|
class: n.value,
|
|
2864
|
-
style:
|
|
2964
|
+
style: f.value,
|
|
2865
2965
|
ref: o
|
|
2866
|
-
}, [
|
|
2867
|
-
options:
|
|
2868
|
-
showCloseButton:
|
|
2966
|
+
}, [l(ut, {
|
|
2967
|
+
options: s.value,
|
|
2968
|
+
showCloseButton: i.value,
|
|
2869
2969
|
animate: e.animate,
|
|
2870
|
-
onClose: (
|
|
2970
|
+
onClose: (T) => w(T, s.value)
|
|
2871
2971
|
}, null)]);
|
|
2872
2972
|
}
|
|
2873
2973
|
});
|
|
2874
|
-
class
|
|
2974
|
+
class Eo {
|
|
2875
2975
|
constructor() {
|
|
2876
|
-
|
|
2877
|
-
|
|
2976
|
+
me(this, "notifyRefs", []);
|
|
2977
|
+
me(this, "globalConfig", ge({}));
|
|
2878
2978
|
}
|
|
2879
2979
|
escapeAllHtml(t) {
|
|
2880
2980
|
if (typeof t != "string" || !t)
|
|
@@ -2890,42 +2990,42 @@ class ro {
|
|
|
2890
2990
|
safeHtml: !0
|
|
2891
2991
|
}, this.globalConfig, {
|
|
2892
2992
|
...t
|
|
2893
|
-
}),
|
|
2894
|
-
|
|
2895
|
-
const
|
|
2993
|
+
}), s = document.createElement("div");
|
|
2994
|
+
s.style.display = "contents";
|
|
2995
|
+
const i = rt({
|
|
2896
2996
|
setup() {
|
|
2897
|
-
var
|
|
2898
|
-
const
|
|
2899
|
-
function
|
|
2900
|
-
|
|
2901
|
-
n.updateNotifyPositionForClose(o,
|
|
2997
|
+
var f;
|
|
2998
|
+
const u = r();
|
|
2999
|
+
function v() {
|
|
3000
|
+
u.value.container.style.transform = "scale(0)", setTimeout(() => {
|
|
3001
|
+
n.updateNotifyPositionForClose(o, u), i.unmount();
|
|
2902
3002
|
}, 220);
|
|
2903
3003
|
}
|
|
2904
3004
|
if (o.position.indexOf("top") > -1) {
|
|
2905
|
-
const
|
|
2906
|
-
if (
|
|
2907
|
-
const
|
|
2908
|
-
o.top =
|
|
3005
|
+
const p = n.getNotifyInstances(o.position), w = p[p.length - 1];
|
|
3006
|
+
if (w) {
|
|
3007
|
+
const T = w.value.container.getBoundingClientRect();
|
|
3008
|
+
o.top = T.bottom;
|
|
2909
3009
|
}
|
|
2910
3010
|
}
|
|
2911
|
-
return o.safeHtml && ((
|
|
2912
|
-
document.body.removeChild(
|
|
2913
|
-
}),
|
|
2914
|
-
n.updateNotifyPositionForCreate(o,
|
|
2915
|
-
}), () =>
|
|
3011
|
+
return o.safeHtml && ((f = o.options) != null && f.message) && (o.options.message = n.escapeAllHtml(o.options.message)), Xe(() => {
|
|
3012
|
+
document.body.removeChild(s);
|
|
3013
|
+
}), ze(() => {
|
|
3014
|
+
n.updateNotifyPositionForCreate(o, u);
|
|
3015
|
+
}), () => l(St, {
|
|
2916
3016
|
mode: "out-in",
|
|
2917
3017
|
name: "fade",
|
|
2918
3018
|
appear: !0
|
|
2919
3019
|
}, {
|
|
2920
|
-
default: () => [
|
|
2921
|
-
ref:
|
|
3020
|
+
default: () => [l(et, tt({
|
|
3021
|
+
ref: u
|
|
2922
3022
|
}, o, {
|
|
2923
|
-
onClose:
|
|
3023
|
+
onClose: v
|
|
2924
3024
|
}), null)]
|
|
2925
3025
|
});
|
|
2926
3026
|
}
|
|
2927
3027
|
});
|
|
2928
|
-
return
|
|
3028
|
+
return i.provide("NotifyService", this), document.body.appendChild(s), i.use(Ce.i18n), i.mount(s), i;
|
|
2929
3029
|
}
|
|
2930
3030
|
getNotifyInstances(t) {
|
|
2931
3031
|
return this.notifyRefs.filter((n) => n.value.notifyPosition === t);
|
|
@@ -2934,8 +3034,8 @@ class ro {
|
|
|
2934
3034
|
if (this.notifyRefs && this.notifyRefs.length) {
|
|
2935
3035
|
const a = window.innerHeight;
|
|
2936
3036
|
t.position.indexOf("bottom") > -1 && this.getNotifyInstances(t.position).forEach((o) => {
|
|
2937
|
-
const
|
|
2938
|
-
o.value.container.style.bottom =
|
|
3037
|
+
const s = o.value.container.getBoundingClientRect();
|
|
3038
|
+
o.value.container.style.bottom = s.height + a - s.bottom + "px";
|
|
2939
3039
|
});
|
|
2940
3040
|
}
|
|
2941
3041
|
this.notifyRefs = [...this.notifyRefs, n];
|
|
@@ -2943,9 +3043,9 @@ class ro {
|
|
|
2943
3043
|
updateNotifyPositionForClose(t, n) {
|
|
2944
3044
|
const a = this.notifyRefs.indexOf(n);
|
|
2945
3045
|
if (t.position.indexOf("top") > -1) {
|
|
2946
|
-
const o = this.getNotifyInstances(t.position),
|
|
2947
|
-
o.slice(
|
|
2948
|
-
|
|
3046
|
+
const o = this.getNotifyInstances(t.position), s = o.indexOf(n);
|
|
3047
|
+
o.slice(s + 1).forEach((i) => {
|
|
3048
|
+
i.value.container.style.top = i.value.container.offsetTop - i.value.container.offsetHeight + "px";
|
|
2949
3049
|
});
|
|
2950
3050
|
}
|
|
2951
3051
|
a > -1 && this.notifyRefs.splice(a, 1);
|
|
@@ -2954,16 +3054,16 @@ class ro {
|
|
|
2954
3054
|
return this.createNotifyInstance(t);
|
|
2955
3055
|
}
|
|
2956
3056
|
buildNotifyProps(t, n) {
|
|
2957
|
-
let a = "", o = "",
|
|
2958
|
-
typeof n == "string" ? a = n : n && (a = n.message || "", o = n.title || "",
|
|
2959
|
-
const
|
|
3057
|
+
let a = "", o = "", s, i, u;
|
|
3058
|
+
typeof n == "string" ? a = n : n && (a = n.message || "", o = n.title || "", i = n.position || null, u = n.showCloseButton != null ? n.showCloseButton : null, s = n.timeout != null ? n.timeout : null);
|
|
3059
|
+
const f = {
|
|
2960
3060
|
options: {
|
|
2961
3061
|
type: t,
|
|
2962
3062
|
message: a,
|
|
2963
3063
|
title: o
|
|
2964
3064
|
}
|
|
2965
3065
|
};
|
|
2966
|
-
return
|
|
3066
|
+
return i != null && (f.position = i), u != null && (f.showCloseButton = u), s != null && (f.timeout = s), f;
|
|
2967
3067
|
}
|
|
2968
3068
|
info(t) {
|
|
2969
3069
|
const n = this.buildNotifyProps("info", t);
|
|
@@ -2990,34 +3090,34 @@ class ro {
|
|
|
2990
3090
|
}), this.notifyRefs.length = 0;
|
|
2991
3091
|
}
|
|
2992
3092
|
}
|
|
2993
|
-
const
|
|
2994
|
-
|
|
2995
|
-
e.component(
|
|
2996
|
-
const t = new
|
|
2997
|
-
e.provide(
|
|
3093
|
+
const Ht = Symbol("NOTIFY_SERVICE_TOKEN");
|
|
3094
|
+
et.install = (e) => {
|
|
3095
|
+
e.component(et.name, et), e.component(ut.name, ut);
|
|
3096
|
+
const t = new Eo();
|
|
3097
|
+
e.provide(Ht, t), e.provide("FNotifyService", t);
|
|
2998
3098
|
};
|
|
2999
|
-
function
|
|
3099
|
+
function it(e) {
|
|
3000
3100
|
return e.reduce((t, n) => {
|
|
3001
3101
|
var a;
|
|
3002
|
-
return t.push(n.data), (a = n.children) != null && a.length && t.push(...
|
|
3102
|
+
return t.push(n.data), (a = n.children) != null && a.length && t.push(...it(n.children)), t;
|
|
3003
3103
|
}, []);
|
|
3004
3104
|
}
|
|
3005
|
-
const
|
|
3105
|
+
const st = /* @__PURE__ */ Se({
|
|
3006
3106
|
name: "FMappingEditor",
|
|
3007
|
-
props:
|
|
3107
|
+
props: Dt,
|
|
3008
3108
|
emits: ["submitModal", "update:modelValue"],
|
|
3009
3109
|
setup(e, t) {
|
|
3010
|
-
const n = '<i class="f-icon f-icon-lookup"></i>', a = r(), o = r(e.modelValue || {}),
|
|
3011
|
-
var
|
|
3012
|
-
const
|
|
3013
|
-
return
|
|
3014
|
-
},
|
|
3110
|
+
const n = '<i class="f-icon f-icon-lookup"></i>', a = r(), o = r(e.modelValue || {}), s = r([]), i = r(e.fromData.dataSource || []), u = r([]), v = e.fromData.repositoryToken ? Ze(e.fromData.repositoryToken) : null, f = e.toData.repositoryToken ? Ze(e.toData.repositoryToken) : null, p = Ze(Ht), w = (M) => ((M.raw.$type !== "SimpleField" || M.raw.selectable === !1) && (M.disabled = !0), M), T = y(() => it(i.value)), h = y(() => it(u.value)), g = (M, d, x, R) => {
|
|
3111
|
+
var q, oe;
|
|
3112
|
+
const D = ((q = M.value.find((re) => re[R] === d)) == null ? void 0 : q[x || "name"]) || "", A = ((oe = M.value.find((re) => re[R] === d)) == null ? void 0 : oe[R || "code"]) || "";
|
|
3113
|
+
return D && A ? `${D}[${A}]` : "";
|
|
3114
|
+
}, F = [{
|
|
3015
3115
|
field: "sourceField",
|
|
3016
3116
|
title: "数据源字段",
|
|
3017
3117
|
dataType: "string",
|
|
3018
3118
|
editor: {
|
|
3019
3119
|
type: "combo-tree",
|
|
3020
|
-
data:
|
|
3120
|
+
data: i.value,
|
|
3021
3121
|
idField: e.fromData.idField || "id",
|
|
3022
3122
|
textField: e.fromData.textField || "name",
|
|
3023
3123
|
valueField: e.fromData.valueField || "id",
|
|
@@ -3025,17 +3125,17 @@ const et = /* @__PURE__ */ ye({
|
|
|
3025
3125
|
editorParams: e.fromData.editorParams,
|
|
3026
3126
|
editable: e.fromData.editable || !1,
|
|
3027
3127
|
searchFields: e.fromData.searchFields || [],
|
|
3028
|
-
customRowStatus:
|
|
3128
|
+
customRowStatus: w,
|
|
3029
3129
|
displayFormatter: e.fromData.displayFormatter
|
|
3030
3130
|
},
|
|
3031
|
-
formatter: (
|
|
3131
|
+
formatter: (M, d) => g(T, d.raw.sourceField, e.fromData.textField, e.fromData.valueField)
|
|
3032
3132
|
}, {
|
|
3033
3133
|
field: "targetField",
|
|
3034
3134
|
title: "目标字段",
|
|
3035
3135
|
dataType: "string",
|
|
3036
3136
|
editor: {
|
|
3037
3137
|
type: "combo-tree",
|
|
3038
|
-
data:
|
|
3138
|
+
data: u.value,
|
|
3039
3139
|
idField: e.toData.idField || "id",
|
|
3040
3140
|
textField: e.toData.textField || "name",
|
|
3041
3141
|
valueField: e.toData.valueField || "id",
|
|
@@ -3045,70 +3145,70 @@ const et = /* @__PURE__ */ ye({
|
|
|
3045
3145
|
enableSearch: !0,
|
|
3046
3146
|
editable: !1,
|
|
3047
3147
|
searchFields: e.toData.searchFields || [],
|
|
3048
|
-
customRowStatus:
|
|
3148
|
+
customRowStatus: w,
|
|
3049
3149
|
displayFormatter: e.toData.displayFormatter
|
|
3050
3150
|
},
|
|
3051
|
-
formatter: (
|
|
3151
|
+
formatter: (M, d) => d.raw.targetField ? (d.raw.targetField.indexOf(",") > -1 ? d.raw.targetField.split(",") : [d.raw.targetField]).map((R) => g(h, R, e.toData.textField, e.toData.valueField)).join(",") : ""
|
|
3052
3152
|
}];
|
|
3053
|
-
function
|
|
3153
|
+
function E() {
|
|
3054
3154
|
return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
|
|
3055
3155
|
}
|
|
3056
|
-
function
|
|
3057
|
-
let
|
|
3058
|
-
return typeof
|
|
3059
|
-
id:
|
|
3060
|
-
sourceField:
|
|
3061
|
-
targetField:
|
|
3156
|
+
function P() {
|
|
3157
|
+
let M = o.value || {};
|
|
3158
|
+
return typeof M == "string" && (M = JSON.parse(M)), Object.keys(M).map((d) => ({
|
|
3159
|
+
id: E(),
|
|
3160
|
+
sourceField: d,
|
|
3161
|
+
targetField: M[d]
|
|
3062
3162
|
}));
|
|
3063
3163
|
}
|
|
3064
|
-
const
|
|
3065
|
-
var
|
|
3066
|
-
return `共 ${((
|
|
3164
|
+
const C = r(P()), N = y(() => {
|
|
3165
|
+
var M;
|
|
3166
|
+
return `共 ${((M = C.value) == null ? void 0 : M.length) || 0} 项`;
|
|
3067
3167
|
});
|
|
3068
|
-
function
|
|
3168
|
+
function U() {
|
|
3069
3169
|
a.value.endEditCell(), a.value.addNewDataItemAtLast();
|
|
3070
3170
|
}
|
|
3071
|
-
function
|
|
3171
|
+
function B() {
|
|
3072
3172
|
return {
|
|
3073
3173
|
sourceField: "",
|
|
3074
3174
|
targetField: "",
|
|
3075
|
-
id:
|
|
3175
|
+
id: E()
|
|
3076
3176
|
};
|
|
3077
3177
|
}
|
|
3078
|
-
function
|
|
3079
|
-
if (!
|
|
3080
|
-
|
|
3178
|
+
function L() {
|
|
3179
|
+
if (!s.value.length) {
|
|
3180
|
+
p.warning("请选择要删除的映射字段!");
|
|
3081
3181
|
return;
|
|
3082
3182
|
}
|
|
3083
3183
|
a.value.endEditCell();
|
|
3084
|
-
const
|
|
3085
|
-
if (
|
|
3184
|
+
const M = C.value.findIndex((A) => A.id === s.value[0].id);
|
|
3185
|
+
if (M === -1)
|
|
3086
3186
|
return;
|
|
3087
|
-
const
|
|
3088
|
-
if (a.value.removeDataItemById(
|
|
3187
|
+
const d = s.value[0].id;
|
|
3188
|
+
if (a.value.removeDataItemById(d), s.value = [], !C.value.length)
|
|
3089
3189
|
return;
|
|
3090
|
-
const
|
|
3091
|
-
|
|
3190
|
+
const x = Math.min(M, C.value.length - 1), R = C.value[x], D = R == null ? void 0 : R.id;
|
|
3191
|
+
D && (a.value.selectItemById(D), s.value = [R]);
|
|
3092
3192
|
}
|
|
3093
|
-
function
|
|
3094
|
-
|
|
3095
|
-
|
|
3193
|
+
function b() {
|
|
3194
|
+
qe.question("确定要清空所有映射字段吗?", "", () => {
|
|
3195
|
+
s.value = [], o.value = {}, C.value = [], a.value.updateDataSource(C.value);
|
|
3096
3196
|
}, () => {
|
|
3097
3197
|
});
|
|
3098
3198
|
}
|
|
3099
|
-
function
|
|
3100
|
-
const
|
|
3101
|
-
return
|
|
3102
|
-
|
|
3103
|
-
}),
|
|
3199
|
+
function k() {
|
|
3200
|
+
const M = {};
|
|
3201
|
+
return C.value.forEach((d) => {
|
|
3202
|
+
d.sourceField && d.targetField && (M[d.sourceField] = d.targetField);
|
|
3203
|
+
}), M;
|
|
3104
3204
|
}
|
|
3105
|
-
|
|
3106
|
-
o.value =
|
|
3205
|
+
Z(() => e.modelValue, (M) => {
|
|
3206
|
+
o.value = M, C.value = P();
|
|
3107
3207
|
});
|
|
3108
3208
|
function W() {
|
|
3109
|
-
return
|
|
3209
|
+
return C.value.filter((d) => !d.sourceField || !d.targetField).length;
|
|
3110
3210
|
}
|
|
3111
|
-
const
|
|
3211
|
+
const K = {
|
|
3112
3212
|
title: e.title,
|
|
3113
3213
|
fitContent: !1,
|
|
3114
3214
|
height: e.modalHeight,
|
|
@@ -3120,68 +3220,68 @@ const et = /* @__PURE__ */ ye({
|
|
|
3120
3220
|
name: "cancel",
|
|
3121
3221
|
text: "取消",
|
|
3122
3222
|
class: "btn btn-secondary",
|
|
3123
|
-
handle: (
|
|
3223
|
+
handle: (M) => !0
|
|
3124
3224
|
}, {
|
|
3125
3225
|
name: "accept",
|
|
3126
3226
|
text: "确定",
|
|
3127
3227
|
class: "btn btn-primary",
|
|
3128
|
-
handle: (
|
|
3228
|
+
handle: (M) => {
|
|
3129
3229
|
if (a.value.endEditCell(), W())
|
|
3130
|
-
return
|
|
3131
|
-
const
|
|
3132
|
-
return o.value =
|
|
3230
|
+
return p.warning("请将映射字段填写完整!"), !1;
|
|
3231
|
+
const d = k();
|
|
3232
|
+
return o.value = d, t.emit("submitModal", d), t.emit("update:modelValue", d), e.onMappingFieldsChanged && typeof e.onMappingFieldsChanged == "function" && e.onMappingFieldsChanged(JSON.stringify(d)), !0;
|
|
3133
3233
|
}
|
|
3134
3234
|
}],
|
|
3135
3235
|
resizeable: !0,
|
|
3136
3236
|
draggable: !0,
|
|
3137
|
-
closedCallback: (
|
|
3138
|
-
(
|
|
3237
|
+
closedCallback: (M, d) => {
|
|
3238
|
+
(M.target.name === "cancel" || d === "icon" || d === "esc") && (o.value = e.modelValue, C.value = P(), s.value = []);
|
|
3139
3239
|
}
|
|
3140
3240
|
};
|
|
3141
|
-
function
|
|
3142
|
-
|
|
3241
|
+
function O(M) {
|
|
3242
|
+
s.value = M;
|
|
3143
3243
|
}
|
|
3144
3244
|
function G() {
|
|
3145
|
-
var
|
|
3245
|
+
var D, A;
|
|
3146
3246
|
if (e.beforeOpen && typeof e.beforeOpen == "function")
|
|
3147
3247
|
return e.beforeOpen({
|
|
3148
|
-
fromDataSource:
|
|
3149
|
-
toDataSource:
|
|
3150
|
-
gridColumns:
|
|
3248
|
+
fromDataSource: i,
|
|
3249
|
+
toDataSource: u,
|
|
3250
|
+
gridColumns: F
|
|
3151
3251
|
});
|
|
3152
|
-
if (!((
|
|
3153
|
-
return
|
|
3252
|
+
if (!((A = (D = e.editorParams) == null ? void 0 : D.propertyData) == null ? void 0 : A.helpId))
|
|
3253
|
+
return p == null || p.warning({
|
|
3154
3254
|
message: "请先配置数据源!",
|
|
3155
3255
|
position: "top-center"
|
|
3156
3256
|
}), !1;
|
|
3157
|
-
const
|
|
3158
|
-
|
|
3159
|
-
const
|
|
3160
|
-
return
|
|
3161
|
-
}
|
|
3162
|
-
function
|
|
3163
|
-
|
|
3164
|
-
|
|
3257
|
+
const d = [], x = v ? v.getData(e.editorParams) : Promise.resolve(i.value);
|
|
3258
|
+
d.push(x), typeof e.toData.dataSource == "function" ? u.value = e.toData.dataSource() : u.value = e.toData.dataSource;
|
|
3259
|
+
const R = f ? f.getData(e.editorParams) : Promise.resolve(u.value);
|
|
3260
|
+
return d.push(R), Promise.all(d).then(([q, oe]) => (i.value = q, u.value = oe, F[0].editor.data = q, F[1].editor.data = oe, !0));
|
|
3261
|
+
}
|
|
3262
|
+
function se(M, d) {
|
|
3263
|
+
M.forEach((x) => {
|
|
3264
|
+
x.selectable = !d.includes(x.data.bindingPath), x.children && se(x.children, d);
|
|
3165
3265
|
});
|
|
3166
3266
|
}
|
|
3167
|
-
function
|
|
3267
|
+
function X(M) {
|
|
3168
3268
|
const {
|
|
3169
|
-
column:
|
|
3170
|
-
rawData:
|
|
3171
|
-
} =
|
|
3172
|
-
field:
|
|
3173
|
-
editor:
|
|
3174
|
-
} =
|
|
3175
|
-
if (
|
|
3176
|
-
const
|
|
3177
|
-
|
|
3269
|
+
column: d,
|
|
3270
|
+
rawData: x
|
|
3271
|
+
} = M, {
|
|
3272
|
+
field: R,
|
|
3273
|
+
editor: D
|
|
3274
|
+
} = d;
|
|
3275
|
+
if (R === "sourceField" && D) {
|
|
3276
|
+
const A = C.value.filter((q) => q.sourceField !== x.sourceField).map((q) => q.sourceField);
|
|
3277
|
+
se(i.value, A), D.data = Ln(i.value);
|
|
3178
3278
|
}
|
|
3179
3279
|
return !0;
|
|
3180
3280
|
}
|
|
3181
|
-
const
|
|
3182
|
-
return () =>
|
|
3281
|
+
const ue = y(() => s.value.length > 0), z = y(() => C.value.length > 0);
|
|
3282
|
+
return () => l(Pt, {
|
|
3183
3283
|
modelValue: N.value,
|
|
3184
|
-
"onUpdate:modelValue": (
|
|
3284
|
+
"onUpdate:modelValue": (M) => N.value = M,
|
|
3185
3285
|
editable: !1,
|
|
3186
3286
|
disabled: e.disabled,
|
|
3187
3287
|
readonly: e.readonly,
|
|
@@ -3189,27 +3289,27 @@ const et = /* @__PURE__ */ ye({
|
|
|
3189
3289
|
enableClear: !1,
|
|
3190
3290
|
buttonContent: n,
|
|
3191
3291
|
buttonBehavior: "Modal",
|
|
3192
|
-
modalOptions:
|
|
3292
|
+
modalOptions: K,
|
|
3193
3293
|
beforeOpen: G
|
|
3194
3294
|
}, {
|
|
3195
|
-
default: () => [
|
|
3295
|
+
default: () => [l("div", {
|
|
3196
3296
|
class: "h-100 d-flex flex-column"
|
|
3197
|
-
}, [
|
|
3297
|
+
}, [l("div", {
|
|
3198
3298
|
class: "px-2"
|
|
3199
|
-
}, [
|
|
3299
|
+
}, [l("button", {
|
|
3200
3300
|
class: "btn btn-primary",
|
|
3201
|
-
onClick:
|
|
3202
|
-
}, [
|
|
3301
|
+
onClick: U
|
|
3302
|
+
}, [Be("新增")]), l("button", {
|
|
3203
3303
|
class: "btn btn-secondary ml-2",
|
|
3204
|
-
disabled: !
|
|
3205
|
-
onClick:
|
|
3206
|
-
}, [
|
|
3304
|
+
disabled: !ue.value,
|
|
3305
|
+
onClick: L
|
|
3306
|
+
}, [Be("删除")]), l("button", {
|
|
3207
3307
|
class: "btn btn-secondary ml-3",
|
|
3208
|
-
disabled: !
|
|
3209
|
-
onClick:
|
|
3210
|
-
}, [
|
|
3308
|
+
disabled: !z.value,
|
|
3309
|
+
onClick: b
|
|
3310
|
+
}, [Be("清空")])]), l("div", {
|
|
3211
3311
|
class: " f-utils-fill p-2"
|
|
3212
|
-
}, [
|
|
3312
|
+
}, [l(Rt, {
|
|
3213
3313
|
ref: a,
|
|
3214
3314
|
pagination: {
|
|
3215
3315
|
enable: !1
|
|
@@ -3227,25 +3327,25 @@ const et = /* @__PURE__ */ ye({
|
|
|
3227
3327
|
showBorder: !0,
|
|
3228
3328
|
editable: "true",
|
|
3229
3329
|
fit: !0,
|
|
3230
|
-
columns:
|
|
3231
|
-
data:
|
|
3232
|
-
newDataItem:
|
|
3233
|
-
onSelectionChange:
|
|
3234
|
-
beforeEditCell:
|
|
3330
|
+
columns: F,
|
|
3331
|
+
data: C.value,
|
|
3332
|
+
newDataItem: B,
|
|
3333
|
+
onSelectionChange: O,
|
|
3334
|
+
beforeEditCell: X
|
|
3235
3335
|
}, null)])])]
|
|
3236
3336
|
});
|
|
3237
3337
|
}
|
|
3238
|
-
}),
|
|
3338
|
+
}), Ko = {
|
|
3239
3339
|
install(e) {
|
|
3240
|
-
e.component(
|
|
3340
|
+
e.component(st.name, st);
|
|
3241
3341
|
},
|
|
3242
3342
|
register(e, t, n, a) {
|
|
3243
|
-
e["mapping-editor"] =
|
|
3343
|
+
e["mapping-editor"] = st, t["mapping-editor"] = Oo;
|
|
3244
3344
|
}
|
|
3245
3345
|
};
|
|
3246
3346
|
export {
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3347
|
+
st as MappingEditor,
|
|
3348
|
+
Ko as default,
|
|
3349
|
+
Dt as mappingEditorProps,
|
|
3350
|
+
Oo as propsResolver
|
|
3251
3351
|
};
|