@farris/ui-vue 1.7.0-beta.4 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +61 -312
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +56 -1481
- package/components/avatar/index.umd.cjs +1 -1
- package/components/binding-selector/index.esm.js +8 -752
- package/components/binding-selector/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +358 -351
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/button-group/index.esm.js +110 -266
- package/components/button-group/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +1371 -1284
- package/components/calendar/index.umd.cjs +30 -30
- package/components/code-editor/index.esm.js +169 -237
- package/components/code-editor/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +382 -351
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/color-picker/index.esm.js +502 -812
- package/components/color-picker/index.umd.cjs +1 -1
- package/components/combo-list/index.esm.js +197 -183
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +199 -364
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +1501 -1465
- package/components/comment/index.umd.cjs +6 -6
- package/components/common/index.esm.js +136 -100
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.css +1 -1
- package/components/component/index.esm.js +2662 -3647
- package/components/component/index.umd.cjs +1 -8
- package/components/condition/index.esm.js +492 -2449
- package/components/condition/index.umd.cjs +1 -8
- package/components/content-container/index.esm.js +252 -241
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +505 -409
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3326 -3258
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +1709 -1634
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +2693 -3021
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +102 -98
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +409 -358
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dropdown/index.esm.js +124 -373
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +760 -573
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +354 -327
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/dynamic-view/index.esm.js +413 -359
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +1 -1
- package/components/event-parameter/index.umd.cjs +1 -1
- package/components/events-editor/index.css +1 -1
- package/components/events-editor/index.esm.js +1535 -1941
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.css +1 -1
- package/components/expression-editor/index.esm.js +2 -7317
- package/components/expression-editor/index.umd.cjs +1 -427
- package/components/field-selector/index.esm.js +13 -13
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/fieldset/index.esm.js +140 -123
- package/components/fieldset/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +1021 -1012
- package/components/filter-bar/index.umd.cjs +2 -2
- package/components/filter-condition-editor/index.css +1 -1
- package/components/filter-condition-editor/index.esm.js +448 -9000
- package/components/filter-condition-editor/index.umd.cjs +1 -427
- package/components/html-template/index.esm.js +167 -147
- package/components/html-template/index.umd.cjs +1 -1
- package/components/image/index.esm.js +372 -352
- package/components/image/index.umd.cjs +2 -2
- package/components/image-cropper/index.esm.js +361 -615
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/json-editor/index.esm.js +247 -325
- package/components/json-editor/index.umd.cjs +1 -1
- package/components/language-textbox/index.esm.js +835 -421
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/layout/index.esm.js +163 -549
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +39 -836
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +690 -474
- package/components/list-view/index.umd.cjs +6 -8
- package/components/loading/index.esm.js +128 -97
- package/components/loading/index.umd.cjs +2 -2
- package/components/locale/index.esm.js +361 -340
- package/components/locale/index.umd.cjs +5 -5
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +3396 -3368
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +1684 -1584
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/menu-lookup/index.esm.js +586 -609
- package/components/menu-lookup/index.umd.cjs +6 -6
- package/components/message-box/index.css +1 -1
- package/components/message-box/index.esm.js +357 -353
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +325 -318
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +31 -311
- package/components/nav/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +189 -1633
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +195 -175
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +761 -1057
- package/components/order/index.umd.cjs +7 -9
- package/components/page-footer/index.esm.js +48 -331
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +92 -73
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +195 -472
- package/components/pagination/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +77 -76
- package/components/popover/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +148 -353
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +74 -68
- package/components/property-editor/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +872 -1800
- package/components/property-panel/index.umd.cjs +5 -12
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +4223 -6205
- package/components/query-solution/index.umd.cjs +6 -13
- package/components/response-layout/index.esm.js +206 -170
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +1 -1
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +378 -359
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +2491 -2653
- package/components/schema-selector/index.umd.cjs +8 -10
- package/components/search-box/index.esm.js +79 -240
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +304 -289
- package/components/section/index.umd.cjs +2 -2
- package/components/smoke-detector/index.esm.js +8 -179
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/sort-condition-editor/index.esm.js +4 -9421
- package/components/sort-condition-editor/index.umd.cjs +1 -427
- package/components/splitter/index.esm.js +142 -1171
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +48 -47
- package/components/step/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +460 -513
- package/components/tabs/index.umd.cjs +1 -1
- package/components/text/index.esm.js +73 -217
- package/components/text/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +380 -375
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/tooltip/index.esm.js +40 -40
- package/components/tooltip/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +551 -771
- package/components/transfer/index.umd.cjs +6 -8
- package/components/tree-grid/index.esm.js +250 -235
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +157 -314
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +634 -1125
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +106 -359
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +89 -222
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +199 -290
- package/components/weather/index.umd.cjs +1 -1
- package/designer/accordion/index.esm.js +257 -0
- package/designer/accordion/index.umd.cjs +1 -0
- package/designer/avatar/index.esm.js +227 -0
- package/designer/avatar/index.umd.cjs +1 -0
- package/designer/binding-selector/index.esm.js +792 -0
- package/designer/binding-selector/index.umd.cjs +1 -0
- package/designer/button-edit/index.esm.js +210 -203
- package/designer/button-edit/index.umd.cjs +1 -1
- package/designer/button-group/index.esm.js +282 -0
- package/designer/button-group/index.umd.cjs +1 -0
- package/designer/checkbox/index.esm.js +51 -45
- package/designer/checkbox/index.umd.cjs +1 -1
- package/designer/checkbox-group/index.esm.js +89 -83
- package/designer/checkbox-group/index.umd.cjs +1 -1
- package/designer/code-editor/index.esm.js +75 -0
- package/designer/code-editor/index.umd.cjs +1 -0
- package/designer/color-picker/index.esm.js +1096 -0
- package/designer/color-picker/index.umd.cjs +1 -0
- package/designer/combo-list/index.esm.js +1095 -0
- package/designer/combo-list/index.umd.cjs +1 -0
- package/designer/combo-tree/index.esm.js +186 -0
- package/designer/combo-tree/index.umd.cjs +1 -0
- package/designer/component/index.css +1 -0
- package/designer/component/index.esm.js +5002 -0
- package/designer/component/index.umd.cjs +1 -0
- package/designer/condition/index.esm.js +1899 -0
- package/designer/condition/index.umd.cjs +1 -0
- package/designer/data-grid/index.esm.js +5580 -6213
- package/designer/data-grid/index.umd.cjs +10 -17
- package/designer/data-view/index.esm.js +212 -191
- package/designer/data-view/index.umd.cjs +2 -2
- package/designer/date-picker/index.esm.js +621 -607
- package/designer/date-picker/index.umd.cjs +1 -1
- package/designer/drawer/index.css +1 -1
- package/designer/drawer/index.esm.js +869 -620
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dropdown/index.esm.js +261 -0
- package/designer/dropdown/index.umd.cjs +1 -0
- package/designer/dynamic-form/index.esm.js +1166 -1384
- package/designer/dynamic-form/index.umd.cjs +1 -8
- package/designer/expression-editor/index.css +1 -0
- package/designer/expression-editor/index.esm.js +7006 -0
- package/designer/expression-editor/index.umd.cjs +427 -0
- package/designer/farris-designer.all.esm.js +10309 -10617
- package/designer/farris-designer.all.umd.cjs +17 -19
- package/designer/filter-condition-editor/index.css +1 -0
- package/designer/filter-condition-editor/index.esm.js +4795 -0
- package/designer/filter-condition-editor/index.umd.cjs +1 -0
- package/designer/html-template/index.esm.js +718 -0
- package/designer/html-template/index.umd.cjs +1 -0
- package/designer/image-cropper/index.esm.js +765 -0
- package/designer/image-cropper/index.umd.cjs +1 -0
- package/designer/index.css +1 -1
- package/designer/input-group/index.esm.js +72 -66
- package/designer/input-group/index.umd.cjs +1 -1
- package/designer/json-editor/index.esm.js +83 -0
- package/designer/json-editor/index.umd.cjs +1 -0
- package/designer/language-textbox/index.esm.js +783 -0
- package/designer/language-textbox/index.umd.cjs +8 -0
- package/designer/layout/index.esm.js +430 -0
- package/designer/layout/index.umd.cjs +1 -0
- package/designer/list-nav/index.esm.js +802 -0
- package/designer/list-nav/index.umd.cjs +1 -0
- package/designer/list-view/index.esm.js +864 -844
- package/designer/list-view/index.umd.cjs +7 -9
- package/designer/lookup/index.esm.js +2083 -0
- package/designer/lookup/index.umd.cjs +1 -0
- package/designer/menu-lookup/index.esm.js +46 -0
- package/designer/menu-lookup/index.umd.cjs +1 -0
- package/designer/modal/index.esm.js +137 -29
- package/designer/modal/index.umd.cjs +1 -1
- package/designer/nav/index.esm.js +284 -0
- package/designer/nav/index.umd.cjs +1 -0
- package/designer/number-range/index.esm.js +1616 -0
- package/designer/number-range/index.umd.cjs +1 -0
- package/designer/number-spinner/index.esm.js +19 -17
- package/designer/number-spinner/index.umd.cjs +1 -1
- package/designer/order/index.css +1 -0
- package/designer/order/index.esm.js +2196 -0
- package/designer/order/index.umd.cjs +18 -0
- package/designer/page-footer/index.esm.js +290 -0
- package/designer/page-footer/index.umd.cjs +1 -0
- package/designer/page-header/index.esm.js +1003 -0
- package/designer/page-header/index.umd.cjs +1 -0
- package/designer/pagination/index.esm.js +591 -0
- package/designer/pagination/index.umd.cjs +1 -0
- package/designer/progress/index.esm.js +213 -0
- package/designer/progress/index.umd.cjs +1 -0
- package/designer/radio-group/index.esm.js +978 -949
- package/designer/radio-group/index.umd.cjs +1 -1
- package/designer/response-layout-editor/index.esm.js +1 -1
- package/designer/response-layout-editor/index.umd.cjs +1 -1
- package/designer/response-toolbar/index.esm.js +1471 -1416
- package/designer/response-toolbar/index.umd.cjs +1 -1
- package/designer/search-box/index.esm.js +245 -0
- package/designer/search-box/index.umd.cjs +1 -0
- package/designer/section/index.esm.js +83 -78
- package/designer/section/index.umd.cjs +1 -1
- package/designer/smoke-detector/index.css +1 -0
- package/designer/smoke-detector/index.esm.js +178 -0
- package/designer/smoke-detector/index.umd.cjs +1 -0
- package/designer/sort-condition-editor/index.esm.js +138 -0
- package/designer/sort-condition-editor/index.umd.cjs +1 -0
- package/designer/splitter/index.esm.js +1120 -0
- package/designer/splitter/index.umd.cjs +1 -0
- package/designer/step/index.esm.js +226 -0
- package/designer/step/index.umd.cjs +1 -0
- package/designer/switch/index.esm.js +10 -10
- package/designer/switch/index.umd.cjs +1 -1
- package/designer/tabs/index.css +1 -1
- package/designer/tabs/index.esm.js +2447 -2698
- package/designer/tabs/index.umd.cjs +2 -2
- package/designer/text/index.esm.js +147 -0
- package/designer/text/index.umd.cjs +1 -0
- package/designer/time-picker/index.esm.js +101 -100
- package/designer/time-picker/index.umd.cjs +1 -1
- package/designer/transfer/index.esm.js +254 -0
- package/designer/transfer/index.umd.cjs +1 -0
- package/designer/tree-grid/index.esm.js +473 -810
- package/designer/tree-grid/index.umd.cjs +1 -1
- package/designer/tree-view/index.esm.js +313 -0
- package/designer/tree-view/index.umd.cjs +1 -0
- package/designer/uploader/index.esm.js +1190 -0
- package/designer/uploader/index.umd.cjs +2 -0
- package/designer/verify-detail/index.esm.js +258 -0
- package/designer/verify-detail/index.umd.cjs +1 -0
- package/designer/video/index.esm.js +136 -0
- package/designer/video/index.umd.cjs +1 -0
- package/designer/weather/index.css +1 -0
- package/designer/weather/index.esm.js +6244 -0
- package/designer/weather/index.umd.cjs +14 -0
- package/farris.all.esm.js +69941 -70514
- package/farris.all.umd.cjs +117 -117
- package/index.css +1 -1
- package/locales/filter-bar/ui/en.json +2 -1
- package/locales/filter-bar/ui/zh-CHS.json +2 -1
- package/locales/filter-bar/ui/zh-CHT.json +2 -1
- package/locales/query-solution/ui/en.json +1 -1
- package/locales/query-solution/ui/zh-CHS.json +1 -1
- package/locales/query-solution/ui/zh-CHT.json +1 -1
- package/locales/ui/en.json +3 -2
- package/locales/ui/zh-CHS.json +3 -2
- package/locales/ui/zh-CHT.json +3 -2
- package/package.json +1 -1
- package/types/accordion/designer.d.ts +44 -0
- package/types/accordion/src/accordion.props.d.ts +0 -1
- package/types/accordion/src/components/accordion-item.props.d.ts +0 -1
- package/types/avatar/designer.d.ts +29 -0
- package/types/avatar/src/avatar.props.d.ts +0 -1
- package/types/avatar/src/property-config/avatar.property-config.d.ts +1 -1
- package/types/{expression-editor/index.d.ts → binding-selector/designer.d.ts} +6 -6
- package/types/binding-selector/index.d.ts +0 -54
- package/types/binding-selector/src/binding-selector.props.d.ts +0 -1
- package/types/button-group/designer.d.ts +29 -0
- package/types/button-group/index.d.ts +15 -0
- package/types/button-group/src/button-group.props.d.ts +0 -1
- package/types/calendar/src/calendar.props.d.ts +1 -0
- package/types/calendar/src/components/month/month-view.component.d.ts +6 -6
- package/types/calendar/src/composition/use-calendar-events.d.ts +1 -1
- package/types/calendar/src/composition/use-locales.d.ts +1 -0
- package/types/calendar/src/property-config/calendar.property-config.d.ts +2 -0
- package/types/capsule/src/capsule-item.component.d.ts +6 -6
- package/types/checkbox/designer.d.ts +2 -0
- package/types/checkbox-group/designer.d.ts +2 -0
- package/types/code-editor/designer.d.ts +5 -0
- package/types/code-editor/index.d.ts +0 -1
- package/types/code-editor/src/code-textbox.component.d.ts +6 -6
- package/types/code-editor/src/code-textbox.props.d.ts +0 -2
- package/types/color-picker/designer.d.ts +29 -0
- package/types/color-picker/index.d.ts +0 -15
- package/types/color-picker/src/color-picker.props.d.ts +0 -1
- package/types/combo-list/designer.d.ts +29 -0
- package/types/combo-list/src/combo-list.props.d.ts +1 -0
- package/types/combo-list/src/designer/combo-list.design.props.d.ts +6 -0
- package/types/combo-tree/designer.d.ts +5 -0
- package/types/combo-tree/src/combo-tree.props.d.ts +0 -1
- package/types/combo-tree/src/components/tree-container.component.d.ts +7 -7
- package/types/comment/src/comment.props.d.ts +4 -0
- package/types/comment/src/designer/comment.design.props.d.ts +4 -0
- package/types/common/index.d.ts +1 -0
- package/types/common/utils/use-mobile.d.ts +1 -0
- package/types/component/designer.d.ts +35 -0
- package/types/component/index.d.ts +0 -2
- package/types/component/src/component.props.d.ts +0 -8
- package/types/component/src/composition/field-tree-builder.d.ts +1 -0
- package/types/components.d.ts +2 -6
- package/types/condition/designer.d.ts +56 -0
- package/types/condition/index.d.ts +0 -55
- package/types/content-container/index.d.ts +3 -2
- package/types/content-container/src/content-container.props.d.ts +1 -0
- package/types/data-grid/designer.d.ts +2 -0
- package/types/data-grid/index.d.ts +5 -2
- package/types/data-grid/src/data-grid.component.d.ts +2 -1
- package/types/data-grid/src/designer/grid-field-editor.props.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +7 -1
- package/types/data-view/composition/use-mobile.d.ts +3 -0
- package/types/data-view/designer/property-config/use-command-option.d.ts +11 -0
- package/types/data-view/index.d.ts +1 -0
- package/types/designer-canvas/src/composition/designer-canvas-changed.d.ts +3 -3
- package/types/designer-canvas/src/composition/dg-control.d.ts +8 -0
- package/types/designer-outline/src/designer-outline.component.d.ts +3 -3
- package/types/designer-outline/src/types.d.ts +5 -1
- package/types/drawer/designer.d.ts +12 -0
- package/types/drawer/src/designer/drawer-toolbar.design.props.d.ts +12 -0
- package/types/drawer/src/designer/drawer.design.component.d.ts +8 -0
- package/types/drawer/src/designer/drawer.design.props.d.ts +4 -0
- package/types/drawer/src/schema/schema-mapper.d.ts +1 -0
- package/types/drawer/src/schema/schema-resolver.d.ts +1 -0
- package/types/dropdown/designer.d.ts +6 -0
- package/types/dropdown/index.d.ts +27 -6
- package/types/dropdown/src/dropdown.item.component.d.ts +2 -2
- package/types/dropdown/src/dropdown.props.d.ts +0 -1
- package/types/dynamic-form/designer.d.ts +3 -1
- package/types/dynamic-form/index.d.ts +4 -3
- package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.component.d.ts +6 -6
- package/types/dynamic-form/src/composition/use-input-type-resolver.d.ts +11 -0
- package/types/dynamic-resolver/index.d.ts +3 -0
- package/types/dynamic-resolver/src/props-resolver.d.ts +2 -0
- package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver-design.d.ts +1 -1
- package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver.d.ts +1 -1
- package/types/dynamic-resolver/src/resolver/property-config/use-property-config-resolver.d.ts +2 -2
- package/types/dynamic-resolver/src/resolver/schema/schema-resolver-design.d.ts +1 -1
- package/types/dynamic-resolver/src/resolver/schema/schema-resolver.d.ts +1 -1
- package/types/dynamic-view/src/components/maps.d.ts +883 -1
- package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
- package/types/dynamic-view/src/types.d.ts +4 -0
- package/types/expression-editor/designer.d.ts +9 -0
- package/types/field-selector/index.d.ts +2 -1
- package/types/fieldset/index.d.ts +3 -2
- package/types/fieldset/src/fieldset.props.d.ts +1 -0
- package/types/filter-bar/src/composition/types.d.ts +1 -1
- package/types/filter-bar/src/composition/use-size.d.ts +2 -2
- package/types/filter-bar/src/locale/locale.d.ts +1 -0
- package/types/filter-condition-editor/designer.d.ts +10 -0
- package/types/filter-condition-editor/index.d.ts +0 -9
- package/types/filter-condition-editor/src/components/filter-condition-grid.component.d.ts +12 -12
- package/types/filter-condition-editor/src/components/sort-editor-grid.component.d.ts +12 -12
- package/types/filter-condition-editor/src/filter-condition-editor.props.d.ts +0 -1
- package/types/html-template/designer.d.ts +31 -0
- package/types/html-template/src/designer/html-template.design.props.d.ts +9 -0
- package/types/html-template/src/html-template.props.d.ts +2 -0
- package/types/image-cropper/designer.d.ts +4 -0
- package/types/image-cropper/src/image-cropper.props.d.ts +0 -1
- package/types/index.d.ts +0 -1
- package/types/input-group/designer.d.ts +2 -0
- package/types/json-editor/designer.d.ts +5 -0
- package/types/json-editor/src/components/editable-combo/editable-combo.component.d.ts +3 -3
- package/types/json-editor/src/components/editable-combo/popup-container.component.d.ts +3 -3
- package/types/json-editor/src/json-editor.props.d.ts +0 -1
- package/types/language-textbox/index.d.ts +6 -6
- package/types/language-textbox/src/language-textbox.component.d.ts +2 -2
- package/types/language-textbox/src/language-textbox.props.d.ts +1 -0
- package/types/layout/index.d.ts +1 -0
- package/types/layout/src/components/layout-pane.props.d.ts +0 -1
- package/types/layout/src/layout.props.d.ts +0 -1
- package/types/list-nav/index.d.ts +24 -5
- package/types/list-nav/src/list-nav.props.d.ts +0 -1
- package/types/list-view/index.d.ts +1 -0
- package/types/list-view/src/composition/use-draggable.d.ts +1 -1
- package/types/list-view/src/designer/list-view.design.props.d.ts +1 -0
- package/types/list-view/src/list-view-table.props.d.ts +1 -0
- package/types/loading/index.d.ts +6 -6
- package/types/loading/src/loading.component.d.ts +3 -3
- package/types/lookup/index.d.ts +1 -1
- package/types/lookup/src/components/popup-container.component.d.ts +6 -6
- package/types/lookup/src/lookup.props.d.ts +1 -0
- package/types/lookup/src/property-config/external-lookup.property-config.d.ts +1 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +1 -0
- package/types/menu-lookup/designer.d.ts +5 -0
- package/types/menu-lookup/src/menu-lookup.props.d.ts +0 -1
- package/types/message-box/index.d.ts +6 -6
- package/types/message-box/src/message-box.component.d.ts +3 -3
- package/types/modal/designer.d.ts +2 -0
- package/types/modal/index.d.ts +30 -24
- package/types/modal/src/modal.component.d.ts +15 -12
- package/types/modal/src/modal.props.d.ts +4 -0
- package/types/nav/designer.d.ts +6 -0
- package/types/nav/index.d.ts +24 -20
- package/types/nav/src/nav.props.d.ts +0 -1
- package/types/notify/index.d.ts +3 -3
- package/types/notify/src/notify.component.d.ts +2 -2
- package/types/number-range/designer.d.ts +29 -0
- package/types/number-range/src/number-range.props.d.ts +0 -1
- package/types/number-spinner/src/composition/types.d.ts +1 -0
- package/types/order/designer.d.ts +6 -0
- package/types/order/index.d.ts +36 -5
- package/types/order/src/designer/order.design.component.d.ts +1 -1
- package/types/order/src/order.props.d.ts +0 -1
- package/types/page-footer/designer.d.ts +6 -0
- package/types/page-footer/index.d.ts +0 -2
- package/types/page-footer/src/page-footer.props.d.ts +0 -1
- package/types/page-header/index.d.ts +3 -2
- package/types/page-header/src/designer/page-header.design.props.d.ts +20 -0
- package/types/page-header/src/page-header.props.d.ts +2 -0
- package/types/pagination/designer.d.ts +29 -0
- package/types/pagination/index.d.ts +15 -0
- package/types/pagination/src/pagination.props.d.ts +0 -1
- package/types/popover/index.d.ts +3 -3
- package/types/popover/src/composition/use-resize.d.ts +1 -1
- package/types/popover/src/popover.component.d.ts +2 -2
- package/types/progress/designer.d.ts +29 -0
- package/types/progress/src/progress.props.d.ts +0 -1
- package/types/property-panel/src/property-panel.component.d.ts +3 -3
- package/types/query-solution/index.d.ts +4 -4
- package/types/query-solution/src/composition/types.d.ts +8 -2
- package/types/query-solution/src/composition/use-header.d.ts +2 -2
- package/types/query-solution/src/composition/use-solution-utils.d.ts +1 -1
- package/types/query-solution/src/designer/query-solution-config/composition/use-util.d.ts +1 -1
- package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +1 -0
- package/types/query-solution/src/designer/solution-preset-config/solution-preset.props.d.ts +1 -0
- package/types/query-solution/src/query-solution.props.d.ts +1 -0
- package/types/radio-group/designer.d.ts +4 -1
- package/types/radio-group/src/designer/item-collection-editor.props.d.ts +1 -0
- package/types/response-layout/index.d.ts +3 -2
- package/types/response-layout/src/component/response-layout-item.props.d.ts +1 -0
- package/types/response-layout/src/property-config/response-layout-splitter/response-layout-splitter.props.d.ts +1 -0
- package/types/response-layout/src/response-layout.props.d.ts +1 -0
- package/types/response-toolbar/designer.d.ts +2 -1
- package/types/response-toolbar/src/designer/response-toolbar.design.props.d.ts +1 -0
- package/types/search-box/designer.d.ts +52 -0
- package/types/search-box/index.d.ts +1 -17
- package/types/search-box/src/components/search-box-container.component.d.ts +3 -3
- package/types/search-box/src/search-box.props.d.ts +0 -1
- package/types/section/designer.d.ts +1 -0
- package/types/smoke-detector/designer.d.ts +6 -0
- package/types/smoke-detector/index.d.ts +0 -2
- package/types/smoke-detector/src/smoke-detector.props.d.ts +0 -1
- package/types/sort-condition-editor/designer.d.ts +9 -0
- package/types/sort-condition-editor/index.d.ts +2 -7
- package/types/sort-condition-editor/src/sort-condition-editor.props.d.ts +0 -1
- package/types/splitter/designer.d.ts +32 -0
- package/types/splitter/index.d.ts +1 -0
- package/types/splitter/src/components/splitter-pane.props.d.ts +0 -1
- package/types/splitter/src/splitter.props.d.ts +0 -1
- package/types/step/designer.d.ts +6 -0
- package/types/tabs/designer.d.ts +1 -0
- package/types/tabs/index.d.ts +0 -1
- package/types/tabs/src/composition/types.d.ts +1 -0
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +1 -0
- package/types/tags/index.d.ts +3 -3
- package/types/tags/src/tags.component.d.ts +1 -1
- package/types/text/designer.d.ts +6 -0
- package/types/text/index.d.ts +24 -20
- package/types/text/src/text.props.d.ts +0 -1
- package/types/time-picker/src/components/time.component.d.ts +3 -3
- package/types/transfer/designer.d.ts +35 -0
- package/types/transfer/src/transfer.props.d.ts +0 -1
- package/types/tree-view/designer.d.ts +29 -0
- package/types/tree-view/src/tree-view.props.d.ts +0 -1
- package/types/uploader/designer.d.ts +141 -0
- package/types/uploader/index.d.ts +6 -6
- package/types/uploader/src/components/upload-progress.component.d.ts +3 -3
- package/types/uploader/src/uploader.component.d.ts +3 -3
- package/types/uploader/src/uploader.props.d.ts +0 -1
- package/types/verify-detail/designer.d.ts +6 -0
- package/types/verify-detail/index.d.ts +58 -5
- package/types/verify-detail/src/designer/verify-detail.design.component.d.ts +8 -8
- package/types/verify-detail/src/verify-detail.props.d.ts +0 -1
- package/types/video/designer.d.ts +6 -0
- package/types/video/index.d.ts +24 -20
- package/types/video/src/video.props.d.ts +0 -1
- package/components/sort-condition-editor/index.css +0 -1
- package/package.zip +0 -0
- package/types/designer-toolbox/index.d.ts +0 -3
- package/types/designer-toolbox/src/toolbox.component.d.ts +0 -14
- package/types/designer-toolbox/src/toolbox.props.d.ts +0 -29
- package/types/designer-toolbox/src/types.d.ts +0 -21
- package/types/designer.d.ts +0 -13
- package/types/flow-canvas/index.d.ts +0 -3
- package/types/flow-canvas/src/components/flow-node-item.component.d.ts +0 -8
- package/types/flow-canvas/src/components/flow-node-item.props.d.ts +0 -3
- package/types/flow-canvas/src/composition/types.d.ts +0 -42
- package/types/flow-canvas/src/composition/use-bezier-curve.d.ts +0 -2
- package/types/flow-canvas/src/composition/use-connections.d.ts +0 -2
- package/types/flow-canvas/src/composition/use-curve.d.ts +0 -4
- package/types/flow-canvas/src/composition/use-drawing-bezier.d.ts +0 -2
- package/types/flow-canvas/src/composition/use-drawing.d.ts +0 -4
- package/types/flow-canvas/src/flow-canvas.component.d.ts +0 -8
- package/types/flow-canvas/src/flow-canvas.props.d.ts +0 -3
- package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +0 -2
- package/types/layout/src/designer/layout-pane.design.component.d.ts +0 -8
- package/types/layout/src/designer/layout-use-designer-rules.d.ts +0 -2
- package/types/layout/src/designer/layout.design.component.d.ts +0 -8
- package/types/layout/src/schema/schema-mapper.d.ts +0 -2
- package/types/layout/src/schema/schema-resolver.d.ts +0 -2
- package/types/list-nav/src/designer/use-designer-rules.d.ts +0 -2
- package/types/list-nav/src/property-config/list-nav.property-config.d.ts +0 -8
- package/types/list-nav/src/schema/schema-mapper.d.ts +0 -2
- package/types/list-nav/src/schema/schema-resolver.d.ts +0 -2
- /package/{components → designer}/condition/index.css +0 -0
- /package/{components → designer}/uploader/index.css +0 -0
- /package/types/{list-nav/src/designer/list-nav.design.component.d.ts → dynamic-form/src/component/form-control/form-control.component.d.ts} +0 -0
|
@@ -1,143 +1,6 @@
|
|
|
1
|
-
import { inject as
|
|
2
|
-
import {
|
|
3
|
-
|
|
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 = {
|
|
1
|
+
import { inject as Ke, ref as h, onMounted as Ge, onUnmounted as Je, watch as Y, defineComponent as Ze, createVNode as H, withModifiers as O } from "vue";
|
|
2
|
+
import { withInstall as Ye } from "../common/index.esm.js";
|
|
3
|
+
const Xe = {
|
|
141
4
|
/** 输出图片格式 */
|
|
142
5
|
format: { type: String, default: "png" },
|
|
143
6
|
/** 保持长宽比例 */
|
|
@@ -194,11 +57,11 @@ const nt = /* @__PURE__ */ new Map([
|
|
|
194
57
|
y2: 1e4
|
|
195
58
|
}
|
|
196
59
|
}
|
|
197
|
-
}
|
|
198
|
-
var
|
|
199
|
-
function
|
|
200
|
-
function a(
|
|
201
|
-
switch (typeof
|
|
60
|
+
};
|
|
61
|
+
var ae = /* @__PURE__ */ ((a) => (a.Move = "move", a.Resize = "resize", a))(ae || {});
|
|
62
|
+
function et() {
|
|
63
|
+
function a(g) {
|
|
64
|
+
switch (typeof g == "string" && (g = M(g)), g) {
|
|
202
65
|
case 2:
|
|
203
66
|
return { rotate: 0, flip: !0 };
|
|
204
67
|
case 3:
|
|
@@ -217,113 +80,113 @@ function xt() {
|
|
|
217
80
|
return { rotate: 0, flip: !1 };
|
|
218
81
|
}
|
|
219
82
|
}
|
|
220
|
-
function
|
|
221
|
-
const t = new DataView(
|
|
83
|
+
function M(g) {
|
|
84
|
+
const t = new DataView(s(g));
|
|
222
85
|
if (t.getUint16(0, !1) !== 65496)
|
|
223
86
|
return -2;
|
|
224
|
-
const
|
|
225
|
-
let
|
|
226
|
-
for (;
|
|
227
|
-
if (t.getUint16(
|
|
87
|
+
const m = t.byteLength;
|
|
88
|
+
let v = 2;
|
|
89
|
+
for (; v < m; ) {
|
|
90
|
+
if (t.getUint16(v + 2, !1) <= 8)
|
|
228
91
|
return -1;
|
|
229
|
-
const b = t.getUint16(
|
|
230
|
-
if (
|
|
231
|
-
if (t.getUint32(
|
|
92
|
+
const b = t.getUint16(v, !1);
|
|
93
|
+
if (v += 2, b === 65505) {
|
|
94
|
+
if (t.getUint32(v += 2, !1) !== 1165519206)
|
|
232
95
|
return -1;
|
|
233
|
-
const
|
|
234
|
-
|
|
235
|
-
const D = t.getUint16(
|
|
236
|
-
|
|
237
|
-
for (let
|
|
238
|
-
if (t.getUint16(
|
|
239
|
-
return t.getUint16(
|
|
96
|
+
const d = t.getUint16(v += 6, !1) === 18761;
|
|
97
|
+
v += t.getUint32(v + 4, d);
|
|
98
|
+
const D = t.getUint16(v, d);
|
|
99
|
+
v += 2;
|
|
100
|
+
for (let U = 0; U < D; U++)
|
|
101
|
+
if (t.getUint16(v + U * 12, d) === 274)
|
|
102
|
+
return t.getUint16(v + U * 12 + 8, d);
|
|
240
103
|
} else {
|
|
241
104
|
if ((b & 65280) !== 65280)
|
|
242
105
|
break;
|
|
243
|
-
|
|
106
|
+
v += t.getUint16(v, !1);
|
|
244
107
|
}
|
|
245
108
|
}
|
|
246
109
|
return -1;
|
|
247
110
|
}
|
|
248
|
-
function
|
|
249
|
-
|
|
250
|
-
const t = atob(
|
|
251
|
-
for (let b = 0; b <
|
|
252
|
-
|
|
253
|
-
return
|
|
254
|
-
}
|
|
255
|
-
function
|
|
256
|
-
const
|
|
257
|
-
t = Math.round(t),
|
|
258
|
-
const
|
|
259
|
-
if (
|
|
260
|
-
const
|
|
261
|
-
for (let
|
|
262
|
-
for (let
|
|
263
|
-
const
|
|
264
|
-
let T = 0,
|
|
265
|
-
const
|
|
266
|
-
let
|
|
267
|
-
|
|
268
|
-
for (let
|
|
269
|
-
const
|
|
270
|
-
for (let
|
|
271
|
-
const
|
|
272
|
-
if (
|
|
111
|
+
function s(g) {
|
|
112
|
+
g = g.replace(/^data:([^;]+);base64,/gmi, "");
|
|
113
|
+
const t = atob(g), m = t.length, v = new Uint8Array(m);
|
|
114
|
+
for (let b = 0; b < m; b++)
|
|
115
|
+
v[b] = t.charCodeAt(b);
|
|
116
|
+
return v.buffer;
|
|
117
|
+
}
|
|
118
|
+
function $(g, t, m) {
|
|
119
|
+
const v = g.width, b = g.height;
|
|
120
|
+
t = Math.round(t), m = Math.round(m);
|
|
121
|
+
const d = v / t, D = b / m, U = Math.ceil(d / 2), u = Math.ceil(D / 2), i = g.getContext("2d");
|
|
122
|
+
if (i) {
|
|
123
|
+
const k = i.getImageData(0, 0, v, b), w = i.createImageData(t, m), { data: P } = k, V = w.data;
|
|
124
|
+
for (let F = 0; F < m; F++)
|
|
125
|
+
for (let E = 0; E < t; E++) {
|
|
126
|
+
const N = (E + F * t) * 4, A = F * D;
|
|
127
|
+
let T = 0, r = 0, f = 0, j = 0, q = 0, C = 0, y = 0;
|
|
128
|
+
const _ = Math.floor(E * d), X = Math.floor(F * D);
|
|
129
|
+
let Q = Math.ceil((E + 1) * d), K = Math.ceil((F + 1) * D);
|
|
130
|
+
Q = Math.min(Q, v), K = Math.min(K, b);
|
|
131
|
+
for (let I = X; I < K; I++) {
|
|
132
|
+
const c = Math.abs(A - I) / u, ie = E * d, ee = c * c;
|
|
133
|
+
for (let z = _; z < Q; z++) {
|
|
134
|
+
const S = Math.abs(ie - z) / U, p = Math.sqrt(ee + S * S);
|
|
135
|
+
if (p >= 1)
|
|
273
136
|
continue;
|
|
274
|
-
T = 2 *
|
|
275
|
-
const
|
|
276
|
-
|
|
137
|
+
T = 2 * p * p * p - 3 * p * p + 1;
|
|
138
|
+
const B = 4 * (z + I * v);
|
|
139
|
+
y += T * P[B + 3], f += T, P[B + 3] < 255 && (T = T * P[B + 3] / 250), j += T * P[B], q += T * P[B + 1], C += T * P[B + 2], r += T;
|
|
277
140
|
}
|
|
278
141
|
}
|
|
279
|
-
|
|
142
|
+
V[N] = j / r, V[N + 1] = q / r, V[N + 2] = C / r, V[N + 3] = y / f;
|
|
280
143
|
}
|
|
281
|
-
|
|
144
|
+
g.width = t, g.height = m, i.putImageData(w, 0, 0);
|
|
282
145
|
}
|
|
283
146
|
}
|
|
284
147
|
return {
|
|
285
|
-
resizeCanvas:
|
|
148
|
+
resizeCanvas: $,
|
|
286
149
|
getTransformationsFromExifData: a
|
|
287
150
|
};
|
|
288
151
|
}
|
|
289
|
-
function
|
|
290
|
-
function
|
|
291
|
-
a.value.x2 = a.value.x1 + (a.value.y2 - a.value.y1) *
|
|
152
|
+
function tt(a, M, s, $) {
|
|
153
|
+
function g(u, i) {
|
|
154
|
+
a.value.x2 = a.value.x1 + (a.value.y2 - a.value.y1) * s.value, u = Math.max(a.value.x2 - M.value.width, 0), i = Math.max(0 - a.value.y1, 0), (u > 0 || i > 0) && (a.value.x2 -= i * s.value > u ? i * s.value : u, a.value.y1 += i * s.value > u ? i : u / s.value);
|
|
292
155
|
}
|
|
293
|
-
function t(
|
|
294
|
-
a.value.x2 = a.value.x1 + (a.value.y2 - a.value.y1) *
|
|
156
|
+
function t(u, i) {
|
|
157
|
+
a.value.x2 = a.value.x1 + (a.value.y2 - a.value.y1) * s.value, u = Math.max(a.value.x2 - M.value.width, 0), i = Math.max(a.value.y2 - M.value.height, 0), (u > 0 || i > 0) && (a.value.x2 -= i * s.value > u ? i * s.value : u, a.value.y2 -= i * s.value > u ? i : u / s.value);
|
|
295
158
|
}
|
|
296
|
-
function
|
|
297
|
-
a.value.y1 = a.value.y2 - (a.value.x2 - a.value.x1) /
|
|
159
|
+
function m(u, i) {
|
|
160
|
+
a.value.y1 = a.value.y2 - (a.value.x2 - a.value.x1) / s.value, u = Math.max(0 - a.value.x1, 0), i = Math.max(0 - a.value.y1, 0), (u > 0 || i > 0) && (a.value.x1 += i * s.value > u ? i * s.value : u, a.value.y1 += i * s.value > u ? i : u / s.value);
|
|
298
161
|
}
|
|
299
|
-
function
|
|
300
|
-
a.value.y1 = a.value.y2 - (a.value.x2 - a.value.x1) /
|
|
162
|
+
function v(u, i) {
|
|
163
|
+
a.value.y1 = a.value.y2 - (a.value.x2 - a.value.x1) / s.value, u = Math.max(a.value.x2 - M.value.width, 0), i = Math.max(0 - a.value.y1, 0), (u > 0 || i > 0) && (a.value.x2 -= i * s.value > u ? i * s.value : u, a.value.y1 += i * s.value > u ? i : u / s.value);
|
|
301
164
|
}
|
|
302
|
-
function b(
|
|
303
|
-
a.value.y2 = a.value.y1 + (a.value.x2 - a.value.x1) /
|
|
165
|
+
function b(u, i) {
|
|
166
|
+
a.value.y2 = a.value.y1 + (a.value.x2 - a.value.x1) / s.value, u = Math.max(a.value.x2 - M.value.width, 0), i = Math.max(a.value.y2 - M.value.height, 0), (u > 0 || i > 0) && (a.value.x2 -= i * s.value > u ? i * s.value : u, a.value.y2 -= i * s.value > u ? i : u / s.value);
|
|
304
167
|
}
|
|
305
|
-
function
|
|
306
|
-
a.value.y2 = a.value.y1 + (a.value.x2 - a.value.x1) /
|
|
168
|
+
function d(u, i) {
|
|
169
|
+
a.value.y2 = a.value.y1 + (a.value.x2 - a.value.x1) / s.value, u = Math.max(0 - a.value.x1, 0), i = Math.max(a.value.y2 - M.value.height, 0), (u > 0 || i > 0) && (a.value.x1 += i * s.value > u ? i * s.value : u, a.value.y2 -= i * s.value > u ? i : u / s.value);
|
|
307
170
|
}
|
|
308
171
|
function D() {
|
|
309
|
-
a.value.x2 = a.value.x1 + (a.value.y2 - a.value.y1) *
|
|
310
|
-
const
|
|
311
|
-
(
|
|
172
|
+
a.value.x2 = a.value.x1 + (a.value.y2 - a.value.y1) * s.value, a.value.y2 = a.value.y1 + (a.value.x2 - a.value.x1) / s.value;
|
|
173
|
+
const u = Math.max(0 - a.value.x1, 0), i = Math.max(a.value.x2 - M.value.width, 0), k = Math.max(a.value.y2 - M.value.height, 0), w = Math.max(0 - a.value.y1, 0);
|
|
174
|
+
(u > 0 || i > 0 || k > 0 || w > 0) && (a.value.x1 += k * s.value > u ? k * s.value : u, a.value.x2 -= w * s.value > i ? w * s.value : i, a.value.y1 += w * s.value > i ? w : i / s.value, a.value.y2 -= k * s.value > u ? k : u / s.value);
|
|
312
175
|
}
|
|
313
|
-
function
|
|
314
|
-
if (
|
|
315
|
-
switch (
|
|
176
|
+
function U() {
|
|
177
|
+
if (M.value.width && M.value.height)
|
|
178
|
+
switch ($.position) {
|
|
316
179
|
case "top":
|
|
317
|
-
|
|
180
|
+
g(0, 0);
|
|
318
181
|
break;
|
|
319
182
|
case "bottom":
|
|
320
183
|
t(0, 0);
|
|
321
184
|
break;
|
|
322
185
|
case "topleft":
|
|
323
|
-
|
|
186
|
+
m(0, 0);
|
|
324
187
|
break;
|
|
325
188
|
case "topright":
|
|
326
|
-
|
|
189
|
+
v(0, 0);
|
|
327
190
|
break;
|
|
328
191
|
case "right":
|
|
329
192
|
case "bottomright":
|
|
@@ -331,26 +194,26 @@ function Mt(a, c, u, N) {
|
|
|
331
194
|
break;
|
|
332
195
|
case "left":
|
|
333
196
|
case "bottomleft":
|
|
334
|
-
|
|
197
|
+
d(0, 0);
|
|
335
198
|
break;
|
|
336
199
|
case "center":
|
|
337
200
|
D();
|
|
338
201
|
break;
|
|
339
202
|
}
|
|
340
203
|
}
|
|
341
|
-
return { checkAspectRatio:
|
|
204
|
+
return { checkAspectRatio: U };
|
|
342
205
|
}
|
|
343
|
-
function
|
|
344
|
-
const { resizeCanvas:
|
|
345
|
-
let
|
|
346
|
-
const
|
|
347
|
-
let
|
|
348
|
-
const fe =
|
|
349
|
-
function
|
|
350
|
-
|
|
351
|
-
}
|
|
352
|
-
function
|
|
353
|
-
T.value = !1,
|
|
206
|
+
function at(a, M) {
|
|
207
|
+
const { resizeCanvas: s, getTransformationsFromExifData: $ } = et(), g = Ke("NotifyService"), t = h(a.cropper), m = h(a.transform), v = h(a.cropperMinWidth), b = h(a.maintainAspectRatio), d = h(a.aspectRatio), D = h(a.autoCrop), U = h(a.backgroundColor), u = h(a.resizeToWidth), i = h(a.onlyScaleDown), k = h(a.containWithinAspectRatio), w = h(a.canvasRotation), P = h(a.format), V = h(a.imageQuality), F = h(a.resizeToHeight), E = h(a.cropperMinHeight), N = h(""), A = h(!0), T = h(!0);
|
|
208
|
+
let r, f, j = 0, q, C, y;
|
|
209
|
+
const _ = h(null), X = h(""), Q = h(""), K = h("0px"), I = h(), c = h({ width: 100, height: 100 }), ie = ae;
|
|
210
|
+
let ee, z = 20, S = 20, p = !1, B = { rotate: 0, flip: !1 }, o = { active: !1, type: null, position: null, x1: 0, y1: 0, x2: 0, y2: 0, clientX: 0, clientY: 0 };
|
|
211
|
+
const fe = h(a.imageChangedEvent), ue = h(a.imageURL), Me = h(a.imageBase64), we = h(a.imageFile);
|
|
212
|
+
function be() {
|
|
213
|
+
Q.value = "scaleX(" + (m.value.scale || 1) * (m.value.flipH ? -1 : 1) + ")scaleY(" + (m.value.scale || 1) * (m.value.flipV ? -1 : 1) + ")rotate(" + (m.value.rotate || 0) + "deg)";
|
|
214
|
+
}
|
|
215
|
+
function J() {
|
|
216
|
+
T.value = !1, I.value = null, N.value = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=", o = {
|
|
354
217
|
active: !1,
|
|
355
218
|
type: null,
|
|
356
219
|
position: null,
|
|
@@ -360,313 +223,313 @@ function Ce(a, c) {
|
|
|
360
223
|
y2: 0,
|
|
361
224
|
clientX: 0,
|
|
362
225
|
clientY: 0
|
|
363
|
-
},
|
|
226
|
+
}, c.value = {
|
|
364
227
|
width: 0,
|
|
365
228
|
height: 0
|
|
366
|
-
},
|
|
229
|
+
}, r = {
|
|
367
230
|
width: 0,
|
|
368
231
|
height: 0
|
|
369
|
-
},
|
|
232
|
+
}, f = {
|
|
370
233
|
width: 0,
|
|
371
234
|
height: 0
|
|
372
235
|
}, t.value.x1 = -100, t.value.y1 = -100, t.value.x2 = 1e4, t.value.y2 = 1e4;
|
|
373
236
|
}
|
|
374
|
-
function
|
|
237
|
+
function Ce(e) {
|
|
375
238
|
return /image\/(png|jpg|jpeg|bmp|gif|tiff|webp)/.test(e);
|
|
376
239
|
}
|
|
377
|
-
function
|
|
378
|
-
if (
|
|
379
|
-
if (
|
|
380
|
-
const
|
|
240
|
+
function Ie() {
|
|
241
|
+
if (w.value += B.rotate, k.value && r.width && r.height) {
|
|
242
|
+
if (w.value % 2) {
|
|
243
|
+
const n = r.width * d.value, x = r.height / d.value;
|
|
381
244
|
return {
|
|
382
|
-
width: Math.max(
|
|
383
|
-
height: Math.max(
|
|
245
|
+
width: Math.max(r.height, n),
|
|
246
|
+
height: Math.max(r.width, x)
|
|
384
247
|
};
|
|
385
248
|
}
|
|
386
|
-
const e =
|
|
249
|
+
const e = r.height * d.value, l = r.width / d.value;
|
|
387
250
|
return {
|
|
388
|
-
width: Math.max(
|
|
389
|
-
height: Math.max(
|
|
251
|
+
width: Math.max(r.width, e),
|
|
252
|
+
height: Math.max(r.height, l)
|
|
390
253
|
};
|
|
391
254
|
}
|
|
392
|
-
return
|
|
393
|
-
height:
|
|
394
|
-
width:
|
|
255
|
+
return w.value % 2 ? {
|
|
256
|
+
height: r.width,
|
|
257
|
+
width: r.height
|
|
395
258
|
} : {
|
|
396
|
-
width:
|
|
397
|
-
height:
|
|
259
|
+
width: r.width,
|
|
260
|
+
height: r.height
|
|
398
261
|
};
|
|
399
262
|
}
|
|
400
|
-
function
|
|
401
|
-
|
|
402
|
-
const e =
|
|
403
|
-
e.width && e.height && (
|
|
404
|
-
const
|
|
405
|
-
return
|
|
406
|
-
}
|
|
407
|
-
function
|
|
408
|
-
return new Promise((
|
|
409
|
-
|
|
410
|
-
var
|
|
411
|
-
|
|
412
|
-
},
|
|
263
|
+
function Ae() {
|
|
264
|
+
w.value += B.rotate;
|
|
265
|
+
const e = Ie(), l = document.createElement("canvas");
|
|
266
|
+
e.width && e.height && (l.width = e.width, l.height = e.height);
|
|
267
|
+
const n = l.getContext("2d");
|
|
268
|
+
return r.width && r.height && y && (n == null || n.setTransform(B.flip ? -1 : 1, 0, 0, 1, l.width / 2, l.height / 2), n == null || n.rotate(Math.PI * (w.value / 2)), n == null || n.drawImage(y, -r.width / 2, -r.height / 2)), l.toDataURL();
|
|
269
|
+
}
|
|
270
|
+
function Te(e) {
|
|
271
|
+
return new Promise((l) => {
|
|
272
|
+
ee = e, N.value = e, I.value = new Image(), I.value.onload = () => {
|
|
273
|
+
var n, x;
|
|
274
|
+
f.width = (n = I.value) == null ? void 0 : n.naturalWidth, f.height = (x = I.value) == null ? void 0 : x.naturalHeight, l();
|
|
275
|
+
}, I.value.src = ee;
|
|
413
276
|
});
|
|
414
277
|
}
|
|
415
|
-
function
|
|
416
|
-
if (!
|
|
278
|
+
function ce() {
|
|
279
|
+
if (!y || !y.complete || !B)
|
|
417
280
|
return Promise.reject(new Error("No image loaded"));
|
|
418
|
-
const e =
|
|
419
|
-
return
|
|
281
|
+
const e = Ae();
|
|
282
|
+
return Te(e);
|
|
420
283
|
}
|
|
421
|
-
function
|
|
422
|
-
const
|
|
423
|
-
|
|
284
|
+
function ne(e) {
|
|
285
|
+
const l = (n) => {
|
|
286
|
+
g.show({
|
|
424
287
|
showCloseButton: !1,
|
|
425
288
|
timeout: 3e3,
|
|
426
289
|
animate: "fadeIn",
|
|
427
290
|
toasts: [{ type: "string", title: "提示", msg: "图片上传错误,请重试" }]
|
|
428
|
-
}), A.value = !1,
|
|
291
|
+
}), A.value = !1, p = !0, M.emit("loadImageFailed"), y = null, X.value = "";
|
|
429
292
|
};
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
}).catch(
|
|
434
|
-
},
|
|
435
|
-
}
|
|
436
|
-
function
|
|
437
|
-
|
|
293
|
+
y = new Image(), y.onload = () => {
|
|
294
|
+
X.value = e, B = $(e), r.width = y == null ? void 0 : y.naturalWidth, r.height = y == null ? void 0 : y.naturalHeight, ce().then(() => {
|
|
295
|
+
p = !1;
|
|
296
|
+
}).catch(l);
|
|
297
|
+
}, y.onerror = l, y.src = e;
|
|
298
|
+
}
|
|
299
|
+
function pe(e, l) {
|
|
300
|
+
Ce(l) ? (p = !1, ne(e)) : (g.show({
|
|
438
301
|
showCloseButton: !1,
|
|
439
302
|
timeout: 3e3,
|
|
440
303
|
animate: "fadeIn",
|
|
441
304
|
toasts: [{ type: "string", title: "提示", msg: "图片类型不正确,请重试" }]
|
|
442
|
-
}), A.value = !1,
|
|
305
|
+
}), A.value = !1, p = !0, M.emit("loadImageFailed"));
|
|
443
306
|
}
|
|
444
|
-
function
|
|
445
|
-
const
|
|
446
|
-
|
|
307
|
+
function de(e) {
|
|
308
|
+
const l = new FileReader();
|
|
309
|
+
l.onload = (n) => pe(n.target.result, e.type), l.readAsDataURL(e);
|
|
447
310
|
}
|
|
448
|
-
function
|
|
449
|
-
const
|
|
450
|
-
|
|
451
|
-
|
|
311
|
+
function ge(e) {
|
|
312
|
+
const l = new Image();
|
|
313
|
+
l.onerror = () => {
|
|
314
|
+
g.show({
|
|
452
315
|
showCloseButton: !1,
|
|
453
316
|
timeout: 3e3,
|
|
454
317
|
animate: "fadeIn",
|
|
455
318
|
toasts: [{ type: "string", title: "提示", msg: "图片加载错误,请重试" }]
|
|
456
|
-
}), A.value = !1,
|
|
457
|
-
},
|
|
458
|
-
|
|
459
|
-
const
|
|
460
|
-
|
|
461
|
-
},
|
|
319
|
+
}), A.value = !1, p = !0, M.emit("loadImageFailed");
|
|
320
|
+
}, l.onload = () => {
|
|
321
|
+
p = !1;
|
|
322
|
+
const n = document.createElement("canvas"), x = n.getContext("2d");
|
|
323
|
+
n.width = l.width, n.height = l.height, x == null || x.drawImage(l, 0, 0), ne(n.toDataURL());
|
|
324
|
+
}, l.crossOrigin = "anonymous", l.src = e;
|
|
462
325
|
}
|
|
463
|
-
function
|
|
464
|
-
return
|
|
326
|
+
function We() {
|
|
327
|
+
return _.value && _.value && _.value.offsetWidth > 0;
|
|
465
328
|
}
|
|
466
329
|
function se() {
|
|
467
|
-
if (
|
|
468
|
-
const e =
|
|
469
|
-
|
|
330
|
+
if (_.value) {
|
|
331
|
+
const e = _.value;
|
|
332
|
+
c.value.width = e.offsetWidth, c.value.height = e.offsetHeight, K.value = "calc(50% - " + c.value.width / 2 + "px)";
|
|
470
333
|
}
|
|
471
334
|
}
|
|
472
|
-
function
|
|
473
|
-
|
|
335
|
+
function ke() {
|
|
336
|
+
I.value && c.value.width && (z = v.value > 0 ? Math.max(20, v.value / I.value.width * c.value.width) : 20);
|
|
474
337
|
}
|
|
475
|
-
function
|
|
476
|
-
b.value ?
|
|
338
|
+
function ze() {
|
|
339
|
+
b.value ? S = Math.max(20, z / d.value) : E.value > 0 && I.value && c.value.height ? S = Math.max(20, E.value / I.value.height * c.value.height) : S = 20;
|
|
477
340
|
}
|
|
478
341
|
function oe() {
|
|
479
|
-
|
|
480
|
-
}
|
|
481
|
-
function
|
|
482
|
-
const e =
|
|
483
|
-
if (e &&
|
|
484
|
-
const
|
|
485
|
-
|
|
486
|
-
x1: Math.round(t.value.x1 *
|
|
487
|
-
y1: Math.round(t.value.y1 *
|
|
488
|
-
x2: Math.round(t.value.x2 *
|
|
489
|
-
y2: Math.round(t.value.y2 *
|
|
490
|
-
},
|
|
342
|
+
I.value ? (ke(), ze()) : (z = 20, S = 20);
|
|
343
|
+
}
|
|
344
|
+
function He() {
|
|
345
|
+
const e = _.value, l = h({ x1: 0, x2: 0, y1: 0, y2: 0 });
|
|
346
|
+
if (e && f.width && f.height) {
|
|
347
|
+
const n = f.width / e.offsetWidth;
|
|
348
|
+
l.value = {
|
|
349
|
+
x1: Math.round(t.value.x1 * n),
|
|
350
|
+
y1: Math.round(t.value.y1 * n),
|
|
351
|
+
x2: Math.round(t.value.x2 * n),
|
|
352
|
+
y2: Math.round(t.value.y2 * n)
|
|
353
|
+
}, k.value || (l.value.x1 = Math.max(l.value.x1, 0), l.value.y1 = Math.max(l.value.y1, 0), l.value.x2 = Math.min(l.value.x2, f.width), l.value.y2 = Math.min(l.value.y2, f.height));
|
|
491
354
|
}
|
|
492
|
-
return
|
|
493
|
-
}
|
|
494
|
-
function
|
|
495
|
-
|
|
496
|
-
const e =
|
|
497
|
-
if (e &&
|
|
498
|
-
const
|
|
499
|
-
let
|
|
500
|
-
|
|
501
|
-
x1: Math.round(t.value.x1 *
|
|
502
|
-
y1: Math.round(t.value.y1 *
|
|
503
|
-
x2: Math.round(t.value.x2 *
|
|
504
|
-
y2: Math.round(t.value.y2 *
|
|
505
|
-
},
|
|
355
|
+
return l.value;
|
|
356
|
+
}
|
|
357
|
+
function Se() {
|
|
358
|
+
w.value += B.rotate;
|
|
359
|
+
const e = _.value, l = h({ x1: 0, x2: 0, y1: 0, y2: 0 });
|
|
360
|
+
if (e && f.height && f.width && r.height && r.width) {
|
|
361
|
+
const n = f.width / e.offsetWidth;
|
|
362
|
+
let x, W;
|
|
363
|
+
w.value % 2 ? (x = (f.width - r.height) / 2, W = (f.height - r.width) / 2) : (x = (f.width - r.width) / 2, W = (f.height - r.height) / 2), l.value = {
|
|
364
|
+
x1: Math.round(t.value.x1 * n) - x,
|
|
365
|
+
y1: Math.round(t.value.y1 * n) - W,
|
|
366
|
+
x2: Math.round(t.value.x2 * n) - x,
|
|
367
|
+
y2: Math.round(t.value.y2 * n) - W
|
|
368
|
+
}, k.value || (l.value.x1 = Math.max(l.value.x1, 0), l.value.y1 = Math.max(l.value.y1, 0), l.value.x2 = Math.min(l.value.x2, f.width), l.value.y2 = Math.min(l.value.y2, f.height));
|
|
506
369
|
}
|
|
507
|
-
return
|
|
508
|
-
}
|
|
509
|
-
function
|
|
510
|
-
if (
|
|
511
|
-
if (!
|
|
512
|
-
return
|
|
513
|
-
} else if (
|
|
514
|
-
return
|
|
370
|
+
return l.value;
|
|
371
|
+
}
|
|
372
|
+
function Ue(e, l) {
|
|
373
|
+
if (u.value > 0) {
|
|
374
|
+
if (!i.value || e > u.value)
|
|
375
|
+
return u.value / e;
|
|
376
|
+
} else if (F.value > 0 && (!i.value || l > F.value))
|
|
377
|
+
return F.value / l;
|
|
515
378
|
return 1;
|
|
516
379
|
}
|
|
517
|
-
function
|
|
518
|
-
return Math.min(1, Math.max(0,
|
|
380
|
+
function _e() {
|
|
381
|
+
return Math.min(1, Math.max(0, V.value / 100));
|
|
519
382
|
}
|
|
520
|
-
function
|
|
521
|
-
return e.toDataURL("image/" +
|
|
383
|
+
function Be(e) {
|
|
384
|
+
return e.toDataURL("image/" + P.value, _e());
|
|
522
385
|
}
|
|
523
|
-
function
|
|
524
|
-
if (
|
|
525
|
-
const e =
|
|
526
|
-
|
|
527
|
-
const
|
|
528
|
-
if (
|
|
529
|
-
|
|
530
|
-
const
|
|
531
|
-
|
|
532
|
-
const
|
|
533
|
-
width:
|
|
534
|
-
height:
|
|
386
|
+
function Ee() {
|
|
387
|
+
if (_.value && _.value && I.value != null) {
|
|
388
|
+
const e = He(), l = e.x2 - e.x1, n = e.y2 - e.y1, x = document.createElement("canvas");
|
|
389
|
+
x.width = l, x.height = n;
|
|
390
|
+
const W = x.getContext("2d");
|
|
391
|
+
if (W) {
|
|
392
|
+
U.value != null && (W.fillStyle = U.value, W.fillRect(0, 0, l, n));
|
|
393
|
+
const R = (m.value.scale || 1) * (m.value.flipH ? -1 : 1), G = (m.value.scale || 1) * (m.value.flipV ? -1 : 1);
|
|
394
|
+
f.width && f.height && (W.setTransform(R, 0, 0, G, f.width / 2, f.height / 2), W.translate(-e.x1 / R, -e.y1 / G), W.rotate((m.value.rotate || 0) * Math.PI / 180), W.drawImage(I.value, -f.width / 2, -f.height / 2));
|
|
395
|
+
const L = {
|
|
396
|
+
width: l,
|
|
397
|
+
height: n,
|
|
535
398
|
imagePosition: e,
|
|
536
399
|
cropperPosition: { ...t.value }
|
|
537
400
|
};
|
|
538
|
-
|
|
539
|
-
const
|
|
540
|
-
return
|
|
401
|
+
k.value && (L.offsetImagePosition = Se());
|
|
402
|
+
const Z = Ue(l, n);
|
|
403
|
+
return Z !== 1 && (L.width = Math.round(l * Z), L.height = b.value ? Math.round(L.width / d.value) : Math.round(n * Z), s(x, L.width, L.height)), L.base64 = Be(x), M.emit("imageCropped", L), L;
|
|
541
404
|
}
|
|
542
405
|
}
|
|
543
406
|
return null;
|
|
544
407
|
}
|
|
545
|
-
function
|
|
546
|
-
D.value &&
|
|
408
|
+
function te() {
|
|
409
|
+
D.value && Ee();
|
|
547
410
|
}
|
|
548
|
-
function
|
|
549
|
-
const e =
|
|
411
|
+
function me() {
|
|
412
|
+
const e = _.value;
|
|
550
413
|
if (e) {
|
|
551
414
|
if (!b.value)
|
|
552
415
|
t.value.x1 = 0, t.value.x2 = e.offsetWidth, t.value.y1 = 0, t.value.y2 = e.offsetHeight;
|
|
553
|
-
else if (e.offsetWidth /
|
|
416
|
+
else if (e.offsetWidth / d.value < e.offsetHeight) {
|
|
554
417
|
t.value.x1 = 0, t.value.x2 = e.offsetWidth;
|
|
555
|
-
const
|
|
556
|
-
t.value.y1 = (e.offsetHeight -
|
|
418
|
+
const l = e.offsetWidth / d.value;
|
|
419
|
+
t.value.y1 = (e.offsetHeight - l) / 2, t.value.y2 = t.value.y1 + l;
|
|
557
420
|
} else {
|
|
558
421
|
t.value.y1 = 0, t.value.y2 = e.offsetHeight;
|
|
559
|
-
const
|
|
560
|
-
t.value.x1 = (e.offsetWidth -
|
|
422
|
+
const l = e.offsetHeight * d.value;
|
|
423
|
+
t.value.x1 = (e.offsetWidth - l) / 2, t.value.x2 = t.value.x1 + l;
|
|
561
424
|
}
|
|
562
|
-
|
|
425
|
+
te(), T.value = !0;
|
|
563
426
|
}
|
|
564
427
|
}
|
|
565
|
-
function
|
|
566
|
-
|
|
428
|
+
function ye() {
|
|
429
|
+
j > 40 ? (g.show({
|
|
567
430
|
showCloseButton: !1,
|
|
568
431
|
timeout: 3e3,
|
|
569
432
|
animate: "fadeIn",
|
|
570
433
|
toasts: [{ type: "string", title: "提示", msg: "图片加载超时,请重试" }]
|
|
571
|
-
}),
|
|
434
|
+
}), p = !0, A.value = !1, M.emit("loadImageFailed")) : We() ? (p = !1, se(), oe(), me(), M.emit("cropperReady", { ...c.value })) : (j++, setTimeout(() => ye(), 50));
|
|
572
435
|
}
|
|
573
|
-
function
|
|
574
|
-
|
|
436
|
+
function Le() {
|
|
437
|
+
I.value != null && (A.value = !1, M.emit("imageLoaded"), j = 0, setTimeout(() => ye()));
|
|
575
438
|
}
|
|
576
|
-
function
|
|
577
|
-
const e =
|
|
578
|
-
(
|
|
439
|
+
function De() {
|
|
440
|
+
const e = _.value;
|
|
441
|
+
(c.value.width !== (e == null ? void 0 : e.offsetWidth) || c.value.height !== (e == null ? void 0 : e.offsetHeight)) && c.value.width && c.value.height && e && (t.value.x1 = t.value.x1 * e.offsetWidth / c.value.width, t.value.x2 = t.value.x2 * e.offsetWidth / c.value.width, t.value.y1 = t.value.y1 * e.offsetHeight / c.value.height, t.value.y2 = t.value.y2 * e.offsetHeight / c.value.height);
|
|
579
442
|
}
|
|
580
|
-
const
|
|
581
|
-
|
|
443
|
+
const Fe = () => {
|
|
444
|
+
De(), se(), oe();
|
|
582
445
|
}, xe = () => {
|
|
583
|
-
clearTimeout(
|
|
446
|
+
clearTimeout(C), C = setTimeout(Fe, 300);
|
|
584
447
|
};
|
|
585
|
-
|
|
586
|
-
window.addEventListener("resize", xe),
|
|
587
|
-
}),
|
|
448
|
+
Ge(() => {
|
|
449
|
+
window.addEventListener("resize", xe), ue.value && (J(), A.value = !0, ge(ue.value));
|
|
450
|
+
}), Je(() => {
|
|
588
451
|
window.removeEventListener("resize", xe);
|
|
589
452
|
});
|
|
590
|
-
function
|
|
591
|
-
|
|
453
|
+
function Pe() {
|
|
454
|
+
o.active && (o.active = !1, te());
|
|
592
455
|
}
|
|
593
|
-
function
|
|
456
|
+
function he(e) {
|
|
594
457
|
return (e.touches && e.touches[0] ? e.touches[0].clientX : e.clientX) || 0;
|
|
595
458
|
}
|
|
596
|
-
function
|
|
459
|
+
function re(e) {
|
|
597
460
|
return (e.touches && e.touches[0] ? e.touches[0].clientY : e.clientY) || 0;
|
|
598
461
|
}
|
|
599
|
-
function
|
|
600
|
-
|
|
462
|
+
function Ve(e, l, n = null) {
|
|
463
|
+
o && o.active || (e.preventDefault && e.preventDefault(), o = {
|
|
601
464
|
active: !0,
|
|
602
|
-
type:
|
|
603
|
-
position:
|
|
604
|
-
clientX:
|
|
605
|
-
clientY:
|
|
465
|
+
type: l,
|
|
466
|
+
position: n,
|
|
467
|
+
clientX: he(e),
|
|
468
|
+
clientY: re(e),
|
|
606
469
|
...t.value
|
|
607
470
|
});
|
|
608
471
|
}
|
|
609
|
-
function
|
|
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 >
|
|
472
|
+
function ve(e = !1) {
|
|
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 > c.value.width && (t.value.x1 -= e ? t.value.x2 - c.value.width : 0, t.value.x2 = c.value.width), t.value.y2 > c.value.height && (t.value.y1 -= e ? t.value.y2 - c.value.height : 0, t.value.y2 = c.value.height);
|
|
611
474
|
}
|
|
612
|
-
function
|
|
613
|
-
const
|
|
614
|
-
t.value.x1 =
|
|
475
|
+
function Ne(e) {
|
|
476
|
+
const l = he(e) - o.clientX, n = re(e) - o.clientY;
|
|
477
|
+
t.value.x1 = o.x1 + l, t.value.y1 = o.y1 + n, t.value.x2 = o.x2 + l, t.value.y2 = o.y2 + n;
|
|
615
478
|
}
|
|
616
|
-
const { checkAspectRatio:
|
|
617
|
-
function
|
|
618
|
-
const
|
|
619
|
-
switch (
|
|
479
|
+
const { checkAspectRatio: je } = tt(t, c, d, o);
|
|
480
|
+
function Re(e) {
|
|
481
|
+
const l = he(e) - o.clientX, n = re(e) - o.clientY;
|
|
482
|
+
switch (o.position) {
|
|
620
483
|
case "left":
|
|
621
|
-
t.value.x1 = Math.min(
|
|
484
|
+
t.value.x1 = Math.min(o.x1 + l, t.value.x2 - z);
|
|
622
485
|
break;
|
|
623
486
|
case "topleft":
|
|
624
|
-
t.value.x1 = Math.min(
|
|
487
|
+
t.value.x1 = Math.min(o.x1 + l, t.value.x2 - z), t.value.y1 = Math.min(o.y1 + n, t.value.y2 - S);
|
|
625
488
|
break;
|
|
626
489
|
case "top":
|
|
627
|
-
t.value.y1 = Math.min(
|
|
490
|
+
t.value.y1 = Math.min(o.y1 + n, t.value.y2 - S);
|
|
628
491
|
break;
|
|
629
492
|
case "topright":
|
|
630
|
-
t.value.x2 = Math.max(
|
|
493
|
+
t.value.x2 = Math.max(o.x2 + l, t.value.x1 + z), t.value.y1 = Math.min(o.y1 + n, t.value.y2 - S);
|
|
631
494
|
break;
|
|
632
495
|
case "right":
|
|
633
|
-
t.value.x2 = Math.max(
|
|
496
|
+
t.value.x2 = Math.max(o.x2 + l, t.value.x1 + z);
|
|
634
497
|
break;
|
|
635
498
|
case "bottomright":
|
|
636
|
-
t.value.x2 = Math.max(
|
|
499
|
+
t.value.x2 = Math.max(o.x2 + l, t.value.x1 + z), t.value.y2 = Math.max(o.y2 + n, t.value.y1 + S);
|
|
637
500
|
break;
|
|
638
501
|
case "bottom":
|
|
639
|
-
t.value.y2 = Math.max(
|
|
502
|
+
t.value.y2 = Math.max(o.y2 + n, t.value.y1 + S);
|
|
640
503
|
break;
|
|
641
504
|
case "bottomleft":
|
|
642
|
-
t.value.x1 = Math.min(
|
|
505
|
+
t.value.x1 = Math.min(o.x1 + l, t.value.x2 - z), t.value.y2 = Math.max(o.y2 + n, t.value.y1 + S);
|
|
643
506
|
break;
|
|
644
507
|
case "center":
|
|
645
|
-
const { scale:
|
|
646
|
-
t.value.x1 = Math.min(
|
|
508
|
+
const { scale: x } = e, W = Math.abs(o.x2 - o.x1) * x, R = Math.abs(o.y2 - o.y1) * x, { x1: G } = t.value, { y1: L } = t.value;
|
|
509
|
+
t.value.x1 = Math.min(o.clientX - W / 2, t.value.x2 - z), t.value.y1 = Math.min(o.clientY - R / 2, t.value.y2 - S), t.value.x2 = Math.max(o.clientX + W / 2, G + z), t.value.y2 = Math.max(o.clientY + R / 2, L + S);
|
|
647
510
|
break;
|
|
648
511
|
}
|
|
649
|
-
b.value &&
|
|
512
|
+
b.value && je();
|
|
650
513
|
}
|
|
651
|
-
function
|
|
652
|
-
|
|
653
|
-
|
|
514
|
+
function $e(e) {
|
|
515
|
+
o && o.active && (e.stopPropagation && e.stopPropagation(), e.preventDefault && e.preventDefault(), clearTimeout(q), q = setTimeout(() => {
|
|
516
|
+
o.type === ae.Move ? (Ne(e), ve(!0)) : o.type === ae.Resize && (Re(e), ve(!1));
|
|
654
517
|
}, 300));
|
|
655
518
|
}
|
|
656
|
-
return
|
|
657
|
-
|
|
658
|
-
}),
|
|
659
|
-
e ? (
|
|
519
|
+
return Y(fe, (e) => {
|
|
520
|
+
J(), e && e.target && e.target.files && e.target.files.length > 0 && (A.value = !0, de(e.target.files[0]));
|
|
521
|
+
}), Y(ue, (e) => {
|
|
522
|
+
e ? (J(), A.value = !0, ge(e)) : (g.show({
|
|
660
523
|
showCloseButton: !1,
|
|
661
524
|
timeout: 3e3,
|
|
662
525
|
animate: "fadeIn",
|
|
663
526
|
toasts: [{ type: "string", title: "提示", msg: "图片路径为空" }]
|
|
664
|
-
}), A.value = !1,
|
|
665
|
-
}),
|
|
666
|
-
|
|
667
|
-
}),
|
|
668
|
-
|
|
669
|
-
}),
|
|
527
|
+
}), A.value = !1, p = !0);
|
|
528
|
+
}), Y(Me, (e) => {
|
|
529
|
+
J(), A.value = !0, ne(e);
|
|
530
|
+
}), Y(we, (e) => {
|
|
531
|
+
J(), e && (A.value = !0, de(e));
|
|
532
|
+
}), Y(
|
|
670
533
|
() => [
|
|
671
534
|
a.containWithinAspectRatio,
|
|
672
535
|
a.canvasRotation,
|
|
@@ -675,258 +538,141 @@ function Ce(a, c) {
|
|
|
675
538
|
a.transform,
|
|
676
539
|
a.imageChangedEvent
|
|
677
540
|
],
|
|
678
|
-
([e,
|
|
679
|
-
|
|
541
|
+
([e, l, n, x, W, R], [G, L, Z, qe, Oe, Qe]) => {
|
|
542
|
+
y && y.complete && B && (e !== G || l !== L) && ce(), n !== Z && (se(), oe(), ve(!1), te()), x !== qe && T.value && me(), W !== Oe && (be(), te()), R !== Qe && (fe.value = R);
|
|
680
543
|
}
|
|
681
544
|
), {
|
|
682
|
-
uploadError:
|
|
545
|
+
uploadError: p,
|
|
683
546
|
imageVisible: T,
|
|
684
|
-
backgroundColor:
|
|
685
|
-
sourceImage:
|
|
686
|
-
safeImgDataUrl:
|
|
687
|
-
safeTransformStyle:
|
|
688
|
-
maxSize:
|
|
547
|
+
backgroundColor: U,
|
|
548
|
+
sourceImage: _,
|
|
549
|
+
safeImgDataUrl: N,
|
|
550
|
+
safeTransformStyle: Q,
|
|
551
|
+
maxSize: c,
|
|
689
552
|
cropper: t,
|
|
690
|
-
marginLeft:
|
|
691
|
-
moveTypes:
|
|
553
|
+
marginLeft: K,
|
|
554
|
+
moveTypes: ie,
|
|
692
555
|
isLoading: A,
|
|
693
|
-
startMove:
|
|
694
|
-
imageLoadedInView:
|
|
695
|
-
moveStop:
|
|
696
|
-
moveImg:
|
|
556
|
+
startMove: Ve,
|
|
557
|
+
imageLoadedInView: Le,
|
|
558
|
+
moveStop: Pe,
|
|
559
|
+
moveImg: $e
|
|
697
560
|
};
|
|
698
561
|
}
|
|
699
|
-
const
|
|
562
|
+
const le = /* @__PURE__ */ Ze({
|
|
700
563
|
name: "FImageCropper",
|
|
701
|
-
props:
|
|
564
|
+
props: Xe,
|
|
702
565
|
emits: ["imageCropped", "imageLoaded", "cropperReady", "loadImageFailed"],
|
|
703
|
-
setup(a,
|
|
704
|
-
const
|
|
566
|
+
setup(a, M) {
|
|
567
|
+
const s = h(a.alignImage), $ = h(a.roundCropper), g = h(a.hideResizeSquares), t = h(a.loadImageErrorText), m = h(a.disabled), v = h(null), {
|
|
705
568
|
uploadError: b,
|
|
706
|
-
imageVisible:
|
|
569
|
+
imageVisible: d,
|
|
707
570
|
backgroundColor: D,
|
|
708
|
-
sourceImage:
|
|
709
|
-
safeImgDataUrl:
|
|
710
|
-
safeTransformStyle:
|
|
711
|
-
maxSize:
|
|
712
|
-
cropper:
|
|
713
|
-
marginLeft:
|
|
714
|
-
moveTypes:
|
|
715
|
-
isLoading:
|
|
716
|
-
startMove:
|
|
717
|
-
imageLoadedInView:
|
|
571
|
+
sourceImage: U,
|
|
572
|
+
safeImgDataUrl: u,
|
|
573
|
+
safeTransformStyle: i,
|
|
574
|
+
maxSize: k,
|
|
575
|
+
cropper: w,
|
|
576
|
+
marginLeft: P,
|
|
577
|
+
moveTypes: V,
|
|
578
|
+
isLoading: F,
|
|
579
|
+
startMove: E,
|
|
580
|
+
imageLoadedInView: N,
|
|
718
581
|
moveStop: A,
|
|
719
582
|
moveImg: T
|
|
720
|
-
} =
|
|
721
|
-
function
|
|
722
|
-
return
|
|
723
|
-
class: `farris-image-cropper-resize-bar ${
|
|
724
|
-
onMousedown:
|
|
583
|
+
} = at(a, M);
|
|
584
|
+
function r(C) {
|
|
585
|
+
return H("span", {
|
|
586
|
+
class: `farris-image-cropper-resize-bar ${C}`,
|
|
587
|
+
onMousedown: O((y) => E(y, V.Resize, C), ["prevent"])
|
|
725
588
|
}, null);
|
|
726
589
|
}
|
|
727
|
-
function
|
|
728
|
-
return
|
|
729
|
-
class: `farris-image-cropper-resize-bar ${
|
|
730
|
-
onMousedown:
|
|
731
|
-
}, [
|
|
590
|
+
function f(C) {
|
|
591
|
+
return H("div", null, [H("span", {
|
|
592
|
+
class: `farris-image-cropper-resize-bar ${C}`,
|
|
593
|
+
onMousedown: O((y) => E(y, V.Resize, C), ["prevent"])
|
|
594
|
+
}, [H("span", {
|
|
732
595
|
class: "farris-image-cropper-square"
|
|
733
|
-
}, null)]),
|
|
596
|
+
}, null)]), H("span", {
|
|
734
597
|
class: "farris-image-cropper-resize top"
|
|
735
|
-
}, [
|
|
598
|
+
}, [H("span", {
|
|
736
599
|
class: "farris-image-cropper-square"
|
|
737
600
|
}, null)])]);
|
|
738
601
|
}
|
|
739
|
-
const
|
|
740
|
-
return () =>
|
|
602
|
+
const j = ["top", "right", "bottom", "left"].map((C) => r(C)), q = ["topleft", "topright", "bottomright", "bottomleft"].map((C) => f(C));
|
|
603
|
+
return () => H("div", {
|
|
741
604
|
class: ["farris-image-cropper-frame", {
|
|
742
|
-
"farris-image-cropper-disabled":
|
|
605
|
+
"farris-image-cropper-disabled": m.value
|
|
743
606
|
}],
|
|
744
607
|
style: {
|
|
745
|
-
"text-align":
|
|
608
|
+
"text-align": s.value
|
|
746
609
|
},
|
|
747
|
-
onMousemove:
|
|
748
|
-
onTouchmove:
|
|
749
|
-
onMouseup:
|
|
750
|
-
onTouchend:
|
|
751
|
-
}, [!b &&
|
|
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", {
|
|
610
|
+
onMousemove: O((C) => T(C), ["prevent"]),
|
|
611
|
+
onTouchmove: O((C) => T(C), ["prevent"]),
|
|
612
|
+
onMouseup: O(() => A(), ["prevent"]),
|
|
613
|
+
onTouchend: O(() => A(), ["prevent"])
|
|
614
|
+
}, [!b && H("div", {
|
|
851
615
|
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,
|
|
864
616
|
class: "farris-image-cropper",
|
|
865
617
|
style: [{
|
|
866
|
-
background:
|
|
618
|
+
background: d.value ? D.value : ""
|
|
867
619
|
}]
|
|
868
|
-
}, [
|
|
620
|
+
}, [u.value && H("img", {
|
|
869
621
|
title: "farris-source-image",
|
|
870
|
-
ref:
|
|
622
|
+
ref: U,
|
|
871
623
|
class: "farris-source-image",
|
|
872
624
|
style: [{
|
|
873
|
-
visibility:
|
|
625
|
+
visibility: d.value ? "visible" : "hidden"
|
|
874
626
|
}, {
|
|
875
|
-
transform:
|
|
627
|
+
transform: i.value
|
|
876
628
|
}],
|
|
877
|
-
src:
|
|
878
|
-
onLoad: () =>
|
|
879
|
-
}, null),
|
|
629
|
+
src: u.value,
|
|
630
|
+
onLoad: () => N()
|
|
631
|
+
}, null), k.value && H("div", {
|
|
880
632
|
class: "farris-image-overlay",
|
|
881
633
|
style: [{
|
|
882
|
-
width: `${
|
|
634
|
+
width: `${k.value.width || 0}px`
|
|
883
635
|
}, {
|
|
884
|
-
height: `${
|
|
636
|
+
height: `${k.value.height || 0}px`
|
|
885
637
|
}, {
|
|
886
|
-
"margin-left":
|
|
638
|
+
"margin-left": s.value === "center" ? P.value : ""
|
|
887
639
|
}]
|
|
888
|
-
}, null),
|
|
640
|
+
}, null), d.value && H("div", {
|
|
889
641
|
class: ["farris-image-cropper-wrapper", {
|
|
890
|
-
"farris-image-cropper-rounded":
|
|
642
|
+
"farris-image-cropper-rounded": $.value
|
|
891
643
|
}],
|
|
892
644
|
style: [{
|
|
893
|
-
top: `${
|
|
645
|
+
top: `${w.value.y1}px`
|
|
894
646
|
}, {
|
|
895
|
-
left: `${
|
|
647
|
+
left: `${w.value.x1}px`
|
|
896
648
|
}, {
|
|
897
|
-
width: `${
|
|
649
|
+
width: `${w.value.x2 - w.value.x1}px`
|
|
898
650
|
}, {
|
|
899
|
-
height: `${
|
|
651
|
+
height: `${w.value.y2 - w.value.y1}px`
|
|
900
652
|
}, {
|
|
901
|
-
visibility:
|
|
653
|
+
visibility: d.value ? "visible" : "hidden"
|
|
902
654
|
}, {
|
|
903
|
-
"margin-left":
|
|
655
|
+
"margin-left": s.value === "center" ? P.value : ""
|
|
904
656
|
}],
|
|
905
657
|
tabindex: "0"
|
|
906
|
-
}, [
|
|
658
|
+
}, [H("div", {
|
|
907
659
|
class: "farris-image-cropper-move",
|
|
908
|
-
onMousedown:
|
|
909
|
-
}, null), !
|
|
660
|
+
onMousedown: O((C) => E(C, V.Move, "topleft"), ["prevent"])
|
|
661
|
+
}, null), !g.value && H("div", null, [q, j])])]), F.value && H("div", {
|
|
910
662
|
class: "farris-image-cropper-loading"
|
|
911
|
-
}, [
|
|
663
|
+
}, [H("div", {
|
|
912
664
|
class: "farris-image-cropper-loading-spinner"
|
|
913
|
-
}, null)]), b &&
|
|
665
|
+
}, null)]), b && H("div", {
|
|
914
666
|
class: "farris-image-cropper-error"
|
|
915
667
|
}, [t.value])]);
|
|
916
668
|
}
|
|
917
669
|
});
|
|
918
|
-
|
|
919
|
-
a.component(
|
|
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;
|
|
670
|
+
le.install = (a) => {
|
|
671
|
+
a.component(le.name, le);
|
|
926
672
|
};
|
|
673
|
+
const ut = Ye(le);
|
|
927
674
|
export {
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
Ie as propsResolver
|
|
675
|
+
le as ImageCropper,
|
|
676
|
+
ut as default,
|
|
677
|
+
Xe as imageCropperProps
|
|
932
678
|
};
|