@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,117 +1,9 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import { withInstall as Ve } from "../common/index.esm.js";
|
|
8
|
-
const Ne = "https://json-schema.org/draft/2020-12/schema", Ee = "https://farris-design.gitee.io/color-picker.schema.json", Ae = "color-picker", Oe = "A Farris Component", Le = "object", je = {
|
|
9
|
-
id: {
|
|
10
|
-
description: "The unique identifier for color picker",
|
|
11
|
-
type: "string"
|
|
12
|
-
},
|
|
13
|
-
type: {
|
|
14
|
-
description: "The type string of color picker",
|
|
15
|
-
type: "string",
|
|
16
|
-
default: "color-picker"
|
|
17
|
-
},
|
|
18
|
-
appearance: {
|
|
19
|
-
description: "",
|
|
20
|
-
type: "object",
|
|
21
|
-
properties: {
|
|
22
|
-
class: {
|
|
23
|
-
type: "string"
|
|
24
|
-
},
|
|
25
|
-
style: {
|
|
26
|
-
type: "string"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
default: {}
|
|
30
|
-
},
|
|
31
|
-
binding: {
|
|
32
|
-
description: "",
|
|
33
|
-
type: "object",
|
|
34
|
-
default: {}
|
|
35
|
-
},
|
|
36
|
-
disable: {
|
|
37
|
-
type: "string",
|
|
38
|
-
default: !1
|
|
39
|
-
},
|
|
40
|
-
editable: {
|
|
41
|
-
description: "",
|
|
42
|
-
type: "boolean",
|
|
43
|
-
default: !0
|
|
44
|
-
},
|
|
45
|
-
placeholder: {
|
|
46
|
-
description: "",
|
|
47
|
-
type: "string",
|
|
48
|
-
default: ""
|
|
49
|
-
},
|
|
50
|
-
readonly: {
|
|
51
|
-
description: "",
|
|
52
|
-
type: "boolean",
|
|
53
|
-
default: !1
|
|
54
|
-
},
|
|
55
|
-
require: {
|
|
56
|
-
description: "",
|
|
57
|
-
type: "boolean",
|
|
58
|
-
default: !1
|
|
59
|
-
},
|
|
60
|
-
tabindex: {
|
|
61
|
-
description: "",
|
|
62
|
-
type: "number",
|
|
63
|
-
default: -1
|
|
64
|
-
},
|
|
65
|
-
visible: {
|
|
66
|
-
description: "",
|
|
67
|
-
type: "boolean",
|
|
68
|
-
default: !0
|
|
69
|
-
}
|
|
70
|
-
}, Fe = [
|
|
71
|
-
"id",
|
|
72
|
-
"type"
|
|
73
|
-
], Ue = {
|
|
74
|
-
$schema: Ne,
|
|
75
|
-
$id: Ee,
|
|
76
|
-
title: Ae,
|
|
77
|
-
description: Oe,
|
|
78
|
-
type: Le,
|
|
79
|
-
properties: je,
|
|
80
|
-
required: Fe
|
|
81
|
-
};
|
|
82
|
-
function qe(u, e, i) {
|
|
83
|
-
return e;
|
|
84
|
-
}
|
|
85
|
-
const De = /* @__PURE__ */ new Map([
|
|
86
|
-
["appearance", Me]
|
|
87
|
-
]), Xe = "color-picker", Ce = "A Farris Component", Ye = "object", Ge = {
|
|
88
|
-
basic: {
|
|
89
|
-
description: "Basic Infomation",
|
|
90
|
-
title: "基本信息",
|
|
91
|
-
properties: {
|
|
92
|
-
id: {
|
|
93
|
-
description: "组件标识",
|
|
94
|
-
title: "标识",
|
|
95
|
-
type: "string",
|
|
96
|
-
readonly: !0
|
|
97
|
-
},
|
|
98
|
-
type: {
|
|
99
|
-
description: "组件类型",
|
|
100
|
-
title: "控件类型",
|
|
101
|
-
type: "select",
|
|
102
|
-
editor: {
|
|
103
|
-
type: "waiting for modification",
|
|
104
|
-
enum: []
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}, We = {
|
|
110
|
-
title: Xe,
|
|
111
|
-
description: Ce,
|
|
112
|
-
type: Ye,
|
|
113
|
-
categories: Ge
|
|
114
|
-
}, ve = {
|
|
1
|
+
var ft = Object.defineProperty;
|
|
2
|
+
var vt = (c, t, i) => t in c ? ft(c, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : c[t] = i;
|
|
3
|
+
var e = (c, t, i) => vt(c, typeof t != "symbol" ? t + "" : t, i);
|
|
4
|
+
import { withInstall as mt } from "../common/index.esm.js";
|
|
5
|
+
import { ref as k, defineComponent as U, onMounted as G, watch as $, createVNode as y, withModifiers as j, createTextVNode as st, computed as L, onBeforeMount as yt, withDirectives as Y, vShow as C, vModelText as kt } from "vue";
|
|
6
|
+
const bt = {
|
|
115
7
|
/** 初始颜色 */
|
|
116
8
|
color: { type: String, default: "#e1e2e3" },
|
|
117
9
|
/** 禁用 */
|
|
@@ -123,12 +15,12 @@ const De = /* @__PURE__ */ new Map([
|
|
|
123
15
|
/** 颜色值变化事件 */
|
|
124
16
|
onValueChanged: { type: Function, default: () => {
|
|
125
17
|
} }
|
|
126
|
-
}
|
|
127
|
-
class
|
|
18
|
+
};
|
|
19
|
+
class W {
|
|
128
20
|
}
|
|
129
|
-
class
|
|
130
|
-
constructor(
|
|
131
|
-
super(), this.cyan =
|
|
21
|
+
class T extends W {
|
|
22
|
+
constructor(t, i, s, r) {
|
|
23
|
+
super(), this.cyan = t, this.magenta = i, this.yellow = s, this.black = r;
|
|
132
24
|
}
|
|
133
25
|
toString() {
|
|
134
26
|
return `cmyk(${this.getCyan()}%, ${this.getMagenta()}%, ${this.getYellow()}%, ${this.getBlack()}%)`;
|
|
@@ -146,12 +38,12 @@ class pe extends ie {
|
|
|
146
38
|
return Math.round(this.black);
|
|
147
39
|
}
|
|
148
40
|
}
|
|
149
|
-
class
|
|
150
|
-
constructor(
|
|
151
|
-
super(), this.hue =
|
|
41
|
+
class F extends W {
|
|
42
|
+
constructor(t, i, s, r) {
|
|
43
|
+
super(), this.hue = t, this.saturation = i, this.lightness = s, this.alpha = r;
|
|
152
44
|
}
|
|
153
|
-
toString(
|
|
154
|
-
return
|
|
45
|
+
toString(t = !0) {
|
|
46
|
+
return t ? `hsla(${this.getHue()}, ${this.getSaturation()}%, ${this.getLightness()}%, ${this.getAlpha()})` : `hsl(${this.getHue()}, ${this.getSaturation()}%, ${this.getLightness()}%)`;
|
|
155
47
|
}
|
|
156
48
|
getHue() {
|
|
157
49
|
return Math.round(this.hue);
|
|
@@ -166,12 +58,12 @@ class ee extends ie {
|
|
|
166
58
|
return Math.round(this.alpha * 100) / 100;
|
|
167
59
|
}
|
|
168
60
|
}
|
|
169
|
-
class
|
|
170
|
-
constructor(
|
|
171
|
-
super(), this.hue =
|
|
61
|
+
class q extends W {
|
|
62
|
+
constructor(t, i, s, r) {
|
|
63
|
+
super(), this.hue = t, this.saturation = i, this.value = s, this.alpha = r;
|
|
172
64
|
}
|
|
173
|
-
toString(
|
|
174
|
-
return
|
|
65
|
+
toString(t = !0) {
|
|
66
|
+
return t ? `hsva(${this.getHue()}, ${this.getSaturation()}%, ${this.getValue()}%, ${this.getAlpha()})` : `hsv(${this.getHue()}, ${this.getSaturation()}%, ${this.getValue()}%)`;
|
|
175
67
|
}
|
|
176
68
|
getHue() {
|
|
177
69
|
return Math.round(this.hue);
|
|
@@ -186,12 +78,12 @@ class te extends ie {
|
|
|
186
78
|
return Math.round(this.alpha * 100) / 100;
|
|
187
79
|
}
|
|
188
80
|
}
|
|
189
|
-
class
|
|
190
|
-
constructor(
|
|
191
|
-
super(), this.red =
|
|
81
|
+
class a extends W {
|
|
82
|
+
constructor(t, i, s, r) {
|
|
83
|
+
super(), this.red = t, this.green = i, this.blue = s, this.alpha = r;
|
|
192
84
|
}
|
|
193
|
-
toString(
|
|
194
|
-
return
|
|
85
|
+
toString(t = !0) {
|
|
86
|
+
return t ? `rgba(${this.getRed()}, ${this.getGreen()}, ${this.getBlue()}, ${this.getAlpha()})` : `rgb(${this.getRed()}, ${this.getGreen()}, ${this.getBlue()})`;
|
|
195
87
|
}
|
|
196
88
|
getRed() {
|
|
197
89
|
return Math.round(this.red);
|
|
@@ -206,12 +98,12 @@ class s extends ie {
|
|
|
206
98
|
return Math.round(this.alpha * 100) / 100;
|
|
207
99
|
}
|
|
208
100
|
}
|
|
209
|
-
const
|
|
101
|
+
const n = class n {
|
|
210
102
|
};
|
|
211
|
-
n
|
|
212
|
-
let
|
|
213
|
-
class
|
|
214
|
-
constructor(
|
|
103
|
+
e(n, "transparent", new a(0, 0, 0, 0)), e(n, "aliceblue", new a(240, 248, 255, 1)), e(n, "antiquewhite", new a(250, 235, 215, 1)), e(n, "aqua", new a(0, 255, 255, 1)), e(n, "aquamarine", new a(127, 255, 212, 1)), e(n, "azure", new a(240, 255, 255, 1)), e(n, "beige", new a(245, 245, 220, 1)), e(n, "bisque", new a(255, 228, 196, 1)), e(n, "black", new a(0, 0, 0, 1)), e(n, "blanchedalmond", new a(255, 235, 205, 1)), e(n, "blue", new a(0, 0, 255, 1)), e(n, "blueviolet", new a(138, 43, 226, 1)), e(n, "brown", new a(165, 42, 42, 1)), e(n, "burlywood", new a(222, 184, 135, 1)), e(n, "cadetblue", new a(95, 158, 160, 1)), e(n, "chartreuse", new a(127, 255, 0, 1)), e(n, "chocolate", new a(210, 105, 30, 1)), e(n, "coral", new a(255, 127, 80, 1)), e(n, "cornflowerblue", new a(100, 149, 237, 1)), e(n, "cornsilk", new a(255, 248, 220, 1)), e(n, "crimson", new a(220, 20, 60, 1)), e(n, "cyan", new a(0, 255, 255, 1)), e(n, "darkblue", new a(0, 0, 139, 1)), e(n, "darkcyan", new a(0, 139, 139, 1)), e(n, "darkgoldenrod", new a(184, 134, 11, 1)), e(n, "darkgray", new a(169, 169, 169, 1)), e(n, "darkgreen", new a(0, 100, 0, 1)), e(n, "darkgrey", n.darkgray), e(n, "darkkhaki", new a(189, 183, 107, 1)), e(n, "darkmagenta", new a(139, 0, 139, 1)), e(n, "darkolivegreen", new a(85, 107, 47, 1)), e(n, "darkorange", new a(255, 140, 0, 1)), e(n, "darkorchid", new a(153, 50, 204, 1)), e(n, "darkred", new a(139, 0, 0, 1)), e(n, "darksalmon", new a(233, 150, 122, 1)), e(n, "darkseagreen", new a(143, 188, 143, 1)), e(n, "darkslateblue", new a(72, 61, 139, 1)), e(n, "darkslategray", new a(47, 79, 79, 1)), e(n, "darkslategrey", n.darkslategray), e(n, "darkturquoise", new a(0, 206, 209, 1)), e(n, "darkviolet", new a(148, 0, 211, 1)), e(n, "deeppink", new a(255, 20, 147, 1)), e(n, "deepskyblue", new a(0, 191, 255, 1)), e(n, "dimgray", new a(105, 105, 105, 1)), e(n, "dimgrey", n.dimgray), e(n, "dodgerblue", new a(30, 144, 255, 1)), e(n, "firebrick", new a(178, 34, 34, 1)), e(n, "floralwhite", new a(255, 250, 240, 1)), e(n, "forestgreen", new a(34, 139, 34, 1)), e(n, "fuchsia", new a(255, 0, 255, 1)), e(n, "gainsboro", new a(220, 220, 220, 1)), e(n, "ghostwhite", new a(248, 248, 255, 1)), e(n, "gold", new a(255, 215, 0, 1)), e(n, "goldenrod", new a(218, 165, 32, 1)), e(n, "gray", new a(128, 128, 128, 1)), e(n, "grey", n.gray), e(n, "green", new a(0, 128, 0, 1)), e(n, "greenyellow", new a(173, 255, 47, 1)), e(n, "honeydew", new a(240, 255, 240, 1)), e(n, "hotpink", new a(255, 105, 180, 1)), e(n, "indianred", new a(205, 92, 92, 1)), e(n, "indigo", new a(75, 0, 130, 1)), e(n, "ivory", new a(255, 255, 240, 1)), e(n, "khaki", new a(240, 230, 140, 1)), e(n, "lavender", new a(230, 230, 250, 1)), e(n, "lavenderblush", new a(255, 240, 245, 1)), e(n, "lawngreen", new a(124, 252, 0, 1)), e(n, "lemonchiffon", new a(255, 250, 205, 1)), e(n, "lightblue", new a(173, 216, 230, 1)), e(n, "lightcoral", new a(240, 128, 128, 1)), e(n, "lightcyan", new a(224, 255, 255, 1)), e(n, "lightgoldenrodyellow", new a(250, 250, 210, 1)), e(n, "lightgray", new a(211, 211, 211, 1)), e(n, "lightgreen", new a(144, 238, 144, 1)), e(n, "lightgrey", n.lightgray), e(n, "lightpink", new a(255, 182, 193, 1)), e(n, "lightsalmon", new a(255, 160, 122, 1)), e(n, "lightseagreen", new a(32, 178, 170, 1)), e(n, "lightskyblue", new a(135, 206, 250, 1)), e(n, "lightslategray", new a(119, 136, 153, 1)), e(n, "lightslategrey", n.lightslategray), e(n, "lightsteelblue", new a(176, 196, 222, 1)), e(n, "lightyellow", new a(255, 255, 224, 1)), e(n, "lime", new a(0, 255, 0, 1)), e(n, "limegreen", new a(50, 205, 50, 1)), e(n, "linen", new a(250, 240, 230, 1)), e(n, "magenta", new a(255, 0, 255, 1)), e(n, "maroon", new a(128, 0, 0, 1)), e(n, "mediumaquamarine", new a(102, 205, 170, 1)), e(n, "mediumblue", new a(0, 0, 205, 1)), e(n, "mediumorchid", new a(186, 85, 211, 1)), e(n, "mediumpurple", new a(147, 112, 219, 1)), e(n, "mediumseagreen", new a(60, 179, 113, 1)), e(n, "mediumslateblue", new a(123, 104, 238, 1)), e(n, "mediumspringgreen", new a(0, 250, 154, 1)), e(n, "mediumturquoise", new a(72, 209, 204, 1)), e(n, "mediumvioletred", new a(199, 21, 133, 1)), e(n, "midnightblue", new a(25, 25, 112, 1)), e(n, "mintcream", new a(245, 255, 250, 1)), e(n, "mistyrose", new a(255, 228, 225, 1)), e(n, "moccasin", new a(255, 228, 181, 1)), e(n, "navajowhite", new a(255, 222, 173, 1)), e(n, "navy", new a(0, 0, 128, 1)), e(n, "oldlace", new a(253, 245, 230, 1)), e(n, "olive", new a(128, 128, 0, 1)), e(n, "olivedrab", new a(107, 142, 35, 1)), e(n, "orange", new a(255, 165, 0, 1)), e(n, "orangered", new a(255, 69, 0, 1)), e(n, "orchid", new a(218, 112, 214, 1)), e(n, "palegoldenrod", new a(238, 232, 170, 1)), e(n, "palegreen", new a(152, 251, 152, 1)), e(n, "paleturquoise", new a(175, 238, 238, 1)), e(n, "palevioletred", new a(219, 112, 147, 1)), e(n, "papayawhip", new a(255, 239, 213, 1)), e(n, "peachpuff", new a(255, 218, 185, 1)), e(n, "peru", new a(205, 133, 63, 1)), e(n, "pink", new a(255, 192, 203, 1)), e(n, "plum", new a(221, 160, 221, 1)), e(n, "powderblue", new a(176, 224, 230, 1)), e(n, "purple", new a(128, 0, 128, 1)), e(n, "red", new a(255, 0, 0, 1)), e(n, "rosybrown", new a(188, 143, 143, 1)), e(n, "royalblue", new a(65, 105, 225, 1)), e(n, "saddlebrown", new a(139, 69, 19, 1)), e(n, "salmon", new a(250, 128, 114, 1)), e(n, "sandybrown", new a(244, 164, 96, 1)), e(n, "seagreen", new a(46, 139, 87, 1)), e(n, "seashell", new a(255, 245, 238, 1)), e(n, "sienna", new a(160, 82, 45, 1)), e(n, "silver", new a(192, 192, 192, 1)), e(n, "skyblue", new a(135, 206, 235, 1)), e(n, "slateblue", new a(106, 90, 205, 1)), e(n, "slategray", new a(112, 128, 144, 1)), e(n, "slategrey", n.slategray), e(n, "snow", new a(255, 250, 250, 1)), e(n, "springgreen", new a(0, 255, 127, 1)), e(n, "steelblue", new a(70, 130, 180, 1)), e(n, "tan", new a(210, 180, 140, 1)), e(n, "teal", new a(0, 128, 128, 1)), e(n, "thistle", new a(216, 191, 216, 1)), e(n, "tomato", new a(255, 99, 71, 1)), e(n, "turquoise", new a(64, 224, 208, 1)), e(n, "violet", new a(238, 130, 238, 1)), e(n, "wheat", new a(245, 222, 179, 1)), e(n, "white", new a(255, 255, 255, 1)), e(n, "whitesmoke", new a(245, 245, 245, 1)), e(n, "yellow", new a(255, 255, 0, 1)), e(n, "yellowgreen", new a(154, 205, 50, 1));
|
|
104
|
+
let _ = n;
|
|
105
|
+
class P {
|
|
106
|
+
constructor(t) {
|
|
215
107
|
/**
|
|
216
108
|
* base color used to calculate other
|
|
217
109
|
* default color
|
|
@@ -219,51 +111,51 @@ class I {
|
|
|
219
111
|
* hsl(0, 100%, 50%)
|
|
220
112
|
* 初始色#ff0000
|
|
221
113
|
*/
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
114
|
+
e(this, "hsva", new q(0, 1, 1, 1));
|
|
115
|
+
e(this, "rgba", new a(255, 0, 0, 1));
|
|
116
|
+
t && this.stringToColor(t);
|
|
225
117
|
}
|
|
226
|
-
static from(
|
|
227
|
-
return typeof
|
|
118
|
+
static from(t) {
|
|
119
|
+
return typeof t == "string" ? new P(t) : t instanceof P ? t.clone() : t instanceof a ? new P().setRgba(t.red, t.green, t.blue, t.alpha) : t instanceof q ? new P().setHsva(t.hue, t.saturation, t.value, t.alpha) : t instanceof F ? new P().setHsla(t.hue, t.saturation, t.lightness, t.alpha) : new P(t);
|
|
228
120
|
}
|
|
229
121
|
/**
|
|
230
122
|
* make from existing color new color object
|
|
231
123
|
*/
|
|
232
124
|
clone() {
|
|
233
|
-
return
|
|
125
|
+
return P.from(this.getRgba());
|
|
234
126
|
}
|
|
235
127
|
/**
|
|
236
128
|
* define Color from hex, rgb, rgba, hsl, hsla or cmyk string
|
|
237
129
|
*/
|
|
238
|
-
setFromString(
|
|
239
|
-
return this.stringToColor(
|
|
130
|
+
setFromString(t) {
|
|
131
|
+
return this.stringToColor(t);
|
|
240
132
|
}
|
|
241
133
|
/**
|
|
242
134
|
* define Color from HSV values
|
|
243
135
|
*/
|
|
244
|
-
setHsva(
|
|
245
|
-
return
|
|
136
|
+
setHsva(t, i = 100, s = 100, r = 1) {
|
|
137
|
+
return t != null && (this.hsva.hue = t), i != null && (this.hsva.saturation = i), s != null && (this.hsva.value = s), r != null && (r = r > 1 ? 1 : r < 0 ? 0 : r, this.hsva.alpha = r), this.rgba = this.hsvaToRgba(this.hsva), this;
|
|
246
138
|
}
|
|
247
139
|
/**
|
|
248
140
|
* define Color from RGBa
|
|
249
141
|
*/
|
|
250
|
-
setRgba(
|
|
251
|
-
return
|
|
142
|
+
setRgba(t, i, s, r = 1) {
|
|
143
|
+
return t != null && (this.rgba.red = t), i != null && (this.rgba.green = i), s != null && (this.rgba.blue = s), r != null && (r = r > 1 ? 1 : r < 0 ? 0 : r, this.rgba.alpha = r), this.hsva = this.rgbaToHsva(this.rgba), this;
|
|
252
144
|
}
|
|
253
145
|
/**
|
|
254
146
|
* define Color from HSLa
|
|
255
147
|
*/
|
|
256
|
-
setHsla(
|
|
148
|
+
setHsla(t, i, s, r = 1) {
|
|
257
149
|
r != null && (r = r > 1 ? 1 : r < 0 ? 0 : r, this.rgba.alpha = r);
|
|
258
|
-
const
|
|
259
|
-
return this.rgba = this.hslaToRgba(
|
|
150
|
+
const v = new F(t, i, s, r);
|
|
151
|
+
return this.rgba = this.hslaToRgba(v), this.hsva = this.rgbaToHsva(this.rgba), this;
|
|
260
152
|
}
|
|
261
153
|
/**
|
|
262
154
|
* return hexadecimal value formatted as '#341d2a' or '#341d2aFF' if alhpa channel is enabled
|
|
263
155
|
*/
|
|
264
|
-
toHexString(
|
|
156
|
+
toHexString(t = !1) {
|
|
265
157
|
let i = "#" + (16777216 | this.rgba.getRed() << 16 | this.rgba.getGreen() << 8 | this.rgba.getBlue()).toString(16).substr(1);
|
|
266
|
-
return
|
|
158
|
+
return t && (i += (256 | Math.round(this.rgba.alpha * 255)).toString(16).substr(1)), i.toUpperCase();
|
|
267
159
|
}
|
|
268
160
|
/**
|
|
269
161
|
* return rgba string formatted as rgba(52, 29, 42, 1)
|
|
@@ -308,10 +200,10 @@ class I {
|
|
|
308
200
|
return this.getCmyk().toString();
|
|
309
201
|
}
|
|
310
202
|
getHsva() {
|
|
311
|
-
return new
|
|
203
|
+
return new q(this.hsva.hue, this.hsva.saturation, this.hsva.value, this.hsva.alpha);
|
|
312
204
|
}
|
|
313
205
|
getRgba() {
|
|
314
|
-
return new
|
|
206
|
+
return new a(this.rgba.red, this.rgba.green, this.rgba.blue, this.rgba.alpha);
|
|
315
207
|
}
|
|
316
208
|
getHsla() {
|
|
317
209
|
return this.rgbaToHsla(this.rgba);
|
|
@@ -319,78 +211,78 @@ class I {
|
|
|
319
211
|
getCmyk() {
|
|
320
212
|
return this.rgbaToCmyk(this.rgba);
|
|
321
213
|
}
|
|
322
|
-
hsvaToHsla(
|
|
323
|
-
const { hue: i } =
|
|
324
|
-
return new
|
|
214
|
+
hsvaToHsla(t) {
|
|
215
|
+
const { hue: i } = t, s = t.saturation / 100, r = t.value / 100, v = (2 - s) * t.value / 2, u = s * r / (v <= 1 ? v : 2 - v) || 0;
|
|
216
|
+
return new F(i, v * 100, u * 100, t.alpha);
|
|
325
217
|
}
|
|
326
|
-
hslaToHsva(
|
|
327
|
-
const { hue: i } =
|
|
328
|
-
return new
|
|
218
|
+
hslaToHsva(t) {
|
|
219
|
+
const { hue: i } = t, s = t.lightness / 100 * 2, r = t.saturation / 100 * (s <= 1 ? s : 2 - s), v = (s + r) / 2, u = 2 * r / (s + r) || 0;
|
|
220
|
+
return new q(i, u, v, t.alpha);
|
|
329
221
|
}
|
|
330
|
-
rgbaToHsva(
|
|
331
|
-
const i =
|
|
332
|
-
let
|
|
333
|
-
if (
|
|
334
|
-
switch (
|
|
222
|
+
rgbaToHsva(t) {
|
|
223
|
+
const i = t.red / 255, s = t.green / 255, r = t.blue / 255, { alpha: v } = t, u = Math.max(i, s, r), d = Math.min(i, s, r), p = u - d;
|
|
224
|
+
let g = 0, l = u === 0 ? 0 : p / u, o = u;
|
|
225
|
+
if (u !== d) {
|
|
226
|
+
switch (u) {
|
|
335
227
|
case i:
|
|
336
|
-
|
|
228
|
+
g = (s - r) / p + (s < r ? 6 : 0);
|
|
337
229
|
break;
|
|
338
|
-
case
|
|
339
|
-
|
|
230
|
+
case s:
|
|
231
|
+
g = 2 + (r - i) / p;
|
|
340
232
|
break;
|
|
341
233
|
case r:
|
|
342
|
-
|
|
234
|
+
g = 4 + (i - s) / p;
|
|
343
235
|
break;
|
|
344
236
|
}
|
|
345
|
-
|
|
237
|
+
g /= 6;
|
|
346
238
|
}
|
|
347
|
-
return
|
|
239
|
+
return g *= 360, l *= 100, o *= 100, new q(g, l, o, v);
|
|
348
240
|
}
|
|
349
|
-
hsvaToRgba(
|
|
350
|
-
let i = 1,
|
|
351
|
-
const
|
|
352
|
-
switch (
|
|
241
|
+
hsvaToRgba(t) {
|
|
242
|
+
let i = 1, s = 0, r = 0;
|
|
243
|
+
const v = t.saturation / 100, u = t.value / 100, { alpha: d } = t, p = t.hue / 60, g = Math.floor(p), l = p - g, o = (1 - v) * u, f = (1 - v * l) * u, b = (1 - v * (1 - l)) * u;
|
|
244
|
+
switch (g) {
|
|
353
245
|
case 6:
|
|
354
246
|
case 0:
|
|
355
|
-
i =
|
|
247
|
+
i = u, s = b, r = o;
|
|
356
248
|
break;
|
|
357
249
|
case 1:
|
|
358
|
-
i =
|
|
250
|
+
i = f, s = u, r = o;
|
|
359
251
|
break;
|
|
360
252
|
case 2:
|
|
361
|
-
i =
|
|
253
|
+
i = o, s = u, r = b;
|
|
362
254
|
break;
|
|
363
255
|
case 3:
|
|
364
|
-
i =
|
|
256
|
+
i = o, s = f, r = u;
|
|
365
257
|
break;
|
|
366
258
|
case 4:
|
|
367
|
-
i =
|
|
259
|
+
i = b, s = o, r = u;
|
|
368
260
|
break;
|
|
369
261
|
case 5:
|
|
370
|
-
i =
|
|
262
|
+
i = u, s = o, r = f;
|
|
371
263
|
break;
|
|
372
264
|
}
|
|
373
|
-
return i *= 255,
|
|
374
|
-
}
|
|
375
|
-
rgbaToHsla(
|
|
376
|
-
const i =
|
|
377
|
-
let
|
|
378
|
-
const
|
|
379
|
-
if (
|
|
380
|
-
switch (
|
|
265
|
+
return i *= 255, s *= 255, r *= 255, new a(i, s, r, d);
|
|
266
|
+
}
|
|
267
|
+
rgbaToHsla(t) {
|
|
268
|
+
const i = t.red / 255, s = t.green / 255, r = t.blue / 255, { alpha: v } = t, u = Math.max(i, s, r), d = Math.min(i, s, r);
|
|
269
|
+
let p = 0, g = 0, l = (u + d) / 2;
|
|
270
|
+
const o = u - d;
|
|
271
|
+
if (u !== d) {
|
|
272
|
+
switch (g = l > 0.5 ? o / (2 - u - d) : o / (u + d), u) {
|
|
381
273
|
case i:
|
|
382
|
-
|
|
274
|
+
p = (s - r) / o + (s < r ? 6 : 0);
|
|
383
275
|
break;
|
|
384
|
-
case
|
|
385
|
-
|
|
276
|
+
case s:
|
|
277
|
+
p = (r - i) / o + 2;
|
|
386
278
|
break;
|
|
387
279
|
case r:
|
|
388
|
-
|
|
280
|
+
p = (i - s) / o + 4;
|
|
389
281
|
break;
|
|
390
282
|
}
|
|
391
|
-
|
|
283
|
+
p /= 6;
|
|
392
284
|
}
|
|
393
|
-
return
|
|
285
|
+
return p *= 360, g *= 100, l *= 100, new F(p, g, l, v);
|
|
394
286
|
}
|
|
395
287
|
/**
|
|
396
288
|
* convert rgb color from HSLa
|
|
@@ -399,17 +291,17 @@ class I {
|
|
|
399
291
|
* saturation = 0 => 1
|
|
400
292
|
* lightness = 0 => 1
|
|
401
293
|
*/
|
|
402
|
-
hslaToRgba(
|
|
403
|
-
const i =
|
|
404
|
-
let
|
|
405
|
-
if (
|
|
406
|
-
const
|
|
407
|
-
|
|
294
|
+
hslaToRgba(t) {
|
|
295
|
+
const i = t.hue / 360, s = t.saturation / 100, r = t.lightness / 100, { alpha: v } = t;
|
|
296
|
+
let u = r, d = r, p = r;
|
|
297
|
+
if (s !== 0) {
|
|
298
|
+
const g = r < 0.5 ? r * (1 + s) : r + s - r * s, l = 2 * r - g;
|
|
299
|
+
u = this.hueToRgb(l, g, i + 1 / 3), d = this.hueToRgb(l, g, i), p = this.hueToRgb(l, g, i - 1 / 3);
|
|
408
300
|
}
|
|
409
|
-
return
|
|
301
|
+
return u *= 255, d *= 255, p *= 255, new a(u, d, p, v);
|
|
410
302
|
}
|
|
411
|
-
hueToRgb(
|
|
412
|
-
return
|
|
303
|
+
hueToRgb(t, i, s) {
|
|
304
|
+
return s < 0 && (s += 1), s > 1 && (s -= 1), s < 1 / 6 ? t + (i - t) * 6 * s : s < 1 / 2 ? i : s < 2 / 3 ? t + (i - t) * (2 / 3 - s) * 6 : t;
|
|
413
305
|
}
|
|
414
306
|
/**
|
|
415
307
|
* The Red, Green, Blue values are given in the range of 0..255,
|
|
@@ -424,10 +316,10 @@ class I {
|
|
|
424
316
|
* Green = 255 × 1 - min(1 - Magenta ÷ 100) × (1 - Black)
|
|
425
317
|
* Blue = 255 × 1 - min(1 - Yellow ÷ 100) × (1 - Black)
|
|
426
318
|
*/
|
|
427
|
-
cmykToRgba(
|
|
428
|
-
const i =
|
|
429
|
-
let
|
|
430
|
-
return
|
|
319
|
+
cmykToRgba(t) {
|
|
320
|
+
const i = t.black / 100, s = t.cyan / 100, r = t.magenta / 100, v = t.yellow / 100;
|
|
321
|
+
let u = Math.min(1, (1 - s) * (1 - i)), d = Math.min(1, (1 - r) * (1 - i)), p = Math.min(1, (1 - v) * (1 - i));
|
|
322
|
+
return u *= 255, d *= 255, p *= 255, new a(u, d, p, 1);
|
|
431
323
|
}
|
|
432
324
|
/**
|
|
433
325
|
* The max number of R, G, B values are 255, first of all, we divided them by 255 to become the number
|
|
@@ -452,118 +344,118 @@ class I {
|
|
|
452
344
|
* The yellow color(Y) is calculated from the blue and black colors:
|
|
453
345
|
* Y = (1 - Bc - K) ÷ ( 1 - K)
|
|
454
346
|
*/
|
|
455
|
-
rgbaToCmyk(
|
|
456
|
-
const i =
|
|
457
|
-
let
|
|
458
|
-
return
|
|
347
|
+
rgbaToCmyk(t) {
|
|
348
|
+
const i = t.red / 255, s = t.green / 255, r = t.blue / 255;
|
|
349
|
+
let v = 1 - i, u = 1 - s, d = 1 - r, p = Math.min(v, u, d);
|
|
350
|
+
return p === 1 ? new T(0, 0, 0, 1) : (v = (v - p) / (1 - p), u = (u - p) / (1 - p), d = (d - p) / (1 - p), p *= 100, v *= 100, u *= 100, d *= 100, new T(v, u, d, p));
|
|
459
351
|
}
|
|
460
|
-
roundNumber(
|
|
461
|
-
return Math.round(
|
|
352
|
+
roundNumber(t) {
|
|
353
|
+
return Math.round(t * 100) / 100;
|
|
462
354
|
}
|
|
463
|
-
stringToColor(
|
|
464
|
-
const i =
|
|
465
|
-
let
|
|
355
|
+
stringToColor(t) {
|
|
356
|
+
const i = t.replace(/ /g, "").toLowerCase();
|
|
357
|
+
let s = _[t] || null;
|
|
466
358
|
if (i[0] === "#") {
|
|
467
|
-
let
|
|
468
|
-
const { length:
|
|
469
|
-
let
|
|
470
|
-
if (
|
|
471
|
-
|
|
472
|
-
else if (
|
|
473
|
-
|
|
474
|
-
else if (
|
|
475
|
-
const
|
|
476
|
-
|
|
359
|
+
let u = i.substr(1);
|
|
360
|
+
const { length: d } = u;
|
|
361
|
+
let p = 1, g;
|
|
362
|
+
if (d === 3)
|
|
363
|
+
g = u.split("").map((l) => l + l);
|
|
364
|
+
else if (d === 6)
|
|
365
|
+
g = u.match(/.{2}/g);
|
|
366
|
+
else if (d === 8) {
|
|
367
|
+
const l = u.substr(-2);
|
|
368
|
+
u = u.substr(0, d - 2), p = this.roundNumber(parseInt(l || "FF", 16) / 255), g = u.match(/.{2}/g);
|
|
477
369
|
}
|
|
478
|
-
|
|
370
|
+
g && g.length === 3 && (s = new a(parseInt(g[0], 16), parseInt(g[1], 16), parseInt(g[2], 16), p));
|
|
479
371
|
}
|
|
480
|
-
const r = i.indexOf("("),
|
|
481
|
-
if (r !== -1 &&
|
|
482
|
-
const
|
|
483
|
-
let
|
|
484
|
-
switch (
|
|
372
|
+
const r = i.indexOf("("), v = i.indexOf(")");
|
|
373
|
+
if (r !== -1 && v + 1 === i.length) {
|
|
374
|
+
const u = i.substr(0, r), d = i.substr(r + 1, v - (r + 1)).split(",");
|
|
375
|
+
let p = 1, g, l;
|
|
376
|
+
switch (u) {
|
|
485
377
|
case "rgba":
|
|
486
|
-
|
|
378
|
+
p = parseFloat(d.pop());
|
|
487
379
|
case "rgb":
|
|
488
|
-
|
|
380
|
+
s = new a(parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10), p);
|
|
489
381
|
break;
|
|
490
382
|
case "hsla":
|
|
491
|
-
|
|
383
|
+
p = parseFloat(d.pop());
|
|
492
384
|
break;
|
|
493
385
|
case "hsl":
|
|
494
|
-
|
|
495
|
-
parseInt(
|
|
496
|
-
parseInt(
|
|
497
|
-
parseInt(
|
|
498
|
-
|
|
499
|
-
),
|
|
386
|
+
g = new F(
|
|
387
|
+
parseInt(d[0], 10),
|
|
388
|
+
parseInt(d[1], 10),
|
|
389
|
+
parseInt(d[2], 10),
|
|
390
|
+
p
|
|
391
|
+
), s = this.hslaToRgba(g);
|
|
500
392
|
break;
|
|
501
393
|
case "cmyk":
|
|
502
|
-
|
|
503
|
-
parseInt(
|
|
504
|
-
parseInt(
|
|
505
|
-
parseInt(
|
|
506
|
-
parseInt(
|
|
507
|
-
),
|
|
394
|
+
l = new T(
|
|
395
|
+
parseInt(d[0], 10),
|
|
396
|
+
parseInt(d[1], 10),
|
|
397
|
+
parseInt(d[2], 10),
|
|
398
|
+
parseInt(d[3], 10)
|
|
399
|
+
), s = this.cmykToRgba(l);
|
|
508
400
|
break;
|
|
509
401
|
}
|
|
510
402
|
}
|
|
511
|
-
return
|
|
403
|
+
return s && (this.rgba = s, this.hsva = this.rgbaToHsva(s)), this;
|
|
512
404
|
}
|
|
513
405
|
}
|
|
514
|
-
var
|
|
515
|
-
class
|
|
516
|
-
constructor(
|
|
406
|
+
var x = /* @__PURE__ */ ((c) => (c.hex = "hex", c.hexa = "hexa", c.rgba = "rgba", c.rgb = "rgb", c.hsla = "hsla", c.hsl = "hsl", c.cmyk = "cmyk", c))(x || {});
|
|
407
|
+
class it {
|
|
408
|
+
constructor(t) {
|
|
517
409
|
/** 所选颜色值 */
|
|
518
|
-
|
|
410
|
+
e(this, "modelValue", null);
|
|
519
411
|
/** 色调颜色值 */
|
|
520
|
-
|
|
412
|
+
e(this, "hueValue", null);
|
|
521
413
|
/** 初始颜色值 */
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
414
|
+
e(this, "initValue", null);
|
|
415
|
+
e(this, "valueChanged", k());
|
|
416
|
+
e(this, "initType", null);
|
|
525
417
|
// 此处没有监听变量变更后操作的方法 TODO
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
const i =
|
|
529
|
-
this.setValue(
|
|
418
|
+
e(this, "alphaChannelVisibilityChanges", k());
|
|
419
|
+
e(this, "colorPresets", []);
|
|
420
|
+
const i = t[0], s = P.from(i);
|
|
421
|
+
this.setValue(s), this.setHueColor(s);
|
|
530
422
|
}
|
|
531
423
|
/** 设置值 */
|
|
532
|
-
setValueFrom(
|
|
533
|
-
const r =
|
|
534
|
-
return this.initValue || (this.initValue =
|
|
424
|
+
setValueFrom(t, i, s) {
|
|
425
|
+
const r = P.from(t);
|
|
426
|
+
return this.initValue || (this.initValue = P.from(t)), typeof t == "string" && this.finOutInputType(t), this.setHueColor(r), this.setValue(r), this;
|
|
535
427
|
}
|
|
536
|
-
setHueColor(
|
|
537
|
-
(this.hueValue &&
|
|
428
|
+
setHueColor(t) {
|
|
429
|
+
(this.hueValue && t.getHsva().hue > 0 || !this.hueValue) && (this.hueValue = new P().setHsva(t.getHsva().hue));
|
|
538
430
|
}
|
|
539
431
|
get hue() {
|
|
540
432
|
return this.hueValue;
|
|
541
433
|
}
|
|
542
|
-
set hue(
|
|
543
|
-
this.hueValue =
|
|
434
|
+
set hue(t) {
|
|
435
|
+
this.hueValue = t;
|
|
544
436
|
}
|
|
545
|
-
setValue(
|
|
437
|
+
setValue(t) {
|
|
546
438
|
var i;
|
|
547
|
-
return this.modelValue =
|
|
439
|
+
return this.modelValue = t, (t == null ? void 0 : t.toRgbaString()) === ((i = this.valueChanged.value) == null ? void 0 : i.toRgbaString()) && (this.valueChanged.value = t), this;
|
|
548
440
|
}
|
|
549
441
|
get value() {
|
|
550
442
|
return this.modelValue;
|
|
551
443
|
}
|
|
552
|
-
set value(
|
|
553
|
-
this.setValue(
|
|
444
|
+
set value(t) {
|
|
445
|
+
this.setValue(t);
|
|
554
446
|
}
|
|
555
447
|
reset() {
|
|
556
|
-
let
|
|
557
|
-
return this.initValue ? (
|
|
448
|
+
let t;
|
|
449
|
+
return this.initValue ? (t = this.initValue.clone(), this.setHueColor(t)) : (t = P.from(new a(255, 0, 0, 1)), this.hueValue = new P().setHsva(t.getHsva().hue)), this.setValue(t), this;
|
|
558
450
|
}
|
|
559
451
|
showAlphaChannel() {
|
|
560
452
|
return this.alphaChannelVisibilityChanges.value = !0, this;
|
|
561
453
|
}
|
|
562
|
-
finOutInputType(
|
|
563
|
-
const i =
|
|
454
|
+
finOutInputType(t) {
|
|
455
|
+
const i = t.replace(/ /g, "").toLowerCase();
|
|
564
456
|
i[0] === "#" && (this.initType = "hex", i.length > 7 && (this.initType = "hexa"));
|
|
565
|
-
const
|
|
566
|
-
switch (i.substr(0,
|
|
457
|
+
const s = i.indexOf("(");
|
|
458
|
+
switch (i.substr(0, s)) {
|
|
567
459
|
case "rgba":
|
|
568
460
|
this.initType = "rgba";
|
|
569
461
|
break;
|
|
@@ -582,13 +474,13 @@ class me {
|
|
|
582
474
|
}
|
|
583
475
|
}
|
|
584
476
|
/** 设置预定义颜色 */
|
|
585
|
-
setColorPresets(
|
|
586
|
-
return this.colorPresets = this.setPresets(
|
|
477
|
+
setColorPresets(t) {
|
|
478
|
+
return this.colorPresets = this.setPresets(t), this;
|
|
587
479
|
}
|
|
588
|
-
setPresets(
|
|
480
|
+
setPresets(t) {
|
|
589
481
|
const i = [];
|
|
590
|
-
return
|
|
591
|
-
Array.isArray(
|
|
482
|
+
return t.map((s) => {
|
|
483
|
+
Array.isArray(s) ? i.push(this.setPresets(s)) : i.push(new P(s));
|
|
592
484
|
}), i;
|
|
593
485
|
}
|
|
594
486
|
get presets() {
|
|
@@ -599,101 +491,101 @@ class me {
|
|
|
599
491
|
}
|
|
600
492
|
}
|
|
601
493
|
/** 确定输入颜色类型 */
|
|
602
|
-
|
|
603
|
-
function
|
|
604
|
-
if (!
|
|
494
|
+
e(it, "finOutInputType");
|
|
495
|
+
function O(c, t) {
|
|
496
|
+
if (!c)
|
|
605
497
|
return "";
|
|
606
|
-
switch (
|
|
607
|
-
case
|
|
608
|
-
return
|
|
609
|
-
case
|
|
610
|
-
return
|
|
611
|
-
case
|
|
612
|
-
return
|
|
613
|
-
case
|
|
614
|
-
return
|
|
615
|
-
case
|
|
616
|
-
return
|
|
617
|
-
case
|
|
618
|
-
return
|
|
498
|
+
switch (t) {
|
|
499
|
+
case x.hex:
|
|
500
|
+
return c.toHexString();
|
|
501
|
+
case x.hexa:
|
|
502
|
+
return c.toHexString(!0);
|
|
503
|
+
case x.rgb:
|
|
504
|
+
return c.toRgbString();
|
|
505
|
+
case x.rgba:
|
|
506
|
+
return c.toRgbaString();
|
|
507
|
+
case x.hsl:
|
|
508
|
+
return c.toHslString();
|
|
509
|
+
case x.hsla:
|
|
510
|
+
return c.toHslaString();
|
|
619
511
|
default:
|
|
620
|
-
return
|
|
512
|
+
return c.toRgbaString();
|
|
621
513
|
}
|
|
622
514
|
}
|
|
623
|
-
const
|
|
515
|
+
const Pt = {
|
|
624
516
|
color: { type: Object, default: "" },
|
|
625
517
|
hue: { type: Object, default: "" },
|
|
626
518
|
randomId: { type: String, default: "" },
|
|
627
519
|
allowColorNull: { type: Boolean, default: !1 }
|
|
628
|
-
},
|
|
520
|
+
}, Ht = /* @__PURE__ */ U({
|
|
629
521
|
name: "SvPanel",
|
|
630
|
-
props:
|
|
522
|
+
props: Pt,
|
|
631
523
|
emits: ["update:color"],
|
|
632
|
-
setup(
|
|
633
|
-
const i =
|
|
634
|
-
function
|
|
635
|
-
return
|
|
636
|
-
}
|
|
637
|
-
function
|
|
638
|
-
var
|
|
639
|
-
|
|
640
|
-
}
|
|
641
|
-
function
|
|
642
|
-
const
|
|
643
|
-
|
|
644
|
-
const
|
|
645
|
-
|
|
646
|
-
}
|
|
647
|
-
function
|
|
648
|
-
x:
|
|
649
|
-
y:
|
|
650
|
-
height:
|
|
651
|
-
width:
|
|
524
|
+
setup(c, t) {
|
|
525
|
+
const i = k(null), s = k(null), r = k(c.randomId), v = k(c.allowColorNull);
|
|
526
|
+
function u() {
|
|
527
|
+
return c.hue ? c.hue.toRgbaString() : "#3f51b5";
|
|
528
|
+
}
|
|
529
|
+
function d(o, f) {
|
|
530
|
+
var b, w;
|
|
531
|
+
o = Math.max(0, Math.min(o, 100)), f = Math.max(0, Math.min(f, 100)), i.value && ((b = i.value.style) == null || b.setProperty("top", `${100 - f}%`), (w = i.value.style) == null || w.setProperty("left", `${o}%`));
|
|
532
|
+
}
|
|
533
|
+
function p() {
|
|
534
|
+
const o = document.getElementById(`farris-color-picker-plus-sure-${r.value}`);
|
|
535
|
+
o.className = "btn btn-secondary";
|
|
536
|
+
const f = document.getElementById(`farris-color-picker-plus-input-${r.value}`);
|
|
537
|
+
f.style.borderColor = "#dcdfe6";
|
|
538
|
+
}
|
|
539
|
+
function g({
|
|
540
|
+
x: o,
|
|
541
|
+
y: f,
|
|
542
|
+
height: b,
|
|
543
|
+
width: w
|
|
652
544
|
}) {
|
|
653
|
-
const
|
|
654
|
-
|
|
655
|
-
const
|
|
656
|
-
if (
|
|
657
|
-
const
|
|
658
|
-
|
|
545
|
+
const m = o * 100 / w, M = -(f * 100 / b) + 100;
|
|
546
|
+
d(m, M);
|
|
547
|
+
const H = c.color == null ? "transparent" : c.color, I = P.from(H);
|
|
548
|
+
if (p(), I != null) {
|
|
549
|
+
const B = c.hue.getHsva(), V = I.getHsva(), N = new P().setHsva(B.hue, m, M, V.alpha);
|
|
550
|
+
t.emit("update:color", N);
|
|
659
551
|
}
|
|
660
|
-
!
|
|
552
|
+
!I && v.value && t.emit("update:color", null);
|
|
661
553
|
}
|
|
662
|
-
function
|
|
663
|
-
if (
|
|
554
|
+
function l(o) {
|
|
555
|
+
if (s.value) {
|
|
664
556
|
const {
|
|
665
|
-
width:
|
|
666
|
-
height:
|
|
667
|
-
top:
|
|
668
|
-
left:
|
|
669
|
-
} =
|
|
557
|
+
width: f,
|
|
558
|
+
height: b,
|
|
559
|
+
top: w,
|
|
560
|
+
left: m
|
|
561
|
+
} = s.value.getBoundingClientRect(), {
|
|
670
562
|
pageX: M,
|
|
671
|
-
pageY:
|
|
672
|
-
} = "touches" in
|
|
673
|
-
|
|
674
|
-
x:
|
|
675
|
-
y:
|
|
676
|
-
height:
|
|
677
|
-
width:
|
|
563
|
+
pageY: H
|
|
564
|
+
} = "touches" in o ? o.touches[0] : o, I = Math.max(0, Math.min(M - (m + window.pageXOffset), f)), B = Math.max(0, Math.min(H - (w + window.pageYOffset), b));
|
|
565
|
+
g({
|
|
566
|
+
x: I,
|
|
567
|
+
y: B,
|
|
568
|
+
height: b,
|
|
569
|
+
width: f
|
|
678
570
|
});
|
|
679
571
|
}
|
|
680
572
|
}
|
|
681
|
-
return
|
|
682
|
-
const
|
|
683
|
-
|
|
684
|
-
}),
|
|
685
|
-
|
|
686
|
-
}),
|
|
687
|
-
const
|
|
688
|
-
|
|
573
|
+
return G(() => {
|
|
574
|
+
const o = c.color.getHsva();
|
|
575
|
+
d(o.saturation, o.value);
|
|
576
|
+
}), $(() => c.color, (o) => {
|
|
577
|
+
o.getHsva();
|
|
578
|
+
}), $(() => c.color, (o) => {
|
|
579
|
+
const f = o.getHsva();
|
|
580
|
+
d(f.saturation, f.value);
|
|
689
581
|
}), () => y("div", {
|
|
690
582
|
class: "f-sv-panel-component",
|
|
691
|
-
ref:
|
|
583
|
+
ref: s,
|
|
692
584
|
style: {
|
|
693
|
-
backgroundColor:
|
|
585
|
+
backgroundColor: u()
|
|
694
586
|
},
|
|
695
|
-
onMousedown:
|
|
696
|
-
onTouchstart:
|
|
587
|
+
onMousedown: j((o) => l(o), ["prevent"]),
|
|
588
|
+
onTouchstart: j((o) => l(o), ["prevent"])
|
|
697
589
|
}, [y("div", {
|
|
698
590
|
class: "color-svpanel__white"
|
|
699
591
|
}, null), y("div", {
|
|
@@ -703,603 +595,401 @@ const ze = {
|
|
|
703
595
|
ref: i
|
|
704
596
|
}, [y("div", null, null)])]);
|
|
705
597
|
}
|
|
706
|
-
}),
|
|
598
|
+
}), St = {
|
|
707
599
|
color: { type: Object, default: "" },
|
|
708
600
|
hue: { type: Object, default: "" },
|
|
709
601
|
allowColorNull: { type: Boolean, default: !1 },
|
|
710
602
|
onChange: { type: Function }
|
|
711
|
-
},
|
|
603
|
+
}, It = /* @__PURE__ */ U({
|
|
712
604
|
name: "Hue",
|
|
713
|
-
props:
|
|
605
|
+
props: St,
|
|
714
606
|
emits: ["update:color", "update:hue"],
|
|
715
|
-
setup(
|
|
716
|
-
const i =
|
|
717
|
-
function
|
|
718
|
-
|
|
719
|
-
}
|
|
720
|
-
const
|
|
721
|
-
function
|
|
722
|
-
if (
|
|
607
|
+
setup(c, t) {
|
|
608
|
+
const i = k(c.hue), s = k(c.allowColorNull), r = [];
|
|
609
|
+
function v(w) {
|
|
610
|
+
w.preventDefault(), d(w);
|
|
611
|
+
}
|
|
612
|
+
const u = k(null);
|
|
613
|
+
function d(w) {
|
|
614
|
+
if (u.value) {
|
|
723
615
|
const {
|
|
724
|
-
width:
|
|
616
|
+
width: m,
|
|
725
617
|
height: M,
|
|
726
|
-
top:
|
|
727
|
-
left:
|
|
728
|
-
} =
|
|
729
|
-
pageX:
|
|
730
|
-
pageY:
|
|
731
|
-
} = "touches" in
|
|
732
|
-
|
|
733
|
-
x:
|
|
618
|
+
top: H,
|
|
619
|
+
left: I
|
|
620
|
+
} = u.value.getBoundingClientRect(), {
|
|
621
|
+
pageX: B,
|
|
622
|
+
pageY: V
|
|
623
|
+
} = "touches" in w ? w.touches[0] : w, N = Math.max(0, Math.min(B - (I + window.pageXOffset), m)), X = Math.max(0, Math.min(V - (H + window.pageYOffset), M));
|
|
624
|
+
b({
|
|
625
|
+
x: N,
|
|
734
626
|
y: X,
|
|
735
627
|
height: M,
|
|
736
|
-
width:
|
|
628
|
+
width: m
|
|
737
629
|
});
|
|
738
630
|
}
|
|
739
631
|
}
|
|
740
|
-
function
|
|
741
|
-
r.forEach((
|
|
632
|
+
function p() {
|
|
633
|
+
r.forEach((w) => w()), r.length = 0;
|
|
742
634
|
}
|
|
743
|
-
function
|
|
744
|
-
|
|
635
|
+
function g(w) {
|
|
636
|
+
v(w), document.addEventListener("mouseup", p), document.addEventListener("touchend", p), document.addEventListener("touchmove", v);
|
|
745
637
|
}
|
|
746
|
-
const
|
|
747
|
-
|
|
638
|
+
const l = (w) => {
|
|
639
|
+
g(w), w.stopPropagation();
|
|
748
640
|
};
|
|
749
|
-
|
|
641
|
+
G(() => {
|
|
750
642
|
document.querySelectorAll(".f-hue-component").forEach((M) => {
|
|
751
|
-
M.addEventListener("mousedown",
|
|
643
|
+
M.addEventListener("mousedown", l), M.addEventListener("touchstart", l);
|
|
752
644
|
});
|
|
753
|
-
const
|
|
754
|
-
|
|
645
|
+
const m = c.color.getHsva();
|
|
646
|
+
f(m.hue);
|
|
755
647
|
});
|
|
756
|
-
const
|
|
757
|
-
function
|
|
758
|
-
var
|
|
759
|
-
const
|
|
760
|
-
|
|
761
|
-
}
|
|
762
|
-
function
|
|
763
|
-
x:
|
|
764
|
-
y:
|
|
648
|
+
const o = k(null);
|
|
649
|
+
function f(w) {
|
|
650
|
+
var H;
|
|
651
|
+
const m = Math.max(0, Math.min(w / 360 * 100, 100));
|
|
652
|
+
o.value && ((H = o.value.style) == null || H.setProperty("top", `${m}%`));
|
|
653
|
+
}
|
|
654
|
+
function b({
|
|
655
|
+
x: w,
|
|
656
|
+
y: m,
|
|
765
657
|
height: M,
|
|
766
|
-
width:
|
|
658
|
+
width: H
|
|
767
659
|
}) {
|
|
768
|
-
const
|
|
769
|
-
|
|
770
|
-
const
|
|
771
|
-
(
|
|
772
|
-
}
|
|
773
|
-
return
|
|
774
|
-
const
|
|
775
|
-
|
|
776
|
-
}),
|
|
777
|
-
const
|
|
778
|
-
|
|
660
|
+
const I = m / M * 360;
|
|
661
|
+
f(I);
|
|
662
|
+
const B = c.color.getHsva(), V = new P().setHsva(I, B.saturation, B.value, B.alpha), N = new P().setHsva(I, 100, 100, B.alpha);
|
|
663
|
+
(c.color != null || c.color == null && s.value) && (t.emit("update:hue", N), t.emit("update:color", V));
|
|
664
|
+
}
|
|
665
|
+
return $(i, (w) => {
|
|
666
|
+
const m = w.getHsva();
|
|
667
|
+
f(m.hue);
|
|
668
|
+
}), $(() => c.color, (w) => {
|
|
669
|
+
const m = w.getHsva();
|
|
670
|
+
f(m.hue);
|
|
779
671
|
}), () => y("div", {
|
|
780
672
|
class: "f-hue-component",
|
|
781
|
-
ref:
|
|
782
|
-
onMousedown:
|
|
783
|
-
onTouchstart:
|
|
673
|
+
ref: u,
|
|
674
|
+
onMousedown: j((w) => d(w), ["prevent"]),
|
|
675
|
+
onTouchstart: j((w) => d(w), ["prevent"])
|
|
784
676
|
}, [y("div", {
|
|
785
677
|
class: "color-hue-slider__bar"
|
|
786
678
|
}, null), y("div", {
|
|
787
679
|
class: "color-hue-slider__thumb",
|
|
788
|
-
ref:
|
|
680
|
+
ref: o
|
|
789
681
|
}, null)]);
|
|
790
682
|
}
|
|
791
|
-
}),
|
|
683
|
+
}), Mt = {
|
|
792
684
|
color: { type: Object, default: "" },
|
|
793
685
|
randomId: { type: String, default: "" },
|
|
794
686
|
allowColorNull: { type: Boolean, default: !1 }
|
|
795
|
-
},
|
|
687
|
+
}, xt = /* @__PURE__ */ U({
|
|
796
688
|
name: "Alpha",
|
|
797
|
-
props:
|
|
689
|
+
props: Mt,
|
|
798
690
|
emits: ["update:color"],
|
|
799
|
-
setup(
|
|
800
|
-
const i =
|
|
801
|
-
var
|
|
802
|
-
const
|
|
803
|
-
|
|
691
|
+
setup(c, t) {
|
|
692
|
+
const i = k(null), s = k(null), r = k(c.randomId), v = k(c.allowColorNull), u = (l) => {
|
|
693
|
+
var b;
|
|
694
|
+
const o = Math.max(0, Math.min(l * 100, 100));
|
|
695
|
+
s.value && ((b = s.value.style) == null || b.setProperty("left", `${o}%`));
|
|
804
696
|
};
|
|
805
|
-
function
|
|
697
|
+
function d(l) {
|
|
806
698
|
if (i.value) {
|
|
807
699
|
const {
|
|
808
|
-
width:
|
|
809
|
-
height:
|
|
810
|
-
top:
|
|
811
|
-
left:
|
|
700
|
+
width: o,
|
|
701
|
+
height: f,
|
|
702
|
+
top: b,
|
|
703
|
+
left: w
|
|
812
704
|
} = i.value.getBoundingClientRect(), {
|
|
813
|
-
pageX:
|
|
705
|
+
pageX: m,
|
|
814
706
|
pageY: M
|
|
815
|
-
} = "touches" in
|
|
816
|
-
|
|
817
|
-
x:
|
|
818
|
-
width:
|
|
707
|
+
} = "touches" in l ? l.touches[0] : l, H = Math.max(0, Math.min(m - (w + window.pageXOffset), o));
|
|
708
|
+
g({
|
|
709
|
+
x: H,
|
|
710
|
+
width: o
|
|
819
711
|
});
|
|
820
712
|
}
|
|
821
713
|
}
|
|
822
|
-
function
|
|
823
|
-
const
|
|
824
|
-
|
|
825
|
-
const
|
|
826
|
-
|
|
714
|
+
function p() {
|
|
715
|
+
const l = document.getElementById(`farris-color-picker-plus-sure-${r.value}`);
|
|
716
|
+
l.className = "btn btn-secondary";
|
|
717
|
+
const o = document.getElementById(`farris-color-picker-plus-input-${r.value}`);
|
|
718
|
+
o.style.borderColor = "#dcdfe6";
|
|
827
719
|
}
|
|
828
|
-
const
|
|
829
|
-
x:
|
|
830
|
-
width:
|
|
720
|
+
const g = ({
|
|
721
|
+
x: l,
|
|
722
|
+
width: o
|
|
831
723
|
}) => {
|
|
832
|
-
const
|
|
833
|
-
|
|
834
|
-
const
|
|
835
|
-
|
|
724
|
+
const f = l / o;
|
|
725
|
+
u(f), p();
|
|
726
|
+
const b = c.color.getHsva(), w = new P().setHsva(b.hue, b.saturation, b.value, f);
|
|
727
|
+
c.color != null ? t.emit("update:color", w) : c.color == null && v.value && t.emit("update:color", null);
|
|
836
728
|
};
|
|
837
|
-
return
|
|
838
|
-
const
|
|
839
|
-
l
|
|
840
|
-
}),
|
|
841
|
-
const
|
|
842
|
-
|
|
729
|
+
return G(() => {
|
|
730
|
+
const l = c.color.getHsva();
|
|
731
|
+
u(l.alpha);
|
|
732
|
+
}), $(() => c.color, (l) => {
|
|
733
|
+
const o = l.getHsva();
|
|
734
|
+
u(o.alpha);
|
|
843
735
|
}), () => y("div", {
|
|
844
736
|
class: "f-alpha-component",
|
|
845
737
|
ref: i,
|
|
846
|
-
onMousedown:
|
|
847
|
-
onTouchstart:
|
|
738
|
+
onMousedown: j((l) => d(l), ["prevent"]),
|
|
739
|
+
onTouchstart: j((l) => d(l), ["prevent"])
|
|
848
740
|
}, [y("div", {
|
|
849
741
|
class: "color-alpha-slider__bar"
|
|
850
|
-
}, [
|
|
742
|
+
}, [st(" ")]), y("div", {
|
|
851
743
|
class: "color-alpha-slider__thumb",
|
|
852
|
-
ref:
|
|
744
|
+
ref: s
|
|
853
745
|
}, null)]);
|
|
854
746
|
}
|
|
855
|
-
}),
|
|
747
|
+
}), Bt = {
|
|
856
748
|
color: { type: Object, default: "" },
|
|
857
749
|
hue: { type: Object, default: "" },
|
|
858
750
|
colorPresets: { type: Object, default: "" },
|
|
859
751
|
randomId: { type: String, default: "" }
|
|
860
|
-
},
|
|
752
|
+
}, Rt = /* @__PURE__ */ U({
|
|
861
753
|
name: "Preset",
|
|
862
|
-
props:
|
|
754
|
+
props: Bt,
|
|
863
755
|
emits: ["update:hue", "update:color"],
|
|
864
|
-
setup(
|
|
865
|
-
const i =
|
|
866
|
-
function
|
|
867
|
-
const
|
|
868
|
-
|
|
869
|
-
const
|
|
870
|
-
|
|
871
|
-
}
|
|
872
|
-
function
|
|
873
|
-
|
|
874
|
-
const
|
|
875
|
-
i.value =
|
|
876
|
-
}
|
|
877
|
-
function g
|
|
878
|
-
const
|
|
756
|
+
setup(c, t) {
|
|
757
|
+
const i = k(new P()), s = k(c.colorPresets), r = k(c.randomId);
|
|
758
|
+
function v() {
|
|
759
|
+
const g = document.getElementById(`farris-color-picker-plus-sure-${r.value}`);
|
|
760
|
+
g.className = "btn btn-secondary";
|
|
761
|
+
const l = document.getElementById(`farris-color-picker-plus-input-${r.value}`);
|
|
762
|
+
l.style.borderColor = "#dcdfe6";
|
|
763
|
+
}
|
|
764
|
+
function u(g) {
|
|
765
|
+
v();
|
|
766
|
+
const l = g.getRgba(), o = g.getHsva(), f = new P().setRgba(l.red, l.green, l.blue, l.alpha), b = new P().setHsva(o.hue);
|
|
767
|
+
i.value = g, t.emit("update:hue", b), t.emit("update:color", f);
|
|
768
|
+
}
|
|
769
|
+
function d(g) {
|
|
770
|
+
const l = i.value.getRgba().toString(), o = i.value.getHsva().toString(), f = g.getRgba().toString() === l && g.getHsva().toString() === o;
|
|
879
771
|
return {
|
|
880
|
-
"color-preset__color-selector":
|
|
881
|
-
selected:
|
|
772
|
+
"color-preset__color-selector": f,
|
|
773
|
+
selected: f
|
|
882
774
|
};
|
|
883
775
|
}
|
|
884
|
-
function
|
|
776
|
+
function p(g, l) {
|
|
885
777
|
return y("div", {
|
|
886
778
|
class: "color-preset__color-selector"
|
|
887
779
|
}, [y("div", {
|
|
888
|
-
key:
|
|
889
|
-
class: g
|
|
780
|
+
key: l,
|
|
781
|
+
class: d(g),
|
|
890
782
|
style: {
|
|
891
|
-
backgroundColor:
|
|
783
|
+
backgroundColor: g.toRgbString()
|
|
892
784
|
},
|
|
893
|
-
onClick: () =>
|
|
785
|
+
onClick: () => u(g)
|
|
894
786
|
}, null)]);
|
|
895
787
|
}
|
|
896
788
|
return () => y("div", {
|
|
897
789
|
class: "f-preset-component"
|
|
898
790
|
}, [y("div", {
|
|
899
791
|
class: "color-preset__colors"
|
|
900
|
-
}, [
|
|
792
|
+
}, [s.value.map((g, l) => p(g, l))])]);
|
|
901
793
|
}
|
|
902
|
-
}),
|
|
794
|
+
}), $t = /* @__PURE__ */ U({
|
|
903
795
|
name: "FColorPicker",
|
|
904
|
-
props:
|
|
796
|
+
props: bt,
|
|
905
797
|
emits: ["valueChanged", "activeChange", "update:color", "update:hue"],
|
|
906
|
-
setup(
|
|
907
|
-
const i =
|
|
908
|
-
let
|
|
909
|
-
const
|
|
910
|
-
let
|
|
911
|
-
const
|
|
798
|
+
setup(c, t) {
|
|
799
|
+
const i = k(new P(c.color)), s = k(c.color), r = k(c.disabled), v = k(c.color), u = k(c.allowColorNull), d = k(c.presets), p = k(!1), g = k(!1), l = k(!1), o = k("HEX"), f = Math.floor(Math.random() * 1e3).toString();
|
|
800
|
+
let b = -1, w;
|
|
801
|
+
const m = new it("#000000"), M = k(c.color);
|
|
802
|
+
let H, I;
|
|
803
|
+
const B = k(null), V = k(null), N = k(null), X = L(() => !w && m && m.initType ? m.initType : w), R = L({
|
|
912
804
|
get() {
|
|
913
|
-
return
|
|
805
|
+
return w && s.value !== null ? (Q(w), O(new P(s.value), x[w])) : s.value;
|
|
914
806
|
},
|
|
915
|
-
set(
|
|
916
|
-
|
|
807
|
+
set(h) {
|
|
808
|
+
h !== null && (E(h), nt(h));
|
|
917
809
|
}
|
|
918
|
-
}),
|
|
919
|
-
"background-color":
|
|
920
|
-
})),
|
|
810
|
+
}), z = k(R.value), rt = L(() => b > -1), tt = L(() => d.value.length > 0), ut = L(() => ({
|
|
811
|
+
"background-color": v.value
|
|
812
|
+
})), ct = L(() => g.value && p.value ? "display:flex" : "display:none"), D = [{
|
|
921
813
|
text: "HEX",
|
|
922
|
-
type:
|
|
814
|
+
type: x.hex
|
|
923
815
|
}, {
|
|
924
816
|
text: "RGBA",
|
|
925
|
-
type:
|
|
817
|
+
type: x.rgba
|
|
926
818
|
}];
|
|
927
|
-
function
|
|
928
|
-
const
|
|
929
|
-
|
|
930
|
-
const
|
|
931
|
-
|
|
932
|
-
const
|
|
933
|
-
|
|
934
|
-
}
|
|
935
|
-
function
|
|
936
|
-
if (!
|
|
937
|
-
document.getElementById(`farris-color-picker-plus-sure-${
|
|
938
|
-
const
|
|
939
|
-
|
|
819
|
+
function lt() {
|
|
820
|
+
const h = document.getElementById("farris-color-picker-panel");
|
|
821
|
+
h.id = `farris-color-picker-panel-${f}`;
|
|
822
|
+
const S = document.getElementById("farris-color-picker-plus-sure");
|
|
823
|
+
S.id = `farris-color-picker-plus-sure-${f}`;
|
|
824
|
+
const A = document.getElementById("farris-color-picker-plus-input");
|
|
825
|
+
A.id = `farris-color-picker-plus-input-${f}`, I = document.getElementById(`farris-color-picker-plus-sure-${f}`), H = document.getElementById(`farris-color-picker-panel-${f}`), H.className = "color-picker-panel disabled";
|
|
826
|
+
}
|
|
827
|
+
function et() {
|
|
828
|
+
if (!u.value && !s.value) {
|
|
829
|
+
document.getElementById(`farris-color-picker-plus-sure-${f}`).classList.toggle("disabled");
|
|
830
|
+
const S = document.getElementById(`farris-color-picker-plus-input-${f}`);
|
|
831
|
+
S.style.borderColor = "red";
|
|
940
832
|
}
|
|
941
833
|
}
|
|
942
|
-
function
|
|
943
|
-
|
|
834
|
+
function ot() {
|
|
835
|
+
s.value && (E(s.value), !s.value && u.value || (s.value = O(new P(s.value), x[X.value])), z.value = R.value), J(Q(m.initType));
|
|
944
836
|
}
|
|
945
|
-
function
|
|
946
|
-
|
|
837
|
+
function ht() {
|
|
838
|
+
s.value && E(s.value), m.hasPresets() || m.setColorPresets(d.value), s.value ? v.value = O(new P(s.value), x[X.value]) : !s.value && u.value && (v.value = null);
|
|
947
839
|
}
|
|
948
|
-
function
|
|
949
|
-
|
|
950
|
-
const
|
|
951
|
-
|
|
840
|
+
function dt() {
|
|
841
|
+
$(m.valueChanged, (h) => {
|
|
842
|
+
const S = O(h, x[w || m.initType]);
|
|
843
|
+
s.value = S;
|
|
952
844
|
});
|
|
953
845
|
}
|
|
954
|
-
function
|
|
955
|
-
|
|
956
|
-
}
|
|
957
|
-
function
|
|
958
|
-
var
|
|
959
|
-
|
|
960
|
-
}
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
}),
|
|
964
|
-
|
|
965
|
-
}),
|
|
966
|
-
R.value =
|
|
967
|
-
}),
|
|
968
|
-
|
|
969
|
-
}),
|
|
970
|
-
|
|
846
|
+
function J(h) {
|
|
847
|
+
o.value = D[h].text;
|
|
848
|
+
}
|
|
849
|
+
function gt() {
|
|
850
|
+
var h;
|
|
851
|
+
g.value = !!(w != null && w.includes("a") || (h = m.initType) != null && h.includes("a"));
|
|
852
|
+
}
|
|
853
|
+
yt(() => {
|
|
854
|
+
m.setColorPresets(d.value || ["#eaecf3"]);
|
|
855
|
+
}), G(() => {
|
|
856
|
+
lt(), et(), ot(), ht();
|
|
857
|
+
}), dt(), $(o, () => {
|
|
858
|
+
R.value = O(new P(s.value), x[w || m.initType]), i.value = new P(R.value), gt();
|
|
859
|
+
}), $(s, (h) => {
|
|
860
|
+
O(m.value, m.initType) !== h && h !== null && E(h), J(Q(m.initType));
|
|
861
|
+
}), $(i, (h) => {
|
|
862
|
+
s.value = O(h, x[w || m.initType]), E(s.value), R.value = s.value;
|
|
971
863
|
});
|
|
972
|
-
function
|
|
973
|
-
const
|
|
974
|
-
(
|
|
975
|
-
}
|
|
976
|
-
function
|
|
977
|
-
var
|
|
978
|
-
if (
|
|
979
|
-
|
|
980
|
-
const
|
|
981
|
-
elementValue:
|
|
864
|
+
function nt(h) {
|
|
865
|
+
const S = document.getElementById(`farris-color-picker-plus-input-${f}`);
|
|
866
|
+
(h === "" || h === void 0 || h == null) && !u.value ? (s.value = null, S.style.borderColor = "red", I.className = "btn btn-secondary disabled") : (S.style.borderColor = "#dcdfe6", I.className = "btn btn-secondary");
|
|
867
|
+
}
|
|
868
|
+
function pt(h) {
|
|
869
|
+
var S, A;
|
|
870
|
+
if (h == null || h.stopPropagation(), u.value) {
|
|
871
|
+
v.value = (s == null ? void 0 : s.value) ?? null;
|
|
872
|
+
const Z = {
|
|
873
|
+
elementValue: v
|
|
982
874
|
};
|
|
983
|
-
|
|
875
|
+
t.emit("valueChanged", Z), K();
|
|
984
876
|
}
|
|
985
|
-
if (!
|
|
986
|
-
(
|
|
987
|
-
const
|
|
988
|
-
elementValue:
|
|
877
|
+
if (!u.value && !(R.value === void 0 || R.value == null || R.value === "")) {
|
|
878
|
+
(A = (S = B.value) == null ? void 0 : S.style) == null || A.setProperty("background", s.value), l.value = !0, v.value = s.value;
|
|
879
|
+
const Z = {
|
|
880
|
+
elementValue: v
|
|
989
881
|
};
|
|
990
|
-
|
|
882
|
+
t.emit("valueChanged", Z), K();
|
|
991
883
|
}
|
|
992
|
-
!M.value && !
|
|
884
|
+
!M.value && !s.value && !l.value && u && K(), nt(s.value), R.value = s.value, I.classList.contains("disabled") || (z.value = s.value, p.value = !1);
|
|
993
885
|
}
|
|
994
|
-
function
|
|
995
|
-
|
|
886
|
+
function E(h) {
|
|
887
|
+
m == null || m.setValueFrom(h, f, u.value);
|
|
996
888
|
}
|
|
997
|
-
function
|
|
998
|
-
|
|
999
|
-
const
|
|
1000
|
-
r.value ||
|
|
889
|
+
function wt(h) {
|
|
890
|
+
H = document.getElementById(`farris-color-picker-panel-${f}`);
|
|
891
|
+
const S = H.className === "color-picker-panel";
|
|
892
|
+
r.value || S || (p.value = !0, H.classList.toggle("disabled"), et(), E(s.value), h.stopPropagation());
|
|
1001
893
|
}
|
|
1002
|
-
function
|
|
1003
|
-
|
|
894
|
+
function K() {
|
|
895
|
+
H = document.getElementById(`farris-color-picker-panel-${f}`), H.className = "color-picker-panel disabled";
|
|
1004
896
|
}
|
|
1005
|
-
function
|
|
1006
|
-
const
|
|
1007
|
-
return
|
|
897
|
+
function Q(h) {
|
|
898
|
+
const S = D.findIndex((A) => A.type === h);
|
|
899
|
+
return b = S, S;
|
|
1008
900
|
}
|
|
1009
|
-
function
|
|
1010
|
-
if (!
|
|
1011
|
-
const
|
|
1012
|
-
|
|
901
|
+
function at(h) {
|
|
902
|
+
if (!I.classList.contains("disabled")) {
|
|
903
|
+
const S = D.length;
|
|
904
|
+
b = (S + b + (h === "up" ? 1 : -1)) % S, w = D[b].type, J(b), E(s.value);
|
|
1013
905
|
}
|
|
1014
906
|
}
|
|
1015
907
|
return () => y("div", {
|
|
1016
908
|
class: "f-color-picker-component",
|
|
1017
|
-
ref:
|
|
909
|
+
ref: V
|
|
1018
910
|
}, [y("div", {
|
|
1019
911
|
class: ["color-picker-panel", {
|
|
1020
912
|
disabled: r.value
|
|
1021
913
|
}],
|
|
1022
914
|
id: "farris-color-picker-panel",
|
|
1023
|
-
ref:
|
|
1024
|
-
onClick: (
|
|
915
|
+
ref: N,
|
|
916
|
+
onClick: (h) => h.stopPropagation(),
|
|
1025
917
|
style: "top:30px"
|
|
1026
918
|
}, [y("div", {
|
|
1027
919
|
class: "color-picker-main"
|
|
1028
|
-
}, [y(
|
|
1029
|
-
hue:
|
|
1030
|
-
"onUpdate:hue": (
|
|
1031
|
-
allowColorNull:
|
|
920
|
+
}, [y(It, {
|
|
921
|
+
hue: m.hue,
|
|
922
|
+
"onUpdate:hue": (h) => m.hue = h,
|
|
923
|
+
allowColorNull: u.value,
|
|
1032
924
|
color: i.value,
|
|
1033
|
-
"onUpdate:color": (
|
|
1034
|
-
}, null), y(
|
|
1035
|
-
randomId:
|
|
1036
|
-
hue:
|
|
1037
|
-
"onUpdate:hue": (
|
|
1038
|
-
allowColorNull:
|
|
925
|
+
"onUpdate:color": (h) => i.value = h
|
|
926
|
+
}, null), y(Ht, {
|
|
927
|
+
randomId: f,
|
|
928
|
+
hue: m.hue,
|
|
929
|
+
"onUpdate:hue": (h) => m.hue = h,
|
|
930
|
+
allowColorNull: u.value,
|
|
1039
931
|
color: i.value,
|
|
1040
|
-
"onUpdate:color": (
|
|
1041
|
-
}, null)]), y(
|
|
1042
|
-
style:
|
|
1043
|
-
randomId:
|
|
1044
|
-
allowColorNull:
|
|
932
|
+
"onUpdate:color": (h) => i.value = h
|
|
933
|
+
}, null)]), y(xt, {
|
|
934
|
+
style: ct.value,
|
|
935
|
+
randomId: f,
|
|
936
|
+
allowColorNull: u.value,
|
|
1045
937
|
color: i.value,
|
|
1046
|
-
"onUpdate:color": (
|
|
938
|
+
"onUpdate:color": (h) => i.value = h
|
|
1047
939
|
}, null), y("div", {
|
|
1048
940
|
class: "input-btn",
|
|
1049
941
|
style: "display:flex;align-items: center;"
|
|
1050
|
-
}, [
|
|
942
|
+
}, [Y(y("span", {
|
|
1051
943
|
style: "width:40px;margin-right:10px;"
|
|
1052
|
-
}, [
|
|
944
|
+
}, [o.value]), [[C, tt]]), Y(y("input", {
|
|
1053
945
|
type: "text",
|
|
1054
946
|
title: "color-picker-plus",
|
|
1055
947
|
id: "farris-color-picker-plus-input",
|
|
1056
|
-
"onUpdate:modelValue": (
|
|
948
|
+
"onUpdate:modelValue": (h) => R.value = h,
|
|
1057
949
|
style: "float:none"
|
|
1058
|
-
}, null), [[
|
|
950
|
+
}, null), [[kt, R.value]]), Y(y("div", {
|
|
1059
951
|
class: "type-icon-btn-wrapper",
|
|
1060
952
|
style: "cursor:pointer"
|
|
1061
953
|
}, [y("span", {
|
|
1062
954
|
class: "f-icon f-icon-arrow-60-up type-icon-btn",
|
|
1063
|
-
onClick: () =>
|
|
955
|
+
onClick: () => at("up")
|
|
1064
956
|
}, null), y("span", {
|
|
1065
957
|
class: "f-icon f-icon-arrow-60-down type-icon-btn",
|
|
1066
|
-
onClick: () =>
|
|
1067
|
-
}, null)]), [[
|
|
958
|
+
onClick: () => at("down")
|
|
959
|
+
}, null)]), [[C, tt]]), y("div", {
|
|
1068
960
|
class: "input-btn"
|
|
1069
961
|
}, [y("button", {
|
|
1070
962
|
id: "farris-color-picker-plus-sure",
|
|
1071
963
|
class: "btn btn-secondary",
|
|
1072
|
-
onClick: (
|
|
1073
|
-
}, [
|
|
964
|
+
onClick: (h) => pt(h)
|
|
965
|
+
}, [st("确定")])])]), Y(y(Rt, {
|
|
1074
966
|
color: i.value,
|
|
1075
|
-
"onUpdate:color": (
|
|
1076
|
-
hue:
|
|
1077
|
-
"onUpdate:hue": (
|
|
1078
|
-
randomId:
|
|
1079
|
-
colorPresets:
|
|
1080
|
-
}, null), [[
|
|
967
|
+
"onUpdate:color": (h) => i.value = h,
|
|
968
|
+
hue: m.hue,
|
|
969
|
+
"onUpdate:hue": (h) => m.hue = h,
|
|
970
|
+
randomId: f,
|
|
971
|
+
colorPresets: m.presets
|
|
972
|
+
}, null), [[C, rt]])]), y("div", {
|
|
1081
973
|
class: "color-picker-wrapper"
|
|
1082
974
|
}, [y("input", {
|
|
1083
975
|
title: "color-picker-input",
|
|
1084
976
|
type: "text",
|
|
1085
977
|
class: "color-picker-input form-control",
|
|
1086
|
-
value:
|
|
978
|
+
value: z.value,
|
|
1087
979
|
readonly: r.value,
|
|
1088
|
-
onClick: (
|
|
980
|
+
onClick: (h) => h.stopPropagation()
|
|
1089
981
|
}, null), y("div", {
|
|
1090
982
|
class: "color-picker-trigger",
|
|
1091
|
-
onClick:
|
|
983
|
+
onClick: wt
|
|
1092
984
|
}, [y("div", {
|
|
1093
985
|
class: "color-picker-trigger-inner"
|
|
1094
986
|
}, [y("div", {
|
|
1095
|
-
style:
|
|
987
|
+
style: ut.value
|
|
1096
988
|
}, null)])])])]);
|
|
1097
989
|
}
|
|
1098
|
-
}),
|
|
1099
|
-
name: "FColorPickerDesign",
|
|
1100
|
-
props: ve,
|
|
1101
|
-
emits: ["valueChanged", "activeChange", "update:color", "update:hue"],
|
|
1102
|
-
setup(u, e) {
|
|
1103
|
-
const i = b(new I(u.color)), t = b(u.color), r = b(u.disabled), k = b(u.color), l = b(u.allowColorNull), g = b(u.presets), w = b(!1), m = b(!1), h = b(!1), d = b("HEX"), v = Math.floor(Math.random() * 1e3).toString();
|
|
1104
|
-
let P = -1, p;
|
|
1105
|
-
const c = new me("#000000"), M = b(u.color);
|
|
1106
|
-
let S, H;
|
|
1107
|
-
const $ = b(null), F = b(null), A = b(), X = Be("design-item-context"), R = Re(A, X);
|
|
1108
|
-
K(() => {
|
|
1109
|
-
A.value.componentInstance = R;
|
|
1110
|
-
}), e.expose(R.value);
|
|
1111
|
-
const C = O(() => !p && c && c.initType ? c.initType : p), N = O({
|
|
1112
|
-
get() {
|
|
1113
|
-
return p && t.value !== null ? (z(p), V(new I(t.value), B[p])) : t.value;
|
|
1114
|
-
},
|
|
1115
|
-
set(o) {
|
|
1116
|
-
o !== null && (L(o), U(o));
|
|
1117
|
-
}
|
|
1118
|
-
}), Y = b(N.value), re = O(() => P > -1), ne = O(() => g.value.length > 0), G = O(() => ({
|
|
1119
|
-
"background-color": k.value
|
|
1120
|
-
})), le = O(() => m.value && w.value ? "display:flex" : "display:none"), D = [{
|
|
1121
|
-
text: "HEX",
|
|
1122
|
-
type: B.hex
|
|
1123
|
-
}, {
|
|
1124
|
-
text: "RGBA",
|
|
1125
|
-
type: B.rgba
|
|
1126
|
-
}];
|
|
1127
|
-
function ue() {
|
|
1128
|
-
const o = document.getElementById("farris-color-picker-panel");
|
|
1129
|
-
o.id = `farris-color-picker-panel-${v}`;
|
|
1130
|
-
const x = document.getElementById("farris-color-picker-plus-sure");
|
|
1131
|
-
x.id = `farris-color-picker-plus-sure-${v}`;
|
|
1132
|
-
const j = document.getElementById("farris-color-picker-plus-input");
|
|
1133
|
-
j.id = `farris-color-picker-plus-input-${v}`, H = document.getElementById(`farris-color-picker-plus-sure-${v}`), S = document.getElementById(`farris-color-picker-panel-${v}`), S.className = "color-picker-panel disabled";
|
|
1134
|
-
}
|
|
1135
|
-
function ae() {
|
|
1136
|
-
if (!l.value && !t.value) {
|
|
1137
|
-
document.getElementById(`farris-color-picker-plus-sure-${v}`).classList.toggle("disabled");
|
|
1138
|
-
const x = document.getElementById(`farris-color-picker-plus-input-${v}`);
|
|
1139
|
-
x.style.borderColor = "red";
|
|
1140
|
-
}
|
|
1141
|
-
}
|
|
1142
|
-
function oe() {
|
|
1143
|
-
t.value && (L(t.value), !t.value && l.value || (t.value = V(new I(t.value), B[C.value])), Y.value = N.value), W(z(c.initType));
|
|
1144
|
-
}
|
|
1145
|
-
function T() {
|
|
1146
|
-
t.value && L(t.value), c.hasPresets() || c.setColorPresets(g.value), t.value ? k.value = V(new I(t.value), B[C.value]) : !t.value && l.value && (k.value = null);
|
|
1147
|
-
}
|
|
1148
|
-
function ce() {
|
|
1149
|
-
E(c.valueChanged, (o) => {
|
|
1150
|
-
const x = V(o, B[p || c.initType]);
|
|
1151
|
-
t.value = x;
|
|
1152
|
-
});
|
|
1153
|
-
}
|
|
1154
|
-
function W(o) {
|
|
1155
|
-
d.value = D[o].text;
|
|
1156
|
-
}
|
|
1157
|
-
function de() {
|
|
1158
|
-
var o;
|
|
1159
|
-
m.value = !!(p != null && p.includes("a") || (o = c.initType) != null && o.includes("a"));
|
|
1160
|
-
}
|
|
1161
|
-
we(() => {
|
|
1162
|
-
c.setColorPresets(g.value || ["#eaecf3"]);
|
|
1163
|
-
}), K(() => {
|
|
1164
|
-
ue(), ae(), oe(), T();
|
|
1165
|
-
}), ce(), E(d, () => {
|
|
1166
|
-
N.value = V(new I(t.value), B[p || c.initType]), i.value = new I(N.value), de();
|
|
1167
|
-
}), E(t, (o) => {
|
|
1168
|
-
V(c.value, c.initType) !== o && o !== null && L(o), W(z(c.initType));
|
|
1169
|
-
}), E(i, (o) => {
|
|
1170
|
-
t.value = V(o, B[p || c.initType]), L(t.value), N.value = t.value;
|
|
1171
|
-
});
|
|
1172
|
-
function U(o) {
|
|
1173
|
-
const x = document.getElementById(`farris-color-picker-plus-input-${v}`);
|
|
1174
|
-
(o === "" || o === void 0 || o == null) && !l.value ? (t.value = null, x.style.borderColor = "red", H.className = "btn btn-secondary disabled") : (x.style.borderColor = "#dcdfe6", H.className = "btn btn-secondary");
|
|
1175
|
-
}
|
|
1176
|
-
function he() {
|
|
1177
|
-
var o, x;
|
|
1178
|
-
if (l.value) {
|
|
1179
|
-
k.value = (t == null ? void 0 : t.value) ?? null;
|
|
1180
|
-
const j = {
|
|
1181
|
-
elementValue: k
|
|
1182
|
-
};
|
|
1183
|
-
e.emit("valueChanged", j), S.classList.toggle("disabled");
|
|
1184
|
-
}
|
|
1185
|
-
if (!l.value && !(N.value === void 0 || N.value == null || N.value === "")) {
|
|
1186
|
-
(x = (o = $.value) == null ? void 0 : o.style) == null || x.setProperty("background", t.value), h.value = !0, k.value = t.value;
|
|
1187
|
-
const j = {
|
|
1188
|
-
elementValue: k
|
|
1189
|
-
};
|
|
1190
|
-
e.emit("valueChanged", j), S.classList.toggle("disabled");
|
|
1191
|
-
}
|
|
1192
|
-
!M.value && !t.value && !h.value && l && S.classList.toggle("disabled"), U(t.value), N.value = t.value, H.classList.contains("disabled") || (Y.value = t.value, w.value = !1);
|
|
1193
|
-
}
|
|
1194
|
-
function L(o) {
|
|
1195
|
-
c == null || c.setValueFrom(o, v, l.value);
|
|
1196
|
-
}
|
|
1197
|
-
function _(o) {
|
|
1198
|
-
r.value || (w.value = !0, S.classList.toggle("disabled"), ae(), L(t.value));
|
|
1199
|
-
}
|
|
1200
|
-
function z(o) {
|
|
1201
|
-
const x = D.findIndex((j) => j.type === o);
|
|
1202
|
-
return P = x, x;
|
|
1203
|
-
}
|
|
1204
|
-
function f(o) {
|
|
1205
|
-
if (!H.classList.contains("disabled")) {
|
|
1206
|
-
const x = D.length;
|
|
1207
|
-
P = (x + P + (o === "up" ? 1 : -1)) % x, p = D[P].type, W(P), L(t.value);
|
|
1208
|
-
}
|
|
1209
|
-
}
|
|
1210
|
-
return () => y("div", {
|
|
1211
|
-
class: "f-color-picker-component",
|
|
1212
|
-
ref: A
|
|
1213
|
-
}, [y("div", {
|
|
1214
|
-
class: ["color-picker-panel", {
|
|
1215
|
-
disabled: r.value
|
|
1216
|
-
}],
|
|
1217
|
-
id: "farris-color-picker-panel",
|
|
1218
|
-
ref: F,
|
|
1219
|
-
onClick: (o) => o.stopPropagation,
|
|
1220
|
-
style: "top:30px"
|
|
1221
|
-
}, [y("div", {
|
|
1222
|
-
class: "color-picker-main"
|
|
1223
|
-
}, [y(Pe, {
|
|
1224
|
-
hue: c.hue,
|
|
1225
|
-
"onUpdate:hue": (o) => c.hue = o,
|
|
1226
|
-
allowColorNull: l.value,
|
|
1227
|
-
color: i.value,
|
|
1228
|
-
"onUpdate:color": (o) => i.value = o
|
|
1229
|
-
}, null), y(be, {
|
|
1230
|
-
randomId: v,
|
|
1231
|
-
hue: c.hue,
|
|
1232
|
-
"onUpdate:hue": (o) => c.hue = o,
|
|
1233
|
-
allowColorNull: l.value,
|
|
1234
|
-
color: i.value,
|
|
1235
|
-
"onUpdate:color": (o) => i.value = o
|
|
1236
|
-
}, null)]), y(Ie, {
|
|
1237
|
-
style: le.value,
|
|
1238
|
-
randomId: v,
|
|
1239
|
-
allowColorNull: l.value,
|
|
1240
|
-
color: i.value,
|
|
1241
|
-
"onUpdate:color": (o) => i.value = o
|
|
1242
|
-
}, null), y("div", {
|
|
1243
|
-
class: "input-btn",
|
|
1244
|
-
style: "display:flex;align-items: center;"
|
|
1245
|
-
}, [q(y("span", {
|
|
1246
|
-
style: "width:40px;margin-right:10px;"
|
|
1247
|
-
}, [d.value]), [[J, ne]]), q(y("input", {
|
|
1248
|
-
title: "color-picker-plus-input",
|
|
1249
|
-
type: "text",
|
|
1250
|
-
id: "farris-color-picker-plus-input",
|
|
1251
|
-
"onUpdate:modelValue": (o) => N.value = o,
|
|
1252
|
-
style: "float:none"
|
|
1253
|
-
}, null), [[ye, N.value]]), q(y("div", {
|
|
1254
|
-
class: "type-icon-btn-wrapper",
|
|
1255
|
-
style: "cursor:pointer"
|
|
1256
|
-
}, [y("span", {
|
|
1257
|
-
class: "f-icon f-icon-arrow-60-up type-icon-btn",
|
|
1258
|
-
onClick: () => f("up")
|
|
1259
|
-
}, null), y("span", {
|
|
1260
|
-
class: "f-icon f-icon-arrow-60-down type-icon-btn",
|
|
1261
|
-
onClick: () => f("down")
|
|
1262
|
-
}, null)]), [[J, ne]]), y("div", {
|
|
1263
|
-
class: "input-btn"
|
|
1264
|
-
}, [y("button", {
|
|
1265
|
-
id: "farris-color-picker-plus-sure",
|
|
1266
|
-
class: "btn btn-secondary",
|
|
1267
|
-
onClick: he
|
|
1268
|
-
}, [fe("确定")])])]), q(y(Se, {
|
|
1269
|
-
color: i.value,
|
|
1270
|
-
"onUpdate:color": (o) => i.value = o,
|
|
1271
|
-
colorPresets: c.presets,
|
|
1272
|
-
hue: c.hue,
|
|
1273
|
-
"onUpdate:hue": (o) => c.hue = o,
|
|
1274
|
-
randomId: v
|
|
1275
|
-
}, null), [[J, re]])]), y("div", {
|
|
1276
|
-
class: "color-picker-wrapper"
|
|
1277
|
-
}, [y("input", {
|
|
1278
|
-
type: "text",
|
|
1279
|
-
class: "color-picker-input form-control",
|
|
1280
|
-
value: Y.value,
|
|
1281
|
-
readonly: r.value,
|
|
1282
|
-
onClick: (o) => o.stopPropagation()
|
|
1283
|
-
}, null), y("div", {
|
|
1284
|
-
class: "color-picker-trigger",
|
|
1285
|
-
onClick: _
|
|
1286
|
-
}, [y("div", {
|
|
1287
|
-
class: "color-picker-trigger-inner"
|
|
1288
|
-
}, [y("div", {
|
|
1289
|
-
style: G.value
|
|
1290
|
-
}, null)])])])]);
|
|
1291
|
-
}
|
|
1292
|
-
});
|
|
1293
|
-
se.register = (u, e, i) => {
|
|
1294
|
-
u["color-picker"] = se, e["color-picker"] = ke;
|
|
1295
|
-
};
|
|
1296
|
-
se.registerDesigner = (u, e, i) => {
|
|
1297
|
-
u["color-picker"] = Ze, e["color-picker"] = ke;
|
|
1298
|
-
};
|
|
1299
|
-
const at = Ve(se);
|
|
990
|
+
}), Ot = mt($t);
|
|
1300
991
|
export {
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
ke as propsResolver
|
|
992
|
+
$t as FColorPicker,
|
|
993
|
+
bt as colorPickerProps,
|
|
994
|
+
Ot as default
|
|
1305
995
|
};
|