@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,6 +1,143 @@
|
|
|
1
|
-
import { inject as
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { inject as Me, ref as o, onMounted as be, onUnmounted as et, watch as ee, defineComponent as we, createVNode as f, withModifiers as P } from "vue";
|
|
2
|
+
import { resolveAppearance as tt, createPropsResolver as at } from "../dynamic-resolver/index.esm.js";
|
|
3
|
+
import { useDesignerComponent as it } from "../designer-canvas/index.esm.js";
|
|
4
|
+
function lt(a, c, u) {
|
|
5
|
+
return c;
|
|
6
|
+
}
|
|
7
|
+
const nt = /* @__PURE__ */ new Map([
|
|
8
|
+
["appearance", tt]
|
|
9
|
+
]), ut = "https://json-schema.org/draft/2020-12/schema", st = "https://farris-design.gitee.io/image-cropper.schema.json", ot = "image-cropper", rt = "A Farris Component", vt = "object", ct = {
|
|
10
|
+
id: {
|
|
11
|
+
description: "The unique identifier for image-cropper",
|
|
12
|
+
type: "string"
|
|
13
|
+
},
|
|
14
|
+
type: {
|
|
15
|
+
description: "The type string of image-cropper",
|
|
16
|
+
type: "string",
|
|
17
|
+
default: "image-cropper"
|
|
18
|
+
},
|
|
19
|
+
appearance: {
|
|
20
|
+
description: "",
|
|
21
|
+
type: "object",
|
|
22
|
+
properties: {
|
|
23
|
+
class: {
|
|
24
|
+
type: "string"
|
|
25
|
+
},
|
|
26
|
+
style: {
|
|
27
|
+
type: "string"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
default: {}
|
|
31
|
+
},
|
|
32
|
+
binding: {
|
|
33
|
+
description: "",
|
|
34
|
+
type: "object",
|
|
35
|
+
default: {}
|
|
36
|
+
},
|
|
37
|
+
disable: {
|
|
38
|
+
type: "string",
|
|
39
|
+
default: !1
|
|
40
|
+
},
|
|
41
|
+
editable: {
|
|
42
|
+
description: "",
|
|
43
|
+
type: "boolean",
|
|
44
|
+
default: !0
|
|
45
|
+
},
|
|
46
|
+
placeholder: {
|
|
47
|
+
description: "",
|
|
48
|
+
type: "string",
|
|
49
|
+
default: ""
|
|
50
|
+
},
|
|
51
|
+
readonly: {
|
|
52
|
+
description: "",
|
|
53
|
+
type: "boolean",
|
|
54
|
+
default: !1
|
|
55
|
+
},
|
|
56
|
+
require: {
|
|
57
|
+
description: "",
|
|
58
|
+
type: "boolean",
|
|
59
|
+
default: !1
|
|
60
|
+
},
|
|
61
|
+
tabindex: {
|
|
62
|
+
description: "",
|
|
63
|
+
type: "number",
|
|
64
|
+
default: -1
|
|
65
|
+
},
|
|
66
|
+
visible: {
|
|
67
|
+
description: "",
|
|
68
|
+
type: "boolean",
|
|
69
|
+
default: !0
|
|
70
|
+
}
|
|
71
|
+
}, ht = [
|
|
72
|
+
"id",
|
|
73
|
+
"type"
|
|
74
|
+
], ft = {
|
|
75
|
+
$schema: ut,
|
|
76
|
+
$id: st,
|
|
77
|
+
title: ot,
|
|
78
|
+
description: rt,
|
|
79
|
+
type: vt,
|
|
80
|
+
properties: ct,
|
|
81
|
+
required: ht
|
|
82
|
+
}, dt = "image-cropper", gt = "A Farris Component", mt = "object", yt = {
|
|
83
|
+
basic: {
|
|
84
|
+
description: "Basic Infomation",
|
|
85
|
+
title: "基本信息",
|
|
86
|
+
properties: {
|
|
87
|
+
id: {
|
|
88
|
+
description: "组件标识",
|
|
89
|
+
title: "标识",
|
|
90
|
+
type: "string",
|
|
91
|
+
readonly: !0
|
|
92
|
+
},
|
|
93
|
+
type: {
|
|
94
|
+
description: "组件类型",
|
|
95
|
+
title: "控件类型",
|
|
96
|
+
type: "select",
|
|
97
|
+
editor: {
|
|
98
|
+
type: "waiting for modification",
|
|
99
|
+
enum: []
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
behavior: {
|
|
105
|
+
description: "Basic Infomation",
|
|
106
|
+
title: "行为",
|
|
107
|
+
properties: {
|
|
108
|
+
readonly: {
|
|
109
|
+
description: "",
|
|
110
|
+
title: "只读",
|
|
111
|
+
type: "string"
|
|
112
|
+
},
|
|
113
|
+
required: {
|
|
114
|
+
description: "",
|
|
115
|
+
title: "必填",
|
|
116
|
+
type: "boolean"
|
|
117
|
+
},
|
|
118
|
+
visible: {
|
|
119
|
+
description: "",
|
|
120
|
+
title: "可见",
|
|
121
|
+
type: "boolean"
|
|
122
|
+
},
|
|
123
|
+
placeholder: {
|
|
124
|
+
description: "",
|
|
125
|
+
title: "提示文本",
|
|
126
|
+
type: "string"
|
|
127
|
+
},
|
|
128
|
+
tabindex: {
|
|
129
|
+
description: "",
|
|
130
|
+
title: "tab索引",
|
|
131
|
+
type: "number"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}, pt = {
|
|
136
|
+
title: dt,
|
|
137
|
+
description: gt,
|
|
138
|
+
type: mt,
|
|
139
|
+
categories: yt
|
|
140
|
+
}, he = {
|
|
4
141
|
/** 输出图片格式 */
|
|
5
142
|
format: { type: String, default: "png" },
|
|
6
143
|
/** 保持长宽比例 */
|
|
@@ -57,11 +194,11 @@ const Xe = {
|
|
|
57
194
|
y2: 1e4
|
|
58
195
|
}
|
|
59
196
|
}
|
|
60
|
-
};
|
|
61
|
-
var
|
|
62
|
-
function
|
|
63
|
-
function a(
|
|
64
|
-
switch (typeof
|
|
197
|
+
}, Ie = at(he, ft, nt, lt, pt);
|
|
198
|
+
var ie = /* @__PURE__ */ ((a) => (a.Move = "move", a.Resize = "resize", a))(ie || {});
|
|
199
|
+
function xt() {
|
|
200
|
+
function a(y) {
|
|
201
|
+
switch (typeof y == "string" && (y = c(y)), y) {
|
|
65
202
|
case 2:
|
|
66
203
|
return { rotate: 0, flip: !0 };
|
|
67
204
|
case 3:
|
|
@@ -80,113 +217,113 @@ function et() {
|
|
|
80
217
|
return { rotate: 0, flip: !1 };
|
|
81
218
|
}
|
|
82
219
|
}
|
|
83
|
-
function
|
|
84
|
-
const t = new DataView(
|
|
220
|
+
function c(y) {
|
|
221
|
+
const t = new DataView(u(y));
|
|
85
222
|
if (t.getUint16(0, !1) !== 65496)
|
|
86
223
|
return -2;
|
|
87
|
-
const
|
|
88
|
-
let
|
|
89
|
-
for (;
|
|
90
|
-
if (t.getUint16(
|
|
224
|
+
const p = t.byteLength;
|
|
225
|
+
let d = 2;
|
|
226
|
+
for (; d < p; ) {
|
|
227
|
+
if (t.getUint16(d + 2, !1) <= 8)
|
|
91
228
|
return -1;
|
|
92
|
-
const b = t.getUint16(
|
|
93
|
-
if (
|
|
94
|
-
if (t.getUint32(
|
|
229
|
+
const b = t.getUint16(d, !1);
|
|
230
|
+
if (d += 2, b === 65505) {
|
|
231
|
+
if (t.getUint32(d += 2, !1) !== 1165519206)
|
|
95
232
|
return -1;
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
const D = t.getUint16(
|
|
99
|
-
|
|
100
|
-
for (let
|
|
101
|
-
if (t.getUint16(
|
|
102
|
-
return t.getUint16(
|
|
233
|
+
const h = t.getUint16(d += 6, !1) === 18761;
|
|
234
|
+
d += t.getUint32(d + 4, h);
|
|
235
|
+
const D = t.getUint16(d, h);
|
|
236
|
+
d += 2;
|
|
237
|
+
for (let H = 0; H < D; H++)
|
|
238
|
+
if (t.getUint16(d + H * 12, h) === 274)
|
|
239
|
+
return t.getUint16(d + H * 12 + 8, h);
|
|
103
240
|
} else {
|
|
104
241
|
if ((b & 65280) !== 65280)
|
|
105
242
|
break;
|
|
106
|
-
|
|
243
|
+
d += t.getUint16(d, !1);
|
|
107
244
|
}
|
|
108
245
|
}
|
|
109
246
|
return -1;
|
|
110
247
|
}
|
|
111
|
-
function
|
|
112
|
-
|
|
113
|
-
const t = atob(
|
|
114
|
-
for (let b = 0; b <
|
|
115
|
-
|
|
116
|
-
return
|
|
117
|
-
}
|
|
118
|
-
function
|
|
119
|
-
const
|
|
120
|
-
t = Math.round(t),
|
|
121
|
-
const
|
|
122
|
-
if (
|
|
123
|
-
const
|
|
124
|
-
for (let
|
|
125
|
-
for (let
|
|
126
|
-
const
|
|
127
|
-
let T = 0,
|
|
128
|
-
const
|
|
129
|
-
let
|
|
130
|
-
|
|
131
|
-
for (let
|
|
132
|
-
const
|
|
133
|
-
for (let
|
|
134
|
-
const
|
|
135
|
-
if (
|
|
248
|
+
function u(y) {
|
|
249
|
+
y = y.replace(/^data:([^;]+);base64,/gmi, "");
|
|
250
|
+
const t = atob(y), p = t.length, d = new Uint8Array(p);
|
|
251
|
+
for (let b = 0; b < p; b++)
|
|
252
|
+
d[b] = t.charCodeAt(b);
|
|
253
|
+
return d.buffer;
|
|
254
|
+
}
|
|
255
|
+
function N(y, t, p) {
|
|
256
|
+
const d = y.width, b = y.height;
|
|
257
|
+
t = Math.round(t), p = Math.round(p);
|
|
258
|
+
const h = d / t, D = b / p, H = Math.ceil(h / 2), l = Math.ceil(D / 2), n = y.getContext("2d");
|
|
259
|
+
if (n) {
|
|
260
|
+
const C = n.getImageData(0, 0, d, b), g = n.createImageData(t, p), { data: _ } = C, $ = g.data;
|
|
261
|
+
for (let R = 0; R < p; R++)
|
|
262
|
+
for (let k = 0; k < t; k++) {
|
|
263
|
+
const j = (k + R * t) * 4, A = R * D;
|
|
264
|
+
let T = 0, v = 0, m = 0, q = 0, Q = 0, I = 0, M = 0;
|
|
265
|
+
const L = Math.floor(k * h), z = Math.floor(R * D);
|
|
266
|
+
let O = Math.ceil((k + 1) * h), G = Math.ceil((R + 1) * D);
|
|
267
|
+
O = Math.min(O, d), G = Math.min(G, b);
|
|
268
|
+
for (let S = z; S < G; S++) {
|
|
269
|
+
const x = Math.abs(A - S) / l, le = k * h, te = x * x;
|
|
270
|
+
for (let E = L; E < O; E++) {
|
|
271
|
+
const U = Math.abs(le - E) / H, W = Math.sqrt(te + U * U);
|
|
272
|
+
if (W >= 1)
|
|
136
273
|
continue;
|
|
137
|
-
T = 2 *
|
|
138
|
-
const
|
|
139
|
-
|
|
274
|
+
T = 2 * W * W * W - 3 * W * W + 1;
|
|
275
|
+
const F = 4 * (E + S * d);
|
|
276
|
+
M += T * _[F + 3], m += T, _[F + 3] < 255 && (T = T * _[F + 3] / 250), q += T * _[F], Q += T * _[F + 1], I += T * _[F + 2], v += T;
|
|
140
277
|
}
|
|
141
278
|
}
|
|
142
|
-
|
|
279
|
+
$[j] = q / v, $[j + 1] = Q / v, $[j + 2] = I / v, $[j + 3] = M / m;
|
|
143
280
|
}
|
|
144
|
-
|
|
281
|
+
y.width = t, y.height = p, n.putImageData(g, 0, 0);
|
|
145
282
|
}
|
|
146
283
|
}
|
|
147
284
|
return {
|
|
148
|
-
resizeCanvas:
|
|
285
|
+
resizeCanvas: N,
|
|
149
286
|
getTransformationsFromExifData: a
|
|
150
287
|
};
|
|
151
288
|
}
|
|
152
|
-
function
|
|
153
|
-
function
|
|
154
|
-
a.value.x2 = a.value.x1 + (a.value.y2 - a.value.y1) *
|
|
289
|
+
function Mt(a, c, u, N) {
|
|
290
|
+
function y(l, n) {
|
|
291
|
+
a.value.x2 = a.value.x1 + (a.value.y2 - a.value.y1) * u.value, l = Math.max(a.value.x2 - c.value.width, 0), n = Math.max(0 - a.value.y1, 0), (l > 0 || n > 0) && (a.value.x2 -= n * u.value > l ? n * u.value : l, a.value.y1 += n * u.value > l ? n : l / u.value);
|
|
155
292
|
}
|
|
156
|
-
function t(
|
|
157
|
-
a.value.x2 = a.value.x1 + (a.value.y2 - a.value.y1) *
|
|
293
|
+
function t(l, n) {
|
|
294
|
+
a.value.x2 = a.value.x1 + (a.value.y2 - a.value.y1) * u.value, l = Math.max(a.value.x2 - c.value.width, 0), n = Math.max(a.value.y2 - c.value.height, 0), (l > 0 || n > 0) && (a.value.x2 -= n * u.value > l ? n * u.value : l, a.value.y2 -= n * u.value > l ? n : l / u.value);
|
|
158
295
|
}
|
|
159
|
-
function
|
|
160
|
-
a.value.y1 = a.value.y2 - (a.value.x2 - a.value.x1) /
|
|
296
|
+
function p(l, n) {
|
|
297
|
+
a.value.y1 = a.value.y2 - (a.value.x2 - a.value.x1) / u.value, l = Math.max(0 - a.value.x1, 0), n = Math.max(0 - a.value.y1, 0), (l > 0 || n > 0) && (a.value.x1 += n * u.value > l ? n * u.value : l, a.value.y1 += n * u.value > l ? n : l / u.value);
|
|
161
298
|
}
|
|
162
|
-
function
|
|
163
|
-
a.value.y1 = a.value.y2 - (a.value.x2 - a.value.x1) /
|
|
299
|
+
function d(l, n) {
|
|
300
|
+
a.value.y1 = a.value.y2 - (a.value.x2 - a.value.x1) / u.value, l = Math.max(a.value.x2 - c.value.width, 0), n = Math.max(0 - a.value.y1, 0), (l > 0 || n > 0) && (a.value.x2 -= n * u.value > l ? n * u.value : l, a.value.y1 += n * u.value > l ? n : l / u.value);
|
|
164
301
|
}
|
|
165
|
-
function b(
|
|
166
|
-
a.value.y2 = a.value.y1 + (a.value.x2 - a.value.x1) /
|
|
302
|
+
function b(l, n) {
|
|
303
|
+
a.value.y2 = a.value.y1 + (a.value.x2 - a.value.x1) / u.value, l = Math.max(a.value.x2 - c.value.width, 0), n = Math.max(a.value.y2 - c.value.height, 0), (l > 0 || n > 0) && (a.value.x2 -= n * u.value > l ? n * u.value : l, a.value.y2 -= n * u.value > l ? n : l / u.value);
|
|
167
304
|
}
|
|
168
|
-
function
|
|
169
|
-
a.value.y2 = a.value.y1 + (a.value.x2 - a.value.x1) /
|
|
305
|
+
function h(l, n) {
|
|
306
|
+
a.value.y2 = a.value.y1 + (a.value.x2 - a.value.x1) / u.value, l = Math.max(0 - a.value.x1, 0), n = Math.max(a.value.y2 - c.value.height, 0), (l > 0 || n > 0) && (a.value.x1 += n * u.value > l ? n * u.value : l, a.value.y2 -= n * u.value > l ? n : l / u.value);
|
|
170
307
|
}
|
|
171
308
|
function D() {
|
|
172
|
-
a.value.x2 = a.value.x1 + (a.value.y2 - a.value.y1) *
|
|
173
|
-
const
|
|
174
|
-
(
|
|
309
|
+
a.value.x2 = a.value.x1 + (a.value.y2 - a.value.y1) * u.value, a.value.y2 = a.value.y1 + (a.value.x2 - a.value.x1) / u.value;
|
|
310
|
+
const l = Math.max(0 - a.value.x1, 0), n = Math.max(a.value.x2 - c.value.width, 0), C = Math.max(a.value.y2 - c.value.height, 0), g = Math.max(0 - a.value.y1, 0);
|
|
311
|
+
(l > 0 || n > 0 || C > 0 || g > 0) && (a.value.x1 += C * u.value > l ? C * u.value : l, a.value.x2 -= g * u.value > n ? g * u.value : n, a.value.y1 += g * u.value > n ? g : n / u.value, a.value.y2 -= C * u.value > l ? C : l / u.value);
|
|
175
312
|
}
|
|
176
|
-
function
|
|
177
|
-
if (
|
|
178
|
-
switch (
|
|
313
|
+
function H() {
|
|
314
|
+
if (c.value.width && c.value.height)
|
|
315
|
+
switch (N.position) {
|
|
179
316
|
case "top":
|
|
180
|
-
|
|
317
|
+
y(0, 0);
|
|
181
318
|
break;
|
|
182
319
|
case "bottom":
|
|
183
320
|
t(0, 0);
|
|
184
321
|
break;
|
|
185
322
|
case "topleft":
|
|
186
|
-
|
|
323
|
+
p(0, 0);
|
|
187
324
|
break;
|
|
188
325
|
case "topright":
|
|
189
|
-
|
|
326
|
+
d(0, 0);
|
|
190
327
|
break;
|
|
191
328
|
case "right":
|
|
192
329
|
case "bottomright":
|
|
@@ -194,26 +331,26 @@ function tt(a, M, s, $) {
|
|
|
194
331
|
break;
|
|
195
332
|
case "left":
|
|
196
333
|
case "bottomleft":
|
|
197
|
-
|
|
334
|
+
h(0, 0);
|
|
198
335
|
break;
|
|
199
336
|
case "center":
|
|
200
337
|
D();
|
|
201
338
|
break;
|
|
202
339
|
}
|
|
203
340
|
}
|
|
204
|
-
return { checkAspectRatio:
|
|
341
|
+
return { checkAspectRatio: H };
|
|
205
342
|
}
|
|
206
|
-
function
|
|
207
|
-
const { resizeCanvas:
|
|
208
|
-
let
|
|
209
|
-
const
|
|
210
|
-
let
|
|
211
|
-
const fe =
|
|
212
|
-
function
|
|
213
|
-
|
|
214
|
-
}
|
|
215
|
-
function
|
|
216
|
-
T.value = !1,
|
|
343
|
+
function Ce(a, c) {
|
|
344
|
+
const { resizeCanvas: u, getTransformationsFromExifData: N } = xt(), y = Me("NotifyService"), t = o(a.cropper), p = o(a.transform), d = o(a.cropperMinWidth), b = o(a.maintainAspectRatio), h = o(a.aspectRatio), D = o(a.autoCrop), H = o(a.backgroundColor), l = o(a.resizeToWidth), n = o(a.onlyScaleDown), C = o(a.containWithinAspectRatio), g = o(a.canvasRotation), _ = o(a.format), $ = o(a.imageQuality), R = o(a.resizeToHeight), k = o(a.cropperMinHeight), j = o(""), A = o(!0), T = o(!0);
|
|
345
|
+
let v, m, q = 0, Q, I, M;
|
|
346
|
+
const L = o(null), z = o(""), O = o(""), G = o("0px"), S = o(), x = o({ width: 100, height: 100 }), le = ie;
|
|
347
|
+
let te, E = 20, U = 20, W = !1, F = { rotate: 0, flip: !1 }, r = { active: !1, type: null, position: null, x1: 0, y1: 0, x2: 0, y2: 0, clientX: 0, clientY: 0 };
|
|
348
|
+
const fe = o(a.imageChangedEvent), ne = o(a.imageURL), Ae = o(a.imageBase64), Te = o(a.imageFile);
|
|
349
|
+
function ze() {
|
|
350
|
+
O.value = "scaleX(" + (p.value.scale || 1) * (p.value.flipH ? -1 : 1) + ")scaleY(" + (p.value.scale || 1) * (p.value.flipV ? -1 : 1) + ")rotate(" + (p.value.rotate || 0) + "deg)";
|
|
351
|
+
}
|
|
352
|
+
function Y() {
|
|
353
|
+
T.value = !1, S.value = null, j.value = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=", r = {
|
|
217
354
|
active: !1,
|
|
218
355
|
type: null,
|
|
219
356
|
position: null,
|
|
@@ -223,313 +360,313 @@ function at(a, M) {
|
|
|
223
360
|
y2: 0,
|
|
224
361
|
clientX: 0,
|
|
225
362
|
clientY: 0
|
|
226
|
-
},
|
|
363
|
+
}, x.value = {
|
|
227
364
|
width: 0,
|
|
228
365
|
height: 0
|
|
229
|
-
},
|
|
366
|
+
}, v = {
|
|
230
367
|
width: 0,
|
|
231
368
|
height: 0
|
|
232
|
-
},
|
|
369
|
+
}, m = {
|
|
233
370
|
width: 0,
|
|
234
371
|
height: 0
|
|
235
372
|
}, t.value.x1 = -100, t.value.y1 = -100, t.value.x2 = 1e4, t.value.y2 = 1e4;
|
|
236
373
|
}
|
|
237
|
-
function
|
|
374
|
+
function Se(e) {
|
|
238
375
|
return /image\/(png|jpg|jpeg|bmp|gif|tiff|webp)/.test(e);
|
|
239
376
|
}
|
|
240
|
-
function
|
|
241
|
-
if (
|
|
242
|
-
if (
|
|
243
|
-
const
|
|
377
|
+
function ke() {
|
|
378
|
+
if (g.value += F.rotate, C.value && v.width && v.height) {
|
|
379
|
+
if (g.value % 2) {
|
|
380
|
+
const s = v.width * h.value, w = v.height / h.value;
|
|
244
381
|
return {
|
|
245
|
-
width: Math.max(
|
|
246
|
-
height: Math.max(
|
|
382
|
+
width: Math.max(v.height, s),
|
|
383
|
+
height: Math.max(v.width, w)
|
|
247
384
|
};
|
|
248
385
|
}
|
|
249
|
-
const e =
|
|
386
|
+
const e = v.height * h.value, i = v.width / h.value;
|
|
250
387
|
return {
|
|
251
|
-
width: Math.max(
|
|
252
|
-
height: Math.max(
|
|
388
|
+
width: Math.max(v.width, e),
|
|
389
|
+
height: Math.max(v.height, i)
|
|
253
390
|
};
|
|
254
391
|
}
|
|
255
|
-
return
|
|
256
|
-
height:
|
|
257
|
-
width:
|
|
392
|
+
return g.value % 2 ? {
|
|
393
|
+
height: v.width,
|
|
394
|
+
width: v.height
|
|
258
395
|
} : {
|
|
259
|
-
width:
|
|
260
|
-
height:
|
|
396
|
+
width: v.width,
|
|
397
|
+
height: v.height
|
|
261
398
|
};
|
|
262
399
|
}
|
|
263
|
-
function
|
|
264
|
-
|
|
265
|
-
const e =
|
|
266
|
-
e.width && e.height && (
|
|
267
|
-
const
|
|
268
|
-
return
|
|
269
|
-
}
|
|
270
|
-
function
|
|
271
|
-
return new Promise((
|
|
272
|
-
|
|
273
|
-
var
|
|
274
|
-
|
|
275
|
-
},
|
|
400
|
+
function We() {
|
|
401
|
+
g.value += F.rotate;
|
|
402
|
+
const e = ke(), i = document.createElement("canvas");
|
|
403
|
+
e.width && e.height && (i.width = e.width, i.height = e.height);
|
|
404
|
+
const s = i.getContext("2d");
|
|
405
|
+
return v.width && v.height && M && (s == null || s.setTransform(F.flip ? -1 : 1, 0, 0, 1, i.width / 2, i.height / 2), s == null || s.rotate(Math.PI * (g.value / 2)), s == null || s.drawImage(M, -v.width / 2, -v.height / 2)), i.toDataURL();
|
|
406
|
+
}
|
|
407
|
+
function Be(e) {
|
|
408
|
+
return new Promise((i) => {
|
|
409
|
+
te = e, j.value = e, S.value = new Image(), S.value.onload = () => {
|
|
410
|
+
var s, w;
|
|
411
|
+
m.width = (s = S.value) == null ? void 0 : s.naturalWidth, m.height = (w = S.value) == null ? void 0 : w.naturalHeight, i();
|
|
412
|
+
}, S.value.src = te;
|
|
276
413
|
});
|
|
277
414
|
}
|
|
278
|
-
function
|
|
279
|
-
if (!
|
|
415
|
+
function de() {
|
|
416
|
+
if (!M || !M.complete || !F)
|
|
280
417
|
return Promise.reject(new Error("No image loaded"));
|
|
281
|
-
const e =
|
|
282
|
-
return
|
|
418
|
+
const e = We();
|
|
419
|
+
return Be(e);
|
|
283
420
|
}
|
|
284
|
-
function
|
|
285
|
-
const
|
|
286
|
-
|
|
421
|
+
function ue(e) {
|
|
422
|
+
const i = (s) => {
|
|
423
|
+
y.show({
|
|
287
424
|
showCloseButton: !1,
|
|
288
425
|
timeout: 3e3,
|
|
289
426
|
animate: "fadeIn",
|
|
290
427
|
toasts: [{ type: "string", title: "提示", msg: "图片上传错误,请重试" }]
|
|
291
|
-
}), A.value = !1,
|
|
428
|
+
}), A.value = !1, W = !0, c.emit("loadImageFailed"), M = null, z.value = "";
|
|
292
429
|
};
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
}).catch(
|
|
297
|
-
},
|
|
298
|
-
}
|
|
299
|
-
function
|
|
300
|
-
|
|
430
|
+
M = new Image(), M.onload = () => {
|
|
431
|
+
z.value = e, F = N(e), v.width = M == null ? void 0 : M.naturalWidth, v.height = M == null ? void 0 : M.naturalHeight, de().then(() => {
|
|
432
|
+
W = !1;
|
|
433
|
+
}).catch(i);
|
|
434
|
+
}, M.onerror = i, M.src = e;
|
|
435
|
+
}
|
|
436
|
+
function He(e, i) {
|
|
437
|
+
Se(i) ? (W = !1, ue(e)) : (y.show({
|
|
301
438
|
showCloseButton: !1,
|
|
302
439
|
timeout: 3e3,
|
|
303
440
|
animate: "fadeIn",
|
|
304
441
|
toasts: [{ type: "string", title: "提示", msg: "图片类型不正确,请重试" }]
|
|
305
|
-
}), A.value = !1,
|
|
306
|
-
}
|
|
307
|
-
function de(e) {
|
|
308
|
-
const l = new FileReader();
|
|
309
|
-
l.onload = (n) => pe(n.target.result, e.type), l.readAsDataURL(e);
|
|
442
|
+
}), A.value = !1, W = !0, c.emit("loadImageFailed"));
|
|
310
443
|
}
|
|
311
444
|
function ge(e) {
|
|
312
|
-
const
|
|
313
|
-
|
|
314
|
-
|
|
445
|
+
const i = new FileReader();
|
|
446
|
+
i.onload = (s) => He(s.target.result, e.type), i.readAsDataURL(e);
|
|
447
|
+
}
|
|
448
|
+
function me(e) {
|
|
449
|
+
const i = new Image();
|
|
450
|
+
i.onerror = () => {
|
|
451
|
+
y.show({
|
|
315
452
|
showCloseButton: !1,
|
|
316
453
|
timeout: 3e3,
|
|
317
454
|
animate: "fadeIn",
|
|
318
455
|
toasts: [{ type: "string", title: "提示", msg: "图片加载错误,请重试" }]
|
|
319
|
-
}), A.value = !1,
|
|
320
|
-
},
|
|
321
|
-
|
|
322
|
-
const
|
|
323
|
-
|
|
324
|
-
},
|
|
456
|
+
}), A.value = !1, W = !0, c.emit("loadImageFailed");
|
|
457
|
+
}, i.onload = () => {
|
|
458
|
+
W = !1;
|
|
459
|
+
const s = document.createElement("canvas"), w = s.getContext("2d");
|
|
460
|
+
s.width = i.width, s.height = i.height, w == null || w.drawImage(i, 0, 0), ue(s.toDataURL());
|
|
461
|
+
}, i.crossOrigin = "anonymous", i.src = e;
|
|
325
462
|
}
|
|
326
|
-
function
|
|
327
|
-
return
|
|
463
|
+
function Le() {
|
|
464
|
+
return L.value && L.value && L.value.offsetWidth > 0;
|
|
328
465
|
}
|
|
329
466
|
function se() {
|
|
330
|
-
if (
|
|
331
|
-
const e =
|
|
332
|
-
|
|
467
|
+
if (L.value) {
|
|
468
|
+
const e = L.value;
|
|
469
|
+
x.value.width = e.offsetWidth, x.value.height = e.offsetHeight, G.value = "calc(50% - " + x.value.width / 2 + "px)";
|
|
333
470
|
}
|
|
334
471
|
}
|
|
335
|
-
function
|
|
336
|
-
|
|
472
|
+
function Ee() {
|
|
473
|
+
S.value && x.value.width && (E = d.value > 0 ? Math.max(20, d.value / S.value.width * x.value.width) : 20);
|
|
337
474
|
}
|
|
338
|
-
function
|
|
339
|
-
b.value ?
|
|
475
|
+
function Ue() {
|
|
476
|
+
b.value ? U = Math.max(20, E / h.value) : k.value > 0 && S.value && x.value.height ? U = Math.max(20, k.value / S.value.height * x.value.height) : U = 20;
|
|
340
477
|
}
|
|
341
478
|
function oe() {
|
|
342
|
-
|
|
343
|
-
}
|
|
344
|
-
function
|
|
345
|
-
const e =
|
|
346
|
-
if (e &&
|
|
347
|
-
const
|
|
348
|
-
|
|
349
|
-
x1: Math.round(t.value.x1 *
|
|
350
|
-
y1: Math.round(t.value.y1 *
|
|
351
|
-
x2: Math.round(t.value.x2 *
|
|
352
|
-
y2: Math.round(t.value.y2 *
|
|
353
|
-
},
|
|
479
|
+
S.value ? (Ee(), Ue()) : (E = 20, U = 20);
|
|
480
|
+
}
|
|
481
|
+
function De() {
|
|
482
|
+
const e = L.value, i = o({ x1: 0, x2: 0, y1: 0, y2: 0 });
|
|
483
|
+
if (e && m.width && m.height) {
|
|
484
|
+
const s = m.width / e.offsetWidth;
|
|
485
|
+
i.value = {
|
|
486
|
+
x1: Math.round(t.value.x1 * s),
|
|
487
|
+
y1: Math.round(t.value.y1 * s),
|
|
488
|
+
x2: Math.round(t.value.x2 * s),
|
|
489
|
+
y2: Math.round(t.value.y2 * s)
|
|
490
|
+
}, C.value || (i.value.x1 = Math.max(i.value.x1, 0), i.value.y1 = Math.max(i.value.y1, 0), i.value.x2 = Math.min(i.value.x2, m.width), i.value.y2 = Math.min(i.value.y2, m.height));
|
|
354
491
|
}
|
|
355
|
-
return
|
|
356
|
-
}
|
|
357
|
-
function
|
|
358
|
-
|
|
359
|
-
const e =
|
|
360
|
-
if (e &&
|
|
361
|
-
const
|
|
362
|
-
let
|
|
363
|
-
|
|
364
|
-
x1: Math.round(t.value.x1 *
|
|
365
|
-
y1: Math.round(t.value.y1 *
|
|
366
|
-
x2: Math.round(t.value.x2 *
|
|
367
|
-
y2: Math.round(t.value.y2 *
|
|
368
|
-
},
|
|
492
|
+
return i.value;
|
|
493
|
+
}
|
|
494
|
+
function _e() {
|
|
495
|
+
g.value += F.rotate;
|
|
496
|
+
const e = L.value, i = o({ x1: 0, x2: 0, y1: 0, y2: 0 });
|
|
497
|
+
if (e && m.height && m.width && v.height && v.width) {
|
|
498
|
+
const s = m.width / e.offsetWidth;
|
|
499
|
+
let w, B;
|
|
500
|
+
g.value % 2 ? (w = (m.width - v.height) / 2, B = (m.height - v.width) / 2) : (w = (m.width - v.width) / 2, B = (m.height - v.height) / 2), i.value = {
|
|
501
|
+
x1: Math.round(t.value.x1 * s) - w,
|
|
502
|
+
y1: Math.round(t.value.y1 * s) - B,
|
|
503
|
+
x2: Math.round(t.value.x2 * s) - w,
|
|
504
|
+
y2: Math.round(t.value.y2 * s) - B
|
|
505
|
+
}, C.value || (i.value.x1 = Math.max(i.value.x1, 0), i.value.y1 = Math.max(i.value.y1, 0), i.value.x2 = Math.min(i.value.x2, m.width), i.value.y2 = Math.min(i.value.y2, m.height));
|
|
369
506
|
}
|
|
370
|
-
return
|
|
371
|
-
}
|
|
372
|
-
function
|
|
373
|
-
if (
|
|
374
|
-
if (!
|
|
375
|
-
return
|
|
376
|
-
} else if (
|
|
377
|
-
return
|
|
507
|
+
return i.value;
|
|
508
|
+
}
|
|
509
|
+
function $e(e, i) {
|
|
510
|
+
if (l.value > 0) {
|
|
511
|
+
if (!n.value || e > l.value)
|
|
512
|
+
return l.value / e;
|
|
513
|
+
} else if (R.value > 0 && (!n.value || i > R.value))
|
|
514
|
+
return R.value / i;
|
|
378
515
|
return 1;
|
|
379
516
|
}
|
|
380
|
-
function
|
|
381
|
-
return Math.min(1, Math.max(0,
|
|
517
|
+
function Re() {
|
|
518
|
+
return Math.min(1, Math.max(0, $.value / 100));
|
|
382
519
|
}
|
|
383
|
-
function
|
|
384
|
-
return e.toDataURL("image/" +
|
|
520
|
+
function Fe(e) {
|
|
521
|
+
return e.toDataURL("image/" + _.value, Re());
|
|
385
522
|
}
|
|
386
|
-
function
|
|
387
|
-
if (
|
|
388
|
-
const e =
|
|
389
|
-
|
|
390
|
-
const
|
|
391
|
-
if (
|
|
392
|
-
|
|
393
|
-
const
|
|
394
|
-
|
|
395
|
-
const
|
|
396
|
-
width:
|
|
397
|
-
height:
|
|
523
|
+
function Pe() {
|
|
524
|
+
if (L.value && L.value && S.value != null) {
|
|
525
|
+
const e = De(), i = e.x2 - e.x1, s = e.y2 - e.y1, w = document.createElement("canvas");
|
|
526
|
+
w.width = i, w.height = s;
|
|
527
|
+
const B = w.getContext("2d");
|
|
528
|
+
if (B) {
|
|
529
|
+
H.value != null && (B.fillStyle = H.value, B.fillRect(0, 0, i, s));
|
|
530
|
+
const K = (p.value.scale || 1) * (p.value.flipH ? -1 : 1), J = (p.value.scale || 1) * (p.value.flipV ? -1 : 1);
|
|
531
|
+
m.width && m.height && (B.setTransform(K, 0, 0, J, m.width / 2, m.height / 2), B.translate(-e.x1 / K, -e.y1 / J), B.rotate((p.value.rotate || 0) * Math.PI / 180), B.drawImage(S.value, -m.width / 2, -m.height / 2));
|
|
532
|
+
const V = {
|
|
533
|
+
width: i,
|
|
534
|
+
height: s,
|
|
398
535
|
imagePosition: e,
|
|
399
536
|
cropperPosition: { ...t.value }
|
|
400
537
|
};
|
|
401
|
-
|
|
402
|
-
const
|
|
403
|
-
return
|
|
538
|
+
C.value && (V.offsetImagePosition = _e());
|
|
539
|
+
const X = $e(i, s);
|
|
540
|
+
return X !== 1 && (V.width = Math.round(i * X), V.height = b.value ? Math.round(V.width / h.value) : Math.round(s * X), u(w, V.width, V.height)), V.base64 = Fe(w), c.emit("imageCropped", V), V;
|
|
404
541
|
}
|
|
405
542
|
}
|
|
406
543
|
return null;
|
|
407
544
|
}
|
|
408
|
-
function
|
|
409
|
-
D.value &&
|
|
545
|
+
function ae() {
|
|
546
|
+
D.value && Pe();
|
|
410
547
|
}
|
|
411
|
-
function
|
|
412
|
-
const e =
|
|
548
|
+
function ye() {
|
|
549
|
+
const e = L.value;
|
|
413
550
|
if (e) {
|
|
414
551
|
if (!b.value)
|
|
415
552
|
t.value.x1 = 0, t.value.x2 = e.offsetWidth, t.value.y1 = 0, t.value.y2 = e.offsetHeight;
|
|
416
|
-
else if (e.offsetWidth /
|
|
553
|
+
else if (e.offsetWidth / h.value < e.offsetHeight) {
|
|
417
554
|
t.value.x1 = 0, t.value.x2 = e.offsetWidth;
|
|
418
|
-
const
|
|
419
|
-
t.value.y1 = (e.offsetHeight -
|
|
555
|
+
const i = e.offsetWidth / h.value;
|
|
556
|
+
t.value.y1 = (e.offsetHeight - i) / 2, t.value.y2 = t.value.y1 + i;
|
|
420
557
|
} else {
|
|
421
558
|
t.value.y1 = 0, t.value.y2 = e.offsetHeight;
|
|
422
|
-
const
|
|
423
|
-
t.value.x1 = (e.offsetWidth -
|
|
559
|
+
const i = e.offsetHeight * h.value;
|
|
560
|
+
t.value.x1 = (e.offsetWidth - i) / 2, t.value.x2 = t.value.x1 + i;
|
|
424
561
|
}
|
|
425
|
-
|
|
562
|
+
ae(), T.value = !0;
|
|
426
563
|
}
|
|
427
564
|
}
|
|
428
|
-
function
|
|
429
|
-
|
|
565
|
+
function pe() {
|
|
566
|
+
q > 40 ? (y.show({
|
|
430
567
|
showCloseButton: !1,
|
|
431
568
|
timeout: 3e3,
|
|
432
569
|
animate: "fadeIn",
|
|
433
570
|
toasts: [{ type: "string", title: "提示", msg: "图片加载超时,请重试" }]
|
|
434
|
-
}),
|
|
571
|
+
}), W = !0, A.value = !1, c.emit("loadImageFailed")) : Le() ? (W = !1, se(), oe(), ye(), c.emit("cropperReady", { ...x.value })) : (q++, setTimeout(() => pe(), 50));
|
|
435
572
|
}
|
|
436
|
-
function
|
|
437
|
-
|
|
573
|
+
function Ve() {
|
|
574
|
+
S.value != null && (A.value = !1, c.emit("imageLoaded"), q = 0, setTimeout(() => pe()));
|
|
438
575
|
}
|
|
439
|
-
function
|
|
440
|
-
const e =
|
|
441
|
-
(
|
|
576
|
+
function je() {
|
|
577
|
+
const e = L.value;
|
|
578
|
+
(x.value.width !== (e == null ? void 0 : e.offsetWidth) || x.value.height !== (e == null ? void 0 : e.offsetHeight)) && x.value.width && x.value.height && e && (t.value.x1 = t.value.x1 * e.offsetWidth / x.value.width, t.value.x2 = t.value.x2 * e.offsetWidth / x.value.width, t.value.y1 = t.value.y1 * e.offsetHeight / x.value.height, t.value.y2 = t.value.y2 * e.offsetHeight / x.value.height);
|
|
442
579
|
}
|
|
443
|
-
const
|
|
444
|
-
|
|
580
|
+
const qe = () => {
|
|
581
|
+
je(), se(), oe();
|
|
445
582
|
}, xe = () => {
|
|
446
|
-
clearTimeout(
|
|
583
|
+
clearTimeout(I), I = setTimeout(qe, 300);
|
|
447
584
|
};
|
|
448
|
-
|
|
449
|
-
window.addEventListener("resize", xe),
|
|
450
|
-
}),
|
|
585
|
+
be(() => {
|
|
586
|
+
window.addEventListener("resize", xe), ne.value && (Y(), A.value = !0, me(ne.value));
|
|
587
|
+
}), et(() => {
|
|
451
588
|
window.removeEventListener("resize", xe);
|
|
452
589
|
});
|
|
453
|
-
function
|
|
454
|
-
|
|
590
|
+
function Ne() {
|
|
591
|
+
r.active && (r.active = !1, ae());
|
|
455
592
|
}
|
|
456
|
-
function
|
|
593
|
+
function re(e) {
|
|
457
594
|
return (e.touches && e.touches[0] ? e.touches[0].clientX : e.clientX) || 0;
|
|
458
595
|
}
|
|
459
|
-
function
|
|
596
|
+
function ve(e) {
|
|
460
597
|
return (e.touches && e.touches[0] ? e.touches[0].clientY : e.clientY) || 0;
|
|
461
598
|
}
|
|
462
|
-
function
|
|
463
|
-
|
|
599
|
+
function Oe(e, i, s = null) {
|
|
600
|
+
r && r.active || (e.preventDefault && e.preventDefault(), r = {
|
|
464
601
|
active: !0,
|
|
465
|
-
type:
|
|
466
|
-
position:
|
|
467
|
-
clientX:
|
|
468
|
-
clientY:
|
|
602
|
+
type: i,
|
|
603
|
+
position: s,
|
|
604
|
+
clientX: re(e),
|
|
605
|
+
clientY: ve(e),
|
|
469
606
|
...t.value
|
|
470
607
|
});
|
|
471
608
|
}
|
|
472
|
-
function
|
|
473
|
-
t.value.x1 < 0 && (t.value.x2 -= e ? t.value.x1 : 0, t.value.x1 = 0), t.value.y1 < 0 && (t.value.y2 -= e ? t.value.y1 : 0, t.value.y1 = 0), t.value.x2 >
|
|
609
|
+
function ce(e = !1) {
|
|
610
|
+
t.value.x1 < 0 && (t.value.x2 -= e ? t.value.x1 : 0, t.value.x1 = 0), t.value.y1 < 0 && (t.value.y2 -= e ? t.value.y1 : 0, t.value.y1 = 0), t.value.x2 > x.value.width && (t.value.x1 -= e ? t.value.x2 - x.value.width : 0, t.value.x2 = x.value.width), t.value.y2 > x.value.height && (t.value.y1 -= e ? t.value.y2 - x.value.height : 0, t.value.y2 = x.value.height);
|
|
474
611
|
}
|
|
475
|
-
function
|
|
476
|
-
const
|
|
477
|
-
t.value.x1 =
|
|
612
|
+
function Qe(e) {
|
|
613
|
+
const i = re(e) - r.clientX, s = ve(e) - r.clientY;
|
|
614
|
+
t.value.x1 = r.x1 + i, t.value.y1 = r.y1 + s, t.value.x2 = r.x2 + i, t.value.y2 = r.y2 + s;
|
|
478
615
|
}
|
|
479
|
-
const { checkAspectRatio:
|
|
480
|
-
function
|
|
481
|
-
const
|
|
482
|
-
switch (
|
|
616
|
+
const { checkAspectRatio: Ke } = Mt(t, x, h, r);
|
|
617
|
+
function Ge(e) {
|
|
618
|
+
const i = re(e) - r.clientX, s = ve(e) - r.clientY;
|
|
619
|
+
switch (r.position) {
|
|
483
620
|
case "left":
|
|
484
|
-
t.value.x1 = Math.min(
|
|
621
|
+
t.value.x1 = Math.min(r.x1 + i, t.value.x2 - E);
|
|
485
622
|
break;
|
|
486
623
|
case "topleft":
|
|
487
|
-
t.value.x1 = Math.min(
|
|
624
|
+
t.value.x1 = Math.min(r.x1 + i, t.value.x2 - E), t.value.y1 = Math.min(r.y1 + s, t.value.y2 - U);
|
|
488
625
|
break;
|
|
489
626
|
case "top":
|
|
490
|
-
t.value.y1 = Math.min(
|
|
627
|
+
t.value.y1 = Math.min(r.y1 + s, t.value.y2 - U);
|
|
491
628
|
break;
|
|
492
629
|
case "topright":
|
|
493
|
-
t.value.x2 = Math.max(
|
|
630
|
+
t.value.x2 = Math.max(r.x2 + i, t.value.x1 + E), t.value.y1 = Math.min(r.y1 + s, t.value.y2 - U);
|
|
494
631
|
break;
|
|
495
632
|
case "right":
|
|
496
|
-
t.value.x2 = Math.max(
|
|
633
|
+
t.value.x2 = Math.max(r.x2 + i, t.value.x1 + E);
|
|
497
634
|
break;
|
|
498
635
|
case "bottomright":
|
|
499
|
-
t.value.x2 = Math.max(
|
|
636
|
+
t.value.x2 = Math.max(r.x2 + i, t.value.x1 + E), t.value.y2 = Math.max(r.y2 + s, t.value.y1 + U);
|
|
500
637
|
break;
|
|
501
638
|
case "bottom":
|
|
502
|
-
t.value.y2 = Math.max(
|
|
639
|
+
t.value.y2 = Math.max(r.y2 + s, t.value.y1 + U);
|
|
503
640
|
break;
|
|
504
641
|
case "bottomleft":
|
|
505
|
-
t.value.x1 = Math.min(
|
|
642
|
+
t.value.x1 = Math.min(r.x1 + i, t.value.x2 - E), t.value.y2 = Math.max(r.y2 + s, t.value.y1 + U);
|
|
506
643
|
break;
|
|
507
644
|
case "center":
|
|
508
|
-
const { scale:
|
|
509
|
-
t.value.x1 = Math.min(
|
|
645
|
+
const { scale: w } = e, B = Math.abs(r.x2 - r.x1) * w, K = Math.abs(r.y2 - r.y1) * w, { x1: J } = t.value, { y1: V } = t.value;
|
|
646
|
+
t.value.x1 = Math.min(r.clientX - B / 2, t.value.x2 - E), t.value.y1 = Math.min(r.clientY - K / 2, t.value.y2 - U), t.value.x2 = Math.max(r.clientX + B / 2, J + E), t.value.y2 = Math.max(r.clientY + K / 2, V + U);
|
|
510
647
|
break;
|
|
511
648
|
}
|
|
512
|
-
b.value &&
|
|
649
|
+
b.value && Ke();
|
|
513
650
|
}
|
|
514
|
-
function
|
|
515
|
-
|
|
516
|
-
|
|
651
|
+
function Je(e) {
|
|
652
|
+
r && r.active && (e.stopPropagation && e.stopPropagation(), e.preventDefault && e.preventDefault(), clearTimeout(Q), Q = setTimeout(() => {
|
|
653
|
+
r.type === ie.Move ? (Qe(e), ce(!0)) : r.type === ie.Resize && (Ge(e), ce(!1));
|
|
517
654
|
}, 300));
|
|
518
655
|
}
|
|
519
|
-
return
|
|
520
|
-
|
|
521
|
-
}),
|
|
522
|
-
e ? (
|
|
656
|
+
return ee(fe, (e) => {
|
|
657
|
+
Y(), e && e.target && e.target.files && e.target.files.length > 0 && (A.value = !0, ge(e.target.files[0]));
|
|
658
|
+
}), ee(ne, (e) => {
|
|
659
|
+
e ? (Y(), A.value = !0, me(e)) : (y.show({
|
|
523
660
|
showCloseButton: !1,
|
|
524
661
|
timeout: 3e3,
|
|
525
662
|
animate: "fadeIn",
|
|
526
663
|
toasts: [{ type: "string", title: "提示", msg: "图片路径为空" }]
|
|
527
|
-
}), A.value = !1,
|
|
528
|
-
}),
|
|
529
|
-
|
|
530
|
-
}),
|
|
531
|
-
|
|
532
|
-
}),
|
|
664
|
+
}), A.value = !1, W = !0);
|
|
665
|
+
}), ee(Ae, (e) => {
|
|
666
|
+
Y(), A.value = !0, ue(e);
|
|
667
|
+
}), ee(Te, (e) => {
|
|
668
|
+
Y(), e && (A.value = !0, ge(e));
|
|
669
|
+
}), ee(
|
|
533
670
|
() => [
|
|
534
671
|
a.containWithinAspectRatio,
|
|
535
672
|
a.canvasRotation,
|
|
@@ -538,141 +675,258 @@ function at(a, M) {
|
|
|
538
675
|
a.transform,
|
|
539
676
|
a.imageChangedEvent
|
|
540
677
|
],
|
|
541
|
-
([e,
|
|
542
|
-
|
|
678
|
+
([e, i, s, w, B, K], [J, V, X, Ze, Ye, Xe]) => {
|
|
679
|
+
M && M.complete && F && (e !== J || i !== V) && de(), s !== X && (se(), oe(), ce(!1), ae()), w !== Ze && T.value && ye(), B !== Ye && (ze(), ae()), K !== Xe && (fe.value = K);
|
|
543
680
|
}
|
|
544
681
|
), {
|
|
545
|
-
uploadError:
|
|
682
|
+
uploadError: W,
|
|
546
683
|
imageVisible: T,
|
|
547
|
-
backgroundColor:
|
|
548
|
-
sourceImage:
|
|
549
|
-
safeImgDataUrl:
|
|
550
|
-
safeTransformStyle:
|
|
551
|
-
maxSize:
|
|
684
|
+
backgroundColor: H,
|
|
685
|
+
sourceImage: L,
|
|
686
|
+
safeImgDataUrl: j,
|
|
687
|
+
safeTransformStyle: O,
|
|
688
|
+
maxSize: x,
|
|
552
689
|
cropper: t,
|
|
553
|
-
marginLeft:
|
|
554
|
-
moveTypes:
|
|
690
|
+
marginLeft: G,
|
|
691
|
+
moveTypes: le,
|
|
555
692
|
isLoading: A,
|
|
556
|
-
startMove:
|
|
557
|
-
imageLoadedInView:
|
|
558
|
-
moveStop:
|
|
559
|
-
moveImg:
|
|
693
|
+
startMove: Oe,
|
|
694
|
+
imageLoadedInView: Ve,
|
|
695
|
+
moveStop: Ne,
|
|
696
|
+
moveImg: Je
|
|
560
697
|
};
|
|
561
698
|
}
|
|
562
|
-
const
|
|
699
|
+
const Z = /* @__PURE__ */ we({
|
|
563
700
|
name: "FImageCropper",
|
|
564
|
-
props:
|
|
701
|
+
props: he,
|
|
565
702
|
emits: ["imageCropped", "imageLoaded", "cropperReady", "loadImageFailed"],
|
|
566
|
-
setup(a,
|
|
567
|
-
const
|
|
703
|
+
setup(a, c) {
|
|
704
|
+
const u = o(a.alignImage), N = o(a.roundCropper), y = o(a.hideResizeSquares), t = o(a.loadImageErrorText), p = o(a.disabled), d = o(null), {
|
|
568
705
|
uploadError: b,
|
|
569
|
-
imageVisible:
|
|
706
|
+
imageVisible: h,
|
|
570
707
|
backgroundColor: D,
|
|
571
|
-
sourceImage:
|
|
572
|
-
safeImgDataUrl:
|
|
573
|
-
safeTransformStyle:
|
|
574
|
-
maxSize:
|
|
575
|
-
cropper:
|
|
576
|
-
marginLeft:
|
|
577
|
-
moveTypes:
|
|
578
|
-
isLoading:
|
|
579
|
-
startMove:
|
|
580
|
-
imageLoadedInView:
|
|
708
|
+
sourceImage: H,
|
|
709
|
+
safeImgDataUrl: l,
|
|
710
|
+
safeTransformStyle: n,
|
|
711
|
+
maxSize: C,
|
|
712
|
+
cropper: g,
|
|
713
|
+
marginLeft: _,
|
|
714
|
+
moveTypes: $,
|
|
715
|
+
isLoading: R,
|
|
716
|
+
startMove: k,
|
|
717
|
+
imageLoadedInView: j,
|
|
581
718
|
moveStop: A,
|
|
582
719
|
moveImg: T
|
|
583
|
-
} =
|
|
584
|
-
function
|
|
585
|
-
return
|
|
586
|
-
class: `farris-image-cropper-resize-bar ${
|
|
587
|
-
onMousedown:
|
|
720
|
+
} = Ce(a, c);
|
|
721
|
+
function v(I) {
|
|
722
|
+
return f("span", {
|
|
723
|
+
class: `farris-image-cropper-resize-bar ${I}`,
|
|
724
|
+
onMousedown: P((M) => k(M, $.Resize, I), ["prevent"])
|
|
588
725
|
}, null);
|
|
589
726
|
}
|
|
590
|
-
function
|
|
591
|
-
return
|
|
592
|
-
class: `farris-image-cropper-resize-bar ${
|
|
593
|
-
onMousedown:
|
|
594
|
-
}, [
|
|
727
|
+
function m(I) {
|
|
728
|
+
return f("div", null, [f("span", {
|
|
729
|
+
class: `farris-image-cropper-resize-bar ${I}`,
|
|
730
|
+
onMousedown: P((M) => k(M, $.Resize, I), ["prevent"])
|
|
731
|
+
}, [f("span", {
|
|
595
732
|
class: "farris-image-cropper-square"
|
|
596
|
-
}, null)]),
|
|
733
|
+
}, null)]), f("span", {
|
|
597
734
|
class: "farris-image-cropper-resize top"
|
|
598
|
-
}, [
|
|
735
|
+
}, [f("span", {
|
|
599
736
|
class: "farris-image-cropper-square"
|
|
600
737
|
}, null)])]);
|
|
601
738
|
}
|
|
602
|
-
const
|
|
603
|
-
return () =>
|
|
739
|
+
const q = ["top", "right", "bottom", "left"].map((I) => v(I)), Q = ["topleft", "topright", "bottomright", "bottomleft"].map((I) => m(I));
|
|
740
|
+
return () => f("div", {
|
|
604
741
|
class: ["farris-image-cropper-frame", {
|
|
605
|
-
"farris-image-cropper-disabled":
|
|
742
|
+
"farris-image-cropper-disabled": p.value
|
|
606
743
|
}],
|
|
607
744
|
style: {
|
|
608
|
-
"text-align":
|
|
745
|
+
"text-align": u.value
|
|
609
746
|
},
|
|
610
|
-
onMousemove:
|
|
611
|
-
onTouchmove:
|
|
612
|
-
onMouseup:
|
|
613
|
-
onTouchend:
|
|
614
|
-
}, [!b &&
|
|
747
|
+
onMousemove: P((I) => T(I), ["prevent"]),
|
|
748
|
+
onTouchmove: P((I) => T(I), ["prevent"]),
|
|
749
|
+
onMouseup: P(() => A(), ["prevent"]),
|
|
750
|
+
onTouchend: P(() => A(), ["prevent"])
|
|
751
|
+
}, [!b && f("div", {
|
|
752
|
+
ref: d,
|
|
753
|
+
class: "farris-image-cropper",
|
|
754
|
+
style: [{
|
|
755
|
+
background: h.value ? D.value : ""
|
|
756
|
+
}]
|
|
757
|
+
}, [l.value && f("img", {
|
|
758
|
+
title: "farris-source-image",
|
|
759
|
+
ref: H,
|
|
760
|
+
class: "farris-source-image",
|
|
761
|
+
style: [{
|
|
762
|
+
visibility: h.value ? "visible" : "hidden"
|
|
763
|
+
}, {
|
|
764
|
+
transform: n.value
|
|
765
|
+
}],
|
|
766
|
+
src: l.value,
|
|
767
|
+
onLoad: () => j()
|
|
768
|
+
}, null), C.value && f("div", {
|
|
769
|
+
class: "farris-image-overlay",
|
|
770
|
+
style: [{
|
|
771
|
+
width: `${C.value.width || 0}px`
|
|
772
|
+
}, {
|
|
773
|
+
height: `${C.value.height || 0}px`
|
|
774
|
+
}, {
|
|
775
|
+
"margin-left": u.value === "center" ? _.value : ""
|
|
776
|
+
}]
|
|
777
|
+
}, null), h.value && f("div", {
|
|
778
|
+
class: ["farris-image-cropper-wrapper", {
|
|
779
|
+
"farris-image-cropper-rounded": N.value
|
|
780
|
+
}],
|
|
781
|
+
style: [{
|
|
782
|
+
top: `${g.value.y1}px`
|
|
783
|
+
}, {
|
|
784
|
+
left: `${g.value.x1}px`
|
|
785
|
+
}, {
|
|
786
|
+
width: `${g.value.x2 - g.value.x1}px`
|
|
787
|
+
}, {
|
|
788
|
+
height: `${g.value.y2 - g.value.y1}px`
|
|
789
|
+
}, {
|
|
790
|
+
visibility: h.value ? "visible" : "hidden"
|
|
791
|
+
}, {
|
|
792
|
+
"margin-left": u.value === "center" ? _.value : ""
|
|
793
|
+
}],
|
|
794
|
+
tabindex: "0"
|
|
795
|
+
}, [f("div", {
|
|
796
|
+
class: "farris-image-cropper-move",
|
|
797
|
+
onMousedown: P((I) => k(I, $.Move, "topleft"), ["prevent"])
|
|
798
|
+
}, null), !y.value && f("div", null, [Q, q])])]), R.value && f("div", {
|
|
799
|
+
class: "farris-image-cropper-loading"
|
|
800
|
+
}, [f("div", {
|
|
801
|
+
class: "farris-image-cropper-loading-spinner"
|
|
802
|
+
}, null)]), b && f("div", {
|
|
803
|
+
class: "farris-image-cropper-error"
|
|
804
|
+
}, [t.value])]);
|
|
805
|
+
}
|
|
806
|
+
}), bt = /* @__PURE__ */ we({
|
|
807
|
+
name: "FImageCropperDesign",
|
|
808
|
+
props: he,
|
|
809
|
+
emits: ["imageCropped", "imageLoaded", "cropperReady", "loadImageFailed"],
|
|
810
|
+
setup(a, c) {
|
|
811
|
+
const u = o(a.alignImage), N = o(a.roundCropper), y = o(a.hideResizeSquares), t = o(a.loadImageErrorText), p = o(a.disabled), d = o(null), {
|
|
812
|
+
uploadError: b,
|
|
813
|
+
imageVisible: h,
|
|
814
|
+
backgroundColor: D,
|
|
815
|
+
sourceImage: H,
|
|
816
|
+
safeImgDataUrl: l,
|
|
817
|
+
safeTransformStyle: n,
|
|
818
|
+
maxSize: C,
|
|
819
|
+
cropper: g,
|
|
820
|
+
marginLeft: _,
|
|
821
|
+
moveTypes: $,
|
|
822
|
+
isLoading: R,
|
|
823
|
+
startMove: k,
|
|
824
|
+
imageLoadedInView: j,
|
|
825
|
+
moveStop: A,
|
|
826
|
+
moveImg: T
|
|
827
|
+
} = Ce(a, c), v = o(), m = Me("design-item-context"), q = it(v, m);
|
|
828
|
+
be(() => {
|
|
829
|
+
v.value.componentInstance = q;
|
|
830
|
+
}), c.expose(q.value);
|
|
831
|
+
function Q(z) {
|
|
832
|
+
return f("span", {
|
|
833
|
+
class: `farris-image-cropper-resize-bar ${z}`,
|
|
834
|
+
onMousedown: P((O) => k(O, $.Resize, z), ["prevent"])
|
|
835
|
+
}, null);
|
|
836
|
+
}
|
|
837
|
+
function I(z) {
|
|
838
|
+
return f("div", null, [f("span", {
|
|
839
|
+
class: `farris-image-cropper-resize-bar ${z}`,
|
|
840
|
+
onMousedown: P((O) => k(O, $.Resize, z), ["prevent"])
|
|
841
|
+
}, [f("span", {
|
|
842
|
+
class: "farris-image-cropper-square"
|
|
843
|
+
}, null)]), f("span", {
|
|
844
|
+
class: "farris-image-cropper-resize top"
|
|
845
|
+
}, [f("span", {
|
|
846
|
+
class: "farris-image-cropper-square"
|
|
847
|
+
}, null)])]);
|
|
848
|
+
}
|
|
849
|
+
const M = ["top", "right", "bottom", "left"].map((z) => Q(z)), L = ["topleft", "topright", "bottomright", "bottomleft"].map((z) => I(z));
|
|
850
|
+
return () => f("div", {
|
|
615
851
|
ref: v,
|
|
852
|
+
class: ["farris-image-cropper-frame", {
|
|
853
|
+
"farris-image-cropper-disabled": p.value
|
|
854
|
+
}],
|
|
855
|
+
style: {
|
|
856
|
+
"text-align": u.value
|
|
857
|
+
},
|
|
858
|
+
onMousemove: P((z) => T(z), ["prevent"]),
|
|
859
|
+
onTouchmove: P((z) => T(z), ["prevent"]),
|
|
860
|
+
onMouseup: P(() => A(), ["prevent"]),
|
|
861
|
+
onTouchend: P(() => A(), ["prevent"])
|
|
862
|
+
}, [!b && f("div", {
|
|
863
|
+
ref: d,
|
|
616
864
|
class: "farris-image-cropper",
|
|
617
865
|
style: [{
|
|
618
|
-
background:
|
|
866
|
+
background: h.value ? D.value : ""
|
|
619
867
|
}]
|
|
620
|
-
}, [
|
|
868
|
+
}, [l.value && f("img", {
|
|
621
869
|
title: "farris-source-image",
|
|
622
|
-
ref:
|
|
870
|
+
ref: H,
|
|
623
871
|
class: "farris-source-image",
|
|
624
872
|
style: [{
|
|
625
|
-
visibility:
|
|
873
|
+
visibility: h.value ? "visible" : "hidden"
|
|
626
874
|
}, {
|
|
627
|
-
transform:
|
|
875
|
+
transform: n.value
|
|
628
876
|
}],
|
|
629
|
-
src:
|
|
630
|
-
onLoad: () =>
|
|
631
|
-
}, null),
|
|
877
|
+
src: l.value,
|
|
878
|
+
onLoad: () => j()
|
|
879
|
+
}, null), C.value && f("div", {
|
|
632
880
|
class: "farris-image-overlay",
|
|
633
881
|
style: [{
|
|
634
|
-
width: `${
|
|
882
|
+
width: `${C.value.width || 0}px`
|
|
635
883
|
}, {
|
|
636
|
-
height: `${
|
|
884
|
+
height: `${C.value.height || 0}px`
|
|
637
885
|
}, {
|
|
638
|
-
"margin-left":
|
|
886
|
+
"margin-left": u.value === "center" ? _.value : ""
|
|
639
887
|
}]
|
|
640
|
-
}, null),
|
|
888
|
+
}, null), h.value && f("div", {
|
|
641
889
|
class: ["farris-image-cropper-wrapper", {
|
|
642
|
-
"farris-image-cropper-rounded":
|
|
890
|
+
"farris-image-cropper-rounded": N.value
|
|
643
891
|
}],
|
|
644
892
|
style: [{
|
|
645
|
-
top: `${
|
|
893
|
+
top: `${g.value.y1}px`
|
|
646
894
|
}, {
|
|
647
|
-
left: `${
|
|
895
|
+
left: `${g.value.x1}px`
|
|
648
896
|
}, {
|
|
649
|
-
width: `${
|
|
897
|
+
width: `${g.value.x2 - g.value.x1}px`
|
|
650
898
|
}, {
|
|
651
|
-
height: `${
|
|
899
|
+
height: `${g.value.y2 - g.value.y1}px`
|
|
652
900
|
}, {
|
|
653
|
-
visibility:
|
|
901
|
+
visibility: h.value ? "visible" : "hidden"
|
|
654
902
|
}, {
|
|
655
|
-
"margin-left":
|
|
903
|
+
"margin-left": u.value === "center" ? _.value : ""
|
|
656
904
|
}],
|
|
657
905
|
tabindex: "0"
|
|
658
|
-
}, [
|
|
906
|
+
}, [f("div", {
|
|
659
907
|
class: "farris-image-cropper-move",
|
|
660
|
-
onMousedown:
|
|
661
|
-
}, null), !
|
|
908
|
+
onMousedown: P((z) => k(z, $.Move, "topleft"), ["prevent"])
|
|
909
|
+
}, null), !y.value && f("div", null, [L, M])])]), R.value && f("div", {
|
|
662
910
|
class: "farris-image-cropper-loading"
|
|
663
|
-
}, [
|
|
911
|
+
}, [f("div", {
|
|
664
912
|
class: "farris-image-cropper-loading-spinner"
|
|
665
|
-
}, null)]), b &&
|
|
913
|
+
}, null)]), b && f("div", {
|
|
666
914
|
class: "farris-image-cropper-error"
|
|
667
915
|
}, [t.value])]);
|
|
668
916
|
}
|
|
669
917
|
});
|
|
670
|
-
|
|
671
|
-
a.component(
|
|
918
|
+
Z.install = (a) => {
|
|
919
|
+
a.component(Z.name, Z);
|
|
920
|
+
};
|
|
921
|
+
Z.register = (a, c, u, N) => {
|
|
922
|
+
a["image-cropper"] = Z, c["image-cropper"] = Ie;
|
|
923
|
+
};
|
|
924
|
+
Z.registerDesigner = (a, c, u) => {
|
|
925
|
+
a["image-cropper"] = bt, c["image-cropper"] = Ie;
|
|
672
926
|
};
|
|
673
|
-
const ut = Ye(le);
|
|
674
927
|
export {
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
928
|
+
Z as ImageCropper,
|
|
929
|
+
Z as default,
|
|
930
|
+
he as imageCropperProps,
|
|
931
|
+
Ie as propsResolver
|
|
678
932
|
};
|