@farris/ui-vue 1.7.1 → 1.7.2-beta.1
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 +312 -61
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +1482 -56
- package/components/avatar/index.umd.cjs +1 -1
- package/components/binding-selector/index.esm.js +752 -8
- package/components/binding-selector/index.umd.cjs +1 -1
- package/components/button-group/index.esm.js +266 -110
- package/components/button-group/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +129 -128
- package/components/calendar/index.umd.cjs +2 -2
- package/components/code-editor/index.esm.js +237 -169
- package/components/code-editor/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +134 -133
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/color-picker/index.esm.js +812 -502
- package/components/color-picker/index.umd.cjs +1 -1
- package/components/combo-list/index.esm.js +323 -291
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +355 -174
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +134 -133
- package/components/comment/index.umd.cjs +2 -2
- package/components/common/index.esm.js +1 -1
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +3830 -2796
- package/components/component/index.umd.cjs +8 -1
- package/components/condition/index.esm.js +2482 -492
- package/components/condition/index.umd.cjs +8 -1
- package/components/data-grid/index.esm.js +431 -406
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3306 -3165
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +1 -1
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +3094 -2731
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +397 -387
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dropdown/index.esm.js +373 -124
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +592 -1894
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +250 -248
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/dynamic-view/index.esm.js +287 -284
- 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.esm.js +1890 -1473
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.css +1 -1
- package/components/expression-editor/index.esm.js +7371 -2
- package/components/expression-editor/index.umd.cjs +427 -1
- package/components/fieldset/index.esm.js +1 -1
- package/components/fieldset/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +4 -5
- 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 +9044 -425
- package/components/filter-condition-editor/index.umd.cjs +427 -1
- package/components/html-template/index.esm.js +33 -36
- package/components/html-template/index.umd.cjs +1 -1
- package/components/image/index.esm.js +2 -2
- package/components/image/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +615 -361
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/json-editor/index.esm.js +325 -247
- package/components/json-editor/index.umd.cjs +1 -1
- package/components/language-textbox/index.esm.js +269 -269
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/layout/index.esm.js +549 -163
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +837 -39
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +404 -622
- package/components/list-view/index.umd.cjs +6 -6
- package/components/lookup/index.esm.js +3624 -3625
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +1487 -1462
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/menu-lookup/index.esm.js +577 -536
- package/components/menu-lookup/index.umd.cjs +6 -6
- package/components/nav/index.esm.js +311 -31
- package/components/nav/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +1634 -189
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +82 -82
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1200 -859
- package/components/order/index.umd.cjs +6 -6
- package/components/page-footer/index.esm.js +331 -48
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +110 -116
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +509 -232
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +353 -148
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +157 -153
- package/components/property-editor/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +1825 -871
- package/components/property-panel/index.umd.cjs +12 -5
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +6075 -3862
- package/components/query-solution/index.umd.cjs +13 -6
- package/components/response-layout/index.esm.js +1 -1
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +2603 -2376
- package/components/schema-selector/index.umd.cjs +5 -5
- package/components/search-box/index.esm.js +244 -72
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +134 -133
- package/components/section/index.umd.cjs +2 -2
- package/components/smoke-detector/index.esm.js +179 -8
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/sort-condition-editor/index.css +1 -0
- package/components/sort-condition-editor/index.esm.js +9488 -4
- package/components/sort-condition-editor/index.umd.cjs +427 -1
- package/components/splitter/index.esm.js +1172 -142
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +47 -48
- package/components/step/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +490 -419
- package/components/tabs/index.umd.cjs +1 -1
- package/components/text/index.esm.js +217 -73
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +29 -27
- package/components/textarea/index.umd.cjs +2 -2
- package/components/transfer/index.esm.js +762 -544
- package/components/transfer/index.umd.cjs +5 -5
- package/components/tree-grid/index.esm.js +287 -283
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +326 -157
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +1125 -634
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +359 -106
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +222 -89
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +290 -199
- package/components/weather/index.umd.cjs +1 -1
- package/designer/data-grid/index.esm.js +5798 -4905
- package/designer/data-grid/index.umd.cjs +16 -9
- package/designer/drawer/index.esm.js +576 -567
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dynamic-form/index.esm.js +1418 -1154
- package/designer/dynamic-form/index.umd.cjs +8 -1
- package/designer/farris-designer.all.esm.js +11332 -10754
- package/designer/farris-designer.all.umd.cjs +17 -17
- package/designer/list-view/index.esm.js +647 -647
- package/designer/list-view/index.umd.cjs +6 -6
- package/designer/modal/index.esm.js +29 -137
- package/designer/modal/index.umd.cjs +1 -1
- package/designer/radio-group/index.esm.js +2 -3
- package/designer/radio-group/index.umd.cjs +1 -1
- package/designer/response-toolbar/index.esm.js +1 -1
- package/designer/response-toolbar/index.umd.cjs +1 -1
- package/designer/section/index.esm.js +1 -6
- package/designer/section/index.umd.cjs +1 -1
- package/designer/tabs/index.esm.js +2848 -2556
- package/designer/tabs/index.umd.cjs +2 -2
- package/designer/time-picker/index.esm.js +2 -2
- package/designer/time-picker/index.umd.cjs +1 -1
- package/designer/tree-grid/index.esm.js +826 -465
- package/designer/tree-grid/index.umd.cjs +1 -1
- package/farris.all.esm.js +75302 -73138
- package/farris.all.umd.cjs +94 -94
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/accordion/src/accordion.props.d.ts +1 -0
- package/types/accordion/src/components/accordion-item.props.d.ts +1 -0
- package/types/avatar/src/avatar.props.d.ts +1 -0
- package/types/binding-selector/index.d.ts +54 -0
- package/types/binding-selector/src/binding-selector.props.d.ts +1 -0
- package/types/button-group/index.d.ts +0 -15
- package/types/button-group/src/button-group.props.d.ts +1 -0
- package/types/code-editor/index.d.ts +1 -0
- package/types/code-editor/src/code-textbox.component.d.ts +6 -6
- package/types/code-editor/src/code-textbox.props.d.ts +2 -0
- package/types/color-picker/index.d.ts +15 -0
- package/types/color-picker/src/color-picker.props.d.ts +1 -0
- package/types/combo-list/src/composition/use-data-source.d.ts +2 -1
- package/types/combo-tree/src/combo-tree.props.d.ts +1 -0
- package/types/component/index.d.ts +2 -0
- package/types/component/src/component.props.d.ts +8 -0
- package/types/components.d.ts +7 -0
- package/types/condition/index.d.ts +55 -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-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/appearance/use-cell-position.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +5 -1
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +2 -2
- package/types/data-view/composition/visualization/use-visual-data-bound.d.ts +3 -2
- package/types/data-view/composition/visualization/use-visual-data-row.d.ts +2 -1
- package/types/designer-toolbox/index.d.ts +3 -0
- package/types/designer-toolbox/src/toolbox.component.d.ts +14 -0
- package/types/designer-toolbox/src/toolbox.props.d.ts +29 -0
- package/types/designer-toolbox/src/types.d.ts +21 -0
- package/types/designer.d.ts +13 -0
- package/types/dropdown/index.d.ts +6 -27
- package/types/dropdown/src/dropdown.item.component.d.ts +1 -1
- package/types/dropdown/src/dropdown.props.d.ts +1 -0
- package/types/dynamic-form/designer.d.ts +1 -3
- package/types/dynamic-form/index.d.ts +3 -9
- package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.component.d.ts +3 -3
- package/types/dynamic-resolver/index.d.ts +0 -3
- 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 +104 -92
- package/types/{binding-selector/designer.d.ts → expression-editor/index.d.ts} +6 -6
- package/types/filter-condition-editor/index.d.ts +9 -0
- 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 +1 -0
- package/types/flow-canvas/index.d.ts +3 -0
- package/types/flow-canvas/src/components/flow-node-item.component.d.ts +8 -0
- package/types/flow-canvas/src/components/flow-node-item.props.d.ts +3 -0
- package/types/flow-canvas/src/composition/types.d.ts +42 -0
- package/types/flow-canvas/src/composition/use-bezier-curve.d.ts +2 -0
- package/types/flow-canvas/src/composition/use-connections.d.ts +2 -0
- package/types/flow-canvas/src/composition/use-curve.d.ts +4 -0
- package/types/flow-canvas/src/composition/use-drawing-bezier.d.ts +2 -0
- package/types/flow-canvas/src/composition/use-drawing.d.ts +4 -0
- package/types/flow-canvas/src/flow-canvas.component.d.ts +8 -0
- package/types/flow-canvas/src/flow-canvas.props.d.ts +3 -0
- package/types/image-cropper/src/image-cropper.props.d.ts +1 -0
- package/types/index.d.ts +1 -0
- package/types/json-editor/src/json-editor.props.d.ts +1 -0
- package/types/layout/index.d.ts +0 -1
- package/types/layout/src/components/layout-pane.props.d.ts +1 -0
- package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +2 -0
- package/types/layout/src/designer/layout-pane.design.component.d.ts +8 -0
- package/types/layout/src/designer/layout-use-designer-rules.d.ts +2 -0
- package/types/layout/src/designer/layout.design.component.d.ts +8 -0
- package/types/layout/src/layout.props.d.ts +1 -0
- package/types/layout/src/schema/schema-mapper.d.ts +2 -0
- package/types/layout/src/schema/schema-resolver.d.ts +2 -0
- package/types/list-nav/index.d.ts +5 -24
- package/types/list-nav/src/designer/use-designer-rules.d.ts +2 -0
- package/types/list-nav/src/list-nav.props.d.ts +1 -0
- package/types/list-nav/src/property-config/list-nav.property-config.d.ts +8 -0
- package/types/list-nav/src/schema/schema-mapper.d.ts +2 -0
- package/types/list-nav/src/schema/schema-resolver.d.ts +2 -0
- package/types/list-view/index.d.ts +0 -1
- package/types/list-view/src/composition/use-draggable.d.ts +1 -1
- package/types/lookup/index.d.ts +1 -1
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +1 -1
- package/types/lookup/src/components/popup-container.component.d.ts +6 -6
- package/types/menu-lookup/src/menu-lookup.props.d.ts +1 -0
- package/types/modal/designer.d.ts +0 -2
- package/types/nav/index.d.ts +20 -24
- package/types/nav/src/nav.props.d.ts +1 -0
- package/types/number-range/src/number-range.props.d.ts +1 -0
- package/types/order/index.d.ts +5 -36
- package/types/order/src/designer/order.design.component.d.ts +1 -1
- package/types/order/src/order.props.d.ts +1 -0
- package/types/page-footer/index.d.ts +2 -0
- package/types/page-footer/src/page-footer.props.d.ts +1 -0
- package/types/pagination/index.d.ts +0 -15
- package/types/pagination/src/pagination.props.d.ts +1 -0
- package/types/progress/src/progress.props.d.ts +1 -0
- package/types/query-solution/index.d.ts +2 -1
- package/types/radio-group/designer.d.ts +1 -2
- package/types/search-box/index.d.ts +17 -1
- package/types/search-box/src/search-box.props.d.ts +1 -0
- package/types/section/designer.d.ts +0 -1
- package/types/smoke-detector/index.d.ts +2 -0
- package/types/smoke-detector/src/smoke-detector.props.d.ts +1 -0
- package/types/sort-condition-editor/index.d.ts +7 -2
- package/types/sort-condition-editor/src/sort-condition-editor.props.d.ts +1 -0
- package/types/splitter/index.d.ts +0 -1
- package/types/splitter/src/components/splitter-pane.props.d.ts +1 -0
- package/types/splitter/src/splitter.props.d.ts +1 -0
- package/types/tabs/designer.d.ts +0 -1
- package/types/tabs/index.d.ts +1 -0
- package/types/text/index.d.ts +20 -24
- package/types/text/src/text.props.d.ts +1 -0
- package/types/transfer/src/transfer.props.d.ts +1 -0
- package/types/tree-grid/src/components/data/data-area.component.d.ts +2 -2
- package/types/tree-grid/src/tree-grid.props.d.ts +1 -0
- package/types/tree-view/src/components/data/tree-area.component.d.ts +1 -1
- package/types/tree-view/src/tree-view.props.d.ts +2 -0
- package/types/uploader/src/uploader.props.d.ts +1 -0
- package/types/verify-detail/index.d.ts +5 -58
- package/types/verify-detail/src/designer/verify-detail.design.component.d.ts +8 -8
- package/types/verify-detail/src/verify-detail.props.d.ts +1 -0
- package/types/video/index.d.ts +20 -24
- package/types/video/src/video.props.d.ts +1 -0
- package/components/dynamic-form/index.css +0 -1
- package/designer/accordion/index.esm.js +0 -257
- package/designer/accordion/index.umd.cjs +0 -1
- package/designer/avatar/index.esm.js +0 -1460
- package/designer/avatar/index.umd.cjs +0 -1
- package/designer/binding-selector/index.esm.js +0 -792
- package/designer/binding-selector/index.umd.cjs +0 -1
- package/designer/button-group/index.esm.js +0 -282
- package/designer/button-group/index.umd.cjs +0 -1
- package/designer/code-editor/index.esm.js +0 -75
- package/designer/code-editor/index.umd.cjs +0 -1
- package/designer/color-picker/index.esm.js +0 -1096
- package/designer/color-picker/index.umd.cjs +0 -1
- package/designer/combo-list/index.esm.js +0 -1095
- package/designer/combo-list/index.umd.cjs +0 -1
- package/designer/combo-tree/index.esm.js +0 -186
- package/designer/combo-tree/index.umd.cjs +0 -1
- package/designer/component/index.css +0 -1
- package/designer/component/index.esm.js +0 -5002
- package/designer/component/index.umd.cjs +0 -1
- package/designer/condition/index.esm.js +0 -1899
- package/designer/condition/index.umd.cjs +0 -1
- package/designer/dropdown/index.esm.js +0 -261
- package/designer/dropdown/index.umd.cjs +0 -1
- package/designer/expression-editor/index.css +0 -1
- package/designer/expression-editor/index.esm.js +0 -7006
- package/designer/expression-editor/index.umd.cjs +0 -427
- package/designer/filter-condition-editor/index.css +0 -1
- package/designer/filter-condition-editor/index.esm.js +0 -4795
- package/designer/filter-condition-editor/index.umd.cjs +0 -1
- package/designer/html-template/index.esm.js +0 -718
- package/designer/html-template/index.umd.cjs +0 -1
- package/designer/image-cropper/index.esm.js +0 -765
- package/designer/image-cropper/index.umd.cjs +0 -1
- package/designer/json-editor/index.esm.js +0 -83
- package/designer/json-editor/index.umd.cjs +0 -1
- package/designer/language-textbox/index.esm.js +0 -783
- package/designer/language-textbox/index.umd.cjs +0 -8
- package/designer/layout/index.esm.js +0 -430
- package/designer/layout/index.umd.cjs +0 -1
- package/designer/list-nav/index.esm.js +0 -802
- package/designer/list-nav/index.umd.cjs +0 -1
- package/designer/lookup/index.esm.js +0 -2083
- package/designer/lookup/index.umd.cjs +0 -1
- package/designer/menu-lookup/index.esm.js +0 -46
- package/designer/menu-lookup/index.umd.cjs +0 -1
- package/designer/nav/index.esm.js +0 -284
- package/designer/nav/index.umd.cjs +0 -1
- package/designer/number-range/index.esm.js +0 -1616
- package/designer/number-range/index.umd.cjs +0 -1
- package/designer/order/index.css +0 -1
- package/designer/order/index.esm.js +0 -2196
- package/designer/order/index.umd.cjs +0 -18
- package/designer/page-footer/index.esm.js +0 -290
- package/designer/page-footer/index.umd.cjs +0 -1
- package/designer/page-header/index.esm.js +0 -1003
- package/designer/page-header/index.umd.cjs +0 -1
- package/designer/pagination/index.esm.js +0 -591
- package/designer/pagination/index.umd.cjs +0 -1
- package/designer/progress/index.esm.js +0 -213
- package/designer/progress/index.umd.cjs +0 -1
- package/designer/search-box/index.esm.js +0 -245
- package/designer/search-box/index.umd.cjs +0 -1
- package/designer/smoke-detector/index.css +0 -1
- package/designer/smoke-detector/index.esm.js +0 -178
- package/designer/smoke-detector/index.umd.cjs +0 -1
- package/designer/sort-condition-editor/index.esm.js +0 -138
- package/designer/sort-condition-editor/index.umd.cjs +0 -1
- package/designer/splitter/index.esm.js +0 -1120
- package/designer/splitter/index.umd.cjs +0 -1
- package/designer/step/index.esm.js +0 -226
- package/designer/step/index.umd.cjs +0 -1
- package/designer/text/index.esm.js +0 -147
- package/designer/text/index.umd.cjs +0 -1
- package/designer/transfer/index.esm.js +0 -254
- package/designer/transfer/index.umd.cjs +0 -1
- package/designer/tree-view/index.esm.js +0 -313
- package/designer/tree-view/index.umd.cjs +0 -1
- package/designer/uploader/index.esm.js +0 -1190
- package/designer/uploader/index.umd.cjs +0 -2
- package/designer/verify-detail/index.esm.js +0 -258
- package/designer/verify-detail/index.umd.cjs +0 -1
- package/designer/video/index.esm.js +0 -136
- package/designer/video/index.umd.cjs +0 -1
- package/designer/weather/index.css +0 -1
- package/designer/weather/index.esm.js +0 -6244
- package/designer/weather/index.umd.cjs +0 -14
- package/types/accordion/designer.d.ts +0 -44
- package/types/avatar/designer.d.ts +0 -29
- package/types/button-group/designer.d.ts +0 -29
- package/types/code-editor/designer.d.ts +0 -5
- package/types/color-picker/designer.d.ts +0 -29
- package/types/combo-list/designer.d.ts +0 -29
- package/types/combo-list/src/designer/combo-list.design.props.d.ts +0 -6
- package/types/combo-tree/designer.d.ts +0 -5
- package/types/component/designer.d.ts +0 -35
- package/types/condition/designer.d.ts +0 -56
- package/types/dropdown/designer.d.ts +0 -6
- package/types/dynamic-form/src/composition/use-input-type-resolver.d.ts +0 -11
- package/types/expression-editor/designer.d.ts +0 -9
- package/types/filter-condition-editor/designer.d.ts +0 -10
- package/types/html-template/designer.d.ts +0 -31
- package/types/html-template/src/designer/html-template.design.props.d.ts +0 -9
- package/types/image-cropper/designer.d.ts +0 -4
- package/types/json-editor/designer.d.ts +0 -5
- package/types/menu-lookup/designer.d.ts +0 -5
- package/types/nav/designer.d.ts +0 -6
- package/types/number-range/designer.d.ts +0 -29
- package/types/order/designer.d.ts +0 -6
- package/types/page-footer/designer.d.ts +0 -6
- package/types/page-header/src/designer/page-header.design.props.d.ts +0 -20
- package/types/pagination/designer.d.ts +0 -29
- package/types/progress/designer.d.ts +0 -29
- package/types/search-box/designer.d.ts +0 -52
- package/types/smoke-detector/designer.d.ts +0 -6
- package/types/sort-condition-editor/designer.d.ts +0 -9
- package/types/splitter/designer.d.ts +0 -32
- package/types/step/designer.d.ts +0 -6
- package/types/text/designer.d.ts +0 -6
- package/types/transfer/designer.d.ts +0 -35
- package/types/tree-view/designer.d.ts +0 -29
- package/types/uploader/designer.d.ts +0 -141
- package/types/verify-detail/designer.d.ts +0 -6
- package/types/video/designer.d.ts +0 -6
- /package/{designer → components}/condition/index.css +0 -0
- /package/{designer → components}/uploader/index.css +0 -0
- /package/types/{dynamic-form/src/component/form-control/form-control.component.d.ts → list-nav/src/designer/list-nav.design.component.d.ts} +0 -0
|
@@ -1,1616 +0,0 @@
|
|
|
1
|
-
var H = Object.defineProperty;
|
|
2
|
-
var D = (l, n, e) => n in l ? H(l, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[n] = e;
|
|
3
|
-
var y = (l, n, e) => D(l, typeof n != "symbol" ? n + "" : n, e);
|
|
4
|
-
import J, { numberRangeProps as K } from "../../components/number-range/index.esm.js";
|
|
5
|
-
import { FormSchemaEntityField$Type as $, FormSchemaEntityFieldType$Type as Q, withInstall as Y } from "../../components/common/index.esm.js";
|
|
6
|
-
import { resolveAppearance as ee, createPropsResolver as te } from "../../components/dynamic-resolver/index.esm.js";
|
|
7
|
-
import { computed as k, ref as N, createVNode as S, nextTick as ie, defineComponent as ne, inject as j, onMounted as re, createTextVNode as se } from "vue";
|
|
8
|
-
import F from "bignumber.js";
|
|
9
|
-
import { DgControl as u, canvasChanged as R, refreshCanvas as oe, useDesignerComponent as le } from "../../components/designer-canvas/index.esm.js";
|
|
10
|
-
import { cloneDeep as ae } from "lodash-es";
|
|
11
|
-
function de(l, n) {
|
|
12
|
-
const e = k(() => Number(l.precision) || 0);
|
|
13
|
-
function t(o) {
|
|
14
|
-
return o.toFixed(e.value);
|
|
15
|
-
}
|
|
16
|
-
function i(o) {
|
|
17
|
-
return isNaN(o) || o === null || o === void 0 || o === "";
|
|
18
|
-
}
|
|
19
|
-
function r(o) {
|
|
20
|
-
const d = i(l.max) ? null : new F(String(l.max), 10), c = i(l.min) ? null : new F(String(l.min), 10);
|
|
21
|
-
return d && o.gt(d) ? d : c && o.lt(c) ? c : o;
|
|
22
|
-
}
|
|
23
|
-
function s(o, d, c, a) {
|
|
24
|
-
const g = new F(o, 10), f = i(c && c.value) ? null : new F(String(c.value), 10), m = i(d && d.value) ? null : new F(String(d.value), 10);
|
|
25
|
-
let h;
|
|
26
|
-
return a ? h = f && g.gt(f) ? f : g : h = m && g.lt(m) ? m : g, h.toString();
|
|
27
|
-
}
|
|
28
|
-
function p(o, d = !0) {
|
|
29
|
-
if (l.parser)
|
|
30
|
-
return isNaN(Number(o)) ? l.parser(o) : o;
|
|
31
|
-
let c = new F(o, 10);
|
|
32
|
-
if (d && (c = r(c)), c.isNaN()) {
|
|
33
|
-
if (l.nullable)
|
|
34
|
-
return null;
|
|
35
|
-
const g = new F("" + l.min, 10), f = new F("" + l.max, 10);
|
|
36
|
-
if (!g.isNaN())
|
|
37
|
-
c = g;
|
|
38
|
-
else if (!f.isNaN())
|
|
39
|
-
c = f;
|
|
40
|
-
else
|
|
41
|
-
return 0;
|
|
42
|
-
}
|
|
43
|
-
return t(c);
|
|
44
|
-
}
|
|
45
|
-
return { getRealValue: p, isEmpty: i, precision: e, getValidNumberObject: r, getValidNumberInRange: s };
|
|
46
|
-
}
|
|
47
|
-
function ce(l, n, e) {
|
|
48
|
-
const t = k(() => ({
|
|
49
|
-
prefix: l.prefix,
|
|
50
|
-
suffix: l.suffix,
|
|
51
|
-
decimalSeparator: l.decimalSeparator,
|
|
52
|
-
groupSeparator: l.useThousands ? l.groupSeparator : "",
|
|
53
|
-
groupSize: l.groupSize
|
|
54
|
-
})), { getValidNumberObject: i, precision: r } = e;
|
|
55
|
-
function s(d) {
|
|
56
|
-
return d = d == null || d === "" ? "" : String(d), d = d.replace(new RegExp(l.prefix, "g"), "").replace(new RegExp(l.suffix, "g"), "").replace(/,/g, ""), l.groupSeparator && l.groupSeparator !== "," && (d = d.replace(new RegExp(`\\${l.groupSeparator}`, "g"), "")), l.decimalSeparator && l.decimalSeparator !== "." && (d = d.replace(new RegExp(`\\${l.decimalSeparator}`, "g"), ".")), d;
|
|
57
|
-
}
|
|
58
|
-
function p(d, c) {
|
|
59
|
-
return l.precision !== null && l.precision !== void 0 ? d.toFormat(r.value, c) : d.toFormat(c);
|
|
60
|
-
}
|
|
61
|
-
function o(d, c = !0) {
|
|
62
|
-
const a = s(d), g = new F(a, 10);
|
|
63
|
-
let f = g;
|
|
64
|
-
return c && (f = i(g)), f.valueOf() === "0" && !l.showZero || f.isNaN() ? "" : l.formatter ? l.formatter(f.toNumber()) : p(f, t.value);
|
|
65
|
-
}
|
|
66
|
-
return { cleanFormat: s, format: o };
|
|
67
|
-
}
|
|
68
|
-
function G(l, n, e, t, i, r, s, p, o, d) {
|
|
69
|
-
const { format: c } = i, { getRealValue: a, getValidNumberInRange: g } = r;
|
|
70
|
-
function f() {
|
|
71
|
-
const x = new F(t.value || 0);
|
|
72
|
-
return !((l.max || l.max === 0) && !new F(l.max).isNaN() && x.gte(new F(l.max)) && (t.value || t.value === 0));
|
|
73
|
-
}
|
|
74
|
-
function m() {
|
|
75
|
-
const x = new F(t.value || 0);
|
|
76
|
-
return !((l.min || l.min === 0) && !new F(l.min).isNaN() && x.lte(new F(l.min)) && (t.value || t.value === 0));
|
|
77
|
-
}
|
|
78
|
-
function h(x) {
|
|
79
|
-
if (l.readonly || l.disabled)
|
|
80
|
-
return;
|
|
81
|
-
const M = x === "up" ? f : m, P = x === "up" ? "plus" : "minus";
|
|
82
|
-
if (M()) {
|
|
83
|
-
let I = new F(t.value || 0)[P](Number(l.step)).toFixed();
|
|
84
|
-
I = g(I, p, o, d);
|
|
85
|
-
const V = a(I);
|
|
86
|
-
e.value = c(I), t.value !== V && (t.value = V, s(t.value));
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
function b() {
|
|
90
|
-
h("up");
|
|
91
|
-
}
|
|
92
|
-
function v() {
|
|
93
|
-
h("down");
|
|
94
|
-
}
|
|
95
|
-
function w(x) {
|
|
96
|
-
b(), x.stopPropagation();
|
|
97
|
-
}
|
|
98
|
-
function E(x) {
|
|
99
|
-
v(), x.stopPropagation();
|
|
100
|
-
}
|
|
101
|
-
return { canDownward: m, canUpward: f, downward: v, onClickDownButton: E, onClickUpButton: w, upward: b };
|
|
102
|
-
}
|
|
103
|
-
function W(l, n, e, t, i, r, s, p, o, d, c) {
|
|
104
|
-
const { cleanFormat: a, format: g } = i, { getRealValue: f, isEmpty: m, getValidNumberInRange: h } = r, { downward: b, upward: v } = s, w = k(() => e.value), E = N(!1);
|
|
105
|
-
function x(C) {
|
|
106
|
-
var q;
|
|
107
|
-
if (C.stopPropagation(), l.readonly || l.disabled)
|
|
108
|
-
return;
|
|
109
|
-
E.value = !1;
|
|
110
|
-
let I = (q = C.target) == null ? void 0 : q.value;
|
|
111
|
-
l.nullable || (I = I || 0);
|
|
112
|
-
let V = a(I);
|
|
113
|
-
V = h(V, o, d, c);
|
|
114
|
-
const U = f(V);
|
|
115
|
-
e.value = g(V), t.value !== U && (t.value = U, p(t.value)), n.emit("blur", { event: C, formatted: e.value, value: t.value });
|
|
116
|
-
}
|
|
117
|
-
function M(C) {
|
|
118
|
-
C.stopPropagation(), !(l.readonly || l.disabled) && (E.value = !0, e.value = m(t.value) || !l.showZero && t.value === "0" ? "" : String(t.value), n.emit("focus", { event: C, formatted: e.value, value: t.value }));
|
|
119
|
-
}
|
|
120
|
-
function P(C) {
|
|
121
|
-
var U;
|
|
122
|
-
C.stopPropagation();
|
|
123
|
-
let I = (U = C.target) == null ? void 0 : U.value;
|
|
124
|
-
l.nullable || (I = I || 0);
|
|
125
|
-
const V = a(I);
|
|
126
|
-
e.value = V, t.value = f(V), p(t.value);
|
|
127
|
-
}
|
|
128
|
-
function T(C) {
|
|
129
|
-
C.key === "ArrowDown" && (C.preventDefault(), b()), C.key === "ArrowUp" && (C.preventDefault(), v()), C.stopPropagation();
|
|
130
|
-
}
|
|
131
|
-
return { textBoxValue: w, onBlurTextBox: x, onFocusTextBox: M, onInput: P, onKeyDown: T, isTextBoxFocused: E };
|
|
132
|
-
}
|
|
133
|
-
function z(l, n, e, t) {
|
|
134
|
-
const {
|
|
135
|
-
onBlurTextBox: i,
|
|
136
|
-
onFocusTextBox: r,
|
|
137
|
-
onInput: s,
|
|
138
|
-
onKeyDown: p,
|
|
139
|
-
textBoxValue: o
|
|
140
|
-
} = e, d = k(() => t ? l.beginPlaceholder : l.endPlaceholder), c = k(() => ({
|
|
141
|
-
"form-control": !0,
|
|
142
|
-
"sub-input": !0
|
|
143
|
-
})), a = k(() => ({
|
|
144
|
-
"text-align": l.textAlign
|
|
145
|
-
}));
|
|
146
|
-
function g(f) {
|
|
147
|
-
f.stopPropagation();
|
|
148
|
-
}
|
|
149
|
-
return () => S("input", {
|
|
150
|
-
class: c.value,
|
|
151
|
-
style: a.value,
|
|
152
|
-
type: "text",
|
|
153
|
-
value: o.value,
|
|
154
|
-
disabled: l.disabled,
|
|
155
|
-
readonly: l.readonly || !l.editable,
|
|
156
|
-
placeholder: d.value,
|
|
157
|
-
onBlur: i,
|
|
158
|
-
onChange: g,
|
|
159
|
-
onFocus: r,
|
|
160
|
-
onInput: s,
|
|
161
|
-
onKeydown: p
|
|
162
|
-
}, null);
|
|
163
|
-
}
|
|
164
|
-
function X(l, n, e) {
|
|
165
|
-
const {
|
|
166
|
-
canDownward: t,
|
|
167
|
-
canUpward: i,
|
|
168
|
-
onClickDownButton: r,
|
|
169
|
-
onClickUpButton: s
|
|
170
|
-
} = e, p = k(() => ({
|
|
171
|
-
"input-group-append": !0,
|
|
172
|
-
"btn-group": !0,
|
|
173
|
-
"btn-group-number": !0,
|
|
174
|
-
"sub-btn-group": !0
|
|
175
|
-
})), o = k(() => ({
|
|
176
|
-
btn: !0,
|
|
177
|
-
"btn-secondary": !0,
|
|
178
|
-
"btn-number-flag": !0
|
|
179
|
-
})), d = k(() => ({
|
|
180
|
-
cursor: i() ? "pointer" : "not-allowed",
|
|
181
|
-
"margin-left": 0
|
|
182
|
-
})), c = k(() => ({
|
|
183
|
-
cursor: t() ? "pointer" : "not-allowed",
|
|
184
|
-
"margin-left": 0
|
|
185
|
-
}));
|
|
186
|
-
return () => S("div", {
|
|
187
|
-
class: p.value
|
|
188
|
-
}, [S("button", {
|
|
189
|
-
class: o.value,
|
|
190
|
-
style: d.value,
|
|
191
|
-
onClick: s,
|
|
192
|
-
disabled: !i()
|
|
193
|
-
}, [S("span", {
|
|
194
|
-
class: "f-icon f-icon-arrow-chevron-up number-arrow-chevron"
|
|
195
|
-
}, null)]), S("button", {
|
|
196
|
-
class: o.value,
|
|
197
|
-
style: c.value,
|
|
198
|
-
onClick: r,
|
|
199
|
-
disabled: !t()
|
|
200
|
-
}, [S("span", {
|
|
201
|
-
class: "f-icon f-icon-arrow-chevron-down number-arrow-chevron"
|
|
202
|
-
}, null)])]);
|
|
203
|
-
}
|
|
204
|
-
function ue(l) {
|
|
205
|
-
const { formSchemaUtils: n, formStateMachineUtils: e } = l;
|
|
206
|
-
function t(o, d = "") {
|
|
207
|
-
return {
|
|
208
|
-
path: d + o.code,
|
|
209
|
-
field: o.id,
|
|
210
|
-
fullPath: o.code
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
function i(o, d = "") {
|
|
214
|
-
const c = n.getViewModelById(o);
|
|
215
|
-
return c ? c.states.map((a) => t(a, d)) : [];
|
|
216
|
-
}
|
|
217
|
-
function r(o) {
|
|
218
|
-
const d = n.getRootViewModelId(), c = i(o);
|
|
219
|
-
if (o === d)
|
|
220
|
-
return c;
|
|
221
|
-
const a = i(d, "root-component.");
|
|
222
|
-
return [...c, ...a];
|
|
223
|
-
}
|
|
224
|
-
function s(o) {
|
|
225
|
-
return o.binding && o.binding.path || o.id || "";
|
|
226
|
-
}
|
|
227
|
-
function p() {
|
|
228
|
-
return e && e.getRenderStates() || [];
|
|
229
|
-
}
|
|
230
|
-
return { getVariables: r, getControlName: s, getStateMachines: p };
|
|
231
|
-
}
|
|
232
|
-
class Z {
|
|
233
|
-
constructor(n) {
|
|
234
|
-
y(this, "sessionVariables", [
|
|
235
|
-
{
|
|
236
|
-
key: "CurrentSysOrgName",
|
|
237
|
-
name: "当前组织Name",
|
|
238
|
-
description: "当前组织Name"
|
|
239
|
-
},
|
|
240
|
-
// {
|
|
241
|
-
// key: "CurrentSysOrgCode",
|
|
242
|
-
// name: "当前组织Code",
|
|
243
|
-
// description: "当前组织Code"
|
|
244
|
-
// },
|
|
245
|
-
{
|
|
246
|
-
key: "CurrentSysOrgId",
|
|
247
|
-
name: "当前组织Id",
|
|
248
|
-
description: "当前组织Id"
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
key: "CurrentUserName",
|
|
252
|
-
name: "当前用户Name",
|
|
253
|
-
description: "当前用户Name"
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
key: "CurrentUserCode",
|
|
257
|
-
name: "当前用户Code",
|
|
258
|
-
description: "当前用户Code"
|
|
259
|
-
},
|
|
260
|
-
{
|
|
261
|
-
key: "CurrentUserId",
|
|
262
|
-
name: "当前用户Id",
|
|
263
|
-
description: "当前用户Id"
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
key: "CurrentLanguage",
|
|
267
|
-
name: "当前语言编号",
|
|
268
|
-
description: "当前登录的语言编号,例如简体中文返回'zh-CHS',英文返回'en',繁体中文'zh-CHT'"
|
|
269
|
-
}
|
|
270
|
-
]);
|
|
271
|
-
y(this, "expressionNames", {
|
|
272
|
-
compute: "计算表达式",
|
|
273
|
-
dependency: "依赖表达式",
|
|
274
|
-
validate: "验证表达式",
|
|
275
|
-
dataPicking: "帮助前表达式",
|
|
276
|
-
visible: "可见表达式",
|
|
277
|
-
readonly: "只读表达式",
|
|
278
|
-
required: "必填表达式"
|
|
279
|
-
});
|
|
280
|
-
y(this, "getExpressionConverter", (n, e) => ({
|
|
281
|
-
convertFrom: (t, i, r, s) => {
|
|
282
|
-
const p = r.getExpressionRuleValue(n, e || i);
|
|
283
|
-
return p && p.value || "";
|
|
284
|
-
},
|
|
285
|
-
convertTo: (t, i, r, s, p) => {
|
|
286
|
-
var o;
|
|
287
|
-
if (i === "dataPicking" && (r != null && r.target)) {
|
|
288
|
-
const d = `${r.target}_dataPicking`;
|
|
289
|
-
((o = r.rules) == null ? void 0 : o.some(
|
|
290
|
-
(a) => a.id === d && a.value
|
|
291
|
-
)) ? t.dictPickingExpressionId = d : delete t.dictPickingExpressionId;
|
|
292
|
-
}
|
|
293
|
-
s.updateExpression(r);
|
|
294
|
-
}
|
|
295
|
-
}));
|
|
296
|
-
this.formSchemaService = n;
|
|
297
|
-
}
|
|
298
|
-
getExpressionRule(n, e) {
|
|
299
|
-
const t = this.formSchemaService.getExpressions();
|
|
300
|
-
if (!t)
|
|
301
|
-
return "";
|
|
302
|
-
const i = t.find((s) => s.target === n);
|
|
303
|
-
if (!i)
|
|
304
|
-
return "";
|
|
305
|
-
const r = i.rules.find((s) => s.type === e);
|
|
306
|
-
return r || "";
|
|
307
|
-
}
|
|
308
|
-
// 获取上下文表单变量
|
|
309
|
-
getContextFormVariables() {
|
|
310
|
-
const { module: n } = this.formSchemaService.getFormSchema();
|
|
311
|
-
if (!n.viewmodels || n.viewmodels.length === 0)
|
|
312
|
-
return [];
|
|
313
|
-
const e = this.formSchemaService.getRootViewModelId(), t = this.formSchemaService.getViewModelById(e);
|
|
314
|
-
if (!t || !t.states || t.states.length === 0)
|
|
315
|
-
return [];
|
|
316
|
-
const i = [];
|
|
317
|
-
return t.states.filter((r) => r.category === "remote").forEach((r) => {
|
|
318
|
-
i.push({
|
|
319
|
-
key: r.code,
|
|
320
|
-
name: r.name,
|
|
321
|
-
description: r.name,
|
|
322
|
-
category: r.category
|
|
323
|
-
});
|
|
324
|
-
}), i;
|
|
325
|
-
}
|
|
326
|
-
createTreeNode(n, e, t = "label") {
|
|
327
|
-
return {
|
|
328
|
-
id: n.id,
|
|
329
|
-
name: n.name,
|
|
330
|
-
bindingPath: n[t],
|
|
331
|
-
parents: e,
|
|
332
|
-
type: "field"
|
|
333
|
-
};
|
|
334
|
-
}
|
|
335
|
-
buildEntityFieldsTreeData(n = null, e) {
|
|
336
|
-
const t = [];
|
|
337
|
-
return n == null || n.forEach((i) => {
|
|
338
|
-
var p;
|
|
339
|
-
const r = this.createTreeNode(i, e);
|
|
340
|
-
let s = [];
|
|
341
|
-
(p = i.type) != null && p.fields && (s = this.buildEntityFieldsTreeData(i.type.fields, [...e, i.label])), t.push({
|
|
342
|
-
data: r,
|
|
343
|
-
children: s,
|
|
344
|
-
expanded: !0
|
|
345
|
-
});
|
|
346
|
-
}), t;
|
|
347
|
-
}
|
|
348
|
-
buildChildEntityTreeData(n = null, e) {
|
|
349
|
-
const t = [];
|
|
350
|
-
return n == null || n.forEach((i) => {
|
|
351
|
-
var o, d;
|
|
352
|
-
const r = this.createTreeNode(i, e);
|
|
353
|
-
r.type = "entity";
|
|
354
|
-
const s = this.buildEntityFieldsTreeData((o = i.type) == null ? void 0 : o.fields, [...e, i.label]), p = this.buildChildEntityTreeData((d = i.type) == null ? void 0 : d.entities, [...e, i.label]);
|
|
355
|
-
p != null && p.length && (s == null || s.push(...p)), t.push({
|
|
356
|
-
data: r,
|
|
357
|
-
children: s || [],
|
|
358
|
-
// 空值回退
|
|
359
|
-
expanded: !0
|
|
360
|
-
});
|
|
361
|
-
}), t;
|
|
362
|
-
}
|
|
363
|
-
getEntitiesTreeData() {
|
|
364
|
-
const n = this.formSchemaService.getSchemaEntities();
|
|
365
|
-
if (!(n != null && n.length))
|
|
366
|
-
return [];
|
|
367
|
-
const e = n[0];
|
|
368
|
-
if (!(e != null && e.type))
|
|
369
|
-
return [];
|
|
370
|
-
const t = this.buildEntityFieldsTreeData(e.type.fields, [e.code]), i = this.buildChildEntityTreeData(e.type.entities, [e.code]);
|
|
371
|
-
return i != null && i.length && (t == null || t.push(...i)), {
|
|
372
|
-
entityCode: e.code,
|
|
373
|
-
fields: [{
|
|
374
|
-
data: this.createTreeNode(e, [], "code"),
|
|
375
|
-
children: t || []
|
|
376
|
-
}]
|
|
377
|
-
};
|
|
378
|
-
}
|
|
379
|
-
getEntitiesAndVariables() {
|
|
380
|
-
return {
|
|
381
|
-
entities: this.getEntitiesTreeData(),
|
|
382
|
-
variables: {
|
|
383
|
-
session: {
|
|
384
|
-
name: "系统变量",
|
|
385
|
-
items: this.sessionVariables,
|
|
386
|
-
visible: !1
|
|
387
|
-
},
|
|
388
|
-
forms: {
|
|
389
|
-
name: "表单变量",
|
|
390
|
-
items: this.getContextFormVariables(),
|
|
391
|
-
visible: !0
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
};
|
|
395
|
-
}
|
|
396
|
-
onBeforeOpenExpression(n, e, t) {
|
|
397
|
-
const i = t === "Field" ? n.binding.field : n.id, r = this.getExpressionRule(i, e), s = this.getEntitiesAndVariables(), p = {
|
|
398
|
-
message: ["validate", "required", "dataPicking"].includes(e) && r ? r.message : "",
|
|
399
|
-
...s
|
|
400
|
-
};
|
|
401
|
-
return r.messageType != null && (p.messageType = r.messageType), p;
|
|
402
|
-
}
|
|
403
|
-
buildRule(n, e, t, i) {
|
|
404
|
-
const { expression: r, message: s, messageType: p } = e, o = {
|
|
405
|
-
id: `${n}_${t}`,
|
|
406
|
-
type: t,
|
|
407
|
-
value: r
|
|
408
|
-
};
|
|
409
|
-
return (t === "validate" || t === "dataPicking" || t === "required") && (o.message = s), t === "dataPicking" && (o.messageType = p), t === "validate" && i && (o.elementId = i), o;
|
|
410
|
-
}
|
|
411
|
-
getExpressionData() {
|
|
412
|
-
const { expressions: n } = this.formSchemaService.getFormSchema().module;
|
|
413
|
-
return n || [];
|
|
414
|
-
}
|
|
415
|
-
updateExpression(n, e, t, i) {
|
|
416
|
-
const r = e === "Field" ? n.binding.field : n.id, s = this.buildRule(r, t, i, n.type === "form-group" ? n.id : "");
|
|
417
|
-
let o = this.getExpressionData().find((c) => c.targetType === e && c.target === r);
|
|
418
|
-
const d = (c) => c.value.trim() === "";
|
|
419
|
-
if (o) {
|
|
420
|
-
const c = o.rules.find((a) => a.id === s.id);
|
|
421
|
-
if (c)
|
|
422
|
-
d(s) ? o.rules = o.rules.filter((a) => a.id !== s.id) : (Object.assign(c, s), i === "validate" && n.type === "form-group" && (c.elementId = n.id));
|
|
423
|
-
else {
|
|
424
|
-
if (d(s))
|
|
425
|
-
return null;
|
|
426
|
-
o.rules = o.rules || [], o.rules.push(s);
|
|
427
|
-
}
|
|
428
|
-
} else {
|
|
429
|
-
if (d(s))
|
|
430
|
-
return null;
|
|
431
|
-
o = {
|
|
432
|
-
target: `${r}`,
|
|
433
|
-
rules: [s],
|
|
434
|
-
targetType: e
|
|
435
|
-
};
|
|
436
|
-
}
|
|
437
|
-
return o;
|
|
438
|
-
}
|
|
439
|
-
getExpressionEditorOptions(n, e, t, i) {
|
|
440
|
-
return t.reduce((r, s) => {
|
|
441
|
-
var o, d;
|
|
442
|
-
const p = e === "Field" ? (o = n == null ? void 0 : n.binding) == null ? void 0 : o.field : n.id;
|
|
443
|
-
return r[s] = {
|
|
444
|
-
hide: e === "Field" ? !!((d = n == null ? void 0 : n.binding) != null && d.field) : !1,
|
|
445
|
-
description: "",
|
|
446
|
-
title: this.expressionNames[s],
|
|
447
|
-
type: "string",
|
|
448
|
-
$converter: this.getExpressionConverter(p),
|
|
449
|
-
refreshPanelAfterChanged: !0,
|
|
450
|
-
editor: {
|
|
451
|
-
type: "expression-editor",
|
|
452
|
-
singleExpand: !1,
|
|
453
|
-
dialogTitle: `${this.expressionNames[s]}编辑器`,
|
|
454
|
-
showMessage: s === "validate" || s === "dataPicking" || s === "required",
|
|
455
|
-
showMessageType: s === "dataPicking",
|
|
456
|
-
beforeOpen: () => this.onBeforeOpenExpression(n, s, e),
|
|
457
|
-
onSubmitModal: (c) => {
|
|
458
|
-
const a = this.updateExpression(n, e, c, s);
|
|
459
|
-
if (i) {
|
|
460
|
-
const g = this.buildRule(p, c, s);
|
|
461
|
-
i(g);
|
|
462
|
-
}
|
|
463
|
-
return a;
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
}, r;
|
|
467
|
-
}, {});
|
|
468
|
-
}
|
|
469
|
-
getExpressionInfo(n, e, t) {
|
|
470
|
-
const i = e === "Field" ? n.binding.field : n.id, r = this.getExpressionRule(i, t), s = {
|
|
471
|
-
value: r && r.value,
|
|
472
|
-
targetId: i,
|
|
473
|
-
targetType: e,
|
|
474
|
-
expressionType: t
|
|
475
|
-
};
|
|
476
|
-
return r && r.message && (s.message = r.message), s;
|
|
477
|
-
}
|
|
478
|
-
getExpressionConfig(n, e, t = ["compute", "dependency", "validate"], i) {
|
|
479
|
-
return {
|
|
480
|
-
description: "表达式",
|
|
481
|
-
title: "表达式",
|
|
482
|
-
hide: !n.binding,
|
|
483
|
-
properties: {
|
|
484
|
-
...this.getExpressionEditorOptions(n, e, t, i)
|
|
485
|
-
}
|
|
486
|
-
};
|
|
487
|
-
}
|
|
488
|
-
getExpressionOptions(n, e, t) {
|
|
489
|
-
const i = this.getExpressionInfo(n, e, t);
|
|
490
|
-
return {
|
|
491
|
-
dialogTitle: `${this.expressionNames[t]}编辑器`,
|
|
492
|
-
singleExpand: !1,
|
|
493
|
-
showMessage: t === "required",
|
|
494
|
-
beforeOpen: () => this.onBeforeOpenExpression(n, t, e),
|
|
495
|
-
expressionInfo: i
|
|
496
|
-
};
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
class pe {
|
|
500
|
-
constructor(n, e) {
|
|
501
|
-
y(this, "componentId");
|
|
502
|
-
y(this, "viewModelId");
|
|
503
|
-
y(this, "eventsEditorUtils");
|
|
504
|
-
y(this, "formSchemaUtils");
|
|
505
|
-
y(this, "formMetadataConverter");
|
|
506
|
-
y(this, "designViewModelUtils");
|
|
507
|
-
y(this, "designViewModelField");
|
|
508
|
-
y(this, "controlCreatorUtils");
|
|
509
|
-
y(this, "designerHostService");
|
|
510
|
-
y(this, "designerContext");
|
|
511
|
-
y(this, "schemaService", null);
|
|
512
|
-
y(this, "metadataService", null);
|
|
513
|
-
y(this, "propertyConfig", {
|
|
514
|
-
type: "object",
|
|
515
|
-
categories: {}
|
|
516
|
-
});
|
|
517
|
-
var t;
|
|
518
|
-
this.componentId = n, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((t = this.formSchemaUtils) == null ? void 0 : t.getViewModelIdByComponentId(n)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService, this.designerContext = e.designerContext;
|
|
519
|
-
}
|
|
520
|
-
getFormDesignerInstance() {
|
|
521
|
-
var n, e;
|
|
522
|
-
return (e = (n = this.designerContext) == null ? void 0 : n.instances) == null ? void 0 : e.formDesigner.value;
|
|
523
|
-
}
|
|
524
|
-
getTableInfo() {
|
|
525
|
-
var n;
|
|
526
|
-
return (n = this.schemaService) == null ? void 0 : n.getTableInfoByViewModelId(this.viewModelId);
|
|
527
|
-
}
|
|
528
|
-
setDesignViewModelField(n) {
|
|
529
|
-
var t;
|
|
530
|
-
const e = n.binding && n.binding.type === "Form" && n.binding.field;
|
|
531
|
-
if (e) {
|
|
532
|
-
if (!this.designViewModelField) {
|
|
533
|
-
const i = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
534
|
-
this.designViewModelField = i.fields.find((r) => r.id === e);
|
|
535
|
-
}
|
|
536
|
-
n.updateOn = (t = this.designViewModelField) == null ? void 0 : t.updateOn;
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
getBasicPropConfig(n) {
|
|
540
|
-
return {
|
|
541
|
-
description: "Basic Information",
|
|
542
|
-
title: "基本信息",
|
|
543
|
-
properties: {
|
|
544
|
-
id: {
|
|
545
|
-
description: "组件标识",
|
|
546
|
-
title: "标识",
|
|
547
|
-
type: "string",
|
|
548
|
-
readonly: !0
|
|
549
|
-
},
|
|
550
|
-
type: {
|
|
551
|
-
description: "组件类型",
|
|
552
|
-
title: "控件类型",
|
|
553
|
-
type: "select",
|
|
554
|
-
editor: {
|
|
555
|
-
type: "combo-list",
|
|
556
|
-
textField: "name",
|
|
557
|
-
valueField: "value",
|
|
558
|
-
idField: "value",
|
|
559
|
-
editable: !1,
|
|
560
|
-
data: [{ value: n.type, name: u[n.type] && u[n.type].name }]
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
};
|
|
565
|
-
}
|
|
566
|
-
getAppearanceConfig(n = null, e = {}, t) {
|
|
567
|
-
const i = {
|
|
568
|
-
title: "外观",
|
|
569
|
-
description: "Appearance"
|
|
570
|
-
}, r = {
|
|
571
|
-
class: {
|
|
572
|
-
title: "class样式",
|
|
573
|
-
type: "string",
|
|
574
|
-
description: "组件的CSS样式",
|
|
575
|
-
$converter: "/converter/appearance.converter",
|
|
576
|
-
parentPropertyID: "appearance"
|
|
577
|
-
},
|
|
578
|
-
style: {
|
|
579
|
-
title: "style样式",
|
|
580
|
-
type: "string",
|
|
581
|
-
description: "组件的样式",
|
|
582
|
-
$converter: "/converter/appearance.converter",
|
|
583
|
-
parentPropertyID: "appearance"
|
|
584
|
-
}
|
|
585
|
-
};
|
|
586
|
-
for (const s in e)
|
|
587
|
-
r[s] = Object.assign(r[s] || {}, e[s]);
|
|
588
|
-
return {
|
|
589
|
-
...i,
|
|
590
|
-
properties: { ...r },
|
|
591
|
-
setPropertyRelates(s, p) {
|
|
592
|
-
if (s) {
|
|
593
|
-
switch (s && s.propertyID) {
|
|
594
|
-
case "class":
|
|
595
|
-
case "style": {
|
|
596
|
-
R.value++;
|
|
597
|
-
break;
|
|
598
|
-
}
|
|
599
|
-
}
|
|
600
|
-
t && t(s, n, p);
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
};
|
|
604
|
-
}
|
|
605
|
-
/**
|
|
606
|
-
*
|
|
607
|
-
* @param propertyData
|
|
608
|
-
* @param propertyTypes
|
|
609
|
-
* @param propertyName
|
|
610
|
-
* @param constInfos
|
|
611
|
-
* @param variableInfos
|
|
612
|
-
* @param expressionType 指定表达式类型,存在属性和表达式类型不一致的情况
|
|
613
|
-
* @returns
|
|
614
|
-
*/
|
|
615
|
-
getPropertyEditorParams(n, e = [], t = "visible", i = {}, r = {}, s = "") {
|
|
616
|
-
const { getVariables: p, getControlName: o, getStateMachines: d } = ue(this.designerHostService), c = this.getRealTargetType(n), a = e && e.length > 0 ? e : ["Const", "Variable", "StateMachine", "Expression"], g = {
|
|
617
|
-
type: "property-editor",
|
|
618
|
-
propertyTypes: a
|
|
619
|
-
};
|
|
620
|
-
return a.map((f) => {
|
|
621
|
-
switch (f) {
|
|
622
|
-
case "Const":
|
|
623
|
-
Object.assign(g, {
|
|
624
|
-
constType: "enum",
|
|
625
|
-
constEnums: [{ id: !0, name: "是" }, { id: !1, name: "否" }]
|
|
626
|
-
}, i);
|
|
627
|
-
break;
|
|
628
|
-
case "Expression":
|
|
629
|
-
g.expressionConfig = this.getExpressionOptions(n, c, s || t);
|
|
630
|
-
break;
|
|
631
|
-
case "StateMachine":
|
|
632
|
-
g.stateMachines = d();
|
|
633
|
-
break;
|
|
634
|
-
case "Variable":
|
|
635
|
-
Object.assign(g, {
|
|
636
|
-
controlName: o(n),
|
|
637
|
-
newVariablePrefix: "is",
|
|
638
|
-
newVariableType: "Boolean",
|
|
639
|
-
variables: p(this.viewModelId),
|
|
640
|
-
parentComponentId: this.componentId === "root-component" ? "" : "root-component",
|
|
641
|
-
onBeforeOpenVariables: (m) => {
|
|
642
|
-
m.value = p(this.viewModelId);
|
|
643
|
-
}
|
|
644
|
-
}, r), this.designerContext.designerMode === "PC_RTC" && (g.newVariablePrefix = "ext_" + g.newVariablePrefix);
|
|
645
|
-
break;
|
|
646
|
-
}
|
|
647
|
-
}), g;
|
|
648
|
-
}
|
|
649
|
-
getVisibleProperty(n, e = "") {
|
|
650
|
-
var r;
|
|
651
|
-
let t = ["Const", "Variable", "StateMachine", "Expression"];
|
|
652
|
-
return e === "gridFieldEditor" ? t = ["Const", "Expression"] : e === "form-group" && !((r = n.binding) != null && r.field) && (t = ["Const", "Variable", "StateMachine"]), {
|
|
653
|
-
visible: {
|
|
654
|
-
title: "是否可见",
|
|
655
|
-
type: "boolean",
|
|
656
|
-
description: "运行时组件是否可见",
|
|
657
|
-
editor: this.getPropertyEditorParams(n, t, "visible")
|
|
658
|
-
}
|
|
659
|
-
};
|
|
660
|
-
}
|
|
661
|
-
/**
|
|
662
|
-
* 获取行为
|
|
663
|
-
* @param propertyData
|
|
664
|
-
* @param viewModelId
|
|
665
|
-
* @returns
|
|
666
|
-
*/
|
|
667
|
-
getBehaviorConfig(n, e = "", t = {}, i) {
|
|
668
|
-
const r = {
|
|
669
|
-
title: "行为",
|
|
670
|
-
description: ""
|
|
671
|
-
}, s = this.getVisibleProperty(n, e);
|
|
672
|
-
for (const o in t)
|
|
673
|
-
s[o] = Object.assign(s[o] || {}, t[o]);
|
|
674
|
-
const p = this;
|
|
675
|
-
return {
|
|
676
|
-
...r,
|
|
677
|
-
properties: { ...s },
|
|
678
|
-
setPropertyRelates(o, d) {
|
|
679
|
-
if (o) {
|
|
680
|
-
switch (o.propertyID) {
|
|
681
|
-
case "disabled":
|
|
682
|
-
case "readonly":
|
|
683
|
-
case "visible":
|
|
684
|
-
p.afterMutilEditorChanged(n, o);
|
|
685
|
-
break;
|
|
686
|
-
}
|
|
687
|
-
i && i(o, d);
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
};
|
|
691
|
-
}
|
|
692
|
-
/**
|
|
693
|
-
* 当多值编辑器变更时
|
|
694
|
-
* @param propertyData
|
|
695
|
-
* @param changeObject
|
|
696
|
-
*/
|
|
697
|
-
afterMutilEditorChanged(n, e) {
|
|
698
|
-
this.addNewVariableToViewModel(e, this.viewModelId), this.updateExpressionValue(e), this.clearExpression(e, n);
|
|
699
|
-
}
|
|
700
|
-
/**
|
|
701
|
-
*
|
|
702
|
-
* @param propertyId
|
|
703
|
-
* @param componentInstance
|
|
704
|
-
* @returns
|
|
705
|
-
*/
|
|
706
|
-
updateElementByParentContainer(n, e) {
|
|
707
|
-
const t = e && e.parent && e.parent.schema;
|
|
708
|
-
if (!t)
|
|
709
|
-
return;
|
|
710
|
-
const i = t.contents.findIndex((s) => s.id === n), r = ae(t.contents[i]);
|
|
711
|
-
t.contents.splice(i, 1), t.contents.splice(i, 0, r), oe();
|
|
712
|
-
}
|
|
713
|
-
/**
|
|
714
|
-
* 属性编辑器,在编辑过程中会新增变量,此处需要将新增的变量追加到ViewModel中
|
|
715
|
-
* @param changeObject
|
|
716
|
-
* @param viewModelId
|
|
717
|
-
* @returns
|
|
718
|
-
*/
|
|
719
|
-
addNewVariableToViewModel(n, e) {
|
|
720
|
-
const t = n.propertyValue;
|
|
721
|
-
if (!(t && typeof t == "object") || !(t.type === "Variable" && t.isNewVariable))
|
|
722
|
-
return;
|
|
723
|
-
const s = {
|
|
724
|
-
id: t.field,
|
|
725
|
-
category: "locale",
|
|
726
|
-
code: t.fullPath,
|
|
727
|
-
name: t.fullPath,
|
|
728
|
-
type: t.newVariableType || "String",
|
|
729
|
-
isRtcVariable: this.designerContext.designerMode === "PC_RTC" ? !0 : void 0
|
|
730
|
-
};
|
|
731
|
-
delete t.newVariableType, delete t.isNewVariable, this.formSchemaUtils.getVariableByCode(s.code) || this.formSchemaUtils.getViewModelById("root-viewmodel").states.push(s);
|
|
732
|
-
}
|
|
733
|
-
/**
|
|
734
|
-
* 更新表达式到expressions节点
|
|
735
|
-
* @param changeObject
|
|
736
|
-
*/
|
|
737
|
-
updateExpressionValue(n) {
|
|
738
|
-
const e = n.propertyValue;
|
|
739
|
-
if (!((e && e.type) === "Expression" && e.expressionInfo))
|
|
740
|
-
return;
|
|
741
|
-
const { expressionId: r, expressionInfo: s } = e, { targetId: p, targetType: o, expressionType: d, value: c, message: a } = s, g = this.formSchemaUtils.getModule();
|
|
742
|
-
g.expressions = g.expressions || [];
|
|
743
|
-
const { expressions: f } = g;
|
|
744
|
-
let m = f.find((b) => b.target === p);
|
|
745
|
-
m || (m = { target: p, rules: [], targetType: o }, f.push(m));
|
|
746
|
-
const h = m.rules.find((b) => b.type === d);
|
|
747
|
-
if (h)
|
|
748
|
-
h.value = c, h.message = a;
|
|
749
|
-
else {
|
|
750
|
-
const b = { id: r, type: d, value: c, message: a };
|
|
751
|
-
m.rules.push(b);
|
|
752
|
-
}
|
|
753
|
-
delete e.expressionInfo;
|
|
754
|
-
}
|
|
755
|
-
/**
|
|
756
|
-
* 属性类型切换为非表达式后,清除原表达式
|
|
757
|
-
* @param changeObject
|
|
758
|
-
* @param propertyData
|
|
759
|
-
* @returns
|
|
760
|
-
*/
|
|
761
|
-
clearExpression(n, e) {
|
|
762
|
-
const t = n.propertyValue;
|
|
763
|
-
if (t && t.type === "Expression")
|
|
764
|
-
return;
|
|
765
|
-
const r = n.propertyID, s = this.formSchemaUtils.getExpressions(), p = e.binding ? e.binding.field : e.id, o = s.find((d) => d.target === p);
|
|
766
|
-
!o || !o.rules || (o.rules = o.rules.filter((d) => d.type !== r));
|
|
767
|
-
}
|
|
768
|
-
getExpressionOptions(n, e, t) {
|
|
769
|
-
return new Z(this.formSchemaUtils).getExpressionOptions(n, e, t);
|
|
770
|
-
}
|
|
771
|
-
getRealTargetType(n) {
|
|
772
|
-
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";
|
|
773
|
-
}
|
|
774
|
-
createBaseEventProperty(n) {
|
|
775
|
-
const e = {};
|
|
776
|
-
return e[this.viewModelId] = {
|
|
777
|
-
type: "events-editor",
|
|
778
|
-
editor: {
|
|
779
|
-
initialData: n,
|
|
780
|
-
viewSourceHandle: (t) => {
|
|
781
|
-
var i;
|
|
782
|
-
((i = t.controller) == null ? void 0 : i.label.indexOf(this.formSchemaUtils.getModule().code)) > -1 && this.eventsEditorUtils.jumpToMethod(t);
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
|
-
}, e;
|
|
786
|
-
}
|
|
787
|
-
}
|
|
788
|
-
const B = class B {
|
|
789
|
-
/**
|
|
790
|
-
* 根据绑定字段类型获取可用的输入类控件
|
|
791
|
-
*/
|
|
792
|
-
static getEditorTypesByMDataType(n, e = !1, t = "") {
|
|
793
|
-
if (e)
|
|
794
|
-
return [{ key: u["language-textbox"].type, value: u["language-textbox"].name }];
|
|
795
|
-
let i = B.fieldControlTypeMapping[n];
|
|
796
|
-
if (t === "data-grid-column" && (i != null && i.length)) {
|
|
797
|
-
const r = [u["check-group"].type, u["radio-group"].type, u.image.type, u["rich-text-editor"].type];
|
|
798
|
-
i = i.filter((s) => !r.includes(s.key));
|
|
799
|
-
}
|
|
800
|
-
return i;
|
|
801
|
-
}
|
|
802
|
-
/**
|
|
803
|
-
* 获取所有输入类控件
|
|
804
|
-
*/
|
|
805
|
-
static getAllInputTypes() {
|
|
806
|
-
const n = [];
|
|
807
|
-
for (const e in B.fieldControlTypeMapping)
|
|
808
|
-
B.fieldControlTypeMapping[e].forEach((t) => {
|
|
809
|
-
n.find((i) => i.key === t.key && i.value === t.value) || n.push({ key: t.key, value: t.value });
|
|
810
|
-
});
|
|
811
|
-
return n;
|
|
812
|
-
}
|
|
813
|
-
/**
|
|
814
|
-
* 提供schema字段基础属性和DOM控件属性的映射
|
|
815
|
-
* @param control 控件元数据
|
|
816
|
-
*/
|
|
817
|
-
static mappingDomPropAndSchemaProp(n, e) {
|
|
818
|
-
var r;
|
|
819
|
-
const t = (r = n.editor) == null ? void 0 : r.type, i = [];
|
|
820
|
-
return (n.type === u["data-grid-column"].type || n.type === u["tree-grid-column"].type) && e && e.categoryId && e.categoryId.indexOf("gridFieldEditor") < 0 && i.push({ domField: "title", schemaField: "name" }), i.push({ domField: "label", schemaField: "name" }), i.push({ domField: "editor.required", schemaField: "require" }), i.push({ domField: "editor.readonly", schemaField: "readonly" }), (t === u["input-group"].type || t === u.textarea.type || t === u["number-spinner"].type) && i.push({ domField: "editor.maxLength", schemaField: "type.length" }), t === u["number-spinner"].type && i.push({ domField: "editor.precision", schemaField: "type.precision" }), (n.type === u["data-grid-column"].type || n.type === u["tree-grid-column"].type) && i.push({ domField: "formatter.precision", schemaField: "type.precision" }), (t === u["combo-list"].type || t === u["radio-group"].type) && i.push({ domField: "editor.data", schemaField: "type.enumValues" }), (n.type === u["data-grid-column"].type || n.type === u["tree-grid-column"].type) && i.push({ domField: "formatter.data", schemaField: "type.enumValues" }), t === u["date-picker"].type && (i.push({ domField: "editor.displayFormat", schemaField: "editor.format" }), i.push({ domField: "editor.fieldType", schemaField: "type.name" })), t === u["number-spinner"].type && (i.push({ domField: "editor.max", schemaField: "editor.maxValue" }), i.push({ domField: "editor.min", schemaField: "editor.minValue" })), t === u.lookup.type && (i.push({ domField: "editor.dataSource", schemaField: "editor.dataSource" }), i.push({ domField: "editor.valueField", schemaField: "editor.valueField" }), i.push({ domField: "editor.textField", schemaField: "editor.textField" }), i.push({ domField: "editor.displayType", schemaField: "editor.displayType" }), i.push({ domField: "editor.mapFields", schemaField: "editor.mapFields" }), i.push({ domField: "editor.helpId", schemaField: "editor.helpId" })), i.push({ domField: "path", schemaField: "bindingPath" }), i.push({ domField: "binding.path", schemaField: "bindingField" }), i.push({ domField: "binding.fullPath", schemaField: "path" }), (n.type === u["data-grid-column"].type || n.type === u["tree-grid-column"].type) && i.push({ domField: "field", schemaField: "bindingPath" }), i;
|
|
821
|
-
}
|
|
822
|
-
};
|
|
823
|
-
/**
|
|
824
|
-
* <字段类型,可配置的控件类型列表>的映射
|
|
825
|
-
*/
|
|
826
|
-
y(B, "fieldControlTypeMapping", {
|
|
827
|
-
String: [
|
|
828
|
-
{ key: u["input-group"].type, value: u["input-group"].name },
|
|
829
|
-
{ key: u.lookup.type, value: u.lookup.name },
|
|
830
|
-
{ key: u.image.type, value: u.image.name },
|
|
831
|
-
{ key: u["date-picker"].type, value: u["date-picker"].name },
|
|
832
|
-
{ key: u.switch.type, value: u.switch.name },
|
|
833
|
-
{ key: u["check-box"].type, value: u["check-box"].name },
|
|
834
|
-
{ key: u["check-group"].type, value: u["check-group"].name },
|
|
835
|
-
{ key: u["radio-group"].type, value: u["radio-group"].name },
|
|
836
|
-
{ key: u["combo-list"].type, value: u["combo-list"].name },
|
|
837
|
-
{ key: u.textarea.type, value: u.textarea.name },
|
|
838
|
-
{ key: u["time-picker"].type, value: u["time-picker"].name }
|
|
839
|
-
],
|
|
840
|
-
Text: [
|
|
841
|
-
{ key: u.textarea.type, value: u.textarea.name },
|
|
842
|
-
{ key: u.lookup.type, value: u.lookup.name },
|
|
843
|
-
{ key: u.image.type, value: u.image.name },
|
|
844
|
-
{ key: u["rich-text-editor"].type, value: u["rich-text-editor"].name }
|
|
845
|
-
],
|
|
846
|
-
Decimal: [
|
|
847
|
-
{ key: u["number-spinner"].type, value: u["number-spinner"].name }
|
|
848
|
-
],
|
|
849
|
-
Integer: [
|
|
850
|
-
{ key: u["number-spinner"].type, value: u["number-spinner"].name }
|
|
851
|
-
],
|
|
852
|
-
Number: [
|
|
853
|
-
{ key: u["number-spinner"].type, value: u["number-spinner"].name },
|
|
854
|
-
{ key: u.switch.type, value: u.switch.name },
|
|
855
|
-
{ key: u["check-box"].type, value: u["check-box"].name }
|
|
856
|
-
],
|
|
857
|
-
BigNumber: [
|
|
858
|
-
{ key: u["number-spinner"].type, value: u["number-spinner"].name }
|
|
859
|
-
],
|
|
860
|
-
Date: [
|
|
861
|
-
{ key: u["date-picker"].type, value: u["date-picker"].name }
|
|
862
|
-
],
|
|
863
|
-
DateTime: [
|
|
864
|
-
{ key: u["date-picker"].type, value: u["date-picker"].name }
|
|
865
|
-
],
|
|
866
|
-
Boolean: [
|
|
867
|
-
{ key: u.switch.type, value: u.switch.name },
|
|
868
|
-
{ key: u["check-box"].type, value: u["check-box"].name }
|
|
869
|
-
],
|
|
870
|
-
Enum: [
|
|
871
|
-
{ key: u["combo-list"].type, value: u["combo-list"].name },
|
|
872
|
-
{ key: u["radio-group"].type, value: u["radio-group"].name }
|
|
873
|
-
],
|
|
874
|
-
Object: [
|
|
875
|
-
{ key: u.lookup.type, value: u.lookup.name },
|
|
876
|
-
{ key: u["combo-list"].type, value: u["combo-list"].name },
|
|
877
|
-
{ key: u["radio-group"].type, value: u["radio-group"].name }
|
|
878
|
-
]
|
|
879
|
-
});
|
|
880
|
-
let A = B;
|
|
881
|
-
var L = /* @__PURE__ */ ((l) => (l.Form = "Form", l.Variable = "Variable", l))(L || {});
|
|
882
|
-
class ge {
|
|
883
|
-
constructor() {
|
|
884
|
-
/** 控件标题 */
|
|
885
|
-
y(this, "label", "");
|
|
886
|
-
/** 控件id */
|
|
887
|
-
y(this, "id", "");
|
|
888
|
-
/** 每个控件占用的栅格数 */
|
|
889
|
-
y(this, "columnInSM", 12);
|
|
890
|
-
y(this, "columnInMD", 6);
|
|
891
|
-
y(this, "columnInLG", 3);
|
|
892
|
-
y(this, "columnInEL", 2);
|
|
893
|
-
/** 每个控件占用的列数 */
|
|
894
|
-
y(this, "displayWidthInSM", 1);
|
|
895
|
-
y(this, "displayWidthInMD", 1);
|
|
896
|
-
y(this, "displayWidthInLG", 1);
|
|
897
|
-
y(this, "displayWidthInEL", 1);
|
|
898
|
-
/** 编辑器内部默认显示的屏幕大小-----可以去掉 */
|
|
899
|
-
y(this, "displayColumnCountAtBreakPoint", "md");
|
|
900
|
-
/** 控件所在行,传0即可-----编辑器内部使用 */
|
|
901
|
-
y(this, "tagRow", 0);
|
|
902
|
-
/** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
|
|
903
|
-
y(this, "showTopBorder", 0);
|
|
904
|
-
/** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
|
|
905
|
-
y(this, "group", 1);
|
|
906
|
-
/** 控件是否符合标准的class配置(设计器用的) */
|
|
907
|
-
y(this, "isSupportedClass", !0);
|
|
908
|
-
/** 控件所在分组id(设计器用的) */
|
|
909
|
-
y(this, "fieldSetId", "");
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
function me(l) {
|
|
913
|
-
let n, e;
|
|
914
|
-
const t = /* @__PURE__ */ new Map();
|
|
915
|
-
let i = [];
|
|
916
|
-
function r(c, a) {
|
|
917
|
-
const f = c.split(" ").filter((w) => w.startsWith("col-"));
|
|
918
|
-
if (f.length === 0) {
|
|
919
|
-
a.isSupportedClass = !1;
|
|
920
|
-
return;
|
|
921
|
-
}
|
|
922
|
-
let m = f.find((w) => /^col-([1-9]|10|11|12)$/.test(w)), h = f.find((w) => /^col-md-([1-9]|10|11|12)$/.test(w)), b = f.find((w) => /^col-xl-([1-9]|10|11|12)$/.test(w)), v = f.find((w) => /^col-el-([1-9]|10|11|12)$/.test(w));
|
|
923
|
-
m = m || "col-12", a.columnInSM = parseInt(m.replace("col-", ""), 10), a.displayWidthInSM = a.columnInSM / 12, a.displayWidthInSM !== 1 && (a.isSupportedClass = !1), h = h || "col-md-" + a.columnInSM, a.columnInMD = parseInt(h.replace("col-md-", ""), 10), a.displayWidthInMD = a.columnInMD / 6, [1, 2].includes(a.displayWidthInMD) || (a.isSupportedClass = !1), b = b || "col-xl-" + a.columnInMD, a.columnInLG = parseInt(b.replace("col-xl-", ""), 10), a.displayWidthInLG = a.columnInLG / 3, [1, 2, 3, 4].includes(a.displayWidthInLG) || (a.isSupportedClass = !1), v = v || "col-el-" + a.columnInLG, a.columnInEL = parseInt(v.replace("col-el-", ""), 10), a.displayWidthInEL = a.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(a.displayWidthInEL) || (a.isSupportedClass = !1);
|
|
924
|
-
}
|
|
925
|
-
function s(c, a, g, f = !1) {
|
|
926
|
-
let m = !1;
|
|
927
|
-
c.contents.forEach((h) => {
|
|
928
|
-
if (h.type === "fieldset") {
|
|
929
|
-
g += 1, s(h, a, g, !0), m = !0;
|
|
930
|
-
return;
|
|
931
|
-
}
|
|
932
|
-
m && (g += 1, m = !1);
|
|
933
|
-
const b = h.appearance && h.appearance.class, v = new ge();
|
|
934
|
-
b ? r(b, v) : v.isSupportedClass = !1, v.label = h.label || h.id, v.id = h.id, v.group = g, f && (v.fieldSetId = c.id), e === h.id && (n = g), t.set(h.id, h), a.push(v);
|
|
935
|
-
});
|
|
936
|
-
}
|
|
937
|
-
function p(c) {
|
|
938
|
-
const a = l.getComponentById(c);
|
|
939
|
-
if (!a || !a.componentType || !a.componentType.startsWith("form"))
|
|
940
|
-
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
941
|
-
const g = l.selectNode(a, (f) => f.type === u["response-form"].type);
|
|
942
|
-
return !g || !g.contents || g.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: g };
|
|
943
|
-
}
|
|
944
|
-
function o(c, a) {
|
|
945
|
-
a = a || c.id;
|
|
946
|
-
const { result: g, message: f, formNode: m } = p(a);
|
|
947
|
-
if (!g)
|
|
948
|
-
return { result: g, message: f };
|
|
949
|
-
e = c.id, i = [], t.clear();
|
|
950
|
-
const h = m.contents[0].type === u.fieldset.type ? 0 : 1;
|
|
951
|
-
s(m, i, h);
|
|
952
|
-
const b = i.find((w) => !w.isSupportedClass);
|
|
953
|
-
return {
|
|
954
|
-
defaultState: {
|
|
955
|
-
defaultGroupNumber: n || 1,
|
|
956
|
-
model: b ? "customize" : "standard"
|
|
957
|
-
},
|
|
958
|
-
importData: i
|
|
959
|
-
};
|
|
960
|
-
}
|
|
961
|
-
function d(c, a) {
|
|
962
|
-
a = a;
|
|
963
|
-
const { result: g, formNode: f } = p(a);
|
|
964
|
-
if (!g)
|
|
965
|
-
return "";
|
|
966
|
-
const m = [];
|
|
967
|
-
return c.forEach((h) => {
|
|
968
|
-
var w;
|
|
969
|
-
const b = t.get(h.id), v = b.appearance && b.appearance.class;
|
|
970
|
-
if (v) {
|
|
971
|
-
const x = v.split(" ").filter((V) => !V.startsWith("col-")), M = "col-" + h.columnInSM, P = "col-md-" + h.columnInMD, T = "col-xl-" + h.columnInLG, C = "col-el-" + h.columnInEL, I = [M, P, T, C].concat(x);
|
|
972
|
-
b.appearance.class = I.join(" ");
|
|
973
|
-
}
|
|
974
|
-
if (h.fieldSetId) {
|
|
975
|
-
const E = f.contents.find((M) => M.id === h.fieldSetId), x = m.find((M) => M.id === h.fieldSetId);
|
|
976
|
-
x ? (w = x.contents) == null || w.push(b) : (m.push(E), E.contents = [b]);
|
|
977
|
-
} else
|
|
978
|
-
m.push(b);
|
|
979
|
-
}), f.contents = m, f.id;
|
|
980
|
-
}
|
|
981
|
-
return {
|
|
982
|
-
checkCanFindFormNode: p,
|
|
983
|
-
checkCanOpenLayoutEditor: o,
|
|
984
|
-
changeFormControlsByResponseLayoutConfig: d,
|
|
985
|
-
getResonseFormLayoutConfig: s
|
|
986
|
-
};
|
|
987
|
-
}
|
|
988
|
-
class fe extends pe {
|
|
989
|
-
constructor(e, t) {
|
|
990
|
-
super(e, t);
|
|
991
|
-
y(this, "responseLayoutEditorFunction");
|
|
992
|
-
/** 控件绑定的变量 */
|
|
993
|
-
y(this, "bindingVarible");
|
|
994
|
-
y(this, "numberEditorOptions", {
|
|
995
|
-
type: "number-spinner",
|
|
996
|
-
useThousands: !1,
|
|
997
|
-
keyboard: !1,
|
|
998
|
-
showButton: !1
|
|
999
|
-
});
|
|
1000
|
-
this.responseLayoutEditorFunction = me(this.formSchemaUtils);
|
|
1001
|
-
}
|
|
1002
|
-
getCommonPropertyConfig(e, t, i = "Card") {
|
|
1003
|
-
this.propertyConfig.categories.basic = this.getBasicProperties(e, t, i), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, t), this.propertyConfig.categories.behavior = this.getBehaviorConfig(e, "form-group");
|
|
1004
|
-
}
|
|
1005
|
-
getPropertyConfig(e, t) {
|
|
1006
|
-
return this.getCommonPropertyConfig(e, t, "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;
|
|
1007
|
-
}
|
|
1008
|
-
getGridFieldEdtiorPropConfig(e, t) {
|
|
1009
|
-
return this.propertyConfig.categories = {}, this.getCommonPropertyConfig(e, t, "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;
|
|
1010
|
-
}
|
|
1011
|
-
getBasicProperties(e, t, i = "Card") {
|
|
1012
|
-
var d;
|
|
1013
|
-
const r = this;
|
|
1014
|
-
this.setDesignViewModelField(e);
|
|
1015
|
-
const { canChangeControlType: s, editorTypeList: p } = this.getAvailableEditorType(e), o = {
|
|
1016
|
-
description: "Basic Information",
|
|
1017
|
-
title: "基本信息",
|
|
1018
|
-
properties: {
|
|
1019
|
-
id: {
|
|
1020
|
-
description: "组件标识",
|
|
1021
|
-
title: "标识",
|
|
1022
|
-
type: "string",
|
|
1023
|
-
readonly: !0
|
|
1024
|
-
},
|
|
1025
|
-
type: {
|
|
1026
|
-
description: "编辑器类型",
|
|
1027
|
-
title: "编辑器类型",
|
|
1028
|
-
type: "string",
|
|
1029
|
-
$converter: "/converter/change-editor.converter",
|
|
1030
|
-
parentPropertyID: "editor",
|
|
1031
|
-
editor: {
|
|
1032
|
-
type: "combo-list",
|
|
1033
|
-
textField: "value",
|
|
1034
|
-
valueField: "key",
|
|
1035
|
-
idField: "key",
|
|
1036
|
-
editable: !1,
|
|
1037
|
-
data: p,
|
|
1038
|
-
readonly: !s
|
|
1039
|
-
}
|
|
1040
|
-
},
|
|
1041
|
-
label: {
|
|
1042
|
-
title: "标签",
|
|
1043
|
-
type: "string",
|
|
1044
|
-
$converter: "/converter/form-group-label.converter"
|
|
1045
|
-
},
|
|
1046
|
-
showLabelType: {
|
|
1047
|
-
description: "标签显示方式:1、显示:显示标签 2、占位:保留标签空间,但不显示文本 3、不显示:不显示标签",
|
|
1048
|
-
title: "标签显示",
|
|
1049
|
-
type: "enum",
|
|
1050
|
-
editor: {
|
|
1051
|
-
data: [{ id: "visible", name: "显示" }, { id: "reserve-space", name: "占位" }, { id: "none", name: "不显示" }]
|
|
1052
|
-
},
|
|
1053
|
-
defaultValue: ((d = e.editor) == null ? void 0 : d.type) === "image" ? "none" : "visible"
|
|
1054
|
-
},
|
|
1055
|
-
binding: {
|
|
1056
|
-
description: "绑定的表单字段",
|
|
1057
|
-
title: "绑定",
|
|
1058
|
-
editor: {
|
|
1059
|
-
type: "binding-selector",
|
|
1060
|
-
bindingType: { enable: !1 },
|
|
1061
|
-
editorParams: {
|
|
1062
|
-
componentSchema: e,
|
|
1063
|
-
needSyncToViewModel: !0,
|
|
1064
|
-
viewModelId: this.viewModelId,
|
|
1065
|
-
designerHostService: this.designerHostService,
|
|
1066
|
-
disableOccupiedFields: !0
|
|
1067
|
-
},
|
|
1068
|
-
textField: "bindingField"
|
|
1069
|
-
},
|
|
1070
|
-
refreshPanelAfterChanged: !0,
|
|
1071
|
-
readonly: this.formSchemaUtils.designerMode === "PC_RTC" && !e.isRtcControl
|
|
1072
|
-
}
|
|
1073
|
-
},
|
|
1074
|
-
setPropertyRelates(c, a, g) {
|
|
1075
|
-
if (c)
|
|
1076
|
-
switch (c && c.propertyID) {
|
|
1077
|
-
case "type": {
|
|
1078
|
-
r.changeControlType(e, c, t);
|
|
1079
|
-
break;
|
|
1080
|
-
}
|
|
1081
|
-
case "label": {
|
|
1082
|
-
c.needRefreshControlTree = !0;
|
|
1083
|
-
break;
|
|
1084
|
-
}
|
|
1085
|
-
case "binding": {
|
|
1086
|
-
r.changeBindingField(e, c, g);
|
|
1087
|
-
break;
|
|
1088
|
-
}
|
|
1089
|
-
}
|
|
1090
|
-
}
|
|
1091
|
-
};
|
|
1092
|
-
return i.toLocaleLowerCase() !== "card" && delete o.properties.showLabelType, o;
|
|
1093
|
-
}
|
|
1094
|
-
/**
|
|
1095
|
-
* 校验控件是否支持切换类型
|
|
1096
|
-
* @param control 控件
|
|
1097
|
-
*/
|
|
1098
|
-
checkCanChangeControlType(e, t) {
|
|
1099
|
-
if (!e.binding)
|
|
1100
|
-
return !1;
|
|
1101
|
-
if (e.binding.type === "Variable") {
|
|
1102
|
-
if (this.bindingVarible = this.formSchemaUtils.getVariableById(e.binding.field), !this.bindingVarible)
|
|
1103
|
-
return !1;
|
|
1104
|
-
} else if (!this.designViewModelField || this.designViewModelField.$type !== $.SimpleField)
|
|
1105
|
-
return !1;
|
|
1106
|
-
return !0;
|
|
1107
|
-
}
|
|
1108
|
-
/**
|
|
1109
|
-
* 获取可选的编辑器类型
|
|
1110
|
-
*/
|
|
1111
|
-
getAvailableEditorType(e) {
|
|
1112
|
-
var r;
|
|
1113
|
-
const t = this.checkCanChangeControlType(e, this.viewModelId);
|
|
1114
|
-
if (!t)
|
|
1115
|
-
return {
|
|
1116
|
-
canChangeControlType: !1,
|
|
1117
|
-
editorTypeList: [{
|
|
1118
|
-
key: e.editor.type,
|
|
1119
|
-
value: ((r = u[e.editor.type]) == null ? void 0 : r.name) || e.editor.type
|
|
1120
|
-
}]
|
|
1121
|
-
};
|
|
1122
|
-
let i = [];
|
|
1123
|
-
return this.designViewModelField && this.designViewModelField.$type === $.SimpleField ? i = A.getEditorTypesByMDataType(this.designViewModelField.type.name, this.designViewModelField.multiLanguage) : this.bindingVarible && (i = A.getEditorTypesByMDataType(this.bindingVarible.type, this.designViewModelField.multiLanguage)), { canChangeControlType: t, editorTypeList: i };
|
|
1124
|
-
}
|
|
1125
|
-
changeBindingField(e, t, i) {
|
|
1126
|
-
t.needRefreshEntityTree = !0;
|
|
1127
|
-
}
|
|
1128
|
-
getAppearanceProperties(e, t) {
|
|
1129
|
-
const i = this;
|
|
1130
|
-
return {
|
|
1131
|
-
title: "外观",
|
|
1132
|
-
description: "Appearance",
|
|
1133
|
-
properties: {
|
|
1134
|
-
class: {
|
|
1135
|
-
title: "class样式",
|
|
1136
|
-
type: "string",
|
|
1137
|
-
description: "组件的CSS样式",
|
|
1138
|
-
$converter: "/converter/appearance.converter",
|
|
1139
|
-
parentPropertyID: "appearance"
|
|
1140
|
-
},
|
|
1141
|
-
style: {
|
|
1142
|
-
title: "style样式",
|
|
1143
|
-
type: "string",
|
|
1144
|
-
description: "组件的内联样式",
|
|
1145
|
-
$converter: "/converter/appearance.converter",
|
|
1146
|
-
parentPropertyID: "appearance"
|
|
1147
|
-
},
|
|
1148
|
-
fill: {
|
|
1149
|
-
title: "填充宽度",
|
|
1150
|
-
description: "启用后,控件占满父容器宽度",
|
|
1151
|
-
type: "boolean",
|
|
1152
|
-
parentPropertyID: "appearance"
|
|
1153
|
-
},
|
|
1154
|
-
responseLayout: {
|
|
1155
|
-
description: "响应式列宽",
|
|
1156
|
-
title: "响应式列宽",
|
|
1157
|
-
type: "boolean",
|
|
1158
|
-
visible: !0,
|
|
1159
|
-
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
1160
|
-
refreshPanelAfterChanged: !0,
|
|
1161
|
-
editor: {
|
|
1162
|
-
type: "response-layout-editor-setting",
|
|
1163
|
-
beforeOpen: () => i.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, i.componentId)
|
|
1164
|
-
}
|
|
1165
|
-
}
|
|
1166
|
-
},
|
|
1167
|
-
setPropertyRelates(r, s) {
|
|
1168
|
-
if (r)
|
|
1169
|
-
switch (r && r.propertyID) {
|
|
1170
|
-
case "responseLayout":
|
|
1171
|
-
i.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(r.propertyValue, i.componentId || e.id), i.updateUnifiedLayoutAfterResponseLayoutChanged(i.componentId), i.updateElementByParentContainer(e.id, t), delete e.responseLayout;
|
|
1172
|
-
break;
|
|
1173
|
-
case "class":
|
|
1174
|
-
i.updateUnifiedLayoutAfterControlChanged(r.propertyValue, e.id, this.componentId), R.value++;
|
|
1175
|
-
break;
|
|
1176
|
-
case "style": {
|
|
1177
|
-
R.value++;
|
|
1178
|
-
break;
|
|
1179
|
-
}
|
|
1180
|
-
}
|
|
1181
|
-
}
|
|
1182
|
-
};
|
|
1183
|
-
}
|
|
1184
|
-
getEditorProperties(e) {
|
|
1185
|
-
return this.getComponentConfig(e);
|
|
1186
|
-
}
|
|
1187
|
-
/**
|
|
1188
|
-
* 卡片控件:切换控件类型后事件
|
|
1189
|
-
* @param propertyData 控件DOM属性
|
|
1190
|
-
* @param newControlType 新控件类型
|
|
1191
|
-
*/
|
|
1192
|
-
changeControlType(e, t, i) {
|
|
1193
|
-
const r = t.propertyValue, s = i && i.parent && i.parent.schema;
|
|
1194
|
-
if (!s)
|
|
1195
|
-
return;
|
|
1196
|
-
const p = s.contents.findIndex((c) => c.id === e.id);
|
|
1197
|
-
if (p === -1)
|
|
1198
|
-
return;
|
|
1199
|
-
const o = s.contents[p];
|
|
1200
|
-
let d;
|
|
1201
|
-
if (this.designViewModelField) {
|
|
1202
|
-
const g = this.formSchemaUtils.getViewModelById(this.viewModelId).fields.find((m) => m.id === this.designViewModelField.id).fieldSchema || {};
|
|
1203
|
-
g.editor || (g.editor = {}), g.editor.$type = r, this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, g, !1), d = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, r);
|
|
1204
|
-
}
|
|
1205
|
-
d || (d = this.controlCreatorUtils.createFormGroupWithoutField(r)), Object.assign(d, {
|
|
1206
|
-
id: o.id,
|
|
1207
|
-
appearance: o.appearance,
|
|
1208
|
-
size: o.size,
|
|
1209
|
-
label: o.label,
|
|
1210
|
-
binding: o.binding
|
|
1211
|
-
}), Object.prototype.hasOwnProperty.call(o, "visible") && Object.assign(d, { visible: o.visible }), o.editor && ["readonly", "required", "placeholder"].map((c) => {
|
|
1212
|
-
Object.prototype.hasOwnProperty.call(o.editor, c) && (d.editor[c] = o.editor[c]);
|
|
1213
|
-
}), i != null && i.updateContextSchema ? i.updateContextSchema(d) : (i.schema = Object.assign(o, d), Object.assign(e, d)), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
1214
|
-
(c) => c.classList.remove("dgComponentSelected")
|
|
1215
|
-
), Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(
|
|
1216
|
-
(c) => c.classList.remove("dgComponentFocused")
|
|
1217
|
-
), R.value++, ie(() => {
|
|
1218
|
-
this.getFormDesignerInstance().reloadPropertyPanel();
|
|
1219
|
-
});
|
|
1220
|
-
}
|
|
1221
|
-
getComponentConfig(e, t = {}, i = {}, r) {
|
|
1222
|
-
var g, f;
|
|
1223
|
-
const s = Object.assign({
|
|
1224
|
-
description: "编辑器",
|
|
1225
|
-
title: "编辑器",
|
|
1226
|
-
type: "input-group",
|
|
1227
|
-
$converter: "/converter/property-editor.converter",
|
|
1228
|
-
parentPropertyID: "editor"
|
|
1229
|
-
}, t), p = (g = e.binding) != null && g.field ? [] : ["Const", "Variable", "StateMachine"], o = this.getPropertyEditorParams(e, p, "readonly"), d = this.getPropertyEditorParams(e, p, "required"), c = {
|
|
1230
|
-
readonly: {
|
|
1231
|
-
description: "",
|
|
1232
|
-
title: "只读",
|
|
1233
|
-
editor: o
|
|
1234
|
-
},
|
|
1235
|
-
required: {
|
|
1236
|
-
description: "",
|
|
1237
|
-
title: "必填",
|
|
1238
|
-
type: "boolean",
|
|
1239
|
-
editor: d,
|
|
1240
|
-
visible: !!((f = e.binding) != null && f.field)
|
|
1241
|
-
},
|
|
1242
|
-
placeholder: {
|
|
1243
|
-
description: "当控件没有值时在输入框中显示的文本",
|
|
1244
|
-
title: "提示文本",
|
|
1245
|
-
type: "string"
|
|
1246
|
-
}
|
|
1247
|
-
};
|
|
1248
|
-
for (const m in i)
|
|
1249
|
-
c[m] = Object.assign(c[m] || {}, i[m]);
|
|
1250
|
-
const a = this;
|
|
1251
|
-
return {
|
|
1252
|
-
...s,
|
|
1253
|
-
properties: { ...c },
|
|
1254
|
-
setPropertyRelates(m, h) {
|
|
1255
|
-
if (m) {
|
|
1256
|
-
switch (m.propertyID) {
|
|
1257
|
-
case "readonly":
|
|
1258
|
-
case "required":
|
|
1259
|
-
a.afterMutilEditorChanged(e, m);
|
|
1260
|
-
break;
|
|
1261
|
-
}
|
|
1262
|
-
r && r.bind(a)(m, e, h);
|
|
1263
|
-
}
|
|
1264
|
-
}
|
|
1265
|
-
};
|
|
1266
|
-
}
|
|
1267
|
-
/**
|
|
1268
|
-
* 修改某一输入控件的样式后更新Form的统一布局配置
|
|
1269
|
-
* @param controlClass 控件样式
|
|
1270
|
-
* @param controlId 控件Id
|
|
1271
|
-
* @param componentId 控件所在组件id
|
|
1272
|
-
*/
|
|
1273
|
-
updateUnifiedLayoutAfterControlChanged(e, t, i) {
|
|
1274
|
-
const r = e.split(" ");
|
|
1275
|
-
let s = r.find((a) => /^col-([1-9]|10|11|12)$/.test(a)), p = r.find((a) => /^col-md-([1-9]|10|11|12)$/.test(a)), o = r.find((a) => /^col-xl-([1-9]|10|11|12)$/.test(a)), d = r.find((a) => /^col-el-([1-9]|10|11|12)$/.test(a));
|
|
1276
|
-
s = s || "col-12", p = p || "col-md-" + s.replace("col-", ""), o = o || "col-xl-" + p.replace("col-md-", ""), d = d || "col-el-" + o.replace("col-xl-", "");
|
|
1277
|
-
const c = {
|
|
1278
|
-
id: t,
|
|
1279
|
-
columnInSM: parseInt(s.replace("col-", ""), 10),
|
|
1280
|
-
columnInMD: parseInt(p.replace("col-md-", ""), 10),
|
|
1281
|
-
columnInLG: parseInt(o.replace("col-xl-", ""), 10),
|
|
1282
|
-
columnInEL: parseInt(d.replace("col-el-", ""), 10)
|
|
1283
|
-
};
|
|
1284
|
-
this.updateUnifiedLayoutAfterResponseLayoutChanged(i, c);
|
|
1285
|
-
}
|
|
1286
|
-
/**
|
|
1287
|
-
* 修改控件布局配置后更新Form统一布局配置
|
|
1288
|
-
* @param componentId 组件Id
|
|
1289
|
-
* @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
|
|
1290
|
-
*/
|
|
1291
|
-
updateUnifiedLayoutAfterResponseLayoutChanged(e, t) {
|
|
1292
|
-
const { formNode: i } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
|
|
1293
|
-
if (!i || !i.unifiedLayout)
|
|
1294
|
-
return;
|
|
1295
|
-
const r = [];
|
|
1296
|
-
if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(i, r, 1), t) {
|
|
1297
|
-
const m = r.find((h) => h.id === t.id);
|
|
1298
|
-
Object.assign(m || {}, t);
|
|
1299
|
-
}
|
|
1300
|
-
const s = r.map((m) => m.columnInSM), p = r.map((m) => m.columnInMD), o = r.map((m) => m.columnInLG), d = r.map((m) => m.columnInEL), c = this.checkIsUniqueColumn(s) ? s[0] : null, a = this.checkIsUniqueColumn(p) ? p[0] : null, g = this.checkIsUniqueColumn(o) ? o[0] : null, f = this.checkIsUniqueColumn(d) ? d[0] : null;
|
|
1301
|
-
Object.assign(i.unifiedLayout, {
|
|
1302
|
-
uniqueColClassInSM: c,
|
|
1303
|
-
uniqueColClassInMD: a,
|
|
1304
|
-
uniqueColClassInLG: g,
|
|
1305
|
-
uniqueColClassInEL: f
|
|
1306
|
-
});
|
|
1307
|
-
}
|
|
1308
|
-
/**
|
|
1309
|
-
* 校验宽度样式值是否一致
|
|
1310
|
-
*/
|
|
1311
|
-
checkIsUniqueColumn(e) {
|
|
1312
|
-
const t = new Set(e);
|
|
1313
|
-
return Array.from(t).length === 1;
|
|
1314
|
-
}
|
|
1315
|
-
/**
|
|
1316
|
-
* 枚举项编辑器
|
|
1317
|
-
* @param propertyData
|
|
1318
|
-
* @param valueField
|
|
1319
|
-
* @param textField
|
|
1320
|
-
* @returns
|
|
1321
|
-
*/
|
|
1322
|
-
getItemCollectionEditor(e, t, i) {
|
|
1323
|
-
return t = t || "value", i = i || "name", {
|
|
1324
|
-
editor: {
|
|
1325
|
-
columns: [
|
|
1326
|
-
{ field: t, title: "值", dataType: "string" },
|
|
1327
|
-
{ field: i, title: "名称", dataType: "string" }
|
|
1328
|
-
// { field: 'disabled', title: '禁用', dataType: 'boolean', editor: { type: 'switch' } },
|
|
1329
|
-
],
|
|
1330
|
-
type: "item-collection-editor",
|
|
1331
|
-
valueField: t,
|
|
1332
|
-
nameField: i,
|
|
1333
|
-
requiredFields: [t, i],
|
|
1334
|
-
uniqueFields: [t, i],
|
|
1335
|
-
readonly: this.checkEnumDataReadonly(e)
|
|
1336
|
-
}
|
|
1337
|
-
};
|
|
1338
|
-
}
|
|
1339
|
-
/**
|
|
1340
|
-
* 判断枚举数据是否只读
|
|
1341
|
-
* 1、没有绑定信息或者绑定变量,可以新增、删除、修改
|
|
1342
|
-
* 2、绑定类型为字段,且字段为枚举字段,则不可新增、删除、修改枚举值。只能从be修改然后同步到表单上。
|
|
1343
|
-
* @param propertyData 下拉框控件属性值
|
|
1344
|
-
*/
|
|
1345
|
-
checkEnumDataReadonly(e) {
|
|
1346
|
-
return !e.binding || e.binding.type !== "Form" ? !1 : !!(this.designViewModelField && this.designViewModelField.type && this.designViewModelField.type.$type === Q.EnumType);
|
|
1347
|
-
}
|
|
1348
|
-
/**
|
|
1349
|
-
* 将字段值变化前事件、变化后事件追加到交互面板
|
|
1350
|
-
* 注意:因为绑定字段值变化后事件与下拉框的值变化事件(valueChanged)重名,所以这里将事件label都重命名下
|
|
1351
|
-
*/
|
|
1352
|
-
appendFieldValueChangeEvents(e, t) {
|
|
1353
|
-
e.binding && e.binding.type === L.Form && e.binding.field ? (t.find((i) => i.label === "fieldValueChanging"), t.find((i) => i.label === "fieldValueChanged"), this.designViewModelField && (e.fieldValueChanging = this.designViewModelField.valueChanging, e.fieldValueChanged = this.designViewModelField.valueChanged)) : t = t.filter((i) => i.label !== "fieldValueChanging" && i.label !== "fieldValueChanged");
|
|
1354
|
-
}
|
|
1355
|
-
getControlMethodType(e) {
|
|
1356
|
-
if (!e.binding)
|
|
1357
|
-
return e.type;
|
|
1358
|
-
switch (e.binding.type) {
|
|
1359
|
-
case L.Form:
|
|
1360
|
-
return e.binding.path || e.type;
|
|
1361
|
-
case L.Variable:
|
|
1362
|
-
return e.binding.fullPath || e.type;
|
|
1363
|
-
}
|
|
1364
|
-
return e.type;
|
|
1365
|
-
}
|
|
1366
|
-
/**
|
|
1367
|
-
* 组装输入类控件的交互面板:包含标签超链、绑定字段值变化前后事件等。
|
|
1368
|
-
* @param propertyData 属性值
|
|
1369
|
-
* @param viewModelId 视图模型id
|
|
1370
|
-
* @param showPosition 面板展示位置
|
|
1371
|
-
* @param customEvent 输入控件特有的事件配置
|
|
1372
|
-
*/
|
|
1373
|
-
getEventPropertyConfig(e, t = "card", i, r) {
|
|
1374
|
-
const s = this;
|
|
1375
|
-
let p = [];
|
|
1376
|
-
if (i && (p = p.concat(i)), p.length === 0)
|
|
1377
|
-
return {
|
|
1378
|
-
title: "事件",
|
|
1379
|
-
hideTitle: !0,
|
|
1380
|
-
properties: {},
|
|
1381
|
-
tabId: "commands",
|
|
1382
|
-
tabName: "交互",
|
|
1383
|
-
hide: !0
|
|
1384
|
-
};
|
|
1385
|
-
this.appendFieldValueChangeEvents(e, p);
|
|
1386
|
-
const o = s.eventsEditorUtils.formProperties(e, s.viewModelId, p);
|
|
1387
|
-
return {
|
|
1388
|
-
title: "事件",
|
|
1389
|
-
hideTitle: !0,
|
|
1390
|
-
properties: s.createBaseEventProperty(o),
|
|
1391
|
-
tabId: "commands",
|
|
1392
|
-
tabName: "交互",
|
|
1393
|
-
setPropertyRelates(a, g) {
|
|
1394
|
-
const f = a.propertyValue;
|
|
1395
|
-
delete e[s.viewModelId], f && (f.setPropertyRelates = this.setPropertyRelates, f.controlInfo = { type: s.getControlMethodType(e), name: e.title }, s.eventsEditorUtils.saveRelatedParameters(e, s.viewModelId, f.events, f)), r && r(a, g, f);
|
|
1396
|
-
const m = s.designViewModelUtils.getDgViewModel(s.viewModelId);
|
|
1397
|
-
m && s.designViewModelField && m.changeField(s.designViewModelField.id, { valueChanging: e.fieldValueChanging, valueChanged: e.fieldValueChanged });
|
|
1398
|
-
}
|
|
1399
|
-
};
|
|
1400
|
-
}
|
|
1401
|
-
getExpressionConfig(e, t, i = ["compute", "dependency", "validate"], r) {
|
|
1402
|
-
return new Z(this.formSchemaUtils).getExpressionConfig(
|
|
1403
|
-
e,
|
|
1404
|
-
t,
|
|
1405
|
-
i,
|
|
1406
|
-
r
|
|
1407
|
-
);
|
|
1408
|
-
}
|
|
1409
|
-
getBindingDataType() {
|
|
1410
|
-
return this.designViewModelField ? this.designViewModelField.type.name === "Number" ? "number" : this.designViewModelField.type.name === "String" ? "string" : "boolean" : "boolean";
|
|
1411
|
-
}
|
|
1412
|
-
getEditor() {
|
|
1413
|
-
return this.getBindingDataType() === "number" ? this.numberEditorOptions : {};
|
|
1414
|
-
}
|
|
1415
|
-
updatePropertyValue(e, t, i) {
|
|
1416
|
-
var r;
|
|
1417
|
-
e.editor[t] !== i ? e.editor[t] = i : (r = this.getFormDesignerInstance()) == null || r.reloadPropertyPanel();
|
|
1418
|
-
}
|
|
1419
|
-
setBooleanValue(e, t, i) {
|
|
1420
|
-
let r = i;
|
|
1421
|
-
this.getBindingDataType() === "string" && (r = (r || "").trim() || (t === "trueValue" ? "true" : "false"));
|
|
1422
|
-
const p = t === "trueValue" ? "falseValue" : "trueValue";
|
|
1423
|
-
e.editor[p] === r && (r = r + 1), this.updatePropertyValue(e, t, r);
|
|
1424
|
-
}
|
|
1425
|
-
getBooleanValueConverter() {
|
|
1426
|
-
return {
|
|
1427
|
-
convertFrom: (e, t) => e.editor[t],
|
|
1428
|
-
convertTo: (e, t, i) => {
|
|
1429
|
-
this.setBooleanValue(e, t, i);
|
|
1430
|
-
}
|
|
1431
|
-
};
|
|
1432
|
-
}
|
|
1433
|
-
}
|
|
1434
|
-
class he extends fe {
|
|
1435
|
-
constructor(n, e) {
|
|
1436
|
-
super(n, e);
|
|
1437
|
-
}
|
|
1438
|
-
getEditorProperties(n) {
|
|
1439
|
-
return this.getComponentConfig(n, { type: "number-range" }, {
|
|
1440
|
-
editable: {
|
|
1441
|
-
description: "",
|
|
1442
|
-
title: "允许编辑",
|
|
1443
|
-
type: "boolean"
|
|
1444
|
-
}
|
|
1445
|
-
});
|
|
1446
|
-
}
|
|
1447
|
-
}
|
|
1448
|
-
function ye(l, n) {
|
|
1449
|
-
const e = l.schema;
|
|
1450
|
-
function t(i, r) {
|
|
1451
|
-
return new he(i, n).getPropertyConfig(e, r);
|
|
1452
|
-
}
|
|
1453
|
-
return { getPropsConfig: t };
|
|
1454
|
-
}
|
|
1455
|
-
const O = /* @__PURE__ */ ne({
|
|
1456
|
-
name: "FNumberRangeDesign",
|
|
1457
|
-
props: K,
|
|
1458
|
-
emits: ["valueChange", "blur", "focus", "click", "input", "beginValueChange", "endValueChange"],
|
|
1459
|
-
setup(l, n) {
|
|
1460
|
-
const e = N(l.beginValue), t = N(""), i = N(l.endValue), r = N(""), s = de(l), p = ce(l, n, s), o = (C) => {
|
|
1461
|
-
n.emit("beginValueChange", C);
|
|
1462
|
-
}, d = N(), c = j("designer-host-service"), a = j("design-item-context"), g = ye(a, c), f = le(d, a, g);
|
|
1463
|
-
re(() => {
|
|
1464
|
-
d.value.componentInstance = f;
|
|
1465
|
-
}), n.expose(f.value);
|
|
1466
|
-
const m = G(l, n, t, e, p, s, o, e, i, !0), h = W(l, n, t, e, p, s, m, o, e, i, !0), b = X(l, n, m), v = z(l, n, h, !0), w = (C) => {
|
|
1467
|
-
n.emit("endValueChange", C);
|
|
1468
|
-
}, E = G(l, n, r, i, p, s, w, e, i, !1), x = W(l, n, r, i, p, s, E, w, e, i, !1), M = X(l, n, E), P = z(l, n, x, !1), T = k(() => l.showButton);
|
|
1469
|
-
return () => S("div", {
|
|
1470
|
-
ref: d,
|
|
1471
|
-
class: "input-group number-range f-cmp-number-spinner"
|
|
1472
|
-
}, [S("div", {
|
|
1473
|
-
class: "form-control input-container"
|
|
1474
|
-
}, [S("div", {
|
|
1475
|
-
class: "sub-input-group"
|
|
1476
|
-
}, [v(), T.value && b()]), S("span", {
|
|
1477
|
-
class: "spliter"
|
|
1478
|
-
}, [se("~")]), S("div", {
|
|
1479
|
-
class: "sub-input-group"
|
|
1480
|
-
}, [P(), T.value && M()])])]);
|
|
1481
|
-
}
|
|
1482
|
-
});
|
|
1483
|
-
function be(l, n, e) {
|
|
1484
|
-
return n;
|
|
1485
|
-
}
|
|
1486
|
-
const ve = /* @__PURE__ */ new Map([
|
|
1487
|
-
["appearance", ee]
|
|
1488
|
-
]), Ce = "https://json-schema.org/draft/2020-12/schema", we = "https://farris-design.gitee.io/number-range.schema.json", xe = "number-range", Fe = "A Farris Component", Ie = "object", Ee = {
|
|
1489
|
-
id: {
|
|
1490
|
-
description: "The unique identifier for a number-range",
|
|
1491
|
-
type: "string"
|
|
1492
|
-
},
|
|
1493
|
-
type: {
|
|
1494
|
-
description: "The type string of number-range component",
|
|
1495
|
-
type: "string",
|
|
1496
|
-
default: "number-range"
|
|
1497
|
-
},
|
|
1498
|
-
appearance: {
|
|
1499
|
-
description: "",
|
|
1500
|
-
type: "object",
|
|
1501
|
-
properties: {
|
|
1502
|
-
class: {
|
|
1503
|
-
type: "string"
|
|
1504
|
-
},
|
|
1505
|
-
style: {
|
|
1506
|
-
type: "string"
|
|
1507
|
-
}
|
|
1508
|
-
},
|
|
1509
|
-
default: {}
|
|
1510
|
-
},
|
|
1511
|
-
binding: {
|
|
1512
|
-
description: "",
|
|
1513
|
-
type: "object",
|
|
1514
|
-
default: {}
|
|
1515
|
-
},
|
|
1516
|
-
disabled: {
|
|
1517
|
-
type: "boolean",
|
|
1518
|
-
default: !1
|
|
1519
|
-
},
|
|
1520
|
-
editable: {
|
|
1521
|
-
description: "",
|
|
1522
|
-
type: "boolean",
|
|
1523
|
-
default: !0
|
|
1524
|
-
},
|
|
1525
|
-
placeholder: {
|
|
1526
|
-
description: "",
|
|
1527
|
-
type: "string",
|
|
1528
|
-
default: ""
|
|
1529
|
-
},
|
|
1530
|
-
readonly: {
|
|
1531
|
-
description: "",
|
|
1532
|
-
type: "boolean",
|
|
1533
|
-
default: !1
|
|
1534
|
-
},
|
|
1535
|
-
required: {
|
|
1536
|
-
description: "",
|
|
1537
|
-
type: "boolean",
|
|
1538
|
-
default: !1
|
|
1539
|
-
},
|
|
1540
|
-
precision: {
|
|
1541
|
-
description: "",
|
|
1542
|
-
type: "number",
|
|
1543
|
-
default: 0
|
|
1544
|
-
},
|
|
1545
|
-
tabindex: {
|
|
1546
|
-
description: "",
|
|
1547
|
-
type: "number",
|
|
1548
|
-
default: -1
|
|
1549
|
-
},
|
|
1550
|
-
visible: {
|
|
1551
|
-
description: "",
|
|
1552
|
-
type: "boolean",
|
|
1553
|
-
default: !0
|
|
1554
|
-
},
|
|
1555
|
-
beginValue: {
|
|
1556
|
-
description: "",
|
|
1557
|
-
type: "number"
|
|
1558
|
-
},
|
|
1559
|
-
endValue: {
|
|
1560
|
-
description: "",
|
|
1561
|
-
type: "number"
|
|
1562
|
-
},
|
|
1563
|
-
nullable: {
|
|
1564
|
-
description: "",
|
|
1565
|
-
type: "boolean",
|
|
1566
|
-
default: !1
|
|
1567
|
-
},
|
|
1568
|
-
min: {
|
|
1569
|
-
description: "",
|
|
1570
|
-
type: "string"
|
|
1571
|
-
},
|
|
1572
|
-
max: {
|
|
1573
|
-
description: "",
|
|
1574
|
-
type: "string"
|
|
1575
|
-
},
|
|
1576
|
-
beginPlaceholder: {
|
|
1577
|
-
description: "",
|
|
1578
|
-
type: "string"
|
|
1579
|
-
},
|
|
1580
|
-
endPlaceholder: {
|
|
1581
|
-
description: "",
|
|
1582
|
-
type: "string"
|
|
1583
|
-
},
|
|
1584
|
-
textAlign: {
|
|
1585
|
-
description: "",
|
|
1586
|
-
type: "string",
|
|
1587
|
-
enum: [
|
|
1588
|
-
"left",
|
|
1589
|
-
"middle",
|
|
1590
|
-
"right"
|
|
1591
|
-
],
|
|
1592
|
-
default: "left"
|
|
1593
|
-
}
|
|
1594
|
-
}, Ve = [
|
|
1595
|
-
"type"
|
|
1596
|
-
], Me = {
|
|
1597
|
-
$schema: Ce,
|
|
1598
|
-
$id: we,
|
|
1599
|
-
title: xe,
|
|
1600
|
-
description: Fe,
|
|
1601
|
-
type: Ie,
|
|
1602
|
-
properties: Ee,
|
|
1603
|
-
required: Ve
|
|
1604
|
-
}, _ = te(K, Me, ve, be);
|
|
1605
|
-
O.register = (l, n, e, t) => {
|
|
1606
|
-
l["number-range"] = J, n["number-range"] = _;
|
|
1607
|
-
};
|
|
1608
|
-
O.registerDesigner = (l, n, e) => {
|
|
1609
|
-
l["number-range"] = O, n["number-range"] = _;
|
|
1610
|
-
};
|
|
1611
|
-
const Le = Y(O);
|
|
1612
|
-
export {
|
|
1613
|
-
O as FNumberRangeDesign,
|
|
1614
|
-
Le as default,
|
|
1615
|
-
_ as propsResolver
|
|
1616
|
-
};
|