@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,27 +1,28 @@
|
|
|
1
1
|
var Re = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { ref as
|
|
5
|
-
import { resolveAppearance as We, getSchemaByType as
|
|
6
|
-
import { DgControl as
|
|
7
|
-
import { useGuid as
|
|
8
|
-
import { useConditionValue as
|
|
9
|
-
import { useCondition as Xe, useSolutionUtils as
|
|
10
|
-
import { FNotifyService as
|
|
11
|
-
import {
|
|
12
|
-
import { cloneDeep as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { radioGroupProps as Ze } from "../radio-group/index.esm.js";
|
|
2
|
+
var $e = (i, t, e) => t in i ? Re(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
3
|
+
var S = (i, t, e) => $e(i, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { ref as w, computed as $, createVNode as b, defineComponent as Q, inject as _, onMounted as K, mergeProps as je, createTextVNode as G, Fragment as de, Teleport as qe, nextTick as te, provide as ce, watch as ue, onUnmounted as fe } from "vue";
|
|
5
|
+
import { resolveAppearance as We, getSchemaByType as oe, createPropsResolver as Ge } from "../dynamic-resolver/index.esm.js";
|
|
6
|
+
import { DgControl as v, canvasChanged as Z, refreshCanvas as ze, useDesignerComponent as De } from "../designer-canvas/index.esm.js";
|
|
7
|
+
import { useGuid as se, getMaxZIndex as Qe, getCustomStyle as pe, FormSchemaEntityField$Type as le, FormSchemaEntityFieldType$Type as _e } from "../common/index.esm.js";
|
|
8
|
+
import { useConditionValue as He, useConditionUtils as ie } from "../condition/index.esm.js";
|
|
9
|
+
import { useCondition as Xe, useSolutionUtils as me } from "../query-solution/index.esm.js";
|
|
10
|
+
import { FNotifyService as Ze } from "../notify/index.esm.js";
|
|
11
|
+
import { LocaleService as ge } from "../locale/index.esm.js";
|
|
12
|
+
import { cloneDeep as H, isPlainObject as ae } from "lodash-es";
|
|
13
|
+
import { FDynamicFormGroup as Je } from "../../designer/dynamic-form/index.esm.js";
|
|
14
|
+
import { radioGroupProps as Ye } from "../radio-group/index.esm.js";
|
|
16
15
|
import { useDataSource as Ke, FComboListContainer as et } from "../combo-list/index.esm.js";
|
|
17
|
-
|
|
16
|
+
import { useTypeResolver as ve } from "../dynamic-form/index.esm.js";
|
|
17
|
+
import { DgControl as tt } from "../designer-canvas/index.esm.js/";
|
|
18
|
+
const he = /* @__PURE__ */ new Map([
|
|
18
19
|
["appearance", We]
|
|
19
20
|
]);
|
|
20
|
-
function
|
|
21
|
+
function it(i, t) {
|
|
21
22
|
const e = t == null ? void 0 : t.formSchemaUtils, n = i.parentComponentInstance, r = "54bddc89-5f7e-4b91-9c45-80dd6606cfe9";
|
|
22
|
-
function
|
|
23
|
-
const u =
|
|
24
|
-
if (!u || !
|
|
23
|
+
function s() {
|
|
24
|
+
const u = oe(v["content-container"].type), c = oe(v["filter-bar"].type);
|
|
25
|
+
if (!u || !c)
|
|
25
26
|
return;
|
|
26
27
|
const o = Math.random().toString(36).substr(2, 4);
|
|
27
28
|
Object.assign(u, {
|
|
@@ -29,31 +30,30 @@ function tt(i, t) {
|
|
|
29
30
|
appearance: {
|
|
30
31
|
class: "f-filter-container"
|
|
31
32
|
},
|
|
32
|
-
contents: [
|
|
33
|
-
}), Object.assign(
|
|
33
|
+
contents: [c]
|
|
34
|
+
}), Object.assign(c, {
|
|
34
35
|
id: "filter-" + o,
|
|
35
36
|
fields: []
|
|
36
37
|
});
|
|
37
|
-
const d = n.belongedComponentId, g = e.getViewModelIdByComponentId(d),
|
|
38
|
-
return
|
|
38
|
+
const d = n.belongedComponentId, g = e.getViewModelIdByComponentId(d), f = e.getViewModelById(g);
|
|
39
|
+
return f != null && f.states && (f.states.find((p) => p.code === "originalFilterConditionList") || f.states.push(
|
|
39
40
|
{
|
|
40
|
-
id:
|
|
41
|
+
id: se().guid(),
|
|
41
42
|
category: "locale",
|
|
42
43
|
code: "originalFilterConditionList",
|
|
43
44
|
name: "筛选条过滤条件",
|
|
44
45
|
type: "String"
|
|
45
46
|
}
|
|
46
|
-
)), { filterBar:
|
|
47
|
+
)), { filterBar: c, filterBarContainer: u };
|
|
47
48
|
}
|
|
48
|
-
function
|
|
49
|
-
const u = e.getViewModelIdByComponentId(n.belongedComponentId),
|
|
49
|
+
function l() {
|
|
50
|
+
const u = e.getViewModelIdByComponentId(n.belongedComponentId), c = e.getViewModelById(u);
|
|
50
51
|
let o;
|
|
51
|
-
if (
|
|
52
|
-
|
|
53
|
-
if (!d)
|
|
52
|
+
if (c && c.commands) {
|
|
53
|
+
if (o = c.commands.find((d) => d.handlerName === "Filter" && d.cmpId === r), !o)
|
|
54
54
|
o = {
|
|
55
|
-
id:
|
|
56
|
-
code: `${
|
|
55
|
+
id: se().guid(),
|
|
56
|
+
code: `${c.id.replace(/-/g, "").replace("component", "").replace("viewmodel", "")}Filter1`,
|
|
57
57
|
name: "过滤并加载数据1",
|
|
58
58
|
params: [
|
|
59
59
|
{
|
|
@@ -71,19 +71,19 @@ function tt(i, t) {
|
|
|
71
71
|
],
|
|
72
72
|
handlerName: "Filter",
|
|
73
73
|
cmpId: r
|
|
74
|
-
},
|
|
75
|
-
else if (
|
|
76
|
-
const
|
|
77
|
-
|
|
74
|
+
}, c.commands.push(o);
|
|
75
|
+
else if (o.params && o.params.length) {
|
|
76
|
+
const d = o.params.find((g) => g.name === "filter");
|
|
77
|
+
d && (d.value = `{UISTATE~/#{${n.belongedComponentId}}/originalFilterConditionList}`);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
return { filterInGridViewModel: o };
|
|
81
81
|
}
|
|
82
82
|
function m(u) {
|
|
83
|
-
const
|
|
84
|
-
if (!
|
|
83
|
+
const c = e.getCommands();
|
|
84
|
+
if (!c)
|
|
85
85
|
return;
|
|
86
|
-
let o =
|
|
86
|
+
let o = c.find((d) => d.id === r);
|
|
87
87
|
o || (o = {
|
|
88
88
|
id: r,
|
|
89
89
|
path: "igix/Web/WebCmp/bo-webcmp/metadata/webcmd/data-commands",
|
|
@@ -96,23 +96,23 @@ function tt(i, t) {
|
|
|
96
96
|
}
|
|
97
97
|
);
|
|
98
98
|
}
|
|
99
|
-
function
|
|
100
|
-
const { filterBar: u, filterBarContainer:
|
|
99
|
+
function a() {
|
|
100
|
+
const { filterBar: u, filterBarContainer: c } = s(), { filterInGridViewModel: o } = l();
|
|
101
101
|
u && o && (u.onQuery = o.code), m(o);
|
|
102
102
|
const d = t == null ? void 0 : t.useFormCommand;
|
|
103
|
-
return d && d.checkCommands(),
|
|
103
|
+
return d && d.checkCommands(), c;
|
|
104
104
|
}
|
|
105
|
-
return { createFilterBar:
|
|
105
|
+
return { createFilterBar: a };
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function ye(i, t, e, n) {
|
|
108
108
|
if (e.parentComponentInstance && n) {
|
|
109
|
-
const
|
|
110
|
-
if (
|
|
111
|
-
return
|
|
109
|
+
const l = it(e, n).createFilterBar();
|
|
110
|
+
if (l)
|
|
111
|
+
return l;
|
|
112
112
|
}
|
|
113
113
|
return t;
|
|
114
114
|
}
|
|
115
|
-
const
|
|
115
|
+
const nt = "https://json-schema.org/draft/2020-12/schema", rt = "https://farris-design.gitee.io/filter-bar.schema.json", ot = "filter-bar", st = "A Farris Component", lt = "object", at = {
|
|
116
116
|
id: {
|
|
117
117
|
description: "The unique identifier for filter-bar",
|
|
118
118
|
type: "string"
|
|
@@ -156,21 +156,21 @@ const it = "https://json-schema.org/draft/2020-12/schema", nt = "https://farris-
|
|
|
156
156
|
description: "",
|
|
157
157
|
type: "string"
|
|
158
158
|
}
|
|
159
|
-
},
|
|
159
|
+
}, dt = [
|
|
160
160
|
"id",
|
|
161
161
|
"type"
|
|
162
|
-
],
|
|
162
|
+
], ct = {
|
|
163
163
|
onQuery: "查询事件"
|
|
164
|
-
},
|
|
165
|
-
$schema:
|
|
166
|
-
$id:
|
|
167
|
-
title:
|
|
168
|
-
description:
|
|
164
|
+
}, be = {
|
|
165
|
+
$schema: nt,
|
|
166
|
+
$id: rt,
|
|
167
|
+
title: ot,
|
|
168
|
+
description: st,
|
|
169
169
|
type: lt,
|
|
170
|
-
properties:
|
|
171
|
-
required:
|
|
172
|
-
events:
|
|
173
|
-
},
|
|
170
|
+
properties: at,
|
|
171
|
+
required: dt,
|
|
172
|
+
events: ct
|
|
173
|
+
}, ne = {
|
|
174
174
|
/** 指定已设的筛选条件列表 */
|
|
175
175
|
defaultValues: {
|
|
176
176
|
type: Array,
|
|
@@ -188,169 +188,130 @@ const it = "https://json-schema.org/draft/2020-12/schema", nt = "https://farris-
|
|
|
188
188
|
resetText: { type: String, default: "清空筛选" },
|
|
189
189
|
customClass: { type: String, default: "" },
|
|
190
190
|
customStyle: { type: String, default: "" }
|
|
191
|
-
},
|
|
192
|
-
function
|
|
193
|
-
const
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
191
|
+
}, ut = Ge(ne, be, he, ye);
|
|
192
|
+
function ee() {
|
|
193
|
+
const { getLocaleValue: i } = ge;
|
|
194
|
+
return {
|
|
195
|
+
confirm: i("filterBar.confirm"),
|
|
196
|
+
cancel: i("filterBar.cancel"),
|
|
197
|
+
advancedFilter: i("filterBar.advancedFilter"),
|
|
198
|
+
clearAll: i("filterBar.clearAll"),
|
|
199
|
+
expand: i("filterBar.expand"),
|
|
200
|
+
fold: i("filterBar.fold"),
|
|
201
|
+
require: i("filterBar.require")
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
function ft(i) {
|
|
205
|
+
return ge.getRealPropertyValue(i, "清空筛选", "filterBar.reset");
|
|
206
|
+
}
|
|
207
|
+
function pt(i, t, e, n) {
|
|
208
|
+
const r = w([]), s = w([]), l = w([]), m = w("");
|
|
209
|
+
w(i.mode);
|
|
210
|
+
const a = /* @__PURE__ */ new Map(), { createConditionValue: u } = He(), { convertToControls: c } = ie("filter-bar"), o = Xe(i, t), { getFilterConditions: d } = o, { fieldToCondition: g, judgeLoadNewValue: f } = me(), p = new Ze(), h = ee();
|
|
211
|
+
let y = "[]";
|
|
212
|
+
function C(I) {
|
|
213
|
+
return !i.disabled && !I.value.isEmpty();
|
|
214
|
+
}
|
|
215
|
+
function V(I) {
|
|
216
|
+
s.value = c(I), s.value.reduce((P, U) => (P.set(U.labelCode, U), P), a);
|
|
217
|
+
}
|
|
218
|
+
function B(I) {
|
|
219
|
+
const P = Array.isArray(I) ? I : [];
|
|
220
|
+
l.value = s.value.map((U) => {
|
|
221
|
+
const x = P.find((E) => E.id === U.id);
|
|
222
|
+
if (x) {
|
|
223
|
+
const E = g(U, x.value);
|
|
224
|
+
return f(E, U) && E.value.clear(), E;
|
|
210
225
|
}
|
|
211
|
-
return g(
|
|
226
|
+
return g(U);
|
|
212
227
|
});
|
|
213
228
|
}
|
|
214
|
-
function
|
|
215
|
-
|
|
229
|
+
function M(I) {
|
|
230
|
+
l.value = l.value.filter((P) => P.id !== I.id), r.value = r.value.filter((P) => P.fieldCode !== I.fieldCode), s.value = s.value.filter((P) => P.id !== I.id), t.emit("remove", I.fieldCode);
|
|
216
231
|
}
|
|
217
|
-
function
|
|
218
|
-
var
|
|
219
|
-
i.disabled ? e.value = !1 : e.value = ((
|
|
220
|
-
var
|
|
221
|
-
return
|
|
232
|
+
function k() {
|
|
233
|
+
var I;
|
|
234
|
+
i.disabled ? e.value = !1 : e.value = ((I = l.value) == null ? void 0 : I.findIndex((P) => {
|
|
235
|
+
var U;
|
|
236
|
+
return P.value && !((U = P.value) != null && U.isEmpty());
|
|
222
237
|
})) > -1;
|
|
223
238
|
}
|
|
224
|
-
function
|
|
225
|
-
const
|
|
226
|
-
|
|
239
|
+
function A(I, P = []) {
|
|
240
|
+
const U = JSON.stringify(I || []);
|
|
241
|
+
U !== y && (t.emit("conditionChange", I), y = U, P.length === 0 && t.emit("query", I));
|
|
227
242
|
}
|
|
228
|
-
function
|
|
229
|
-
var
|
|
230
|
-
|
|
231
|
-
const
|
|
232
|
-
(
|
|
233
|
-
|
|
243
|
+
function O() {
|
|
244
|
+
var x;
|
|
245
|
+
k();
|
|
246
|
+
const I = [];
|
|
247
|
+
(l.value || []).map((E) => {
|
|
248
|
+
E.required && (!E.value || E.value.isEmpty()) && I.push(E.fieldName || "");
|
|
234
249
|
});
|
|
235
|
-
const
|
|
236
|
-
var
|
|
237
|
-
return
|
|
250
|
+
const P = (x = l.value) == null ? void 0 : x.filter((E) => {
|
|
251
|
+
var R;
|
|
252
|
+
return E.value && !((R = E.value) != null && R.isEmpty());
|
|
238
253
|
});
|
|
239
|
-
if (
|
|
240
|
-
p.warning({ message:
|
|
254
|
+
if (I.length > 0) {
|
|
255
|
+
p.warning({ message: h.require.replace("[fields]", I.join(",")), position: "top-center" });
|
|
241
256
|
return;
|
|
242
257
|
}
|
|
243
|
-
const
|
|
244
|
-
|
|
258
|
+
const U = d(P, s.value);
|
|
259
|
+
A(U, I);
|
|
245
260
|
}
|
|
246
|
-
function
|
|
247
|
-
|
|
261
|
+
function T(I, P, U = !0) {
|
|
262
|
+
V(I), B(P), U && O();
|
|
248
263
|
}
|
|
249
|
-
function
|
|
250
|
-
|
|
264
|
+
function F(I) {
|
|
265
|
+
I.value.clear(), r.value = r.value.filter((P) => P.fieldCode !== I.fieldCode), t.emit("clear", I.fieldCode), O();
|
|
251
266
|
}
|
|
252
|
-
function
|
|
253
|
-
|
|
267
|
+
function j() {
|
|
268
|
+
l.value.forEach((I) => I.value.clear());
|
|
254
269
|
}
|
|
255
|
-
function
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
}), t.emit("reset"),
|
|
270
|
+
function L() {
|
|
271
|
+
l.value.forEach((I) => {
|
|
272
|
+
I.value.clear();
|
|
273
|
+
}), t.emit("reset"), O(), n.resizeFilerBar();
|
|
259
274
|
}
|
|
260
275
|
return {
|
|
261
|
-
clearAll:
|
|
262
|
-
clearFilterItem:
|
|
276
|
+
clearAll: j,
|
|
277
|
+
clearFilterItem: F,
|
|
263
278
|
currentFilterId: m,
|
|
264
|
-
filterFields:
|
|
265
|
-
filterItems:
|
|
266
|
-
fieldMap:
|
|
267
|
-
loadFilterItems:
|
|
268
|
-
removeFilterItem:
|
|
269
|
-
reset:
|
|
270
|
-
shouldShowClearButtonInFilterItem:
|
|
271
|
-
handleQuery:
|
|
279
|
+
filterFields: s,
|
|
280
|
+
filterItems: l,
|
|
281
|
+
fieldMap: a,
|
|
282
|
+
loadFilterItems: T,
|
|
283
|
+
removeFilterItem: M,
|
|
284
|
+
reset: L,
|
|
285
|
+
shouldShowClearButtonInFilterItem: C,
|
|
286
|
+
handleQuery: O
|
|
272
287
|
};
|
|
273
288
|
}
|
|
274
|
-
function Y() {
|
|
275
|
-
const { getLocaleValue: i } = ue;
|
|
276
|
-
return {
|
|
277
|
-
confirm: i("filterBar.confirm"),
|
|
278
|
-
cancel: i("filterBar.cancel"),
|
|
279
|
-
advancedFilter: i("filterBar.advancedFilter"),
|
|
280
|
-
clearAll: i("filterBar.clearAll"),
|
|
281
|
-
expand: i("filterBar.expand"),
|
|
282
|
-
fold: i("filterBar.fold")
|
|
283
|
-
};
|
|
284
|
-
}
|
|
285
|
-
function ft(i) {
|
|
286
|
-
return ue.getRealPropertyValue(i, "清空筛选", "filterBar.reset");
|
|
287
|
-
}
|
|
288
|
-
function pt(i, t, e, n, r) {
|
|
289
|
-
const {
|
|
290
|
-
filterFields: l,
|
|
291
|
-
handleQuery: s
|
|
292
|
-
} = r, m = I(z(n.value)), c = Y(), u = I(c.advancedFilter);
|
|
293
|
-
function f() {
|
|
294
|
-
e.value = !1, m.value = z(n.value);
|
|
295
|
-
}
|
|
296
|
-
function o() {
|
|
297
|
-
e.value = !1, n.value.forEach((g) => {
|
|
298
|
-
const a = m.value.find((p) => p.id === g.id);
|
|
299
|
-
a != null && a.value && (g.value = a.value);
|
|
300
|
-
}), s();
|
|
301
|
-
}
|
|
302
|
-
function d() {
|
|
303
|
-
return C("div", null, [C(_e, {
|
|
304
|
-
fields: l.value,
|
|
305
|
-
conditions: m.value
|
|
306
|
-
}, null), C("div", null, [C("button", {
|
|
307
|
-
class: "btn btn-secondary",
|
|
308
|
-
onClick: f
|
|
309
|
-
}, [c.cancel]), C("button", {
|
|
310
|
-
class: "btn btn-primary",
|
|
311
|
-
onClick: o
|
|
312
|
-
}, [c.confirm])])]);
|
|
313
|
-
}
|
|
314
|
-
return () => C(He, {
|
|
315
|
-
modelValue: e.value,
|
|
316
|
-
"onUpdate:modelValue": (g) => e.value = g,
|
|
317
|
-
showClose: !1,
|
|
318
|
-
width: 480,
|
|
319
|
-
closeByMask: !1,
|
|
320
|
-
title: u.value
|
|
321
|
-
}, {
|
|
322
|
-
content: d
|
|
323
|
-
});
|
|
324
|
-
}
|
|
325
289
|
function mt(i, t, e, n) {
|
|
326
|
-
const r =
|
|
327
|
-
I(i.showReset);
|
|
328
|
-
const c = I(!1), {
|
|
290
|
+
const r = w([]), s = ee(), l = w(s.advancedFilter), m = w(ft(i.resetText)), a = w(!1), {
|
|
329
291
|
clearAll: u,
|
|
330
|
-
reset:
|
|
292
|
+
reset: c,
|
|
331
293
|
filterItems: o
|
|
332
294
|
} = e;
|
|
333
295
|
function d() {
|
|
334
|
-
r.value = o.value.filter((
|
|
296
|
+
r.value = o.value.filter((h) => h.isExtend);
|
|
335
297
|
}
|
|
336
298
|
d();
|
|
337
|
-
const g =
|
|
338
|
-
function
|
|
339
|
-
|
|
299
|
+
const g = $(() => r.value && r.value.length > 0);
|
|
300
|
+
function f(h) {
|
|
301
|
+
a.value = !0;
|
|
340
302
|
}
|
|
341
|
-
function p(
|
|
342
|
-
i.mode === "display-only" ? u() :
|
|
303
|
+
function p(h) {
|
|
304
|
+
i.mode === "display-only" ? u() : c();
|
|
343
305
|
}
|
|
344
|
-
|
|
345
|
-
return () => C("div", {
|
|
306
|
+
return () => b("div", {
|
|
346
307
|
class: "f-filter-toolbars"
|
|
347
|
-
}, [g.value &&
|
|
308
|
+
}, [g.value && b("button", {
|
|
348
309
|
class: "btn btn-link",
|
|
349
|
-
onClick: (
|
|
350
|
-
}, [
|
|
310
|
+
onClick: (h) => f()
|
|
311
|
+
}, [l.value]), n.value && b("button", {
|
|
351
312
|
class: "btn btn-link",
|
|
352
|
-
onClick: (
|
|
353
|
-
}, [m.value])
|
|
313
|
+
onClick: (h) => p()
|
|
314
|
+
}, [m.value])]);
|
|
354
315
|
}
|
|
355
316
|
const gt = {
|
|
356
317
|
filterItem: { type: Object, default: null },
|
|
@@ -361,22 +322,22 @@ const gt = {
|
|
|
361
322
|
reference: {
|
|
362
323
|
type: Object
|
|
363
324
|
}
|
|
364
|
-
}, vt = Object.assign({},
|
|
325
|
+
}, vt = Object.assign({}, Ye), ht = /* @__PURE__ */ Q({
|
|
365
326
|
name: "FFilterRadioGroup",
|
|
366
327
|
props: vt,
|
|
367
328
|
emits: ["update:modelValue", "change"],
|
|
368
329
|
setup(i, t) {
|
|
369
|
-
const e =
|
|
330
|
+
const e = w(), {
|
|
370
331
|
dataSource: n,
|
|
371
332
|
displayText: r,
|
|
372
|
-
modelValue:
|
|
333
|
+
modelValue: s
|
|
373
334
|
} = Ke(i);
|
|
374
|
-
function
|
|
335
|
+
function l(m) {
|
|
375
336
|
r.value = m.map((u) => u[i.textField]).join(i.separator);
|
|
376
|
-
let
|
|
377
|
-
m.length === 1 ?
|
|
337
|
+
let a = "";
|
|
338
|
+
m.length === 1 ? a = m[0][i.valueField] : a = m.map((u) => u[i.valueField]).join(i.separator), s.value !== a && (s.value = a, t.emit("update:modelValue", s.value), t.emit("change", s.value));
|
|
378
339
|
}
|
|
379
|
-
return () =>
|
|
340
|
+
return () => b(et, {
|
|
380
341
|
style: "margin: -2px -15px;padding: 0;",
|
|
381
342
|
ref: e,
|
|
382
343
|
idField: i.valueField,
|
|
@@ -384,415 +345,434 @@ const gt = {
|
|
|
384
345
|
textField: i.textField,
|
|
385
346
|
titleField: i.titleField,
|
|
386
347
|
dataSource: n.value,
|
|
387
|
-
selectedValues:
|
|
348
|
+
selectedValues: s.value,
|
|
388
349
|
multiSelect: !1,
|
|
389
350
|
enableSearch: !1,
|
|
390
351
|
onSelectionChange: (m) => {
|
|
391
|
-
|
|
352
|
+
l(m);
|
|
392
353
|
}
|
|
393
354
|
}, null);
|
|
394
355
|
}
|
|
395
|
-
}), yt = /* @__PURE__ */
|
|
356
|
+
}), yt = /* @__PURE__ */ Q({
|
|
396
357
|
name: "FFilterBarItemCondition",
|
|
397
358
|
props: gt,
|
|
398
359
|
emits: ["cancel", "confirm", "clearFilter"],
|
|
399
360
|
setup(i, t) {
|
|
400
|
-
const e =
|
|
401
|
-
left:
|
|
402
|
-
right:
|
|
403
|
-
})),
|
|
404
|
-
left:
|
|
405
|
-
top: l.value
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
361
|
+
const e = w(H(i.filterItem)), n = w(), r = ee(), s = w("0px"), l = w("0px"), m = w("0px"), a = w("auto"), u = $(() => ({
|
|
362
|
+
left: a.value === "auto" ? "26px" : "auto",
|
|
363
|
+
right: a.value
|
|
364
|
+
})), c = $(() => ({
|
|
365
|
+
left: s.value,
|
|
366
|
+
top: l.value
|
|
367
|
+
})), o = $(() => ({
|
|
368
|
+
width: m.value === "0px" ? null : m.value,
|
|
369
|
+
maxWidth: m.value === "0px" ? null : m.value
|
|
370
|
+
})), d = w(), {
|
|
371
|
+
useFilterItemsComposition: g,
|
|
372
|
+
resolveEditorProps: f
|
|
373
|
+
} = _("useFilterItemsComposition"), {
|
|
374
|
+
fieldMap: p
|
|
375
|
+
} = g, {
|
|
376
|
+
renderFieldConditionEditor: h,
|
|
377
|
+
conditionChangeHandler: y
|
|
378
|
+
} = ie("filter-bar"), C = w("");
|
|
379
|
+
let V = !1, B = {};
|
|
380
|
+
const M = w(!0);
|
|
381
|
+
function k() {
|
|
382
|
+
var q, X;
|
|
383
|
+
if (!i.reference || !d.value)
|
|
420
384
|
return;
|
|
421
|
-
const
|
|
422
|
-
let
|
|
423
|
-
const
|
|
424
|
-
|
|
385
|
+
const x = (q = i.reference) == null ? void 0 : q.getBoundingClientRect();
|
|
386
|
+
let E = (X = d.value) == null ? void 0 : X.getBoundingClientRect().width;
|
|
387
|
+
const R = document.body.clientWidth - x.x - 30, N = document.body.clientWidth - x.y - 30;
|
|
388
|
+
E > R && E > N && (E = Math.max(R, N)), x.left > document.body.clientWidth - E - 20 ? (s.value = x.left + x.width - E + "px", l.value = x.top + x.height + "px", a.value = "26px") : (s.value = x.left + "px", l.value = x.top + x.height + "px", a.value = "auto"), m.value = E + "px";
|
|
389
|
+
}
|
|
390
|
+
function A(x, E, R, N) {
|
|
391
|
+
V = !0, B = {
|
|
392
|
+
value: E,
|
|
393
|
+
editor: R,
|
|
394
|
+
option: N
|
|
395
|
+
};
|
|
425
396
|
}
|
|
426
|
-
function
|
|
427
|
-
|
|
397
|
+
function O() {
|
|
398
|
+
if (!n.value)
|
|
399
|
+
return !1;
|
|
400
|
+
const x = n.value.parentElement, E = Array.from(x.children);
|
|
401
|
+
return E ? !!E.find((N) => !N || !N.classList ? !1 : N.classList.contains("popover") && N.style.visibility === "visible") : !1;
|
|
428
402
|
}
|
|
429
|
-
function
|
|
430
|
-
|
|
403
|
+
function T(x, E, R, N) {
|
|
404
|
+
y(x, E, R, N), t.emit("confirm", e.value);
|
|
431
405
|
}
|
|
432
|
-
function
|
|
406
|
+
function F() {
|
|
433
407
|
const {
|
|
434
|
-
id:
|
|
435
|
-
editor:
|
|
436
|
-
needEmitChange:
|
|
437
|
-
} =
|
|
438
|
-
if (
|
|
439
|
-
const
|
|
440
|
-
return
|
|
408
|
+
id: x,
|
|
409
|
+
editor: E,
|
|
410
|
+
needEmitChange: R
|
|
411
|
+
} = h(p, e.value, A);
|
|
412
|
+
if (C.value = "filter-panel--" + E.type, E.type === "radio-group") {
|
|
413
|
+
const N = f(E.type, E);
|
|
414
|
+
return M.value = !1, b(ht, je(N, {
|
|
441
415
|
modelValue: e.value.value.value,
|
|
442
|
-
"onUpdate:modelValue": (
|
|
443
|
-
onChange: (
|
|
444
|
-
|
|
416
|
+
"onUpdate:modelValue": (q) => e.value.value.value = q,
|
|
417
|
+
onChange: (q) => {
|
|
418
|
+
T(e.value, q, E);
|
|
445
419
|
}
|
|
446
420
|
}), {
|
|
447
|
-
default: () => [
|
|
421
|
+
default: () => [G(" ")]
|
|
448
422
|
});
|
|
449
423
|
}
|
|
450
|
-
return
|
|
424
|
+
return b(Je, {
|
|
451
425
|
showLabelType: "force-none",
|
|
452
|
-
id:
|
|
453
|
-
key:
|
|
454
|
-
editor:
|
|
426
|
+
id: x,
|
|
427
|
+
key: x,
|
|
428
|
+
editor: E,
|
|
455
429
|
modelValue: e.value.value.value,
|
|
456
|
-
"onUpdate:modelValue": (
|
|
457
|
-
onChange: (
|
|
458
|
-
|
|
430
|
+
"onUpdate:modelValue": (N) => e.value.value.value = N,
|
|
431
|
+
onChange: (N, q) => {
|
|
432
|
+
R && A(e.value, N, E, q);
|
|
459
433
|
}
|
|
460
434
|
}, null);
|
|
461
435
|
}
|
|
462
|
-
|
|
463
|
-
|
|
436
|
+
K(() => {
|
|
437
|
+
k();
|
|
464
438
|
});
|
|
465
|
-
function
|
|
466
|
-
|
|
439
|
+
function j(x) {
|
|
440
|
+
const E = C.value.replace("filter-panel--", "");
|
|
441
|
+
["input", "radio-group", "switch"].findIndex((R) => R === E) > -1 ? t.emit("cancel") : O() || t.emit("cancel");
|
|
442
|
+
}
|
|
443
|
+
function L(x) {
|
|
444
|
+
x.stopPropagation(), V && y(e.value, B.value, B.editor, B.option), t.emit("confirm", e.value);
|
|
467
445
|
}
|
|
468
|
-
function
|
|
469
|
-
|
|
446
|
+
function I(x) {
|
|
447
|
+
e.value.value.clear(), x.stopPropagation(), t.emit("confirm", e.value);
|
|
470
448
|
}
|
|
471
|
-
function
|
|
472
|
-
|
|
449
|
+
function P() {
|
|
450
|
+
const x = Qe();
|
|
451
|
+
return {
|
|
452
|
+
zIndex: Math.max(x, 1050)
|
|
453
|
+
};
|
|
473
454
|
}
|
|
474
|
-
|
|
455
|
+
const U = P();
|
|
456
|
+
return () => b("div", {
|
|
475
457
|
class: "f-filter-panel-wrapper can-close",
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
}, [
|
|
458
|
+
ref: n,
|
|
459
|
+
onClick: j,
|
|
460
|
+
style: {
|
|
461
|
+
zIndex: U
|
|
462
|
+
}
|
|
463
|
+
}, [b("div", {
|
|
464
|
+
class: "f-filter-panel " + C.value,
|
|
465
|
+
ref: d,
|
|
466
|
+
style: c.value
|
|
467
|
+
}, [b("div", {
|
|
482
468
|
class: "f-filter-panel-inner",
|
|
483
|
-
|
|
484
|
-
|
|
469
|
+
style: o.value,
|
|
470
|
+
onClick: (x) => x.stopPropagation()
|
|
471
|
+
}, [b("div", {
|
|
485
472
|
class: "f-filter-panel-arrow",
|
|
486
|
-
style:
|
|
487
|
-
}, null),
|
|
473
|
+
style: u.value
|
|
474
|
+
}, null), F(), M.value && b("div", {
|
|
488
475
|
class: "f-filter-panel-footer"
|
|
489
|
-
}, [
|
|
476
|
+
}, [b("div", {
|
|
490
477
|
class: "filter-panel-clear"
|
|
491
|
-
}, [
|
|
478
|
+
}, [b("button", {
|
|
492
479
|
class: "btn btn-link",
|
|
493
|
-
onClick:
|
|
480
|
+
onClick: I,
|
|
494
481
|
style: "padding-left:0;"
|
|
495
|
-
}, [
|
|
482
|
+
}, [r.clearAll])]), b("div", {
|
|
496
483
|
class: "filter-panel-btns"
|
|
497
|
-
}, [
|
|
484
|
+
}, [b("button", {
|
|
498
485
|
class: "btn btn-secondary can-close",
|
|
499
|
-
onClick:
|
|
500
|
-
}, [
|
|
486
|
+
onClick: j
|
|
487
|
+
}, [r.cancel]), b("button", {
|
|
501
488
|
class: "filter-panel-submit btn btn-primary",
|
|
502
|
-
onClick:
|
|
503
|
-
}, [
|
|
489
|
+
onClick: L
|
|
490
|
+
}, [r.confirm])])])])])]);
|
|
504
491
|
}
|
|
505
|
-
}),
|
|
492
|
+
}), Ce = {
|
|
506
493
|
filterItem: { type: Object, default: null },
|
|
507
494
|
disabled: { type: Boolean, default: !1 }
|
|
508
|
-
}, bt = /* @__PURE__ */
|
|
495
|
+
}, bt = /* @__PURE__ */ Q({
|
|
509
496
|
name: "FFilterBarItem",
|
|
510
|
-
props:
|
|
497
|
+
props: Ce,
|
|
511
498
|
emits: ["confirm"],
|
|
512
499
|
setup(i, t) {
|
|
513
|
-
const e =
|
|
500
|
+
const e = w(i.filterItem), {
|
|
514
501
|
useFilterItemsComposition: n
|
|
515
|
-
} =
|
|
502
|
+
} = _("useFilterItemsComposition"), {
|
|
516
503
|
clearFilterItem: r,
|
|
517
|
-
currentFilterId:
|
|
518
|
-
removeFilterItem:
|
|
504
|
+
currentFilterId: s,
|
|
505
|
+
removeFilterItem: l,
|
|
519
506
|
shouldShowClearButtonInFilterItem: m
|
|
520
|
-
} = n,
|
|
507
|
+
} = n, a = w(!1), u = w(!1), c = w(), o = w(""), d = w(), g = function() {
|
|
521
508
|
return {
|
|
522
509
|
"f-filter-item": !0,
|
|
523
510
|
"f-state-disabled": i.disabled,
|
|
524
511
|
"f-filter-item-actived": !e.value.value.isEmpty(),
|
|
525
512
|
// 'f-filter-item-last': index === filterItems.value.length - 1,
|
|
526
|
-
"f-filter-item-edit": e.value.id ===
|
|
513
|
+
"f-filter-item-edit": e.value.id === s.value || a.value
|
|
527
514
|
};
|
|
528
515
|
};
|
|
529
|
-
|
|
530
|
-
function
|
|
531
|
-
i.disabled || (i.mode === "display-only" ?
|
|
516
|
+
$(() => !i.disabled && i.mode === "editable");
|
|
517
|
+
function f(M) {
|
|
518
|
+
i.disabled || (i.mode === "display-only" ? l(e.value) : r(e.value));
|
|
532
519
|
}
|
|
533
520
|
function p(M) {
|
|
534
|
-
i.disabled || (
|
|
521
|
+
i.disabled || (a.value = !0);
|
|
535
522
|
}
|
|
536
|
-
function
|
|
537
|
-
|
|
523
|
+
function h() {
|
|
524
|
+
a.value = !1;
|
|
538
525
|
}
|
|
539
526
|
function y() {
|
|
540
527
|
d.value && d.value.scrollWidth > d.value.clientWidth ? o.value = d.value.innerHTML : o.value = "";
|
|
541
528
|
}
|
|
542
|
-
function
|
|
543
|
-
|
|
529
|
+
function C(M) {
|
|
530
|
+
a.value = !1, e.value.value = M.value, t.emit("confirm", M), te(() => {
|
|
544
531
|
y();
|
|
545
532
|
});
|
|
546
533
|
}
|
|
547
|
-
function
|
|
534
|
+
function V() {
|
|
548
535
|
u.value = i.disabled ? !1 : m(e.value);
|
|
549
536
|
}
|
|
550
|
-
function
|
|
537
|
+
function B() {
|
|
551
538
|
u.value = !1;
|
|
552
539
|
}
|
|
553
|
-
return
|
|
540
|
+
return K(() => {
|
|
554
541
|
y();
|
|
555
|
-
}), () =>
|
|
542
|
+
}), () => b("div", {
|
|
556
543
|
key: e.value.id,
|
|
557
544
|
id: e.value.id,
|
|
558
545
|
class: g(),
|
|
559
|
-
onMouseenter: () =>
|
|
560
|
-
onMouseleave: () =>
|
|
561
|
-
}, [
|
|
546
|
+
onMouseenter: () => V(),
|
|
547
|
+
onMouseleave: () => B()
|
|
548
|
+
}, [b("div", {
|
|
562
549
|
class: "f-filter-item-inner",
|
|
563
|
-
ref:
|
|
550
|
+
ref: c,
|
|
564
551
|
onClick: (M) => p()
|
|
565
|
-
}, [e.value.required &&
|
|
552
|
+
}, [e.value.required && b("span", {
|
|
566
553
|
class: "f-filter-item-required text-danger"
|
|
567
|
-
}, [
|
|
554
|
+
}, [G("*")]), b("span", {
|
|
568
555
|
class: "f-filter-item-text"
|
|
569
|
-
}, [e.value.fieldName]), !e.value.value.isEmpty() &&
|
|
556
|
+
}, [e.value.fieldName]), !e.value.value.isEmpty() && b(de, null, [b("span", {
|
|
570
557
|
class: "f-filter-item-tip"
|
|
571
|
-
}, [
|
|
558
|
+
}, [G(":")]), b("span", {
|
|
572
559
|
class: "f-filter-item-content",
|
|
573
560
|
ref: d,
|
|
574
561
|
title: o.value
|
|
575
|
-
}, [e.value.value.getDisplayText()])]), !i.disabled &&
|
|
562
|
+
}, [e.value.value.getDisplayText()])]), !i.disabled && b("span", {
|
|
576
563
|
class: "f-filter-item-arrow f-icon f-icon-arrow-chevron-down"
|
|
577
|
-
}, null)]), u.value &&
|
|
564
|
+
}, null)]), u.value && b("span", {
|
|
578
565
|
class: "mr-3 f-filter-item-clear",
|
|
579
|
-
onClick: (M) =>
|
|
580
|
-
}, [
|
|
566
|
+
onClick: (M) => f()
|
|
567
|
+
}, [b("span", {
|
|
581
568
|
class: "f-icon f-icon-close-circle"
|
|
582
|
-
}, null)]),
|
|
569
|
+
}, null)]), a.value && b(qe, {
|
|
583
570
|
to: "body"
|
|
584
571
|
}, {
|
|
585
|
-
default: () => [
|
|
572
|
+
default: () => [b(yt, {
|
|
586
573
|
filterItem: e.value,
|
|
587
|
-
reference:
|
|
588
|
-
onConfirm:
|
|
589
|
-
onCancel:
|
|
574
|
+
reference: c.value,
|
|
575
|
+
onConfirm: C,
|
|
576
|
+
onCancel: h
|
|
590
577
|
}, null)]
|
|
591
578
|
})]);
|
|
592
579
|
}
|
|
593
580
|
});
|
|
594
|
-
function
|
|
595
|
-
const
|
|
596
|
-
let
|
|
597
|
-
function
|
|
598
|
-
var
|
|
599
|
-
if (
|
|
600
|
-
const w = (g = i.value) == null ? void 0 : g.querySelector(".f-filter-list-wrapper");
|
|
601
|
-
s = w ? parseFloat(getComputedStyle(w).marginRight) : 0;
|
|
602
|
-
}
|
|
603
|
-
const o = ((p = (a = i.value) == null ? void 0 : a.querySelector(".f-filter-list-ellipsis")) == null ? void 0 : p.clientWidth) || 0, d = ((y = (v = i.value) == null ? void 0 : v.querySelector(".f-filter-toolbars")) == null ? void 0 : y.clientWidth) || 0;
|
|
604
|
-
return s + o + d;
|
|
605
|
-
}
|
|
606
|
-
function c(o = -1, d = -1) {
|
|
607
|
-
var w;
|
|
608
|
-
let g = !1;
|
|
609
|
-
const a = (w = t.value) == null ? void 0 : w.children;
|
|
610
|
-
if (!t.value || !i.value || !a || a.length === 0 || (o < 0 && (o = i.value.clientWidth), l = d < 0 ? l : d, Math.abs(o - l) < r))
|
|
581
|
+
function Fe(i, t) {
|
|
582
|
+
const e = w(null), n = 15;
|
|
583
|
+
let r = 0;
|
|
584
|
+
function s(a = -1, u = -1) {
|
|
585
|
+
var f;
|
|
586
|
+
if (!i.value)
|
|
611
587
|
return;
|
|
612
|
-
const
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
588
|
+
const c = (f = i.value) == null ? void 0 : f.querySelector(".f-filter-list");
|
|
589
|
+
if (!c)
|
|
590
|
+
return;
|
|
591
|
+
const o = c.children;
|
|
592
|
+
if (!o || o.length === 0 || (a < 0 && (a = i.value.clientWidth), r = u < 0 ? r : u, Math.abs(a - r) < n))
|
|
593
|
+
return;
|
|
594
|
+
Array.from(o).forEach((p) => {
|
|
595
|
+
p.style.display = "flex";
|
|
596
|
+
}), t.value = c.clientWidth < c.scrollWidth;
|
|
597
|
+
let d = !1, g = 0;
|
|
598
|
+
for (let p = 0; p < o.length; p++) {
|
|
599
|
+
const h = o[p], y = Math.ceil(h.offsetWidth + (parseFloat(getComputedStyle(h).marginRight) || 0) + parseFloat(getComputedStyle(h).marginLeft));
|
|
600
|
+
!d && g + y <= a ? g += y : (h.style.display = "none", d = !0);
|
|
620
601
|
}
|
|
621
|
-
|
|
602
|
+
r = a;
|
|
622
603
|
}
|
|
623
|
-
function
|
|
624
|
-
var
|
|
625
|
-
if (!i.value
|
|
604
|
+
function l() {
|
|
605
|
+
var u, c;
|
|
606
|
+
if (!i.value)
|
|
626
607
|
return;
|
|
627
|
-
(
|
|
628
|
-
const
|
|
629
|
-
Array.from(
|
|
630
|
-
|
|
631
|
-
}),
|
|
632
|
-
}
|
|
633
|
-
function
|
|
634
|
-
if (!
|
|
608
|
+
(u = e.value) == null || u.unobserve(i.value);
|
|
609
|
+
const a = ((c = i.value.querySelector(".f-filter-list")) == null ? void 0 : c.children) || [];
|
|
610
|
+
Array.from(a).forEach((o) => {
|
|
611
|
+
o.style.display = "flex";
|
|
612
|
+
}), r = 0;
|
|
613
|
+
}
|
|
614
|
+
function m() {
|
|
615
|
+
if (!i.value)
|
|
635
616
|
return;
|
|
636
|
-
const
|
|
637
|
-
const
|
|
638
|
-
c
|
|
617
|
+
const a = new ResizeObserver((u) => {
|
|
618
|
+
const c = u[0].contentRect.width;
|
|
619
|
+
s(c);
|
|
639
620
|
});
|
|
640
|
-
return
|
|
621
|
+
return a.observe(i.value), e.value = a, a;
|
|
641
622
|
}
|
|
642
623
|
return {
|
|
643
|
-
setupWidthObserver:
|
|
644
|
-
cancelWidthObserver:
|
|
645
|
-
handleVisibleChildren:
|
|
624
|
+
setupWidthObserver: m,
|
|
625
|
+
cancelWidthObserver: l,
|
|
626
|
+
handleVisibleChildren: s
|
|
646
627
|
};
|
|
647
628
|
}
|
|
648
|
-
const
|
|
629
|
+
const D = /* @__PURE__ */ Q({
|
|
649
630
|
name: "FFilterBar",
|
|
650
|
-
props:
|
|
631
|
+
props: ne,
|
|
651
632
|
emits: ["clear", "remove", "reset", "conditionChange", "change", "query"],
|
|
652
633
|
setup(i, t) {
|
|
653
|
-
const e =
|
|
654
|
-
cancelWidthObserver:
|
|
655
|
-
setupWidthObserver:
|
|
656
|
-
handleVisibleChildren:
|
|
657
|
-
} =
|
|
634
|
+
const e = w(!1), n = w(!1), r = w(null), s = w(!1), l = w(0), m = Fe(r, n), {
|
|
635
|
+
cancelWidthObserver: a,
|
|
636
|
+
setupWidthObserver: u,
|
|
637
|
+
handleVisibleChildren: c
|
|
638
|
+
} = m, o = {
|
|
658
639
|
resizeFilerBar: () => {
|
|
659
|
-
|
|
660
|
-
|
|
640
|
+
e.value || te(() => {
|
|
641
|
+
c(-1, 0);
|
|
661
642
|
});
|
|
662
643
|
}
|
|
663
|
-
},
|
|
664
|
-
filterFields:
|
|
665
|
-
filterItems:
|
|
666
|
-
loadFilterItems:
|
|
667
|
-
handleQuery:
|
|
668
|
-
} =
|
|
669
|
-
resolveEditorProps:
|
|
670
|
-
} =
|
|
671
|
-
|
|
672
|
-
useFilterItemsComposition:
|
|
673
|
-
resolveEditorProps:
|
|
644
|
+
}, d = pt(i, t, s, o), {
|
|
645
|
+
filterFields: g,
|
|
646
|
+
filterItems: f,
|
|
647
|
+
loadFilterItems: p,
|
|
648
|
+
handleQuery: h
|
|
649
|
+
} = d, {
|
|
650
|
+
resolveEditorProps: y
|
|
651
|
+
} = ve();
|
|
652
|
+
ce("useFilterItemsComposition", {
|
|
653
|
+
useFilterItemsComposition: d,
|
|
654
|
+
resolveEditorProps: y
|
|
674
655
|
});
|
|
675
|
-
const
|
|
676
|
-
const
|
|
677
|
-
display:
|
|
656
|
+
const C = ee(), V = $(() => {
|
|
657
|
+
const L = {
|
|
658
|
+
display: g.value && g.value.length ? "" : "none"
|
|
678
659
|
};
|
|
679
|
-
return
|
|
660
|
+
return pe(L, i == null ? void 0 : i.customStyle);
|
|
680
661
|
});
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
}),
|
|
684
|
-
|
|
662
|
+
p(i.fields, i.defaultValues, !!(i.defaultValues && i.defaultValues.length > 0)), ue([() => i.defaultValues, () => i.fields], ([L, I]) => {
|
|
663
|
+
p(I, L), l.value++, o.resizeFilerBar();
|
|
664
|
+
}), K(() => {
|
|
665
|
+
u();
|
|
666
|
+
}), fe(() => {
|
|
667
|
+
a();
|
|
685
668
|
});
|
|
686
|
-
const
|
|
669
|
+
const B = $(() => ({
|
|
687
670
|
"f-filter-list": !0,
|
|
688
|
-
"f-filter-list-extend":
|
|
671
|
+
"f-filter-list-extend": e.value
|
|
689
672
|
// 'f-utils-overflow-hidden': true
|
|
690
|
-
})),
|
|
673
|
+
})), M = $(() => ({
|
|
691
674
|
"extend-btn-arrow": !0,
|
|
692
675
|
"f-icon": !0,
|
|
693
|
-
"f-icon-arrow-chevron-up":
|
|
694
|
-
"f-icon-arrow-chevron-down": !
|
|
695
|
-
})),
|
|
696
|
-
function
|
|
697
|
-
|
|
676
|
+
"f-icon-arrow-chevron-up": e.value,
|
|
677
|
+
"f-icon-arrow-chevron-down": !e.value
|
|
678
|
+
})), k = $(() => !e.value && n.value);
|
|
679
|
+
function A() {
|
|
680
|
+
e.value = !e.value, e.value ? a() : u();
|
|
698
681
|
}
|
|
699
|
-
const
|
|
700
|
-
function
|
|
701
|
-
t.emit("change",
|
|
682
|
+
const O = mt(i, t, d, s);
|
|
683
|
+
function T(L) {
|
|
684
|
+
t.emit("change", L), h(), o.resizeFilerBar();
|
|
702
685
|
}
|
|
703
|
-
function
|
|
704
|
-
return
|
|
705
|
-
class:
|
|
706
|
-
|
|
707
|
-
}, [
|
|
708
|
-
filterItem:
|
|
709
|
-
onConfirm:
|
|
710
|
-
disabled: i.disabled ||
|
|
711
|
-
}, null)),
|
|
686
|
+
function F() {
|
|
687
|
+
return b("div", {
|
|
688
|
+
class: B.value,
|
|
689
|
+
key: i.id + "-main-" + l.value
|
|
690
|
+
}, [f.value.map((L, I) => !L.isExtend && b(bt, {
|
|
691
|
+
filterItem: L,
|
|
692
|
+
onConfirm: T,
|
|
693
|
+
disabled: i.disabled || L.disabled
|
|
694
|
+
}, null)), e.value && O()]);
|
|
712
695
|
}
|
|
713
|
-
function
|
|
714
|
-
return
|
|
696
|
+
function j() {
|
|
697
|
+
return k.value && b("div", {
|
|
715
698
|
class: "f-filter-list-ellipsis",
|
|
716
|
-
onClick: (
|
|
717
|
-
}, [
|
|
699
|
+
onClick: (L) => A()
|
|
700
|
+
}, [G("...")]);
|
|
718
701
|
}
|
|
719
|
-
return () =>
|
|
702
|
+
return () => b("div", {
|
|
720
703
|
class: "f-filter-wrapper " + i.customClass,
|
|
721
|
-
style:
|
|
722
|
-
}, [
|
|
704
|
+
style: V.value
|
|
705
|
+
}, [b("div", {
|
|
723
706
|
class: "f-filter-wrapper-inner f-utils-fill"
|
|
724
|
-
}, [
|
|
725
|
-
class: "f-filter-main f-utils-fill"
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
}, [b.value && B()]), S.value && R(), !n.value && F()]), r.value && C("div", {
|
|
707
|
+
}, [b("div", {
|
|
708
|
+
class: "f-filter-main f-utils-fill"
|
|
709
|
+
}, [b("div", {
|
|
710
|
+
class: "f-filter-list-wrapper flex-fill",
|
|
711
|
+
ref: r
|
|
712
|
+
}, [F()]), j(), !e.value && O()]), n.value && b("div", {
|
|
731
713
|
class: "f-filter-extend-btn"
|
|
732
|
-
}, [
|
|
714
|
+
}, [b("button", {
|
|
733
715
|
class: "btn btn-link",
|
|
734
|
-
onClick:
|
|
735
|
-
}, [
|
|
716
|
+
onClick: A
|
|
717
|
+
}, [b("span", {
|
|
736
718
|
class: "extend-btn-text"
|
|
737
|
-
}, [
|
|
738
|
-
class:
|
|
719
|
+
}, [e.value ? C.fold : C.expand]), b("span", {
|
|
720
|
+
class: M.value
|
|
739
721
|
}, null)])])])]);
|
|
740
722
|
}
|
|
741
723
|
});
|
|
742
724
|
function Ct(i, t) {
|
|
743
|
-
|
|
744
|
-
const e =
|
|
745
|
-
|
|
746
|
-
const
|
|
747
|
-
function
|
|
725
|
+
w([]);
|
|
726
|
+
const e = w([]), n = w([]), r = w("");
|
|
727
|
+
w(!1), w(i.mode);
|
|
728
|
+
const s = /* @__PURE__ */ new Map(), { convertToControls: l } = ie("filter-bar"), { fieldToCondition: m } = me();
|
|
729
|
+
function a(d) {
|
|
748
730
|
return !d.value.isEmpty();
|
|
749
731
|
}
|
|
750
732
|
function u(d) {
|
|
751
|
-
e.value =
|
|
733
|
+
e.value = H(d), e.value.reduce((g, f) => (g.set(f.labelCode, f), g), s);
|
|
752
734
|
}
|
|
753
|
-
function
|
|
735
|
+
function c(d) {
|
|
754
736
|
n.value = e.value.map((g) => m(g));
|
|
755
737
|
}
|
|
756
738
|
function o(d, g) {
|
|
757
|
-
u(d),
|
|
739
|
+
u(d), c();
|
|
758
740
|
}
|
|
759
741
|
return o(i.fields), {
|
|
760
742
|
currentFilterId: r,
|
|
761
743
|
filterFields: e,
|
|
762
744
|
filterItems: n,
|
|
763
|
-
fieldMap:
|
|
745
|
+
fieldMap: s,
|
|
764
746
|
loadFilterItems: o,
|
|
765
|
-
shouldShowClearButtonInFilterItem:
|
|
747
|
+
shouldShowClearButtonInFilterItem: a
|
|
766
748
|
};
|
|
767
749
|
}
|
|
768
750
|
function Ft(i, t, e) {
|
|
769
|
-
const n =
|
|
770
|
-
filterItems:
|
|
751
|
+
const n = w([]), r = w("更多筛选"), {
|
|
752
|
+
filterItems: s
|
|
771
753
|
} = e;
|
|
772
|
-
function
|
|
773
|
-
n.value =
|
|
754
|
+
function l() {
|
|
755
|
+
n.value = s.value.filter((a) => a.isExtend);
|
|
774
756
|
}
|
|
775
|
-
|
|
776
|
-
const
|
|
777
|
-
return () =>
|
|
757
|
+
l();
|
|
758
|
+
const m = $(() => n.value && n.value.length > 0);
|
|
759
|
+
return () => b("div", {
|
|
778
760
|
class: "f-filter-toolbars"
|
|
779
|
-
}, [
|
|
780
|
-
class: "btn btn-link"
|
|
781
|
-
}, [r.value]), f.value && C("button", {
|
|
761
|
+
}, [m.value && b("button", {
|
|
782
762
|
class: "btn btn-link"
|
|
783
|
-
}, [
|
|
763
|
+
}, [r.value])]);
|
|
784
764
|
}
|
|
785
|
-
const wt = /* @__PURE__ */
|
|
765
|
+
const wt = /* @__PURE__ */ Q({
|
|
786
766
|
name: "FFilterBarItemDesign",
|
|
787
|
-
props:
|
|
767
|
+
props: Ce,
|
|
788
768
|
emits: ["confirm"],
|
|
789
769
|
setup(i, t) {
|
|
790
|
-
const e =
|
|
770
|
+
const e = w(i.filterItem), {
|
|
791
771
|
useFilterItemsComposition: n
|
|
792
|
-
} =
|
|
772
|
+
} = _("useFilterItemsComposition"), {
|
|
793
773
|
currentFilterId: r,
|
|
794
|
-
shouldShowClearButtonInFilterItem:
|
|
795
|
-
} = n,
|
|
774
|
+
shouldShowClearButtonInFilterItem: s
|
|
775
|
+
} = n, l = w(i.disabled), m = function() {
|
|
796
776
|
return {
|
|
797
777
|
"f-filter-item": !0,
|
|
798
778
|
"f-filter-item-actived": !e.value.value.isEmpty(),
|
|
@@ -800,59 +780,60 @@ const wt = /* @__PURE__ */ D({
|
|
|
800
780
|
"f-filter-item-edit": e.value.id === r.value
|
|
801
781
|
};
|
|
802
782
|
};
|
|
803
|
-
return () =>
|
|
783
|
+
return () => b("div", {
|
|
804
784
|
key: e.value.id,
|
|
805
785
|
id: e.value.id,
|
|
806
786
|
class: m()
|
|
807
|
-
}, [
|
|
787
|
+
}, [b("div", {
|
|
808
788
|
class: "f-filter-item-inner"
|
|
809
|
-
}, [e.value.required &&
|
|
789
|
+
}, [e.value.required && b("span", {
|
|
810
790
|
class: "f-filter-item-required text-danger"
|
|
811
|
-
}, [
|
|
791
|
+
}, [G("*")]), b("span", {
|
|
812
792
|
class: "f-filter-item-text"
|
|
813
|
-
}, [e.value.fieldName]), e.value.value.getDisplayText() &&
|
|
793
|
+
}, [e.value.fieldName]), e.value.value.getDisplayText() && b(de, null, [b("span", {
|
|
814
794
|
class: "f-filter-item-tip"
|
|
815
|
-
}, [
|
|
795
|
+
}, [G(":")]), b("span", {
|
|
816
796
|
class: "f-filter-item-content"
|
|
817
|
-
}, [e.value.value.getDisplayText()])]), !
|
|
797
|
+
}, [e.value.value.getDisplayText()])]), !l.value && b("span", {
|
|
818
798
|
class: "f-filter-item-arrow f-icon f-icon-arrow-chevron-down"
|
|
819
|
-
}, null)]),
|
|
799
|
+
}, null)]), s(e.value) && b("span", {
|
|
820
800
|
class: "mr-3 f-filter-item-clear"
|
|
821
|
-
}, [
|
|
801
|
+
}, [b("span", {
|
|
822
802
|
class: "f-icon f-icon-close-circle"
|
|
823
803
|
}, null)])]);
|
|
824
804
|
}
|
|
825
805
|
});
|
|
826
806
|
function It(i) {
|
|
827
807
|
const { formSchemaUtils: t, formStateMachineUtils: e } = i;
|
|
828
|
-
function n(
|
|
808
|
+
function n(a, u = "") {
|
|
829
809
|
return {
|
|
830
|
-
path: u +
|
|
831
|
-
field:
|
|
832
|
-
fullPath:
|
|
810
|
+
path: u + a.code,
|
|
811
|
+
field: a.id,
|
|
812
|
+
fullPath: a.code
|
|
833
813
|
};
|
|
834
814
|
}
|
|
835
|
-
function r(
|
|
836
|
-
|
|
815
|
+
function r(a, u = "") {
|
|
816
|
+
const c = t.getViewModelById(a);
|
|
817
|
+
return c ? c.states.map((o) => n(o, u)) : [];
|
|
837
818
|
}
|
|
838
|
-
function
|
|
839
|
-
const u = t.getRootViewModelId(),
|
|
840
|
-
if (
|
|
841
|
-
return
|
|
819
|
+
function s(a) {
|
|
820
|
+
const u = t.getRootViewModelId(), c = r(a);
|
|
821
|
+
if (a === u)
|
|
822
|
+
return c;
|
|
842
823
|
const o = r(u, "root-component.");
|
|
843
|
-
return [...
|
|
824
|
+
return [...c, ...o];
|
|
844
825
|
}
|
|
845
|
-
function
|
|
846
|
-
return
|
|
826
|
+
function l(a) {
|
|
827
|
+
return a.binding && a.binding.path || a.id || "";
|
|
847
828
|
}
|
|
848
829
|
function m() {
|
|
849
830
|
return e && e.getRenderStates() || [];
|
|
850
831
|
}
|
|
851
|
-
return { getVariables:
|
|
832
|
+
return { getVariables: s, getControlName: l, getStateMachines: m };
|
|
852
833
|
}
|
|
853
|
-
class
|
|
834
|
+
class we {
|
|
854
835
|
constructor(t) {
|
|
855
|
-
|
|
836
|
+
S(this, "sessionVariables", [
|
|
856
837
|
{
|
|
857
838
|
key: "CurrentSysOrgName",
|
|
858
839
|
name: "当前组织Name",
|
|
@@ -889,7 +870,7 @@ class ye {
|
|
|
889
870
|
description: "当前登录的语言编号,例如简体中文返回'zh-CHS',英文返回'en',繁体中文'zh-CHT'"
|
|
890
871
|
}
|
|
891
872
|
]);
|
|
892
|
-
|
|
873
|
+
S(this, "expressionNames", {
|
|
893
874
|
compute: "计算表达式",
|
|
894
875
|
dependency: "依赖表达式",
|
|
895
876
|
validate: "验证表达式",
|
|
@@ -898,20 +879,20 @@ class ye {
|
|
|
898
879
|
readonly: "只读表达式",
|
|
899
880
|
required: "必填表达式"
|
|
900
881
|
});
|
|
901
|
-
|
|
902
|
-
convertFrom: (n, r,
|
|
903
|
-
const m =
|
|
882
|
+
S(this, "getExpressionConverter", (t, e) => ({
|
|
883
|
+
convertFrom: (n, r, s, l) => {
|
|
884
|
+
const m = s.getExpressionRuleValue(t, e || r);
|
|
904
885
|
return m && m.value || "";
|
|
905
886
|
},
|
|
906
|
-
convertTo: (n, r,
|
|
907
|
-
var
|
|
908
|
-
if (r === "dataPicking" && (
|
|
909
|
-
const u = `${
|
|
910
|
-
((
|
|
887
|
+
convertTo: (n, r, s, l, m) => {
|
|
888
|
+
var a;
|
|
889
|
+
if (r === "dataPicking" && (s != null && s.target)) {
|
|
890
|
+
const u = `${s.target}_dataPicking`;
|
|
891
|
+
((a = s.rules) == null ? void 0 : a.some(
|
|
911
892
|
(o) => o.id === u && o.value
|
|
912
893
|
)) ? n.dictPickingExpressionId = u : delete n.dictPickingExpressionId;
|
|
913
894
|
}
|
|
914
|
-
|
|
895
|
+
l.updateExpression(s);
|
|
915
896
|
}
|
|
916
897
|
}));
|
|
917
898
|
this.formSchemaService = t;
|
|
@@ -920,11 +901,11 @@ class ye {
|
|
|
920
901
|
const n = this.formSchemaService.getExpressions();
|
|
921
902
|
if (!n)
|
|
922
903
|
return "";
|
|
923
|
-
const r = n.find((
|
|
904
|
+
const r = n.find((l) => l.target === t);
|
|
924
905
|
if (!r)
|
|
925
906
|
return "";
|
|
926
|
-
const
|
|
927
|
-
return
|
|
907
|
+
const s = r.rules.find((l) => l.type === e);
|
|
908
|
+
return s || "";
|
|
928
909
|
}
|
|
929
910
|
// 获取上下文表单变量
|
|
930
911
|
getContextFormVariables() {
|
|
@@ -935,12 +916,12 @@ class ye {
|
|
|
935
916
|
if (!n || !n.states || n.states.length === 0)
|
|
936
917
|
return [];
|
|
937
918
|
const r = [];
|
|
938
|
-
return n.states.filter((
|
|
919
|
+
return n.states.filter((s) => s.category === "remote").forEach((s) => {
|
|
939
920
|
r.push({
|
|
940
|
-
key:
|
|
941
|
-
name:
|
|
942
|
-
description:
|
|
943
|
-
category:
|
|
921
|
+
key: s.code,
|
|
922
|
+
name: s.name,
|
|
923
|
+
description: s.name,
|
|
924
|
+
category: s.category
|
|
944
925
|
});
|
|
945
926
|
}), r;
|
|
946
927
|
}
|
|
@@ -957,11 +938,11 @@ class ye {
|
|
|
957
938
|
const n = [];
|
|
958
939
|
return t == null || t.forEach((r) => {
|
|
959
940
|
var m;
|
|
960
|
-
const
|
|
961
|
-
let
|
|
962
|
-
(m = r.type) != null && m.fields && (
|
|
963
|
-
data:
|
|
964
|
-
children:
|
|
941
|
+
const s = this.createTreeNode(r, e);
|
|
942
|
+
let l = [];
|
|
943
|
+
(m = r.type) != null && m.fields && (l = this.buildEntityFieldsTreeData(r.type.fields, [...e, r.label])), n.push({
|
|
944
|
+
data: s,
|
|
945
|
+
children: l,
|
|
965
946
|
expanded: !0
|
|
966
947
|
});
|
|
967
948
|
}), n;
|
|
@@ -969,13 +950,13 @@ class ye {
|
|
|
969
950
|
buildChildEntityTreeData(t = null, e) {
|
|
970
951
|
const n = [];
|
|
971
952
|
return t == null || t.forEach((r) => {
|
|
972
|
-
var
|
|
973
|
-
const
|
|
974
|
-
|
|
975
|
-
const
|
|
976
|
-
m != null && m.length && (
|
|
977
|
-
data:
|
|
978
|
-
children:
|
|
953
|
+
var a, u;
|
|
954
|
+
const s = this.createTreeNode(r, e);
|
|
955
|
+
s.type = "entity";
|
|
956
|
+
const l = this.buildEntityFieldsTreeData((a = r.type) == null ? void 0 : a.fields, [...e, r.label]), m = this.buildChildEntityTreeData((u = r.type) == null ? void 0 : u.entities, [...e, r.label]);
|
|
957
|
+
m != null && m.length && (l == null || l.push(...m)), n.push({
|
|
958
|
+
data: s,
|
|
959
|
+
children: l || [],
|
|
979
960
|
// 空值回退
|
|
980
961
|
expanded: !0
|
|
981
962
|
});
|
|
@@ -1015,86 +996,86 @@ class ye {
|
|
|
1015
996
|
};
|
|
1016
997
|
}
|
|
1017
998
|
onBeforeOpenExpression(t, e, n) {
|
|
1018
|
-
const r = n === "Field" ? t.binding.field : t.id,
|
|
1019
|
-
message: ["validate", "required", "dataPicking"].includes(e) &&
|
|
1020
|
-
...
|
|
999
|
+
const r = n === "Field" ? t.binding.field : t.id, s = this.getExpressionRule(r, e), l = this.getEntitiesAndVariables(), m = {
|
|
1000
|
+
message: ["validate", "required", "dataPicking"].includes(e) && s ? s.message : "",
|
|
1001
|
+
...l
|
|
1021
1002
|
};
|
|
1022
|
-
return
|
|
1003
|
+
return s.messageType != null && (m.messageType = s.messageType), m;
|
|
1023
1004
|
}
|
|
1024
1005
|
buildRule(t, e, n, r) {
|
|
1025
|
-
const { expression:
|
|
1006
|
+
const { expression: s, message: l, messageType: m } = e, a = {
|
|
1026
1007
|
id: `${t}_${n}`,
|
|
1027
1008
|
type: n,
|
|
1028
|
-
value:
|
|
1009
|
+
value: s
|
|
1029
1010
|
};
|
|
1030
|
-
return (n === "validate" || n === "dataPicking" || n === "required") && (
|
|
1011
|
+
return (n === "validate" || n === "dataPicking" || n === "required") && (a.message = l), n === "dataPicking" && (a.messageType = m), n === "validate" && r && (a.elementId = r), a;
|
|
1031
1012
|
}
|
|
1032
1013
|
getExpressionData() {
|
|
1033
1014
|
const { expressions: t } = this.formSchemaService.getFormSchema().module;
|
|
1034
1015
|
return t || [];
|
|
1035
1016
|
}
|
|
1036
1017
|
updateExpression(t, e, n, r) {
|
|
1037
|
-
const
|
|
1038
|
-
let
|
|
1039
|
-
const u = (
|
|
1040
|
-
if (
|
|
1041
|
-
const
|
|
1042
|
-
if (
|
|
1043
|
-
u(
|
|
1018
|
+
const s = e === "Field" ? t.binding.field : t.id, l = this.buildRule(s, n, r, t.type === "form-group" ? t.id : "");
|
|
1019
|
+
let a = this.getExpressionData().find((c) => c.targetType === e && c.target === s);
|
|
1020
|
+
const u = (c) => c.value.trim() === "";
|
|
1021
|
+
if (a) {
|
|
1022
|
+
const c = a.rules.find((o) => o.id === l.id);
|
|
1023
|
+
if (c)
|
|
1024
|
+
u(l) ? a.rules = a.rules.filter((o) => o.id !== l.id) : (Object.assign(c, l), r === "validate" && t.type === "form-group" && (c.elementId = t.id));
|
|
1044
1025
|
else {
|
|
1045
|
-
if (u(
|
|
1026
|
+
if (u(l))
|
|
1046
1027
|
return null;
|
|
1047
|
-
|
|
1028
|
+
a.rules = a.rules || [], a.rules.push(l);
|
|
1048
1029
|
}
|
|
1049
1030
|
} else {
|
|
1050
|
-
if (u(
|
|
1031
|
+
if (u(l))
|
|
1051
1032
|
return null;
|
|
1052
|
-
|
|
1053
|
-
target: `${
|
|
1054
|
-
rules: [
|
|
1033
|
+
a = {
|
|
1034
|
+
target: `${s}`,
|
|
1035
|
+
rules: [l],
|
|
1055
1036
|
targetType: e
|
|
1056
1037
|
};
|
|
1057
1038
|
}
|
|
1058
|
-
return
|
|
1039
|
+
return a;
|
|
1059
1040
|
}
|
|
1060
1041
|
getExpressionEditorOptions(t, e, n, r) {
|
|
1061
|
-
return n.reduce((
|
|
1062
|
-
var
|
|
1063
|
-
const m = e === "Field" ? (
|
|
1064
|
-
return l
|
|
1042
|
+
return n.reduce((s, l) => {
|
|
1043
|
+
var a, u;
|
|
1044
|
+
const m = e === "Field" ? (a = t == null ? void 0 : t.binding) == null ? void 0 : a.field : t.id;
|
|
1045
|
+
return s[l] = {
|
|
1065
1046
|
hide: e === "Field" ? !!((u = t == null ? void 0 : t.binding) != null && u.field) : !1,
|
|
1066
1047
|
description: "",
|
|
1067
|
-
title: this.expressionNames[
|
|
1048
|
+
title: this.expressionNames[l],
|
|
1068
1049
|
type: "string",
|
|
1069
1050
|
$converter: this.getExpressionConverter(m),
|
|
1070
1051
|
refreshPanelAfterChanged: !0,
|
|
1071
1052
|
editor: {
|
|
1072
1053
|
type: "expression-editor",
|
|
1073
1054
|
singleExpand: !1,
|
|
1074
|
-
dialogTitle: `${this.expressionNames[
|
|
1075
|
-
showMessage:
|
|
1076
|
-
showMessageType:
|
|
1077
|
-
beforeOpen: () => this.onBeforeOpenExpression(t,
|
|
1078
|
-
onSubmitModal: (
|
|
1079
|
-
const o = this.updateExpression(t, e,
|
|
1055
|
+
dialogTitle: `${this.expressionNames[l]}编辑器`,
|
|
1056
|
+
showMessage: l === "validate" || l === "dataPicking" || l === "required",
|
|
1057
|
+
showMessageType: l === "dataPicking",
|
|
1058
|
+
beforeOpen: () => this.onBeforeOpenExpression(t, l, e),
|
|
1059
|
+
onSubmitModal: (c) => {
|
|
1060
|
+
const o = this.updateExpression(t, e, c, l);
|
|
1080
1061
|
if (r) {
|
|
1081
|
-
const d = this.buildRule(m,
|
|
1062
|
+
const d = this.buildRule(m, c, l);
|
|
1082
1063
|
r(d);
|
|
1083
1064
|
}
|
|
1084
1065
|
return o;
|
|
1085
1066
|
}
|
|
1086
1067
|
}
|
|
1087
|
-
},
|
|
1068
|
+
}, s;
|
|
1088
1069
|
}, {});
|
|
1089
1070
|
}
|
|
1090
1071
|
getExpressionInfo(t, e, n) {
|
|
1091
|
-
const r = e === "Field" ? t.binding.field : t.id,
|
|
1092
|
-
value:
|
|
1072
|
+
const r = e === "Field" ? t.binding.field : t.id, s = this.getExpressionRule(r, n), l = {
|
|
1073
|
+
value: s && s.value,
|
|
1093
1074
|
targetId: r,
|
|
1094
1075
|
targetType: e,
|
|
1095
1076
|
expressionType: n
|
|
1096
1077
|
};
|
|
1097
|
-
return
|
|
1078
|
+
return s && s.message && (l.message = s.message), l;
|
|
1098
1079
|
}
|
|
1099
1080
|
getExpressionConfig(t, e, n = ["compute", "dependency", "validate"], r) {
|
|
1100
1081
|
return {
|
|
@@ -1119,19 +1100,19 @@ class ye {
|
|
|
1119
1100
|
}
|
|
1120
1101
|
class Et {
|
|
1121
1102
|
constructor(t, e) {
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1103
|
+
S(this, "componentId");
|
|
1104
|
+
S(this, "viewModelId");
|
|
1105
|
+
S(this, "eventsEditorUtils");
|
|
1106
|
+
S(this, "formSchemaUtils");
|
|
1107
|
+
S(this, "formMetadataConverter");
|
|
1108
|
+
S(this, "designViewModelUtils");
|
|
1109
|
+
S(this, "designViewModelField");
|
|
1110
|
+
S(this, "controlCreatorUtils");
|
|
1111
|
+
S(this, "designerHostService");
|
|
1112
|
+
S(this, "designerContext");
|
|
1113
|
+
S(this, "schemaService", null);
|
|
1114
|
+
S(this, "metadataService", null);
|
|
1115
|
+
S(this, "propertyConfig", {
|
|
1135
1116
|
type: "object",
|
|
1136
1117
|
categories: {}
|
|
1137
1118
|
});
|
|
@@ -1152,7 +1133,7 @@ class Et {
|
|
|
1152
1133
|
if (e) {
|
|
1153
1134
|
if (!this.designViewModelField) {
|
|
1154
1135
|
const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
1155
|
-
this.designViewModelField = r.fields.find((
|
|
1136
|
+
this.designViewModelField = r.fields.find((s) => s.id === e);
|
|
1156
1137
|
}
|
|
1157
1138
|
t.updateOn = (n = this.designViewModelField) == null ? void 0 : n.updateOn;
|
|
1158
1139
|
}
|
|
@@ -1178,7 +1159,7 @@ class Et {
|
|
|
1178
1159
|
valueField: "value",
|
|
1179
1160
|
idField: "value",
|
|
1180
1161
|
editable: !1,
|
|
1181
|
-
data: [{ value: t.type, name:
|
|
1162
|
+
data: [{ value: t.type, name: v[t.type] && v[t.type].name }]
|
|
1182
1163
|
}
|
|
1183
1164
|
}
|
|
1184
1165
|
}
|
|
@@ -1188,7 +1169,7 @@ class Et {
|
|
|
1188
1169
|
const r = {
|
|
1189
1170
|
title: "外观",
|
|
1190
1171
|
description: "Appearance"
|
|
1191
|
-
},
|
|
1172
|
+
}, s = {
|
|
1192
1173
|
class: {
|
|
1193
1174
|
title: "class样式",
|
|
1194
1175
|
type: "string",
|
|
@@ -1204,21 +1185,21 @@ class Et {
|
|
|
1204
1185
|
parentPropertyID: "appearance"
|
|
1205
1186
|
}
|
|
1206
1187
|
};
|
|
1207
|
-
for (const
|
|
1208
|
-
l
|
|
1188
|
+
for (const l in e)
|
|
1189
|
+
s[l] = Object.assign(s[l] || {}, e[l]);
|
|
1209
1190
|
return {
|
|
1210
1191
|
...r,
|
|
1211
|
-
properties: { ...
|
|
1212
|
-
setPropertyRelates(
|
|
1213
|
-
if (
|
|
1214
|
-
switch (
|
|
1192
|
+
properties: { ...s },
|
|
1193
|
+
setPropertyRelates(l, m) {
|
|
1194
|
+
if (l) {
|
|
1195
|
+
switch (l && l.propertyID) {
|
|
1215
1196
|
case "class":
|
|
1216
1197
|
case "style": {
|
|
1217
|
-
|
|
1198
|
+
Z.value++;
|
|
1218
1199
|
break;
|
|
1219
1200
|
}
|
|
1220
1201
|
}
|
|
1221
|
-
n && n(
|
|
1202
|
+
n && n(l, t, m);
|
|
1222
1203
|
}
|
|
1223
1204
|
}
|
|
1224
1205
|
};
|
|
@@ -1233,8 +1214,8 @@ class Et {
|
|
|
1233
1214
|
* @param expressionType 指定表达式类型,存在属性和表达式类型不一致的情况
|
|
1234
1215
|
* @returns
|
|
1235
1216
|
*/
|
|
1236
|
-
getPropertyEditorParams(t, e = [], n = "visible", r = {},
|
|
1237
|
-
const { getVariables: m, getControlName:
|
|
1217
|
+
getPropertyEditorParams(t, e = [], n = "visible", r = {}, s = {}, l = "") {
|
|
1218
|
+
const { getVariables: m, getControlName: a, getStateMachines: u } = It(this.designerHostService), c = this.getRealTargetType(t), o = e && e.length > 0 ? e : ["Const", "Variable", "StateMachine", "Expression"], d = {
|
|
1238
1219
|
type: "property-editor",
|
|
1239
1220
|
propertyTypes: o
|
|
1240
1221
|
};
|
|
@@ -1247,30 +1228,30 @@ class Et {
|
|
|
1247
1228
|
}, r);
|
|
1248
1229
|
break;
|
|
1249
1230
|
case "Expression":
|
|
1250
|
-
d.expressionConfig = this.getExpressionOptions(t,
|
|
1231
|
+
d.expressionConfig = this.getExpressionOptions(t, c, l || n);
|
|
1251
1232
|
break;
|
|
1252
1233
|
case "StateMachine":
|
|
1253
1234
|
d.stateMachines = u();
|
|
1254
1235
|
break;
|
|
1255
1236
|
case "Variable":
|
|
1256
1237
|
Object.assign(d, {
|
|
1257
|
-
controlName:
|
|
1238
|
+
controlName: a(t),
|
|
1258
1239
|
newVariablePrefix: "is",
|
|
1259
1240
|
newVariableType: "Boolean",
|
|
1260
1241
|
variables: m(this.viewModelId),
|
|
1261
1242
|
parentComponentId: this.componentId === "root-component" ? "" : "root-component",
|
|
1262
|
-
onBeforeOpenVariables: (
|
|
1263
|
-
|
|
1243
|
+
onBeforeOpenVariables: (f) => {
|
|
1244
|
+
f.value = m(this.viewModelId);
|
|
1264
1245
|
}
|
|
1265
|
-
},
|
|
1246
|
+
}, s), this.designerContext.designerMode === "PC_RTC" && (d.newVariablePrefix = "ext_" + d.newVariablePrefix);
|
|
1266
1247
|
break;
|
|
1267
1248
|
}
|
|
1268
1249
|
}), d;
|
|
1269
1250
|
}
|
|
1270
1251
|
getVisibleProperty(t, e = "") {
|
|
1271
|
-
var
|
|
1252
|
+
var s;
|
|
1272
1253
|
let n = ["Const", "Variable", "StateMachine", "Expression"];
|
|
1273
|
-
return e === "gridFieldEditor" ? n = ["Const", "Expression"] : e === "form-group" && !((
|
|
1254
|
+
return e === "gridFieldEditor" ? n = ["Const", "Expression"] : e === "form-group" && !((s = t.binding) != null && s.field) && (n = ["Const", "Variable", "StateMachine"]), {
|
|
1274
1255
|
visible: {
|
|
1275
1256
|
title: "是否可见",
|
|
1276
1257
|
type: "boolean",
|
|
@@ -1286,26 +1267,26 @@ class Et {
|
|
|
1286
1267
|
* @returns
|
|
1287
1268
|
*/
|
|
1288
1269
|
getBehaviorConfig(t, e = "", n = {}, r) {
|
|
1289
|
-
const
|
|
1270
|
+
const s = {
|
|
1290
1271
|
title: "行为",
|
|
1291
1272
|
description: ""
|
|
1292
|
-
},
|
|
1293
|
-
for (const
|
|
1294
|
-
|
|
1273
|
+
}, l = this.getVisibleProperty(t, e);
|
|
1274
|
+
for (const a in n)
|
|
1275
|
+
l[a] = Object.assign(l[a] || {}, n[a]);
|
|
1295
1276
|
const m = this;
|
|
1296
1277
|
return {
|
|
1297
|
-
...
|
|
1298
|
-
properties: { ...
|
|
1299
|
-
setPropertyRelates(
|
|
1300
|
-
if (
|
|
1301
|
-
switch (
|
|
1278
|
+
...s,
|
|
1279
|
+
properties: { ...l },
|
|
1280
|
+
setPropertyRelates(a, u) {
|
|
1281
|
+
if (a) {
|
|
1282
|
+
switch (a.propertyID) {
|
|
1302
1283
|
case "disabled":
|
|
1303
1284
|
case "readonly":
|
|
1304
1285
|
case "visible":
|
|
1305
|
-
m.afterMutilEditorChanged(t,
|
|
1286
|
+
m.afterMutilEditorChanged(t, a);
|
|
1306
1287
|
break;
|
|
1307
1288
|
}
|
|
1308
|
-
r && r(
|
|
1289
|
+
r && r(a, u);
|
|
1309
1290
|
}
|
|
1310
1291
|
}
|
|
1311
1292
|
};
|
|
@@ -1328,8 +1309,8 @@ class Et {
|
|
|
1328
1309
|
const n = e && e.parent && e.parent.schema;
|
|
1329
1310
|
if (!n)
|
|
1330
1311
|
return;
|
|
1331
|
-
const r = n.contents.findIndex((
|
|
1332
|
-
n.contents.splice(r, 1), n.contents.splice(r, 0,
|
|
1312
|
+
const r = n.contents.findIndex((l) => l.id === t), s = H(n.contents[r]);
|
|
1313
|
+
n.contents.splice(r, 1), n.contents.splice(r, 0, s), ze();
|
|
1333
1314
|
}
|
|
1334
1315
|
/**
|
|
1335
1316
|
* 属性编辑器,在编辑过程中会新增变量,此处需要将新增的变量追加到ViewModel中
|
|
@@ -1341,7 +1322,7 @@ class Et {
|
|
|
1341
1322
|
const n = t.propertyValue;
|
|
1342
1323
|
if (!(n && typeof n == "object") || !(n.type === "Variable" && n.isNewVariable))
|
|
1343
1324
|
return;
|
|
1344
|
-
const
|
|
1325
|
+
const l = {
|
|
1345
1326
|
id: n.field,
|
|
1346
1327
|
category: "locale",
|
|
1347
1328
|
code: n.fullPath,
|
|
@@ -1349,7 +1330,7 @@ class Et {
|
|
|
1349
1330
|
type: n.newVariableType || "String",
|
|
1350
1331
|
isRtcVariable: this.designerContext.designerMode === "PC_RTC" ? !0 : void 0
|
|
1351
1332
|
};
|
|
1352
|
-
delete n.newVariableType, delete n.isNewVariable, this.formSchemaUtils.getVariableByCode(
|
|
1333
|
+
delete n.newVariableType, delete n.isNewVariable, this.formSchemaUtils.getVariableByCode(l.code) || this.formSchemaUtils.getViewModelById("root-viewmodel").states.push(l);
|
|
1353
1334
|
}
|
|
1354
1335
|
/**
|
|
1355
1336
|
* 更新表达式到expressions节点
|
|
@@ -1359,17 +1340,17 @@ class Et {
|
|
|
1359
1340
|
const e = t.propertyValue;
|
|
1360
1341
|
if (!((e && e.type) === "Expression" && e.expressionInfo))
|
|
1361
1342
|
return;
|
|
1362
|
-
const { expressionId:
|
|
1343
|
+
const { expressionId: s, expressionInfo: l } = e, { targetId: m, targetType: a, expressionType: u, value: c, message: o } = l, d = this.formSchemaUtils.getModule();
|
|
1363
1344
|
d.expressions = d.expressions || [];
|
|
1364
1345
|
const { expressions: g } = d;
|
|
1365
|
-
let
|
|
1366
|
-
|
|
1367
|
-
const p =
|
|
1346
|
+
let f = g.find((h) => h.target === m);
|
|
1347
|
+
f || (f = { target: m, rules: [], targetType: a }, g.push(f));
|
|
1348
|
+
const p = f.rules.find((h) => h.type === u);
|
|
1368
1349
|
if (p)
|
|
1369
|
-
p.value =
|
|
1350
|
+
p.value = c, p.message = o;
|
|
1370
1351
|
else {
|
|
1371
|
-
const
|
|
1372
|
-
|
|
1352
|
+
const h = { id: s, type: u, value: c, message: o };
|
|
1353
|
+
f.rules.push(h);
|
|
1373
1354
|
}
|
|
1374
1355
|
delete e.expressionInfo;
|
|
1375
1356
|
}
|
|
@@ -1383,14 +1364,14 @@ class Et {
|
|
|
1383
1364
|
const n = t.propertyValue;
|
|
1384
1365
|
if (n && n.type === "Expression")
|
|
1385
1366
|
return;
|
|
1386
|
-
const
|
|
1387
|
-
!
|
|
1367
|
+
const s = t.propertyID, l = this.formSchemaUtils.getExpressions(), m = e.binding ? e.binding.field : e.id, a = l.find((u) => u.target === m);
|
|
1368
|
+
!a || !a.rules || (a.rules = a.rules.filter((u) => u.type !== s));
|
|
1388
1369
|
}
|
|
1389
1370
|
getExpressionOptions(t, e, n) {
|
|
1390
|
-
return new
|
|
1371
|
+
return new we(this.formSchemaUtils).getExpressionOptions(t, e, n);
|
|
1391
1372
|
}
|
|
1392
1373
|
getRealTargetType(t) {
|
|
1393
|
-
return ["response-toolbar-item", "tab-toolbar-item", "section-toolbar-item"].indexOf(t.type) > -1 ? "Button" : t.binding && t.binding.field ? "Field" : "Container";
|
|
1374
|
+
return ["response-toolbar-item", "tab-toolbar-item", "section-toolbar-item", "drawer-toolbar-item"].indexOf(t.type) > -1 ? "Button" : t.binding && t.binding.field ? "Field" : "Container";
|
|
1394
1375
|
}
|
|
1395
1376
|
createBaseEventProperty(t) {
|
|
1396
1377
|
const e = {};
|
|
@@ -1406,17 +1387,17 @@ class Et {
|
|
|
1406
1387
|
}, e;
|
|
1407
1388
|
}
|
|
1408
1389
|
}
|
|
1409
|
-
const
|
|
1390
|
+
const z = class z {
|
|
1410
1391
|
/**
|
|
1411
1392
|
* 根据绑定字段类型获取可用的输入类控件
|
|
1412
1393
|
*/
|
|
1413
1394
|
static getEditorTypesByMDataType(t, e = !1, n = "") {
|
|
1414
1395
|
if (e)
|
|
1415
|
-
return [{ key:
|
|
1416
|
-
let r =
|
|
1396
|
+
return [{ key: v["language-textbox"].type, value: v["language-textbox"].name }];
|
|
1397
|
+
let r = z.fieldControlTypeMapping[t];
|
|
1417
1398
|
if (n === "data-grid-column" && (r != null && r.length)) {
|
|
1418
|
-
const
|
|
1419
|
-
r = r.filter((
|
|
1399
|
+
const s = [v["check-group"].type, v["radio-group"].type, v.image.type, v["rich-text-editor"].type];
|
|
1400
|
+
r = r.filter((l) => !s.includes(l.key));
|
|
1420
1401
|
}
|
|
1421
1402
|
return r;
|
|
1422
1403
|
}
|
|
@@ -1425,8 +1406,8 @@ const q = class q {
|
|
|
1425
1406
|
*/
|
|
1426
1407
|
static getAllInputTypes() {
|
|
1427
1408
|
const t = [];
|
|
1428
|
-
for (const e in
|
|
1429
|
-
|
|
1409
|
+
for (const e in z.fieldControlTypeMapping)
|
|
1410
|
+
z.fieldControlTypeMapping[e].forEach((n) => {
|
|
1430
1411
|
t.find((r) => r.key === n.key && r.value === n.value) || t.push({ key: n.key, value: n.value });
|
|
1431
1412
|
});
|
|
1432
1413
|
return t;
|
|
@@ -1436,189 +1417,189 @@ const q = class q {
|
|
|
1436
1417
|
* @param control 控件元数据
|
|
1437
1418
|
*/
|
|
1438
1419
|
static mappingDomPropAndSchemaProp(t, e) {
|
|
1439
|
-
var
|
|
1440
|
-
const n = (
|
|
1441
|
-
return (t.type ===
|
|
1420
|
+
var s;
|
|
1421
|
+
const n = (s = t.editor) == null ? void 0 : s.type, r = [];
|
|
1422
|
+
return (t.type === v["data-grid-column"].type || t.type === v["tree-grid-column"].type) && e && e.categoryId && e.categoryId.indexOf("gridFieldEditor") < 0 && r.push({ domField: "title", schemaField: "name" }), r.push({ domField: "label", schemaField: "name" }), r.push({ domField: "editor.required", schemaField: "require" }), r.push({ domField: "editor.readonly", schemaField: "readonly" }), (n === v["input-group"].type || n === v.textarea.type || n === v["number-spinner"].type) && r.push({ domField: "editor.maxLength", schemaField: "type.length" }), n === v["number-spinner"].type && r.push({ domField: "editor.precision", schemaField: "type.precision" }), (t.type === v["data-grid-column"].type || t.type === v["tree-grid-column"].type) && r.push({ domField: "formatter.precision", schemaField: "type.precision" }), (n === v["combo-list"].type || n === v["radio-group"].type) && r.push({ domField: "editor.data", schemaField: "type.enumValues" }), (t.type === v["data-grid-column"].type || t.type === v["tree-grid-column"].type) && r.push({ domField: "formatter.data", schemaField: "type.enumValues" }), n === v["date-picker"].type && (r.push({ domField: "editor.displayFormat", schemaField: "editor.format" }), r.push({ domField: "editor.fieldType", schemaField: "type.name" })), n === v["number-spinner"].type && (r.push({ domField: "editor.max", schemaField: "editor.maxValue" }), r.push({ domField: "editor.min", schemaField: "editor.minValue" })), n === v.lookup.type && (r.push({ domField: "editor.dataSource", schemaField: "editor.dataSource" }), r.push({ domField: "editor.valueField", schemaField: "editor.valueField" }), r.push({ domField: "editor.textField", schemaField: "editor.textField" }), r.push({ domField: "editor.displayType", schemaField: "editor.displayType" }), r.push({ domField: "editor.mapFields", schemaField: "editor.mapFields" }), r.push({ domField: "editor.helpId", schemaField: "editor.helpId" })), r.push({ domField: "path", schemaField: "bindingPath" }), r.push({ domField: "binding.path", schemaField: "bindingField" }), r.push({ domField: "binding.fullPath", schemaField: "path" }), (t.type === v["data-grid-column"].type || t.type === v["tree-grid-column"].type) && r.push({ domField: "field", schemaField: "bindingPath" }), r;
|
|
1442
1423
|
}
|
|
1443
1424
|
};
|
|
1444
1425
|
/**
|
|
1445
1426
|
* <字段类型,可配置的控件类型列表>的映射
|
|
1446
1427
|
*/
|
|
1447
|
-
|
|
1428
|
+
S(z, "fieldControlTypeMapping", {
|
|
1448
1429
|
String: [
|
|
1449
|
-
{ key:
|
|
1450
|
-
{ key:
|
|
1451
|
-
{ key:
|
|
1452
|
-
{ key:
|
|
1453
|
-
{ key:
|
|
1454
|
-
{ key:
|
|
1455
|
-
{ key:
|
|
1456
|
-
{ key:
|
|
1457
|
-
{ key:
|
|
1458
|
-
{ key:
|
|
1459
|
-
{ key:
|
|
1430
|
+
{ key: v["input-group"].type, value: v["input-group"].name },
|
|
1431
|
+
{ key: v.lookup.type, value: v.lookup.name },
|
|
1432
|
+
{ key: v.image.type, value: v.image.name },
|
|
1433
|
+
{ key: v["date-picker"].type, value: v["date-picker"].name },
|
|
1434
|
+
{ key: v.switch.type, value: v.switch.name },
|
|
1435
|
+
{ key: v["check-box"].type, value: v["check-box"].name },
|
|
1436
|
+
{ key: v["check-group"].type, value: v["check-group"].name },
|
|
1437
|
+
{ key: v["radio-group"].type, value: v["radio-group"].name },
|
|
1438
|
+
{ key: v["combo-list"].type, value: v["combo-list"].name },
|
|
1439
|
+
{ key: v.textarea.type, value: v.textarea.name },
|
|
1440
|
+
{ key: v["time-picker"].type, value: v["time-picker"].name }
|
|
1460
1441
|
],
|
|
1461
1442
|
Text: [
|
|
1462
|
-
{ key:
|
|
1463
|
-
{ key:
|
|
1464
|
-
{ key:
|
|
1465
|
-
{ key:
|
|
1443
|
+
{ key: v.textarea.type, value: v.textarea.name },
|
|
1444
|
+
{ key: v.lookup.type, value: v.lookup.name },
|
|
1445
|
+
{ key: v.image.type, value: v.image.name },
|
|
1446
|
+
{ key: v["rich-text-editor"].type, value: v["rich-text-editor"].name }
|
|
1466
1447
|
],
|
|
1467
1448
|
Decimal: [
|
|
1468
|
-
{ key:
|
|
1449
|
+
{ key: v["number-spinner"].type, value: v["number-spinner"].name }
|
|
1469
1450
|
],
|
|
1470
1451
|
Integer: [
|
|
1471
|
-
{ key:
|
|
1452
|
+
{ key: v["number-spinner"].type, value: v["number-spinner"].name }
|
|
1472
1453
|
],
|
|
1473
1454
|
Number: [
|
|
1474
|
-
{ key:
|
|
1475
|
-
{ key:
|
|
1476
|
-
{ key:
|
|
1455
|
+
{ key: v["number-spinner"].type, value: v["number-spinner"].name },
|
|
1456
|
+
{ key: v.switch.type, value: v.switch.name },
|
|
1457
|
+
{ key: v["check-box"].type, value: v["check-box"].name }
|
|
1477
1458
|
],
|
|
1478
1459
|
BigNumber: [
|
|
1479
|
-
{ key:
|
|
1460
|
+
{ key: v["number-spinner"].type, value: v["number-spinner"].name }
|
|
1480
1461
|
],
|
|
1481
1462
|
Date: [
|
|
1482
|
-
{ key:
|
|
1463
|
+
{ key: v["date-picker"].type, value: v["date-picker"].name }
|
|
1483
1464
|
],
|
|
1484
1465
|
DateTime: [
|
|
1485
|
-
{ key:
|
|
1466
|
+
{ key: v["date-picker"].type, value: v["date-picker"].name }
|
|
1486
1467
|
],
|
|
1487
1468
|
Boolean: [
|
|
1488
|
-
{ key:
|
|
1489
|
-
{ key:
|
|
1469
|
+
{ key: v.switch.type, value: v.switch.name },
|
|
1470
|
+
{ key: v["check-box"].type, value: v["check-box"].name }
|
|
1490
1471
|
],
|
|
1491
1472
|
Enum: [
|
|
1492
|
-
{ key:
|
|
1493
|
-
{ key:
|
|
1473
|
+
{ key: v["combo-list"].type, value: v["combo-list"].name },
|
|
1474
|
+
{ key: v["radio-group"].type, value: v["radio-group"].name }
|
|
1494
1475
|
],
|
|
1495
1476
|
Object: [
|
|
1496
|
-
{ key:
|
|
1497
|
-
{ key:
|
|
1498
|
-
{ key:
|
|
1477
|
+
{ key: v.lookup.type, value: v.lookup.name },
|
|
1478
|
+
{ key: v["combo-list"].type, value: v["combo-list"].name },
|
|
1479
|
+
{ key: v["radio-group"].type, value: v["radio-group"].name }
|
|
1499
1480
|
]
|
|
1500
1481
|
});
|
|
1501
|
-
let
|
|
1502
|
-
var
|
|
1503
|
-
class
|
|
1482
|
+
let Y = z;
|
|
1483
|
+
var J = /* @__PURE__ */ ((i) => (i.Form = "Form", i.Variable = "Variable", i))(J || {});
|
|
1484
|
+
class xt {
|
|
1504
1485
|
constructor() {
|
|
1505
1486
|
/** 控件标题 */
|
|
1506
|
-
|
|
1487
|
+
S(this, "label", "");
|
|
1507
1488
|
/** 控件id */
|
|
1508
|
-
|
|
1489
|
+
S(this, "id", "");
|
|
1509
1490
|
/** 每个控件占用的栅格数 */
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1491
|
+
S(this, "columnInSM", 12);
|
|
1492
|
+
S(this, "columnInMD", 6);
|
|
1493
|
+
S(this, "columnInLG", 3);
|
|
1494
|
+
S(this, "columnInEL", 2);
|
|
1514
1495
|
/** 每个控件占用的列数 */
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1496
|
+
S(this, "displayWidthInSM", 1);
|
|
1497
|
+
S(this, "displayWidthInMD", 1);
|
|
1498
|
+
S(this, "displayWidthInLG", 1);
|
|
1499
|
+
S(this, "displayWidthInEL", 1);
|
|
1519
1500
|
/** 编辑器内部默认显示的屏幕大小-----可以去掉 */
|
|
1520
|
-
|
|
1501
|
+
S(this, "displayColumnCountAtBreakPoint", "md");
|
|
1521
1502
|
/** 控件所在行,传0即可-----编辑器内部使用 */
|
|
1522
|
-
|
|
1503
|
+
S(this, "tagRow", 0);
|
|
1523
1504
|
/** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
|
|
1524
|
-
|
|
1505
|
+
S(this, "showTopBorder", 0);
|
|
1525
1506
|
/** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
|
|
1526
|
-
|
|
1507
|
+
S(this, "group", 1);
|
|
1527
1508
|
/** 控件是否符合标准的class配置(设计器用的) */
|
|
1528
|
-
|
|
1509
|
+
S(this, "isSupportedClass", !0);
|
|
1529
1510
|
/** 控件所在分组id(设计器用的) */
|
|
1530
|
-
|
|
1511
|
+
S(this, "fieldSetId", "");
|
|
1531
1512
|
}
|
|
1532
1513
|
}
|
|
1533
|
-
function
|
|
1514
|
+
function St(i) {
|
|
1534
1515
|
let t, e;
|
|
1535
1516
|
const n = /* @__PURE__ */ new Map();
|
|
1536
1517
|
let r = [];
|
|
1537
|
-
function
|
|
1538
|
-
const g =
|
|
1518
|
+
function s(c, o) {
|
|
1519
|
+
const g = c.split(" ").filter((C) => C.startsWith("col-"));
|
|
1539
1520
|
if (g.length === 0) {
|
|
1540
1521
|
o.isSupportedClass = !1;
|
|
1541
1522
|
return;
|
|
1542
1523
|
}
|
|
1543
|
-
let
|
|
1544
|
-
|
|
1524
|
+
let f = g.find((C) => /^col-([1-9]|10|11|12)$/.test(C)), p = g.find((C) => /^col-md-([1-9]|10|11|12)$/.test(C)), h = g.find((C) => /^col-xl-([1-9]|10|11|12)$/.test(C)), y = g.find((C) => /^col-el-([1-9]|10|11|12)$/.test(C));
|
|
1525
|
+
f = f || "col-12", o.columnInSM = parseInt(f.replace("col-", ""), 10), o.displayWidthInSM = o.columnInSM / 12, o.displayWidthInSM !== 1 && (o.isSupportedClass = !1), p = p || "col-md-" + o.columnInSM, o.columnInMD = parseInt(p.replace("col-md-", ""), 10), o.displayWidthInMD = o.columnInMD / 6, [1, 2].includes(o.displayWidthInMD) || (o.isSupportedClass = !1), h = h || "col-xl-" + o.columnInMD, o.columnInLG = parseInt(h.replace("col-xl-", ""), 10), o.displayWidthInLG = o.columnInLG / 3, [1, 2, 3, 4].includes(o.displayWidthInLG) || (o.isSupportedClass = !1), y = y || "col-el-" + o.columnInLG, o.columnInEL = parseInt(y.replace("col-el-", ""), 10), o.displayWidthInEL = o.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(o.displayWidthInEL) || (o.isSupportedClass = !1);
|
|
1545
1526
|
}
|
|
1546
|
-
function
|
|
1547
|
-
let
|
|
1548
|
-
|
|
1527
|
+
function l(c, o, d, g = !1) {
|
|
1528
|
+
let f = !1;
|
|
1529
|
+
c.contents.forEach((p) => {
|
|
1549
1530
|
if (p.type === "fieldset") {
|
|
1550
|
-
d += 1,
|
|
1531
|
+
d += 1, l(p, o, d, !0), f = !0;
|
|
1551
1532
|
return;
|
|
1552
1533
|
}
|
|
1553
|
-
|
|
1554
|
-
const
|
|
1555
|
-
|
|
1534
|
+
f && (d += 1, f = !1);
|
|
1535
|
+
const h = p.appearance && p.appearance.class, y = new xt();
|
|
1536
|
+
h ? s(h, y) : y.isSupportedClass = !1, y.label = p.label || p.id, y.id = p.id, y.group = d, g && (y.fieldSetId = c.id), e === p.id && (t = d), n.set(p.id, p), o.push(y);
|
|
1556
1537
|
});
|
|
1557
1538
|
}
|
|
1558
|
-
function m(
|
|
1559
|
-
const o = i.getComponentById(
|
|
1539
|
+
function m(c) {
|
|
1540
|
+
const o = i.getComponentById(c);
|
|
1560
1541
|
if (!o || !o.componentType || !o.componentType.startsWith("form"))
|
|
1561
1542
|
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
1562
|
-
const d = i.selectNode(o, (g) => g.type ===
|
|
1543
|
+
const d = i.selectNode(o, (g) => g.type === v["response-form"].type);
|
|
1563
1544
|
return !d || !d.contents || d.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: d };
|
|
1564
1545
|
}
|
|
1565
|
-
function c
|
|
1566
|
-
o = o ||
|
|
1567
|
-
const { result: d, message: g, formNode:
|
|
1546
|
+
function a(c, o) {
|
|
1547
|
+
o = o || c.id;
|
|
1548
|
+
const { result: d, message: g, formNode: f } = m(o);
|
|
1568
1549
|
if (!d)
|
|
1569
1550
|
return { result: d, message: g };
|
|
1570
|
-
e =
|
|
1571
|
-
const p =
|
|
1572
|
-
|
|
1573
|
-
const
|
|
1551
|
+
e = c.id, r = [], n.clear();
|
|
1552
|
+
const p = f.contents[0].type === v.fieldset.type ? 0 : 1;
|
|
1553
|
+
l(f, r, p);
|
|
1554
|
+
const h = r.find((C) => !C.isSupportedClass);
|
|
1574
1555
|
return {
|
|
1575
1556
|
defaultState: {
|
|
1576
1557
|
defaultGroupNumber: t || 1,
|
|
1577
|
-
model:
|
|
1558
|
+
model: h ? "customize" : "standard"
|
|
1578
1559
|
},
|
|
1579
1560
|
importData: r
|
|
1580
1561
|
};
|
|
1581
1562
|
}
|
|
1582
|
-
function u(
|
|
1563
|
+
function u(c, o) {
|
|
1583
1564
|
o = o;
|
|
1584
1565
|
const { result: d, formNode: g } = m(o);
|
|
1585
1566
|
if (!d)
|
|
1586
1567
|
return "";
|
|
1587
|
-
const
|
|
1588
|
-
return
|
|
1589
|
-
var
|
|
1590
|
-
const
|
|
1568
|
+
const f = [];
|
|
1569
|
+
return c.forEach((p) => {
|
|
1570
|
+
var C;
|
|
1571
|
+
const h = n.get(p.id), y = h.appearance && h.appearance.class;
|
|
1591
1572
|
if (y) {
|
|
1592
|
-
const
|
|
1593
|
-
|
|
1573
|
+
const B = y.split(" ").filter((F) => !F.startsWith("col-")), M = "col-" + p.columnInSM, k = "col-md-" + p.columnInMD, A = "col-xl-" + p.columnInLG, O = "col-el-" + p.columnInEL, T = [M, k, A, O].concat(B);
|
|
1574
|
+
h.appearance.class = T.join(" ");
|
|
1594
1575
|
}
|
|
1595
1576
|
if (p.fieldSetId) {
|
|
1596
|
-
const
|
|
1597
|
-
|
|
1577
|
+
const V = g.contents.find((M) => M.id === p.fieldSetId), B = f.find((M) => M.id === p.fieldSetId);
|
|
1578
|
+
B ? (C = B.contents) == null || C.push(h) : (f.push(V), V.contents = [h]);
|
|
1598
1579
|
} else
|
|
1599
|
-
|
|
1600
|
-
}), g.contents =
|
|
1580
|
+
f.push(h);
|
|
1581
|
+
}), g.contents = f, g.id;
|
|
1601
1582
|
}
|
|
1602
1583
|
return {
|
|
1603
1584
|
checkCanFindFormNode: m,
|
|
1604
|
-
checkCanOpenLayoutEditor:
|
|
1585
|
+
checkCanOpenLayoutEditor: a,
|
|
1605
1586
|
changeFormControlsByResponseLayoutConfig: u,
|
|
1606
|
-
getResonseFormLayoutConfig:
|
|
1587
|
+
getResonseFormLayoutConfig: l
|
|
1607
1588
|
};
|
|
1608
1589
|
}
|
|
1609
1590
|
class Mt extends Et {
|
|
1610
1591
|
constructor(e, n) {
|
|
1611
1592
|
super(e, n);
|
|
1612
|
-
|
|
1593
|
+
S(this, "responseLayoutEditorFunction");
|
|
1613
1594
|
/** 控件绑定的变量 */
|
|
1614
|
-
|
|
1615
|
-
|
|
1595
|
+
S(this, "bindingVarible");
|
|
1596
|
+
S(this, "numberEditorOptions", {
|
|
1616
1597
|
type: "number-spinner",
|
|
1617
1598
|
useThousands: !1,
|
|
1618
1599
|
keyboard: !1,
|
|
1619
1600
|
showButton: !1
|
|
1620
1601
|
});
|
|
1621
|
-
this.responseLayoutEditorFunction =
|
|
1602
|
+
this.responseLayoutEditorFunction = St(this.formSchemaUtils);
|
|
1622
1603
|
}
|
|
1623
1604
|
getCommonPropertyConfig(e, n, r = "Card") {
|
|
1624
1605
|
this.propertyConfig.categories.basic = this.getBasicProperties(e, n, r), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, n), this.propertyConfig.categories.behavior = this.getBehaviorConfig(e, "form-group");
|
|
@@ -1631,9 +1612,9 @@ class Mt extends Et {
|
|
|
1631
1612
|
}
|
|
1632
1613
|
getBasicProperties(e, n, r = "Card") {
|
|
1633
1614
|
var u;
|
|
1634
|
-
const
|
|
1615
|
+
const s = this;
|
|
1635
1616
|
this.setDesignViewModelField(e);
|
|
1636
|
-
const { canChangeControlType:
|
|
1617
|
+
const { canChangeControlType: l, editorTypeList: m } = this.getAvailableEditorType(e), a = {
|
|
1637
1618
|
description: "Basic Information",
|
|
1638
1619
|
title: "基本信息",
|
|
1639
1620
|
properties: {
|
|
@@ -1656,7 +1637,7 @@ class Mt extends Et {
|
|
|
1656
1637
|
idField: "key",
|
|
1657
1638
|
editable: !1,
|
|
1658
1639
|
data: m,
|
|
1659
|
-
readonly: !
|
|
1640
|
+
readonly: !l
|
|
1660
1641
|
}
|
|
1661
1642
|
},
|
|
1662
1643
|
label: {
|
|
@@ -1692,25 +1673,25 @@ class Mt extends Et {
|
|
|
1692
1673
|
readonly: this.formSchemaUtils.designerMode === "PC_RTC" && !e.isRtcControl
|
|
1693
1674
|
}
|
|
1694
1675
|
},
|
|
1695
|
-
setPropertyRelates(
|
|
1696
|
-
if (
|
|
1697
|
-
switch (
|
|
1676
|
+
setPropertyRelates(c, o, d) {
|
|
1677
|
+
if (c)
|
|
1678
|
+
switch (c && c.propertyID) {
|
|
1698
1679
|
case "type": {
|
|
1699
|
-
|
|
1680
|
+
s.changeControlType(e, c, n);
|
|
1700
1681
|
break;
|
|
1701
1682
|
}
|
|
1702
1683
|
case "label": {
|
|
1703
|
-
|
|
1684
|
+
c.needRefreshControlTree = !0;
|
|
1704
1685
|
break;
|
|
1705
1686
|
}
|
|
1706
1687
|
case "binding": {
|
|
1707
|
-
|
|
1688
|
+
s.changeBindingField(e, c, d);
|
|
1708
1689
|
break;
|
|
1709
1690
|
}
|
|
1710
1691
|
}
|
|
1711
1692
|
}
|
|
1712
1693
|
};
|
|
1713
|
-
return r.toLocaleLowerCase() !== "card" && delete
|
|
1694
|
+
return r.toLocaleLowerCase() !== "card" && delete a.properties.showLabelType, a;
|
|
1714
1695
|
}
|
|
1715
1696
|
/**
|
|
1716
1697
|
* 校验控件是否支持切换类型
|
|
@@ -1722,7 +1703,7 @@ class Mt extends Et {
|
|
|
1722
1703
|
if (e.binding.type === "Variable") {
|
|
1723
1704
|
if (this.bindingVarible = this.formSchemaUtils.getVariableById(e.binding.field), !this.bindingVarible)
|
|
1724
1705
|
return !1;
|
|
1725
|
-
} else if (!this.designViewModelField || this.designViewModelField.$type !==
|
|
1706
|
+
} else if (!this.designViewModelField || this.designViewModelField.$type !== le.SimpleField)
|
|
1726
1707
|
return !1;
|
|
1727
1708
|
return !0;
|
|
1728
1709
|
}
|
|
@@ -1730,18 +1711,18 @@ class Mt extends Et {
|
|
|
1730
1711
|
* 获取可选的编辑器类型
|
|
1731
1712
|
*/
|
|
1732
1713
|
getAvailableEditorType(e) {
|
|
1733
|
-
var
|
|
1714
|
+
var s;
|
|
1734
1715
|
const n = this.checkCanChangeControlType(e, this.viewModelId);
|
|
1735
1716
|
if (!n)
|
|
1736
1717
|
return {
|
|
1737
1718
|
canChangeControlType: !1,
|
|
1738
1719
|
editorTypeList: [{
|
|
1739
1720
|
key: e.editor.type,
|
|
1740
|
-
value: ((
|
|
1721
|
+
value: ((s = v[e.editor.type]) == null ? void 0 : s.name) || e.editor.type
|
|
1741
1722
|
}]
|
|
1742
1723
|
};
|
|
1743
1724
|
let r = [];
|
|
1744
|
-
return this.designViewModelField && this.designViewModelField.$type ===
|
|
1725
|
+
return this.designViewModelField && this.designViewModelField.$type === le.SimpleField ? r = Y.getEditorTypesByMDataType(this.designViewModelField.type.name, this.designViewModelField.multiLanguage) : this.bindingVarible && (r = Y.getEditorTypesByMDataType(this.bindingVarible.type, this.designViewModelField.multiLanguage)), { canChangeControlType: n, editorTypeList: r };
|
|
1745
1726
|
}
|
|
1746
1727
|
changeBindingField(e, n, r) {
|
|
1747
1728
|
n.needRefreshEntityTree = !0;
|
|
@@ -1785,17 +1766,17 @@ class Mt extends Et {
|
|
|
1785
1766
|
}
|
|
1786
1767
|
}
|
|
1787
1768
|
},
|
|
1788
|
-
setPropertyRelates(
|
|
1789
|
-
if (
|
|
1790
|
-
switch (
|
|
1769
|
+
setPropertyRelates(s, l) {
|
|
1770
|
+
if (s)
|
|
1771
|
+
switch (s && s.propertyID) {
|
|
1791
1772
|
case "responseLayout":
|
|
1792
|
-
r.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(
|
|
1773
|
+
r.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(s.propertyValue, r.componentId || e.id), r.updateUnifiedLayoutAfterResponseLayoutChanged(r.componentId), r.updateElementByParentContainer(e.id, n), delete e.responseLayout;
|
|
1793
1774
|
break;
|
|
1794
1775
|
case "class":
|
|
1795
|
-
r.updateUnifiedLayoutAfterControlChanged(
|
|
1776
|
+
r.updateUnifiedLayoutAfterControlChanged(s.propertyValue, e.id, this.componentId), Z.value++;
|
|
1796
1777
|
break;
|
|
1797
1778
|
case "style": {
|
|
1798
|
-
|
|
1779
|
+
Z.value++;
|
|
1799
1780
|
break;
|
|
1800
1781
|
}
|
|
1801
1782
|
}
|
|
@@ -1811,47 +1792,47 @@ class Mt extends Et {
|
|
|
1811
1792
|
* @param newControlType 新控件类型
|
|
1812
1793
|
*/
|
|
1813
1794
|
changeControlType(e, n, r) {
|
|
1814
|
-
const
|
|
1815
|
-
if (!
|
|
1795
|
+
const s = n.propertyValue, l = r && r.parent && r.parent.schema;
|
|
1796
|
+
if (!l)
|
|
1816
1797
|
return;
|
|
1817
|
-
const m =
|
|
1798
|
+
const m = l.contents.findIndex((c) => c.id === e.id);
|
|
1818
1799
|
if (m === -1)
|
|
1819
1800
|
return;
|
|
1820
|
-
const
|
|
1801
|
+
const a = l.contents[m];
|
|
1821
1802
|
let u;
|
|
1822
1803
|
if (this.designViewModelField) {
|
|
1823
|
-
const d = this.formSchemaUtils.getViewModelById(this.viewModelId).fields.find((
|
|
1824
|
-
d.editor || (d.editor = {}), d.editor.$type =
|
|
1804
|
+
const d = this.formSchemaUtils.getViewModelById(this.viewModelId).fields.find((f) => f.id === this.designViewModelField.id).fieldSchema || {};
|
|
1805
|
+
d.editor || (d.editor = {}), d.editor.$type = s, this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, d, !1), u = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, s);
|
|
1825
1806
|
}
|
|
1826
|
-
u || (u = this.controlCreatorUtils.createFormGroupWithoutField(
|
|
1827
|
-
id:
|
|
1828
|
-
appearance:
|
|
1829
|
-
size:
|
|
1830
|
-
label:
|
|
1831
|
-
binding:
|
|
1832
|
-
}), Object.prototype.hasOwnProperty.call(
|
|
1833
|
-
Object.prototype.hasOwnProperty.call(
|
|
1834
|
-
}), r != null && r.updateContextSchema ? r.updateContextSchema(u) : (r.schema = Object.assign(
|
|
1835
|
-
(
|
|
1807
|
+
u || (u = this.controlCreatorUtils.createFormGroupWithoutField(s)), Object.assign(u, {
|
|
1808
|
+
id: a.id,
|
|
1809
|
+
appearance: a.appearance,
|
|
1810
|
+
size: a.size,
|
|
1811
|
+
label: a.label,
|
|
1812
|
+
binding: a.binding
|
|
1813
|
+
}), Object.prototype.hasOwnProperty.call(a, "visible") && Object.assign(u, { visible: a.visible }), a.editor && ["readonly", "required", "placeholder"].map((c) => {
|
|
1814
|
+
Object.prototype.hasOwnProperty.call(a.editor, c) && (u.editor[c] = a.editor[c]);
|
|
1815
|
+
}), r != null && r.updateContextSchema ? r.updateContextSchema(u) : (r.schema = Object.assign(a, u), Object.assign(e, u)), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
1816
|
+
(c) => c.classList.remove("dgComponentSelected")
|
|
1836
1817
|
), Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(
|
|
1837
|
-
(
|
|
1838
|
-
),
|
|
1818
|
+
(c) => c.classList.remove("dgComponentFocused")
|
|
1819
|
+
), Z.value++, te(() => {
|
|
1839
1820
|
this.getFormDesignerInstance().reloadPropertyPanel();
|
|
1840
1821
|
});
|
|
1841
1822
|
}
|
|
1842
|
-
getComponentConfig(e, n = {}, r = {},
|
|
1823
|
+
getComponentConfig(e, n = {}, r = {}, s) {
|
|
1843
1824
|
var d, g;
|
|
1844
|
-
const
|
|
1825
|
+
const l = Object.assign({
|
|
1845
1826
|
description: "编辑器",
|
|
1846
1827
|
title: "编辑器",
|
|
1847
1828
|
type: "input-group",
|
|
1848
1829
|
$converter: "/converter/property-editor.converter",
|
|
1849
1830
|
parentPropertyID: "editor"
|
|
1850
|
-
}, n), m = (d = e.binding) != null && d.field ? [] : ["Const", "Variable", "StateMachine"],
|
|
1831
|
+
}, n), m = (d = e.binding) != null && d.field ? [] : ["Const", "Variable", "StateMachine"], a = this.getPropertyEditorParams(e, m, "readonly"), u = this.getPropertyEditorParams(e, m, "required"), c = {
|
|
1851
1832
|
readonly: {
|
|
1852
1833
|
description: "",
|
|
1853
1834
|
title: "只读",
|
|
1854
|
-
editor:
|
|
1835
|
+
editor: a
|
|
1855
1836
|
},
|
|
1856
1837
|
required: {
|
|
1857
1838
|
description: "",
|
|
@@ -1866,21 +1847,21 @@ class Mt extends Et {
|
|
|
1866
1847
|
type: "string"
|
|
1867
1848
|
}
|
|
1868
1849
|
};
|
|
1869
|
-
for (const
|
|
1870
|
-
f
|
|
1850
|
+
for (const f in r)
|
|
1851
|
+
c[f] = Object.assign(c[f] || {}, r[f]);
|
|
1871
1852
|
const o = this;
|
|
1872
1853
|
return {
|
|
1873
|
-
...
|
|
1874
|
-
properties: { ...
|
|
1875
|
-
setPropertyRelates(
|
|
1876
|
-
if (
|
|
1877
|
-
switch (
|
|
1854
|
+
...l,
|
|
1855
|
+
properties: { ...c },
|
|
1856
|
+
setPropertyRelates(f, p) {
|
|
1857
|
+
if (f) {
|
|
1858
|
+
switch (f.propertyID) {
|
|
1878
1859
|
case "readonly":
|
|
1879
1860
|
case "required":
|
|
1880
|
-
o.afterMutilEditorChanged(e,
|
|
1861
|
+
o.afterMutilEditorChanged(e, f);
|
|
1881
1862
|
break;
|
|
1882
1863
|
}
|
|
1883
|
-
|
|
1864
|
+
s && s.bind(o)(f, e, p);
|
|
1884
1865
|
}
|
|
1885
1866
|
}
|
|
1886
1867
|
};
|
|
@@ -1892,17 +1873,17 @@ class Mt extends Et {
|
|
|
1892
1873
|
* @param componentId 控件所在组件id
|
|
1893
1874
|
*/
|
|
1894
1875
|
updateUnifiedLayoutAfterControlChanged(e, n, r) {
|
|
1895
|
-
const
|
|
1896
|
-
let
|
|
1897
|
-
|
|
1898
|
-
const
|
|
1876
|
+
const s = e.split(" ");
|
|
1877
|
+
let l = s.find((o) => /^col-([1-9]|10|11|12)$/.test(o)), m = s.find((o) => /^col-md-([1-9]|10|11|12)$/.test(o)), a = s.find((o) => /^col-xl-([1-9]|10|11|12)$/.test(o)), u = s.find((o) => /^col-el-([1-9]|10|11|12)$/.test(o));
|
|
1878
|
+
l = l || "col-12", m = m || "col-md-" + l.replace("col-", ""), a = a || "col-xl-" + m.replace("col-md-", ""), u = u || "col-el-" + a.replace("col-xl-", "");
|
|
1879
|
+
const c = {
|
|
1899
1880
|
id: n,
|
|
1900
|
-
columnInSM: parseInt(
|
|
1881
|
+
columnInSM: parseInt(l.replace("col-", ""), 10),
|
|
1901
1882
|
columnInMD: parseInt(m.replace("col-md-", ""), 10),
|
|
1902
|
-
columnInLG: parseInt(
|
|
1883
|
+
columnInLG: parseInt(a.replace("col-xl-", ""), 10),
|
|
1903
1884
|
columnInEL: parseInt(u.replace("col-el-", ""), 10)
|
|
1904
1885
|
};
|
|
1905
|
-
this.updateUnifiedLayoutAfterResponseLayoutChanged(r,
|
|
1886
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(r, c);
|
|
1906
1887
|
}
|
|
1907
1888
|
/**
|
|
1908
1889
|
* 修改控件布局配置后更新Form统一布局配置
|
|
@@ -1913,14 +1894,14 @@ class Mt extends Et {
|
|
|
1913
1894
|
const { formNode: r } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
|
|
1914
1895
|
if (!r || !r.unifiedLayout)
|
|
1915
1896
|
return;
|
|
1916
|
-
const
|
|
1917
|
-
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(r,
|
|
1918
|
-
const
|
|
1919
|
-
Object.assign(
|
|
1897
|
+
const s = [];
|
|
1898
|
+
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(r, s, 1), n) {
|
|
1899
|
+
const f = s.find((p) => p.id === n.id);
|
|
1900
|
+
Object.assign(f || {}, n);
|
|
1920
1901
|
}
|
|
1921
|
-
const
|
|
1902
|
+
const l = s.map((f) => f.columnInSM), m = s.map((f) => f.columnInMD), a = s.map((f) => f.columnInLG), u = s.map((f) => f.columnInEL), c = this.checkIsUniqueColumn(l) ? l[0] : null, o = this.checkIsUniqueColumn(m) ? m[0] : null, d = this.checkIsUniqueColumn(a) ? a[0] : null, g = this.checkIsUniqueColumn(u) ? u[0] : null;
|
|
1922
1903
|
Object.assign(r.unifiedLayout, {
|
|
1923
|
-
uniqueColClassInSM:
|
|
1904
|
+
uniqueColClassInSM: c,
|
|
1924
1905
|
uniqueColClassInMD: o,
|
|
1925
1906
|
uniqueColClassInLG: d,
|
|
1926
1907
|
uniqueColClassInEL: g
|
|
@@ -1964,22 +1945,22 @@ class Mt extends Et {
|
|
|
1964
1945
|
* @param propertyData 下拉框控件属性值
|
|
1965
1946
|
*/
|
|
1966
1947
|
checkEnumDataReadonly(e) {
|
|
1967
|
-
return !e.binding || e.binding.type !== "Form" ? !1 : !!(this.designViewModelField && this.designViewModelField.type && this.designViewModelField.type.$type ===
|
|
1948
|
+
return !e.binding || e.binding.type !== "Form" ? !1 : !!(this.designViewModelField && this.designViewModelField.type && this.designViewModelField.type.$type === _e.EnumType);
|
|
1968
1949
|
}
|
|
1969
1950
|
/**
|
|
1970
1951
|
* 将字段值变化前事件、变化后事件追加到交互面板
|
|
1971
1952
|
* 注意:因为绑定字段值变化后事件与下拉框的值变化事件(valueChanged)重名,所以这里将事件label都重命名下
|
|
1972
1953
|
*/
|
|
1973
1954
|
appendFieldValueChangeEvents(e, n) {
|
|
1974
|
-
e.binding && e.binding.type ===
|
|
1955
|
+
e.binding && e.binding.type === J.Form && e.binding.field ? (n.find((r) => r.label === "fieldValueChanging"), n.find((r) => r.label === "fieldValueChanged"), this.designViewModelField && (e.fieldValueChanging = this.designViewModelField.valueChanging, e.fieldValueChanged = this.designViewModelField.valueChanged)) : n = n.filter((r) => r.label !== "fieldValueChanging" && r.label !== "fieldValueChanged");
|
|
1975
1956
|
}
|
|
1976
1957
|
getControlMethodType(e) {
|
|
1977
1958
|
if (!e.binding)
|
|
1978
1959
|
return e.type;
|
|
1979
1960
|
switch (e.binding.type) {
|
|
1980
|
-
case
|
|
1961
|
+
case J.Form:
|
|
1981
1962
|
return e.binding.path || e.type;
|
|
1982
|
-
case
|
|
1963
|
+
case J.Variable:
|
|
1983
1964
|
return e.binding.fullPath || e.type;
|
|
1984
1965
|
}
|
|
1985
1966
|
return e.type;
|
|
@@ -1991,8 +1972,8 @@ class Mt extends Et {
|
|
|
1991
1972
|
* @param showPosition 面板展示位置
|
|
1992
1973
|
* @param customEvent 输入控件特有的事件配置
|
|
1993
1974
|
*/
|
|
1994
|
-
getEventPropertyConfig(e, n = "card", r,
|
|
1995
|
-
const
|
|
1975
|
+
getEventPropertyConfig(e, n = "card", r, s) {
|
|
1976
|
+
const l = this;
|
|
1996
1977
|
let m = [];
|
|
1997
1978
|
if (r && (m = m.concat(r)), m.length === 0)
|
|
1998
1979
|
return {
|
|
@@ -2004,27 +1985,27 @@ class Mt extends Et {
|
|
|
2004
1985
|
hide: !0
|
|
2005
1986
|
};
|
|
2006
1987
|
this.appendFieldValueChangeEvents(e, m);
|
|
2007
|
-
const
|
|
1988
|
+
const a = l.eventsEditorUtils.formProperties(e, l.viewModelId, m);
|
|
2008
1989
|
return {
|
|
2009
1990
|
title: "事件",
|
|
2010
1991
|
hideTitle: !0,
|
|
2011
|
-
properties:
|
|
1992
|
+
properties: l.createBaseEventProperty(a),
|
|
2012
1993
|
tabId: "commands",
|
|
2013
1994
|
tabName: "交互",
|
|
2014
1995
|
setPropertyRelates(o, d) {
|
|
2015
1996
|
const g = o.propertyValue;
|
|
2016
|
-
delete e[
|
|
2017
|
-
const
|
|
2018
|
-
|
|
1997
|
+
delete e[l.viewModelId], g && (g.setPropertyRelates = this.setPropertyRelates, g.controlInfo = { type: l.getControlMethodType(e), name: e.title }, l.eventsEditorUtils.saveRelatedParameters(e, l.viewModelId, g.events, g)), s && s(o, d, g);
|
|
1998
|
+
const f = l.designViewModelUtils.getDgViewModel(l.viewModelId);
|
|
1999
|
+
f && l.designViewModelField && f.changeField(l.designViewModelField.id, { valueChanging: e.fieldValueChanging, valueChanged: e.fieldValueChanged });
|
|
2019
2000
|
}
|
|
2020
2001
|
};
|
|
2021
2002
|
}
|
|
2022
|
-
getExpressionConfig(e, n, r = ["compute", "dependency", "validate"],
|
|
2023
|
-
return new
|
|
2003
|
+
getExpressionConfig(e, n, r = ["compute", "dependency", "validate"], s) {
|
|
2004
|
+
return new we(this.formSchemaUtils).getExpressionConfig(
|
|
2024
2005
|
e,
|
|
2025
2006
|
n,
|
|
2026
2007
|
r,
|
|
2027
|
-
|
|
2008
|
+
s
|
|
2028
2009
|
);
|
|
2029
2010
|
}
|
|
2030
2011
|
getBindingDataType() {
|
|
@@ -2034,14 +2015,14 @@ class Mt extends Et {
|
|
|
2034
2015
|
return this.getBindingDataType() === "number" ? this.numberEditorOptions : {};
|
|
2035
2016
|
}
|
|
2036
2017
|
updatePropertyValue(e, n, r) {
|
|
2037
|
-
var
|
|
2038
|
-
e.editor[n] !== r ? e.editor[n] = r : (
|
|
2018
|
+
var s;
|
|
2019
|
+
e.editor[n] !== r ? e.editor[n] = r : (s = this.getFormDesignerInstance()) == null || s.reloadPropertyPanel();
|
|
2039
2020
|
}
|
|
2040
2021
|
setBooleanValue(e, n, r) {
|
|
2041
|
-
let
|
|
2042
|
-
this.getBindingDataType() === "string" && (
|
|
2022
|
+
let s = r;
|
|
2023
|
+
this.getBindingDataType() === "string" && (s = (s || "").trim() || (n === "trueValue" ? "true" : "false"));
|
|
2043
2024
|
const m = n === "trueValue" ? "falseValue" : "trueValue";
|
|
2044
|
-
e.editor[m] ===
|
|
2025
|
+
e.editor[m] === s && (s = s + 1), this.updatePropertyValue(e, n, s);
|
|
2045
2026
|
}
|
|
2046
2027
|
getBooleanValueConverter() {
|
|
2047
2028
|
return {
|
|
@@ -2115,7 +2096,7 @@ class Tt extends Mt {
|
|
|
2115
2096
|
editor: this.getPropertyEditorParams(t, ["Variable"], "", {}, { newVariableType: "Object" })
|
|
2116
2097
|
}
|
|
2117
2098
|
},
|
|
2118
|
-
setPropertyRelates(r,
|
|
2099
|
+
setPropertyRelates(r, s) {
|
|
2119
2100
|
if (r)
|
|
2120
2101
|
switch (r.propertyID) {
|
|
2121
2102
|
case "visible":
|
|
@@ -2135,26 +2116,26 @@ class Tt extends Mt {
|
|
|
2135
2116
|
label: "onQuery",
|
|
2136
2117
|
name: "查询事件"
|
|
2137
2118
|
}
|
|
2138
|
-
], n = this, r = n.eventsEditorUtils.formProperties(t, n.viewModelId, e),
|
|
2119
|
+
], n = this, r = n.eventsEditorUtils.formProperties(t, n.viewModelId, e), s = n.createBaseEventProperty(r);
|
|
2139
2120
|
this.propertyConfig.categories.eventsEditor = {
|
|
2140
2121
|
title: "事件",
|
|
2141
2122
|
hideTitle: !0,
|
|
2142
|
-
properties:
|
|
2123
|
+
properties: s,
|
|
2143
2124
|
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
2144
2125
|
refreshPanelAfterChanged: !0,
|
|
2145
2126
|
tabId: "commands",
|
|
2146
2127
|
tabName: "交互",
|
|
2147
|
-
setPropertyRelates(
|
|
2148
|
-
const
|
|
2149
|
-
delete t[n.viewModelId],
|
|
2128
|
+
setPropertyRelates(l, m) {
|
|
2129
|
+
const a = l.propertyValue;
|
|
2130
|
+
delete t[n.viewModelId], a && (a.setPropertyRelates = this.setPropertyRelates, n.eventsEditorUtils.saveRelatedParameters(t, n.viewModelId, a.events, a)), t.remoteSort = !!t.columnSorted;
|
|
2150
2131
|
}
|
|
2151
2132
|
};
|
|
2152
2133
|
}
|
|
2153
2134
|
}
|
|
2154
|
-
function
|
|
2155
|
-
function e(m,
|
|
2135
|
+
function Pt(i, t) {
|
|
2136
|
+
function e(m, a) {
|
|
2156
2137
|
const u = i.schema;
|
|
2157
|
-
return new Tt(m, t).getPropertyConfig(u,
|
|
2138
|
+
return new Tt(m, t).getPropertyConfig(u, a);
|
|
2158
2139
|
}
|
|
2159
2140
|
function n() {
|
|
2160
2141
|
return !1;
|
|
@@ -2162,46 +2143,49 @@ function kt(i, t) {
|
|
|
2162
2143
|
function r() {
|
|
2163
2144
|
return !1;
|
|
2164
2145
|
}
|
|
2165
|
-
function
|
|
2146
|
+
function s() {
|
|
2166
2147
|
return !1;
|
|
2167
2148
|
}
|
|
2168
|
-
function
|
|
2169
|
-
var
|
|
2170
|
-
if (
|
|
2171
|
-
const
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2149
|
+
function l() {
|
|
2150
|
+
var m;
|
|
2151
|
+
if (i && t) {
|
|
2152
|
+
const { formSchemaUtils: a } = t, u = a.getControlBasicInfoMap(), { schema: c } = i, o = tt["filter-bar"].name;
|
|
2153
|
+
u.set(c.id, {
|
|
2154
|
+
componentTitle: o,
|
|
2155
|
+
parentPathName: o
|
|
2156
|
+
}), (m = c.fields) != null && m.length && c.fields.map((d) => {
|
|
2157
|
+
u.set(d.id, {
|
|
2158
|
+
componentTitle: d.name,
|
|
2159
|
+
parentPathName: `${o} > ${d.name}`
|
|
2160
|
+
});
|
|
2161
|
+
});
|
|
2178
2162
|
}
|
|
2179
2163
|
}
|
|
2180
2164
|
return {
|
|
2181
2165
|
getPropsConfig: e,
|
|
2182
2166
|
canAccepts: n,
|
|
2183
2167
|
checkCanDeleteComponent: r,
|
|
2184
|
-
checkCanMoveComponent:
|
|
2185
|
-
|
|
2168
|
+
checkCanMoveComponent: s,
|
|
2169
|
+
setComponentBasicInfoMap: l
|
|
2186
2170
|
};
|
|
2187
2171
|
}
|
|
2188
|
-
function
|
|
2172
|
+
function Ie(i, t) {
|
|
2189
2173
|
let e;
|
|
2190
2174
|
function n(o) {
|
|
2191
|
-
const { properties: d, title: g, ignore:
|
|
2192
|
-
if (g && (!p || !
|
|
2175
|
+
const { properties: d, title: g, ignore: f } = o, p = f && Array.isArray(f), h = Object.keys(d).reduce((y, C) => ((!p || !f.find((V) => V === C)) && (y[C] = d[C].type === "object" && d[C].properties ? n(d[C]) : H(d[C].default)), y), {});
|
|
2176
|
+
if (g && (!p || !f.find((y) => y === "id"))) {
|
|
2193
2177
|
const y = g.toLowerCase().replace(/-/g, "_");
|
|
2194
|
-
|
|
2178
|
+
h.id = `${y}_${Math.random().toString().slice(2, 6)}`;
|
|
2195
2179
|
}
|
|
2196
|
-
return
|
|
2180
|
+
return h;
|
|
2197
2181
|
}
|
|
2198
2182
|
function r(o) {
|
|
2199
|
-
const { properties: d, title: g, required:
|
|
2200
|
-
if (
|
|
2201
|
-
const p =
|
|
2202
|
-
if (g &&
|
|
2203
|
-
const
|
|
2204
|
-
p.id = `${
|
|
2183
|
+
const { properties: d, title: g, required: f } = o;
|
|
2184
|
+
if (f && Array.isArray(f)) {
|
|
2185
|
+
const p = f.reduce((h, y) => (h[y] = d[y].type === "object" && d[y].properties ? n(d[y]) : H(d[y].default), h), {});
|
|
2186
|
+
if (g && f.find((h) => h === "id")) {
|
|
2187
|
+
const h = g.toLowerCase().replace(/-/g, "_");
|
|
2188
|
+
p.id = `${h}_${Math.random().toString().slice(2, 6)}`;
|
|
2205
2189
|
}
|
|
2206
2190
|
return p;
|
|
2207
2191
|
}
|
|
@@ -2209,113 +2193,113 @@ function be(i, t) {
|
|
|
2209
2193
|
type: g
|
|
2210
2194
|
};
|
|
2211
2195
|
}
|
|
2212
|
-
function
|
|
2213
|
-
const
|
|
2214
|
-
if (
|
|
2215
|
-
let p = r(
|
|
2216
|
-
const
|
|
2217
|
-
return p =
|
|
2196
|
+
function s(o, d = {}, g) {
|
|
2197
|
+
const f = i[o];
|
|
2198
|
+
if (f) {
|
|
2199
|
+
let p = r(f);
|
|
2200
|
+
const h = t[o];
|
|
2201
|
+
return p = h ? h({ getSchemaByType: s }, p, d, g) : p, e != null && e.appendIdentifyForNewControl && e.appendIdentifyForNewControl(p), p;
|
|
2218
2202
|
}
|
|
2219
2203
|
return null;
|
|
2220
2204
|
}
|
|
2221
|
-
function
|
|
2205
|
+
function l(o, d) {
|
|
2222
2206
|
const g = n(d);
|
|
2223
|
-
return Object.keys(g).reduce((
|
|
2207
|
+
return Object.keys(g).reduce((f, p) => (Object.prototype.hasOwnProperty.call(o, p) && (f[p] && ae(f[p]) && ae(o[p] || !o[p]) ? Object.assign(f[p], o[p] || {}) : f[p] = o[p]), f), g), g;
|
|
2224
2208
|
}
|
|
2225
2209
|
function m(o, d) {
|
|
2226
|
-
return Object.keys(o).filter((
|
|
2210
|
+
return Object.keys(o).filter((f) => o[f] != null).reduce((f, p) => {
|
|
2227
2211
|
if (d.has(p)) {
|
|
2228
|
-
const
|
|
2229
|
-
if (typeof
|
|
2230
|
-
|
|
2212
|
+
const h = d.get(p);
|
|
2213
|
+
if (typeof h == "string")
|
|
2214
|
+
f[h] = o[p];
|
|
2231
2215
|
else {
|
|
2232
|
-
const y =
|
|
2233
|
-
Object.assign(
|
|
2216
|
+
const y = h(p, o[p], o);
|
|
2217
|
+
Object.assign(f, y);
|
|
2234
2218
|
}
|
|
2235
2219
|
} else
|
|
2236
|
-
|
|
2237
|
-
return
|
|
2220
|
+
f[p] = o[p];
|
|
2221
|
+
return f;
|
|
2238
2222
|
}, {});
|
|
2239
2223
|
}
|
|
2240
|
-
function
|
|
2241
|
-
const
|
|
2242
|
-
return m(
|
|
2224
|
+
function a(o, d, g = /* @__PURE__ */ new Map()) {
|
|
2225
|
+
const f = l(o, d);
|
|
2226
|
+
return m(f, g);
|
|
2243
2227
|
}
|
|
2244
2228
|
function u(o) {
|
|
2245
2229
|
var g;
|
|
2246
2230
|
const d = o.type;
|
|
2247
2231
|
if (d) {
|
|
2248
|
-
const
|
|
2249
|
-
if (!
|
|
2232
|
+
const f = i[d];
|
|
2233
|
+
if (!f)
|
|
2250
2234
|
return o;
|
|
2251
|
-
const p =
|
|
2252
|
-
if (
|
|
2253
|
-
const y = i[
|
|
2254
|
-
p.editor =
|
|
2235
|
+
const p = l(o, f), h = ((g = o.editor) == null ? void 0 : g.type) || "";
|
|
2236
|
+
if (h) {
|
|
2237
|
+
const y = i[h], C = l(o.editor, y);
|
|
2238
|
+
p.editor = C;
|
|
2255
2239
|
}
|
|
2256
2240
|
return p;
|
|
2257
2241
|
}
|
|
2258
2242
|
return o;
|
|
2259
2243
|
}
|
|
2260
|
-
function
|
|
2244
|
+
function c(o) {
|
|
2261
2245
|
e = o;
|
|
2262
2246
|
}
|
|
2263
|
-
return { getSchemaByType:
|
|
2247
|
+
return { getSchemaByType: s, resolveSchemaWithDefaultValue: u, resolveSchemaToProps: a, mappingSchemaToProps: m, setDesignerContext: c };
|
|
2264
2248
|
}
|
|
2265
|
-
const
|
|
2249
|
+
const Ee = {}, xe = {}, { resolveSchemaWithDefaultValue: kt, resolveSchemaToProps: Vt, mappingSchemaToProps: Bt } = Ie(Ee, xe);
|
|
2266
2250
|
function Nt(i = {}) {
|
|
2267
|
-
function t(u,
|
|
2251
|
+
function t(u, c, o, d) {
|
|
2268
2252
|
if (typeof o == "number")
|
|
2269
2253
|
return d[u].length === o;
|
|
2270
2254
|
if (typeof o == "object") {
|
|
2271
|
-
const g = Object.keys(o)[0],
|
|
2255
|
+
const g = Object.keys(o)[0], f = o[g];
|
|
2272
2256
|
if (g === "not")
|
|
2273
|
-
return Number(d[u].length) !== Number(
|
|
2257
|
+
return Number(d[u].length) !== Number(f);
|
|
2274
2258
|
if (g === "moreThan")
|
|
2275
|
-
return Number(d[u].length) >= Number(
|
|
2259
|
+
return Number(d[u].length) >= Number(f);
|
|
2276
2260
|
if (g === "lessThan")
|
|
2277
|
-
return Number(d[u].length) <= Number(
|
|
2261
|
+
return Number(d[u].length) <= Number(f);
|
|
2278
2262
|
}
|
|
2279
2263
|
return !1;
|
|
2280
2264
|
}
|
|
2281
|
-
function e(u,
|
|
2265
|
+
function e(u, c, o, d) {
|
|
2282
2266
|
return d[u] && d[u].propertyValue && String(d[u].propertyValue.value) === String(o);
|
|
2283
2267
|
}
|
|
2284
2268
|
const n = /* @__PURE__ */ new Map([
|
|
2285
2269
|
["length", t],
|
|
2286
2270
|
["getProperty", e]
|
|
2287
2271
|
]);
|
|
2288
|
-
Object.keys(i).reduce((u,
|
|
2289
|
-
function r(u,
|
|
2272
|
+
Object.keys(i).reduce((u, c) => (u.set(c, i[c]), u), n);
|
|
2273
|
+
function r(u, c) {
|
|
2290
2274
|
const o = u;
|
|
2291
|
-
return typeof
|
|
2275
|
+
return typeof c == "number" ? [{ target: o, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: o, operator: "getProperty", param: u, value: !!c }] : typeof c == "object" ? Object.keys(c).map((d) => {
|
|
2292
2276
|
if (d === "length")
|
|
2293
|
-
return { target: o, operator: "length", param: null, value:
|
|
2294
|
-
const g = d,
|
|
2295
|
-
return { target: o, operator: "getProperty", param: g, value:
|
|
2277
|
+
return { target: o, operator: "length", param: null, value: c[d] };
|
|
2278
|
+
const g = d, f = c[d];
|
|
2279
|
+
return { target: o, operator: "getProperty", param: g, value: f };
|
|
2296
2280
|
}) : [];
|
|
2297
2281
|
}
|
|
2298
|
-
function
|
|
2282
|
+
function s(u) {
|
|
2299
2283
|
return Object.keys(u).reduce((o, d) => {
|
|
2300
2284
|
const g = r(d, u[d]);
|
|
2301
2285
|
return o.push(...g), o;
|
|
2302
2286
|
}, []);
|
|
2303
2287
|
}
|
|
2304
|
-
function
|
|
2288
|
+
function l(u, c) {
|
|
2305
2289
|
if (n.has(u.operator)) {
|
|
2306
2290
|
const o = n.get(u.operator);
|
|
2307
|
-
return o && o(u.target, u.param, u.value,
|
|
2291
|
+
return o && o(u.target, u.param, u.value, c) || !1;
|
|
2308
2292
|
}
|
|
2309
2293
|
return !1;
|
|
2310
2294
|
}
|
|
2311
|
-
function m(u,
|
|
2312
|
-
return
|
|
2295
|
+
function m(u, c) {
|
|
2296
|
+
return s(u).reduce((g, f) => g && l(f, c), !0);
|
|
2313
2297
|
}
|
|
2314
|
-
function
|
|
2315
|
-
const o = Object.keys(u), d = o.includes("allOf"), g = o.includes("anyOf"),
|
|
2298
|
+
function a(u, c) {
|
|
2299
|
+
const o = Object.keys(u), d = o.includes("allOf"), g = o.includes("anyOf"), f = d || g, y = (f ? u[f ? d ? "allOf" : "anyOf" : "allOf"] : [u]).map((V) => m(V, c));
|
|
2316
2300
|
return d ? !y.includes(!1) : y.includes(!0);
|
|
2317
2301
|
}
|
|
2318
|
-
return { parseValueSchema:
|
|
2302
|
+
return { parseValueSchema: a };
|
|
2319
2303
|
}
|
|
2320
2304
|
const Ot = {
|
|
2321
2305
|
convertTo: (i, t, e, n) => {
|
|
@@ -2329,7 +2313,7 @@ const Ot = {
|
|
|
2329
2313
|
i.editor && (i.editor[t] = e);
|
|
2330
2314
|
},
|
|
2331
2315
|
convertFrom: (i, t, e) => i.editor && Object.prototype.hasOwnProperty.call(i.editor, t) ? i.editor[t] : i[t]
|
|
2332
|
-
},
|
|
2316
|
+
}, At = {
|
|
2333
2317
|
button: { type: "button", name: "按钮" },
|
|
2334
2318
|
"response-toolbar": { type: "response-toolbar", name: "工具栏" },
|
|
2335
2319
|
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮" },
|
|
@@ -2356,6 +2340,7 @@ const Ot = {
|
|
|
2356
2340
|
tabs: { type: "tabs", name: "标签页" },
|
|
2357
2341
|
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
2358
2342
|
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮" },
|
|
2343
|
+
"drawer-toolbar-item": { type: "drawer-toolbar-item", name: "抽屉工具栏按钮" },
|
|
2359
2344
|
"html-template": { type: "html-template", name: "模板容器" },
|
|
2360
2345
|
"time-picker": { type: "time-picker", name: "时间选择" },
|
|
2361
2346
|
section: { type: "section", name: "分组面板" },
|
|
@@ -2368,6 +2353,7 @@ const Ot = {
|
|
|
2368
2353
|
"page-header": { type: "page-header", name: "页头" },
|
|
2369
2354
|
"page-footer": { type: "page-footer", name: "页脚" },
|
|
2370
2355
|
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏" },
|
|
2356
|
+
"drawer-toolbar": { type: "drawer-toolbar", name: "抽屉工具栏" },
|
|
2371
2357
|
fieldset: { type: "fieldset", name: "分组" },
|
|
2372
2358
|
"query-solution": { type: "query-solution", name: "筛选方案" },
|
|
2373
2359
|
drawer: { type: "drawer", name: "抽屉" },
|
|
@@ -2380,13 +2366,13 @@ const Ot = {
|
|
|
2380
2366
|
"discussion-editor": { type: "discussion-editor", name: "评论编辑区" },
|
|
2381
2367
|
"discussion-list": { type: "discussion-list", name: "评论列表" },
|
|
2382
2368
|
comment: { type: "comment", name: "评论区" },
|
|
2383
|
-
"rich-text-editor": { type: "rich-text-editor", name: "
|
|
2369
|
+
"rich-text-editor": { type: "rich-text-editor", name: "富文本", icon: "rich-text-box" },
|
|
2384
2370
|
calendar: { type: "calendar", name: "日历", icon: "date-picker" }
|
|
2385
|
-
},
|
|
2371
|
+
}, Rt = {
|
|
2386
2372
|
convertFrom: (i, t, e) => {
|
|
2387
2373
|
var r;
|
|
2388
2374
|
const n = i.editor && i.editor[t] ? i.editor[t] : i[t];
|
|
2389
|
-
return ((r =
|
|
2375
|
+
return ((r = At[n]) == null ? void 0 : r.name) || n;
|
|
2390
2376
|
}
|
|
2391
2377
|
}, $t = {
|
|
2392
2378
|
convertTo: (i, t, e, n) => {
|
|
@@ -2424,7 +2410,7 @@ const Ot = {
|
|
|
2424
2410
|
}
|
|
2425
2411
|
return "none";
|
|
2426
2412
|
}
|
|
2427
|
-
},
|
|
2413
|
+
}, qt = {
|
|
2428
2414
|
convertTo: (i, t, e, n) => {
|
|
2429
2415
|
i.command ? i.command[t] = e : i.command = {
|
|
2430
2416
|
[t]: e
|
|
@@ -2442,17 +2428,29 @@ const Ot = {
|
|
|
2442
2428
|
]), t === "enableType" && e === "custom" && (i.command.enable = !0, i.command.commands = [
|
|
2443
2429
|
{
|
|
2444
2430
|
value: "add",
|
|
2445
|
-
text:
|
|
2431
|
+
text: {
|
|
2432
|
+
en: "add",
|
|
2433
|
+
"zh-CHS": "增加",
|
|
2434
|
+
"zh-CHT": "增加"
|
|
2435
|
+
},
|
|
2446
2436
|
type: "link"
|
|
2447
2437
|
},
|
|
2448
2438
|
{
|
|
2449
2439
|
value: "edit",
|
|
2450
|
-
text:
|
|
2440
|
+
text: {
|
|
2441
|
+
en: "edit",
|
|
2442
|
+
"zh-CHS": "编辑",
|
|
2443
|
+
"zh-CHT": "編輯"
|
|
2444
|
+
},
|
|
2451
2445
|
type: "danger"
|
|
2452
2446
|
},
|
|
2453
2447
|
{
|
|
2454
2448
|
value: "remove",
|
|
2455
|
-
text:
|
|
2449
|
+
text: {
|
|
2450
|
+
en: "remove",
|
|
2451
|
+
"zh-CHS": "删除",
|
|
2452
|
+
"zh-CHT": "刪除"
|
|
2453
|
+
},
|
|
2456
2454
|
type: "remove"
|
|
2457
2455
|
}
|
|
2458
2456
|
]), t === "enableType" && e === "unable" && (i.command.enable = !1);
|
|
@@ -2461,17 +2459,19 @@ const Ot = {
|
|
|
2461
2459
|
var n, r;
|
|
2462
2460
|
if (i.command) {
|
|
2463
2461
|
if (t === "enableType") {
|
|
2464
|
-
const
|
|
2465
|
-
return i.command.enable ?
|
|
2462
|
+
const s = (r = (n = i.command) == null ? void 0 : n.commands) == null ? void 0 : r.find((l) => l.command === "edit" && l.type === "primary");
|
|
2463
|
+
return i.command.enable ? s ? "default" : "custom" : "unable";
|
|
2466
2464
|
}
|
|
2467
2465
|
if (t === "commands")
|
|
2468
2466
|
return i.command.enableType === "custom" ? i.command.commands : [];
|
|
2469
2467
|
if (t === "formatter")
|
|
2470
2468
|
return i.command.formatter;
|
|
2469
|
+
if (t === "count")
|
|
2470
|
+
return i.command.count;
|
|
2471
2471
|
}
|
|
2472
2472
|
return "";
|
|
2473
2473
|
}
|
|
2474
|
-
},
|
|
2474
|
+
}, Wt = {
|
|
2475
2475
|
convertTo: (i, t, e, n) => {
|
|
2476
2476
|
i.column ? i.column[t] = e : i.column = {
|
|
2477
2477
|
[t]: e
|
|
@@ -2532,7 +2532,7 @@ const Ot = {
|
|
|
2532
2532
|
i.rowNumber || (i.rowNumber = {}), i.rowNumber[t] = e;
|
|
2533
2533
|
},
|
|
2534
2534
|
convertFrom: (i, t, e) => i.rowNumber ? i.rowNumber[t] : i[t]
|
|
2535
|
-
},
|
|
2535
|
+
}, Ht = {
|
|
2536
2536
|
convertTo: (i, t, e, n) => {
|
|
2537
2537
|
i.selection || (i.selection = {}), i.selection[t] = e;
|
|
2538
2538
|
},
|
|
@@ -2540,19 +2540,19 @@ const Ot = {
|
|
|
2540
2540
|
var n, r;
|
|
2541
2541
|
return t === "showCheckbox" ? (n = i.selection) != null && n.multiSelect ? !0 : (r = i.selection) == null ? void 0 : r.showCheckbox : i.selection ? i.selection[t] : i[t];
|
|
2542
2542
|
}
|
|
2543
|
-
},
|
|
2543
|
+
}, Xt = {
|
|
2544
2544
|
convertFrom: (i, t, e) => i[t] && i[t].length ? `共 ${i[t].length} 项` : ""
|
|
2545
|
-
},
|
|
2545
|
+
}, Zt = {
|
|
2546
2546
|
convertFrom: (i, t) => i[t] || "",
|
|
2547
2547
|
convertTo: (i, t, e) => {
|
|
2548
2548
|
i[t] = e;
|
|
2549
2549
|
}
|
|
2550
|
-
},
|
|
2550
|
+
}, Jt = {
|
|
2551
2551
|
convertTo: (i, t, e, n) => {
|
|
2552
2552
|
i.size || (i.size = {}), i.size[t] = e;
|
|
2553
2553
|
},
|
|
2554
2554
|
convertFrom: (i, t, e) => i.size ? i.size[t] : i[t]
|
|
2555
|
-
},
|
|
2555
|
+
}, Yt = {
|
|
2556
2556
|
convertFrom: (i, t, e) => {
|
|
2557
2557
|
var n, r;
|
|
2558
2558
|
return (n = i.formatter) != null && n.data && t === "formatterEnumData" && !i.formatterEnumData ? (r = i.formatter) == null ? void 0 : r.data : i.formatterEnumData;
|
|
@@ -2605,26 +2605,26 @@ const Ot = {
|
|
|
2605
2605
|
},
|
|
2606
2606
|
convertFrom: (i, t, e) => t === "columnTemplate" ? i.columnTemplate : t === "columnTemplateType" ? i.columnTemplateType ? i.columnTemplateType || "default" : i.columnTemplate && !i.onClickLinkCommand ? "custom" : i.columnTemplate && i.onClickLinkCommand ? "hyperlink" : "default" : ""
|
|
2607
2607
|
};
|
|
2608
|
-
function
|
|
2608
|
+
function Se(i, t, e) {
|
|
2609
2609
|
const n = /* @__PURE__ */ new Map([
|
|
2610
2610
|
["/converter/appearance.converter", Ot],
|
|
2611
2611
|
["/converter/buttons.converter", Lt],
|
|
2612
2612
|
["/converter/property-editor.converter", Ut],
|
|
2613
|
-
["/converter/items-count.converter",
|
|
2614
|
-
["/converter/type.converter",
|
|
2613
|
+
["/converter/items-count.converter", Xt],
|
|
2614
|
+
["/converter/type.converter", Rt],
|
|
2615
2615
|
["/converter/change-editor.converter", $t],
|
|
2616
2616
|
["/converter/change-formatter.converter", jt],
|
|
2617
|
-
["/converter/column-command.converter",
|
|
2618
|
-
["/converter/column-option.converter",
|
|
2617
|
+
["/converter/column-command.converter", qt],
|
|
2618
|
+
["/converter/column-option.converter", Wt],
|
|
2619
2619
|
["/converter/summary.converter", Gt],
|
|
2620
2620
|
["/converter/group.converter", zt],
|
|
2621
|
-
["/converter/form-group-label.converter",
|
|
2621
|
+
["/converter/form-group-label.converter", Zt],
|
|
2622
2622
|
["/converter/field-selector.converter", Dt],
|
|
2623
2623
|
["/converter/pagination.converter", Qt],
|
|
2624
2624
|
["/converter/row-number.converter", _t],
|
|
2625
|
-
["/converter/grid-selection.converter",
|
|
2626
|
-
["/converter/size.converter",
|
|
2627
|
-
["/converter/change-formatter-enum.converter",
|
|
2625
|
+
["/converter/grid-selection.converter", Ht],
|
|
2626
|
+
["/converter/size.converter", Jt],
|
|
2627
|
+
["/converter/change-formatter-enum.converter", Yt],
|
|
2628
2628
|
["/converter/grid-sort.converter", Kt],
|
|
2629
2629
|
["/converter/grid-filter.converter", ei],
|
|
2630
2630
|
["/converter/row-option.converter", ti],
|
|
@@ -2653,76 +2653,76 @@ function we(i, t, e) {
|
|
|
2653
2653
|
["array", { type: "button-edit" }],
|
|
2654
2654
|
["number", { type: "number-spinner", placeholder: "" }],
|
|
2655
2655
|
["events-editor", { type: "events-editor", hide: !0 }]
|
|
2656
|
-
]),
|
|
2657
|
-
function
|
|
2658
|
-
return () =>
|
|
2659
|
-
}
|
|
2660
|
-
function m(
|
|
2661
|
-
return
|
|
2662
|
-
}
|
|
2663
|
-
function
|
|
2664
|
-
return
|
|
2665
|
-
}
|
|
2666
|
-
function u(
|
|
2667
|
-
const
|
|
2668
|
-
return typeof
|
|
2669
|
-
}
|
|
2670
|
-
function f
|
|
2671
|
-
return Object.keys(
|
|
2672
|
-
const
|
|
2673
|
-
|
|
2674
|
-
const
|
|
2675
|
-
let
|
|
2676
|
-
const
|
|
2656
|
+
]), s = Nt();
|
|
2657
|
+
function l(f, p) {
|
|
2658
|
+
return () => s.parseValueSchema(f, p);
|
|
2659
|
+
}
|
|
2660
|
+
function m(f, p, h) {
|
|
2661
|
+
return f.includes("visible") && p.visible !== void 0 ? typeof p.visible == "boolean" ? () => !!p.visible : p.visible === void 0 ? !0 : l(p.visible, h) : () => !0;
|
|
2662
|
+
}
|
|
2663
|
+
function a(f, p, h) {
|
|
2664
|
+
return f.includes("readonly") && p.readonly !== void 0 ? typeof p.readonly == "boolean" ? () => !!p.readonly : l(p.readonly, h) : () => !1;
|
|
2665
|
+
}
|
|
2666
|
+
function u(f, p) {
|
|
2667
|
+
const h = f.$converter || p;
|
|
2668
|
+
return typeof h == "string" && h && n.has(h) ? n.get(h) || null : h || null;
|
|
2669
|
+
}
|
|
2670
|
+
function c(f, p, h, y, C, V = "", B = "") {
|
|
2671
|
+
return Object.keys(f).map((k) => {
|
|
2672
|
+
const A = w(1), O = k, T = f[k], F = Object.keys(T), j = T.title, L = T.type, I = r.get(L) || { type: "input-group", enableClear: !1 }, P = T.editor ? Object.assign({}, I, T.editor) : Object.assign({}, I), U = m(F, T, p), x = a(F, T, p);
|
|
2673
|
+
P.readonly = P.readonly === void 0 ? x() : P.readonly;
|
|
2674
|
+
const E = T.type === "cascade" ? c(T.properties, p, h, y, C, V, B) : [], R = !0;
|
|
2675
|
+
let N = u(T, B);
|
|
2676
|
+
const q = $({
|
|
2677
2677
|
get() {
|
|
2678
|
-
if (
|
|
2679
|
-
if (["class", "style"].find((
|
|
2680
|
-
return
|
|
2681
|
-
const
|
|
2682
|
-
return Object.prototype.hasOwnProperty.call(
|
|
2678
|
+
if (A.value) {
|
|
2679
|
+
if (["class", "style"].find((Ae) => Ae === O) && !N && (N = n.get("/converter/appearance.converter") || null), N && N.convertFrom)
|
|
2680
|
+
return N.convertFrom(h, k, C, V);
|
|
2681
|
+
const W = h[k];
|
|
2682
|
+
return Object.prototype.hasOwnProperty.call(T, "defaultValue") && (W === void 0 || typeof W == "string" && W === "") ? T.type === "boolean" ? T.defaultValue : T.defaultValue || "" : W;
|
|
2683
2683
|
}
|
|
2684
2684
|
return null;
|
|
2685
2685
|
},
|
|
2686
|
-
set(
|
|
2687
|
-
|
|
2686
|
+
set(W) {
|
|
2687
|
+
A.value += 1, N && N.convertTo ? (N.convertTo(y, k, W, C, V), N.convertTo(h, k, W, C, V)) : (y[k] = W, h[k] = W);
|
|
2688
2688
|
}
|
|
2689
|
-
}), { refreshPanelAfterChanged:
|
|
2690
|
-
return p[
|
|
2689
|
+
}), { refreshPanelAfterChanged: X, description: Oe, isExpand: Le, parentPropertyID: Ue } = T, re = { propertyID: O, propertyName: j, propertyType: L, propertyValue: q, editor: P, visible: U, readonly: x, cascadeConfig: E, hideCascadeTitle: R, refreshPanelAfterChanged: X, description: Oe, isExpand: Le, parentPropertyID: Ue };
|
|
2690
|
+
return p[O] = re, re;
|
|
2691
2691
|
});
|
|
2692
2692
|
}
|
|
2693
|
-
function o(
|
|
2694
|
-
const y = {},
|
|
2695
|
-
return
|
|
2696
|
-
const M =
|
|
2697
|
-
return { categoryId:
|
|
2693
|
+
function o(f, p, h = {}) {
|
|
2694
|
+
const y = {}, C = i[f];
|
|
2695
|
+
return C && C.categories ? Object.keys(C.categories).map((B) => {
|
|
2696
|
+
const M = C.categories[B], k = M == null ? void 0 : M.title, A = c(M.properties || {}, y, {}, h, p);
|
|
2697
|
+
return { categoryId: B, categoryName: k, properties: A };
|
|
2698
2698
|
}) : [];
|
|
2699
2699
|
}
|
|
2700
|
-
function d(
|
|
2701
|
-
const
|
|
2702
|
-
if (
|
|
2703
|
-
const
|
|
2704
|
-
|
|
2705
|
-
|
|
2700
|
+
function d(f, p, h, y, C = "") {
|
|
2701
|
+
const V = p.$ref.schema, B = p.$ref.converter, M = h[V], k = M.type, A = e(M), O = {}, T = i[k];
|
|
2702
|
+
if (T && T.categories) {
|
|
2703
|
+
const F = T.categories[f], j = F == null ? void 0 : F.title;
|
|
2704
|
+
B && Object.keys(F.properties).forEach((P) => {
|
|
2705
|
+
F.properties[P].$converter = B;
|
|
2706
2706
|
});
|
|
2707
|
-
const
|
|
2708
|
-
return { categoryId:
|
|
2707
|
+
const L = (F == null ? void 0 : F.properties) || {}, I = c(L, O, A, M, y, C);
|
|
2708
|
+
return { categoryId: f, categoryName: j, properties: I };
|
|
2709
2709
|
}
|
|
2710
|
-
return { categoryId:
|
|
2711
|
-
}
|
|
2712
|
-
function g(
|
|
2713
|
-
const
|
|
2714
|
-
let k =
|
|
2715
|
-
if (k && Object.keys(k).length
|
|
2716
|
-
const
|
|
2717
|
-
return Object.keys(k.categories).map((
|
|
2718
|
-
const
|
|
2719
|
-
if (
|
|
2720
|
-
|
|
2710
|
+
return { categoryId: f, categoryName: "", properties: [] };
|
|
2711
|
+
}
|
|
2712
|
+
function g(f, p, h, y, C) {
|
|
2713
|
+
const V = f.type, B = e(f), M = {};
|
|
2714
|
+
let k = C || i[V];
|
|
2715
|
+
if (!(k && Object.keys(k).length > 0) && h && h.getPropConfig && (k = h.getPropConfig(y)), k && k.categories) {
|
|
2716
|
+
const O = [];
|
|
2717
|
+
return Object.keys(k.categories).map((T) => {
|
|
2718
|
+
const F = k.categories[T];
|
|
2719
|
+
if (F.$ref) {
|
|
2720
|
+
O.push(d(T, F, f, p, y));
|
|
2721
2721
|
return;
|
|
2722
2722
|
}
|
|
2723
|
-
const
|
|
2724
|
-
|
|
2725
|
-
}),
|
|
2723
|
+
const j = F == null ? void 0 : F.title, L = F == null ? void 0 : F.tabId, I = F == null ? void 0 : F.tabName, P = F == null ? void 0 : F.hide, U = F == null ? void 0 : F.hideTitle, x = c(F.properties || {}, M, B, f, p, y, F.$converter), { setPropertyRelates: E } = F, R = F == null ? void 0 : F.parentPropertyID;
|
|
2724
|
+
O.push({ categoryId: T, categoryName: j, tabId: L, tabName: I, hide: P, properties: x, hideTitle: U, setPropertyRelates: E, parentPropertyID: R });
|
|
2725
|
+
}), O;
|
|
2726
2726
|
}
|
|
2727
2727
|
return [];
|
|
2728
2728
|
}
|
|
@@ -2732,97 +2732,106 @@ function we(i, t, e) {
|
|
|
2732
2732
|
propertyConverterMap: n
|
|
2733
2733
|
};
|
|
2734
2734
|
}
|
|
2735
|
-
const
|
|
2736
|
-
|
|
2737
|
-
const
|
|
2738
|
-
|
|
2739
|
-
function ri(i, t, e = /* @__PURE__ */ new Map(), n = (
|
|
2740
|
-
return
|
|
2735
|
+
const Me = {}, Te = {};
|
|
2736
|
+
Se(Me, Te, kt);
|
|
2737
|
+
const Pe = {}, ke = {}, { resolveSchemaWithDefaultValue: ni } = Ie(Pe, ke), Ve = {}, Be = {};
|
|
2738
|
+
Se(Ve, Be, ni);
|
|
2739
|
+
function ri(i, t, e = /* @__PURE__ */ new Map(), n = (l, m, a, u) => m, r = {}, s = (l) => l) {
|
|
2740
|
+
return Ee[t.title] = t, xe[t.title] = n, Me[t.title] = r, Te[t.title] = s, Pe[t.title] = t, ke[t.title] = n, Ve[t.title] = r, Be[t.title] = s, (l = {}, m = !0) => {
|
|
2741
2741
|
if (!m)
|
|
2742
|
-
return Bt(
|
|
2743
|
-
const
|
|
2744
|
-
return Object.assign(u,
|
|
2742
|
+
return Bt(l, e);
|
|
2743
|
+
const a = Vt(l, t, e), u = Object.keys(i).reduce((c, o) => (c[o] = i[o].default, c), {});
|
|
2744
|
+
return Object.assign(u, a);
|
|
2745
2745
|
};
|
|
2746
2746
|
}
|
|
2747
|
-
const
|
|
2747
|
+
const Ne = Object.assign({}, ne, {
|
|
2748
2748
|
componentId: { type: String, default: "" }
|
|
2749
|
-
}), oi = ri(
|
|
2749
|
+
}), oi = ri(Ne, be, he, ye), si = /* @__PURE__ */ Q({
|
|
2750
2750
|
name: "FFilterBarDesign",
|
|
2751
|
-
props:
|
|
2751
|
+
props: Ne,
|
|
2752
2752
|
emits: ["Clear", "Remove", "Reset"],
|
|
2753
2753
|
setup(i, t) {
|
|
2754
|
-
const e =
|
|
2755
|
-
filterFields:
|
|
2756
|
-
filterItems:
|
|
2757
|
-
loadFilterItems:
|
|
2758
|
-
} =
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2754
|
+
const e = w(!1), n = w(!1), r = w(!1), s = w(null), l = Ct(i), {
|
|
2755
|
+
filterFields: m,
|
|
2756
|
+
filterItems: a,
|
|
2757
|
+
loadFilterItems: u
|
|
2758
|
+
} = l, c = w(0), o = w(), d = _("design-item-context"), g = _("designer-host-service"), f = Pt(d, g), p = De(o, d, f), h = Fe(s, r), {
|
|
2759
|
+
cancelWidthObserver: y,
|
|
2760
|
+
setupWidthObserver: C
|
|
2761
|
+
} = h, {
|
|
2762
|
+
resolveEditorProps: V
|
|
2763
|
+
} = ve();
|
|
2764
|
+
ce("useFilterItemsComposition", {
|
|
2765
|
+
useFilterItemsComposition: l,
|
|
2766
|
+
resolveEditorProps: V
|
|
2766
2767
|
});
|
|
2767
|
-
const
|
|
2768
|
-
const
|
|
2769
|
-
display:
|
|
2768
|
+
const B = $(() => {
|
|
2769
|
+
const F = {
|
|
2770
|
+
display: m.value && m.value.length ? "" : "none"
|
|
2770
2771
|
};
|
|
2771
|
-
return
|
|
2772
|
+
return pe(F, i == null ? void 0 : i.customStyle);
|
|
2772
2773
|
});
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
}),
|
|
2776
|
-
|
|
2774
|
+
K(() => {
|
|
2775
|
+
o.value.componentInstance = p, C();
|
|
2776
|
+
}), fe(() => {
|
|
2777
|
+
y();
|
|
2778
|
+
}), t.expose(p.value), ue(() => i.fields, (F) => {
|
|
2779
|
+
u(F, []), c.value++;
|
|
2777
2780
|
}, {
|
|
2778
2781
|
immediate: !0
|
|
2779
2782
|
});
|
|
2780
|
-
const M =
|
|
2783
|
+
const M = $(() => n.value && e.value), k = $(() => ({
|
|
2781
2784
|
"f-filter-list": !0,
|
|
2782
2785
|
"f-filter-list-extend": M.value
|
|
2783
|
-
}))
|
|
2784
|
-
function
|
|
2785
|
-
return
|
|
2786
|
+
}));
|
|
2787
|
+
function A() {
|
|
2788
|
+
return b("div", {
|
|
2786
2789
|
class: k.value,
|
|
2787
|
-
|
|
2788
|
-
}, [
|
|
2789
|
-
filterItem:
|
|
2790
|
+
key: i.id + "-main-" + c.value
|
|
2791
|
+
}, [a.value.map((F, j) => b(wt, {
|
|
2792
|
+
filterItem: F
|
|
2790
2793
|
}, null))]);
|
|
2791
2794
|
}
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
return C("div", {
|
|
2795
|
+
function O() {
|
|
2796
|
+
return r.value && b("div", {
|
|
2795
2797
|
class: "f-filter-list-ellipsis"
|
|
2796
|
-
}, [
|
|
2798
|
+
}, [G("...")]);
|
|
2797
2799
|
}
|
|
2798
|
-
const
|
|
2799
|
-
return () =>
|
|
2800
|
-
ref:
|
|
2800
|
+
const T = Ft(i, t, l);
|
|
2801
|
+
return () => b("div", {
|
|
2802
|
+
ref: o,
|
|
2801
2803
|
class: "f-filter-wrapper " + i.customClass,
|
|
2802
|
-
style:
|
|
2803
|
-
}, [
|
|
2804
|
+
style: B.value
|
|
2805
|
+
}, [b("div", {
|
|
2804
2806
|
class: "f-filter-wrapper-inner f-utils-fill"
|
|
2805
|
-
}, [
|
|
2806
|
-
class: "f-filter-main f-utils-fill"
|
|
2807
|
+
}, [b("div", {
|
|
2808
|
+
class: "f-filter-main f-utils-fill"
|
|
2809
|
+
}, [b("div", {
|
|
2810
|
+
class: "f-filter-list-wrapper flex-fill",
|
|
2807
2811
|
ref: s
|
|
2808
|
-
}, [
|
|
2809
|
-
class: "f-filter-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
+
}, [A()]), O(), T()]), r.value && b("div", {
|
|
2813
|
+
class: "f-filter-extend-btn"
|
|
2814
|
+
}, [b("button", {
|
|
2815
|
+
class: "btn btn-link"
|
|
2816
|
+
}, [b("span", {
|
|
2817
|
+
class: "extend-btn-text"
|
|
2818
|
+
}, [G("展开")]), b("span", {
|
|
2819
|
+
class: "extend-btn-arrow f-icon f-icon-arrow-chevron-down"
|
|
2820
|
+
}, null)])])])]);
|
|
2812
2821
|
}
|
|
2813
2822
|
});
|
|
2814
|
-
|
|
2815
|
-
i.component(
|
|
2823
|
+
D.install = (i) => {
|
|
2824
|
+
i.component(D.name, D);
|
|
2816
2825
|
};
|
|
2817
|
-
|
|
2818
|
-
i["filter-bar"] =
|
|
2826
|
+
D.register = (i, t, e, n) => {
|
|
2827
|
+
i["filter-bar"] = D, t["filter-bar"] = ut;
|
|
2819
2828
|
};
|
|
2820
|
-
|
|
2821
|
-
i["filter-bar"] =
|
|
2829
|
+
D.registerDesigner = (i, t, e) => {
|
|
2830
|
+
i["filter-bar"] = si, t["filter-bar"] = oi;
|
|
2822
2831
|
};
|
|
2823
2832
|
export {
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2833
|
+
D as FFilterBar,
|
|
2834
|
+
D as default,
|
|
2835
|
+
ne as filterBarProps,
|
|
2836
|
+
ut as propsResolver
|
|
2828
2837
|
};
|