@farris/ui-vue 1.7.1 → 1.7.2-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +312 -61
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +1482 -56
- package/components/avatar/index.umd.cjs +1 -1
- package/components/binding-selector/index.esm.js +752 -8
- package/components/binding-selector/index.umd.cjs +1 -1
- package/components/button-group/index.esm.js +266 -110
- package/components/button-group/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +129 -128
- package/components/calendar/index.umd.cjs +2 -2
- package/components/code-editor/index.esm.js +237 -169
- package/components/code-editor/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +134 -133
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/color-picker/index.esm.js +812 -502
- package/components/color-picker/index.umd.cjs +1 -1
- package/components/combo-list/index.esm.js +323 -291
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +355 -174
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +134 -133
- package/components/comment/index.umd.cjs +2 -2
- package/components/common/index.esm.js +1 -1
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +3830 -2796
- package/components/component/index.umd.cjs +8 -1
- package/components/condition/index.esm.js +2482 -492
- package/components/condition/index.umd.cjs +8 -1
- package/components/data-grid/index.esm.js +431 -406
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3306 -3165
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +1 -1
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +3094 -2731
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +397 -387
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dropdown/index.esm.js +373 -124
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +592 -1894
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +250 -248
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/dynamic-view/index.esm.js +287 -284
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +1 -1
- package/components/event-parameter/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +1890 -1473
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.css +1 -1
- package/components/expression-editor/index.esm.js +7371 -2
- package/components/expression-editor/index.umd.cjs +427 -1
- package/components/fieldset/index.esm.js +1 -1
- package/components/fieldset/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +4 -5
- package/components/filter-bar/index.umd.cjs +2 -2
- package/components/filter-condition-editor/index.css +1 -1
- package/components/filter-condition-editor/index.esm.js +9044 -425
- package/components/filter-condition-editor/index.umd.cjs +427 -1
- package/components/html-template/index.esm.js +33 -36
- package/components/html-template/index.umd.cjs +1 -1
- package/components/image/index.esm.js +2 -2
- package/components/image/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +615 -361
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/json-editor/index.esm.js +325 -247
- package/components/json-editor/index.umd.cjs +1 -1
- package/components/language-textbox/index.esm.js +269 -269
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/layout/index.esm.js +549 -163
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +837 -39
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +404 -622
- package/components/list-view/index.umd.cjs +6 -6
- package/components/lookup/index.esm.js +3624 -3625
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +1487 -1462
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/menu-lookup/index.esm.js +577 -536
- package/components/menu-lookup/index.umd.cjs +6 -6
- package/components/nav/index.esm.js +311 -31
- package/components/nav/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +1634 -189
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +82 -82
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1200 -859
- package/components/order/index.umd.cjs +6 -6
- package/components/page-footer/index.esm.js +331 -48
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +110 -116
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +509 -232
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +353 -148
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +157 -153
- package/components/property-editor/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +1825 -871
- package/components/property-panel/index.umd.cjs +12 -5
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +6075 -3862
- package/components/query-solution/index.umd.cjs +13 -6
- package/components/response-layout/index.esm.js +1 -1
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +2603 -2376
- package/components/schema-selector/index.umd.cjs +5 -5
- package/components/search-box/index.esm.js +244 -72
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +134 -133
- package/components/section/index.umd.cjs +2 -2
- package/components/smoke-detector/index.esm.js +179 -8
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/sort-condition-editor/index.css +1 -0
- package/components/sort-condition-editor/index.esm.js +9488 -4
- package/components/sort-condition-editor/index.umd.cjs +427 -1
- package/components/splitter/index.esm.js +1172 -142
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +47 -48
- package/components/step/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +490 -419
- package/components/tabs/index.umd.cjs +1 -1
- package/components/text/index.esm.js +217 -73
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +29 -27
- package/components/textarea/index.umd.cjs +2 -2
- package/components/transfer/index.esm.js +762 -544
- package/components/transfer/index.umd.cjs +5 -5
- package/components/tree-grid/index.esm.js +287 -283
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +326 -157
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +1125 -634
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +359 -106
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +222 -89
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +290 -199
- package/components/weather/index.umd.cjs +1 -1
- package/designer/data-grid/index.esm.js +5798 -4905
- package/designer/data-grid/index.umd.cjs +16 -9
- package/designer/drawer/index.esm.js +576 -567
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dynamic-form/index.esm.js +1418 -1154
- package/designer/dynamic-form/index.umd.cjs +8 -1
- package/designer/farris-designer.all.esm.js +11332 -10754
- package/designer/farris-designer.all.umd.cjs +17 -17
- package/designer/list-view/index.esm.js +647 -647
- package/designer/list-view/index.umd.cjs +6 -6
- package/designer/modal/index.esm.js +29 -137
- package/designer/modal/index.umd.cjs +1 -1
- package/designer/radio-group/index.esm.js +2 -3
- package/designer/radio-group/index.umd.cjs +1 -1
- package/designer/response-toolbar/index.esm.js +1 -1
- package/designer/response-toolbar/index.umd.cjs +1 -1
- package/designer/section/index.esm.js +1 -6
- package/designer/section/index.umd.cjs +1 -1
- package/designer/tabs/index.esm.js +2848 -2556
- package/designer/tabs/index.umd.cjs +2 -2
- package/designer/time-picker/index.esm.js +2 -2
- package/designer/time-picker/index.umd.cjs +1 -1
- package/designer/tree-grid/index.esm.js +826 -465
- package/designer/tree-grid/index.umd.cjs +1 -1
- package/farris.all.esm.js +75302 -73138
- package/farris.all.umd.cjs +94 -94
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/accordion/src/accordion.props.d.ts +1 -0
- package/types/accordion/src/components/accordion-item.props.d.ts +1 -0
- package/types/avatar/src/avatar.props.d.ts +1 -0
- package/types/binding-selector/index.d.ts +54 -0
- package/types/binding-selector/src/binding-selector.props.d.ts +1 -0
- package/types/button-group/index.d.ts +0 -15
- package/types/button-group/src/button-group.props.d.ts +1 -0
- package/types/code-editor/index.d.ts +1 -0
- package/types/code-editor/src/code-textbox.component.d.ts +6 -6
- package/types/code-editor/src/code-textbox.props.d.ts +2 -0
- package/types/color-picker/index.d.ts +15 -0
- package/types/color-picker/src/color-picker.props.d.ts +1 -0
- package/types/combo-list/src/composition/use-data-source.d.ts +2 -1
- package/types/combo-tree/src/combo-tree.props.d.ts +1 -0
- package/types/component/index.d.ts +2 -0
- package/types/component/src/component.props.d.ts +8 -0
- package/types/components.d.ts +7 -0
- package/types/condition/index.d.ts +55 -0
- package/types/data-grid/index.d.ts +5 -2
- package/types/data-grid/src/data-grid.component.d.ts +2 -1
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/appearance/use-cell-position.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +5 -1
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +2 -2
- package/types/data-view/composition/visualization/use-visual-data-bound.d.ts +3 -2
- package/types/data-view/composition/visualization/use-visual-data-row.d.ts +2 -1
- package/types/designer-toolbox/index.d.ts +3 -0
- package/types/designer-toolbox/src/toolbox.component.d.ts +14 -0
- package/types/designer-toolbox/src/toolbox.props.d.ts +29 -0
- package/types/designer-toolbox/src/types.d.ts +21 -0
- package/types/designer.d.ts +13 -0
- package/types/dropdown/index.d.ts +6 -27
- package/types/dropdown/src/dropdown.item.component.d.ts +1 -1
- package/types/dropdown/src/dropdown.props.d.ts +1 -0
- package/types/dynamic-form/designer.d.ts +1 -3
- package/types/dynamic-form/index.d.ts +3 -9
- package/types/dynamic-form/src/component/dynamic-form-label/dynamic-form-label.component.d.ts +3 -3
- package/types/dynamic-resolver/index.d.ts +0 -3
- package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver-design.d.ts +1 -1
- package/types/dynamic-resolver/src/resolver/property-config/property-config-resolver.d.ts +1 -1
- package/types/dynamic-resolver/src/resolver/property-config/use-property-config-resolver.d.ts +2 -2
- package/types/dynamic-resolver/src/resolver/schema/schema-resolver-design.d.ts +1 -1
- package/types/dynamic-resolver/src/resolver/schema/schema-resolver.d.ts +1 -1
- package/types/dynamic-view/src/components/maps.d.ts +104 -92
- package/types/{binding-selector/designer.d.ts → expression-editor/index.d.ts} +6 -6
- package/types/filter-condition-editor/index.d.ts +9 -0
- package/types/filter-condition-editor/src/components/filter-condition-grid.component.d.ts +12 -12
- package/types/filter-condition-editor/src/components/sort-editor-grid.component.d.ts +12 -12
- package/types/filter-condition-editor/src/filter-condition-editor.props.d.ts +1 -0
- package/types/flow-canvas/index.d.ts +3 -0
- package/types/flow-canvas/src/components/flow-node-item.component.d.ts +8 -0
- package/types/flow-canvas/src/components/flow-node-item.props.d.ts +3 -0
- package/types/flow-canvas/src/composition/types.d.ts +42 -0
- package/types/flow-canvas/src/composition/use-bezier-curve.d.ts +2 -0
- package/types/flow-canvas/src/composition/use-connections.d.ts +2 -0
- package/types/flow-canvas/src/composition/use-curve.d.ts +4 -0
- package/types/flow-canvas/src/composition/use-drawing-bezier.d.ts +2 -0
- package/types/flow-canvas/src/composition/use-drawing.d.ts +4 -0
- package/types/flow-canvas/src/flow-canvas.component.d.ts +8 -0
- package/types/flow-canvas/src/flow-canvas.props.d.ts +3 -0
- package/types/image-cropper/src/image-cropper.props.d.ts +1 -0
- package/types/index.d.ts +1 -0
- package/types/json-editor/src/json-editor.props.d.ts +1 -0
- package/types/layout/index.d.ts +0 -1
- package/types/layout/src/components/layout-pane.props.d.ts +1 -0
- package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +2 -0
- package/types/layout/src/designer/layout-pane.design.component.d.ts +8 -0
- package/types/layout/src/designer/layout-use-designer-rules.d.ts +2 -0
- package/types/layout/src/designer/layout.design.component.d.ts +8 -0
- package/types/layout/src/layout.props.d.ts +1 -0
- package/types/layout/src/schema/schema-mapper.d.ts +2 -0
- package/types/layout/src/schema/schema-resolver.d.ts +2 -0
- package/types/list-nav/index.d.ts +5 -24
- package/types/list-nav/src/designer/use-designer-rules.d.ts +2 -0
- package/types/list-nav/src/list-nav.props.d.ts +1 -0
- package/types/list-nav/src/property-config/list-nav.property-config.d.ts +8 -0
- package/types/list-nav/src/schema/schema-mapper.d.ts +2 -0
- package/types/list-nav/src/schema/schema-resolver.d.ts +2 -0
- package/types/list-view/index.d.ts +0 -1
- package/types/list-view/src/composition/use-draggable.d.ts +1 -1
- package/types/lookup/index.d.ts +1 -1
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +1 -1
- package/types/lookup/src/components/popup-container.component.d.ts +6 -6
- package/types/menu-lookup/src/menu-lookup.props.d.ts +1 -0
- package/types/modal/designer.d.ts +0 -2
- package/types/nav/index.d.ts +20 -24
- package/types/nav/src/nav.props.d.ts +1 -0
- package/types/number-range/src/number-range.props.d.ts +1 -0
- package/types/order/index.d.ts +5 -36
- package/types/order/src/designer/order.design.component.d.ts +1 -1
- package/types/order/src/order.props.d.ts +1 -0
- package/types/page-footer/index.d.ts +2 -0
- package/types/page-footer/src/page-footer.props.d.ts +1 -0
- package/types/pagination/index.d.ts +0 -15
- package/types/pagination/src/pagination.props.d.ts +1 -0
- package/types/progress/src/progress.props.d.ts +1 -0
- package/types/query-solution/index.d.ts +2 -1
- package/types/radio-group/designer.d.ts +1 -2
- package/types/search-box/index.d.ts +17 -1
- package/types/search-box/src/search-box.props.d.ts +1 -0
- package/types/section/designer.d.ts +0 -1
- package/types/smoke-detector/index.d.ts +2 -0
- package/types/smoke-detector/src/smoke-detector.props.d.ts +1 -0
- package/types/sort-condition-editor/index.d.ts +7 -2
- package/types/sort-condition-editor/src/sort-condition-editor.props.d.ts +1 -0
- package/types/splitter/index.d.ts +0 -1
- package/types/splitter/src/components/splitter-pane.props.d.ts +1 -0
- package/types/splitter/src/splitter.props.d.ts +1 -0
- package/types/tabs/designer.d.ts +0 -1
- package/types/tabs/index.d.ts +1 -0
- package/types/text/index.d.ts +20 -24
- package/types/text/src/text.props.d.ts +1 -0
- package/types/transfer/src/transfer.props.d.ts +1 -0
- package/types/tree-grid/src/components/data/data-area.component.d.ts +2 -2
- package/types/tree-grid/src/tree-grid.props.d.ts +1 -0
- package/types/tree-view/src/components/data/tree-area.component.d.ts +1 -1
- package/types/tree-view/src/tree-view.props.d.ts +2 -0
- package/types/uploader/src/uploader.props.d.ts +1 -0
- package/types/verify-detail/index.d.ts +5 -58
- package/types/verify-detail/src/designer/verify-detail.design.component.d.ts +8 -8
- package/types/verify-detail/src/verify-detail.props.d.ts +1 -0
- package/types/video/index.d.ts +20 -24
- package/types/video/src/video.props.d.ts +1 -0
- package/components/dynamic-form/index.css +0 -1
- package/designer/accordion/index.esm.js +0 -257
- package/designer/accordion/index.umd.cjs +0 -1
- package/designer/avatar/index.esm.js +0 -1460
- package/designer/avatar/index.umd.cjs +0 -1
- package/designer/binding-selector/index.esm.js +0 -792
- package/designer/binding-selector/index.umd.cjs +0 -1
- package/designer/button-group/index.esm.js +0 -282
- package/designer/button-group/index.umd.cjs +0 -1
- package/designer/code-editor/index.esm.js +0 -75
- package/designer/code-editor/index.umd.cjs +0 -1
- package/designer/color-picker/index.esm.js +0 -1096
- package/designer/color-picker/index.umd.cjs +0 -1
- package/designer/combo-list/index.esm.js +0 -1095
- package/designer/combo-list/index.umd.cjs +0 -1
- package/designer/combo-tree/index.esm.js +0 -186
- package/designer/combo-tree/index.umd.cjs +0 -1
- package/designer/component/index.css +0 -1
- package/designer/component/index.esm.js +0 -5002
- package/designer/component/index.umd.cjs +0 -1
- package/designer/condition/index.esm.js +0 -1899
- package/designer/condition/index.umd.cjs +0 -1
- package/designer/dropdown/index.esm.js +0 -261
- package/designer/dropdown/index.umd.cjs +0 -1
- package/designer/expression-editor/index.css +0 -1
- package/designer/expression-editor/index.esm.js +0 -7006
- package/designer/expression-editor/index.umd.cjs +0 -427
- package/designer/filter-condition-editor/index.css +0 -1
- package/designer/filter-condition-editor/index.esm.js +0 -4795
- package/designer/filter-condition-editor/index.umd.cjs +0 -1
- package/designer/html-template/index.esm.js +0 -718
- package/designer/html-template/index.umd.cjs +0 -1
- package/designer/image-cropper/index.esm.js +0 -765
- package/designer/image-cropper/index.umd.cjs +0 -1
- package/designer/json-editor/index.esm.js +0 -83
- package/designer/json-editor/index.umd.cjs +0 -1
- package/designer/language-textbox/index.esm.js +0 -783
- package/designer/language-textbox/index.umd.cjs +0 -8
- package/designer/layout/index.esm.js +0 -430
- package/designer/layout/index.umd.cjs +0 -1
- package/designer/list-nav/index.esm.js +0 -802
- package/designer/list-nav/index.umd.cjs +0 -1
- package/designer/lookup/index.esm.js +0 -2083
- package/designer/lookup/index.umd.cjs +0 -1
- package/designer/menu-lookup/index.esm.js +0 -46
- package/designer/menu-lookup/index.umd.cjs +0 -1
- package/designer/nav/index.esm.js +0 -284
- package/designer/nav/index.umd.cjs +0 -1
- package/designer/number-range/index.esm.js +0 -1616
- package/designer/number-range/index.umd.cjs +0 -1
- package/designer/order/index.css +0 -1
- package/designer/order/index.esm.js +0 -2196
- package/designer/order/index.umd.cjs +0 -18
- package/designer/page-footer/index.esm.js +0 -290
- package/designer/page-footer/index.umd.cjs +0 -1
- package/designer/page-header/index.esm.js +0 -1003
- package/designer/page-header/index.umd.cjs +0 -1
- package/designer/pagination/index.esm.js +0 -591
- package/designer/pagination/index.umd.cjs +0 -1
- package/designer/progress/index.esm.js +0 -213
- package/designer/progress/index.umd.cjs +0 -1
- package/designer/search-box/index.esm.js +0 -245
- package/designer/search-box/index.umd.cjs +0 -1
- package/designer/smoke-detector/index.css +0 -1
- package/designer/smoke-detector/index.esm.js +0 -178
- package/designer/smoke-detector/index.umd.cjs +0 -1
- package/designer/sort-condition-editor/index.esm.js +0 -138
- package/designer/sort-condition-editor/index.umd.cjs +0 -1
- package/designer/splitter/index.esm.js +0 -1120
- package/designer/splitter/index.umd.cjs +0 -1
- package/designer/step/index.esm.js +0 -226
- package/designer/step/index.umd.cjs +0 -1
- package/designer/text/index.esm.js +0 -147
- package/designer/text/index.umd.cjs +0 -1
- package/designer/transfer/index.esm.js +0 -254
- package/designer/transfer/index.umd.cjs +0 -1
- package/designer/tree-view/index.esm.js +0 -313
- package/designer/tree-view/index.umd.cjs +0 -1
- package/designer/uploader/index.esm.js +0 -1190
- package/designer/uploader/index.umd.cjs +0 -2
- package/designer/verify-detail/index.esm.js +0 -258
- package/designer/verify-detail/index.umd.cjs +0 -1
- package/designer/video/index.esm.js +0 -136
- package/designer/video/index.umd.cjs +0 -1
- package/designer/weather/index.css +0 -1
- package/designer/weather/index.esm.js +0 -6244
- package/designer/weather/index.umd.cjs +0 -14
- package/types/accordion/designer.d.ts +0 -44
- package/types/avatar/designer.d.ts +0 -29
- package/types/button-group/designer.d.ts +0 -29
- package/types/code-editor/designer.d.ts +0 -5
- package/types/color-picker/designer.d.ts +0 -29
- package/types/combo-list/designer.d.ts +0 -29
- package/types/combo-list/src/designer/combo-list.design.props.d.ts +0 -6
- package/types/combo-tree/designer.d.ts +0 -5
- package/types/component/designer.d.ts +0 -35
- package/types/condition/designer.d.ts +0 -56
- package/types/dropdown/designer.d.ts +0 -6
- package/types/dynamic-form/src/composition/use-input-type-resolver.d.ts +0 -11
- package/types/expression-editor/designer.d.ts +0 -9
- package/types/filter-condition-editor/designer.d.ts +0 -10
- package/types/html-template/designer.d.ts +0 -31
- package/types/html-template/src/designer/html-template.design.props.d.ts +0 -9
- package/types/image-cropper/designer.d.ts +0 -4
- package/types/json-editor/designer.d.ts +0 -5
- package/types/menu-lookup/designer.d.ts +0 -5
- package/types/nav/designer.d.ts +0 -6
- package/types/number-range/designer.d.ts +0 -29
- package/types/order/designer.d.ts +0 -6
- package/types/page-footer/designer.d.ts +0 -6
- package/types/page-header/src/designer/page-header.design.props.d.ts +0 -20
- package/types/pagination/designer.d.ts +0 -29
- package/types/progress/designer.d.ts +0 -29
- package/types/search-box/designer.d.ts +0 -52
- package/types/smoke-detector/designer.d.ts +0 -6
- package/types/sort-condition-editor/designer.d.ts +0 -9
- package/types/splitter/designer.d.ts +0 -32
- package/types/step/designer.d.ts +0 -6
- package/types/text/designer.d.ts +0 -6
- package/types/transfer/designer.d.ts +0 -35
- package/types/tree-view/designer.d.ts +0 -29
- package/types/uploader/designer.d.ts +0 -141
- package/types/verify-detail/designer.d.ts +0 -6
- package/types/video/designer.d.ts +0 -6
- /package/{designer → components}/condition/index.css +0 -0
- /package/{designer → components}/uploader/index.css +0 -0
- /package/types/{dynamic-form/src/component/form-control/form-control.component.d.ts → list-nav/src/designer/list-nav.design.component.d.ts} +0 -0
|
@@ -1,1096 +0,0 @@
|
|
|
1
|
-
var yt = Object.defineProperty;
|
|
2
|
-
var kt = (u, t, i) => t in u ? yt(u, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : u[t] = i;
|
|
3
|
-
var e = (u, t, i) => kt(u, typeof t != "symbol" ? t + "" : t, i);
|
|
4
|
-
import { withInstall as bt } from "../../components/common/index.esm.js";
|
|
5
|
-
import Pt, { colorPickerProps as it } from "../../components/color-picker/index.esm.js";
|
|
6
|
-
import { ref as k, defineComponent as U, onMounted as D, watch as V, createVNode as y, withModifiers as L, createTextVNode as rt, inject as Ht, computed as j, onBeforeMount as St, withDirectives as Y, vShow as Z, vModelText as It } from "vue";
|
|
7
|
-
import { useDesignerComponent as Mt } from "../../components/designer-canvas/index.esm.js";
|
|
8
|
-
import { resolveAppearance as xt, createPropsResolver as Rt } from "../../components/dynamic-resolver/index.esm.js";
|
|
9
|
-
class W {
|
|
10
|
-
}
|
|
11
|
-
class C extends W {
|
|
12
|
-
constructor(t, i, a, r) {
|
|
13
|
-
super(), this.cyan = t, this.magenta = i, this.yellow = a, this.black = r;
|
|
14
|
-
}
|
|
15
|
-
toString() {
|
|
16
|
-
return `cmyk(${this.getCyan()}%, ${this.getMagenta()}%, ${this.getYellow()}%, ${this.getBlack()}%)`;
|
|
17
|
-
}
|
|
18
|
-
getCyan() {
|
|
19
|
-
return Math.round(this.cyan);
|
|
20
|
-
}
|
|
21
|
-
getMagenta() {
|
|
22
|
-
return Math.round(this.magenta);
|
|
23
|
-
}
|
|
24
|
-
getYellow() {
|
|
25
|
-
return Math.round(this.yellow);
|
|
26
|
-
}
|
|
27
|
-
getBlack() {
|
|
28
|
-
return Math.round(this.black);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
class F extends W {
|
|
32
|
-
constructor(t, i, a, r) {
|
|
33
|
-
super(), this.hue = t, this.saturation = i, this.lightness = a, this.alpha = r;
|
|
34
|
-
}
|
|
35
|
-
toString(t = !0) {
|
|
36
|
-
return t ? `hsla(${this.getHue()}, ${this.getSaturation()}%, ${this.getLightness()}%, ${this.getAlpha()})` : `hsl(${this.getHue()}, ${this.getSaturation()}%, ${this.getLightness()}%)`;
|
|
37
|
-
}
|
|
38
|
-
getHue() {
|
|
39
|
-
return Math.round(this.hue);
|
|
40
|
-
}
|
|
41
|
-
getSaturation() {
|
|
42
|
-
return Math.round(this.saturation);
|
|
43
|
-
}
|
|
44
|
-
getLightness() {
|
|
45
|
-
return Math.round(this.lightness);
|
|
46
|
-
}
|
|
47
|
-
getAlpha() {
|
|
48
|
-
return Math.round(this.alpha * 100) / 100;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
class q extends W {
|
|
52
|
-
constructor(t, i, a, r) {
|
|
53
|
-
super(), this.hue = t, this.saturation = i, this.value = a, this.alpha = r;
|
|
54
|
-
}
|
|
55
|
-
toString(t = !0) {
|
|
56
|
-
return t ? `hsva(${this.getHue()}, ${this.getSaturation()}%, ${this.getValue()}%, ${this.getAlpha()})` : `hsv(${this.getHue()}, ${this.getSaturation()}%, ${this.getValue()}%)`;
|
|
57
|
-
}
|
|
58
|
-
getHue() {
|
|
59
|
-
return Math.round(this.hue);
|
|
60
|
-
}
|
|
61
|
-
getSaturation() {
|
|
62
|
-
return Math.round(this.saturation);
|
|
63
|
-
}
|
|
64
|
-
getValue() {
|
|
65
|
-
return Math.round(this.value);
|
|
66
|
-
}
|
|
67
|
-
getAlpha() {
|
|
68
|
-
return Math.round(this.alpha * 100) / 100;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
class s extends W {
|
|
72
|
-
constructor(t, i, a, r) {
|
|
73
|
-
super(), this.red = t, this.green = i, this.blue = a, this.alpha = r;
|
|
74
|
-
}
|
|
75
|
-
toString(t = !0) {
|
|
76
|
-
return t ? `rgba(${this.getRed()}, ${this.getGreen()}, ${this.getBlue()}, ${this.getAlpha()})` : `rgb(${this.getRed()}, ${this.getGreen()}, ${this.getBlue()})`;
|
|
77
|
-
}
|
|
78
|
-
getRed() {
|
|
79
|
-
return Math.round(this.red);
|
|
80
|
-
}
|
|
81
|
-
getGreen() {
|
|
82
|
-
return Math.round(this.green);
|
|
83
|
-
}
|
|
84
|
-
getBlue() {
|
|
85
|
-
return Math.round(this.blue);
|
|
86
|
-
}
|
|
87
|
-
getAlpha() {
|
|
88
|
-
return Math.round(this.alpha * 100) / 100;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
const n = class n {
|
|
92
|
-
};
|
|
93
|
-
e(n, "transparent", new s(0, 0, 0, 0)), e(n, "aliceblue", new s(240, 248, 255, 1)), e(n, "antiquewhite", new s(250, 235, 215, 1)), e(n, "aqua", new s(0, 255, 255, 1)), e(n, "aquamarine", new s(127, 255, 212, 1)), e(n, "azure", new s(240, 255, 255, 1)), e(n, "beige", new s(245, 245, 220, 1)), e(n, "bisque", new s(255, 228, 196, 1)), e(n, "black", new s(0, 0, 0, 1)), e(n, "blanchedalmond", new s(255, 235, 205, 1)), e(n, "blue", new s(0, 0, 255, 1)), e(n, "blueviolet", new s(138, 43, 226, 1)), e(n, "brown", new s(165, 42, 42, 1)), e(n, "burlywood", new s(222, 184, 135, 1)), e(n, "cadetblue", new s(95, 158, 160, 1)), e(n, "chartreuse", new s(127, 255, 0, 1)), e(n, "chocolate", new s(210, 105, 30, 1)), e(n, "coral", new s(255, 127, 80, 1)), e(n, "cornflowerblue", new s(100, 149, 237, 1)), e(n, "cornsilk", new s(255, 248, 220, 1)), e(n, "crimson", new s(220, 20, 60, 1)), e(n, "cyan", new s(0, 255, 255, 1)), e(n, "darkblue", new s(0, 0, 139, 1)), e(n, "darkcyan", new s(0, 139, 139, 1)), e(n, "darkgoldenrod", new s(184, 134, 11, 1)), e(n, "darkgray", new s(169, 169, 169, 1)), e(n, "darkgreen", new s(0, 100, 0, 1)), e(n, "darkgrey", n.darkgray), e(n, "darkkhaki", new s(189, 183, 107, 1)), e(n, "darkmagenta", new s(139, 0, 139, 1)), e(n, "darkolivegreen", new s(85, 107, 47, 1)), e(n, "darkorange", new s(255, 140, 0, 1)), e(n, "darkorchid", new s(153, 50, 204, 1)), e(n, "darkred", new s(139, 0, 0, 1)), e(n, "darksalmon", new s(233, 150, 122, 1)), e(n, "darkseagreen", new s(143, 188, 143, 1)), e(n, "darkslateblue", new s(72, 61, 139, 1)), e(n, "darkslategray", new s(47, 79, 79, 1)), e(n, "darkslategrey", n.darkslategray), e(n, "darkturquoise", new s(0, 206, 209, 1)), e(n, "darkviolet", new s(148, 0, 211, 1)), e(n, "deeppink", new s(255, 20, 147, 1)), e(n, "deepskyblue", new s(0, 191, 255, 1)), e(n, "dimgray", new s(105, 105, 105, 1)), e(n, "dimgrey", n.dimgray), e(n, "dodgerblue", new s(30, 144, 255, 1)), e(n, "firebrick", new s(178, 34, 34, 1)), e(n, "floralwhite", new s(255, 250, 240, 1)), e(n, "forestgreen", new s(34, 139, 34, 1)), e(n, "fuchsia", new s(255, 0, 255, 1)), e(n, "gainsboro", new s(220, 220, 220, 1)), e(n, "ghostwhite", new s(248, 248, 255, 1)), e(n, "gold", new s(255, 215, 0, 1)), e(n, "goldenrod", new s(218, 165, 32, 1)), e(n, "gray", new s(128, 128, 128, 1)), e(n, "grey", n.gray), e(n, "green", new s(0, 128, 0, 1)), e(n, "greenyellow", new s(173, 255, 47, 1)), e(n, "honeydew", new s(240, 255, 240, 1)), e(n, "hotpink", new s(255, 105, 180, 1)), e(n, "indianred", new s(205, 92, 92, 1)), e(n, "indigo", new s(75, 0, 130, 1)), e(n, "ivory", new s(255, 255, 240, 1)), e(n, "khaki", new s(240, 230, 140, 1)), e(n, "lavender", new s(230, 230, 250, 1)), e(n, "lavenderblush", new s(255, 240, 245, 1)), e(n, "lawngreen", new s(124, 252, 0, 1)), e(n, "lemonchiffon", new s(255, 250, 205, 1)), e(n, "lightblue", new s(173, 216, 230, 1)), e(n, "lightcoral", new s(240, 128, 128, 1)), e(n, "lightcyan", new s(224, 255, 255, 1)), e(n, "lightgoldenrodyellow", new s(250, 250, 210, 1)), e(n, "lightgray", new s(211, 211, 211, 1)), e(n, "lightgreen", new s(144, 238, 144, 1)), e(n, "lightgrey", n.lightgray), e(n, "lightpink", new s(255, 182, 193, 1)), e(n, "lightsalmon", new s(255, 160, 122, 1)), e(n, "lightseagreen", new s(32, 178, 170, 1)), e(n, "lightskyblue", new s(135, 206, 250, 1)), e(n, "lightslategray", new s(119, 136, 153, 1)), e(n, "lightslategrey", n.lightslategray), e(n, "lightsteelblue", new s(176, 196, 222, 1)), e(n, "lightyellow", new s(255, 255, 224, 1)), e(n, "lime", new s(0, 255, 0, 1)), e(n, "limegreen", new s(50, 205, 50, 1)), e(n, "linen", new s(250, 240, 230, 1)), e(n, "magenta", new s(255, 0, 255, 1)), e(n, "maroon", new s(128, 0, 0, 1)), e(n, "mediumaquamarine", new s(102, 205, 170, 1)), e(n, "mediumblue", new s(0, 0, 205, 1)), e(n, "mediumorchid", new s(186, 85, 211, 1)), e(n, "mediumpurple", new s(147, 112, 219, 1)), e(n, "mediumseagreen", new s(60, 179, 113, 1)), e(n, "mediumslateblue", new s(123, 104, 238, 1)), e(n, "mediumspringgreen", new s(0, 250, 154, 1)), e(n, "mediumturquoise", new s(72, 209, 204, 1)), e(n, "mediumvioletred", new s(199, 21, 133, 1)), e(n, "midnightblue", new s(25, 25, 112, 1)), e(n, "mintcream", new s(245, 255, 250, 1)), e(n, "mistyrose", new s(255, 228, 225, 1)), e(n, "moccasin", new s(255, 228, 181, 1)), e(n, "navajowhite", new s(255, 222, 173, 1)), e(n, "navy", new s(0, 0, 128, 1)), e(n, "oldlace", new s(253, 245, 230, 1)), e(n, "olive", new s(128, 128, 0, 1)), e(n, "olivedrab", new s(107, 142, 35, 1)), e(n, "orange", new s(255, 165, 0, 1)), e(n, "orangered", new s(255, 69, 0, 1)), e(n, "orchid", new s(218, 112, 214, 1)), e(n, "palegoldenrod", new s(238, 232, 170, 1)), e(n, "palegreen", new s(152, 251, 152, 1)), e(n, "paleturquoise", new s(175, 238, 238, 1)), e(n, "palevioletred", new s(219, 112, 147, 1)), e(n, "papayawhip", new s(255, 239, 213, 1)), e(n, "peachpuff", new s(255, 218, 185, 1)), e(n, "peru", new s(205, 133, 63, 1)), e(n, "pink", new s(255, 192, 203, 1)), e(n, "plum", new s(221, 160, 221, 1)), e(n, "powderblue", new s(176, 224, 230, 1)), e(n, "purple", new s(128, 0, 128, 1)), e(n, "red", new s(255, 0, 0, 1)), e(n, "rosybrown", new s(188, 143, 143, 1)), e(n, "royalblue", new s(65, 105, 225, 1)), e(n, "saddlebrown", new s(139, 69, 19, 1)), e(n, "salmon", new s(250, 128, 114, 1)), e(n, "sandybrown", new s(244, 164, 96, 1)), e(n, "seagreen", new s(46, 139, 87, 1)), e(n, "seashell", new s(255, 245, 238, 1)), e(n, "sienna", new s(160, 82, 45, 1)), e(n, "silver", new s(192, 192, 192, 1)), e(n, "skyblue", new s(135, 206, 235, 1)), e(n, "slateblue", new s(106, 90, 205, 1)), e(n, "slategray", new s(112, 128, 144, 1)), e(n, "slategrey", n.slategray), e(n, "snow", new s(255, 250, 250, 1)), e(n, "springgreen", new s(0, 255, 127, 1)), e(n, "steelblue", new s(70, 130, 180, 1)), e(n, "tan", new s(210, 180, 140, 1)), e(n, "teal", new s(0, 128, 128, 1)), e(n, "thistle", new s(216, 191, 216, 1)), e(n, "tomato", new s(255, 99, 71, 1)), e(n, "turquoise", new s(64, 224, 208, 1)), e(n, "violet", new s(238, 130, 238, 1)), e(n, "wheat", new s(245, 222, 179, 1)), e(n, "white", new s(255, 255, 255, 1)), e(n, "whitesmoke", new s(245, 245, 245, 1)), e(n, "yellow", new s(255, 255, 0, 1)), e(n, "yellowgreen", new s(154, 205, 50, 1));
|
|
94
|
-
let T = n;
|
|
95
|
-
class P {
|
|
96
|
-
constructor(t) {
|
|
97
|
-
/**
|
|
98
|
-
* base color used to calculate other
|
|
99
|
-
* default color
|
|
100
|
-
* rgb(255, 0, 0)
|
|
101
|
-
* hsl(0, 100%, 50%)
|
|
102
|
-
* 初始色#ff0000
|
|
103
|
-
*/
|
|
104
|
-
e(this, "hsva", new q(0, 1, 1, 1));
|
|
105
|
-
e(this, "rgba", new s(255, 0, 0, 1));
|
|
106
|
-
t && this.stringToColor(t);
|
|
107
|
-
}
|
|
108
|
-
static from(t) {
|
|
109
|
-
return typeof t == "string" ? new P(t) : t instanceof P ? t.clone() : t instanceof s ? 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);
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* make from existing color new color object
|
|
113
|
-
*/
|
|
114
|
-
clone() {
|
|
115
|
-
return P.from(this.getRgba());
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* define Color from hex, rgb, rgba, hsl, hsla or cmyk string
|
|
119
|
-
*/
|
|
120
|
-
setFromString(t) {
|
|
121
|
-
return this.stringToColor(t);
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* define Color from HSV values
|
|
125
|
-
*/
|
|
126
|
-
setHsva(t, i = 100, a = 100, r = 1) {
|
|
127
|
-
return t != null && (this.hsva.hue = t), i != null && (this.hsva.saturation = i), a != null && (this.hsva.value = a), r != null && (r = r > 1 ? 1 : r < 0 ? 0 : r, this.hsva.alpha = r), this.rgba = this.hsvaToRgba(this.hsva), this;
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* define Color from RGBa
|
|
131
|
-
*/
|
|
132
|
-
setRgba(t, i, a, r = 1) {
|
|
133
|
-
return t != null && (this.rgba.red = t), i != null && (this.rgba.green = i), a != null && (this.rgba.blue = a), r != null && (r = r > 1 ? 1 : r < 0 ? 0 : r, this.rgba.alpha = r), this.hsva = this.rgbaToHsva(this.rgba), this;
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* define Color from HSLa
|
|
137
|
-
*/
|
|
138
|
-
setHsla(t, i, a, r = 1) {
|
|
139
|
-
r != null && (r = r > 1 ? 1 : r < 0 ? 0 : r, this.rgba.alpha = r);
|
|
140
|
-
const w = new F(t, i, a, r);
|
|
141
|
-
return this.rgba = this.hslaToRgba(w), this.hsva = this.rgbaToHsva(this.rgba), this;
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* return hexadecimal value formatted as '#341d2a' or '#341d2aFF' if alhpa channel is enabled
|
|
145
|
-
*/
|
|
146
|
-
toHexString(t = !1) {
|
|
147
|
-
let i = "#" + (16777216 | this.rgba.getRed() << 16 | this.rgba.getGreen() << 8 | this.rgba.getBlue()).toString(16).substr(1);
|
|
148
|
-
return t && (i += (256 | Math.round(this.rgba.alpha * 255)).toString(16).substr(1)), i.toUpperCase();
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* return rgba string formatted as rgba(52, 29, 42, 1)
|
|
152
|
-
*/
|
|
153
|
-
toRgbaString() {
|
|
154
|
-
return this.rgba.toString();
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* return rgb string formatted as rgb(52, 29, 42)
|
|
158
|
-
*/
|
|
159
|
-
toRgbString() {
|
|
160
|
-
return this.rgba.toString(!1);
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* return hsla string formatted as hsla(327, 29%, 16%, 1)
|
|
164
|
-
*/
|
|
165
|
-
toHslaString() {
|
|
166
|
-
return this.getHsla().toString();
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* return hsl string formatted as hsl(327, 29%, 16%)
|
|
170
|
-
*/
|
|
171
|
-
toHslString() {
|
|
172
|
-
return this.getHsla().toString(!1);
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* return hsva string formatted as hsva(327, 29%, 16%, 100%)
|
|
176
|
-
*/
|
|
177
|
-
toHsvaString() {
|
|
178
|
-
return this.hsva.toString();
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* return hsv string formatted as hsv(327, 29%, 16%)
|
|
182
|
-
*/
|
|
183
|
-
toHsvString() {
|
|
184
|
-
return this.hsva.toString(!1);
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* return Cmyk string formatted as cmyk(100%, 100%, 100%, 100%)
|
|
188
|
-
*/
|
|
189
|
-
toCmykString() {
|
|
190
|
-
return this.getCmyk().toString();
|
|
191
|
-
}
|
|
192
|
-
getHsva() {
|
|
193
|
-
return new q(this.hsva.hue, this.hsva.saturation, this.hsva.value, this.hsva.alpha);
|
|
194
|
-
}
|
|
195
|
-
getRgba() {
|
|
196
|
-
return new s(this.rgba.red, this.rgba.green, this.rgba.blue, this.rgba.alpha);
|
|
197
|
-
}
|
|
198
|
-
getHsla() {
|
|
199
|
-
return this.rgbaToHsla(this.rgba);
|
|
200
|
-
}
|
|
201
|
-
getCmyk() {
|
|
202
|
-
return this.rgbaToCmyk(this.rgba);
|
|
203
|
-
}
|
|
204
|
-
hsvaToHsla(t) {
|
|
205
|
-
const { hue: i } = t, a = t.saturation / 100, r = t.value / 100, w = (2 - a) * t.value / 2, c = a * r / (w <= 1 ? w : 2 - w) || 0;
|
|
206
|
-
return new F(i, w * 100, c * 100, t.alpha);
|
|
207
|
-
}
|
|
208
|
-
hslaToHsva(t) {
|
|
209
|
-
const { hue: i } = t, a = t.lightness / 100 * 2, r = t.saturation / 100 * (a <= 1 ? a : 2 - a), w = (a + r) / 2, c = 2 * r / (a + r) || 0;
|
|
210
|
-
return new q(i, c, w, t.alpha);
|
|
211
|
-
}
|
|
212
|
-
rgbaToHsva(t) {
|
|
213
|
-
const i = t.red / 255, a = t.green / 255, r = t.blue / 255, { alpha: w } = t, c = Math.max(i, a, r), h = Math.min(i, a, r), p = c - h;
|
|
214
|
-
let g = 0, l = c === 0 ? 0 : p / c, o = c;
|
|
215
|
-
if (c !== h) {
|
|
216
|
-
switch (c) {
|
|
217
|
-
case i:
|
|
218
|
-
g = (a - r) / p + (a < r ? 6 : 0);
|
|
219
|
-
break;
|
|
220
|
-
case a:
|
|
221
|
-
g = 2 + (r - i) / p;
|
|
222
|
-
break;
|
|
223
|
-
case r:
|
|
224
|
-
g = 4 + (i - a) / p;
|
|
225
|
-
break;
|
|
226
|
-
}
|
|
227
|
-
g /= 6;
|
|
228
|
-
}
|
|
229
|
-
return g *= 360, l *= 100, o *= 100, new q(g, l, o, w);
|
|
230
|
-
}
|
|
231
|
-
hsvaToRgba(t) {
|
|
232
|
-
let i = 1, a = 0, r = 0;
|
|
233
|
-
const w = t.saturation / 100, c = t.value / 100, { alpha: h } = t, p = t.hue / 60, g = Math.floor(p), l = p - g, o = (1 - w) * c, m = (1 - w * l) * c, b = (1 - w * (1 - l)) * c;
|
|
234
|
-
switch (g) {
|
|
235
|
-
case 6:
|
|
236
|
-
case 0:
|
|
237
|
-
i = c, a = b, r = o;
|
|
238
|
-
break;
|
|
239
|
-
case 1:
|
|
240
|
-
i = m, a = c, r = o;
|
|
241
|
-
break;
|
|
242
|
-
case 2:
|
|
243
|
-
i = o, a = c, r = b;
|
|
244
|
-
break;
|
|
245
|
-
case 3:
|
|
246
|
-
i = o, a = m, r = c;
|
|
247
|
-
break;
|
|
248
|
-
case 4:
|
|
249
|
-
i = b, a = o, r = c;
|
|
250
|
-
break;
|
|
251
|
-
case 5:
|
|
252
|
-
i = c, a = o, r = m;
|
|
253
|
-
break;
|
|
254
|
-
}
|
|
255
|
-
return i *= 255, a *= 255, r *= 255, new s(i, a, r, h);
|
|
256
|
-
}
|
|
257
|
-
rgbaToHsla(t) {
|
|
258
|
-
const i = t.red / 255, a = t.green / 255, r = t.blue / 255, { alpha: w } = t, c = Math.max(i, a, r), h = Math.min(i, a, r);
|
|
259
|
-
let p = 0, g = 0, l = (c + h) / 2;
|
|
260
|
-
const o = c - h;
|
|
261
|
-
if (c !== h) {
|
|
262
|
-
switch (g = l > 0.5 ? o / (2 - c - h) : o / (c + h), c) {
|
|
263
|
-
case i:
|
|
264
|
-
p = (a - r) / o + (a < r ? 6 : 0);
|
|
265
|
-
break;
|
|
266
|
-
case a:
|
|
267
|
-
p = (r - i) / o + 2;
|
|
268
|
-
break;
|
|
269
|
-
case r:
|
|
270
|
-
p = (i - a) / o + 4;
|
|
271
|
-
break;
|
|
272
|
-
}
|
|
273
|
-
p /= 6;
|
|
274
|
-
}
|
|
275
|
-
return p *= 360, g *= 100, l *= 100, new F(p, g, l, w);
|
|
276
|
-
}
|
|
277
|
-
/**
|
|
278
|
-
* convert rgb color from HSLa
|
|
279
|
-
*
|
|
280
|
-
* hue = 0 => 360
|
|
281
|
-
* saturation = 0 => 1
|
|
282
|
-
* lightness = 0 => 1
|
|
283
|
-
*/
|
|
284
|
-
hslaToRgba(t) {
|
|
285
|
-
const i = t.hue / 360, a = t.saturation / 100, r = t.lightness / 100, { alpha: w } = t;
|
|
286
|
-
let c = r, h = r, p = r;
|
|
287
|
-
if (a !== 0) {
|
|
288
|
-
const g = r < 0.5 ? r * (1 + a) : r + a - r * a, l = 2 * r - g;
|
|
289
|
-
c = this.hueToRgb(l, g, i + 1 / 3), h = this.hueToRgb(l, g, i), p = this.hueToRgb(l, g, i - 1 / 3);
|
|
290
|
-
}
|
|
291
|
-
return c *= 255, h *= 255, p *= 255, new s(c, h, p, w);
|
|
292
|
-
}
|
|
293
|
-
hueToRgb(t, i, a) {
|
|
294
|
-
return a < 0 && (a += 1), a > 1 && (a -= 1), a < 1 / 6 ? t + (i - t) * 6 * a : a < 1 / 2 ? i : a < 2 / 3 ? t + (i - t) * (2 / 3 - a) * 6 : t;
|
|
295
|
-
}
|
|
296
|
-
/**
|
|
297
|
-
* The Red, Green, Blue values are given in the range of 0..255,
|
|
298
|
-
*
|
|
299
|
-
* the red color(R) is calculated from the cyan(C) and black(K) colors,
|
|
300
|
-
* the green color(G) is calculated from the magenta(M) and black(K) colors,
|
|
301
|
-
* The blue color(B) is calculated from the yellow(Y) and black(K) colors.
|
|
302
|
-
*
|
|
303
|
-
* Below is the formula of CMYK to RGB convertion
|
|
304
|
-
*
|
|
305
|
-
* Red = 255 × 1 - min( (1 - Cyan ÷ 100) × (1 - Black) )
|
|
306
|
-
* Green = 255 × 1 - min(1 - Magenta ÷ 100) × (1 - Black)
|
|
307
|
-
* Blue = 255 × 1 - min(1 - Yellow ÷ 100) × (1 - Black)
|
|
308
|
-
*/
|
|
309
|
-
cmykToRgba(t) {
|
|
310
|
-
const i = t.black / 100, a = t.cyan / 100, r = t.magenta / 100, w = t.yellow / 100;
|
|
311
|
-
let c = Math.min(1, (1 - a) * (1 - i)), h = Math.min(1, (1 - r) * (1 - i)), p = Math.min(1, (1 - w) * (1 - i));
|
|
312
|
-
return c *= 255, h *= 255, p *= 255, new s(c, h, p, 1);
|
|
313
|
-
}
|
|
314
|
-
/**
|
|
315
|
-
* The max number of R, G, B values are 255, first of all, we divided them by 255 to become the number
|
|
316
|
-
* of 0~1, this ratio will be used in the calculation.
|
|
317
|
-
* Rc = R ÷ 255
|
|
318
|
-
* Gc = G ÷ 255
|
|
319
|
-
* Bc = B ÷ 255
|
|
320
|
-
* The black key(K) color could be many result, when we assume a black key value,
|
|
321
|
-
* the other three colors(cyan, magenta, yellow) can be calculated.
|
|
322
|
-
* we can calculate it from the red, green and blue colors, the max number of black key should be :
|
|
323
|
-
* K = 1 - min(Rc, Gc, Bc);
|
|
324
|
-
*
|
|
325
|
-
* or we can assume we run out of the black ink, need use the remaining other three color inks to finish the printing job.
|
|
326
|
-
* K = 0;
|
|
327
|
-
*
|
|
328
|
-
* The cyan color(C) is calculated from the red and black colors:
|
|
329
|
-
* C = (1 - Rc - K) ÷ (1 - K)
|
|
330
|
-
*
|
|
331
|
-
* The magenta color (M) is calculated from the green and black colors:
|
|
332
|
-
* M = (1 - Gr - K) ÷ (1 - K)
|
|
333
|
-
*
|
|
334
|
-
* The yellow color(Y) is calculated from the blue and black colors:
|
|
335
|
-
* Y = (1 - Bc - K) ÷ ( 1 - K)
|
|
336
|
-
*/
|
|
337
|
-
rgbaToCmyk(t) {
|
|
338
|
-
const i = t.red / 255, a = t.green / 255, r = t.blue / 255;
|
|
339
|
-
let w = 1 - i, c = 1 - a, h = 1 - r, p = Math.min(w, c, h);
|
|
340
|
-
return p === 1 ? new C(0, 0, 0, 1) : (w = (w - p) / (1 - p), c = (c - p) / (1 - p), h = (h - p) / (1 - p), p *= 100, w *= 100, c *= 100, h *= 100, new C(w, c, h, p));
|
|
341
|
-
}
|
|
342
|
-
roundNumber(t) {
|
|
343
|
-
return Math.round(t * 100) / 100;
|
|
344
|
-
}
|
|
345
|
-
stringToColor(t) {
|
|
346
|
-
const i = t.replace(/ /g, "").toLowerCase();
|
|
347
|
-
let a = T[t] || null;
|
|
348
|
-
if (i[0] === "#") {
|
|
349
|
-
let c = i.substr(1);
|
|
350
|
-
const { length: h } = c;
|
|
351
|
-
let p = 1, g;
|
|
352
|
-
if (h === 3)
|
|
353
|
-
g = c.split("").map((l) => l + l);
|
|
354
|
-
else if (h === 6)
|
|
355
|
-
g = c.match(/.{2}/g);
|
|
356
|
-
else if (h === 8) {
|
|
357
|
-
const l = c.substr(-2);
|
|
358
|
-
c = c.substr(0, h - 2), p = this.roundNumber(parseInt(l || "FF", 16) / 255), g = c.match(/.{2}/g);
|
|
359
|
-
}
|
|
360
|
-
g && g.length === 3 && (a = new s(parseInt(g[0], 16), parseInt(g[1], 16), parseInt(g[2], 16), p));
|
|
361
|
-
}
|
|
362
|
-
const r = i.indexOf("("), w = i.indexOf(")");
|
|
363
|
-
if (r !== -1 && w + 1 === i.length) {
|
|
364
|
-
const c = i.substr(0, r), h = i.substr(r + 1, w - (r + 1)).split(",");
|
|
365
|
-
let p = 1, g, l;
|
|
366
|
-
switch (c) {
|
|
367
|
-
case "rgba":
|
|
368
|
-
p = parseFloat(h.pop());
|
|
369
|
-
case "rgb":
|
|
370
|
-
a = new s(parseInt(h[0], 10), parseInt(h[1], 10), parseInt(h[2], 10), p);
|
|
371
|
-
break;
|
|
372
|
-
case "hsla":
|
|
373
|
-
p = parseFloat(h.pop());
|
|
374
|
-
break;
|
|
375
|
-
case "hsl":
|
|
376
|
-
g = new F(
|
|
377
|
-
parseInt(h[0], 10),
|
|
378
|
-
parseInt(h[1], 10),
|
|
379
|
-
parseInt(h[2], 10),
|
|
380
|
-
p
|
|
381
|
-
), a = this.hslaToRgba(g);
|
|
382
|
-
break;
|
|
383
|
-
case "cmyk":
|
|
384
|
-
l = new C(
|
|
385
|
-
parseInt(h[0], 10),
|
|
386
|
-
parseInt(h[1], 10),
|
|
387
|
-
parseInt(h[2], 10),
|
|
388
|
-
parseInt(h[3], 10)
|
|
389
|
-
), a = this.cmykToRgba(l);
|
|
390
|
-
break;
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
return a && (this.rgba = a, this.hsva = this.rgbaToHsva(a)), this;
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
var x = /* @__PURE__ */ ((u) => (u.hex = "hex", u.hexa = "hexa", u.rgba = "rgba", u.rgb = "rgb", u.hsla = "hsla", u.hsl = "hsl", u.cmyk = "cmyk", u))(x || {});
|
|
397
|
-
class ct {
|
|
398
|
-
constructor(t) {
|
|
399
|
-
/** 所选颜色值 */
|
|
400
|
-
e(this, "modelValue", null);
|
|
401
|
-
/** 色调颜色值 */
|
|
402
|
-
e(this, "hueValue", null);
|
|
403
|
-
/** 初始颜色值 */
|
|
404
|
-
e(this, "initValue", null);
|
|
405
|
-
e(this, "valueChanged", k());
|
|
406
|
-
e(this, "initType", null);
|
|
407
|
-
// 此处没有监听变量变更后操作的方法 TODO
|
|
408
|
-
e(this, "alphaChannelVisibilityChanges", k());
|
|
409
|
-
e(this, "colorPresets", []);
|
|
410
|
-
const i = t[0], a = P.from(i);
|
|
411
|
-
this.setValue(a), this.setHueColor(a);
|
|
412
|
-
}
|
|
413
|
-
/** 设置值 */
|
|
414
|
-
setValueFrom(t, i, a) {
|
|
415
|
-
const r = P.from(t);
|
|
416
|
-
return this.initValue || (this.initValue = P.from(t)), typeof t == "string" && this.finOutInputType(t), this.setHueColor(r), this.setValue(r), this;
|
|
417
|
-
}
|
|
418
|
-
setHueColor(t) {
|
|
419
|
-
(this.hueValue && t.getHsva().hue > 0 || !this.hueValue) && (this.hueValue = new P().setHsva(t.getHsva().hue));
|
|
420
|
-
}
|
|
421
|
-
get hue() {
|
|
422
|
-
return this.hueValue;
|
|
423
|
-
}
|
|
424
|
-
set hue(t) {
|
|
425
|
-
this.hueValue = t;
|
|
426
|
-
}
|
|
427
|
-
setValue(t) {
|
|
428
|
-
var i;
|
|
429
|
-
return this.modelValue = t, (t == null ? void 0 : t.toRgbaString()) === ((i = this.valueChanged.value) == null ? void 0 : i.toRgbaString()) && (this.valueChanged.value = t), this;
|
|
430
|
-
}
|
|
431
|
-
get value() {
|
|
432
|
-
return this.modelValue;
|
|
433
|
-
}
|
|
434
|
-
set value(t) {
|
|
435
|
-
this.setValue(t);
|
|
436
|
-
}
|
|
437
|
-
reset() {
|
|
438
|
-
let t;
|
|
439
|
-
return this.initValue ? (t = this.initValue.clone(), this.setHueColor(t)) : (t = P.from(new s(255, 0, 0, 1)), this.hueValue = new P().setHsva(t.getHsva().hue)), this.setValue(t), this;
|
|
440
|
-
}
|
|
441
|
-
showAlphaChannel() {
|
|
442
|
-
return this.alphaChannelVisibilityChanges.value = !0, this;
|
|
443
|
-
}
|
|
444
|
-
finOutInputType(t) {
|
|
445
|
-
const i = t.replace(/ /g, "").toLowerCase();
|
|
446
|
-
i[0] === "#" && (this.initType = "hex", i.length > 7 && (this.initType = "hexa"));
|
|
447
|
-
const a = i.indexOf("(");
|
|
448
|
-
switch (i.substr(0, a)) {
|
|
449
|
-
case "rgba":
|
|
450
|
-
this.initType = "rgba";
|
|
451
|
-
break;
|
|
452
|
-
case "rgb":
|
|
453
|
-
this.initType = "rgb";
|
|
454
|
-
break;
|
|
455
|
-
case "hsla":
|
|
456
|
-
this.initType = "hsla";
|
|
457
|
-
break;
|
|
458
|
-
case "hsl":
|
|
459
|
-
this.initType = "hsl";
|
|
460
|
-
break;
|
|
461
|
-
case "cmyk":
|
|
462
|
-
this.initType = "cmyk";
|
|
463
|
-
break;
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
/** 设置预定义颜色 */
|
|
467
|
-
setColorPresets(t) {
|
|
468
|
-
return this.colorPresets = this.setPresets(t), this;
|
|
469
|
-
}
|
|
470
|
-
setPresets(t) {
|
|
471
|
-
const i = [];
|
|
472
|
-
return t.map((a) => {
|
|
473
|
-
Array.isArray(a) ? i.push(this.setPresets(a)) : i.push(new P(a));
|
|
474
|
-
}), i;
|
|
475
|
-
}
|
|
476
|
-
get presets() {
|
|
477
|
-
return this.colorPresets;
|
|
478
|
-
}
|
|
479
|
-
hasPresets() {
|
|
480
|
-
return this.colorPresets.length > 0;
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
/** 确定输入颜色类型 */
|
|
484
|
-
e(ct, "finOutInputType");
|
|
485
|
-
function A(u, t) {
|
|
486
|
-
if (!u)
|
|
487
|
-
return "";
|
|
488
|
-
switch (t) {
|
|
489
|
-
case x.hex:
|
|
490
|
-
return u.toHexString();
|
|
491
|
-
case x.hexa:
|
|
492
|
-
return u.toHexString(!0);
|
|
493
|
-
case x.rgb:
|
|
494
|
-
return u.toRgbString();
|
|
495
|
-
case x.rgba:
|
|
496
|
-
return u.toRgbaString();
|
|
497
|
-
case x.hsl:
|
|
498
|
-
return u.toHslString();
|
|
499
|
-
case x.hsla:
|
|
500
|
-
return u.toHslaString();
|
|
501
|
-
default:
|
|
502
|
-
return u.toRgbaString();
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
const $t = {
|
|
506
|
-
color: { type: Object, default: "" },
|
|
507
|
-
hue: { type: Object, default: "" },
|
|
508
|
-
randomId: { type: String, default: "" },
|
|
509
|
-
allowColorNull: { type: Boolean, default: !1 }
|
|
510
|
-
}, Bt = /* @__PURE__ */ U({
|
|
511
|
-
name: "SvPanel",
|
|
512
|
-
props: $t,
|
|
513
|
-
emits: ["update:color"],
|
|
514
|
-
setup(u, t) {
|
|
515
|
-
const i = k(null), a = k(null), r = k(u.randomId), w = k(u.allowColorNull);
|
|
516
|
-
function c() {
|
|
517
|
-
return u.hue ? u.hue.toRgbaString() : "#3f51b5";
|
|
518
|
-
}
|
|
519
|
-
function h(o, m) {
|
|
520
|
-
var b, f;
|
|
521
|
-
o = Math.max(0, Math.min(o, 100)), m = Math.max(0, Math.min(m, 100)), i.value && ((b = i.value.style) == null || b.setProperty("top", `${100 - m}%`), (f = i.value.style) == null || f.setProperty("left", `${o}%`));
|
|
522
|
-
}
|
|
523
|
-
function p() {
|
|
524
|
-
const o = document.getElementById(`farris-color-picker-plus-sure-${r.value}`);
|
|
525
|
-
o.className = "btn btn-secondary";
|
|
526
|
-
const m = document.getElementById(`farris-color-picker-plus-input-${r.value}`);
|
|
527
|
-
m.style.borderColor = "#dcdfe6";
|
|
528
|
-
}
|
|
529
|
-
function g({
|
|
530
|
-
x: o,
|
|
531
|
-
y: m,
|
|
532
|
-
height: b,
|
|
533
|
-
width: f
|
|
534
|
-
}) {
|
|
535
|
-
const v = o * 100 / f, M = -(m * 100 / b) + 100;
|
|
536
|
-
h(v, M);
|
|
537
|
-
const H = u.color == null ? "transparent" : u.color, S = P.from(H);
|
|
538
|
-
if (p(), S != null) {
|
|
539
|
-
const R = u.hue.getHsva(), N = S.getHsva(), B = new P().setHsva(R.hue, v, M, N.alpha);
|
|
540
|
-
t.emit("update:color", B);
|
|
541
|
-
}
|
|
542
|
-
!S && w.value && t.emit("update:color", null);
|
|
543
|
-
}
|
|
544
|
-
function l(o) {
|
|
545
|
-
if (a.value) {
|
|
546
|
-
const {
|
|
547
|
-
width: m,
|
|
548
|
-
height: b,
|
|
549
|
-
top: f,
|
|
550
|
-
left: v
|
|
551
|
-
} = a.value.getBoundingClientRect(), {
|
|
552
|
-
pageX: M,
|
|
553
|
-
pageY: H
|
|
554
|
-
} = "touches" in o ? o.touches[0] : o, S = Math.max(0, Math.min(M - (v + window.pageXOffset), m)), R = Math.max(0, Math.min(H - (f + window.pageYOffset), b));
|
|
555
|
-
g({
|
|
556
|
-
x: S,
|
|
557
|
-
y: R,
|
|
558
|
-
height: b,
|
|
559
|
-
width: m
|
|
560
|
-
});
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
return D(() => {
|
|
564
|
-
const o = u.color.getHsva();
|
|
565
|
-
h(o.saturation, o.value);
|
|
566
|
-
}), V(() => u.color, (o) => {
|
|
567
|
-
o.getHsva();
|
|
568
|
-
}), V(() => u.color, (o) => {
|
|
569
|
-
const m = o.getHsva();
|
|
570
|
-
h(m.saturation, m.value);
|
|
571
|
-
}), () => y("div", {
|
|
572
|
-
class: "f-sv-panel-component",
|
|
573
|
-
ref: a,
|
|
574
|
-
style: {
|
|
575
|
-
backgroundColor: c()
|
|
576
|
-
},
|
|
577
|
-
onMousedown: L((o) => l(o), ["prevent"]),
|
|
578
|
-
onTouchstart: L((o) => l(o), ["prevent"])
|
|
579
|
-
}, [y("div", {
|
|
580
|
-
class: "color-svpanel__white"
|
|
581
|
-
}, null), y("div", {
|
|
582
|
-
class: "color-svpanel__black"
|
|
583
|
-
}, null), y("div", {
|
|
584
|
-
class: "color-svpanel__cursor",
|
|
585
|
-
ref: i
|
|
586
|
-
}, [y("div", null, null)])]);
|
|
587
|
-
}
|
|
588
|
-
}), Vt = {
|
|
589
|
-
color: { type: Object, default: "" },
|
|
590
|
-
hue: { type: Object, default: "" },
|
|
591
|
-
allowColorNull: { type: Boolean, default: !1 },
|
|
592
|
-
onChange: { type: Function }
|
|
593
|
-
}, Nt = /* @__PURE__ */ U({
|
|
594
|
-
name: "Hue",
|
|
595
|
-
props: Vt,
|
|
596
|
-
emits: ["update:color", "update:hue"],
|
|
597
|
-
setup(u, t) {
|
|
598
|
-
const i = k(u.hue), a = k(u.allowColorNull), r = [];
|
|
599
|
-
function w(f) {
|
|
600
|
-
f.preventDefault(), h(f);
|
|
601
|
-
}
|
|
602
|
-
const c = k(null);
|
|
603
|
-
function h(f) {
|
|
604
|
-
if (c.value) {
|
|
605
|
-
const {
|
|
606
|
-
width: v,
|
|
607
|
-
height: M,
|
|
608
|
-
top: H,
|
|
609
|
-
left: S
|
|
610
|
-
} = c.value.getBoundingClientRect(), {
|
|
611
|
-
pageX: R,
|
|
612
|
-
pageY: N
|
|
613
|
-
} = "touches" in f ? f.touches[0] : f, B = Math.max(0, Math.min(R - (S + window.pageXOffset), v)), z = Math.max(0, Math.min(N - (H + window.pageYOffset), M));
|
|
614
|
-
b({
|
|
615
|
-
x: B,
|
|
616
|
-
y: z,
|
|
617
|
-
height: M,
|
|
618
|
-
width: v
|
|
619
|
-
});
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
function p() {
|
|
623
|
-
r.forEach((f) => f()), r.length = 0;
|
|
624
|
-
}
|
|
625
|
-
function g(f) {
|
|
626
|
-
w(f), document.addEventListener("mouseup", p), document.addEventListener("touchend", p), document.addEventListener("touchmove", w);
|
|
627
|
-
}
|
|
628
|
-
const l = (f) => {
|
|
629
|
-
g(f), f.stopPropagation();
|
|
630
|
-
};
|
|
631
|
-
D(() => {
|
|
632
|
-
document.querySelectorAll(".f-hue-component").forEach((M) => {
|
|
633
|
-
M.addEventListener("mousedown", l), M.addEventListener("touchstart", l);
|
|
634
|
-
});
|
|
635
|
-
const v = u.color.getHsva();
|
|
636
|
-
m(v.hue);
|
|
637
|
-
});
|
|
638
|
-
const o = k(null);
|
|
639
|
-
function m(f) {
|
|
640
|
-
var H;
|
|
641
|
-
const v = Math.max(0, Math.min(f / 360 * 100, 100));
|
|
642
|
-
o.value && ((H = o.value.style) == null || H.setProperty("top", `${v}%`));
|
|
643
|
-
}
|
|
644
|
-
function b({
|
|
645
|
-
x: f,
|
|
646
|
-
y: v,
|
|
647
|
-
height: M,
|
|
648
|
-
width: H
|
|
649
|
-
}) {
|
|
650
|
-
const S = v / M * 360;
|
|
651
|
-
m(S);
|
|
652
|
-
const R = u.color.getHsva(), N = new P().setHsva(S, R.saturation, R.value, R.alpha), B = new P().setHsva(S, 100, 100, R.alpha);
|
|
653
|
-
(u.color != null || u.color == null && a.value) && (t.emit("update:hue", B), t.emit("update:color", N));
|
|
654
|
-
}
|
|
655
|
-
return V(i, (f) => {
|
|
656
|
-
const v = f.getHsva();
|
|
657
|
-
m(v.hue);
|
|
658
|
-
}), V(() => u.color, (f) => {
|
|
659
|
-
const v = f.getHsva();
|
|
660
|
-
m(v.hue);
|
|
661
|
-
}), () => y("div", {
|
|
662
|
-
class: "f-hue-component",
|
|
663
|
-
ref: c,
|
|
664
|
-
onMousedown: L((f) => h(f), ["prevent"]),
|
|
665
|
-
onTouchstart: L((f) => h(f), ["prevent"])
|
|
666
|
-
}, [y("div", {
|
|
667
|
-
class: "color-hue-slider__bar"
|
|
668
|
-
}, null), y("div", {
|
|
669
|
-
class: "color-hue-slider__thumb",
|
|
670
|
-
ref: o
|
|
671
|
-
}, null)]);
|
|
672
|
-
}
|
|
673
|
-
}), Et = {
|
|
674
|
-
color: { type: Object, default: "" },
|
|
675
|
-
randomId: { type: String, default: "" },
|
|
676
|
-
allowColorNull: { type: Boolean, default: !1 }
|
|
677
|
-
}, Ot = /* @__PURE__ */ U({
|
|
678
|
-
name: "Alpha",
|
|
679
|
-
props: Et,
|
|
680
|
-
emits: ["update:color"],
|
|
681
|
-
setup(u, t) {
|
|
682
|
-
const i = k(null), a = k(null), r = k(u.randomId), w = k(u.allowColorNull), c = (l) => {
|
|
683
|
-
var b;
|
|
684
|
-
const o = Math.max(0, Math.min(l * 100, 100));
|
|
685
|
-
a.value && ((b = a.value.style) == null || b.setProperty("left", `${o}%`));
|
|
686
|
-
};
|
|
687
|
-
function h(l) {
|
|
688
|
-
if (i.value) {
|
|
689
|
-
const {
|
|
690
|
-
width: o,
|
|
691
|
-
height: m,
|
|
692
|
-
top: b,
|
|
693
|
-
left: f
|
|
694
|
-
} = i.value.getBoundingClientRect(), {
|
|
695
|
-
pageX: v,
|
|
696
|
-
pageY: M
|
|
697
|
-
} = "touches" in l ? l.touches[0] : l, H = Math.max(0, Math.min(v - (f + window.pageXOffset), o));
|
|
698
|
-
g({
|
|
699
|
-
x: H,
|
|
700
|
-
width: o
|
|
701
|
-
});
|
|
702
|
-
}
|
|
703
|
-
}
|
|
704
|
-
function p() {
|
|
705
|
-
const l = document.getElementById(`farris-color-picker-plus-sure-${r.value}`);
|
|
706
|
-
l.className = "btn btn-secondary";
|
|
707
|
-
const o = document.getElementById(`farris-color-picker-plus-input-${r.value}`);
|
|
708
|
-
o.style.borderColor = "#dcdfe6";
|
|
709
|
-
}
|
|
710
|
-
const g = ({
|
|
711
|
-
x: l,
|
|
712
|
-
width: o
|
|
713
|
-
}) => {
|
|
714
|
-
const m = l / o;
|
|
715
|
-
c(m), p();
|
|
716
|
-
const b = u.color.getHsva(), f = new P().setHsva(b.hue, b.saturation, b.value, m);
|
|
717
|
-
u.color != null ? t.emit("update:color", f) : u.color == null && w.value && t.emit("update:color", null);
|
|
718
|
-
};
|
|
719
|
-
return D(() => {
|
|
720
|
-
const l = u.color.getHsva();
|
|
721
|
-
c(l.alpha);
|
|
722
|
-
}), V(() => u.color, (l) => {
|
|
723
|
-
const o = l.getHsva();
|
|
724
|
-
c(o.alpha);
|
|
725
|
-
}), () => y("div", {
|
|
726
|
-
class: "f-alpha-component",
|
|
727
|
-
ref: i,
|
|
728
|
-
onMousedown: L((l) => h(l), ["prevent"]),
|
|
729
|
-
onTouchstart: L((l) => h(l), ["prevent"])
|
|
730
|
-
}, [y("div", {
|
|
731
|
-
class: "color-alpha-slider__bar"
|
|
732
|
-
}, [rt(" ")]), y("div", {
|
|
733
|
-
class: "color-alpha-slider__thumb",
|
|
734
|
-
ref: a
|
|
735
|
-
}, null)]);
|
|
736
|
-
}
|
|
737
|
-
}), At = {
|
|
738
|
-
color: { type: Object, default: "" },
|
|
739
|
-
hue: { type: Object, default: "" },
|
|
740
|
-
colorPresets: { type: Object, default: "" },
|
|
741
|
-
randomId: { type: String, default: "" }
|
|
742
|
-
}, jt = /* @__PURE__ */ U({
|
|
743
|
-
name: "Preset",
|
|
744
|
-
props: At,
|
|
745
|
-
emits: ["update:hue", "update:color"],
|
|
746
|
-
setup(u, t) {
|
|
747
|
-
const i = k(new P()), a = k(u.colorPresets), r = k(u.randomId);
|
|
748
|
-
function w() {
|
|
749
|
-
const g = document.getElementById(`farris-color-picker-plus-sure-${r.value}`);
|
|
750
|
-
g.className = "btn btn-secondary";
|
|
751
|
-
const l = document.getElementById(`farris-color-picker-plus-input-${r.value}`);
|
|
752
|
-
l.style.borderColor = "#dcdfe6";
|
|
753
|
-
}
|
|
754
|
-
function c(g) {
|
|
755
|
-
w();
|
|
756
|
-
const l = g.getRgba(), o = g.getHsva(), m = new P().setRgba(l.red, l.green, l.blue, l.alpha), b = new P().setHsva(o.hue);
|
|
757
|
-
i.value = g, t.emit("update:hue", b), t.emit("update:color", m);
|
|
758
|
-
}
|
|
759
|
-
function h(g) {
|
|
760
|
-
const l = i.value.getRgba().toString(), o = i.value.getHsva().toString(), m = g.getRgba().toString() === l && g.getHsva().toString() === o;
|
|
761
|
-
return {
|
|
762
|
-
"color-preset__color-selector": m,
|
|
763
|
-
selected: m
|
|
764
|
-
};
|
|
765
|
-
}
|
|
766
|
-
function p(g, l) {
|
|
767
|
-
return y("div", {
|
|
768
|
-
class: "color-preset__color-selector"
|
|
769
|
-
}, [y("div", {
|
|
770
|
-
key: l,
|
|
771
|
-
class: h(g),
|
|
772
|
-
style: {
|
|
773
|
-
backgroundColor: g.toRgbString()
|
|
774
|
-
},
|
|
775
|
-
onClick: () => c(g)
|
|
776
|
-
}, null)]);
|
|
777
|
-
}
|
|
778
|
-
return () => y("div", {
|
|
779
|
-
class: "f-preset-component"
|
|
780
|
-
}, [y("div", {
|
|
781
|
-
class: "color-preset__colors"
|
|
782
|
-
}, [a.value.map((g, l) => p(g, l))])]);
|
|
783
|
-
}
|
|
784
|
-
}), G = /* @__PURE__ */ U({
|
|
785
|
-
name: "FColorPickerDesign",
|
|
786
|
-
props: it,
|
|
787
|
-
emits: ["valueChanged", "activeChange", "update:color", "update:hue"],
|
|
788
|
-
setup(u, t) {
|
|
789
|
-
const i = k(new P(u.color)), a = k(u.color), r = k(u.disabled), w = k(u.color), c = k(u.allowColorNull), h = k(u.presets), p = k(!1), g = k(!1), l = k(!1), o = k("HEX"), m = Math.floor(Math.random() * 1e3).toString();
|
|
790
|
-
let b = -1, f;
|
|
791
|
-
const v = new ct("#000000"), M = k(u.color);
|
|
792
|
-
let H, S;
|
|
793
|
-
const R = k(null), N = k(null), B = k(), z = Ht("design-item-context"), _ = Mt(B, z);
|
|
794
|
-
D(() => {
|
|
795
|
-
B.value.componentInstance = _;
|
|
796
|
-
}), t.expose(_.value);
|
|
797
|
-
const tt = j(() => !f && v && v.initType ? v.initType : f), $ = j({
|
|
798
|
-
get() {
|
|
799
|
-
return f && a.value !== null ? (Q(f), A(new P(a.value), x[f])) : a.value;
|
|
800
|
-
},
|
|
801
|
-
set(d) {
|
|
802
|
-
d !== null && (E(d), st(d));
|
|
803
|
-
}
|
|
804
|
-
}), J = k($.value), lt = j(() => b > -1), et = j(() => h.value.length > 0), ot = j(() => ({
|
|
805
|
-
"background-color": w.value
|
|
806
|
-
})), ht = j(() => g.value && p.value ? "display:flex" : "display:none"), X = [{
|
|
807
|
-
text: "HEX",
|
|
808
|
-
type: x.hex
|
|
809
|
-
}, {
|
|
810
|
-
text: "RGBA",
|
|
811
|
-
type: x.rgba
|
|
812
|
-
}];
|
|
813
|
-
function dt() {
|
|
814
|
-
const d = document.getElementById("farris-color-picker-panel");
|
|
815
|
-
d.id = `farris-color-picker-panel-${m}`;
|
|
816
|
-
const I = document.getElementById("farris-color-picker-plus-sure");
|
|
817
|
-
I.id = `farris-color-picker-plus-sure-${m}`;
|
|
818
|
-
const O = document.getElementById("farris-color-picker-plus-input");
|
|
819
|
-
O.id = `farris-color-picker-plus-input-${m}`, S = document.getElementById(`farris-color-picker-plus-sure-${m}`), H = document.getElementById(`farris-color-picker-panel-${m}`), H.className = "color-picker-panel disabled";
|
|
820
|
-
}
|
|
821
|
-
function nt() {
|
|
822
|
-
if (!c.value && !a.value) {
|
|
823
|
-
document.getElementById(`farris-color-picker-plus-sure-${m}`).classList.toggle("disabled");
|
|
824
|
-
const I = document.getElementById(`farris-color-picker-plus-input-${m}`);
|
|
825
|
-
I.style.borderColor = "red";
|
|
826
|
-
}
|
|
827
|
-
}
|
|
828
|
-
function gt() {
|
|
829
|
-
a.value && (E(a.value), !a.value && c.value || (a.value = A(new P(a.value), x[tt.value])), J.value = $.value), K(Q(v.initType));
|
|
830
|
-
}
|
|
831
|
-
function pt() {
|
|
832
|
-
a.value && E(a.value), v.hasPresets() || v.setColorPresets(h.value), a.value ? w.value = A(new P(a.value), x[tt.value]) : !a.value && c.value && (w.value = null);
|
|
833
|
-
}
|
|
834
|
-
function ft() {
|
|
835
|
-
V(v.valueChanged, (d) => {
|
|
836
|
-
const I = A(d, x[f || v.initType]);
|
|
837
|
-
a.value = I;
|
|
838
|
-
});
|
|
839
|
-
}
|
|
840
|
-
function K(d) {
|
|
841
|
-
o.value = X[d].text;
|
|
842
|
-
}
|
|
843
|
-
function wt() {
|
|
844
|
-
var d;
|
|
845
|
-
g.value = !!(f != null && f.includes("a") || (d = v.initType) != null && d.includes("a"));
|
|
846
|
-
}
|
|
847
|
-
St(() => {
|
|
848
|
-
v.setColorPresets(h.value || ["#eaecf3"]);
|
|
849
|
-
}), D(() => {
|
|
850
|
-
dt(), nt(), gt(), pt();
|
|
851
|
-
}), ft(), V(o, () => {
|
|
852
|
-
$.value = A(new P(a.value), x[f || v.initType]), i.value = new P($.value), wt();
|
|
853
|
-
}), V(a, (d) => {
|
|
854
|
-
A(v.value, v.initType) !== d && d !== null && E(d), K(Q(v.initType));
|
|
855
|
-
}), V(i, (d) => {
|
|
856
|
-
a.value = A(d, x[f || v.initType]), E(a.value), $.value = a.value;
|
|
857
|
-
});
|
|
858
|
-
function st(d) {
|
|
859
|
-
const I = document.getElementById(`farris-color-picker-plus-input-${m}`);
|
|
860
|
-
(d === "" || d === void 0 || d == null) && !c.value ? (a.value = null, I.style.borderColor = "red", S.className = "btn btn-secondary disabled") : (I.style.borderColor = "#dcdfe6", S.className = "btn btn-secondary");
|
|
861
|
-
}
|
|
862
|
-
function mt() {
|
|
863
|
-
var d, I;
|
|
864
|
-
if (c.value) {
|
|
865
|
-
w.value = (a == null ? void 0 : a.value) ?? null;
|
|
866
|
-
const O = {
|
|
867
|
-
elementValue: w
|
|
868
|
-
};
|
|
869
|
-
t.emit("valueChanged", O), H.classList.toggle("disabled");
|
|
870
|
-
}
|
|
871
|
-
if (!c.value && !($.value === void 0 || $.value == null || $.value === "")) {
|
|
872
|
-
(I = (d = R.value) == null ? void 0 : d.style) == null || I.setProperty("background", a.value), l.value = !0, w.value = a.value;
|
|
873
|
-
const O = {
|
|
874
|
-
elementValue: w
|
|
875
|
-
};
|
|
876
|
-
t.emit("valueChanged", O), H.classList.toggle("disabled");
|
|
877
|
-
}
|
|
878
|
-
!M.value && !a.value && !l.value && c && H.classList.toggle("disabled"), st(a.value), $.value = a.value, S.classList.contains("disabled") || (J.value = a.value, p.value = !1);
|
|
879
|
-
}
|
|
880
|
-
function E(d) {
|
|
881
|
-
v == null || v.setValueFrom(d, m, c.value);
|
|
882
|
-
}
|
|
883
|
-
function vt(d) {
|
|
884
|
-
r.value || (p.value = !0, H.classList.toggle("disabled"), nt(), E(a.value));
|
|
885
|
-
}
|
|
886
|
-
function Q(d) {
|
|
887
|
-
const I = X.findIndex((O) => O.type === d);
|
|
888
|
-
return b = I, I;
|
|
889
|
-
}
|
|
890
|
-
function at(d) {
|
|
891
|
-
if (!S.classList.contains("disabled")) {
|
|
892
|
-
const I = X.length;
|
|
893
|
-
b = (I + b + (d === "up" ? 1 : -1)) % I, f = X[b].type, K(b), E(a.value);
|
|
894
|
-
}
|
|
895
|
-
}
|
|
896
|
-
return () => y("div", {
|
|
897
|
-
class: "f-color-picker-component",
|
|
898
|
-
ref: B
|
|
899
|
-
}, [y("div", {
|
|
900
|
-
class: ["color-picker-panel", {
|
|
901
|
-
disabled: r.value
|
|
902
|
-
}],
|
|
903
|
-
id: "farris-color-picker-panel",
|
|
904
|
-
ref: N,
|
|
905
|
-
onClick: (d) => d.stopPropagation,
|
|
906
|
-
style: "top:30px"
|
|
907
|
-
}, [y("div", {
|
|
908
|
-
class: "color-picker-main"
|
|
909
|
-
}, [y(Nt, {
|
|
910
|
-
hue: v.hue,
|
|
911
|
-
"onUpdate:hue": (d) => v.hue = d,
|
|
912
|
-
allowColorNull: c.value,
|
|
913
|
-
color: i.value,
|
|
914
|
-
"onUpdate:color": (d) => i.value = d
|
|
915
|
-
}, null), y(Bt, {
|
|
916
|
-
randomId: m,
|
|
917
|
-
hue: v.hue,
|
|
918
|
-
"onUpdate:hue": (d) => v.hue = d,
|
|
919
|
-
allowColorNull: c.value,
|
|
920
|
-
color: i.value,
|
|
921
|
-
"onUpdate:color": (d) => i.value = d
|
|
922
|
-
}, null)]), y(Ot, {
|
|
923
|
-
style: ht.value,
|
|
924
|
-
randomId: m,
|
|
925
|
-
allowColorNull: c.value,
|
|
926
|
-
color: i.value,
|
|
927
|
-
"onUpdate:color": (d) => i.value = d
|
|
928
|
-
}, null), y("div", {
|
|
929
|
-
class: "input-btn",
|
|
930
|
-
style: "display:flex;align-items: center;"
|
|
931
|
-
}, [Y(y("span", {
|
|
932
|
-
style: "width:40px;margin-right:10px;"
|
|
933
|
-
}, [o.value]), [[Z, et]]), Y(y("input", {
|
|
934
|
-
title: "color-picker-plus-input",
|
|
935
|
-
type: "text",
|
|
936
|
-
id: "farris-color-picker-plus-input",
|
|
937
|
-
"onUpdate:modelValue": (d) => $.value = d,
|
|
938
|
-
style: "float:none"
|
|
939
|
-
}, null), [[It, $.value]]), Y(y("div", {
|
|
940
|
-
class: "type-icon-btn-wrapper",
|
|
941
|
-
style: "cursor:pointer"
|
|
942
|
-
}, [y("span", {
|
|
943
|
-
class: "f-icon f-icon-arrow-60-up type-icon-btn",
|
|
944
|
-
onClick: () => at("up")
|
|
945
|
-
}, null), y("span", {
|
|
946
|
-
class: "f-icon f-icon-arrow-60-down type-icon-btn",
|
|
947
|
-
onClick: () => at("down")
|
|
948
|
-
}, null)]), [[Z, et]]), y("div", {
|
|
949
|
-
class: "input-btn"
|
|
950
|
-
}, [y("button", {
|
|
951
|
-
id: "farris-color-picker-plus-sure",
|
|
952
|
-
class: "btn btn-secondary",
|
|
953
|
-
onClick: mt
|
|
954
|
-
}, [rt("确定")])])]), Y(y(jt, {
|
|
955
|
-
color: i.value,
|
|
956
|
-
"onUpdate:color": (d) => i.value = d,
|
|
957
|
-
colorPresets: v.presets,
|
|
958
|
-
hue: v.hue,
|
|
959
|
-
"onUpdate:hue": (d) => v.hue = d,
|
|
960
|
-
randomId: m
|
|
961
|
-
}, null), [[Z, lt]])]), y("div", {
|
|
962
|
-
class: "color-picker-wrapper"
|
|
963
|
-
}, [y("input", {
|
|
964
|
-
type: "text",
|
|
965
|
-
class: "color-picker-input form-control",
|
|
966
|
-
value: J.value,
|
|
967
|
-
readonly: r.value,
|
|
968
|
-
onClick: (d) => d.stopPropagation()
|
|
969
|
-
}, null), y("div", {
|
|
970
|
-
class: "color-picker-trigger",
|
|
971
|
-
onClick: vt
|
|
972
|
-
}, [y("div", {
|
|
973
|
-
class: "color-picker-trigger-inner"
|
|
974
|
-
}, [y("div", {
|
|
975
|
-
style: ot.value
|
|
976
|
-
}, null)])])])]);
|
|
977
|
-
}
|
|
978
|
-
}), Lt = "https://json-schema.org/draft/2020-12/schema", Ft = "https://farris-design.gitee.io/color-picker.schema.json", qt = "color-picker", Dt = "A Farris Component", Ut = "object", Xt = {
|
|
979
|
-
id: {
|
|
980
|
-
description: "The unique identifier for color picker",
|
|
981
|
-
type: "string"
|
|
982
|
-
},
|
|
983
|
-
type: {
|
|
984
|
-
description: "The type string of color picker",
|
|
985
|
-
type: "string",
|
|
986
|
-
default: "color-picker"
|
|
987
|
-
},
|
|
988
|
-
appearance: {
|
|
989
|
-
description: "",
|
|
990
|
-
type: "object",
|
|
991
|
-
properties: {
|
|
992
|
-
class: {
|
|
993
|
-
type: "string"
|
|
994
|
-
},
|
|
995
|
-
style: {
|
|
996
|
-
type: "string"
|
|
997
|
-
}
|
|
998
|
-
},
|
|
999
|
-
default: {}
|
|
1000
|
-
},
|
|
1001
|
-
binding: {
|
|
1002
|
-
description: "",
|
|
1003
|
-
type: "object",
|
|
1004
|
-
default: {}
|
|
1005
|
-
},
|
|
1006
|
-
disable: {
|
|
1007
|
-
type: "string",
|
|
1008
|
-
default: !1
|
|
1009
|
-
},
|
|
1010
|
-
editable: {
|
|
1011
|
-
description: "",
|
|
1012
|
-
type: "boolean",
|
|
1013
|
-
default: !0
|
|
1014
|
-
},
|
|
1015
|
-
placeholder: {
|
|
1016
|
-
description: "",
|
|
1017
|
-
type: "string",
|
|
1018
|
-
default: ""
|
|
1019
|
-
},
|
|
1020
|
-
readonly: {
|
|
1021
|
-
description: "",
|
|
1022
|
-
type: "boolean",
|
|
1023
|
-
default: !1
|
|
1024
|
-
},
|
|
1025
|
-
require: {
|
|
1026
|
-
description: "",
|
|
1027
|
-
type: "boolean",
|
|
1028
|
-
default: !1
|
|
1029
|
-
},
|
|
1030
|
-
tabindex: {
|
|
1031
|
-
description: "",
|
|
1032
|
-
type: "number",
|
|
1033
|
-
default: -1
|
|
1034
|
-
},
|
|
1035
|
-
visible: {
|
|
1036
|
-
description: "",
|
|
1037
|
-
type: "boolean",
|
|
1038
|
-
default: !0
|
|
1039
|
-
}
|
|
1040
|
-
}, Yt = [
|
|
1041
|
-
"id",
|
|
1042
|
-
"type"
|
|
1043
|
-
], Gt = {
|
|
1044
|
-
$schema: Lt,
|
|
1045
|
-
$id: Ft,
|
|
1046
|
-
title: qt,
|
|
1047
|
-
description: Dt,
|
|
1048
|
-
type: Ut,
|
|
1049
|
-
properties: Xt,
|
|
1050
|
-
required: Yt
|
|
1051
|
-
};
|
|
1052
|
-
function Wt(u, t, i) {
|
|
1053
|
-
return t;
|
|
1054
|
-
}
|
|
1055
|
-
const zt = /* @__PURE__ */ new Map([
|
|
1056
|
-
["appearance", xt]
|
|
1057
|
-
]), Jt = "color-picker", Kt = "A Farris Component", Qt = "object", Zt = {
|
|
1058
|
-
basic: {
|
|
1059
|
-
description: "Basic Infomation",
|
|
1060
|
-
title: "基本信息",
|
|
1061
|
-
properties: {
|
|
1062
|
-
id: {
|
|
1063
|
-
description: "组件标识",
|
|
1064
|
-
title: "标识",
|
|
1065
|
-
type: "string",
|
|
1066
|
-
readonly: !0
|
|
1067
|
-
},
|
|
1068
|
-
type: {
|
|
1069
|
-
description: "组件类型",
|
|
1070
|
-
title: "控件类型",
|
|
1071
|
-
type: "select",
|
|
1072
|
-
editor: {
|
|
1073
|
-
type: "waiting for modification",
|
|
1074
|
-
enum: []
|
|
1075
|
-
}
|
|
1076
|
-
}
|
|
1077
|
-
}
|
|
1078
|
-
}
|
|
1079
|
-
}, Ct = {
|
|
1080
|
-
title: Jt,
|
|
1081
|
-
description: Kt,
|
|
1082
|
-
type: Qt,
|
|
1083
|
-
categories: Zt
|
|
1084
|
-
}, ut = Rt(it, Gt, zt, Wt, Ct);
|
|
1085
|
-
G.register = (u, t, i) => {
|
|
1086
|
-
u["color-picker"] = Pt, t["color-picker"] = ut;
|
|
1087
|
-
};
|
|
1088
|
-
G.registerDesigner = (u, t, i) => {
|
|
1089
|
-
u["color-picker"] = G, t["color-picker"] = ut;
|
|
1090
|
-
};
|
|
1091
|
-
const ae = bt(G);
|
|
1092
|
-
export {
|
|
1093
|
-
G as FColorPickerDesign,
|
|
1094
|
-
ae as default,
|
|
1095
|
-
ut as propsResolver
|
|
1096
|
-
};
|