@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,89 +1,13 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
import nt from "../../designer/capsule/index.esm.js";
|
|
12
|
-
import be from "../../designer/checkbox/index.esm.js";
|
|
13
|
-
import Ce from "../../designer/checkbox-group/index.esm.js";
|
|
14
|
-
import rt from "../combo-list/index.esm.js";
|
|
15
|
-
import it from "../combo-tree/index.esm.js";
|
|
16
|
-
import ot from "../component/index.esm.js";
|
|
17
|
-
import st from "../color-picker/index.esm.js";
|
|
18
|
-
import at from "../content-container/index.esm.js";
|
|
19
|
-
import lt from "../../designer/date-picker/index.esm.js";
|
|
20
|
-
import dt from "../../designer/data-grid/index.esm.js";
|
|
21
|
-
import ct from "../dropdown/index.esm.js";
|
|
22
|
-
import ut from "../../designer/dynamic-form/index.esm.js";
|
|
23
|
-
import pt from "../events-editor/index.esm.js";
|
|
24
|
-
import ft from "../filter-bar/index.esm.js";
|
|
25
|
-
import mt from "../field-selector/index.esm.js";
|
|
26
|
-
import gt from "../binding-selector/index.esm.js";
|
|
27
|
-
import vt from "../image-cropper/index.esm.js";
|
|
28
|
-
import yt from "../../designer/input-group/index.esm.js";
|
|
29
|
-
import ht from "../layout/index.esm.js";
|
|
30
|
-
import bt from "../list-nav/index.esm.js";
|
|
31
|
-
import Ct from "../../designer/list-view/index.esm.js";
|
|
32
|
-
import Ft from "../lookup/index.esm.js";
|
|
33
|
-
import wt from "../mapping-editor/index.esm.js";
|
|
34
|
-
import Et from "../nav/index.esm.js";
|
|
35
|
-
import St from "../number-range/index.esm.js";
|
|
36
|
-
import xt from "../../designer/number-spinner/index.esm.js";
|
|
37
|
-
import Pt from "../order/index.esm.js";
|
|
38
|
-
import Tt from "../page-header/index.esm.js";
|
|
39
|
-
import It from "../page-footer/index.esm.js";
|
|
40
|
-
import kt from "../pagination/index.esm.js";
|
|
41
|
-
import Vt from "../progress/index.esm.js";
|
|
42
|
-
import Mt from "../query-solution/index.esm.js";
|
|
43
|
-
import Bt from "../../designer/radio-group/index.esm.js";
|
|
44
|
-
import Nt from "../../designer/rate/index.esm.js";
|
|
45
|
-
import Lt from "../../designer/response-toolbar/index.esm.js";
|
|
46
|
-
import Ot from "../response-layout/index.esm.js";
|
|
47
|
-
import $t from "../../designer/response-layout-editor/index.esm.js";
|
|
48
|
-
import Ut from "../search-box/index.esm.js";
|
|
49
|
-
import Rt from "../../designer/section/index.esm.js";
|
|
50
|
-
import At from "../smoke-detector/index.esm.js";
|
|
51
|
-
import qt from "../splitter/index.esm.js";
|
|
52
|
-
import Dt from "../step/index.esm.js";
|
|
53
|
-
import jt from "../../designer/switch/index.esm.js";
|
|
54
|
-
import Gt from "../../designer/tabs/index.esm.js";
|
|
55
|
-
import Wt from "../../designer/tags/index.esm.js";
|
|
56
|
-
import zt from "../text/index.esm.js";
|
|
57
|
-
import _t from "../../designer/time-picker/index.esm.js";
|
|
58
|
-
import Xt from "../transfer/index.esm.js";
|
|
59
|
-
import Ht from "../tree-view/index.esm.js";
|
|
60
|
-
import Jt from "../uploader/index.esm.js";
|
|
61
|
-
import Qt from "../verify-detail/index.esm.js";
|
|
62
|
-
import Yt from "../video/index.esm.js";
|
|
63
|
-
import Zt from "../../designer/textarea/index.esm.js";
|
|
64
|
-
import Kt from "../schema-selector/index.esm.js";
|
|
65
|
-
import en from "../../designer/tree-grid/index.esm.js";
|
|
66
|
-
import tn from "../event-parameter/index.esm.js";
|
|
67
|
-
import nn from "../filter-condition-editor/index.esm.js";
|
|
68
|
-
import rn from "../fieldset/index.esm.js";
|
|
69
|
-
import on from "../sort-condition-editor/index.esm.js";
|
|
70
|
-
import sn from "../menu-lookup/index.esm.js";
|
|
71
|
-
import an from "../../designer/drawer/index.esm.js";
|
|
72
|
-
import ln from "../json-editor/index.esm.js";
|
|
73
|
-
import dn from "../property-editor/index.esm.js";
|
|
74
|
-
import cn from "../expression-editor/index.esm.js";
|
|
75
|
-
import un from "../code-editor/index.esm.js";
|
|
76
|
-
import pn from "../html-template/index.esm.js";
|
|
77
|
-
import fn from "../collection-property-editor/index.esm.js";
|
|
78
|
-
import mn from "../../designer/modal/index.esm.js";
|
|
79
|
-
import gn from "../external-container/index.esm.js";
|
|
80
|
-
import vn from "../language-textbox/index.esm.js";
|
|
81
|
-
import yn from "../image/index.esm.js";
|
|
82
|
-
import hn from "../comment/index.esm.js";
|
|
83
|
-
import { createPropsResolver as bn } from "../dynamic-resolver/index.esm.js";
|
|
84
|
-
import { useThirdComponent as Cn, FormSchemaEntityField$Type as Fe, FormSchemaEntityFieldType$Type as Fn } from "../common/index.esm.js";
|
|
85
|
-
import { DgControl as v, canvasChanged as de, refreshCanvas as wn } from "../designer-canvas/index.esm.js";
|
|
86
|
-
const En = {
|
|
1
|
+
var Le = Object.defineProperty;
|
|
2
|
+
var Ne = (d, n, e) => n in d ? Le(d, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : d[n] = e;
|
|
3
|
+
var I = (d, n, e) => Ne(d, typeof n != "symbol" ? n + "" : n, e);
|
|
4
|
+
import { defineComponent as X, ref as F, computed as se, watch as D, reactive as Ue, createVNode as m, withDirectives as re, resolveDirective as $e, Fragment as oe, inject as ee, onMounted as te, onBeforeMount as Ae, vModelText as Oe, createTextVNode as Re, nextTick as le } from "vue";
|
|
5
|
+
import { getPropertyConfigBySchemaForDesigner as _ } from "../dynamic-resolver/index.esm.js";
|
|
6
|
+
import { FDynamicFormGroup as qe } from "../../designer/dynamic-form/index.esm.js";
|
|
7
|
+
import { debounce as We, cloneDeep as Ge } from "lodash-es";
|
|
8
|
+
import { DgControl as l, canvasChanged as W, refreshCanvas as De } from "../designer-canvas/index.esm.js";
|
|
9
|
+
import { FormSchemaEntityField$Type as ie, FormSchemaEntityFieldType$Type as je } from "../common/index.esm.js";
|
|
10
|
+
const Ke = {
|
|
87
11
|
width: { type: String, default: "300px" },
|
|
88
12
|
height: { type: Number, default: 10 },
|
|
89
13
|
isWidePanel: { type: Boolean, default: !1 },
|
|
@@ -111,554 +35,7 @@ const En = {
|
|
|
111
35
|
schema: { type: Object, default: {} },
|
|
112
36
|
/** 属性变更后事件 */
|
|
113
37
|
propertyChanged: { type: Function }
|
|
114
|
-
}
|
|
115
|
-
function Sn(e = {}) {
|
|
116
|
-
function n(p, m, s, c) {
|
|
117
|
-
if (typeof s == "number")
|
|
118
|
-
return c[p].length === s;
|
|
119
|
-
if (typeof s == "object") {
|
|
120
|
-
const f = Object.keys(s)[0], l = s[f];
|
|
121
|
-
if (f === "not")
|
|
122
|
-
return Number(c[p].length) !== Number(l);
|
|
123
|
-
if (f === "moreThan")
|
|
124
|
-
return Number(c[p].length) >= Number(l);
|
|
125
|
-
if (f === "lessThan")
|
|
126
|
-
return Number(c[p].length) <= Number(l);
|
|
127
|
-
}
|
|
128
|
-
return !1;
|
|
129
|
-
}
|
|
130
|
-
function t(p, m, s, c) {
|
|
131
|
-
return c[p] && c[p].propertyValue && String(c[p].propertyValue.value) === String(s);
|
|
132
|
-
}
|
|
133
|
-
const r = /* @__PURE__ */ new Map([
|
|
134
|
-
["length", n],
|
|
135
|
-
["getProperty", t]
|
|
136
|
-
]);
|
|
137
|
-
Object.keys(e).reduce((p, m) => (p.set(m, e[m]), p), r);
|
|
138
|
-
function i(p, m) {
|
|
139
|
-
const s = p;
|
|
140
|
-
return typeof m == "number" ? [{ target: s, operator: "length", param: null, value: Number(m) }] : typeof m == "boolean" ? [{ target: s, operator: "getProperty", param: p, value: !!m }] : typeof m == "object" ? Object.keys(m).map((c) => {
|
|
141
|
-
if (c === "length")
|
|
142
|
-
return { target: s, operator: "length", param: null, value: m[c] };
|
|
143
|
-
const f = c, l = m[c];
|
|
144
|
-
return { target: s, operator: "getProperty", param: f, value: l };
|
|
145
|
-
}) : [];
|
|
146
|
-
}
|
|
147
|
-
function o(p) {
|
|
148
|
-
return Object.keys(p).reduce((s, c) => {
|
|
149
|
-
const f = i(c, p[c]);
|
|
150
|
-
return s.push(...f), s;
|
|
151
|
-
}, []);
|
|
152
|
-
}
|
|
153
|
-
function a(p, m) {
|
|
154
|
-
if (r.has(p.operator)) {
|
|
155
|
-
const s = r.get(p.operator);
|
|
156
|
-
return s && s(p.target, p.param, p.value, m) || !1;
|
|
157
|
-
}
|
|
158
|
-
return !1;
|
|
159
|
-
}
|
|
160
|
-
function g(p, m) {
|
|
161
|
-
return o(p).reduce((f, l) => f && a(l, m), !0);
|
|
162
|
-
}
|
|
163
|
-
function d(p, m) {
|
|
164
|
-
const s = Object.keys(p), c = s.includes("allOf"), f = s.includes("anyOf"), l = c || f, S = (l ? p[l ? c ? "allOf" : "anyOf" : "allOf"] : [p]).map((R) => g(R, m));
|
|
165
|
-
return c ? !S.includes(!1) : S.includes(!0);
|
|
166
|
-
}
|
|
167
|
-
return { parseValueSchema: d };
|
|
168
|
-
}
|
|
169
|
-
const xn = {
|
|
170
|
-
convertTo: (e, n, t, r) => {
|
|
171
|
-
e.appearance || (e.appearance = {}), e.appearance[n] = t;
|
|
172
|
-
},
|
|
173
|
-
convertFrom: (e, n, t) => e.appearance ? e.appearance[n] : e[n]
|
|
174
|
-
}, Pn = {
|
|
175
|
-
convertFrom: (e, n, t) => e.buttons && e.buttons.length ? `共 ${e.buttons.length} 项` : "无"
|
|
176
|
-
}, Tn = {
|
|
177
|
-
convertTo: (e, n, t, r) => {
|
|
178
|
-
e.editor && (e.editor[n] = t);
|
|
179
|
-
},
|
|
180
|
-
convertFrom: (e, n, t) => e.editor && Object.prototype.hasOwnProperty.call(e.editor, n) ? e.editor[n] : e[n]
|
|
181
|
-
}, In = {
|
|
182
|
-
button: { type: "button", name: "按钮" },
|
|
183
|
-
"response-toolbar": { type: "response-toolbar", name: "工具栏" },
|
|
184
|
-
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮" },
|
|
185
|
-
"content-container": { type: "content-container", name: "容器" },
|
|
186
|
-
"input-group": { type: "input-group", name: "文本" },
|
|
187
|
-
textarea: { type: "textarea", name: "多行文本" },
|
|
188
|
-
lookup: { type: "lookup", name: "帮助" },
|
|
189
|
-
"number-spinner": { type: "number-spinner", name: "数值" },
|
|
190
|
-
"date-picker": { type: "date-picker", name: "日期" },
|
|
191
|
-
switch: { type: "switch", name: "开关" },
|
|
192
|
-
"radio-group": { type: "radio-group", name: "单选组" },
|
|
193
|
-
"check-box": { type: "check-box", name: "复选框" },
|
|
194
|
-
"check-group": { type: "check-group", name: "复选框组" },
|
|
195
|
-
"combo-list": { type: "combo-list", name: "下拉列表" },
|
|
196
|
-
"response-form": { type: "response-form", name: "卡片面板" },
|
|
197
|
-
"response-layout": { type: "response-layout", name: "布局容器", icon: "response-layout-3" },
|
|
198
|
-
"response-layout-item": { type: "response-layout-item", name: "布局", icon: "response-layout-1" },
|
|
199
|
-
"tree-grid": { type: "tree-grid", name: "树表格" },
|
|
200
|
-
"tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
|
|
201
|
-
"data-grid": { type: "data-grid", name: "表格" },
|
|
202
|
-
"data-grid-column": { type: "data-grid-column", name: "表格列" },
|
|
203
|
-
module: { type: "Module", name: "模块" },
|
|
204
|
-
component: { type: "component", name: "组件" },
|
|
205
|
-
tabs: { type: "tabs", name: "标签页" },
|
|
206
|
-
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
207
|
-
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮" },
|
|
208
|
-
"html-template": { type: "html-template", name: "模板容器" },
|
|
209
|
-
"time-picker": { type: "time-picker", name: "时间选择" },
|
|
210
|
-
section: { type: "section", name: "分组面板" },
|
|
211
|
-
"section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
|
|
212
|
-
"section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
|
|
213
|
-
splitter: { type: "splitter", name: "分栏面板" },
|
|
214
|
-
"splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
|
|
215
|
-
"component-ref": { type: "component-ref", name: "组件引用节点" },
|
|
216
|
-
uploader: { type: "uploader", name: "附件上传" },
|
|
217
|
-
"page-header": { type: "page-header", name: "页头" },
|
|
218
|
-
"page-footer": { type: "page-footer", name: "页脚" },
|
|
219
|
-
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏" },
|
|
220
|
-
fieldset: { type: "fieldset", name: "分组" },
|
|
221
|
-
"query-solution": { type: "query-solution", name: "筛选方案" },
|
|
222
|
-
drawer: { type: "drawer", name: "抽屉" },
|
|
223
|
-
"external-container": { type: "external-container", name: "外部容器", icon: "content-container" },
|
|
224
|
-
"list-nav": { type: "list-nav", name: "列表导航" },
|
|
225
|
-
"list-view": { type: "list-view", name: "列表" },
|
|
226
|
-
"filter-bar": { type: "filter-bar", name: "筛选条" },
|
|
227
|
-
"language-textbox": { type: "language-textbox", name: "多语输入框" },
|
|
228
|
-
image: { type: "image", name: "图像" },
|
|
229
|
-
"discussion-editor": { type: "discussion-editor", name: "评论编辑区" },
|
|
230
|
-
"discussion-list": { type: "discussion-list", name: "评论列表" },
|
|
231
|
-
comment: { type: "comment", name: "评论区" },
|
|
232
|
-
"rich-text-editor": { type: "rich-text-editor", name: "富文本编辑器", icon: "rich-text-box" },
|
|
233
|
-
calendar: { type: "calendar", name: "日历", icon: "date-picker" }
|
|
234
|
-
}, kn = {
|
|
235
|
-
convertFrom: (e, n, t) => {
|
|
236
|
-
var i;
|
|
237
|
-
const r = e.editor && e.editor[n] ? e.editor[n] : e[n];
|
|
238
|
-
return ((i = In[r]) == null ? void 0 : i.name) || r;
|
|
239
|
-
}
|
|
240
|
-
}, Vn = {
|
|
241
|
-
convertTo: (e, n, t, r) => {
|
|
242
|
-
e[n] = e[n];
|
|
243
|
-
},
|
|
244
|
-
convertFrom: (e, n, t) => e.editor ? t.getRealEditorType(e.editor.type) : ""
|
|
245
|
-
}, Mn = {
|
|
246
|
-
convertTo: (e, n, t, r) => {
|
|
247
|
-
(e.type === "data-grid-column" || e.type === "tree-grid-column") && (e.formatter ? e.formatter[n] = t : e.formatter = {
|
|
248
|
-
[n]: t
|
|
249
|
-
});
|
|
250
|
-
},
|
|
251
|
-
convertFrom: (e, n, t) => {
|
|
252
|
-
if (e.formatter) {
|
|
253
|
-
if (n === "trueText")
|
|
254
|
-
return e.formatter.trueText;
|
|
255
|
-
if (n === "falseText")
|
|
256
|
-
return e.formatter.falseText;
|
|
257
|
-
if (n === "prefix")
|
|
258
|
-
return e.formatter.prefix;
|
|
259
|
-
if (n === "suffix")
|
|
260
|
-
return e.formatter.suffix;
|
|
261
|
-
if (n === "precision")
|
|
262
|
-
return e.formatter.precision;
|
|
263
|
-
if (n === "decimal")
|
|
264
|
-
return e.formatter.decimal;
|
|
265
|
-
if (n === "thousand")
|
|
266
|
-
return e.formatter.thousand;
|
|
267
|
-
if (n === "dateFormat")
|
|
268
|
-
return e.formatter.dateFormat || "yyyy-MM-dd";
|
|
269
|
-
if (n === "customFormat")
|
|
270
|
-
return e.formatter.customFormat;
|
|
271
|
-
if (n === "type")
|
|
272
|
-
return e.formatter.type || "none";
|
|
273
|
-
}
|
|
274
|
-
return "none";
|
|
275
|
-
}
|
|
276
|
-
}, Bn = {
|
|
277
|
-
convertTo: (e, n, t, r) => {
|
|
278
|
-
e.command ? e.command[n] = t : e.command = {
|
|
279
|
-
[n]: t
|
|
280
|
-
}, n === "enableType" && t === "default" && (e.command.enable = !0, e.command.commands = [
|
|
281
|
-
{
|
|
282
|
-
text: "编辑",
|
|
283
|
-
type: "primary",
|
|
284
|
-
command: "edit"
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
text: "删除",
|
|
288
|
-
type: "danger",
|
|
289
|
-
command: "remove"
|
|
290
|
-
}
|
|
291
|
-
]), n === "enableType" && t === "custom" && (e.command.enable = !0, e.command.commands = [
|
|
292
|
-
{
|
|
293
|
-
value: "add",
|
|
294
|
-
text: "增加",
|
|
295
|
-
type: "link"
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
value: "edit",
|
|
299
|
-
text: "编辑",
|
|
300
|
-
type: "danger"
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
value: "remove",
|
|
304
|
-
text: "删除",
|
|
305
|
-
type: "remove"
|
|
306
|
-
}
|
|
307
|
-
]), n === "enableType" && t === "unable" && (e.command.enable = !1);
|
|
308
|
-
},
|
|
309
|
-
convertFrom: (e, n, t) => {
|
|
310
|
-
var r, i;
|
|
311
|
-
if (e.command) {
|
|
312
|
-
if (n === "enableType") {
|
|
313
|
-
const o = (i = (r = e.command) == null ? void 0 : r.commands) == null ? void 0 : i.find((a) => a.command === "edit" && a.type === "primary");
|
|
314
|
-
return e.command.enable ? o ? "default" : "custom" : "unable";
|
|
315
|
-
}
|
|
316
|
-
if (n === "commands")
|
|
317
|
-
return e.command.enableType === "custom" ? e.command.commands : [];
|
|
318
|
-
if (n === "formatter")
|
|
319
|
-
return e.command.formatter;
|
|
320
|
-
}
|
|
321
|
-
return "";
|
|
322
|
-
}
|
|
323
|
-
}, Nn = {
|
|
324
|
-
convertTo: (e, n, t, r) => {
|
|
325
|
-
e.column ? e.column[n] = t : e.column = {
|
|
326
|
-
[n]: t
|
|
327
|
-
}, n === "fitColumns" && t && (e.column.fitMode || (e.column.fitMode = "average"));
|
|
328
|
-
},
|
|
329
|
-
convertFrom: (e, n, t) => {
|
|
330
|
-
if (e.column) {
|
|
331
|
-
if (n === "fitColumns")
|
|
332
|
-
return e.column.fitColumns;
|
|
333
|
-
if (n === "fitMode")
|
|
334
|
-
return e.column.fitMode;
|
|
335
|
-
}
|
|
336
|
-
return "";
|
|
337
|
-
}
|
|
338
|
-
}, Ln = {
|
|
339
|
-
convertTo: (e, n, t, r) => {
|
|
340
|
-
e.summary ? e.summary[n] = t : e.summary = {
|
|
341
|
-
[n]: t
|
|
342
|
-
}, n === "enable" && t && (e.summary ? e.summary.groupFields || (e.summary.groupFields = []) : e.summary = {
|
|
343
|
-
enable: t,
|
|
344
|
-
groupFields: []
|
|
345
|
-
});
|
|
346
|
-
},
|
|
347
|
-
convertFrom: (e, n, t) => e.summary && n === "enable" ? e.summary.enable : e.type === "data-grid-column" ? e.enableSummary === void 0 ? !1 : e.enableSummary : ""
|
|
348
|
-
}, On = {
|
|
349
|
-
convertTo: (e, n, t, r) => {
|
|
350
|
-
e.group ? e.group[n] = t : e.group = {
|
|
351
|
-
[n]: t
|
|
352
|
-
}, n === "enable" && t && (e.group ? e.group.groupFields || (e.group.groupFields = []) : e.group = {
|
|
353
|
-
enable: t,
|
|
354
|
-
groupFields: [],
|
|
355
|
-
showSummary: !1
|
|
356
|
-
});
|
|
357
|
-
},
|
|
358
|
-
convertFrom: (e, n, t) => {
|
|
359
|
-
if (e.group) {
|
|
360
|
-
if (n === "enable")
|
|
361
|
-
return e.group.enable;
|
|
362
|
-
if (n === "showSummary")
|
|
363
|
-
return e.group.showSummary;
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
}, $n = {
|
|
367
|
-
convertFrom: (e, n) => e.binding ? e.binding.path : "",
|
|
368
|
-
convertTo: (e, n, t) => {
|
|
369
|
-
if (t && t.length > 0) {
|
|
370
|
-
const r = t[0];
|
|
371
|
-
e.binding || (e.binding = {}), e.binding.type = "Form", e.binding.path = r.bindingField, e.binding.field = r.id, e.binding.fullPath = r.path, e.path = r.bindingPath;
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
}, Un = {
|
|
375
|
-
convertTo: (e, n, t, r) => {
|
|
376
|
-
e.pagination || (e.pagination = {}), e.pagination[n] = t;
|
|
377
|
-
},
|
|
378
|
-
convertFrom: (e, n, t) => e.pagination ? e.pagination[n] : e[n]
|
|
379
|
-
}, Rn = {
|
|
380
|
-
convertTo: (e, n, t, r) => {
|
|
381
|
-
e.rowNumber || (e.rowNumber = {}), e.rowNumber[n] = t;
|
|
382
|
-
},
|
|
383
|
-
convertFrom: (e, n, t) => e.rowNumber ? e.rowNumber[n] : e[n]
|
|
384
|
-
}, An = {
|
|
385
|
-
convertTo: (e, n, t, r) => {
|
|
386
|
-
e.selection || (e.selection = {}), e.selection[n] = t;
|
|
387
|
-
},
|
|
388
|
-
convertFrom: (e, n, t) => {
|
|
389
|
-
var r, i;
|
|
390
|
-
return n === "showCheckbox" ? (r = e.selection) != null && r.multiSelect ? !0 : (i = e.selection) == null ? void 0 : i.showCheckbox : e.selection ? e.selection[n] : e[n];
|
|
391
|
-
}
|
|
392
|
-
}, qn = {
|
|
393
|
-
convertFrom: (e, n, t) => e[n] && e[n].length ? `共 ${e[n].length} 项` : ""
|
|
394
|
-
}, Dn = {
|
|
395
|
-
convertFrom: (e, n) => e[n] || "",
|
|
396
|
-
convertTo: (e, n, t) => {
|
|
397
|
-
e[n] = t;
|
|
398
|
-
}
|
|
399
|
-
}, jn = {
|
|
400
|
-
convertTo: (e, n, t, r) => {
|
|
401
|
-
e.size || (e.size = {}), e.size[n] = t;
|
|
402
|
-
},
|
|
403
|
-
convertFrom: (e, n, t) => e.size ? e.size[n] : e[n]
|
|
404
|
-
}, Gn = {
|
|
405
|
-
convertFrom: (e, n, t) => {
|
|
406
|
-
var r, i;
|
|
407
|
-
return (r = e.formatter) != null && r.data && n === "formatterEnumData" && !e.formatterEnumData ? (i = e.formatter) == null ? void 0 : i.data : e.formatterEnumData;
|
|
408
|
-
}
|
|
409
|
-
}, Wn = {
|
|
410
|
-
convertTo: (e, n, t, r) => {
|
|
411
|
-
e.sort || (e.sort = {}), e.sort[n] = t;
|
|
412
|
-
},
|
|
413
|
-
convertFrom: (e, n, t) => {
|
|
414
|
-
var r, i;
|
|
415
|
-
if (n === "mode")
|
|
416
|
-
return ((r = e.sort) == null ? void 0 : r.mode) || "client";
|
|
417
|
-
if (n === "multiSort")
|
|
418
|
-
return !!((i = e.sort) != null && i.multiSort);
|
|
419
|
-
}
|
|
420
|
-
}, zn = {
|
|
421
|
-
convertTo: (e, n, t, r) => {
|
|
422
|
-
e.filter || (e.filter = {}), e.filter[n] = t;
|
|
423
|
-
},
|
|
424
|
-
convertFrom: (e, n, t) => {
|
|
425
|
-
var r;
|
|
426
|
-
if (n === "mode")
|
|
427
|
-
return ((r = e.filter) == null ? void 0 : r.mode) || "client";
|
|
428
|
-
}
|
|
429
|
-
}, _n = {
|
|
430
|
-
convertTo: (e, n, t, r) => {
|
|
431
|
-
e.rowOption ? e.rowOption[n] = t : e.rowOption = {
|
|
432
|
-
[n]: t
|
|
433
|
-
};
|
|
434
|
-
},
|
|
435
|
-
convertFrom: (e, n, t) => {
|
|
436
|
-
if (e.rowOption) {
|
|
437
|
-
if (n === "customRowStyle")
|
|
438
|
-
return e.rowOption.customRowStyle;
|
|
439
|
-
if (n === "customCellStyle")
|
|
440
|
-
return e.rowOption.customCellStyle;
|
|
441
|
-
}
|
|
442
|
-
return "";
|
|
443
|
-
}
|
|
444
|
-
}, Xn = {
|
|
445
|
-
convertTo: (e, n, t, r) => {
|
|
446
|
-
(e.type === "data-grid-column" || e.type === "tree-grid-column") && (e[n] = t, n === "columnTemplateType" && t === "hyperlink" && (e.onClickLinkCommand ? e.columnTemplate = `
|
|
447
|
-
<span class="f-pretend-link f-cursor-pointer"
|
|
448
|
-
@click="(ctx)=>viewModel.current.${e.onClickLinkCommand || ""}({id: rowData.id,context: ctx})">
|
|
449
|
-
{{rowData.${e.field}}}
|
|
450
|
-
</span>` : e.columnTemplate = `
|
|
451
|
-
<span class="f-pretend-link f-cursor-pointer">
|
|
452
|
-
{{rowData.${e.field}}}
|
|
453
|
-
</span>`), n === "columnTemplateType" && t === "default" && (e.columnTemplate = ""), n === "columnTemplateType" && t === "custom" && (e.columnTemplate = ""));
|
|
454
|
-
},
|
|
455
|
-
convertFrom: (e, n, t) => n === "columnTemplate" ? e.columnTemplate : n === "columnTemplateType" ? e.columnTemplateType ? e.columnTemplateType || "default" : e.columnTemplate && !e.onClickLinkCommand ? "custom" : e.columnTemplate && e.onClickLinkCommand ? "hyperlink" : "default" : ""
|
|
456
|
-
};
|
|
457
|
-
function Hn(e, n, t) {
|
|
458
|
-
const r = /* @__PURE__ */ new Map([
|
|
459
|
-
["/converter/appearance.converter", xn],
|
|
460
|
-
["/converter/buttons.converter", Pn],
|
|
461
|
-
["/converter/property-editor.converter", Tn],
|
|
462
|
-
["/converter/items-count.converter", qn],
|
|
463
|
-
["/converter/type.converter", kn],
|
|
464
|
-
["/converter/change-editor.converter", Vn],
|
|
465
|
-
["/converter/change-formatter.converter", Mn],
|
|
466
|
-
["/converter/column-command.converter", Bn],
|
|
467
|
-
["/converter/column-option.converter", Nn],
|
|
468
|
-
["/converter/summary.converter", Ln],
|
|
469
|
-
["/converter/group.converter", On],
|
|
470
|
-
["/converter/form-group-label.converter", Dn],
|
|
471
|
-
["/converter/field-selector.converter", $n],
|
|
472
|
-
["/converter/pagination.converter", Un],
|
|
473
|
-
["/converter/row-number.converter", Rn],
|
|
474
|
-
["/converter/grid-selection.converter", An],
|
|
475
|
-
["/converter/size.converter", jn],
|
|
476
|
-
["/converter/change-formatter-enum.converter", Gn],
|
|
477
|
-
["/converter/grid-sort.converter", Wn],
|
|
478
|
-
["/converter/grid-filter.converter", zn],
|
|
479
|
-
["/converter/row-option.converter", _n],
|
|
480
|
-
["/converter/change-formatter-type.converter", Xn]
|
|
481
|
-
]), i = /* @__PURE__ */ new Map([
|
|
482
|
-
["string", { type: "input-group", enableClear: !1 }],
|
|
483
|
-
["boolean", {
|
|
484
|
-
type: "combo-list",
|
|
485
|
-
textField: "name",
|
|
486
|
-
valueField: "value",
|
|
487
|
-
idField: "value",
|
|
488
|
-
enableClear: !1,
|
|
489
|
-
editable: !1,
|
|
490
|
-
data: [
|
|
491
|
-
{
|
|
492
|
-
value: !0,
|
|
493
|
-
name: "是"
|
|
494
|
-
},
|
|
495
|
-
{
|
|
496
|
-
value: !1,
|
|
497
|
-
name: "否"
|
|
498
|
-
}
|
|
499
|
-
]
|
|
500
|
-
}],
|
|
501
|
-
["enum", { type: "combo-list", maxHeight: 128, enableClear: !1, editable: !1 }],
|
|
502
|
-
["array", { type: "button-edit" }],
|
|
503
|
-
["number", { type: "number-spinner", placeholder: "" }],
|
|
504
|
-
["events-editor", { type: "events-editor", hide: !0 }]
|
|
505
|
-
]), o = Sn();
|
|
506
|
-
function a(l, u) {
|
|
507
|
-
return () => o.parseValueSchema(l, u);
|
|
508
|
-
}
|
|
509
|
-
function g(l, u, y) {
|
|
510
|
-
return l.includes("visible") && u.visible !== void 0 ? typeof u.visible == "boolean" ? () => !!u.visible : u.visible === void 0 ? !0 : a(u.visible, y) : () => !0;
|
|
511
|
-
}
|
|
512
|
-
function d(l, u, y) {
|
|
513
|
-
return l.includes("readonly") && u.readonly !== void 0 ? typeof u.readonly == "boolean" ? () => !!u.readonly : a(u.readonly, y) : () => !1;
|
|
514
|
-
}
|
|
515
|
-
function p(l, u) {
|
|
516
|
-
const y = l.$converter || u;
|
|
517
|
-
return typeof y == "string" && y && r.has(y) ? r.get(y) || null : y || null;
|
|
518
|
-
}
|
|
519
|
-
function m(l, u, y, S, k, R = "", A = "") {
|
|
520
|
-
return Object.keys(l).map((N) => {
|
|
521
|
-
const M = I(1), j = N, P = l[N], U = Object.keys(P), O = P.title, q = P.type, B = i.get(q) || { type: "input-group", enableClear: !1 }, D = P.editor ? Object.assign({}, B, P.editor) : Object.assign({}, B), z = g(U, P, u), X = d(U, P, u);
|
|
522
|
-
D.readonly = D.readonly === void 0 ? X() : D.readonly;
|
|
523
|
-
const H = P.type === "cascade" ? m(P.properties, u, y, S, k, R, A) : [], ne = !0;
|
|
524
|
-
let W = p(P, A);
|
|
525
|
-
const re = _({
|
|
526
|
-
get() {
|
|
527
|
-
if (M.value) {
|
|
528
|
-
if (["class", "style"].find((se) => se === j) && !W && (W = r.get("/converter/appearance.converter") || null), W && W.convertFrom)
|
|
529
|
-
return W.convertFrom(y, N, k, R);
|
|
530
|
-
const J = y[N];
|
|
531
|
-
return Object.prototype.hasOwnProperty.call(P, "defaultValue") && (J === void 0 || typeof J == "string" && J === "") ? P.type === "boolean" ? P.defaultValue : P.defaultValue || "" : J;
|
|
532
|
-
}
|
|
533
|
-
return null;
|
|
534
|
-
},
|
|
535
|
-
set(J) {
|
|
536
|
-
M.value += 1, W && W.convertTo ? (W.convertTo(S, N, J, k, R), W.convertTo(y, N, J, k, R)) : (S[N] = J, y[N] = J);
|
|
537
|
-
}
|
|
538
|
-
}), { refreshPanelAfterChanged: K, description: ie, isExpand: pe, parentPropertyID: Z } = P, oe = { propertyID: j, propertyName: O, propertyType: q, propertyValue: re, editor: D, visible: z, readonly: X, cascadeConfig: H, hideCascadeTitle: ne, refreshPanelAfterChanged: K, description: ie, isExpand: pe, parentPropertyID: Z };
|
|
539
|
-
return u[j] = oe, oe;
|
|
540
|
-
});
|
|
541
|
-
}
|
|
542
|
-
function s(l, u, y = {}) {
|
|
543
|
-
const S = {}, k = e[l];
|
|
544
|
-
return k && k.categories ? Object.keys(k.categories).map((A) => {
|
|
545
|
-
const $ = k.categories[A], N = $ == null ? void 0 : $.title, M = m($.properties || {}, S, {}, y, u);
|
|
546
|
-
return { categoryId: A, categoryName: N, properties: M };
|
|
547
|
-
}) : [];
|
|
548
|
-
}
|
|
549
|
-
function c(l, u, y, S, k = "") {
|
|
550
|
-
const R = u.$ref.schema, A = u.$ref.converter, $ = y[R], N = $.type, M = t($), j = {}, P = e[N];
|
|
551
|
-
if (P && P.categories) {
|
|
552
|
-
const U = P.categories[l], O = U == null ? void 0 : U.title;
|
|
553
|
-
A && Object.keys(U.properties).forEach((D) => {
|
|
554
|
-
U.properties[D].$converter = A;
|
|
555
|
-
});
|
|
556
|
-
const q = (U == null ? void 0 : U.properties) || {}, B = m(q, j, M, $, S, k);
|
|
557
|
-
return { categoryId: l, categoryName: O, properties: B };
|
|
558
|
-
}
|
|
559
|
-
return { categoryId: l, categoryName: "", properties: [] };
|
|
560
|
-
}
|
|
561
|
-
function f(l, u, y, S, k) {
|
|
562
|
-
const R = l.type, A = t(l), $ = {};
|
|
563
|
-
let N = k || e[R];
|
|
564
|
-
if (N && Object.keys(N).length === 0 && y && y.getPropConfig && (N = y.getPropConfig(S)), N && N.categories) {
|
|
565
|
-
const M = [];
|
|
566
|
-
return Object.keys(N.categories).map((j) => {
|
|
567
|
-
const P = N.categories[j];
|
|
568
|
-
if (P.$ref) {
|
|
569
|
-
M.push(c(j, P, l, u, S));
|
|
570
|
-
return;
|
|
571
|
-
}
|
|
572
|
-
const U = P == null ? void 0 : P.title, O = P == null ? void 0 : P.tabId, q = P == null ? void 0 : P.tabName, B = P == null ? void 0 : P.hide, D = P == null ? void 0 : P.hideTitle, z = m(P.properties || {}, $, A, l, u, S, P.$converter), { setPropertyRelates: X } = P, H = P == null ? void 0 : P.parentPropertyID;
|
|
573
|
-
M.push({ categoryId: j, categoryName: U, tabId: O, tabName: q, hide: B, properties: z, hideTitle: D, setPropertyRelates: X, parentPropertyID: H });
|
|
574
|
-
}), M;
|
|
575
|
-
}
|
|
576
|
-
return [];
|
|
577
|
-
}
|
|
578
|
-
return {
|
|
579
|
-
getPropertyConfigBySchema: f,
|
|
580
|
-
getPropertyConfigByType: s,
|
|
581
|
-
propertyConverterMap: r
|
|
582
|
-
};
|
|
583
|
-
}
|
|
584
|
-
function Jn(e, n) {
|
|
585
|
-
let t;
|
|
586
|
-
function r(s) {
|
|
587
|
-
const { properties: c, title: f, ignore: l } = s, u = l && Array.isArray(l), y = Object.keys(c).reduce((S, k) => ((!u || !l.find((R) => R === k)) && (S[k] = c[k].type === "object" && c[k].properties ? r(c[k]) : me(c[k].default)), S), {});
|
|
588
|
-
if (f && (!u || !l.find((S) => S === "id"))) {
|
|
589
|
-
const S = f.toLowerCase().replace(/-/g, "_");
|
|
590
|
-
y.id = `${S}_${Math.random().toString().slice(2, 6)}`;
|
|
591
|
-
}
|
|
592
|
-
return y;
|
|
593
|
-
}
|
|
594
|
-
function i(s) {
|
|
595
|
-
const { properties: c, title: f, required: l } = s;
|
|
596
|
-
if (l && Array.isArray(l)) {
|
|
597
|
-
const u = l.reduce((y, S) => (y[S] = c[S].type === "object" && c[S].properties ? r(c[S]) : me(c[S].default), y), {});
|
|
598
|
-
if (f && l.find((y) => y === "id")) {
|
|
599
|
-
const y = f.toLowerCase().replace(/-/g, "_");
|
|
600
|
-
u.id = `${y}_${Math.random().toString().slice(2, 6)}`;
|
|
601
|
-
}
|
|
602
|
-
return u;
|
|
603
|
-
}
|
|
604
|
-
return {
|
|
605
|
-
type: f
|
|
606
|
-
};
|
|
607
|
-
}
|
|
608
|
-
function o(s, c = {}, f) {
|
|
609
|
-
const l = e[s];
|
|
610
|
-
if (l) {
|
|
611
|
-
let u = i(l);
|
|
612
|
-
const y = n[s];
|
|
613
|
-
return u = y ? y({ getSchemaByType: o }, u, c, f) : u, t != null && t.appendIdentifyForNewControl && t.appendIdentifyForNewControl(u), u;
|
|
614
|
-
}
|
|
615
|
-
return null;
|
|
616
|
-
}
|
|
617
|
-
function a(s, c) {
|
|
618
|
-
const f = r(c);
|
|
619
|
-
return Object.keys(f).reduce((l, u) => (Object.prototype.hasOwnProperty.call(s, u) && (l[u] && he(l[u]) && he(s[u] || !s[u]) ? Object.assign(l[u], s[u] || {}) : l[u] = s[u]), l), f), f;
|
|
620
|
-
}
|
|
621
|
-
function g(s, c) {
|
|
622
|
-
return Object.keys(s).filter((l) => s[l] != null).reduce((l, u) => {
|
|
623
|
-
if (c.has(u)) {
|
|
624
|
-
const y = c.get(u);
|
|
625
|
-
if (typeof y == "string")
|
|
626
|
-
l[y] = s[u];
|
|
627
|
-
else {
|
|
628
|
-
const S = y(u, s[u], s);
|
|
629
|
-
Object.assign(l, S);
|
|
630
|
-
}
|
|
631
|
-
} else
|
|
632
|
-
l[u] = s[u];
|
|
633
|
-
return l;
|
|
634
|
-
}, {});
|
|
635
|
-
}
|
|
636
|
-
function d(s, c, f = /* @__PURE__ */ new Map()) {
|
|
637
|
-
const l = a(s, c);
|
|
638
|
-
return g(l, f);
|
|
639
|
-
}
|
|
640
|
-
function p(s) {
|
|
641
|
-
var f;
|
|
642
|
-
const c = s.type;
|
|
643
|
-
if (c) {
|
|
644
|
-
const l = e[c];
|
|
645
|
-
if (!l)
|
|
646
|
-
return s;
|
|
647
|
-
const u = a(s, l), y = ((f = s.editor) == null ? void 0 : f.type) || "";
|
|
648
|
-
if (y) {
|
|
649
|
-
const S = e[y], k = a(s.editor, S);
|
|
650
|
-
u.editor = k;
|
|
651
|
-
}
|
|
652
|
-
return u;
|
|
653
|
-
}
|
|
654
|
-
return s;
|
|
655
|
-
}
|
|
656
|
-
function m(s) {
|
|
657
|
-
t = s;
|
|
658
|
-
}
|
|
659
|
-
return { getSchemaByType: o, resolveSchemaWithDefaultValue: p, resolveSchemaToProps: d, mappingSchemaToProps: g, setDesignerContext: m };
|
|
660
|
-
}
|
|
661
|
-
const Qn = {}, Yn = {}, { resolveSchemaWithDefaultValue: Zn } = Jn(Qn, Yn), Kn = {}, er = {}, { getPropertyConfigBySchema: fe } = Hn(Kn, er, Zn), tr = {
|
|
38
|
+
}, ze = {
|
|
662
39
|
/** 某一分类下的属性配置 */
|
|
663
40
|
// as PropType<ElementPropertyConfig>
|
|
664
41
|
category: { type: Object, default: {} },
|
|
@@ -667,818 +44,513 @@ const Qn = {}, Yn = {}, { resolveSchemaWithDefaultValue: Zn } = Jn(Qn, Yn), Kn =
|
|
|
667
44
|
propertyData: { type: Object, default: {} },
|
|
668
45
|
valueChanged: { type: Function },
|
|
669
46
|
triggerRefreshPanel: { type: Function }
|
|
670
|
-
},
|
|
47
|
+
}, _e = {
|
|
671
48
|
elementConfig: { type: Object, default: {} },
|
|
672
49
|
category: { type: Object, default: {} }
|
|
673
|
-
},
|
|
674
|
-
id: { type: String, default: "" },
|
|
675
|
-
customClass: { type: String, default: "" },
|
|
676
|
-
customStyle: { type: String, default: "" },
|
|
677
|
-
/** 筛选组件配置器,具体配置项可查看各组件文档 */
|
|
678
|
-
editor: { type: Object, default: {} },
|
|
679
|
-
label: { type: String, default: "" },
|
|
680
|
-
/** value is uncertain because type is uncertain, default value should not be set */
|
|
681
|
-
modelValue: { type: [String, Boolean, Array, Number] },
|
|
682
|
-
// readonly: { type: Boolean, default: false },
|
|
683
|
-
visible: { type: Boolean, default: !0 },
|
|
684
|
-
required: { type: Boolean, default: !1 },
|
|
685
|
-
showLabel: { type: Boolean, default: !0 },
|
|
686
|
-
/**
|
|
687
|
-
* visible相当于showLabel为true,none相当于showLabel为false
|
|
688
|
-
*/
|
|
689
|
-
showLabelType: { type: String, default: "visible" },
|
|
690
|
-
type: { type: String, default: "input-group" },
|
|
691
|
-
componentId: { type: String, default: "" },
|
|
692
|
-
errors: { type: Object, default: null },
|
|
693
|
-
fill: { type: Boolean, default: !1 }
|
|
694
|
-
}, ir = {
|
|
695
|
-
id: { type: String },
|
|
696
|
-
required: { type: Boolean, default: !1 },
|
|
697
|
-
text: { type: String, default: "" },
|
|
698
|
-
title: { type: String },
|
|
699
|
-
valid: { type: Boolean, default: !0 },
|
|
700
|
-
inValidTip: { type: String, default: "" },
|
|
701
|
-
/**
|
|
702
|
-
* 实际支持 'visible'可见 | 'reserve-space' 占位不显示
|
|
703
|
-
*/
|
|
704
|
-
showType: { type: String, default: "visible" }
|
|
705
|
-
}, or = /* @__PURE__ */ te({
|
|
706
|
-
name: "FDynamicFormLabel",
|
|
707
|
-
props: ir,
|
|
708
|
-
emits: [],
|
|
709
|
-
setup(e, n) {
|
|
710
|
-
I(e.title || e.text);
|
|
711
|
-
const t = I(e.required), r = I(e.text), i = I(e.valid), o = I(e.inValidTip);
|
|
712
|
-
Y(() => e.text, () => {
|
|
713
|
-
r.value = e.text;
|
|
714
|
-
}), Y(() => e.required, (m, s) => {
|
|
715
|
-
m !== s && (t.value = m);
|
|
716
|
-
}), Y([() => e.valid, () => e.inValidTip], ([m, s]) => {
|
|
717
|
-
i.value = m, o.value = s;
|
|
718
|
-
});
|
|
719
|
-
const a = _(() => i.value ? r.value : o.value), g = _(() => i.value ? "" : "color:red"), d = _(() => ({
|
|
720
|
-
"col-form-label": !0,
|
|
721
|
-
// 指定必填,当显示模式是隐藏或者没有指定标签名时,宽度不限定
|
|
722
|
-
"f-width-auto": t.value && (e.showType === "none" || !r.value)
|
|
723
|
-
})), p = _(() => e.showType === "force-none" ? !1 : e.showType === "reserve-space" || t.value || !!r.value && e.showType !== "none");
|
|
724
|
-
return () => p.value && w("label", {
|
|
725
|
-
class: d.value,
|
|
726
|
-
title: a.value,
|
|
727
|
-
style: g.value
|
|
728
|
-
}, [!i.value && w("span", {
|
|
729
|
-
class: "f-icon f-icon-warning mr-1",
|
|
730
|
-
style: "color: red; min-width: 16px;",
|
|
731
|
-
title: o.value
|
|
732
|
-
}, null), w("span", {
|
|
733
|
-
class: "farris-label-text"
|
|
734
|
-
}, [t.value && w("span", {
|
|
735
|
-
class: "farris-label-info text-danger"
|
|
736
|
-
}, [Se("*")]), e.showType === "visible" && r.value])]);
|
|
737
|
-
}
|
|
738
|
-
}), { globalStorageKey: sr } = Cn(), h = {}, b = {}, C = {}, F = {};
|
|
739
|
-
let we = !1;
|
|
740
|
-
async function ar() {
|
|
741
|
-
if (!we) {
|
|
742
|
-
we = !0, Ze.register(h, b, C, F), Ye.register(h, b, C, F), Ke.register(h, b, C, F), et.register(h, b, C, F), tt.register(h, b, C, F), nt.register(h, b, C, F), be.register(h, b, C, F), Ce.register(h, b, C, F), be.register(h, b, C, F), Ce.register(h, b, C, F), rt.register(h, b, C, F), it.register(h, b, C, F), ot.register(h, b, C, F), at.register(h, b, C, F), st.register(h, b, C, F), lt.register(h, b, C, F), dt.register(h, b, C, F), ct.register(h, b, C, F), ut.register(h, b, C, F), pt.register(h, b, C, F), cn.register(h, b, C, F), ft.register(h, b, C, F), mt.register(h, b, C, F), nn.register(h, b, C, F), vt.register(h, b, C, F), yt.register(h, b, C, F), ht.register(h, b, C, F), Ct.register(h, b, C, F), bt.register(h, b, C, F), Ft.register(h, b, C, F), wt.register(h, b, C, F), Et.register(h, b, C, F), St.register(h, b, C, F), xt.register(h, b, C, F), Pt.register(h, b, C, F), Tt.register(h, b, C, F), It.register(h, b, C, F), kt.register(h, b, C, F), Vt.register(h, b, C, F), Mt.register(h, b, C, F), Bt.register(h, b, C, F), Nt.register(h, b, C, F), Ot.register(h, b, C, F), $t.register(h, b, C, F), Lt.register(h, b, C, F), Kt.register(h, b, C), Ut.register(h, b, C, F), Rt.register(h, b, C, F), At.register(h, b, C, F), qt.register(h, b, C, F), Dt.register(h, b, C, F), jt.register(h, b, C, F), on.register(h, b, C, F), Gt.register(h, b, C, F), Wt.register(h, b, C, F), zt.register(h, b, C, F), _t.register(h, b, C, F), Xt.register(h, b, C, F), Ht.register(h, b, C, F), Qt.register(h, b, C, F), Jt.register(h, b, C, F), Yt.register(h, b, C, F), Zt.register(h, b, C, F), en.register(h, b, C, F), gt.register(h, b, C, F), tn.register(h, b, C, F), rn.register(h, b, C, F), sn.register(h, b, C, F), an.register(h, b, C, F), ln.register(h, b, C, F), dn.register(h, b, C, F), un.register(h, b, C, F), pn.register(h, b, C, F), fn.register(h, b, C, F), mn.register(h, b, C, F), gn.register(h, b, C, F), vn.register(h, b, C, F), yn.register(h, b, C, F), hn.register(h, b, C, F);
|
|
743
|
-
const e = window[sr];
|
|
744
|
-
if (e)
|
|
745
|
-
for (const n in e)
|
|
746
|
-
e[n].createPropsResolver = bn, e[n].register(h, b, C);
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
function lr() {
|
|
750
|
-
ar();
|
|
751
|
-
function e(a) {
|
|
752
|
-
const g = h[a];
|
|
753
|
-
if (!g)
|
|
754
|
-
throw new Error(`Could not find the editor of type '${a}'`);
|
|
755
|
-
return g;
|
|
756
|
-
}
|
|
757
|
-
function n(a, g) {
|
|
758
|
-
const d = b[a];
|
|
759
|
-
return d ? d(g) : {};
|
|
760
|
-
}
|
|
761
|
-
function t(a) {
|
|
762
|
-
switch (a) {
|
|
763
|
-
case "check-box":
|
|
764
|
-
return "onChangeValue";
|
|
765
|
-
case "switch":
|
|
766
|
-
return "onModelValueChanged";
|
|
767
|
-
case "check-group":
|
|
768
|
-
return "onChangeValue";
|
|
769
|
-
case "combo-list":
|
|
770
|
-
case "combo-tree":
|
|
771
|
-
return "onChange";
|
|
772
|
-
case "combo-lookup":
|
|
773
|
-
return "";
|
|
774
|
-
case "year-range":
|
|
775
|
-
case "year-picker":
|
|
776
|
-
case "month-range":
|
|
777
|
-
case "month-picker":
|
|
778
|
-
case "date-range":
|
|
779
|
-
case "datetime-range":
|
|
780
|
-
case "datetime-picker":
|
|
781
|
-
return "onDatePicked";
|
|
782
|
-
case "date-picker":
|
|
783
|
-
return "onUpdate:modelValue";
|
|
784
|
-
case "time-picker":
|
|
785
|
-
return "onValueChange";
|
|
786
|
-
case "input-group":
|
|
787
|
-
return "onChange";
|
|
788
|
-
case "lookup":
|
|
789
|
-
case "sort-condition-editor":
|
|
790
|
-
case "filter-condition-editor":
|
|
791
|
-
case "code-editor":
|
|
792
|
-
case "language-textbox":
|
|
793
|
-
case "rich-text-editor":
|
|
794
|
-
return "onUpdate:modelValue";
|
|
795
|
-
case "number-range":
|
|
796
|
-
return "onValueChange";
|
|
797
|
-
case "number-spinner":
|
|
798
|
-
return "onValueChange";
|
|
799
|
-
case "radio-group":
|
|
800
|
-
return "onChangeValue";
|
|
801
|
-
case "text":
|
|
802
|
-
return "";
|
|
803
|
-
case "events-editor":
|
|
804
|
-
return "onSavedCommandListChanged";
|
|
805
|
-
case "grid-field-editor":
|
|
806
|
-
case "item-collection-editor":
|
|
807
|
-
case "response-form-layout-setting":
|
|
808
|
-
case "response-layout-editor-setting":
|
|
809
|
-
case "response-layout-splitter":
|
|
810
|
-
case "menu-lookup":
|
|
811
|
-
case "json-editor":
|
|
812
|
-
return "onChange";
|
|
813
|
-
case "field-selector":
|
|
814
|
-
case "binding-selector":
|
|
815
|
-
return "onFieldSelected";
|
|
816
|
-
case "schema-selector":
|
|
817
|
-
return "onSchemaSelected";
|
|
818
|
-
case "mapping-editor":
|
|
819
|
-
return "onMappingFieldsChanged";
|
|
820
|
-
case "textarea":
|
|
821
|
-
return "onChange";
|
|
822
|
-
case "query-solution-config":
|
|
823
|
-
case "solution-preset":
|
|
824
|
-
case "filter-bar-config":
|
|
825
|
-
return "onFieldsChanged";
|
|
826
|
-
case "property-editor":
|
|
827
|
-
return "onValueChange";
|
|
828
|
-
case "expression-editor":
|
|
829
|
-
return "onExpressionChanged";
|
|
830
|
-
case "collection-property-editor":
|
|
831
|
-
return "onValueChange";
|
|
832
|
-
default:
|
|
833
|
-
return "onUpdate:modelValue";
|
|
834
|
-
}
|
|
835
|
-
}
|
|
836
|
-
function r(a) {
|
|
837
|
-
switch (a) {
|
|
838
|
-
case "combo-list":
|
|
839
|
-
case "input-group":
|
|
840
|
-
case "textarea":
|
|
841
|
-
return "onClear";
|
|
842
|
-
}
|
|
843
|
-
}
|
|
844
|
-
function i(a) {
|
|
845
|
-
switch (a) {
|
|
846
|
-
case "input-group":
|
|
847
|
-
case "textarea":
|
|
848
|
-
return "onMousedownEvent";
|
|
849
|
-
}
|
|
850
|
-
}
|
|
851
|
-
function o(a) {
|
|
852
|
-
switch (a) {
|
|
853
|
-
case "input-group":
|
|
854
|
-
case "textarea":
|
|
855
|
-
return "onMouseupEvent";
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
return { resolveEditorProps: n, resolveEditorType: e, getChangeFunctionName: t, getClearFunctionName: r, getMousedownFunctionName: i, getMouseupFunctionName: o };
|
|
859
|
-
}
|
|
860
|
-
const dr = {
|
|
861
|
-
/**
|
|
862
|
-
* 显示的错误信息
|
|
863
|
-
*/
|
|
864
|
-
errors: {
|
|
865
|
-
type: Object,
|
|
866
|
-
default: null
|
|
867
|
-
}
|
|
868
|
-
}, cr = /* @__PURE__ */ te({
|
|
869
|
-
name: "FValidationMessage",
|
|
870
|
-
props: dr,
|
|
871
|
-
emits: [],
|
|
872
|
-
setup(e, n) {
|
|
873
|
-
const t = I(e.errors);
|
|
874
|
-
Y(() => e.errors, (o) => {
|
|
875
|
-
t.value = o;
|
|
876
|
-
});
|
|
877
|
-
const r = I(!0), i = _(() => {
|
|
878
|
-
if (t.value) {
|
|
879
|
-
const o = Object.keys(t.value).map((a) => {
|
|
880
|
-
var g;
|
|
881
|
-
return (g = t.value[a]) == null ? void 0 : g.name;
|
|
882
|
-
});
|
|
883
|
-
return o.length ? o.join(" ") : "";
|
|
884
|
-
}
|
|
885
|
-
return "";
|
|
886
|
-
});
|
|
887
|
-
return () => i.value && w("div", {
|
|
888
|
-
class: "farris-feedback f-state-invalid",
|
|
889
|
-
onClick: () => r.value = !r.value
|
|
890
|
-
}, [!r.value && w("span", {
|
|
891
|
-
class: "f-icon f-icon-message_warning f-feedback-icon"
|
|
892
|
-
}, null), r.value && w("span", {
|
|
893
|
-
class: "f-feedback-message"
|
|
894
|
-
}, [i.value])]);
|
|
895
|
-
}
|
|
896
|
-
}), ur = /* @__PURE__ */ te({
|
|
897
|
-
name: "FDynamicFormGroup",
|
|
898
|
-
props: rr,
|
|
899
|
-
emits: ["change", "update:modelValue"],
|
|
900
|
-
setup(e, n) {
|
|
901
|
-
var U;
|
|
902
|
-
const t = I(e.id), r = I(e.customClass), i = I(e.editor), o = I(e.label), a = I(e.modelValue), g = I(e.readonly), d = I(((U = e.editor) == null ? void 0 : U.required) || e.required), p = I(e.showLabel), m = I(e.visible);
|
|
903
|
-
I(e.type);
|
|
904
|
-
const s = I(), c = I(e.errors), f = _(() => p.value ? e.showLabelType : "none"), {
|
|
905
|
-
resolveEditorProps: l,
|
|
906
|
-
resolveEditorType: u,
|
|
907
|
-
getChangeFunctionName: y,
|
|
908
|
-
getClearFunctionName: S
|
|
909
|
-
} = lr(), k = _(() => ({
|
|
910
|
-
"form-group": !0,
|
|
911
|
-
"farris-form-group": !0,
|
|
912
|
-
"common-group": !0,
|
|
913
|
-
"q-state-readonly": g.value
|
|
914
|
-
})), R = _(() => {
|
|
915
|
-
if (e.fill)
|
|
916
|
-
return {
|
|
917
|
-
maxWidth: "none"
|
|
918
|
-
};
|
|
919
|
-
});
|
|
920
|
-
function A(O, q, B) {
|
|
921
|
-
a.value = q !== void 0 ? q : O, n.emit("update:modelValue", a.value), n.emit("change", a.value, {
|
|
922
|
-
newValue: O,
|
|
923
|
-
newModelValue: q,
|
|
924
|
-
parameters: B
|
|
925
|
-
});
|
|
926
|
-
}
|
|
927
|
-
function $() {
|
|
928
|
-
n.emit("update:modelValue", "");
|
|
929
|
-
}
|
|
930
|
-
function N(O) {
|
|
931
|
-
return (...q) => {
|
|
932
|
-
$(), typeof O == "function" && O(...q);
|
|
933
|
-
};
|
|
934
|
-
}
|
|
935
|
-
function M(O) {
|
|
936
|
-
return (q, B, D) => {
|
|
937
|
-
A(q, B, D), typeof O == "function" && O(q, B, D);
|
|
938
|
-
};
|
|
939
|
-
}
|
|
940
|
-
const j = _(() => {
|
|
941
|
-
const O = i.value.type || "input-group", q = u(O), B = l(O, i.value), D = y(O), z = S(i.value.type);
|
|
942
|
-
return z && (B[z] = N(B[z])), D && (B[D] = M(B[D])), (B.id == null || B.id === "") && (B.id = t.value), O === "number-range" && i.value.onBeginValueChange && typeof i.value.onBeginValueChange == "function" ? (i.value.onBeginValueChange && typeof i.value.onBeginValueChange == "function" && (B.onBeginValueChange = i.value.onBeginValueChange), i.value.onEndValueChange && typeof i.value.onEndValueChange == "function" && (B.onEndValueChange = i.value.onEndValueChange)) : O === "lookup" && i.value["onUpdate:idValue"] && typeof i.value["onUpdate:idValue"] == "function" ? (B["onUpdate:idValue"] = i.value["onUpdate:idValue"], B.id = t.value) : O === "collection-property-editor" && i.value.onSelectionChange && typeof i.value.onSelectionChange == "function" ? B.onSelectionChange = i.value.onSelectionChange : O === "property-editor" && (B.onBeforeOpenVariables = i.value.onBeforeOpenVariables), () => w(q, ze({
|
|
943
|
-
ref: s
|
|
944
|
-
}, B, {
|
|
945
|
-
modelValue: a.value,
|
|
946
|
-
"onUpdate:modelValue": (X) => a.value = X
|
|
947
|
-
}), n.slots);
|
|
948
|
-
});
|
|
949
|
-
function P() {
|
|
950
|
-
return w(cr, {
|
|
951
|
-
id: `${t.value}-validation-message`,
|
|
952
|
-
errors: c.value
|
|
953
|
-
}, null);
|
|
954
|
-
}
|
|
955
|
-
return Y([() => e.id, () => e.customClass, () => e.editor, () => e.label, () => e.modelValue, () => e.readonly, () => e.required, () => e.showLabel, () => e.visible, () => e.errors], ([O, q, B, D, z, X, H, ne, W, re]) => {
|
|
956
|
-
var K;
|
|
957
|
-
t.value = O, r.value = q, i.value = B, o.value = D, a.value = z, g.value = X, d.value = ((K = i.value) == null ? void 0 : K.required) || H, p.value = ne, m.value = W, c.value = re;
|
|
958
|
-
}), n.expose({
|
|
959
|
-
editorRef: s
|
|
960
|
-
}), () => m.value && w("div", {
|
|
961
|
-
id: `${t.value}-form-group`,
|
|
962
|
-
class: r.value,
|
|
963
|
-
style: e.customStyle
|
|
964
|
-
}, [w("div", {
|
|
965
|
-
class: "farris-group-wrap",
|
|
966
|
-
style: R.value
|
|
967
|
-
}, [w("div", {
|
|
968
|
-
class: k.value
|
|
969
|
-
}, [w(or, {
|
|
970
|
-
id: `${t.value}-lable`,
|
|
971
|
-
showType: f.value,
|
|
972
|
-
required: d.value,
|
|
973
|
-
text: o.value,
|
|
974
|
-
title: o.value
|
|
975
|
-
}, null), w("div", {
|
|
976
|
-
class: "farris-input-wrap"
|
|
977
|
-
}, [j.value(), P()])])])]);
|
|
978
|
-
}
|
|
979
|
-
}), pr = /* @__PURE__ */ te({
|
|
50
|
+
}, Xe = /* @__PURE__ */ X({
|
|
980
51
|
name: "FPropertyPanelItem",
|
|
981
|
-
props:
|
|
52
|
+
props: _e,
|
|
982
53
|
emits: ["propertyChange", "triggerRefreshPanel"],
|
|
983
|
-
setup(
|
|
984
|
-
var
|
|
985
|
-
const
|
|
986
|
-
|
|
987
|
-
const
|
|
988
|
-
const
|
|
54
|
+
setup(d, n) {
|
|
55
|
+
var a;
|
|
56
|
+
const e = F((a = d.category) == null ? void 0 : a.categoryId), i = F(d.elementConfig.propertyID), t = F(d.elementConfig.propertyName);
|
|
57
|
+
F(d.elementConfig.editor);
|
|
58
|
+
const s = F(d.elementConfig.propertyValue), r = se(() => {
|
|
59
|
+
const h = d.elementConfig.visible;
|
|
989
60
|
return {
|
|
990
61
|
"farris-group-wrap": !0,
|
|
991
62
|
"property-item": !0,
|
|
992
|
-
"d-none": !(typeof
|
|
63
|
+
"d-none": !(typeof h == "boolean" ? h : h === void 0 ? !0 : h())
|
|
993
64
|
};
|
|
994
65
|
});
|
|
995
|
-
|
|
996
|
-
var
|
|
997
|
-
return (
|
|
998
|
-
}, (
|
|
999
|
-
|
|
1000
|
-
}),
|
|
1001
|
-
var
|
|
1002
|
-
return (
|
|
1003
|
-
}, (
|
|
1004
|
-
|
|
66
|
+
D(() => {
|
|
67
|
+
var h;
|
|
68
|
+
return (h = d.elementConfig) == null ? void 0 : h.propertyValue;
|
|
69
|
+
}, (h) => {
|
|
70
|
+
s.value = h;
|
|
71
|
+
}), D(() => {
|
|
72
|
+
var h;
|
|
73
|
+
return (h = d.elementConfig) == null ? void 0 : h.propertyName;
|
|
74
|
+
}, (h) => {
|
|
75
|
+
t.value = h;
|
|
1005
76
|
});
|
|
1006
|
-
function g(
|
|
77
|
+
function g(h, u) {
|
|
1007
78
|
const {
|
|
1008
|
-
parameters:
|
|
1009
|
-
} =
|
|
1010
|
-
|
|
1011
|
-
const
|
|
1012
|
-
propertyID:
|
|
1013
|
-
propertyValue:
|
|
79
|
+
parameters: c
|
|
80
|
+
} = u;
|
|
81
|
+
d.elementConfig.propertyValue = h;
|
|
82
|
+
const b = {
|
|
83
|
+
propertyID: d.elementConfig.propertyID,
|
|
84
|
+
propertyValue: h
|
|
1014
85
|
};
|
|
1015
|
-
n.emit("propertyChange",
|
|
86
|
+
n.emit("propertyChange", b, c), d.elementConfig.refreshPanelAfterChanged && n.emit("triggerRefreshPanel");
|
|
1016
87
|
}
|
|
1017
|
-
const
|
|
88
|
+
const o = d.elementConfig.description ? `<div style="color: gray; "> 描述 :${d.elementConfig.description}</div>` : "", f = Ue({
|
|
1018
89
|
content: `
|
|
1019
90
|
<div>
|
|
1020
|
-
<div style="color: black; ">${
|
|
1021
|
-
<div style="color: gray; ">ID:${
|
|
1022
|
-
${
|
|
91
|
+
<div style="color: black; ">${d.elementConfig.propertyName}</div>
|
|
92
|
+
<div style="color: gray; ">ID:${d.elementConfig.propertyID}</div>
|
|
93
|
+
${o}
|
|
1023
94
|
</div>`,
|
|
1024
95
|
placement: "left"
|
|
1025
|
-
}),
|
|
1026
|
-
return
|
|
1027
|
-
class:
|
|
1028
|
-
}, [
|
|
1029
|
-
class: `col-form-label ${
|
|
1030
|
-
}, [
|
|
96
|
+
}), p = F("");
|
|
97
|
+
return p.value = `${e.value}-${i.value}`, () => m("div", {
|
|
98
|
+
class: r.value
|
|
99
|
+
}, [d.elementConfig.propertyName && re(m("label", {
|
|
100
|
+
class: `col-form-label ${p.value}`
|
|
101
|
+
}, [m("span", {
|
|
1031
102
|
class: "farris-label-text"
|
|
1032
|
-
}, [
|
|
1033
|
-
id:
|
|
103
|
+
}, [t.value])]), [[$e("tooltip"), f]]), m(qe, {
|
|
104
|
+
id: p.value,
|
|
1034
105
|
showLabel: !1,
|
|
1035
|
-
editor:
|
|
1036
|
-
modelValue:
|
|
106
|
+
editor: d.elementConfig.editor,
|
|
107
|
+
modelValue: s.value,
|
|
1037
108
|
onChange: g,
|
|
1038
|
-
editorParams:
|
|
109
|
+
editorParams: d.elementConfig.editorParams
|
|
1039
110
|
}, null)]);
|
|
1040
111
|
}
|
|
1041
|
-
}),
|
|
112
|
+
}), He = /* @__PURE__ */ X({
|
|
1042
113
|
name: "FPropertyPanelItemList",
|
|
1043
|
-
props:
|
|
114
|
+
props: ze,
|
|
1044
115
|
emits: ["valueChanged", "submitModal", "triggerRefreshPanel"],
|
|
1045
|
-
setup(
|
|
1046
|
-
const
|
|
1047
|
-
function
|
|
1048
|
-
if (!
|
|
1049
|
-
return
|
|
116
|
+
setup(d, n) {
|
|
117
|
+
const e = F(d.category);
|
|
118
|
+
function i(u) {
|
|
119
|
+
if (!u.hideCascadeTitle)
|
|
120
|
+
return m("div", {
|
|
1050
121
|
class: "farris-input-wrap"
|
|
1051
|
-
}, [
|
|
122
|
+
}, [m("input", {
|
|
1052
123
|
title: "summary",
|
|
1053
124
|
type: "input",
|
|
1054
125
|
class: "form-control form-control-sm",
|
|
1055
|
-
value:
|
|
126
|
+
value: u.cascadeSummary,
|
|
1056
127
|
readonly: !0
|
|
1057
128
|
}, null)]);
|
|
1058
129
|
}
|
|
1059
|
-
function
|
|
1060
|
-
|
|
130
|
+
function t(u, c) {
|
|
131
|
+
c.isExpand = !c.isExpand;
|
|
1061
132
|
}
|
|
1062
|
-
function
|
|
1063
|
-
return
|
|
133
|
+
function s(u) {
|
|
134
|
+
return m("div", {
|
|
1064
135
|
class: "landscape"
|
|
1065
|
-
}, [
|
|
136
|
+
}, [m("button", {
|
|
1066
137
|
title: "expand-button",
|
|
1067
138
|
class: ["btn f-btn-collapse-expand f-btn-mx px-1", {
|
|
1068
|
-
"f-state-expand":
|
|
139
|
+
"f-state-expand": u.isExpand
|
|
1069
140
|
}],
|
|
1070
|
-
onClick: (
|
|
1071
|
-
}, [
|
|
141
|
+
onClick: (c) => t(c, u)
|
|
142
|
+
}, [m("span", null, null)])]);
|
|
1072
143
|
}
|
|
1073
|
-
function
|
|
1074
|
-
return
|
|
1075
|
-
class: `f-section-formgroup-legend ${
|
|
1076
|
-
}, [
|
|
144
|
+
function r(u) {
|
|
145
|
+
return m("div", {
|
|
146
|
+
class: `f-section-formgroup-legend ${e.value.categoryId}-${u.propertyID}`
|
|
147
|
+
}, [m("div", {
|
|
1077
148
|
class: "f-header px-0 my-0 col-form-label",
|
|
1078
149
|
style: "font-size: inherit;"
|
|
1079
|
-
}, [
|
|
150
|
+
}, [m("div", {
|
|
1080
151
|
class: "wrap"
|
|
1081
|
-
}, [
|
|
152
|
+
}, [m("span", {
|
|
1082
153
|
class: ["f-icon mr-1", {
|
|
1083
|
-
"f-icon-arrow-60-right": !
|
|
1084
|
-
"f-icon-arrow-60-down":
|
|
154
|
+
"f-icon-arrow-60-right": !u.isExpand,
|
|
155
|
+
"f-icon-arrow-60-down": u.isExpand
|
|
1085
156
|
}]
|
|
1086
|
-
}, null),
|
|
157
|
+
}, null), m("span", {
|
|
1087
158
|
class: "farris-label-text"
|
|
1088
|
-
}, [
|
|
159
|
+
}, [u.propertyName])])])]);
|
|
1089
160
|
}
|
|
1090
|
-
function g(
|
|
1091
|
-
return `${
|
|
161
|
+
function g(u) {
|
|
162
|
+
return `${d.categoryKey}_${u.propertyID}`;
|
|
1092
163
|
}
|
|
1093
|
-
function
|
|
1094
|
-
|
|
1095
|
-
changeObject:
|
|
164
|
+
function o(u, c) {
|
|
165
|
+
u.categoryId = e.value.categoryId, e.value.enableCascade && (u.propertyPath = e.value.parentPropertyID), e.value.setPropertyRelates && e.value.setPropertyRelates(u, d.propertyData, c), n.emit("valueChanged", {
|
|
166
|
+
changeObject: u
|
|
1096
167
|
});
|
|
1097
168
|
}
|
|
1098
|
-
function
|
|
169
|
+
function f() {
|
|
1099
170
|
n.emit("triggerRefreshPanel");
|
|
1100
171
|
}
|
|
1101
|
-
function
|
|
1102
|
-
return
|
|
172
|
+
function p(u) {
|
|
173
|
+
return m("div", {
|
|
1103
174
|
class: "px-2 mb-2"
|
|
1104
|
-
}, [
|
|
1105
|
-
key: g(
|
|
1106
|
-
elementConfig:
|
|
1107
|
-
category:
|
|
1108
|
-
onPropertyChange:
|
|
1109
|
-
onTriggerRefreshPanel:
|
|
175
|
+
}, [m(Xe, {
|
|
176
|
+
key: g(u),
|
|
177
|
+
elementConfig: u,
|
|
178
|
+
category: e.value,
|
|
179
|
+
onPropertyChange: o,
|
|
180
|
+
onTriggerRefreshPanel: f
|
|
1110
181
|
}, null)]);
|
|
1111
182
|
}
|
|
1112
|
-
function
|
|
1113
|
-
var
|
|
1114
|
-
return
|
|
183
|
+
function a(u) {
|
|
184
|
+
var c;
|
|
185
|
+
return m("div", {
|
|
1115
186
|
class: "propertyCascadeItem farris-panel px-2 mb-2"
|
|
1116
|
-
}, [
|
|
187
|
+
}, [m("div", {
|
|
1117
188
|
class: ["farris-panel-item card", {
|
|
1118
|
-
hidden: !
|
|
189
|
+
hidden: !u.isExpand
|
|
1119
190
|
}]
|
|
1120
|
-
}, [
|
|
191
|
+
}, [m("div", {
|
|
1121
192
|
class: "card-header",
|
|
1122
|
-
onClick: (
|
|
1123
|
-
}, [
|
|
193
|
+
onClick: (b) => t(b, u)
|
|
194
|
+
}, [m("div", {
|
|
1124
195
|
class: "panel-item-title"
|
|
1125
|
-
}, [
|
|
196
|
+
}, [m("div", {
|
|
1126
197
|
class: "form-group farris-form-group line-item"
|
|
1127
|
-
}, [
|
|
198
|
+
}, [r(u), i(u), s(u)])])]), m("div", {
|
|
1128
199
|
class: ["card-body", {
|
|
1129
|
-
hidden: !
|
|
200
|
+
hidden: !u.isExpand
|
|
1130
201
|
}]
|
|
1131
|
-
}, [(
|
|
202
|
+
}, [(c = u.cascadeConfig) == null ? void 0 : c.map((b) => p(b))])])]);
|
|
1132
203
|
}
|
|
1133
|
-
|
|
1134
|
-
|
|
204
|
+
D(() => d.category, () => {
|
|
205
|
+
e.value = d.category;
|
|
1135
206
|
});
|
|
1136
|
-
function
|
|
1137
|
-
return
|
|
207
|
+
function h(u) {
|
|
208
|
+
return u.propertyType === "cascade" ? a : p;
|
|
1138
209
|
}
|
|
1139
|
-
return () =>
|
|
210
|
+
return () => m(oe, null, [e.value.properties.map((u) => h(u)(u))]);
|
|
1140
211
|
}
|
|
1141
|
-
}),
|
|
212
|
+
}), ne = /* @__PURE__ */ X({
|
|
1142
213
|
name: "FPropertyPanel",
|
|
1143
|
-
props:
|
|
214
|
+
props: Ke,
|
|
1144
215
|
emits: ["propertyChanged"],
|
|
1145
|
-
setup(
|
|
1146
|
-
const
|
|
1147
|
-
let
|
|
1148
|
-
const
|
|
1149
|
-
let
|
|
1150
|
-
const
|
|
1151
|
-
function
|
|
1152
|
-
|
|
1153
|
-
if (
|
|
1154
|
-
const
|
|
1155
|
-
|
|
1156
|
-
}),
|
|
1157
|
-
|
|
216
|
+
setup(d, n) {
|
|
217
|
+
const e = F(d.width), i = F(d.isWidePanel), t = F(d.enableSearch), s = F(d.mode), r = F(d.isPersitOpenState), g = F(d.isShowPanel), o = F(), f = F(), p = F(d.showCloseBtn), a = F(d.selectedTabId), h = F(!0), u = F(d.isWhiteTheme);
|
|
218
|
+
let c = [], b = [];
|
|
219
|
+
const E = F(""), x = F(), M = F(), L = ee("SchemaService");
|
|
220
|
+
let k = [], S = null, N = "";
|
|
221
|
+
const P = F(), U = F(0), K = se(() => c.map((C) => !C.hide).length === 1), B = ee("designerContext");
|
|
222
|
+
function de() {
|
|
223
|
+
b = [], P.value && P.value.categoryList && Array.isArray(P.value.categoryList) && P.value.categoryList.length > 0 && P.value.categoryList.forEach((v) => {
|
|
224
|
+
if (v.properties && Array.isArray(v.properties) && v.properties.length > 0) {
|
|
225
|
+
const y = v.properties.map((w) => (w.category = v, w.propertyType === "cascade" && w.cascadeConfig && w.cascadeConfig.map((V) => {
|
|
226
|
+
V.category = v, V.cascadeParent = w, b = b.concat(V);
|
|
227
|
+
}), w));
|
|
228
|
+
b = b.concat(y);
|
|
1158
229
|
}
|
|
1159
230
|
});
|
|
1160
231
|
}
|
|
1161
|
-
function
|
|
1162
|
-
let
|
|
1163
|
-
for (;
|
|
1164
|
-
|
|
1165
|
-
return
|
|
1166
|
-
}
|
|
1167
|
-
function
|
|
1168
|
-
|
|
1169
|
-
var
|
|
1170
|
-
const
|
|
1171
|
-
(
|
|
232
|
+
function H(C) {
|
|
233
|
+
let v = C.offsetTop, y = C.offsetParent;
|
|
234
|
+
for (; y !== null; )
|
|
235
|
+
v += y.offsetTop, y = y.offsetParent;
|
|
236
|
+
return v;
|
|
237
|
+
}
|
|
238
|
+
function ce(C, v) {
|
|
239
|
+
C && v && Object.keys(v).length > 0 && Object.keys(v).forEach((y) => {
|
|
240
|
+
var V;
|
|
241
|
+
const w = v[y];
|
|
242
|
+
(V = C.style) == null || V.setProperty(y, w);
|
|
1172
243
|
});
|
|
1173
244
|
}
|
|
1174
|
-
function
|
|
1175
|
-
return
|
|
1176
|
-
if (typeof
|
|
245
|
+
function ue() {
|
|
246
|
+
return b.filter((v) => {
|
|
247
|
+
if (typeof v.visible == "function" && !v.visible() || typeof v.visible == "boolean" && !v.visible)
|
|
1177
248
|
return !1;
|
|
1178
|
-
const
|
|
1179
|
-
return !!(
|
|
249
|
+
const y = v.propertyID.toLowerCase(), w = v.propertyName.toLowerCase();
|
|
250
|
+
return !!(y && y.includes(E.value.toLowerCase()) || w && w.includes(E.value.toLowerCase()));
|
|
1180
251
|
});
|
|
1181
252
|
}
|
|
1182
|
-
function
|
|
1183
|
-
if (
|
|
1184
|
-
const
|
|
1185
|
-
|
|
1186
|
-
top:
|
|
253
|
+
function J(C, v, y) {
|
|
254
|
+
if (C === 0) {
|
|
255
|
+
const w = H(v), R = H(y) - w - 5;
|
|
256
|
+
v == null || v.scroll({
|
|
257
|
+
top: R,
|
|
1187
258
|
behavior: "smooth"
|
|
1188
259
|
});
|
|
1189
260
|
}
|
|
1190
261
|
}
|
|
1191
|
-
function
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
}),
|
|
1195
|
-
const
|
|
1196
|
-
if (!
|
|
1197
|
-
|
|
1198
|
-
else if (
|
|
1199
|
-
const
|
|
1200
|
-
|
|
1201
|
-
let
|
|
1202
|
-
|
|
1203
|
-
const
|
|
1204
|
-
|
|
262
|
+
function Q(C) {
|
|
263
|
+
k && k.length > 0 && (k.forEach((y) => {
|
|
264
|
+
y.style.cssText = "";
|
|
265
|
+
}), k = []);
|
|
266
|
+
const v = M.value;
|
|
267
|
+
if (!E.value)
|
|
268
|
+
x.value && v && (v.scrollTop = 0);
|
|
269
|
+
else if (de(), b && b.length > 0) {
|
|
270
|
+
const y = ue();
|
|
271
|
+
y && y.length > 0 && setTimeout(() => {
|
|
272
|
+
let w = null, V = -1, R = !1;
|
|
273
|
+
y.forEach((T, Te) => {
|
|
274
|
+
const Be = T.propertyType === "cascade" ? `.${T.category.categoryId}-${T.propertyID} .farris-label-text` : `.property-item .${T.category.categoryId}-${T.propertyID}.col-form-label`, q = document.querySelector(Be);
|
|
275
|
+
q && (T.category.status !== "open" && (T.category.status = "open", R = V < 0), T.cascadeParent && (T.cascadeParent.isExpand = !0), V < 0 && (w = q, V = Te), ce(q, {
|
|
1205
276
|
color: "#5B89FE"
|
|
1206
|
-
}),
|
|
1207
|
-
}),
|
|
1208
|
-
|
|
1209
|
-
}) :
|
|
277
|
+
}), k.push(q));
|
|
278
|
+
}), V > -1 && (R ? le(() => {
|
|
279
|
+
J(V, v, w);
|
|
280
|
+
}) : J(V, v, w));
|
|
1210
281
|
}, 50);
|
|
1211
282
|
}
|
|
1212
283
|
}
|
|
1213
|
-
function
|
|
1214
|
-
|
|
284
|
+
function A(C) {
|
|
285
|
+
Q();
|
|
1215
286
|
}
|
|
1216
|
-
const
|
|
1217
|
-
function
|
|
287
|
+
const pe = We(A, 200);
|
|
288
|
+
function fe(C) {
|
|
1218
289
|
const {
|
|
1219
|
-
value:
|
|
1220
|
-
} =
|
|
1221
|
-
|
|
290
|
+
value: v
|
|
291
|
+
} = C.target;
|
|
292
|
+
pe(v);
|
|
1222
293
|
}
|
|
1223
|
-
function
|
|
1224
|
-
|
|
294
|
+
function ge(C) {
|
|
295
|
+
A(E.value);
|
|
1225
296
|
}
|
|
1226
|
-
function
|
|
1227
|
-
|
|
297
|
+
function he() {
|
|
298
|
+
r.value || (h.value = !1), n.emit("closePropertyPanel");
|
|
1228
299
|
}
|
|
1229
|
-
function
|
|
1230
|
-
|
|
300
|
+
function z(C) {
|
|
301
|
+
E.value = "", Q();
|
|
1231
302
|
}
|
|
1232
|
-
function
|
|
1233
|
-
!
|
|
303
|
+
function me(C) {
|
|
304
|
+
!C.status || C.status === "open" ? C.status = "closed" : C.status = "open";
|
|
1234
305
|
}
|
|
1235
|
-
function
|
|
1236
|
-
var
|
|
1237
|
-
if (
|
|
1238
|
-
|
|
306
|
+
function O() {
|
|
307
|
+
var C, v;
|
|
308
|
+
if (c = [], !o.value || o.value.length === 0) {
|
|
309
|
+
c = [{
|
|
1239
310
|
tabId: "default",
|
|
1240
311
|
tabName: "属性",
|
|
1241
312
|
categoryList: []
|
|
1242
|
-
}],
|
|
313
|
+
}], P.value = null;
|
|
1243
314
|
return;
|
|
1244
315
|
}
|
|
1245
|
-
if ((
|
|
1246
|
-
if (
|
|
1247
|
-
const
|
|
1248
|
-
|
|
1249
|
-
tabId:
|
|
1250
|
-
tabName:
|
|
1251
|
-
categoryList: [
|
|
1252
|
-
hide:
|
|
316
|
+
if ((C = o == null ? void 0 : o.value) == null || C.forEach((y) => {
|
|
317
|
+
if (y.tabId) {
|
|
318
|
+
const w = c.find((V) => V.tabId === y.tabId);
|
|
319
|
+
w ? (w.categoryList.push(y), w.hide && (w.hide = y.hide || y.properties.length === 0)) : c.push({
|
|
320
|
+
tabId: y.tabId,
|
|
321
|
+
tabName: y.tabName,
|
|
322
|
+
categoryList: [y],
|
|
323
|
+
hide: y.hide || y.properties.length === 0
|
|
1253
324
|
});
|
|
1254
325
|
} else {
|
|
1255
|
-
const
|
|
1256
|
-
|
|
326
|
+
const w = c.find((V) => V.tabId === "default");
|
|
327
|
+
w ? w.categoryList.push(y) : c.push({
|
|
1257
328
|
tabId: "default",
|
|
1258
329
|
tabName: "属性",
|
|
1259
|
-
categoryList: [
|
|
330
|
+
categoryList: [y]
|
|
1260
331
|
});
|
|
1261
332
|
}
|
|
1262
|
-
}),
|
|
1263
|
-
const
|
|
1264
|
-
|
|
333
|
+
}), a.value) {
|
|
334
|
+
const y = c == null ? void 0 : c.find((w) => w.tabId === a.value && !w.hide);
|
|
335
|
+
P.value = y || c[0];
|
|
1265
336
|
} else
|
|
1266
|
-
|
|
1267
|
-
|
|
337
|
+
P.value = c[0];
|
|
338
|
+
a.value = (v = P.value) == null ? void 0 : v.tabId;
|
|
1268
339
|
}
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
}),
|
|
1272
|
-
|
|
340
|
+
D(() => [d.schema, d.isShowPanel], () => {
|
|
341
|
+
f.value = d.schema, !d.schema || !d.schema.type ? o.value = [] : (o.value = _(f.value, L, S, N), B.filterPropertyEntity && (o.value = B.filterPropertyEntity(o.value, f.value))), O(), z(E.value), U.value++;
|
|
342
|
+
}), te(() => {
|
|
343
|
+
O();
|
|
1273
344
|
});
|
|
1274
|
-
function
|
|
1275
|
-
(!
|
|
345
|
+
function ye(C, v, y = !0) {
|
|
346
|
+
(!f.value || v) && (f.value = v || d.schema), o.value = _(f.value, L, S, N, C), B.filterPropertyEntity && (o.value = B.filterPropertyEntity(o.value, f.value)), O(), t.value && z(E.value), y && U.value++;
|
|
1276
347
|
}
|
|
1277
|
-
function
|
|
1278
|
-
|
|
348
|
+
function ve(C, v) {
|
|
349
|
+
S = C, N = v;
|
|
1279
350
|
}
|
|
1280
|
-
function
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
}, 100),
|
|
351
|
+
function Y() {
|
|
352
|
+
s.value = s.value === "panel" ? "sidebar" : "panel", s.value === "panel" ? (setTimeout(() => {
|
|
353
|
+
A();
|
|
354
|
+
}, 100), e.value = "300px") : e.value = "41px";
|
|
1284
355
|
}
|
|
1285
|
-
function
|
|
1286
|
-
if (
|
|
1287
|
-
return
|
|
356
|
+
function be() {
|
|
357
|
+
if (p.value)
|
|
358
|
+
return m("div", {
|
|
1288
359
|
class: "title-actions"
|
|
1289
|
-
}, [
|
|
360
|
+
}, [m("div", {
|
|
1290
361
|
class: "monaco-toolbar"
|
|
1291
|
-
}, [
|
|
362
|
+
}, [m("div", {
|
|
1292
363
|
class: "monaco-action-bar animated"
|
|
1293
|
-
}, [
|
|
364
|
+
}, [m("ul", {
|
|
1294
365
|
class: "actions-container",
|
|
1295
366
|
role: "toolbar"
|
|
1296
|
-
}, [
|
|
367
|
+
}, [m("li", {
|
|
1297
368
|
class: "action-item",
|
|
1298
|
-
onClick:
|
|
1299
|
-
}, [
|
|
369
|
+
onClick: he
|
|
370
|
+
}, [m("span", {
|
|
1300
371
|
class: "f-icon f-icon-close"
|
|
1301
372
|
}, null)])])])])]);
|
|
1302
373
|
}
|
|
1303
|
-
function
|
|
1304
|
-
|
|
374
|
+
function Z() {
|
|
375
|
+
o.value = _(f.value, L, S, N), B.filterPropertyEntity && (o.value = B.filterPropertyEntity(o.value, f.value)), O();
|
|
1305
376
|
}
|
|
1306
|
-
function
|
|
1307
|
-
var
|
|
1308
|
-
if (
|
|
1309
|
-
return
|
|
377
|
+
function Ce() {
|
|
378
|
+
var C;
|
|
379
|
+
if (t.value && ((C = P.value) == null ? void 0 : C.tabId) !== "commands")
|
|
380
|
+
return m("div", {
|
|
1310
381
|
class: "search"
|
|
1311
|
-
}, [
|
|
382
|
+
}, [m("div", {
|
|
1312
383
|
class: "input-group f-state-editable border-left-0 border-right-0"
|
|
1313
|
-
}, [
|
|
384
|
+
}, [re(m("input", {
|
|
1314
385
|
class: "form-control f-utils-fill text-left pt-3 pb-3 textbox",
|
|
1315
386
|
type: "text",
|
|
1316
387
|
placeholder: "输入属性名称或编号快速定位",
|
|
1317
388
|
autocomplete: "off",
|
|
1318
|
-
onKeyup: (
|
|
1319
|
-
"onUpdate:modelValue": (
|
|
1320
|
-
}, null), [[
|
|
389
|
+
onKeyup: (v) => fe(v),
|
|
390
|
+
"onUpdate:modelValue": (v) => E.value = v
|
|
391
|
+
}, null), [[Oe, E.value]]), m("div", {
|
|
1321
392
|
class: "input-group-append",
|
|
1322
393
|
style: "margin-left: 0px; background:none;"
|
|
1323
|
-
}, [
|
|
394
|
+
}, [m("span", {
|
|
1324
395
|
class: "input-group-text input-group-clear",
|
|
1325
396
|
style: [{
|
|
1326
|
-
display:
|
|
397
|
+
display: E.value && E.value.length > 0 ? "" : "none"
|
|
1327
398
|
}],
|
|
1328
|
-
onClick: (
|
|
1329
|
-
}, [
|
|
399
|
+
onClick: (v) => z()
|
|
400
|
+
}, [m("i", {
|
|
1330
401
|
class: "f-icon modal_close"
|
|
1331
|
-
}, null)]),
|
|
402
|
+
}, null)]), m("span", {
|
|
1332
403
|
class: "input-group-text input-group-clear",
|
|
1333
|
-
onClick: (
|
|
1334
|
-
}, [
|
|
404
|
+
onClick: (v) => ge()
|
|
405
|
+
}, [m("i", {
|
|
1335
406
|
class: "f-icon f-icon-search"
|
|
1336
407
|
}, null)])])])]);
|
|
1337
408
|
}
|
|
1338
|
-
function
|
|
1339
|
-
return `${
|
|
409
|
+
function Ie(C) {
|
|
410
|
+
return `${d.propertyName}_${C.categoryId}`;
|
|
1340
411
|
}
|
|
1341
|
-
function
|
|
412
|
+
function Ee(C) {
|
|
1342
413
|
n.emit("propertyChanged", {
|
|
1343
|
-
...
|
|
1344
|
-
designerItem:
|
|
414
|
+
...C,
|
|
415
|
+
designerItem: S
|
|
1345
416
|
});
|
|
1346
417
|
}
|
|
1347
|
-
function
|
|
1348
|
-
var
|
|
1349
|
-
if (
|
|
1350
|
-
return
|
|
418
|
+
function we() {
|
|
419
|
+
var C, v;
|
|
420
|
+
if (P.value)
|
|
421
|
+
return m("div", {
|
|
1351
422
|
class: "panel-body",
|
|
1352
|
-
ref:
|
|
1353
|
-
}, [
|
|
423
|
+
ref: M
|
|
424
|
+
}, [m("ul", {
|
|
1354
425
|
class: ["property-grid", {
|
|
1355
|
-
"wide-panel":
|
|
426
|
+
"wide-panel": i.value
|
|
1356
427
|
}]
|
|
1357
|
-
}, [(
|
|
1358
|
-
key:
|
|
1359
|
-
"data-category-id":
|
|
1360
|
-
}, [!
|
|
428
|
+
}, [(v = (C = P.value) == null ? void 0 : C.categoryList) == null ? void 0 : v.map((y) => !y.hide && m("li", {
|
|
429
|
+
key: Ie(y),
|
|
430
|
+
"data-category-id": y == null ? void 0 : y.categoryId
|
|
431
|
+
}, [!y.hideTitle && m("span", {
|
|
1361
432
|
class: "group-label",
|
|
1362
|
-
onClick: () =>
|
|
1363
|
-
}, [
|
|
433
|
+
onClick: () => me(y)
|
|
434
|
+
}, [m("span", {
|
|
1364
435
|
class: ["f-icon mr-2", {
|
|
1365
|
-
"f-legend-show":
|
|
436
|
+
"f-legend-show": y.status === "closed"
|
|
1366
437
|
}, {
|
|
1367
|
-
"f-legend-collapse":
|
|
438
|
+
"f-legend-collapse": y.status === "open" || y.status === void 0
|
|
1368
439
|
}]
|
|
1369
|
-
}, null),
|
|
1370
|
-
hidden:
|
|
1371
|
-
}, [
|
|
1372
|
-
key: `${
|
|
1373
|
-
category:
|
|
1374
|
-
propertyData:
|
|
1375
|
-
onTriggerRefreshPanel:
|
|
1376
|
-
onValueChanged:
|
|
440
|
+
}, null), y.categoryName]), m("div", {
|
|
441
|
+
hidden: y.status === "closed"
|
|
442
|
+
}, [m(He, {
|
|
443
|
+
key: `${y == null ? void 0 : y.categoryId}-${U.value}`,
|
|
444
|
+
category: y,
|
|
445
|
+
propertyData: f.value,
|
|
446
|
+
onTriggerRefreshPanel: Z,
|
|
447
|
+
onValueChanged: Ee
|
|
1377
448
|
}, null)])]))])]);
|
|
1378
449
|
}
|
|
1379
|
-
function
|
|
1380
|
-
if (
|
|
1381
|
-
return
|
|
450
|
+
function Fe() {
|
|
451
|
+
if (s.value === "sidebar")
|
|
452
|
+
return m("div", {
|
|
1382
453
|
class: "side-panel h-100",
|
|
1383
|
-
onClick:
|
|
1384
|
-
}, [
|
|
454
|
+
onClick: Y
|
|
455
|
+
}, [m("i", {
|
|
1385
456
|
class: "f-icon f-icon-engineering w-100 icon"
|
|
1386
|
-
}, null),
|
|
457
|
+
}, null), m("span", null, [Re("属性")])]);
|
|
1387
458
|
}
|
|
1388
|
-
function
|
|
459
|
+
function Pe() {
|
|
1389
460
|
return {
|
|
1390
|
-
display:
|
|
1391
|
-
width:
|
|
461
|
+
display: h.value ? "block" : "none",
|
|
462
|
+
width: e.value
|
|
1392
463
|
};
|
|
1393
464
|
}
|
|
1394
|
-
function
|
|
1395
|
-
return
|
|
465
|
+
function xe() {
|
|
466
|
+
return m("div", {
|
|
1396
467
|
class: "switcher"
|
|
1397
|
-
}, [
|
|
468
|
+
}, [m("i", {
|
|
1398
469
|
class: "f-icon f-icon-exhale-discount",
|
|
1399
470
|
style: [{
|
|
1400
|
-
transform:
|
|
471
|
+
transform: s.value === "sidebar" ? "none" : "rotate(180deg)"
|
|
1401
472
|
}],
|
|
1402
|
-
onClick:
|
|
473
|
+
onClick: Y
|
|
1403
474
|
}, null)]);
|
|
1404
475
|
}
|
|
1405
|
-
function
|
|
1406
|
-
|
|
476
|
+
function Ve(C) {
|
|
477
|
+
P.value && P.value.tabId === C.tabId || (P.value = C, a.value = P.value.tabId, E.value = "");
|
|
1407
478
|
}
|
|
1408
|
-
function
|
|
1409
|
-
return
|
|
479
|
+
function Me() {
|
|
480
|
+
return c.map((C) => m("div", {
|
|
1410
481
|
class: ["title-label", {
|
|
1411
|
-
active:
|
|
482
|
+
active: P.value && P.value.tabId === C.tabId
|
|
1412
483
|
}, {
|
|
1413
|
-
"d-none":
|
|
484
|
+
"d-none": C.hide
|
|
1414
485
|
}],
|
|
1415
|
-
onClick: () =>
|
|
1416
|
-
}, [
|
|
486
|
+
onClick: () => Ve(C)
|
|
487
|
+
}, [m("span", null, [C.tabName])]));
|
|
1417
488
|
}
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
}),
|
|
1421
|
-
|
|
489
|
+
te(() => {
|
|
490
|
+
A(E.value);
|
|
491
|
+
}), Ae(() => {
|
|
492
|
+
r.value && (h.value = g.value), O(), A(E.value);
|
|
1422
493
|
});
|
|
1423
|
-
function
|
|
1424
|
-
|
|
494
|
+
function Se() {
|
|
495
|
+
U.value++;
|
|
1425
496
|
}
|
|
1426
|
-
function
|
|
1427
|
-
|
|
497
|
+
function ke() {
|
|
498
|
+
Z();
|
|
1428
499
|
}
|
|
1429
500
|
return n.expose({
|
|
1430
|
-
updatePropertyConfig:
|
|
1431
|
-
updateDesignerItem:
|
|
1432
|
-
reloadPropertyPanel:
|
|
1433
|
-
refreshPanel:
|
|
1434
|
-
}), () =>
|
|
1435
|
-
ref:
|
|
501
|
+
updatePropertyConfig: ye,
|
|
502
|
+
updateDesignerItem: ve,
|
|
503
|
+
reloadPropertyPanel: Se,
|
|
504
|
+
refreshPanel: ke
|
|
505
|
+
}), () => m(oe, null, [m("div", {
|
|
506
|
+
ref: x,
|
|
1436
507
|
class: ["property-panel", {
|
|
1437
|
-
"white-theme":
|
|
508
|
+
"white-theme": u.value
|
|
1438
509
|
}],
|
|
1439
|
-
style:
|
|
1440
|
-
}, [
|
|
510
|
+
style: Pe()
|
|
511
|
+
}, [m("div", {
|
|
1441
512
|
class: "propertyPanel panel flex-column",
|
|
1442
|
-
hidden:
|
|
1443
|
-
}, [
|
|
513
|
+
hidden: s.value !== "panel"
|
|
514
|
+
}, [m("div", {
|
|
1444
515
|
class: ["title d-flex", {
|
|
1445
|
-
"p-right":
|
|
516
|
+
"p-right": p.value
|
|
1446
517
|
}, {
|
|
1447
|
-
only:
|
|
518
|
+
only: K.value
|
|
1448
519
|
}]
|
|
1449
|
-
}, [
|
|
520
|
+
}, [Me(), be()]), Ce(), we()]), xe(), Fe()])]);
|
|
1450
521
|
}
|
|
1451
522
|
});
|
|
1452
|
-
function
|
|
1453
|
-
const { formSchemaUtils: n, formStateMachineUtils:
|
|
1454
|
-
function
|
|
523
|
+
function Je(d) {
|
|
524
|
+
const { formSchemaUtils: n, formStateMachineUtils: e } = d;
|
|
525
|
+
function i(o, f = "") {
|
|
1455
526
|
return {
|
|
1456
|
-
path:
|
|
1457
|
-
field:
|
|
1458
|
-
fullPath:
|
|
527
|
+
path: f + o.code,
|
|
528
|
+
field: o.id,
|
|
529
|
+
fullPath: o.code
|
|
1459
530
|
};
|
|
1460
531
|
}
|
|
1461
|
-
function
|
|
1462
|
-
|
|
532
|
+
function t(o, f = "") {
|
|
533
|
+
const p = n.getViewModelById(o);
|
|
534
|
+
return p ? p.states.map((a) => i(a, f)) : [];
|
|
1463
535
|
}
|
|
1464
|
-
function o
|
|
1465
|
-
const
|
|
1466
|
-
if (
|
|
1467
|
-
return
|
|
1468
|
-
const
|
|
1469
|
-
return [...
|
|
536
|
+
function s(o) {
|
|
537
|
+
const f = n.getRootViewModelId(), p = t(o);
|
|
538
|
+
if (o === f)
|
|
539
|
+
return p;
|
|
540
|
+
const a = t(f, "root-component.");
|
|
541
|
+
return [...p, ...a];
|
|
1470
542
|
}
|
|
1471
|
-
function
|
|
1472
|
-
return
|
|
543
|
+
function r(o) {
|
|
544
|
+
return o.binding && o.binding.path || o.id || "";
|
|
1473
545
|
}
|
|
1474
546
|
function g() {
|
|
1475
|
-
return
|
|
547
|
+
return e && e.getRenderStates() || [];
|
|
1476
548
|
}
|
|
1477
|
-
return { getVariables:
|
|
549
|
+
return { getVariables: s, getControlName: r, getStateMachines: g };
|
|
1478
550
|
}
|
|
1479
|
-
class
|
|
551
|
+
class ae {
|
|
1480
552
|
constructor(n) {
|
|
1481
|
-
|
|
553
|
+
I(this, "sessionVariables", [
|
|
1482
554
|
{
|
|
1483
555
|
key: "CurrentSysOrgName",
|
|
1484
556
|
name: "当前组织Name",
|
|
@@ -1515,7 +587,7 @@ class Ie {
|
|
|
1515
587
|
description: "当前登录的语言编号,例如简体中文返回'zh-CHS',英文返回'en',繁体中文'zh-CHT'"
|
|
1516
588
|
}
|
|
1517
589
|
]);
|
|
1518
|
-
|
|
590
|
+
I(this, "expressionNames", {
|
|
1519
591
|
compute: "计算表达式",
|
|
1520
592
|
dependency: "依赖表达式",
|
|
1521
593
|
validate: "验证表达式",
|
|
@@ -1524,102 +596,102 @@ class Ie {
|
|
|
1524
596
|
readonly: "只读表达式",
|
|
1525
597
|
required: "必填表达式"
|
|
1526
598
|
});
|
|
1527
|
-
|
|
1528
|
-
convertFrom: (
|
|
1529
|
-
const g =
|
|
599
|
+
I(this, "getExpressionConverter", (n, e) => ({
|
|
600
|
+
convertFrom: (i, t, s, r) => {
|
|
601
|
+
const g = s.getExpressionRuleValue(n, e || t);
|
|
1530
602
|
return g && g.value || "";
|
|
1531
603
|
},
|
|
1532
|
-
convertTo: (
|
|
1533
|
-
var
|
|
1534
|
-
if (
|
|
1535
|
-
const
|
|
1536
|
-
((
|
|
1537
|
-
(
|
|
1538
|
-
)) ?
|
|
604
|
+
convertTo: (i, t, s, r, g) => {
|
|
605
|
+
var o;
|
|
606
|
+
if (t === "dataPicking" && (s != null && s.target)) {
|
|
607
|
+
const f = `${s.target}_dataPicking`;
|
|
608
|
+
((o = s.rules) == null ? void 0 : o.some(
|
|
609
|
+
(a) => a.id === f && a.value
|
|
610
|
+
)) ? i.dictPickingExpressionId = f : delete i.dictPickingExpressionId;
|
|
1539
611
|
}
|
|
1540
|
-
|
|
612
|
+
r.updateExpression(s);
|
|
1541
613
|
}
|
|
1542
614
|
}));
|
|
1543
615
|
this.formSchemaService = n;
|
|
1544
616
|
}
|
|
1545
|
-
getExpressionRule(n,
|
|
1546
|
-
const
|
|
1547
|
-
if (!r)
|
|
1548
|
-
return "";
|
|
1549
|
-
const i = r.find((a) => a.target === n);
|
|
617
|
+
getExpressionRule(n, e) {
|
|
618
|
+
const i = this.formSchemaService.getExpressions();
|
|
1550
619
|
if (!i)
|
|
1551
620
|
return "";
|
|
1552
|
-
const
|
|
1553
|
-
|
|
621
|
+
const t = i.find((r) => r.target === n);
|
|
622
|
+
if (!t)
|
|
623
|
+
return "";
|
|
624
|
+
const s = t.rules.find((r) => r.type === e);
|
|
625
|
+
return s || "";
|
|
1554
626
|
}
|
|
1555
627
|
// 获取上下文表单变量
|
|
1556
628
|
getContextFormVariables() {
|
|
1557
629
|
const { module: n } = this.formSchemaService.getFormSchema();
|
|
1558
630
|
if (!n.viewmodels || n.viewmodels.length === 0)
|
|
1559
631
|
return [];
|
|
1560
|
-
const
|
|
1561
|
-
if (!
|
|
632
|
+
const e = this.formSchemaService.getRootViewModelId(), i = this.formSchemaService.getViewModelById(e);
|
|
633
|
+
if (!i || !i.states || i.states.length === 0)
|
|
1562
634
|
return [];
|
|
1563
|
-
const
|
|
1564
|
-
return
|
|
1565
|
-
|
|
1566
|
-
key:
|
|
1567
|
-
name:
|
|
1568
|
-
description:
|
|
1569
|
-
category:
|
|
635
|
+
const t = [];
|
|
636
|
+
return i.states.filter((s) => s.category === "remote").forEach((s) => {
|
|
637
|
+
t.push({
|
|
638
|
+
key: s.code,
|
|
639
|
+
name: s.name,
|
|
640
|
+
description: s.name,
|
|
641
|
+
category: s.category
|
|
1570
642
|
});
|
|
1571
|
-
}),
|
|
643
|
+
}), t;
|
|
1572
644
|
}
|
|
1573
|
-
createTreeNode(n,
|
|
645
|
+
createTreeNode(n, e, i = "label") {
|
|
1574
646
|
return {
|
|
1575
647
|
id: n.id,
|
|
1576
648
|
name: n.name,
|
|
1577
|
-
bindingPath: n[
|
|
1578
|
-
parents:
|
|
649
|
+
bindingPath: n[i],
|
|
650
|
+
parents: e,
|
|
1579
651
|
type: "field"
|
|
1580
652
|
};
|
|
1581
653
|
}
|
|
1582
|
-
buildEntityFieldsTreeData(n = null,
|
|
1583
|
-
const
|
|
1584
|
-
return n == null || n.forEach((
|
|
654
|
+
buildEntityFieldsTreeData(n = null, e) {
|
|
655
|
+
const i = [];
|
|
656
|
+
return n == null || n.forEach((t) => {
|
|
1585
657
|
var g;
|
|
1586
|
-
const
|
|
1587
|
-
let
|
|
1588
|
-
(g =
|
|
1589
|
-
data:
|
|
1590
|
-
children:
|
|
658
|
+
const s = this.createTreeNode(t, e);
|
|
659
|
+
let r = [];
|
|
660
|
+
(g = t.type) != null && g.fields && (r = this.buildEntityFieldsTreeData(t.type.fields, [...e, t.label])), i.push({
|
|
661
|
+
data: s,
|
|
662
|
+
children: r,
|
|
1591
663
|
expanded: !0
|
|
1592
664
|
});
|
|
1593
|
-
}),
|
|
1594
|
-
}
|
|
1595
|
-
buildChildEntityTreeData(n = null,
|
|
1596
|
-
const
|
|
1597
|
-
return n == null || n.forEach((
|
|
1598
|
-
var
|
|
1599
|
-
const
|
|
1600
|
-
|
|
1601
|
-
const
|
|
1602
|
-
g != null && g.length && (
|
|
1603
|
-
data:
|
|
1604
|
-
children:
|
|
665
|
+
}), i;
|
|
666
|
+
}
|
|
667
|
+
buildChildEntityTreeData(n = null, e) {
|
|
668
|
+
const i = [];
|
|
669
|
+
return n == null || n.forEach((t) => {
|
|
670
|
+
var o, f;
|
|
671
|
+
const s = this.createTreeNode(t, e);
|
|
672
|
+
s.type = "entity";
|
|
673
|
+
const r = this.buildEntityFieldsTreeData((o = t.type) == null ? void 0 : o.fields, [...e, t.label]), g = this.buildChildEntityTreeData((f = t.type) == null ? void 0 : f.entities, [...e, t.label]);
|
|
674
|
+
g != null && g.length && (r == null || r.push(...g)), i.push({
|
|
675
|
+
data: s,
|
|
676
|
+
children: r || [],
|
|
1605
677
|
// 空值回退
|
|
1606
678
|
expanded: !0
|
|
1607
679
|
});
|
|
1608
|
-
}),
|
|
680
|
+
}), i;
|
|
1609
681
|
}
|
|
1610
682
|
getEntitiesTreeData() {
|
|
1611
683
|
const n = this.formSchemaService.getSchemaEntities();
|
|
1612
684
|
if (!(n != null && n.length))
|
|
1613
685
|
return [];
|
|
1614
|
-
const
|
|
1615
|
-
if (!(
|
|
686
|
+
const e = n[0];
|
|
687
|
+
if (!(e != null && e.type))
|
|
1616
688
|
return [];
|
|
1617
|
-
const
|
|
1618
|
-
return
|
|
1619
|
-
entityCode:
|
|
689
|
+
const i = this.buildEntityFieldsTreeData(e.type.fields, [e.code]), t = this.buildChildEntityTreeData(e.type.entities, [e.code]);
|
|
690
|
+
return t != null && t.length && (i == null || i.push(...t)), {
|
|
691
|
+
entityCode: e.code,
|
|
1620
692
|
fields: [{
|
|
1621
|
-
data: this.createTreeNode(
|
|
1622
|
-
children:
|
|
693
|
+
data: this.createTreeNode(e, [], "code"),
|
|
694
|
+
children: i || []
|
|
1623
695
|
}]
|
|
1624
696
|
};
|
|
1625
697
|
}
|
|
@@ -1640,147 +712,147 @@ class Ie {
|
|
|
1640
712
|
}
|
|
1641
713
|
};
|
|
1642
714
|
}
|
|
1643
|
-
onBeforeOpenExpression(n,
|
|
1644
|
-
const
|
|
1645
|
-
message: ["validate", "required", "dataPicking"].includes(
|
|
1646
|
-
...
|
|
715
|
+
onBeforeOpenExpression(n, e, i) {
|
|
716
|
+
const t = i === "Field" ? n.binding.field : n.id, s = this.getExpressionRule(t, e), r = this.getEntitiesAndVariables(), g = {
|
|
717
|
+
message: ["validate", "required", "dataPicking"].includes(e) && s ? s.message : "",
|
|
718
|
+
...r
|
|
1647
719
|
};
|
|
1648
|
-
return
|
|
720
|
+
return s.messageType != null && (g.messageType = s.messageType), g;
|
|
1649
721
|
}
|
|
1650
|
-
buildRule(n,
|
|
1651
|
-
const { expression:
|
|
1652
|
-
id: `${n}_${
|
|
1653
|
-
type:
|
|
1654
|
-
value:
|
|
722
|
+
buildRule(n, e, i, t) {
|
|
723
|
+
const { expression: s, message: r, messageType: g } = e, o = {
|
|
724
|
+
id: `${n}_${i}`,
|
|
725
|
+
type: i,
|
|
726
|
+
value: s
|
|
1655
727
|
};
|
|
1656
|
-
return (
|
|
728
|
+
return (i === "validate" || i === "dataPicking" || i === "required") && (o.message = r), i === "dataPicking" && (o.messageType = g), i === "validate" && t && (o.elementId = t), o;
|
|
1657
729
|
}
|
|
1658
730
|
getExpressionData() {
|
|
1659
731
|
const { expressions: n } = this.formSchemaService.getFormSchema().module;
|
|
1660
732
|
return n || [];
|
|
1661
733
|
}
|
|
1662
|
-
updateExpression(n,
|
|
1663
|
-
const
|
|
1664
|
-
let
|
|
1665
|
-
const
|
|
1666
|
-
if (
|
|
1667
|
-
const
|
|
1668
|
-
if (
|
|
1669
|
-
|
|
734
|
+
updateExpression(n, e, i, t) {
|
|
735
|
+
const s = e === "Field" ? n.binding.field : n.id, r = this.buildRule(s, i, t, n.type === "form-group" ? n.id : "");
|
|
736
|
+
let o = this.getExpressionData().find((p) => p.targetType === e && p.target === s);
|
|
737
|
+
const f = (p) => p.value.trim() === "";
|
|
738
|
+
if (o) {
|
|
739
|
+
const p = o.rules.find((a) => a.id === r.id);
|
|
740
|
+
if (p)
|
|
741
|
+
f(r) ? o.rules = o.rules.filter((a) => a.id !== r.id) : (Object.assign(p, r), t === "validate" && n.type === "form-group" && (p.elementId = n.id));
|
|
1670
742
|
else {
|
|
1671
|
-
if (
|
|
743
|
+
if (f(r))
|
|
1672
744
|
return null;
|
|
1673
|
-
|
|
745
|
+
o.rules = o.rules || [], o.rules.push(r);
|
|
1674
746
|
}
|
|
1675
747
|
} else {
|
|
1676
|
-
if (
|
|
748
|
+
if (f(r))
|
|
1677
749
|
return null;
|
|
1678
|
-
|
|
1679
|
-
target: `${
|
|
1680
|
-
rules: [
|
|
1681
|
-
targetType:
|
|
750
|
+
o = {
|
|
751
|
+
target: `${s}`,
|
|
752
|
+
rules: [r],
|
|
753
|
+
targetType: e
|
|
1682
754
|
};
|
|
1683
755
|
}
|
|
1684
|
-
return
|
|
1685
|
-
}
|
|
1686
|
-
getExpressionEditorOptions(n,
|
|
1687
|
-
return
|
|
1688
|
-
var
|
|
1689
|
-
const g =
|
|
1690
|
-
return
|
|
1691
|
-
hide:
|
|
756
|
+
return o;
|
|
757
|
+
}
|
|
758
|
+
getExpressionEditorOptions(n, e, i, t) {
|
|
759
|
+
return i.reduce((s, r) => {
|
|
760
|
+
var o, f;
|
|
761
|
+
const g = e === "Field" ? (o = n == null ? void 0 : n.binding) == null ? void 0 : o.field : n.id;
|
|
762
|
+
return s[r] = {
|
|
763
|
+
hide: e === "Field" ? !!((f = n == null ? void 0 : n.binding) != null && f.field) : !1,
|
|
1692
764
|
description: "",
|
|
1693
|
-
title: this.expressionNames[
|
|
765
|
+
title: this.expressionNames[r],
|
|
1694
766
|
type: "string",
|
|
1695
767
|
$converter: this.getExpressionConverter(g),
|
|
1696
768
|
refreshPanelAfterChanged: !0,
|
|
1697
769
|
editor: {
|
|
1698
770
|
type: "expression-editor",
|
|
1699
771
|
singleExpand: !1,
|
|
1700
|
-
dialogTitle: `${this.expressionNames[
|
|
1701
|
-
showMessage:
|
|
1702
|
-
showMessageType:
|
|
1703
|
-
beforeOpen: () => this.onBeforeOpenExpression(n,
|
|
1704
|
-
onSubmitModal: (
|
|
1705
|
-
const
|
|
1706
|
-
if (
|
|
1707
|
-
const
|
|
1708
|
-
|
|
772
|
+
dialogTitle: `${this.expressionNames[r]}编辑器`,
|
|
773
|
+
showMessage: r === "validate" || r === "dataPicking" || r === "required",
|
|
774
|
+
showMessageType: r === "dataPicking",
|
|
775
|
+
beforeOpen: () => this.onBeforeOpenExpression(n, r, e),
|
|
776
|
+
onSubmitModal: (p) => {
|
|
777
|
+
const a = this.updateExpression(n, e, p, r);
|
|
778
|
+
if (t) {
|
|
779
|
+
const h = this.buildRule(g, p, r);
|
|
780
|
+
t(h);
|
|
1709
781
|
}
|
|
1710
|
-
return
|
|
782
|
+
return a;
|
|
1711
783
|
}
|
|
1712
784
|
}
|
|
1713
|
-
},
|
|
785
|
+
}, s;
|
|
1714
786
|
}, {});
|
|
1715
787
|
}
|
|
1716
|
-
getExpressionInfo(n,
|
|
1717
|
-
const
|
|
1718
|
-
value:
|
|
1719
|
-
targetId:
|
|
1720
|
-
targetType:
|
|
1721
|
-
expressionType:
|
|
788
|
+
getExpressionInfo(n, e, i) {
|
|
789
|
+
const t = e === "Field" ? n.binding.field : n.id, s = this.getExpressionRule(t, i), r = {
|
|
790
|
+
value: s && s.value,
|
|
791
|
+
targetId: t,
|
|
792
|
+
targetType: e,
|
|
793
|
+
expressionType: i
|
|
1722
794
|
};
|
|
1723
|
-
return
|
|
795
|
+
return s && s.message && (r.message = s.message), r;
|
|
1724
796
|
}
|
|
1725
|
-
getExpressionConfig(n,
|
|
797
|
+
getExpressionConfig(n, e, i = ["compute", "dependency", "validate"], t) {
|
|
1726
798
|
return {
|
|
1727
799
|
description: "表达式",
|
|
1728
800
|
title: "表达式",
|
|
1729
801
|
hide: !n.binding,
|
|
1730
802
|
properties: {
|
|
1731
|
-
...this.getExpressionEditorOptions(n,
|
|
803
|
+
...this.getExpressionEditorOptions(n, e, i, t)
|
|
1732
804
|
}
|
|
1733
805
|
};
|
|
1734
806
|
}
|
|
1735
|
-
getExpressionOptions(n,
|
|
1736
|
-
const
|
|
807
|
+
getExpressionOptions(n, e, i) {
|
|
808
|
+
const t = this.getExpressionInfo(n, e, i);
|
|
1737
809
|
return {
|
|
1738
|
-
dialogTitle: `${this.expressionNames[
|
|
810
|
+
dialogTitle: `${this.expressionNames[i]}编辑器`,
|
|
1739
811
|
singleExpand: !1,
|
|
1740
|
-
showMessage:
|
|
1741
|
-
beforeOpen: () => this.onBeforeOpenExpression(n,
|
|
1742
|
-
expressionInfo:
|
|
812
|
+
showMessage: i === "required",
|
|
813
|
+
beforeOpen: () => this.onBeforeOpenExpression(n, i, e),
|
|
814
|
+
expressionInfo: t
|
|
1743
815
|
};
|
|
1744
816
|
}
|
|
1745
817
|
}
|
|
1746
|
-
class
|
|
1747
|
-
constructor(n,
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
818
|
+
class Qe {
|
|
819
|
+
constructor(n, e) {
|
|
820
|
+
I(this, "componentId");
|
|
821
|
+
I(this, "viewModelId");
|
|
822
|
+
I(this, "eventsEditorUtils");
|
|
823
|
+
I(this, "formSchemaUtils");
|
|
824
|
+
I(this, "formMetadataConverter");
|
|
825
|
+
I(this, "designViewModelUtils");
|
|
826
|
+
I(this, "designViewModelField");
|
|
827
|
+
I(this, "controlCreatorUtils");
|
|
828
|
+
I(this, "designerHostService");
|
|
829
|
+
I(this, "designerContext");
|
|
830
|
+
I(this, "schemaService", null);
|
|
831
|
+
I(this, "metadataService", null);
|
|
832
|
+
I(this, "propertyConfig", {
|
|
1761
833
|
type: "object",
|
|
1762
834
|
categories: {}
|
|
1763
835
|
});
|
|
1764
|
-
var
|
|
1765
|
-
this.componentId = n, this.designerHostService =
|
|
836
|
+
var i;
|
|
837
|
+
this.componentId = n, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((i = this.formSchemaUtils) == null ? void 0 : i.getViewModelIdByComponentId(n)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService, this.designerContext = e.designerContext;
|
|
1766
838
|
}
|
|
1767
839
|
getFormDesignerInstance() {
|
|
1768
|
-
var n,
|
|
1769
|
-
return (
|
|
840
|
+
var n, e;
|
|
841
|
+
return (e = (n = this.designerContext) == null ? void 0 : n.instances) == null ? void 0 : e.formDesigner.value;
|
|
1770
842
|
}
|
|
1771
843
|
getTableInfo() {
|
|
1772
844
|
var n;
|
|
1773
845
|
return (n = this.schemaService) == null ? void 0 : n.getTableInfoByViewModelId(this.viewModelId);
|
|
1774
846
|
}
|
|
1775
847
|
setDesignViewModelField(n) {
|
|
1776
|
-
var
|
|
1777
|
-
const
|
|
1778
|
-
if (
|
|
848
|
+
var i;
|
|
849
|
+
const e = n.binding && n.binding.type === "Form" && n.binding.field;
|
|
850
|
+
if (e) {
|
|
1779
851
|
if (!this.designViewModelField) {
|
|
1780
|
-
const
|
|
1781
|
-
this.designViewModelField =
|
|
852
|
+
const t = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
853
|
+
this.designViewModelField = t.fields.find((s) => s.id === e);
|
|
1782
854
|
}
|
|
1783
|
-
n.updateOn = (
|
|
855
|
+
n.updateOn = (i = this.designViewModelField) == null ? void 0 : i.updateOn;
|
|
1784
856
|
}
|
|
1785
857
|
}
|
|
1786
858
|
getBasicPropConfig(n) {
|
|
@@ -1804,17 +876,17 @@ class gr {
|
|
|
1804
876
|
valueField: "value",
|
|
1805
877
|
idField: "value",
|
|
1806
878
|
editable: !1,
|
|
1807
|
-
data: [{ value: n.type, name:
|
|
879
|
+
data: [{ value: n.type, name: l[n.type] && l[n.type].name }]
|
|
1808
880
|
}
|
|
1809
881
|
}
|
|
1810
882
|
}
|
|
1811
883
|
};
|
|
1812
884
|
}
|
|
1813
|
-
getAppearanceConfig(n = null,
|
|
1814
|
-
const
|
|
885
|
+
getAppearanceConfig(n = null, e = {}, i) {
|
|
886
|
+
const t = {
|
|
1815
887
|
title: "外观",
|
|
1816
888
|
description: "Appearance"
|
|
1817
|
-
},
|
|
889
|
+
}, s = {
|
|
1818
890
|
class: {
|
|
1819
891
|
title: "class样式",
|
|
1820
892
|
type: "string",
|
|
@@ -1830,21 +902,21 @@ class gr {
|
|
|
1830
902
|
parentPropertyID: "appearance"
|
|
1831
903
|
}
|
|
1832
904
|
};
|
|
1833
|
-
for (const
|
|
1834
|
-
|
|
905
|
+
for (const r in e)
|
|
906
|
+
s[r] = Object.assign(s[r] || {}, e[r]);
|
|
1835
907
|
return {
|
|
1836
|
-
...
|
|
1837
|
-
properties: { ...
|
|
1838
|
-
setPropertyRelates(
|
|
1839
|
-
if (
|
|
1840
|
-
switch (
|
|
908
|
+
...t,
|
|
909
|
+
properties: { ...s },
|
|
910
|
+
setPropertyRelates(r, g) {
|
|
911
|
+
if (r) {
|
|
912
|
+
switch (r && r.propertyID) {
|
|
1841
913
|
case "class":
|
|
1842
914
|
case "style": {
|
|
1843
|
-
|
|
915
|
+
W.value++;
|
|
1844
916
|
break;
|
|
1845
917
|
}
|
|
1846
918
|
}
|
|
1847
|
-
|
|
919
|
+
i && i(r, n, g);
|
|
1848
920
|
}
|
|
1849
921
|
}
|
|
1850
922
|
};
|
|
@@ -1859,49 +931,49 @@ class gr {
|
|
|
1859
931
|
* @param expressionType 指定表达式类型,存在属性和表达式类型不一致的情况
|
|
1860
932
|
* @returns
|
|
1861
933
|
*/
|
|
1862
|
-
getPropertyEditorParams(n,
|
|
1863
|
-
const { getVariables: g, getControlName:
|
|
934
|
+
getPropertyEditorParams(n, e = [], i = "visible", t = {}, s = {}, r = "") {
|
|
935
|
+
const { getVariables: g, getControlName: o, getStateMachines: f } = Je(this.designerHostService), p = this.getRealTargetType(n), a = e && e.length > 0 ? e : ["Const", "Variable", "StateMachine", "Expression"], h = {
|
|
1864
936
|
type: "property-editor",
|
|
1865
|
-
propertyTypes:
|
|
937
|
+
propertyTypes: a
|
|
1866
938
|
};
|
|
1867
|
-
return
|
|
1868
|
-
switch (
|
|
939
|
+
return a.map((u) => {
|
|
940
|
+
switch (u) {
|
|
1869
941
|
case "Const":
|
|
1870
|
-
Object.assign(
|
|
942
|
+
Object.assign(h, {
|
|
1871
943
|
constType: "enum",
|
|
1872
944
|
constEnums: [{ id: !0, name: "是" }, { id: !1, name: "否" }]
|
|
1873
|
-
},
|
|
945
|
+
}, t);
|
|
1874
946
|
break;
|
|
1875
947
|
case "Expression":
|
|
1876
|
-
|
|
948
|
+
h.expressionConfig = this.getExpressionOptions(n, p, r || i);
|
|
1877
949
|
break;
|
|
1878
950
|
case "StateMachine":
|
|
1879
|
-
|
|
951
|
+
h.stateMachines = f();
|
|
1880
952
|
break;
|
|
1881
953
|
case "Variable":
|
|
1882
|
-
Object.assign(
|
|
1883
|
-
controlName:
|
|
954
|
+
Object.assign(h, {
|
|
955
|
+
controlName: o(n),
|
|
1884
956
|
newVariablePrefix: "is",
|
|
1885
957
|
newVariableType: "Boolean",
|
|
1886
958
|
variables: g(this.viewModelId),
|
|
1887
959
|
parentComponentId: this.componentId === "root-component" ? "" : "root-component",
|
|
1888
|
-
onBeforeOpenVariables: (
|
|
1889
|
-
|
|
960
|
+
onBeforeOpenVariables: (c) => {
|
|
961
|
+
c.value = g(this.viewModelId);
|
|
1890
962
|
}
|
|
1891
|
-
},
|
|
963
|
+
}, s), this.designerContext.designerMode === "PC_RTC" && (h.newVariablePrefix = "ext_" + h.newVariablePrefix);
|
|
1892
964
|
break;
|
|
1893
965
|
}
|
|
1894
|
-
}),
|
|
966
|
+
}), h;
|
|
1895
967
|
}
|
|
1896
|
-
getVisibleProperty(n,
|
|
1897
|
-
var
|
|
1898
|
-
let
|
|
1899
|
-
return
|
|
968
|
+
getVisibleProperty(n, e = "") {
|
|
969
|
+
var s;
|
|
970
|
+
let i = ["Const", "Variable", "StateMachine", "Expression"];
|
|
971
|
+
return e === "gridFieldEditor" ? i = ["Const", "Expression"] : e === "form-group" && !((s = n.binding) != null && s.field) && (i = ["Const", "Variable", "StateMachine"]), {
|
|
1900
972
|
visible: {
|
|
1901
973
|
title: "是否可见",
|
|
1902
974
|
type: "boolean",
|
|
1903
975
|
description: "运行时组件是否可见",
|
|
1904
|
-
editor: this.getPropertyEditorParams(n,
|
|
976
|
+
editor: this.getPropertyEditorParams(n, i, "visible")
|
|
1905
977
|
}
|
|
1906
978
|
};
|
|
1907
979
|
}
|
|
@@ -1911,27 +983,27 @@ class gr {
|
|
|
1911
983
|
* @param viewModelId
|
|
1912
984
|
* @returns
|
|
1913
985
|
*/
|
|
1914
|
-
getBehaviorConfig(n,
|
|
1915
|
-
const
|
|
986
|
+
getBehaviorConfig(n, e = "", i = {}, t) {
|
|
987
|
+
const s = {
|
|
1916
988
|
title: "行为",
|
|
1917
989
|
description: ""
|
|
1918
|
-
},
|
|
1919
|
-
for (const
|
|
1920
|
-
|
|
990
|
+
}, r = this.getVisibleProperty(n, e);
|
|
991
|
+
for (const o in i)
|
|
992
|
+
r[o] = Object.assign(r[o] || {}, i[o]);
|
|
1921
993
|
const g = this;
|
|
1922
994
|
return {
|
|
1923
|
-
...
|
|
1924
|
-
properties: { ...
|
|
1925
|
-
setPropertyRelates(
|
|
1926
|
-
if (
|
|
1927
|
-
switch (
|
|
995
|
+
...s,
|
|
996
|
+
properties: { ...r },
|
|
997
|
+
setPropertyRelates(o, f) {
|
|
998
|
+
if (o) {
|
|
999
|
+
switch (o.propertyID) {
|
|
1928
1000
|
case "disabled":
|
|
1929
1001
|
case "readonly":
|
|
1930
1002
|
case "visible":
|
|
1931
|
-
g.afterMutilEditorChanged(n,
|
|
1003
|
+
g.afterMutilEditorChanged(n, o);
|
|
1932
1004
|
break;
|
|
1933
1005
|
}
|
|
1934
|
-
|
|
1006
|
+
t && t(o, f);
|
|
1935
1007
|
}
|
|
1936
1008
|
}
|
|
1937
1009
|
};
|
|
@@ -1941,8 +1013,8 @@ class gr {
|
|
|
1941
1013
|
* @param propertyData
|
|
1942
1014
|
* @param changeObject
|
|
1943
1015
|
*/
|
|
1944
|
-
afterMutilEditorChanged(n,
|
|
1945
|
-
this.addNewVariableToViewModel(
|
|
1016
|
+
afterMutilEditorChanged(n, e) {
|
|
1017
|
+
this.addNewVariableToViewModel(e, this.viewModelId), this.updateExpressionValue(e), this.clearExpression(e, n);
|
|
1946
1018
|
}
|
|
1947
1019
|
/**
|
|
1948
1020
|
*
|
|
@@ -1950,12 +1022,12 @@ class gr {
|
|
|
1950
1022
|
* @param componentInstance
|
|
1951
1023
|
* @returns
|
|
1952
1024
|
*/
|
|
1953
|
-
updateElementByParentContainer(n,
|
|
1954
|
-
const
|
|
1955
|
-
if (!
|
|
1025
|
+
updateElementByParentContainer(n, e) {
|
|
1026
|
+
const i = e && e.parent && e.parent.schema;
|
|
1027
|
+
if (!i)
|
|
1956
1028
|
return;
|
|
1957
|
-
const
|
|
1958
|
-
|
|
1029
|
+
const t = i.contents.findIndex((r) => r.id === n), s = Ge(i.contents[t]);
|
|
1030
|
+
i.contents.splice(t, 1), i.contents.splice(t, 0, s), De();
|
|
1959
1031
|
}
|
|
1960
1032
|
/**
|
|
1961
1033
|
* 属性编辑器,在编辑过程中会新增变量,此处需要将新增的变量追加到ViewModel中
|
|
@@ -1963,41 +1035,41 @@ class gr {
|
|
|
1963
1035
|
* @param viewModelId
|
|
1964
1036
|
* @returns
|
|
1965
1037
|
*/
|
|
1966
|
-
addNewVariableToViewModel(n,
|
|
1967
|
-
const
|
|
1968
|
-
if (!(
|
|
1038
|
+
addNewVariableToViewModel(n, e) {
|
|
1039
|
+
const i = n.propertyValue;
|
|
1040
|
+
if (!(i && typeof i == "object") || !(i.type === "Variable" && i.isNewVariable))
|
|
1969
1041
|
return;
|
|
1970
|
-
const
|
|
1971
|
-
id:
|
|
1042
|
+
const r = {
|
|
1043
|
+
id: i.field,
|
|
1972
1044
|
category: "locale",
|
|
1973
|
-
code:
|
|
1974
|
-
name:
|
|
1975
|
-
type:
|
|
1045
|
+
code: i.fullPath,
|
|
1046
|
+
name: i.fullPath,
|
|
1047
|
+
type: i.newVariableType || "String",
|
|
1976
1048
|
isRtcVariable: this.designerContext.designerMode === "PC_RTC" ? !0 : void 0
|
|
1977
1049
|
};
|
|
1978
|
-
delete
|
|
1050
|
+
delete i.newVariableType, delete i.isNewVariable, this.formSchemaUtils.getVariableByCode(r.code) || this.formSchemaUtils.getViewModelById("root-viewmodel").states.push(r);
|
|
1979
1051
|
}
|
|
1980
1052
|
/**
|
|
1981
1053
|
* 更新表达式到expressions节点
|
|
1982
1054
|
* @param changeObject
|
|
1983
1055
|
*/
|
|
1984
1056
|
updateExpressionValue(n) {
|
|
1985
|
-
const
|
|
1986
|
-
if (!((
|
|
1057
|
+
const e = n.propertyValue;
|
|
1058
|
+
if (!((e && e.type) === "Expression" && e.expressionInfo))
|
|
1987
1059
|
return;
|
|
1988
|
-
const { expressionId:
|
|
1989
|
-
|
|
1990
|
-
const { expressions:
|
|
1991
|
-
let
|
|
1992
|
-
|
|
1993
|
-
const
|
|
1994
|
-
if (
|
|
1995
|
-
|
|
1060
|
+
const { expressionId: s, expressionInfo: r } = e, { targetId: g, targetType: o, expressionType: f, value: p, message: a } = r, h = this.formSchemaUtils.getModule();
|
|
1061
|
+
h.expressions = h.expressions || [];
|
|
1062
|
+
const { expressions: u } = h;
|
|
1063
|
+
let c = u.find((E) => E.target === g);
|
|
1064
|
+
c || (c = { target: g, rules: [], targetType: o }, u.push(c));
|
|
1065
|
+
const b = c.rules.find((E) => E.type === f);
|
|
1066
|
+
if (b)
|
|
1067
|
+
b.value = p, b.message = a;
|
|
1996
1068
|
else {
|
|
1997
|
-
const
|
|
1998
|
-
|
|
1069
|
+
const E = { id: s, type: f, value: p, message: a };
|
|
1070
|
+
c.rules.push(E);
|
|
1999
1071
|
}
|
|
2000
|
-
delete
|
|
1072
|
+
delete e.expressionInfo;
|
|
2001
1073
|
}
|
|
2002
1074
|
/**
|
|
2003
1075
|
* 属性类型切换为非表达式后,清除原表达式
|
|
@@ -2005,55 +1077,55 @@ class gr {
|
|
|
2005
1077
|
* @param propertyData
|
|
2006
1078
|
* @returns
|
|
2007
1079
|
*/
|
|
2008
|
-
clearExpression(n,
|
|
2009
|
-
const
|
|
2010
|
-
if (
|
|
1080
|
+
clearExpression(n, e) {
|
|
1081
|
+
const i = n.propertyValue;
|
|
1082
|
+
if (i && i.type === "Expression")
|
|
2011
1083
|
return;
|
|
2012
|
-
const
|
|
2013
|
-
!
|
|
1084
|
+
const s = n.propertyID, r = this.formSchemaUtils.getExpressions(), g = e.binding ? e.binding.field : e.id, o = r.find((f) => f.target === g);
|
|
1085
|
+
!o || !o.rules || (o.rules = o.rules.filter((f) => f.type !== s));
|
|
2014
1086
|
}
|
|
2015
|
-
getExpressionOptions(n,
|
|
2016
|
-
return new
|
|
1087
|
+
getExpressionOptions(n, e, i) {
|
|
1088
|
+
return new ae(this.formSchemaUtils).getExpressionOptions(n, e, i);
|
|
2017
1089
|
}
|
|
2018
1090
|
getRealTargetType(n) {
|
|
2019
|
-
return ["response-toolbar-item", "tab-toolbar-item", "section-toolbar-item"].indexOf(n.type) > -1 ? "Button" : n.binding && n.binding.field ? "Field" : "Container";
|
|
1091
|
+
return ["response-toolbar-item", "tab-toolbar-item", "section-toolbar-item", "drawer-toolbar-item"].indexOf(n.type) > -1 ? "Button" : n.binding && n.binding.field ? "Field" : "Container";
|
|
2020
1092
|
}
|
|
2021
1093
|
createBaseEventProperty(n) {
|
|
2022
|
-
const
|
|
2023
|
-
return
|
|
1094
|
+
const e = {};
|
|
1095
|
+
return e[this.viewModelId] = {
|
|
2024
1096
|
type: "events-editor",
|
|
2025
1097
|
editor: {
|
|
2026
1098
|
initialData: n,
|
|
2027
|
-
viewSourceHandle: (
|
|
2028
|
-
var
|
|
2029
|
-
((
|
|
1099
|
+
viewSourceHandle: (i) => {
|
|
1100
|
+
var t;
|
|
1101
|
+
((t = i.controller) == null ? void 0 : t.label.indexOf(this.formSchemaUtils.getModule().code)) > -1 && this.eventsEditorUtils.jumpToMethod(i);
|
|
2030
1102
|
}
|
|
2031
1103
|
}
|
|
2032
|
-
},
|
|
1104
|
+
}, e;
|
|
2033
1105
|
}
|
|
2034
1106
|
}
|
|
2035
|
-
const
|
|
1107
|
+
const $ = class $ {
|
|
2036
1108
|
/**
|
|
2037
1109
|
* 根据绑定字段类型获取可用的输入类控件
|
|
2038
1110
|
*/
|
|
2039
|
-
static getEditorTypesByMDataType(n,
|
|
2040
|
-
if (
|
|
2041
|
-
return [{ key:
|
|
2042
|
-
let
|
|
2043
|
-
if (
|
|
2044
|
-
const
|
|
2045
|
-
|
|
1111
|
+
static getEditorTypesByMDataType(n, e = !1, i = "") {
|
|
1112
|
+
if (e)
|
|
1113
|
+
return [{ key: l["language-textbox"].type, value: l["language-textbox"].name }];
|
|
1114
|
+
let t = $.fieldControlTypeMapping[n];
|
|
1115
|
+
if (i === "data-grid-column" && (t != null && t.length)) {
|
|
1116
|
+
const s = [l["check-group"].type, l["radio-group"].type, l.image.type, l["rich-text-editor"].type];
|
|
1117
|
+
t = t.filter((r) => !s.includes(r.key));
|
|
2046
1118
|
}
|
|
2047
|
-
return
|
|
1119
|
+
return t;
|
|
2048
1120
|
}
|
|
2049
1121
|
/**
|
|
2050
1122
|
* 获取所有输入类控件
|
|
2051
1123
|
*/
|
|
2052
1124
|
static getAllInputTypes() {
|
|
2053
1125
|
const n = [];
|
|
2054
|
-
for (const
|
|
2055
|
-
|
|
2056
|
-
n.find((
|
|
1126
|
+
for (const e in $.fieldControlTypeMapping)
|
|
1127
|
+
$.fieldControlTypeMapping[e].forEach((i) => {
|
|
1128
|
+
n.find((t) => t.key === i.key && t.value === i.value) || n.push({ key: i.key, value: i.value });
|
|
2057
1129
|
});
|
|
2058
1130
|
return n;
|
|
2059
1131
|
}
|
|
@@ -2061,205 +1133,205 @@ const ee = class ee {
|
|
|
2061
1133
|
* 提供schema字段基础属性和DOM控件属性的映射
|
|
2062
1134
|
* @param control 控件元数据
|
|
2063
1135
|
*/
|
|
2064
|
-
static mappingDomPropAndSchemaProp(n,
|
|
2065
|
-
var
|
|
2066
|
-
const
|
|
2067
|
-
return (n.type ===
|
|
1136
|
+
static mappingDomPropAndSchemaProp(n, e) {
|
|
1137
|
+
var s;
|
|
1138
|
+
const i = (s = n.editor) == null ? void 0 : s.type, t = [];
|
|
1139
|
+
return (n.type === l["data-grid-column"].type || n.type === l["tree-grid-column"].type) && e && e.categoryId && e.categoryId.indexOf("gridFieldEditor") < 0 && t.push({ domField: "title", schemaField: "name" }), t.push({ domField: "label", schemaField: "name" }), t.push({ domField: "editor.required", schemaField: "require" }), t.push({ domField: "editor.readonly", schemaField: "readonly" }), (i === l["input-group"].type || i === l.textarea.type || i === l["number-spinner"].type) && t.push({ domField: "editor.maxLength", schemaField: "type.length" }), i === l["number-spinner"].type && t.push({ domField: "editor.precision", schemaField: "type.precision" }), (n.type === l["data-grid-column"].type || n.type === l["tree-grid-column"].type) && t.push({ domField: "formatter.precision", schemaField: "type.precision" }), (i === l["combo-list"].type || i === l["radio-group"].type) && t.push({ domField: "editor.data", schemaField: "type.enumValues" }), (n.type === l["data-grid-column"].type || n.type === l["tree-grid-column"].type) && t.push({ domField: "formatter.data", schemaField: "type.enumValues" }), i === l["date-picker"].type && (t.push({ domField: "editor.displayFormat", schemaField: "editor.format" }), t.push({ domField: "editor.fieldType", schemaField: "type.name" })), i === l["number-spinner"].type && (t.push({ domField: "editor.max", schemaField: "editor.maxValue" }), t.push({ domField: "editor.min", schemaField: "editor.minValue" })), i === l.lookup.type && (t.push({ domField: "editor.dataSource", schemaField: "editor.dataSource" }), t.push({ domField: "editor.valueField", schemaField: "editor.valueField" }), t.push({ domField: "editor.textField", schemaField: "editor.textField" }), t.push({ domField: "editor.displayType", schemaField: "editor.displayType" }), t.push({ domField: "editor.mapFields", schemaField: "editor.mapFields" }), t.push({ domField: "editor.helpId", schemaField: "editor.helpId" })), t.push({ domField: "path", schemaField: "bindingPath" }), t.push({ domField: "binding.path", schemaField: "bindingField" }), t.push({ domField: "binding.fullPath", schemaField: "path" }), (n.type === l["data-grid-column"].type || n.type === l["tree-grid-column"].type) && t.push({ domField: "field", schemaField: "bindingPath" }), t;
|
|
2068
1140
|
}
|
|
2069
1141
|
};
|
|
2070
1142
|
/**
|
|
2071
1143
|
* <字段类型,可配置的控件类型列表>的映射
|
|
2072
1144
|
*/
|
|
2073
|
-
|
|
1145
|
+
I($, "fieldControlTypeMapping", {
|
|
2074
1146
|
String: [
|
|
2075
|
-
{ key:
|
|
2076
|
-
{ key:
|
|
2077
|
-
{ key:
|
|
2078
|
-
{ key:
|
|
2079
|
-
{ key:
|
|
2080
|
-
{ key:
|
|
2081
|
-
{ key:
|
|
2082
|
-
{ key:
|
|
2083
|
-
{ key:
|
|
2084
|
-
{ key:
|
|
2085
|
-
{ key:
|
|
1147
|
+
{ key: l["input-group"].type, value: l["input-group"].name },
|
|
1148
|
+
{ key: l.lookup.type, value: l.lookup.name },
|
|
1149
|
+
{ key: l.image.type, value: l.image.name },
|
|
1150
|
+
{ key: l["date-picker"].type, value: l["date-picker"].name },
|
|
1151
|
+
{ key: l.switch.type, value: l.switch.name },
|
|
1152
|
+
{ key: l["check-box"].type, value: l["check-box"].name },
|
|
1153
|
+
{ key: l["check-group"].type, value: l["check-group"].name },
|
|
1154
|
+
{ key: l["radio-group"].type, value: l["radio-group"].name },
|
|
1155
|
+
{ key: l["combo-list"].type, value: l["combo-list"].name },
|
|
1156
|
+
{ key: l.textarea.type, value: l.textarea.name },
|
|
1157
|
+
{ key: l["time-picker"].type, value: l["time-picker"].name }
|
|
2086
1158
|
],
|
|
2087
1159
|
Text: [
|
|
2088
|
-
{ key:
|
|
2089
|
-
{ key:
|
|
2090
|
-
{ key:
|
|
2091
|
-
{ key:
|
|
1160
|
+
{ key: l.textarea.type, value: l.textarea.name },
|
|
1161
|
+
{ key: l.lookup.type, value: l.lookup.name },
|
|
1162
|
+
{ key: l.image.type, value: l.image.name },
|
|
1163
|
+
{ key: l["rich-text-editor"].type, value: l["rich-text-editor"].name }
|
|
2092
1164
|
],
|
|
2093
1165
|
Decimal: [
|
|
2094
|
-
{ key:
|
|
1166
|
+
{ key: l["number-spinner"].type, value: l["number-spinner"].name }
|
|
2095
1167
|
],
|
|
2096
1168
|
Integer: [
|
|
2097
|
-
{ key:
|
|
1169
|
+
{ key: l["number-spinner"].type, value: l["number-spinner"].name }
|
|
2098
1170
|
],
|
|
2099
1171
|
Number: [
|
|
2100
|
-
{ key:
|
|
2101
|
-
{ key:
|
|
2102
|
-
{ key:
|
|
1172
|
+
{ key: l["number-spinner"].type, value: l["number-spinner"].name },
|
|
1173
|
+
{ key: l.switch.type, value: l.switch.name },
|
|
1174
|
+
{ key: l["check-box"].type, value: l["check-box"].name }
|
|
2103
1175
|
],
|
|
2104
1176
|
BigNumber: [
|
|
2105
|
-
{ key:
|
|
1177
|
+
{ key: l["number-spinner"].type, value: l["number-spinner"].name }
|
|
2106
1178
|
],
|
|
2107
1179
|
Date: [
|
|
2108
|
-
{ key:
|
|
1180
|
+
{ key: l["date-picker"].type, value: l["date-picker"].name }
|
|
2109
1181
|
],
|
|
2110
1182
|
DateTime: [
|
|
2111
|
-
{ key:
|
|
1183
|
+
{ key: l["date-picker"].type, value: l["date-picker"].name }
|
|
2112
1184
|
],
|
|
2113
1185
|
Boolean: [
|
|
2114
|
-
{ key:
|
|
2115
|
-
{ key:
|
|
1186
|
+
{ key: l.switch.type, value: l.switch.name },
|
|
1187
|
+
{ key: l["check-box"].type, value: l["check-box"].name }
|
|
2116
1188
|
],
|
|
2117
1189
|
Enum: [
|
|
2118
|
-
{ key:
|
|
2119
|
-
{ key:
|
|
1190
|
+
{ key: l["combo-list"].type, value: l["combo-list"].name },
|
|
1191
|
+
{ key: l["radio-group"].type, value: l["radio-group"].name }
|
|
2120
1192
|
],
|
|
2121
1193
|
Object: [
|
|
2122
|
-
{ key:
|
|
2123
|
-
{ key:
|
|
2124
|
-
{ key:
|
|
1194
|
+
{ key: l.lookup.type, value: l.lookup.name },
|
|
1195
|
+
{ key: l["combo-list"].type, value: l["combo-list"].name },
|
|
1196
|
+
{ key: l["radio-group"].type, value: l["radio-group"].name }
|
|
2125
1197
|
]
|
|
2126
1198
|
});
|
|
2127
|
-
let
|
|
2128
|
-
var
|
|
2129
|
-
class
|
|
1199
|
+
let j = $;
|
|
1200
|
+
var Ye = /* @__PURE__ */ ((d) => (d.string = "string", d.boolean = "boolean", d.number = "number", d.select = "select", d.boolOrExp = "boolOrExp", d.editableSelect = "editableSelect", d.multiSelect = "multiSelect", d.date = "date", d.datetime = "datetime", d.modal = "modal", d.cascade = "cascade", d.custom = "custom", d.unity = "unity", d.events = "events", d.switch = "switch", d.multiLanguage = "multiLanguage", d))(Ye || {}), G = /* @__PURE__ */ ((d) => (d.Form = "Form", d.Variable = "Variable", d))(G || {});
|
|
1201
|
+
class Ze {
|
|
2130
1202
|
constructor() {
|
|
2131
1203
|
/** 控件标题 */
|
|
2132
|
-
|
|
1204
|
+
I(this, "label", "");
|
|
2133
1205
|
/** 控件id */
|
|
2134
|
-
|
|
1206
|
+
I(this, "id", "");
|
|
2135
1207
|
/** 每个控件占用的栅格数 */
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
1208
|
+
I(this, "columnInSM", 12);
|
|
1209
|
+
I(this, "columnInMD", 6);
|
|
1210
|
+
I(this, "columnInLG", 3);
|
|
1211
|
+
I(this, "columnInEL", 2);
|
|
2140
1212
|
/** 每个控件占用的列数 */
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
1213
|
+
I(this, "displayWidthInSM", 1);
|
|
1214
|
+
I(this, "displayWidthInMD", 1);
|
|
1215
|
+
I(this, "displayWidthInLG", 1);
|
|
1216
|
+
I(this, "displayWidthInEL", 1);
|
|
2145
1217
|
/** 编辑器内部默认显示的屏幕大小-----可以去掉 */
|
|
2146
|
-
|
|
1218
|
+
I(this, "displayColumnCountAtBreakPoint", "md");
|
|
2147
1219
|
/** 控件所在行,传0即可-----编辑器内部使用 */
|
|
2148
|
-
|
|
1220
|
+
I(this, "tagRow", 0);
|
|
2149
1221
|
/** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
|
|
2150
|
-
|
|
1222
|
+
I(this, "showTopBorder", 0);
|
|
2151
1223
|
/** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
|
|
2152
|
-
|
|
1224
|
+
I(this, "group", 1);
|
|
2153
1225
|
/** 控件是否符合标准的class配置(设计器用的) */
|
|
2154
|
-
|
|
1226
|
+
I(this, "isSupportedClass", !0);
|
|
2155
1227
|
/** 控件所在分组id(设计器用的) */
|
|
2156
|
-
|
|
1228
|
+
I(this, "fieldSetId", "");
|
|
2157
1229
|
}
|
|
2158
1230
|
}
|
|
2159
|
-
function
|
|
2160
|
-
let n,
|
|
2161
|
-
const
|
|
2162
|
-
let
|
|
2163
|
-
function
|
|
2164
|
-
const
|
|
2165
|
-
if (
|
|
2166
|
-
|
|
1231
|
+
function et(d) {
|
|
1232
|
+
let n, e;
|
|
1233
|
+
const i = /* @__PURE__ */ new Map();
|
|
1234
|
+
let t = [];
|
|
1235
|
+
function s(p, a) {
|
|
1236
|
+
const u = p.split(" ").filter((M) => M.startsWith("col-"));
|
|
1237
|
+
if (u.length === 0) {
|
|
1238
|
+
a.isSupportedClass = !1;
|
|
2167
1239
|
return;
|
|
2168
1240
|
}
|
|
2169
|
-
let
|
|
2170
|
-
|
|
2171
|
-
}
|
|
2172
|
-
function
|
|
2173
|
-
let
|
|
2174
|
-
|
|
2175
|
-
if (
|
|
2176
|
-
|
|
1241
|
+
let c = u.find((M) => /^col-([1-9]|10|11|12)$/.test(M)), b = u.find((M) => /^col-md-([1-9]|10|11|12)$/.test(M)), E = u.find((M) => /^col-xl-([1-9]|10|11|12)$/.test(M)), x = u.find((M) => /^col-el-([1-9]|10|11|12)$/.test(M));
|
|
1242
|
+
c = c || "col-12", a.columnInSM = parseInt(c.replace("col-", ""), 10), a.displayWidthInSM = a.columnInSM / 12, a.displayWidthInSM !== 1 && (a.isSupportedClass = !1), b = b || "col-md-" + a.columnInSM, a.columnInMD = parseInt(b.replace("col-md-", ""), 10), a.displayWidthInMD = a.columnInMD / 6, [1, 2].includes(a.displayWidthInMD) || (a.isSupportedClass = !1), E = E || "col-xl-" + a.columnInMD, a.columnInLG = parseInt(E.replace("col-xl-", ""), 10), a.displayWidthInLG = a.columnInLG / 3, [1, 2, 3, 4].includes(a.displayWidthInLG) || (a.isSupportedClass = !1), x = x || "col-el-" + a.columnInLG, a.columnInEL = parseInt(x.replace("col-el-", ""), 10), a.displayWidthInEL = a.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(a.displayWidthInEL) || (a.isSupportedClass = !1);
|
|
1243
|
+
}
|
|
1244
|
+
function r(p, a, h, u = !1) {
|
|
1245
|
+
let c = !1;
|
|
1246
|
+
p.contents.forEach((b) => {
|
|
1247
|
+
if (b.type === "fieldset") {
|
|
1248
|
+
h += 1, r(b, a, h, !0), c = !0;
|
|
2177
1249
|
return;
|
|
2178
1250
|
}
|
|
2179
|
-
|
|
2180
|
-
const
|
|
2181
|
-
|
|
1251
|
+
c && (h += 1, c = !1);
|
|
1252
|
+
const E = b.appearance && b.appearance.class, x = new Ze();
|
|
1253
|
+
E ? s(E, x) : x.isSupportedClass = !1, x.label = b.label || b.id, x.id = b.id, x.group = h, u && (x.fieldSetId = p.id), e === b.id && (n = h), i.set(b.id, b), a.push(x);
|
|
2182
1254
|
});
|
|
2183
1255
|
}
|
|
2184
|
-
function g(
|
|
2185
|
-
const
|
|
2186
|
-
if (!
|
|
1256
|
+
function g(p) {
|
|
1257
|
+
const a = d.getComponentById(p);
|
|
1258
|
+
if (!a || !a.componentType || !a.componentType.startsWith("form"))
|
|
2187
1259
|
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
2188
|
-
const
|
|
2189
|
-
return !
|
|
2190
|
-
}
|
|
2191
|
-
function
|
|
2192
|
-
|
|
2193
|
-
const { result:
|
|
2194
|
-
if (!
|
|
2195
|
-
return { result:
|
|
2196
|
-
|
|
2197
|
-
const
|
|
2198
|
-
|
|
2199
|
-
const
|
|
1260
|
+
const h = d.selectNode(a, (u) => u.type === l["response-form"].type);
|
|
1261
|
+
return !h || !h.contents || h.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: h };
|
|
1262
|
+
}
|
|
1263
|
+
function o(p, a) {
|
|
1264
|
+
a = a || p.id;
|
|
1265
|
+
const { result: h, message: u, formNode: c } = g(a);
|
|
1266
|
+
if (!h)
|
|
1267
|
+
return { result: h, message: u };
|
|
1268
|
+
e = p.id, t = [], i.clear();
|
|
1269
|
+
const b = c.contents[0].type === l.fieldset.type ? 0 : 1;
|
|
1270
|
+
r(c, t, b);
|
|
1271
|
+
const E = t.find((M) => !M.isSupportedClass);
|
|
2200
1272
|
return {
|
|
2201
1273
|
defaultState: {
|
|
2202
1274
|
defaultGroupNumber: n || 1,
|
|
2203
|
-
model:
|
|
1275
|
+
model: E ? "customize" : "standard"
|
|
2204
1276
|
},
|
|
2205
|
-
importData:
|
|
1277
|
+
importData: t
|
|
2206
1278
|
};
|
|
2207
1279
|
}
|
|
2208
|
-
function p
|
|
2209
|
-
|
|
2210
|
-
const { result:
|
|
2211
|
-
if (!
|
|
1280
|
+
function f(p, a) {
|
|
1281
|
+
a = a;
|
|
1282
|
+
const { result: h, formNode: u } = g(a);
|
|
1283
|
+
if (!h)
|
|
2212
1284
|
return "";
|
|
2213
|
-
const
|
|
2214
|
-
return
|
|
2215
|
-
var
|
|
2216
|
-
const
|
|
2217
|
-
if (
|
|
2218
|
-
const
|
|
2219
|
-
|
|
1285
|
+
const c = [];
|
|
1286
|
+
return p.forEach((b) => {
|
|
1287
|
+
var M;
|
|
1288
|
+
const E = i.get(b.id), x = E.appearance && E.appearance.class;
|
|
1289
|
+
if (x) {
|
|
1290
|
+
const k = x.split(" ").filter((B) => !B.startsWith("col-")), S = "col-" + b.columnInSM, N = "col-md-" + b.columnInMD, P = "col-xl-" + b.columnInLG, U = "col-el-" + b.columnInEL, K = [S, N, P, U].concat(k);
|
|
1291
|
+
E.appearance.class = K.join(" ");
|
|
2220
1292
|
}
|
|
2221
|
-
if (
|
|
2222
|
-
const
|
|
2223
|
-
|
|
1293
|
+
if (b.fieldSetId) {
|
|
1294
|
+
const L = u.contents.find((S) => S.id === b.fieldSetId), k = c.find((S) => S.id === b.fieldSetId);
|
|
1295
|
+
k ? (M = k.contents) == null || M.push(E) : (c.push(L), L.contents = [E]);
|
|
2224
1296
|
} else
|
|
2225
|
-
|
|
2226
|
-
}),
|
|
1297
|
+
c.push(E);
|
|
1298
|
+
}), u.contents = c, u.id;
|
|
2227
1299
|
}
|
|
2228
1300
|
return {
|
|
2229
1301
|
checkCanFindFormNode: g,
|
|
2230
|
-
checkCanOpenLayoutEditor:
|
|
2231
|
-
changeFormControlsByResponseLayoutConfig:
|
|
2232
|
-
getResonseFormLayoutConfig:
|
|
1302
|
+
checkCanOpenLayoutEditor: o,
|
|
1303
|
+
changeFormControlsByResponseLayoutConfig: f,
|
|
1304
|
+
getResonseFormLayoutConfig: r
|
|
2233
1305
|
};
|
|
2234
1306
|
}
|
|
2235
|
-
class
|
|
2236
|
-
constructor(
|
|
2237
|
-
super(
|
|
2238
|
-
|
|
1307
|
+
class at extends Qe {
|
|
1308
|
+
constructor(e, i) {
|
|
1309
|
+
super(e, i);
|
|
1310
|
+
I(this, "responseLayoutEditorFunction");
|
|
2239
1311
|
/** 控件绑定的变量 */
|
|
2240
|
-
|
|
2241
|
-
|
|
1312
|
+
I(this, "bindingVarible");
|
|
1313
|
+
I(this, "numberEditorOptions", {
|
|
2242
1314
|
type: "number-spinner",
|
|
2243
1315
|
useThousands: !1,
|
|
2244
1316
|
keyboard: !1,
|
|
2245
1317
|
showButton: !1
|
|
2246
1318
|
});
|
|
2247
|
-
this.responseLayoutEditorFunction =
|
|
1319
|
+
this.responseLayoutEditorFunction = et(this.formSchemaUtils);
|
|
2248
1320
|
}
|
|
2249
|
-
getCommonPropertyConfig(
|
|
2250
|
-
this.propertyConfig.categories.basic = this.getBasicProperties(
|
|
1321
|
+
getCommonPropertyConfig(e, i, t = "Card") {
|
|
1322
|
+
this.propertyConfig.categories.basic = this.getBasicProperties(e, i, t), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, i), this.propertyConfig.categories.behavior = this.getBehaviorConfig(e, "form-group");
|
|
2251
1323
|
}
|
|
2252
|
-
getPropertyConfig(
|
|
2253
|
-
return this.getCommonPropertyConfig(
|
|
1324
|
+
getPropertyConfig(e, i) {
|
|
1325
|
+
return this.getCommonPropertyConfig(e, i, "Card"), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig.categories.expressions = this.getExpressionConfig(e, "Field"), this.propertyConfig.categories.eventsEditor = this.getEventPropertyConfig(e), this.propertyConfig;
|
|
2254
1326
|
}
|
|
2255
|
-
getGridFieldEdtiorPropConfig(
|
|
2256
|
-
return this.propertyConfig.categories = {}, this.getCommonPropertyConfig(
|
|
1327
|
+
getGridFieldEdtiorPropConfig(e, i) {
|
|
1328
|
+
return this.propertyConfig.categories = {}, this.getCommonPropertyConfig(e, i, "Grid"), this.getGridFieldEdtiorProperties ? this.propertyConfig.categories.editor = this.getGridFieldEdtiorProperties(e) : this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig.categories.expressons = this.getExpressionConfig(e, "Field"), this.propertyConfig.categories;
|
|
2257
1329
|
}
|
|
2258
|
-
getBasicProperties(
|
|
2259
|
-
var
|
|
2260
|
-
const
|
|
2261
|
-
this.setDesignViewModelField(
|
|
2262
|
-
const { canChangeControlType:
|
|
1330
|
+
getBasicProperties(e, i, t = "Card") {
|
|
1331
|
+
var f;
|
|
1332
|
+
const s = this;
|
|
1333
|
+
this.setDesignViewModelField(e);
|
|
1334
|
+
const { canChangeControlType: r, editorTypeList: g } = this.getAvailableEditorType(e), o = {
|
|
2263
1335
|
description: "Basic Information",
|
|
2264
1336
|
title: "基本信息",
|
|
2265
1337
|
properties: {
|
|
@@ -2282,7 +1354,7 @@ class Hi extends gr {
|
|
|
2282
1354
|
idField: "key",
|
|
2283
1355
|
editable: !1,
|
|
2284
1356
|
data: g,
|
|
2285
|
-
readonly: !
|
|
1357
|
+
readonly: !r
|
|
2286
1358
|
}
|
|
2287
1359
|
},
|
|
2288
1360
|
label: {
|
|
@@ -2297,7 +1369,7 @@ class Hi extends gr {
|
|
|
2297
1369
|
editor: {
|
|
2298
1370
|
data: [{ id: "visible", name: "显示" }, { id: "reserve-space", name: "占位" }, { id: "none", name: "不显示" }]
|
|
2299
1371
|
},
|
|
2300
|
-
defaultValue: ((
|
|
1372
|
+
defaultValue: ((f = e.editor) == null ? void 0 : f.type) === "image" ? "none" : "visible"
|
|
2301
1373
|
},
|
|
2302
1374
|
binding: {
|
|
2303
1375
|
description: "绑定的表单字段",
|
|
@@ -2306,7 +1378,7 @@ class Hi extends gr {
|
|
|
2306
1378
|
type: "binding-selector",
|
|
2307
1379
|
bindingType: { enable: !1 },
|
|
2308
1380
|
editorParams: {
|
|
2309
|
-
componentSchema:
|
|
1381
|
+
componentSchema: e,
|
|
2310
1382
|
needSyncToViewModel: !0,
|
|
2311
1383
|
viewModelId: this.viewModelId,
|
|
2312
1384
|
designerHostService: this.designerHostService,
|
|
@@ -2315,65 +1387,65 @@ class Hi extends gr {
|
|
|
2315
1387
|
textField: "bindingField"
|
|
2316
1388
|
},
|
|
2317
1389
|
refreshPanelAfterChanged: !0,
|
|
2318
|
-
readonly: this.formSchemaUtils.designerMode === "PC_RTC" && !
|
|
1390
|
+
readonly: this.formSchemaUtils.designerMode === "PC_RTC" && !e.isRtcControl
|
|
2319
1391
|
}
|
|
2320
1392
|
},
|
|
2321
|
-
setPropertyRelates(
|
|
2322
|
-
if (
|
|
2323
|
-
switch (
|
|
1393
|
+
setPropertyRelates(p, a, h) {
|
|
1394
|
+
if (p)
|
|
1395
|
+
switch (p && p.propertyID) {
|
|
2324
1396
|
case "type": {
|
|
2325
|
-
|
|
1397
|
+
s.changeControlType(e, p, i);
|
|
2326
1398
|
break;
|
|
2327
1399
|
}
|
|
2328
1400
|
case "label": {
|
|
2329
|
-
|
|
1401
|
+
p.needRefreshControlTree = !0;
|
|
2330
1402
|
break;
|
|
2331
1403
|
}
|
|
2332
1404
|
case "binding": {
|
|
2333
|
-
|
|
1405
|
+
s.changeBindingField(e, p, h);
|
|
2334
1406
|
break;
|
|
2335
1407
|
}
|
|
2336
1408
|
}
|
|
2337
1409
|
}
|
|
2338
1410
|
};
|
|
2339
|
-
return
|
|
1411
|
+
return t.toLocaleLowerCase() !== "card" && delete o.properties.showLabelType, o;
|
|
2340
1412
|
}
|
|
2341
1413
|
/**
|
|
2342
1414
|
* 校验控件是否支持切换类型
|
|
2343
1415
|
* @param control 控件
|
|
2344
1416
|
*/
|
|
2345
|
-
checkCanChangeControlType(
|
|
2346
|
-
if (!
|
|
1417
|
+
checkCanChangeControlType(e, i) {
|
|
1418
|
+
if (!e.binding)
|
|
2347
1419
|
return !1;
|
|
2348
|
-
if (
|
|
2349
|
-
if (this.bindingVarible = this.formSchemaUtils.getVariableById(
|
|
1420
|
+
if (e.binding.type === "Variable") {
|
|
1421
|
+
if (this.bindingVarible = this.formSchemaUtils.getVariableById(e.binding.field), !this.bindingVarible)
|
|
2350
1422
|
return !1;
|
|
2351
|
-
} else if (!this.designViewModelField || this.designViewModelField.$type !==
|
|
1423
|
+
} else if (!this.designViewModelField || this.designViewModelField.$type !== ie.SimpleField)
|
|
2352
1424
|
return !1;
|
|
2353
1425
|
return !0;
|
|
2354
1426
|
}
|
|
2355
1427
|
/**
|
|
2356
1428
|
* 获取可选的编辑器类型
|
|
2357
1429
|
*/
|
|
2358
|
-
getAvailableEditorType(
|
|
2359
|
-
var
|
|
2360
|
-
const
|
|
2361
|
-
if (!
|
|
1430
|
+
getAvailableEditorType(e) {
|
|
1431
|
+
var s;
|
|
1432
|
+
const i = this.checkCanChangeControlType(e, this.viewModelId);
|
|
1433
|
+
if (!i)
|
|
2362
1434
|
return {
|
|
2363
1435
|
canChangeControlType: !1,
|
|
2364
1436
|
editorTypeList: [{
|
|
2365
|
-
key:
|
|
2366
|
-
value: ((
|
|
1437
|
+
key: e.editor.type,
|
|
1438
|
+
value: ((s = l[e.editor.type]) == null ? void 0 : s.name) || e.editor.type
|
|
2367
1439
|
}]
|
|
2368
1440
|
};
|
|
2369
|
-
let
|
|
2370
|
-
return this.designViewModelField && this.designViewModelField.$type ===
|
|
1441
|
+
let t = [];
|
|
1442
|
+
return this.designViewModelField && this.designViewModelField.$type === ie.SimpleField ? t = j.getEditorTypesByMDataType(this.designViewModelField.type.name, this.designViewModelField.multiLanguage) : this.bindingVarible && (t = j.getEditorTypesByMDataType(this.bindingVarible.type, this.designViewModelField.multiLanguage)), { canChangeControlType: i, editorTypeList: t };
|
|
2371
1443
|
}
|
|
2372
|
-
changeBindingField(
|
|
2373
|
-
|
|
1444
|
+
changeBindingField(e, i, t) {
|
|
1445
|
+
i.needRefreshEntityTree = !0;
|
|
2374
1446
|
}
|
|
2375
|
-
getAppearanceProperties(
|
|
2376
|
-
const
|
|
1447
|
+
getAppearanceProperties(e, i) {
|
|
1448
|
+
const t = this;
|
|
2377
1449
|
return {
|
|
2378
1450
|
title: "外观",
|
|
2379
1451
|
description: "Appearance",
|
|
@@ -2407,84 +1479,84 @@ class Hi extends gr {
|
|
|
2407
1479
|
refreshPanelAfterChanged: !0,
|
|
2408
1480
|
editor: {
|
|
2409
1481
|
type: "response-layout-editor-setting",
|
|
2410
|
-
beforeOpen: () =>
|
|
1482
|
+
beforeOpen: () => t.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, t.componentId)
|
|
2411
1483
|
}
|
|
2412
1484
|
}
|
|
2413
1485
|
},
|
|
2414
|
-
setPropertyRelates(
|
|
2415
|
-
if (
|
|
2416
|
-
switch (
|
|
1486
|
+
setPropertyRelates(s, r) {
|
|
1487
|
+
if (s)
|
|
1488
|
+
switch (s && s.propertyID) {
|
|
2417
1489
|
case "responseLayout":
|
|
2418
|
-
|
|
1490
|
+
t.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(s.propertyValue, t.componentId || e.id), t.updateUnifiedLayoutAfterResponseLayoutChanged(t.componentId), t.updateElementByParentContainer(e.id, i), delete e.responseLayout;
|
|
2419
1491
|
break;
|
|
2420
1492
|
case "class":
|
|
2421
|
-
|
|
1493
|
+
t.updateUnifiedLayoutAfterControlChanged(s.propertyValue, e.id, this.componentId), W.value++;
|
|
2422
1494
|
break;
|
|
2423
1495
|
case "style": {
|
|
2424
|
-
|
|
1496
|
+
W.value++;
|
|
2425
1497
|
break;
|
|
2426
1498
|
}
|
|
2427
1499
|
}
|
|
2428
1500
|
}
|
|
2429
1501
|
};
|
|
2430
1502
|
}
|
|
2431
|
-
getEditorProperties(
|
|
2432
|
-
return this.getComponentConfig(
|
|
1503
|
+
getEditorProperties(e) {
|
|
1504
|
+
return this.getComponentConfig(e);
|
|
2433
1505
|
}
|
|
2434
1506
|
/**
|
|
2435
1507
|
* 卡片控件:切换控件类型后事件
|
|
2436
1508
|
* @param propertyData 控件DOM属性
|
|
2437
1509
|
* @param newControlType 新控件类型
|
|
2438
1510
|
*/
|
|
2439
|
-
changeControlType(
|
|
2440
|
-
const
|
|
2441
|
-
if (!
|
|
1511
|
+
changeControlType(e, i, t) {
|
|
1512
|
+
const s = i.propertyValue, r = t && t.parent && t.parent.schema;
|
|
1513
|
+
if (!r)
|
|
2442
1514
|
return;
|
|
2443
|
-
const g =
|
|
1515
|
+
const g = r.contents.findIndex((p) => p.id === e.id);
|
|
2444
1516
|
if (g === -1)
|
|
2445
1517
|
return;
|
|
2446
|
-
const
|
|
2447
|
-
let
|
|
1518
|
+
const o = r.contents[g];
|
|
1519
|
+
let f;
|
|
2448
1520
|
if (this.designViewModelField) {
|
|
2449
|
-
const
|
|
2450
|
-
|
|
2451
|
-
}
|
|
2452
|
-
|
|
2453
|
-
id:
|
|
2454
|
-
appearance:
|
|
2455
|
-
size:
|
|
2456
|
-
label:
|
|
2457
|
-
binding:
|
|
2458
|
-
}), Object.prototype.hasOwnProperty.call(
|
|
2459
|
-
Object.prototype.hasOwnProperty.call(
|
|
2460
|
-
}),
|
|
2461
|
-
(
|
|
1521
|
+
const h = this.formSchemaUtils.getViewModelById(this.viewModelId).fields.find((c) => c.id === this.designViewModelField.id).fieldSchema || {};
|
|
1522
|
+
h.editor || (h.editor = {}), h.editor.$type = s, this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, h, !1), f = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, s);
|
|
1523
|
+
}
|
|
1524
|
+
f || (f = this.controlCreatorUtils.createFormGroupWithoutField(s)), Object.assign(f, {
|
|
1525
|
+
id: o.id,
|
|
1526
|
+
appearance: o.appearance,
|
|
1527
|
+
size: o.size,
|
|
1528
|
+
label: o.label,
|
|
1529
|
+
binding: o.binding
|
|
1530
|
+
}), Object.prototype.hasOwnProperty.call(o, "visible") && Object.assign(f, { visible: o.visible }), o.editor && ["readonly", "required", "placeholder"].map((p) => {
|
|
1531
|
+
Object.prototype.hasOwnProperty.call(o.editor, p) && (f.editor[p] = o.editor[p]);
|
|
1532
|
+
}), t != null && t.updateContextSchema ? t.updateContextSchema(f) : (t.schema = Object.assign(o, f), Object.assign(e, f)), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
1533
|
+
(p) => p.classList.remove("dgComponentSelected")
|
|
2462
1534
|
), Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(
|
|
2463
|
-
(
|
|
2464
|
-
),
|
|
1535
|
+
(p) => p.classList.remove("dgComponentFocused")
|
|
1536
|
+
), W.value++, le(() => {
|
|
2465
1537
|
this.getFormDesignerInstance().reloadPropertyPanel();
|
|
2466
1538
|
});
|
|
2467
1539
|
}
|
|
2468
|
-
getComponentConfig(
|
|
2469
|
-
var
|
|
2470
|
-
const
|
|
1540
|
+
getComponentConfig(e, i = {}, t = {}, s) {
|
|
1541
|
+
var h, u;
|
|
1542
|
+
const r = Object.assign({
|
|
2471
1543
|
description: "编辑器",
|
|
2472
1544
|
title: "编辑器",
|
|
2473
1545
|
type: "input-group",
|
|
2474
1546
|
$converter: "/converter/property-editor.converter",
|
|
2475
1547
|
parentPropertyID: "editor"
|
|
2476
|
-
},
|
|
1548
|
+
}, i), g = (h = e.binding) != null && h.field ? [] : ["Const", "Variable", "StateMachine"], o = this.getPropertyEditorParams(e, g, "readonly"), f = this.getPropertyEditorParams(e, g, "required"), p = {
|
|
2477
1549
|
readonly: {
|
|
2478
1550
|
description: "",
|
|
2479
1551
|
title: "只读",
|
|
2480
|
-
editor:
|
|
1552
|
+
editor: o
|
|
2481
1553
|
},
|
|
2482
1554
|
required: {
|
|
2483
1555
|
description: "",
|
|
2484
1556
|
title: "必填",
|
|
2485
1557
|
type: "boolean",
|
|
2486
|
-
editor:
|
|
2487
|
-
visible: !!((
|
|
1558
|
+
editor: f,
|
|
1559
|
+
visible: !!((u = e.binding) != null && u.field)
|
|
2488
1560
|
},
|
|
2489
1561
|
placeholder: {
|
|
2490
1562
|
description: "当控件没有值时在输入框中显示的文本",
|
|
@@ -2492,21 +1564,21 @@ class Hi extends gr {
|
|
|
2492
1564
|
type: "string"
|
|
2493
1565
|
}
|
|
2494
1566
|
};
|
|
2495
|
-
for (const
|
|
2496
|
-
|
|
2497
|
-
const
|
|
1567
|
+
for (const c in t)
|
|
1568
|
+
p[c] = Object.assign(p[c] || {}, t[c]);
|
|
1569
|
+
const a = this;
|
|
2498
1570
|
return {
|
|
2499
|
-
...
|
|
2500
|
-
properties: { ...
|
|
2501
|
-
setPropertyRelates(
|
|
2502
|
-
if (
|
|
2503
|
-
switch (
|
|
1571
|
+
...r,
|
|
1572
|
+
properties: { ...p },
|
|
1573
|
+
setPropertyRelates(c, b) {
|
|
1574
|
+
if (c) {
|
|
1575
|
+
switch (c.propertyID) {
|
|
2504
1576
|
case "readonly":
|
|
2505
1577
|
case "required":
|
|
2506
|
-
|
|
1578
|
+
a.afterMutilEditorChanged(e, c);
|
|
2507
1579
|
break;
|
|
2508
1580
|
}
|
|
2509
|
-
|
|
1581
|
+
s && s.bind(a)(c, e, b);
|
|
2510
1582
|
}
|
|
2511
1583
|
}
|
|
2512
1584
|
};
|
|
@@ -2517,47 +1589,47 @@ class Hi extends gr {
|
|
|
2517
1589
|
* @param controlId 控件Id
|
|
2518
1590
|
* @param componentId 控件所在组件id
|
|
2519
1591
|
*/
|
|
2520
|
-
updateUnifiedLayoutAfterControlChanged(
|
|
2521
|
-
const
|
|
2522
|
-
let
|
|
2523
|
-
|
|
2524
|
-
const
|
|
2525
|
-
id:
|
|
2526
|
-
columnInSM: parseInt(
|
|
1592
|
+
updateUnifiedLayoutAfterControlChanged(e, i, t) {
|
|
1593
|
+
const s = e.split(" ");
|
|
1594
|
+
let r = s.find((a) => /^col-([1-9]|10|11|12)$/.test(a)), g = s.find((a) => /^col-md-([1-9]|10|11|12)$/.test(a)), o = s.find((a) => /^col-xl-([1-9]|10|11|12)$/.test(a)), f = s.find((a) => /^col-el-([1-9]|10|11|12)$/.test(a));
|
|
1595
|
+
r = r || "col-12", g = g || "col-md-" + r.replace("col-", ""), o = o || "col-xl-" + g.replace("col-md-", ""), f = f || "col-el-" + o.replace("col-xl-", "");
|
|
1596
|
+
const p = {
|
|
1597
|
+
id: i,
|
|
1598
|
+
columnInSM: parseInt(r.replace("col-", ""), 10),
|
|
2527
1599
|
columnInMD: parseInt(g.replace("col-md-", ""), 10),
|
|
2528
|
-
columnInLG: parseInt(
|
|
2529
|
-
columnInEL: parseInt(
|
|
1600
|
+
columnInLG: parseInt(o.replace("col-xl-", ""), 10),
|
|
1601
|
+
columnInEL: parseInt(f.replace("col-el-", ""), 10)
|
|
2530
1602
|
};
|
|
2531
|
-
this.updateUnifiedLayoutAfterResponseLayoutChanged(
|
|
1603
|
+
this.updateUnifiedLayoutAfterResponseLayoutChanged(t, p);
|
|
2532
1604
|
}
|
|
2533
1605
|
/**
|
|
2534
1606
|
* 修改控件布局配置后更新Form统一布局配置
|
|
2535
1607
|
* @param componentId 组件Id
|
|
2536
1608
|
* @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
|
|
2537
1609
|
*/
|
|
2538
|
-
updateUnifiedLayoutAfterResponseLayoutChanged(
|
|
2539
|
-
const { formNode:
|
|
2540
|
-
if (!
|
|
1610
|
+
updateUnifiedLayoutAfterResponseLayoutChanged(e, i) {
|
|
1611
|
+
const { formNode: t } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
|
|
1612
|
+
if (!t || !t.unifiedLayout)
|
|
2541
1613
|
return;
|
|
2542
|
-
const
|
|
2543
|
-
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(
|
|
2544
|
-
const
|
|
2545
|
-
Object.assign(
|
|
2546
|
-
}
|
|
2547
|
-
const
|
|
2548
|
-
Object.assign(
|
|
2549
|
-
uniqueColClassInSM:
|
|
2550
|
-
uniqueColClassInMD:
|
|
2551
|
-
uniqueColClassInLG:
|
|
2552
|
-
uniqueColClassInEL:
|
|
1614
|
+
const s = [];
|
|
1615
|
+
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(t, s, 1), i) {
|
|
1616
|
+
const c = s.find((b) => b.id === i.id);
|
|
1617
|
+
Object.assign(c || {}, i);
|
|
1618
|
+
}
|
|
1619
|
+
const r = s.map((c) => c.columnInSM), g = s.map((c) => c.columnInMD), o = s.map((c) => c.columnInLG), f = s.map((c) => c.columnInEL), p = this.checkIsUniqueColumn(r) ? r[0] : null, a = this.checkIsUniqueColumn(g) ? g[0] : null, h = this.checkIsUniqueColumn(o) ? o[0] : null, u = this.checkIsUniqueColumn(f) ? f[0] : null;
|
|
1620
|
+
Object.assign(t.unifiedLayout, {
|
|
1621
|
+
uniqueColClassInSM: p,
|
|
1622
|
+
uniqueColClassInMD: a,
|
|
1623
|
+
uniqueColClassInLG: h,
|
|
1624
|
+
uniqueColClassInEL: u
|
|
2553
1625
|
});
|
|
2554
1626
|
}
|
|
2555
1627
|
/**
|
|
2556
1628
|
* 校验宽度样式值是否一致
|
|
2557
1629
|
*/
|
|
2558
|
-
checkIsUniqueColumn(
|
|
2559
|
-
const
|
|
2560
|
-
return Array.from(
|
|
1630
|
+
checkIsUniqueColumn(e) {
|
|
1631
|
+
const i = new Set(e);
|
|
1632
|
+
return Array.from(i).length === 1;
|
|
2561
1633
|
}
|
|
2562
1634
|
/**
|
|
2563
1635
|
* 枚举项编辑器
|
|
@@ -2566,20 +1638,20 @@ class Hi extends gr {
|
|
|
2566
1638
|
* @param textField
|
|
2567
1639
|
* @returns
|
|
2568
1640
|
*/
|
|
2569
|
-
getItemCollectionEditor(
|
|
2570
|
-
return
|
|
1641
|
+
getItemCollectionEditor(e, i, t) {
|
|
1642
|
+
return i = i || "value", t = t || "name", {
|
|
2571
1643
|
editor: {
|
|
2572
1644
|
columns: [
|
|
2573
|
-
{ field:
|
|
2574
|
-
{ field:
|
|
1645
|
+
{ field: i, title: "值", dataType: "string" },
|
|
1646
|
+
{ field: t, title: "名称", dataType: "string" }
|
|
2575
1647
|
// { field: 'disabled', title: '禁用', dataType: 'boolean', editor: { type: 'switch' } },
|
|
2576
1648
|
],
|
|
2577
1649
|
type: "item-collection-editor",
|
|
2578
|
-
valueField:
|
|
2579
|
-
nameField:
|
|
2580
|
-
requiredFields: [
|
|
2581
|
-
uniqueFields: [
|
|
2582
|
-
readonly: this.checkEnumDataReadonly(
|
|
1650
|
+
valueField: i,
|
|
1651
|
+
nameField: t,
|
|
1652
|
+
requiredFields: [i, t],
|
|
1653
|
+
uniqueFields: [i, t],
|
|
1654
|
+
readonly: this.checkEnumDataReadonly(e)
|
|
2583
1655
|
}
|
|
2584
1656
|
};
|
|
2585
1657
|
}
|
|
@@ -2589,26 +1661,26 @@ class Hi extends gr {
|
|
|
2589
1661
|
* 2、绑定类型为字段,且字段为枚举字段,则不可新增、删除、修改枚举值。只能从be修改然后同步到表单上。
|
|
2590
1662
|
* @param propertyData 下拉框控件属性值
|
|
2591
1663
|
*/
|
|
2592
|
-
checkEnumDataReadonly(
|
|
2593
|
-
return !
|
|
1664
|
+
checkEnumDataReadonly(e) {
|
|
1665
|
+
return !e.binding || e.binding.type !== "Form" ? !1 : !!(this.designViewModelField && this.designViewModelField.type && this.designViewModelField.type.$type === je.EnumType);
|
|
2594
1666
|
}
|
|
2595
1667
|
/**
|
|
2596
1668
|
* 将字段值变化前事件、变化后事件追加到交互面板
|
|
2597
1669
|
* 注意:因为绑定字段值变化后事件与下拉框的值变化事件(valueChanged)重名,所以这里将事件label都重命名下
|
|
2598
1670
|
*/
|
|
2599
|
-
appendFieldValueChangeEvents(
|
|
2600
|
-
|
|
2601
|
-
}
|
|
2602
|
-
getControlMethodType(
|
|
2603
|
-
if (!
|
|
2604
|
-
return
|
|
2605
|
-
switch (
|
|
2606
|
-
case
|
|
2607
|
-
return
|
|
2608
|
-
case
|
|
2609
|
-
return
|
|
1671
|
+
appendFieldValueChangeEvents(e, i) {
|
|
1672
|
+
e.binding && e.binding.type === G.Form && e.binding.field ? (i.find((t) => t.label === "fieldValueChanging"), i.find((t) => t.label === "fieldValueChanged"), this.designViewModelField && (e.fieldValueChanging = this.designViewModelField.valueChanging, e.fieldValueChanged = this.designViewModelField.valueChanged)) : i = i.filter((t) => t.label !== "fieldValueChanging" && t.label !== "fieldValueChanged");
|
|
1673
|
+
}
|
|
1674
|
+
getControlMethodType(e) {
|
|
1675
|
+
if (!e.binding)
|
|
1676
|
+
return e.type;
|
|
1677
|
+
switch (e.binding.type) {
|
|
1678
|
+
case G.Form:
|
|
1679
|
+
return e.binding.path || e.type;
|
|
1680
|
+
case G.Variable:
|
|
1681
|
+
return e.binding.fullPath || e.type;
|
|
2610
1682
|
}
|
|
2611
|
-
return
|
|
1683
|
+
return e.type;
|
|
2612
1684
|
}
|
|
2613
1685
|
/**
|
|
2614
1686
|
* 组装输入类控件的交互面板:包含标签超链、绑定字段值变化前后事件等。
|
|
@@ -2617,10 +1689,10 @@ class Hi extends gr {
|
|
|
2617
1689
|
* @param showPosition 面板展示位置
|
|
2618
1690
|
* @param customEvent 输入控件特有的事件配置
|
|
2619
1691
|
*/
|
|
2620
|
-
getEventPropertyConfig(
|
|
2621
|
-
const
|
|
1692
|
+
getEventPropertyConfig(e, i = "card", t, s) {
|
|
1693
|
+
const r = this;
|
|
2622
1694
|
let g = [];
|
|
2623
|
-
if (
|
|
1695
|
+
if (t && (g = g.concat(t)), g.length === 0)
|
|
2624
1696
|
return {
|
|
2625
1697
|
title: "事件",
|
|
2626
1698
|
hideTitle: !0,
|
|
@@ -2629,28 +1701,28 @@ class Hi extends gr {
|
|
|
2629
1701
|
tabName: "交互",
|
|
2630
1702
|
hide: !0
|
|
2631
1703
|
};
|
|
2632
|
-
this.appendFieldValueChangeEvents(
|
|
2633
|
-
const
|
|
1704
|
+
this.appendFieldValueChangeEvents(e, g);
|
|
1705
|
+
const o = r.eventsEditorUtils.formProperties(e, r.viewModelId, g);
|
|
2634
1706
|
return {
|
|
2635
1707
|
title: "事件",
|
|
2636
1708
|
hideTitle: !0,
|
|
2637
|
-
properties:
|
|
1709
|
+
properties: r.createBaseEventProperty(o),
|
|
2638
1710
|
tabId: "commands",
|
|
2639
1711
|
tabName: "交互",
|
|
2640
|
-
setPropertyRelates(
|
|
2641
|
-
const
|
|
2642
|
-
delete
|
|
2643
|
-
const
|
|
2644
|
-
|
|
1712
|
+
setPropertyRelates(a, h) {
|
|
1713
|
+
const u = a.propertyValue;
|
|
1714
|
+
delete e[r.viewModelId], u && (u.setPropertyRelates = this.setPropertyRelates, u.controlInfo = { type: r.getControlMethodType(e), name: e.title }, r.eventsEditorUtils.saveRelatedParameters(e, r.viewModelId, u.events, u)), s && s(a, h, u);
|
|
1715
|
+
const c = r.designViewModelUtils.getDgViewModel(r.viewModelId);
|
|
1716
|
+
c && r.designViewModelField && c.changeField(r.designViewModelField.id, { valueChanging: e.fieldValueChanging, valueChanged: e.fieldValueChanged });
|
|
2645
1717
|
}
|
|
2646
1718
|
};
|
|
2647
1719
|
}
|
|
2648
|
-
getExpressionConfig(
|
|
2649
|
-
return new
|
|
2650
|
-
|
|
2651
|
-
r,
|
|
1720
|
+
getExpressionConfig(e, i, t = ["compute", "dependency", "validate"], s) {
|
|
1721
|
+
return new ae(this.formSchemaUtils).getExpressionConfig(
|
|
1722
|
+
e,
|
|
2652
1723
|
i,
|
|
2653
|
-
|
|
1724
|
+
t,
|
|
1725
|
+
s
|
|
2654
1726
|
);
|
|
2655
1727
|
}
|
|
2656
1728
|
getBindingDataType() {
|
|
@@ -2659,39 +1731,39 @@ class Hi extends gr {
|
|
|
2659
1731
|
getEditor() {
|
|
2660
1732
|
return this.getBindingDataType() === "number" ? this.numberEditorOptions : {};
|
|
2661
1733
|
}
|
|
2662
|
-
updatePropertyValue(
|
|
2663
|
-
var
|
|
2664
|
-
|
|
1734
|
+
updatePropertyValue(e, i, t) {
|
|
1735
|
+
var s;
|
|
1736
|
+
e.editor[i] !== t ? e.editor[i] = t : (s = this.getFormDesignerInstance()) == null || s.reloadPropertyPanel();
|
|
2665
1737
|
}
|
|
2666
|
-
setBooleanValue(
|
|
2667
|
-
let
|
|
2668
|
-
this.getBindingDataType() === "string" && (
|
|
2669
|
-
const g =
|
|
2670
|
-
|
|
1738
|
+
setBooleanValue(e, i, t) {
|
|
1739
|
+
let s = t;
|
|
1740
|
+
this.getBindingDataType() === "string" && (s = (s || "").trim() || (i === "trueValue" ? "true" : "false"));
|
|
1741
|
+
const g = i === "trueValue" ? "falseValue" : "trueValue";
|
|
1742
|
+
e.editor[g] === s && (s = s + 1), this.updatePropertyValue(e, i, s);
|
|
2671
1743
|
}
|
|
2672
1744
|
getBooleanValueConverter() {
|
|
2673
1745
|
return {
|
|
2674
|
-
convertFrom: (
|
|
2675
|
-
convertTo: (
|
|
2676
|
-
this.setBooleanValue(
|
|
1746
|
+
convertFrom: (e, i) => e.editor[i],
|
|
1747
|
+
convertTo: (e, i, t) => {
|
|
1748
|
+
this.setBooleanValue(e, i, t);
|
|
2677
1749
|
}
|
|
2678
1750
|
};
|
|
2679
1751
|
}
|
|
2680
1752
|
}
|
|
2681
|
-
const
|
|
2682
|
-
install(
|
|
2683
|
-
|
|
1753
|
+
const dt = {
|
|
1754
|
+
install(d) {
|
|
1755
|
+
d.component(ne.name, ne);
|
|
2684
1756
|
}
|
|
2685
1757
|
};
|
|
2686
1758
|
export {
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
1759
|
+
Qe as BaseControlProperty,
|
|
1760
|
+
ae as ExpressionProperty,
|
|
1761
|
+
ne as FPropertyPanel,
|
|
1762
|
+
G as FormBindingType,
|
|
1763
|
+
at as InputBaseProperty,
|
|
1764
|
+
Ye as PropertyType,
|
|
1765
|
+
j as SchemaDOMMapping,
|
|
1766
|
+
dt as default,
|
|
1767
|
+
_e as propertyPanelItemProps,
|
|
1768
|
+
Ke as propertyPanelProps
|
|
2697
1769
|
};
|