cmat 0.0.17 → 0.0.18
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/carousel/carousel.component.d.ts +136 -0
- package/components/carousel/carousel.interface.d.ts +38 -0
- package/components/carousel/index.d.ts +5 -0
- package/components/carousel/public-api.d.ts +2 -0
- package/components/custom-formly/public-api.d.ts +1 -0
- package/components/custom-formly/types/knob/knob.component.d.ts +36 -0
- package/components/custom-formly/types/table/table.component.d.ts +3 -8
- package/components/custom-formly/wrappers/form-field/form-field.component.d.ts +4 -4
- package/components/image-viewer/image-viewer.component.d.ts +76 -0
- package/components/image-viewer/index.d.ts +5 -0
- package/components/image-viewer/public-api.d.ts +1 -0
- package/components/knob-input/index.d.ts +5 -0
- package/components/knob-input/knob-input.component.d.ts +95 -0
- package/components/knob-input/public-api.d.ts +1 -0
- package/components/material-datetimepicker/datetimepicker-input.d.ts +2 -2
- package/components/opt-input/index.d.ts +5 -0
- package/components/opt-input/models/config.d.ts +14 -0
- package/components/opt-input/otp-input.component.d.ts +70 -0
- package/components/opt-input/public-api.d.ts +1 -0
- package/components/opt-input/utils/keyboard-util.d.ts +9 -0
- package/components/opt-input/utils/object-util.d.ts +3 -0
- package/components/org-chart/designer/chart-designer.component.d.ts +17 -0
- package/components/org-chart/index.d.ts +5 -0
- package/components/org-chart/node/chart-node.component.d.ts +17 -0
- package/components/org-chart/node/node.type.d.ts +22 -0
- package/components/org-chart/org-chart.component.d.ts +12 -0
- package/components/org-chart/public-api.d.ts +2 -0
- package/components/popover/popover.interfaces.d.ts +1 -1
- package/components/select-table/index.d.ts +5 -0
- package/components/select-table/public-api.d.ts +2 -0
- package/components/select-table/select-table.component.d.ts +96 -0
- package/components/select-table/select-table.type.d.ts +20 -0
- package/components/select-tree/select-tree.component.d.ts +11 -12
- package/components/speed-dial/index.d.ts +5 -0
- package/components/speed-dial/public-api.d.ts +2 -0
- package/components/speed-dial/speed-dial.component.d.ts +63 -0
- package/components/transfer-picker/interface.d.ts +0 -1
- package/components/transfer-picker/transfer-picker-source/transfer-picker-source.component.d.ts +8 -6
- package/components/treetable/index.d.ts +5 -0
- package/components/treetable/public-api.d.ts +2 -0
- package/components/treetable/treetable.component.d.ts +32 -0
- package/components/treetable/treetable.interface.d.ts +9 -0
- package/directives/animate-on-scroll/animate-on-scroll.directive.d.ts +4 -4
- package/directives/arrow-cursor/arrow-cursor.directive.d.ts +31 -0
- package/directives/arrow-cursor/index.d.ts +5 -0
- package/directives/arrow-cursor/public-api.d.ts +1 -0
- package/directives/data-exporter/constants.d.ts +26 -0
- package/directives/data-exporter/data-exporter.directive.d.ts +18 -0
- package/directives/data-exporter/index.d.ts +5 -0
- package/directives/data-exporter/mime.d.ts +5 -0
- package/directives/data-exporter/options.d.ts +21 -0
- package/directives/data-exporter/public-api.d.ts +2 -0
- package/directives/data-exporter/services/exporters/csv-exporter.service.d.ts +12 -0
- package/directives/data-exporter/services/exporters/exporter.d.ts +4 -0
- package/directives/data-exporter/services/exporters/file-exporter.d.ts +8 -0
- package/directives/data-exporter/services/exporters/json-exporter.service.d.ts +11 -0
- package/directives/data-exporter/services/exporters/txt-exporter.service.d.ts +12 -0
- package/directives/data-exporter/services/exporters/worksheet-exporter.d.ts +10 -0
- package/directives/data-exporter/services/exporters/xls-exporter.service.d.ts +14 -0
- package/directives/data-exporter/services/exporters/xlsx-exporter.service.d.ts +9 -0
- package/directives/data-exporter/services/file-util.d.ts +8 -0
- package/directives/data-exporter/services/service-locator.service.d.ts +11 -0
- package/directives/debounce/abstract-debounce.directive.d.ts +1 -1
- package/fesm2022/cmat-animations.mjs.map +1 -1
- package/fesm2022/cmat-components-adapter.mjs +9 -9
- package/fesm2022/cmat-components-adapter.mjs.map +1 -1
- package/fesm2022/cmat-components-breadcrumb.mjs +10 -10
- package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/cmat-components-card.mjs +4 -4
- package/fesm2022/cmat-components-card.mjs.map +1 -1
- package/fesm2022/cmat-components-carousel.mjs +711 -0
- package/fesm2022/cmat-components-carousel.mjs.map +1 -0
- package/fesm2022/cmat-components-cascade.mjs +12 -12
- package/fesm2022/cmat-components-cascade.mjs.map +1 -1
- package/fesm2022/cmat-components-chip-input.mjs +5 -5
- package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
- package/fesm2022/cmat-components-custom-formly.mjs +168 -155
- package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
- package/fesm2022/cmat-components-date-range.mjs +5 -5
- package/fesm2022/cmat-components-date-range.mjs.map +1 -1
- package/fesm2022/cmat-components-drawer.mjs +6 -6
- package/fesm2022/cmat-components-drawer.mjs.map +1 -1
- package/fesm2022/cmat-components-fullscreen.mjs +4 -4
- package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
- package/fesm2022/cmat-components-highlight.mjs +7 -7
- package/fesm2022/cmat-components-highlight.mjs.map +1 -1
- package/fesm2022/cmat-components-image-viewer.mjs +227 -0
- package/fesm2022/cmat-components-image-viewer.mjs.map +1 -0
- package/fesm2022/cmat-components-json-editor.mjs +4 -4
- package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-knob-input.mjs +404 -0
- package/fesm2022/cmat-components-knob-input.mjs.map +1 -0
- package/fesm2022/cmat-components-masonry.mjs +4 -4
- package/fesm2022/cmat-components-masonry.mjs.map +1 -1
- package/fesm2022/cmat-components-material-color-picker.mjs +4 -4
- package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-material-datetimepicker.mjs +53 -53
- package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
- package/fesm2022/cmat-components-navigation.mjs +51 -51
- package/fesm2022/cmat-components-navigation.mjs.map +1 -1
- package/fesm2022/cmat-components-opt-input.mjs +457 -0
- package/fesm2022/cmat-components-opt-input.mjs.map +1 -0
- package/fesm2022/cmat-components-org-chart.mjs +141 -0
- package/fesm2022/cmat-components-org-chart.mjs.map +1 -0
- package/fesm2022/cmat-components-pagination.mjs +13 -13
- package/fesm2022/cmat-components-pagination.mjs.map +1 -1
- package/fesm2022/cmat-components-password-strength.mjs +12 -12
- package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
- package/fesm2022/cmat-components-popover.mjs +10 -10
- package/fesm2022/cmat-components-popover.mjs.map +1 -1
- package/fesm2022/cmat-components-progress-bar.mjs +4 -4
- package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
- package/fesm2022/cmat-components-rating.mjs +4 -4
- package/fesm2022/cmat-components-rating.mjs.map +1 -1
- package/fesm2022/cmat-components-select-search.mjs +11 -11
- package/fesm2022/cmat-components-select-search.mjs.map +1 -1
- package/fesm2022/cmat-components-select-table.mjs +658 -0
- package/fesm2022/cmat-components-select-table.mjs.map +1 -0
- package/fesm2022/cmat-components-select-tree.mjs +75 -57
- package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
- package/fesm2022/cmat-components-speed-dial.mjs +312 -0
- package/fesm2022/cmat-components-speed-dial.mjs.map +1 -0
- package/fesm2022/cmat-components-timeline.mjs +14 -14
- package/fesm2022/cmat-components-timeline.mjs.map +1 -1
- package/fesm2022/cmat-components-toast.mjs +11 -11
- package/fesm2022/cmat-components-toast.mjs.map +1 -1
- package/fesm2022/cmat-components-transfer-picker.mjs +60 -41
- package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-treetable.mjs +122 -0
- package/fesm2022/cmat-components-treetable.mjs.map +1 -0
- package/fesm2022/cmat-components-upload.mjs +11 -11
- package/fesm2022/cmat-components-upload.mjs.map +1 -1
- package/fesm2022/cmat-directives-animate-on-scroll.mjs +21 -21
- package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
- package/fesm2022/cmat-directives-arrow-cursor.mjs +184 -0
- package/fesm2022/cmat-directives-arrow-cursor.mjs.map +1 -0
- package/fesm2022/cmat-directives-autofocus.mjs +3 -3
- package/fesm2022/cmat-directives-autofocus.mjs.map +1 -1
- package/fesm2022/cmat-directives-data-exporter.mjs +324 -0
- package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -0
- package/fesm2022/cmat-directives-debounce.mjs +9 -9
- package/fesm2022/cmat-directives-debounce.mjs.map +1 -1
- package/fesm2022/cmat-directives-digit-only.mjs +8 -6
- package/fesm2022/cmat-directives-digit-only.mjs.map +1 -1
- package/fesm2022/cmat-directives-equal-validator.mjs +3 -3
- package/fesm2022/cmat-directives-equal-validator.mjs.map +1 -1
- package/fesm2022/cmat-lib-mock-api.mjs +6 -6
- package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
- package/fesm2022/cmat-pipes-bytes.mjs +3 -3
- package/fesm2022/cmat-pipes-bytes.mjs.map +1 -1
- package/fesm2022/cmat-pipes-date-format.mjs +3 -3
- package/fesm2022/cmat-pipes-date-format.mjs.map +1 -1
- package/fesm2022/cmat-pipes-find-by-key.mjs +3 -3
- package/fesm2022/cmat-pipes-find-by-key.mjs.map +1 -1
- package/fesm2022/cmat-pipes-group-by.mjs +3 -3
- package/fesm2022/cmat-pipes-group-by.mjs.map +1 -1
- package/fesm2022/cmat-pipes-keys.mjs +3 -3
- package/fesm2022/cmat-pipes-keys.mjs.map +1 -1
- package/fesm2022/cmat-pipes-secure.mjs +3 -3
- package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
- package/fesm2022/cmat-pipes-uppercase.mjs +3 -3
- package/fesm2022/cmat-pipes-uppercase.mjs.map +1 -1
- package/fesm2022/cmat-services-alert.mjs +3 -3
- package/fesm2022/cmat-services-alert.mjs.map +1 -1
- package/fesm2022/cmat-services-config.mjs +6 -6
- package/fesm2022/cmat-services-config.mjs.map +1 -1
- package/fesm2022/cmat-services-confirmation.mjs +7 -7
- package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
- package/fesm2022/cmat-services-data.mjs +3 -3
- package/fesm2022/cmat-services-data.mjs.map +1 -1
- package/fesm2022/cmat-services-export-as.mjs +211 -0
- package/fesm2022/cmat-services-export-as.mjs.map +1 -0
- package/fesm2022/cmat-services-loading.mjs +6 -6
- package/fesm2022/cmat-services-loading.mjs.map +1 -1
- package/fesm2022/cmat-services-local-storage.mjs +3 -3
- package/fesm2022/cmat-services-local-storage.mjs.map +1 -1
- package/fesm2022/cmat-services-media-watcher.mjs +3 -3
- package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
- package/fesm2022/cmat-services-platform.mjs +3 -3
- package/fesm2022/cmat-services-platform.mjs.map +1 -1
- package/fesm2022/cmat-services-splash-screen.mjs +3 -3
- package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
- package/fesm2022/cmat-services-title.mjs +3 -3
- package/fesm2022/cmat-services-title.mjs.map +1 -1
- package/fesm2022/cmat-services-translation.mjs +3 -3
- package/fesm2022/cmat-services-translation.mjs.map +1 -1
- package/fesm2022/cmat-services-utils.mjs +3 -3
- package/fesm2022/cmat-services-utils.mjs.map +1 -1
- package/fesm2022/cmat-validators.mjs.map +1 -1
- package/fesm2022/cmat-version.mjs.map +1 -1
- package/icons/arrow-cursor.svg +1 -1
- package/package.json +82 -148
- package/services/export-as/export-as-config.model.d.ts +8 -0
- package/services/export-as/export-as.service.d.ts +43 -0
- package/services/export-as/index.d.ts +5 -0
- package/services/export-as/public-api.d.ts +2 -0
- package/styles/overrides/angular-material.scss +95 -13
- package/esm2022/animations/cmat-animations.mjs +0 -5
- package/esm2022/animations/defaults.mjs +0 -12
- package/esm2022/animations/dropdown.mjs +0 -26
- package/esm2022/animations/expand-collapse.mjs +0 -17
- package/esm2022/animations/fade.mjs +0 -170
- package/esm2022/animations/public-api.mjs +0 -19
- package/esm2022/animations/shake.mjs +0 -59
- package/esm2022/animations/slide.mjs +0 -124
- package/esm2022/animations/transform.mjs +0 -16
- package/esm2022/animations/zoom.mjs +0 -38
- package/esm2022/cmat.mjs +0 -5
- package/esm2022/components/adapter/cmat-components-adapter.mjs +0 -5
- package/esm2022/components/adapter/datetime-adapter.mjs +0 -127
- package/esm2022/components/adapter/datetime-formats.mjs +0 -3
- package/esm2022/components/adapter/dayjs-date-adapter.mjs +0 -198
- package/esm2022/components/adapter/dayjs-date-formats.mjs +0 -12
- package/esm2022/components/adapter/dayjs-datetime-adapter.mjs +0 -100
- package/esm2022/components/adapter/dayjs-datetime-formats.mjs +0 -21
- package/esm2022/components/adapter/native-datetime-adapter.mjs +0 -130
- package/esm2022/components/adapter/native-datetime-formats.mjs +0 -15
- package/esm2022/components/adapter/public-api.mjs +0 -9
- package/esm2022/components/breadcrumb/breadcrumb-item.directive.mjs +0 -19
- package/esm2022/components/breadcrumb/breadcrumb.component.mjs +0 -94
- package/esm2022/components/breadcrumb/breadcrumb.service.mjs +0 -333
- package/esm2022/components/breadcrumb/cmat-components-breadcrumb.mjs +0 -5
- package/esm2022/components/breadcrumb/public-api.mjs +0 -6
- package/esm2022/components/breadcrumb/types/breadcrumb.config.mjs +0 -2
- package/esm2022/components/breadcrumb/types/breadcrumb.mjs +0 -2
- package/esm2022/components/card/card.component.mjs +0 -49
- package/esm2022/components/card/card.types.mjs +0 -2
- package/esm2022/components/card/cmat-components-card.mjs +0 -5
- package/esm2022/components/card/public-api.mjs +0 -3
- package/esm2022/components/cascade/cascade-bottom-sheet/cascade-bottom-sheet.component.mjs +0 -49
- package/esm2022/components/cascade/cascade-list/cascade-list.component.mjs +0 -384
- package/esm2022/components/cascade/cascade-menu/cascade-menu.component.mjs +0 -22
- package/esm2022/components/cascade/cmat-components-cascade.mjs +0 -5
- package/esm2022/components/cascade/options.interface.mjs +0 -2
- package/esm2022/components/cascade/public-api.mjs +0 -4
- package/esm2022/components/chip-input/chip-input.component.mjs +0 -251
- package/esm2022/components/chip-input/cmat-components-chip-input.mjs +0 -5
- package/esm2022/components/chip-input/public-api.mjs +0 -2
- package/esm2022/components/custom-formly/cmat-components-custom-formly.mjs +0 -5
- package/esm2022/components/custom-formly/extension/addons.extension.mjs +0 -13
- package/esm2022/components/custom-formly/public-api.mjs +0 -29
- package/esm2022/components/custom-formly/types/button/button.component.mjs +0 -81
- package/esm2022/components/custom-formly/types/cascade/cascade.component.mjs +0 -71
- package/esm2022/components/custom-formly/types/checklist/checklist.component.mjs +0 -161
- package/esm2022/components/custom-formly/types/chips/chips.component.mjs +0 -55
- package/esm2022/components/custom-formly/types/color-picker/color-picker.component.mjs +0 -15
- package/esm2022/components/custom-formly/types/date-range/date-range.component.mjs +0 -25
- package/esm2022/components/custom-formly/types/datepicker/datepicker.component.mjs +0 -51
- package/esm2022/components/custom-formly/types/multicheckbox/multicheckbox.component.mjs +0 -88
- package/esm2022/components/custom-formly/types/number/number.component.mjs +0 -27
- package/esm2022/components/custom-formly/types/quill/quill.component.mjs +0 -171
- package/esm2022/components/custom-formly/types/radio/radio.component.mjs +0 -87
- package/esm2022/components/custom-formly/types/rating/rating.component.mjs +0 -27
- package/esm2022/components/custom-formly/types/repeat/repeat.component.mjs +0 -25
- package/esm2022/components/custom-formly/types/select/select.component.mjs +0 -167
- package/esm2022/components/custom-formly/types/select-tree/select-tree.component.mjs +0 -66
- package/esm2022/components/custom-formly/types/stepper/horizontal/stepper.component.mjs +0 -28
- package/esm2022/components/custom-formly/types/stepper/stepper.type.mjs +0 -2
- package/esm2022/components/custom-formly/types/stepper/vertical/stepper.component.mjs +0 -28
- package/esm2022/components/custom-formly/types/table/table.component.mjs +0 -127
- package/esm2022/components/custom-formly/types/tabs/tab.component.mjs +0 -16
- package/esm2022/components/custom-formly/types/tags/tags.component.mjs +0 -146
- package/esm2022/components/custom-formly/types/textarea/textarea.component.mjs +0 -25
- package/esm2022/components/custom-formly/types/upload/upload.component.mjs +0 -58
- package/esm2022/components/custom-formly/wrappers/addons/addons.component.mjs +0 -92
- package/esm2022/components/custom-formly/wrappers/card/card.component.mjs +0 -14
- package/esm2022/components/custom-formly/wrappers/expansion/expansion.component.mjs +0 -14
- package/esm2022/components/custom-formly/wrappers/form-field/form-field.component.mjs +0 -47
- package/esm2022/components/custom-formly/wrappers/panel/panel.component.mjs +0 -12
- package/esm2022/components/date-range/cmat-components-date-range.mjs +0 -5
- package/esm2022/components/date-range/date-range.component.mjs +0 -558
- package/esm2022/components/date-range/public-api.mjs +0 -2
- package/esm2022/components/drawer/cmat-components-drawer.mjs +0 -5
- package/esm2022/components/drawer/drawer.component.mjs +0 -301
- package/esm2022/components/drawer/drawer.service.mjs +0 -41
- package/esm2022/components/drawer/drawer.types.mjs +0 -2
- package/esm2022/components/drawer/public-api.mjs +0 -4
- package/esm2022/components/fullscreen/cmat-components-fullscreen.mjs +0 -5
- package/esm2022/components/fullscreen/fullscreen.component.mjs +0 -44
- package/esm2022/components/fullscreen/public-api.mjs +0 -2
- package/esm2022/components/highlight/cmat-components-highlight.mjs +0 -5
- package/esm2022/components/highlight/highlight.component.mjs +0 -80
- package/esm2022/components/highlight/highlight.service.mjs +0 -47
- package/esm2022/components/highlight/public-api.mjs +0 -3
- package/esm2022/components/json-editor/cmat-components-json-editor.mjs +0 -5
- package/esm2022/components/json-editor/json-editor.component.mjs +0 -176
- package/esm2022/components/json-editor/public-api.mjs +0 -2
- package/esm2022/components/masonry/cmat-components-masonry.mjs +0 -5
- package/esm2022/components/masonry/masonry.component.mjs +0 -54
- package/esm2022/components/masonry/public-api.mjs +0 -2
- package/esm2022/components/material-color-picker/base-color.mjs +0 -13
- package/esm2022/components/material-color-picker/cmat-components-material-color-picker.mjs +0 -5
- package/esm2022/components/material-color-picker/material-color-picker.component.mjs +0 -147
- package/esm2022/components/material-color-picker/public-api.mjs +0 -3
- package/esm2022/components/material-color-picker/selected-color.mjs +0 -3
- package/esm2022/components/material-datetimepicker/calendar-body.mjs +0 -76
- package/esm2022/components/material-datetimepicker/calendar.mjs +0 -670
- package/esm2022/components/material-datetimepicker/clock.mjs +0 -290
- package/esm2022/components/material-datetimepicker/cmat-components-material-datetimepicker.mjs +0 -5
- package/esm2022/components/material-datetimepicker/datetimepicker-animations.mjs +0 -34
- package/esm2022/components/material-datetimepicker/datetimepicker-errors.mjs +0 -6
- package/esm2022/components/material-datetimepicker/datetimepicker-filtertype.mjs +0 -8
- package/esm2022/components/material-datetimepicker/datetimepicker-input.mjs +0 -341
- package/esm2022/components/material-datetimepicker/datetimepicker-intl.mjs +0 -63
- package/esm2022/components/material-datetimepicker/datetimepicker-toggle.mjs +0 -87
- package/esm2022/components/material-datetimepicker/datetimepicker-types.mjs +0 -2
- package/esm2022/components/material-datetimepicker/datetimepicker.mjs +0 -531
- package/esm2022/components/material-datetimepicker/month-view.mjs +0 -141
- package/esm2022/components/material-datetimepicker/multi-year-view.mjs +0 -197
- package/esm2022/components/material-datetimepicker/public-api.mjs +0 -11
- package/esm2022/components/material-datetimepicker/time.mjs +0 -455
- package/esm2022/components/material-datetimepicker/year-view.mjs +0 -124
- package/esm2022/components/navigation/cmat-components-navigation.mjs +0 -5
- package/esm2022/components/navigation/horizontal/components/basic/basic.component.mjs +0 -70
- package/esm2022/components/navigation/horizontal/components/branch/branch.component.mjs +0 -82
- package/esm2022/components/navigation/horizontal/components/divider/divider.component.mjs +0 -47
- package/esm2022/components/navigation/horizontal/components/spacer/spacer.component.mjs +0 -47
- package/esm2022/components/navigation/horizontal/horizontal.component.mjs +0 -87
- package/esm2022/components/navigation/navigation.service.mjs +0 -140
- package/esm2022/components/navigation/navigation.types.mjs +0 -3
- package/esm2022/components/navigation/public-api.mjs +0 -5
- package/esm2022/components/navigation/vertical/components/aside/aside.component.mjs +0 -162
- package/esm2022/components/navigation/vertical/components/basic/basic.component.mjs +0 -60
- package/esm2022/components/navigation/vertical/components/collapsable/collapsable.component.mjs +0 -277
- package/esm2022/components/navigation/vertical/components/divider/divider.component.mjs +0 -56
- package/esm2022/components/navigation/vertical/components/group/group.component.mjs +0 -78
- package/esm2022/components/navigation/vertical/components/spacer/spacer.component.mjs +0 -56
- package/esm2022/components/navigation/vertical/vertical.component.mjs +0 -584
- package/esm2022/components/pagination/cmat-components-pagination.mjs +0 -5
- package/esm2022/components/pagination/pagination.component.mjs +0 -67
- package/esm2022/components/pagination/pagination.directive.mjs +0 -197
- package/esm2022/components/pagination/pagination.instance.mjs +0 -2
- package/esm2022/components/pagination/pagination.pipe.mjs +0 -100
- package/esm2022/components/pagination/pagination.service.mjs +0 -90
- package/esm2022/components/pagination/public-api.mjs +0 -6
- package/esm2022/components/password-strength/animations/index.mjs +0 -48
- package/esm2022/components/password-strength/cmat-components-password-strength.mjs +0 -5
- package/esm2022/components/password-strength/enum.mjs +0 -17
- package/esm2022/components/password-strength/mat-pass-toggle-visibility/mat-pass-toggle-visibility.component.mjs +0 -27
- package/esm2022/components/password-strength/mat-password-strength/mat-password-strength.component.mjs +0 -206
- package/esm2022/components/password-strength/mat-password-strength-info/mat-password-strength-info.component.mjs +0 -150
- package/esm2022/components/password-strength/mat-password-strength-validator.mjs +0 -36
- package/esm2022/components/password-strength/public-api.mjs +0 -4
- package/esm2022/components/password-strength/regexp.class.mjs +0 -8
- package/esm2022/components/popover/cmat-components-popover.mjs +0 -5
- package/esm2022/components/popover/popover-trigger.mjs +0 -442
- package/esm2022/components/popover/popover.component.mjs +0 -348
- package/esm2022/components/popover/popover.errors.mjs +0 -27
- package/esm2022/components/popover/popover.interfaces.mjs +0 -2
- package/esm2022/components/popover/popover.target.mjs +0 -18
- package/esm2022/components/popover/popover.type.mjs +0 -2
- package/esm2022/components/popover/public-api.mjs +0 -5
- package/esm2022/components/progress-bar/cmat-components-progress-bar.mjs +0 -5
- package/esm2022/components/progress-bar/progress-bar.component.mjs +0 -58
- package/esm2022/components/progress-bar/public-api.mjs +0 -2
- package/esm2022/components/rating/cmat-components-rating.mjs +0 -5
- package/esm2022/components/rating/public-api.mjs +0 -2
- package/esm2022/components/rating/rating.component.mjs +0 -202
- package/esm2022/components/select-search/cmat-components-select-search.mjs +0 -5
- package/esm2022/components/select-search/default-options.mjs +0 -16
- package/esm2022/components/select-search/public-api.mjs +0 -3
- package/esm2022/components/select-search/select-no-entries-found.directive.mjs +0 -14
- package/esm2022/components/select-search/select-search-clear.directive.mjs +0 -14
- package/esm2022/components/select-search/select-search.component.mjs +0 -485
- package/esm2022/components/select-tree/cmat-components-select-tree.mjs +0 -5
- package/esm2022/components/select-tree/public-api.mjs +0 -4
- package/esm2022/components/select-tree/select-tree.component.mjs +0 -565
- package/esm2022/components/select-tree/select-tree.flatnode.mjs +0 -3
- package/esm2022/components/select-tree/select-tree.node.mjs +0 -3
- package/esm2022/components/timeline/cmat-components-timeline.mjs +0 -5
- package/esm2022/components/timeline/public-api.mjs +0 -3
- package/esm2022/components/timeline/timeline-item/timeline-item.component.mjs +0 -70
- package/esm2022/components/timeline/timeline.component.mjs +0 -107
- package/esm2022/components/toast/cmat-components-toast.mjs +0 -5
- package/esm2022/components/toast/models/global-config.model.mjs +0 -2
- package/esm2022/components/toast/models/toast.model.mjs +0 -2
- package/esm2022/components/toast/models/type.model.mjs +0 -2
- package/esm2022/components/toast/public-api.mjs +0 -7
- package/esm2022/components/toast/toast-modal.component.mjs +0 -53
- package/esm2022/components/toast/toast.component.mjs +0 -30
- package/esm2022/components/toast/toast.service.mjs +0 -122
- package/esm2022/components/transfer-picker/cmat-components-transfer-picker.mjs +0 -5
- package/esm2022/components/transfer-picker/filter/filter.component.mjs +0 -91
- package/esm2022/components/transfer-picker/interface.mjs +0 -17
- package/esm2022/components/transfer-picker/public-api.mjs +0 -8
- package/esm2022/components/transfer-picker/search/search.component.mjs +0 -38
- package/esm2022/components/transfer-picker/transfer-picker-source/transfer-picker-source.component.mjs +0 -201
- package/esm2022/components/transfer-picker/transfer-picker-target/transfer-picker-target.component.mjs +0 -32
- package/esm2022/components/transfer-picker/transfer-picker.component.mjs +0 -84
- package/esm2022/components/transfer-picker/transfer-picker.service.mjs +0 -137
- package/esm2022/components/upload/cmat-components-upload.mjs +0 -5
- package/esm2022/components/upload/files.type.mjs +0 -2
- package/esm2022/components/upload/files.util.service.mjs +0 -89
- package/esm2022/components/upload/public-api.mjs +0 -5
- package/esm2022/components/upload/upload-queue/upload-queue.component.mjs +0 -155
- package/esm2022/components/upload/upload.component.mjs +0 -118
- package/esm2022/directives/animate-on-scroll/animate-on-scroll.directive.mjs +0 -126
- package/esm2022/directives/animate-on-scroll/cmat-directives-animate-on-scroll.mjs +0 -5
- package/esm2022/directives/animate-on-scroll/public-api.mjs +0 -2
- package/esm2022/directives/animate-on-scroll/scroll.service.mjs +0 -38
- package/esm2022/directives/autofocus/autofocus.directive.mjs +0 -20
- package/esm2022/directives/autofocus/cmat-directives-autofocus.mjs +0 -5
- package/esm2022/directives/autofocus/public-api.mjs +0 -2
- package/esm2022/directives/debounce/abstract-debounce.directive.mjs +0 -34
- package/esm2022/directives/debounce/cmat-directives-debounce.mjs +0 -5
- package/esm2022/directives/debounce/debounce-click.directive.mjs +0 -25
- package/esm2022/directives/debounce/debounce-keyup.directive.mjs +0 -25
- package/esm2022/directives/debounce/public-api.mjs +0 -3
- package/esm2022/directives/digit-only/cmat-directives-digit-only.mjs +0 -5
- package/esm2022/directives/digit-only/digit-only.directive.mjs +0 -298
- package/esm2022/directives/digit-only/mask.directive.mjs +0 -84
- package/esm2022/directives/digit-only/public-api.mjs +0 -3
- package/esm2022/directives/equal-validator/cmat-directives-equal-validator.mjs +0 -5
- package/esm2022/directives/equal-validator/equal-validator.directive.mjs +0 -54
- package/esm2022/directives/equal-validator/public-api.mjs +0 -2
- package/esm2022/lib/mock-api/cmat-lib-mock-api.mjs +0 -5
- package/esm2022/lib/mock-api/mock-api.constants.mjs +0 -3
- package/esm2022/lib/mock-api/mock-api.interceptor.mjs +0 -73
- package/esm2022/lib/mock-api/mock-api.request-handler.mjs +0 -48
- package/esm2022/lib/mock-api/mock-api.service.mjs +0 -93
- package/esm2022/lib/mock-api/mock-api.types.mjs +0 -2
- package/esm2022/lib/mock-api/mock-api.utils.mjs +0 -16
- package/esm2022/lib/mock-api/public-api.mjs +0 -6
- package/esm2022/pipes/bytes/bytes.pipe.mjs +0 -25
- package/esm2022/pipes/bytes/cmat-pipes-bytes.mjs +0 -5
- package/esm2022/pipes/bytes/public-api.mjs +0 -2
- package/esm2022/pipes/date-format/cmat-pipes-date-format.mjs +0 -5
- package/esm2022/pipes/date-format/date-format.pipe.mjs +0 -20
- package/esm2022/pipes/date-format/public-api.mjs +0 -2
- package/esm2022/pipes/find-by-key/cmat-pipes-find-by-key.mjs +0 -5
- package/esm2022/pipes/find-by-key/find-by-key.pipe.mjs +0 -23
- package/esm2022/pipes/find-by-key/public-api.mjs +0 -2
- package/esm2022/pipes/group-by/cmat-pipes-group-by.mjs +0 -5
- package/esm2022/pipes/group-by/group-by.pipe.mjs +0 -29
- package/esm2022/pipes/group-by/public-api.mjs +0 -2
- package/esm2022/pipes/keys/cmat-pipes-keys.mjs +0 -5
- package/esm2022/pipes/keys/keys.pipe.mjs +0 -26
- package/esm2022/pipes/keys/public-api.mjs +0 -2
- package/esm2022/pipes/secure/cmat-pipes-secure.mjs +0 -5
- package/esm2022/pipes/secure/public-api.mjs +0 -2
- package/esm2022/pipes/secure/secure-pipe.mjs +0 -46
- package/esm2022/pipes/uppercase/cmat-pipes-uppercase.mjs +0 -5
- package/esm2022/pipes/uppercase/public-api.mjs +0 -2
- package/esm2022/pipes/uppercase/uppercase.pipe.mjs +0 -17
- package/esm2022/public-api.mjs +0 -2
- package/esm2022/services/alert/alert.dialog.mjs +0 -12
- package/esm2022/services/alert/alert.message.mjs +0 -9
- package/esm2022/services/alert/alert.service.mjs +0 -166
- package/esm2022/services/alert/cmat-services-alert.mjs +0 -5
- package/esm2022/services/alert/enum.mjs +0 -15
- package/esm2022/services/alert/public-api.mjs +0 -5
- package/esm2022/services/config/cmat-services-config.mjs +0 -5
- package/esm2022/services/config/config.constants.mjs +0 -3
- package/esm2022/services/config/config.service.mjs +0 -35
- package/esm2022/services/config/public-api.mjs +0 -4
- package/esm2022/services/config/urlStateConfig.service.mjs +0 -30
- package/esm2022/services/confirmation/cmat-services-confirmation.mjs +0 -5
- package/esm2022/services/confirmation/confirmation.service.mjs +0 -51
- package/esm2022/services/confirmation/confirmation.types.mjs +0 -2
- package/esm2022/services/confirmation/dialog/dialog.component.mjs +0 -25
- package/esm2022/services/confirmation/public-api.mjs +0 -3
- package/esm2022/services/data/cmat-services-data.mjs +0 -5
- package/esm2022/services/data/data.service.mjs +0 -169
- package/esm2022/services/data/public-api.mjs +0 -2
- package/esm2022/services/loading/cmat-services-loading.mjs +0 -5
- package/esm2022/services/loading/loading.interceptor.mjs +0 -29
- package/esm2022/services/loading/loading.service.mjs +0 -72
- package/esm2022/services/loading/public-api.mjs +0 -3
- package/esm2022/services/local-storage/cmat-services-local-storage.mjs +0 -5
- package/esm2022/services/local-storage/local-storage.service.mjs +0 -22
- package/esm2022/services/local-storage/public-api.mjs +0 -2
- package/esm2022/services/media-watcher/cmat-services-media-watcher.mjs +0 -5
- package/esm2022/services/media-watcher/media-watcher.service.mjs +0 -55
- package/esm2022/services/media-watcher/public-api.mjs +0 -2
- package/esm2022/services/platform/cmat-services-platform.mjs +0 -5
- package/esm2022/services/platform/platform.service.mjs +0 -46
- package/esm2022/services/platform/public-api.mjs +0 -2
- package/esm2022/services/splash-screen/cmat-services-splash-screen.mjs +0 -5
- package/esm2022/services/splash-screen/public-api.mjs +0 -2
- package/esm2022/services/splash-screen/splash-screen.service.mjs +0 -42
- package/esm2022/services/title/cmat-services-title.mjs +0 -5
- package/esm2022/services/title/public-api.mjs +0 -2
- package/esm2022/services/title/title.service.mjs +0 -46
- package/esm2022/services/translation/cmat-services-translation.mjs +0 -5
- package/esm2022/services/translation/public-api.mjs +0 -2
- package/esm2022/services/translation/translation.service.mjs +0 -62
- package/esm2022/services/utils/cmat-services-utils.mjs +0 -5
- package/esm2022/services/utils/public-api.mjs +0 -2
- package/esm2022/services/utils/utils.service.mjs +0 -467
- package/esm2022/validators/cmat-validators.mjs +0 -5
- package/esm2022/validators/public-api.mjs +0 -2
- package/esm2022/validators/validators.mjs +0 -33
- package/esm2022/version/cmat-version.mjs +0 -5
- package/esm2022/version/public-api.mjs +0 -2
- package/esm2022/version/version.mjs +0 -11
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
2
|
+
import { DOCUMENT, NgStyle } from '@angular/common';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Optional, Self, Inject, ViewChild, HostBinding, Input, Output, HostListener } from '@angular/core';
|
|
5
|
+
import { MatFormFieldControl } from '@angular/material/form-field';
|
|
6
|
+
import { isNil } from 'lodash-es';
|
|
7
|
+
import { Subject } from 'rxjs';
|
|
8
|
+
import * as i1 from '@angular/forms';
|
|
9
|
+
|
|
10
|
+
/* eslint-disable @typescript-eslint/member-ordering */
|
|
11
|
+
let NEXT_ID = 0;
|
|
12
|
+
class CmatKnobInputComponent {
|
|
13
|
+
constructor(ngControl, _document, _renderer, _changeDetectorRef, _el) {
|
|
14
|
+
this.ngControl = ngControl;
|
|
15
|
+
this._document = _document;
|
|
16
|
+
this._renderer = _renderer;
|
|
17
|
+
this._changeDetectorRef = _changeDetectorRef;
|
|
18
|
+
this._el = _el;
|
|
19
|
+
this.id = `cmat-knob-input-${NEXT_ID++}`;
|
|
20
|
+
this.valueColor = 'var(--cmat-primary)';
|
|
21
|
+
this.rangeColor = 'var(--cmat-border)';
|
|
22
|
+
this.textColor = 'var(--cmat-text-default)';
|
|
23
|
+
this.valueTemplate = '{value}';
|
|
24
|
+
this.size = 100;
|
|
25
|
+
this.step = 1;
|
|
26
|
+
this.min = 0;
|
|
27
|
+
this.max = 100;
|
|
28
|
+
this.strokeWidth = 14;
|
|
29
|
+
this.showValue = true;
|
|
30
|
+
this.valueChange = new EventEmitter();
|
|
31
|
+
this.radius = 40;
|
|
32
|
+
this.midX = 50;
|
|
33
|
+
this.midY = 50;
|
|
34
|
+
this.minRadians = (4 * Math.PI) / 3;
|
|
35
|
+
this.maxRadians = -Math.PI / 3;
|
|
36
|
+
this.stateChanges = new Subject();
|
|
37
|
+
this.focused = false;
|
|
38
|
+
this.touched = false;
|
|
39
|
+
this._placeholder = '';
|
|
40
|
+
this._required = false;
|
|
41
|
+
this._disabled = false;
|
|
42
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
43
|
+
this._onModelChange = () => { };
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
45
|
+
this._onTouchedChange = () => { };
|
|
46
|
+
if (this.ngControl != null) {
|
|
47
|
+
this.ngControl.valueAccessor = this;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
ngOnDestroy() {
|
|
51
|
+
this.stateChanges.complete();
|
|
52
|
+
}
|
|
53
|
+
get placeholder() {
|
|
54
|
+
return this._placeholder;
|
|
55
|
+
}
|
|
56
|
+
set placeholder(value) {
|
|
57
|
+
this._placeholder = value;
|
|
58
|
+
this.stateChanges.next();
|
|
59
|
+
}
|
|
60
|
+
get value() {
|
|
61
|
+
return this._value ?? this.min;
|
|
62
|
+
}
|
|
63
|
+
set value(value) {
|
|
64
|
+
if (value !== this.value) {
|
|
65
|
+
this._value = value;
|
|
66
|
+
this.stateChanges.next();
|
|
67
|
+
this._onModelChange(value);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
get empty() {
|
|
71
|
+
return !this._value;
|
|
72
|
+
}
|
|
73
|
+
get errorState() {
|
|
74
|
+
if (this.ngControl == null)
|
|
75
|
+
return false;
|
|
76
|
+
return (this.touched && this.ngControl?.invalid) ?? false;
|
|
77
|
+
}
|
|
78
|
+
get shouldLabelFloat() {
|
|
79
|
+
return this.focused || !this.empty;
|
|
80
|
+
}
|
|
81
|
+
get required() { return this._required; }
|
|
82
|
+
set required(value) {
|
|
83
|
+
this._required = coerceBooleanProperty(value);
|
|
84
|
+
this.stateChanges.next();
|
|
85
|
+
}
|
|
86
|
+
get disabled() {
|
|
87
|
+
if (!isNil(this.ngControl?.disabled)) {
|
|
88
|
+
return this.ngControl.disabled;
|
|
89
|
+
}
|
|
90
|
+
return this._disabled;
|
|
91
|
+
}
|
|
92
|
+
set disabled(value) {
|
|
93
|
+
this._disabled = coerceBooleanProperty(value);
|
|
94
|
+
if (this.focused) {
|
|
95
|
+
this.focused = false;
|
|
96
|
+
this.stateChanges.next();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
onKeyDown(event) {
|
|
100
|
+
if (!this.disabled) {
|
|
101
|
+
switch (event.code) {
|
|
102
|
+
case 'ArrowRight':
|
|
103
|
+
case 'ArrowUp': {
|
|
104
|
+
event.preventDefault();
|
|
105
|
+
this.updateModelValue(this.value + 1);
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
108
|
+
case 'ArrowLeft':
|
|
109
|
+
case 'ArrowDown': {
|
|
110
|
+
event.preventDefault();
|
|
111
|
+
this.updateModelValue(this.value - 1);
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
case 'Home': {
|
|
115
|
+
event.preventDefault();
|
|
116
|
+
this.updateModelValue(this.min);
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
case 'End': {
|
|
120
|
+
event.preventDefault();
|
|
121
|
+
this.updateModelValue(this.max);
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
case 'PageUp': {
|
|
125
|
+
event.preventDefault();
|
|
126
|
+
this.updateModelValue(this.value + 10);
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
case 'PageDown': {
|
|
130
|
+
event.preventDefault();
|
|
131
|
+
this.updateModelValue(this.value - 10);
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
onMouseDown(event) {
|
|
138
|
+
if (!this.disabled) {
|
|
139
|
+
const window = this._document.defaultView ?? 'window';
|
|
140
|
+
this.windowMouseMoveListener = this._renderer.listen(window, 'mousemove', this.onMouseMove.bind(this));
|
|
141
|
+
this.windowMouseUpListener = this._renderer.listen(window, 'mouseup', this.onMouseUp.bind(this));
|
|
142
|
+
event.preventDefault();
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
onMouseUp(event) {
|
|
146
|
+
if (!this.disabled) {
|
|
147
|
+
if (this.windowMouseMoveListener) {
|
|
148
|
+
this.windowMouseMoveListener();
|
|
149
|
+
this.windowMouseUpListener = null;
|
|
150
|
+
}
|
|
151
|
+
if (this.windowMouseUpListener) {
|
|
152
|
+
this.windowMouseUpListener();
|
|
153
|
+
this.windowMouseMoveListener = null;
|
|
154
|
+
}
|
|
155
|
+
event.preventDefault();
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
onTouchStart(event) {
|
|
159
|
+
if (!this.disabled) {
|
|
160
|
+
const window = this._document.defaultView ?? 'window';
|
|
161
|
+
this.windowTouchMoveListener = this._renderer.listen(window, 'touchmove', this.onTouchMove.bind(this));
|
|
162
|
+
this.windowTouchEndListener = this._renderer.listen(window, 'touchend', this.onTouchEnd.bind(this));
|
|
163
|
+
event.preventDefault();
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
onTouchEnd(event) {
|
|
167
|
+
if (!this.disabled) {
|
|
168
|
+
if (this.windowTouchMoveListener) {
|
|
169
|
+
this.windowTouchMoveListener();
|
|
170
|
+
}
|
|
171
|
+
if (this.windowTouchEndListener) {
|
|
172
|
+
this.windowTouchEndListener();
|
|
173
|
+
}
|
|
174
|
+
this.windowTouchMoveListener = null;
|
|
175
|
+
this.windowTouchEndListener = null;
|
|
176
|
+
event.preventDefault();
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
mapRange(x, inMin, inMax, outMin, outMax) {
|
|
180
|
+
return ((x - inMin) * (outMax - outMin)) / (inMax - inMin) + outMin;
|
|
181
|
+
}
|
|
182
|
+
onClick(event) {
|
|
183
|
+
if (!this.disabled) {
|
|
184
|
+
this.updateValue(event.offsetX, event.offsetY);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
onFocusIn() {
|
|
188
|
+
if (!this.focused) {
|
|
189
|
+
this.focused = true;
|
|
190
|
+
this.stateChanges.next();
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
onFocusOut(event) {
|
|
194
|
+
if (!this._knobElementRef.nativeElement.contains(event.relatedTarget)) {
|
|
195
|
+
this.touched = true;
|
|
196
|
+
this.focused = false;
|
|
197
|
+
this._onTouchedChange();
|
|
198
|
+
this.stateChanges.next();
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
setDescribedByIds(ids) {
|
|
202
|
+
if (ids.length) {
|
|
203
|
+
this._knobElementRef?.nativeElement.setAttribute('aria-describedby', ids.join(' '));
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
this._knobElementRef?.nativeElement.removeAttribute('aria-describedby');
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
onContainerClick() {
|
|
210
|
+
if (!this.focused) {
|
|
211
|
+
this._knobElementRef.nativeElement.focus();
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
updateValue(offsetX, offsetY) {
|
|
215
|
+
let dx = offsetX - this.size / 2;
|
|
216
|
+
let dy = this.size / 2 - offsetY;
|
|
217
|
+
let angle = Math.atan2(dy, dx);
|
|
218
|
+
let start = -Math.PI / 2 - Math.PI / 6;
|
|
219
|
+
this.updateModel(angle, start);
|
|
220
|
+
}
|
|
221
|
+
updateModel(angle, start) {
|
|
222
|
+
let mappedValue;
|
|
223
|
+
if (angle > this.maxRadians)
|
|
224
|
+
mappedValue = this.mapRange(angle, this.minRadians, this.maxRadians, this.min, this.max);
|
|
225
|
+
else if (angle < start)
|
|
226
|
+
mappedValue = this.mapRange(angle + 2 * Math.PI, this.minRadians, this.maxRadians, this.min, this.max);
|
|
227
|
+
else
|
|
228
|
+
return;
|
|
229
|
+
let newValue = Math.round((mappedValue - this.min) / this.step) * this.step + this.min;
|
|
230
|
+
this.value = newValue;
|
|
231
|
+
this._onModelChange(this.value);
|
|
232
|
+
this.valueChange.emit(this.value);
|
|
233
|
+
}
|
|
234
|
+
onMouseMove(event) {
|
|
235
|
+
if (!this.disabled) {
|
|
236
|
+
this.updateValue(event.offsetX, event.offsetY);
|
|
237
|
+
event.preventDefault();
|
|
238
|
+
this._changeDetectorRef.markForCheck();
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
onTouchMove(event) {
|
|
242
|
+
if (!this.disabled && event instanceof TouchEvent && event.touches.length === 1) {
|
|
243
|
+
const rect = this._el.nativeElement.children[0].getBoundingClientRect();
|
|
244
|
+
const touch = event.targetTouches.item(0);
|
|
245
|
+
if (touch) {
|
|
246
|
+
const offsetX = touch.clientX - rect.left;
|
|
247
|
+
const offsetY = touch.clientY - rect.top;
|
|
248
|
+
this.updateValue(offsetX, offsetY);
|
|
249
|
+
this._changeDetectorRef.markForCheck();
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
updateModelValue(newValue) {
|
|
254
|
+
if (newValue > this.max)
|
|
255
|
+
this.value = this.max;
|
|
256
|
+
else if (newValue < this.min)
|
|
257
|
+
this.value = this.min;
|
|
258
|
+
else
|
|
259
|
+
this.value = newValue;
|
|
260
|
+
this._onModelChange(this.value);
|
|
261
|
+
this.valueChange.emit(this.value);
|
|
262
|
+
}
|
|
263
|
+
writeValue(value) {
|
|
264
|
+
this.value = value;
|
|
265
|
+
this._changeDetectorRef.markForCheck();
|
|
266
|
+
}
|
|
267
|
+
registerOnChange(fn) {
|
|
268
|
+
this._onModelChange = fn;
|
|
269
|
+
}
|
|
270
|
+
registerOnTouched(fn) {
|
|
271
|
+
this._onTouchedChange = fn;
|
|
272
|
+
}
|
|
273
|
+
setDisabledState(val) {
|
|
274
|
+
this.disabled = val;
|
|
275
|
+
this._changeDetectorRef.markForCheck();
|
|
276
|
+
}
|
|
277
|
+
rangePath() {
|
|
278
|
+
return `M ${this.minX()} ${this.minY()} A ${this.radius} ${this.radius} 0 1 1 ${this.maxX()} ${this.maxY()}`;
|
|
279
|
+
}
|
|
280
|
+
valuePath() {
|
|
281
|
+
return `M ${this.zeroX()} ${this.zeroY()} A ${this.radius} ${this.radius} 0 ${this.largeArc()} ${this.sweep()} ${this.valueX()} ${this.valueY()}`;
|
|
282
|
+
}
|
|
283
|
+
zeroRadians() {
|
|
284
|
+
if (this.min > 0 && this.max > 0)
|
|
285
|
+
return this.mapRange(this.min, this.min, this.max, this.minRadians, this.maxRadians);
|
|
286
|
+
else
|
|
287
|
+
return this.mapRange(0, this.min, this.max, this.minRadians, this.maxRadians);
|
|
288
|
+
}
|
|
289
|
+
valueRadians() {
|
|
290
|
+
return this.mapRange(this.value, this.min, this.max, this.minRadians, this.maxRadians);
|
|
291
|
+
}
|
|
292
|
+
minX() {
|
|
293
|
+
return this.midX + Math.cos(this.minRadians) * this.radius;
|
|
294
|
+
}
|
|
295
|
+
minY() {
|
|
296
|
+
return this.midY - Math.sin(this.minRadians) * this.radius;
|
|
297
|
+
}
|
|
298
|
+
maxX() {
|
|
299
|
+
return this.midX + Math.cos(this.maxRadians) * this.radius;
|
|
300
|
+
}
|
|
301
|
+
maxY() {
|
|
302
|
+
return this.midY - Math.sin(this.maxRadians) * this.radius;
|
|
303
|
+
}
|
|
304
|
+
zeroX() {
|
|
305
|
+
return this.midX + Math.cos(this.zeroRadians()) * this.radius;
|
|
306
|
+
}
|
|
307
|
+
zeroY() {
|
|
308
|
+
return this.midY - Math.sin(this.zeroRadians()) * this.radius;
|
|
309
|
+
}
|
|
310
|
+
valueX() {
|
|
311
|
+
return this.midX + Math.cos(this.valueRadians()) * this.radius;
|
|
312
|
+
}
|
|
313
|
+
valueY() {
|
|
314
|
+
return this.midY - Math.sin(this.valueRadians()) * this.radius;
|
|
315
|
+
}
|
|
316
|
+
largeArc() {
|
|
317
|
+
return Math.abs(this.zeroRadians() - this.valueRadians()) < Math.PI ? 0 : 1;
|
|
318
|
+
}
|
|
319
|
+
sweep() {
|
|
320
|
+
return this.valueRadians() > this.zeroRadians() ? 0 : 1;
|
|
321
|
+
}
|
|
322
|
+
valueToDisplay() {
|
|
323
|
+
return this.valueTemplate.replace('{value}', this.value.toString());
|
|
324
|
+
}
|
|
325
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CmatKnobInputComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: DOCUMENT }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
326
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: CmatKnobInputComponent, isStandalone: true, selector: "cmat-knob-input", inputs: { id: "id", valueColor: "valueColor", rangeColor: "rangeColor", textColor: "textColor", valueTemplate: "valueTemplate", name: "name", size: "size", step: "step", min: "min", max: "max", strokeWidth: "strokeWidth", showValue: "showValue", placeholder: "placeholder", value: "value", required: "required", disabled: "disabled" }, outputs: { valueChange: "valueChange" }, host: { listeners: { "keydown": "onKeyDown($event)", "mousedown": "onMouseDown($event)", "mouseup": "onMouseUp($event)", "touchstart": "onTouchStart($event)", "touchend": "onTouchEnd($event)" }, properties: { "attr.id": "this.id" } }, providers: [
|
|
327
|
+
{ provide: MatFormFieldControl, useExisting: CmatKnobInputComponent }
|
|
328
|
+
], viewQueries: [{ propertyName: "_knobElementRef", first: true, predicate: ["knob"], descendants: true }], exportAs: ["cmatKnobInput"], ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\r\n<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n<div #knob [class.cmat-knob-disabled]=\"disabled\" (focusin)=\"onFocusIn()\" (focusout)=\"onFocusOut($event)\">\r\n <svg viewBox=\"0 0 100 100\" role=\"slider\" [style.width]=\"size + 'px'\" [style.height]=\"size + 'px'\"\r\n [attr.aria-valuemin]=\"min\" [attr.aria-valuemax]=\"max\" [attr.aria-valuenow]=\"value\"\r\n [attr.tabindex]=\"disabled ? -1 : 0\" (click)=\"onClick($event)\">\r\n <path class=\"knob-range\" [attr.d]=\"rangePath()\" [attr.stroke-width]=\"strokeWidth\" [attr.stroke]=\"rangeColor\">\r\n </path>\r\n <path class=\"knob-value\" [attr.d]=\"valuePath()\" [attr.stroke-width]=\"strokeWidth\" [attr.stroke]=\"valueColor\">\r\n </path>\r\n @if(showValue){\r\n <text text-anchor=\"middle\" class=\"knob-text\" [attr.x]=\"50\" [attr.y]=\"57\" [attr.fill]=\"textColor\"\r\n [attr.name]=\"name\">{{ valueToDisplay() }}</text>\r\n }\r\n </svg>\r\n</div>", styles: ["cmat-knob-input .knob-range{fill:none;transition:stroke .1s ease-in}cmat-knob-input .knob-value{animation-name:dash-frame;animation-fill-mode:forwards;fill:none}cmat-knob-input .knob-text{font-size:1.3rem;text-align:center}cmat-knob-input .cmat-knob-disabled{opacity:.6}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
329
|
+
}
|
|
330
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CmatKnobInputComponent, decorators: [{
|
|
331
|
+
type: Component,
|
|
332
|
+
args: [{ selector: 'cmat-knob-input', providers: [
|
|
333
|
+
{ provide: MatFormFieldControl, useExisting: CmatKnobInputComponent }
|
|
334
|
+
], exportAs: 'cmatKnobInput', imports: [NgStyle], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\r\n<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n<div #knob [class.cmat-knob-disabled]=\"disabled\" (focusin)=\"onFocusIn()\" (focusout)=\"onFocusOut($event)\">\r\n <svg viewBox=\"0 0 100 100\" role=\"slider\" [style.width]=\"size + 'px'\" [style.height]=\"size + 'px'\"\r\n [attr.aria-valuemin]=\"min\" [attr.aria-valuemax]=\"max\" [attr.aria-valuenow]=\"value\"\r\n [attr.tabindex]=\"disabled ? -1 : 0\" (click)=\"onClick($event)\">\r\n <path class=\"knob-range\" [attr.d]=\"rangePath()\" [attr.stroke-width]=\"strokeWidth\" [attr.stroke]=\"rangeColor\">\r\n </path>\r\n <path class=\"knob-value\" [attr.d]=\"valuePath()\" [attr.stroke-width]=\"strokeWidth\" [attr.stroke]=\"valueColor\">\r\n </path>\r\n @if(showValue){\r\n <text text-anchor=\"middle\" class=\"knob-text\" [attr.x]=\"50\" [attr.y]=\"57\" [attr.fill]=\"textColor\"\r\n [attr.name]=\"name\">{{ valueToDisplay() }}</text>\r\n }\r\n </svg>\r\n</div>", styles: ["cmat-knob-input .knob-range{fill:none;transition:stroke .1s ease-in}cmat-knob-input .knob-value{animation-name:dash-frame;animation-fill-mode:forwards;fill:none}cmat-knob-input .knob-text{font-size:1.3rem;text-align:center}cmat-knob-input .cmat-knob-disabled{opacity:.6}\n"] }]
|
|
335
|
+
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
336
|
+
type: Optional
|
|
337
|
+
}, {
|
|
338
|
+
type: Self
|
|
339
|
+
}] }, { type: Document, decorators: [{
|
|
340
|
+
type: Inject,
|
|
341
|
+
args: [DOCUMENT]
|
|
342
|
+
}] }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }], propDecorators: { _knobElementRef: [{
|
|
343
|
+
type: ViewChild,
|
|
344
|
+
args: ['knob', { static: false }]
|
|
345
|
+
}], id: [{
|
|
346
|
+
type: HostBinding,
|
|
347
|
+
args: ['attr.id']
|
|
348
|
+
}, {
|
|
349
|
+
type: Input
|
|
350
|
+
}], valueColor: [{
|
|
351
|
+
type: Input
|
|
352
|
+
}], rangeColor: [{
|
|
353
|
+
type: Input
|
|
354
|
+
}], textColor: [{
|
|
355
|
+
type: Input
|
|
356
|
+
}], valueTemplate: [{
|
|
357
|
+
type: Input
|
|
358
|
+
}], name: [{
|
|
359
|
+
type: Input
|
|
360
|
+
}], size: [{
|
|
361
|
+
type: Input
|
|
362
|
+
}], step: [{
|
|
363
|
+
type: Input
|
|
364
|
+
}], min: [{
|
|
365
|
+
type: Input
|
|
366
|
+
}], max: [{
|
|
367
|
+
type: Input
|
|
368
|
+
}], strokeWidth: [{
|
|
369
|
+
type: Input
|
|
370
|
+
}], showValue: [{
|
|
371
|
+
type: Input
|
|
372
|
+
}], valueChange: [{
|
|
373
|
+
type: Output
|
|
374
|
+
}], placeholder: [{
|
|
375
|
+
type: Input
|
|
376
|
+
}], value: [{
|
|
377
|
+
type: Input
|
|
378
|
+
}], required: [{
|
|
379
|
+
type: Input
|
|
380
|
+
}], disabled: [{
|
|
381
|
+
type: Input
|
|
382
|
+
}], onKeyDown: [{
|
|
383
|
+
type: HostListener,
|
|
384
|
+
args: ['keydown', ['$event']]
|
|
385
|
+
}], onMouseDown: [{
|
|
386
|
+
type: HostListener,
|
|
387
|
+
args: ['mousedown', ['$event']]
|
|
388
|
+
}], onMouseUp: [{
|
|
389
|
+
type: HostListener,
|
|
390
|
+
args: ['mouseup', ['$event']]
|
|
391
|
+
}], onTouchStart: [{
|
|
392
|
+
type: HostListener,
|
|
393
|
+
args: ['touchstart', ['$event']]
|
|
394
|
+
}], onTouchEnd: [{
|
|
395
|
+
type: HostListener,
|
|
396
|
+
args: ['touchend', ['$event']]
|
|
397
|
+
}] } });
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Generated bundle index. Do not edit.
|
|
401
|
+
*/
|
|
402
|
+
|
|
403
|
+
export { CmatKnobInputComponent };
|
|
404
|
+
//# sourceMappingURL=cmat-components-knob-input.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cmat-components-knob-input.mjs","sources":["../../../projects/cmat/components/knob-input/knob-input.component.ts","../../../projects/cmat/components/knob-input/knob-input.component.html","../../../projects/cmat/components/knob-input/cmat-components-knob-input.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/member-ordering */\r\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\r\nimport { DOCUMENT, NgStyle } from '@angular/common';\r\nimport {\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n HostBinding,\r\n HostListener,\r\n Inject,\r\n Input,\r\n OnDestroy,\r\n Optional,\r\n Output,\r\n Renderer2,\r\n Self,\r\n ViewChild,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\nimport { ControlValueAccessor, NgControl } from '@angular/forms';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { isNil } from 'lodash-es';\r\nimport { Subject } from 'rxjs';\r\n\r\nlet NEXT_ID = 0;\r\n\r\n@Component({\r\n selector: 'cmat-knob-input',\r\n templateUrl: './knob-input.component.html',\r\n styleUrls: ['./knob-input.component.scss'],\r\n providers: [\r\n { provide: MatFormFieldControl, useExisting: CmatKnobInputComponent }\r\n ],\r\n exportAs: 'cmatKnobInput',\r\n imports: [NgStyle],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class CmatKnobInputComponent implements MatFormFieldControl<any>, OnDestroy, ControlValueAccessor {\r\n @ViewChild('knob', { static: false }) private _knobElementRef: ElementRef<HTMLDivElement>;\r\n\r\n @HostBinding('attr.id')\r\n @Input()\r\n public id = `cmat-knob-input-${NEXT_ID++}`;\r\n\r\n @Input() valueColor: string = 'var(--cmat-primary)';\r\n\r\n @Input() rangeColor: string = 'var(--cmat-border)';\r\n\r\n @Input() textColor: string = 'var(--cmat-text-default)';\r\n @Input() valueTemplate: string = '{value}';\r\n @Input() name: string | undefined;\r\n\r\n @Input() size: number = 100;\r\n @Input() step: number = 1;\r\n @Input() min: number = 0;\r\n @Input() max: number = 100;\r\n @Input() strokeWidth: number = 14;\r\n @Input() showValue: boolean = true;\r\n\r\n @Output() valueChange: EventEmitter<number | null> = new EventEmitter<number | null>();\r\n\r\n radius: number = 40;\r\n\r\n midX: number = 50;\r\n\r\n midY: number = 50;\r\n\r\n minRadians: number = (4 * Math.PI) / 3;\r\n\r\n maxRadians: number = -Math.PI / 3;\r\n\r\n windowMouseMoveListener: VoidFunction | null;\r\n\r\n windowMouseUpListener: VoidFunction | null;\r\n\r\n windowTouchMoveListener: VoidFunction | null;\r\n\r\n windowTouchEndListener: VoidFunction | null;\r\n\r\n readonly stateChanges: Subject<void> = new Subject<void>();\r\n focused: boolean = false;\r\n touched: boolean = false;\r\n\r\n constructor(\r\n @Optional() @Self() public ngControl: NgControl,\r\n @Inject(DOCUMENT) private _document: Document,\r\n private _renderer: Renderer2,\r\n private _changeDetectorRef: ChangeDetectorRef,\r\n private _el: ElementRef\r\n ) {\r\n if (this.ngControl != null) {\r\n this.ngControl.valueAccessor = this;\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.stateChanges.complete();\r\n }\r\n\r\n @Input()\r\n get placeholder(): string {\r\n return this._placeholder;\r\n }\r\n set placeholder(value: string) {\r\n this._placeholder = value;\r\n this.stateChanges.next();\r\n }\r\n private _placeholder: string = '';\r\n\r\n @Input()\r\n get value(): number {\r\n return this._value ?? this.min;\r\n }\r\n set value(value: number) {\r\n if (value !== this.value) {\r\n this._value = value;\r\n\r\n this.stateChanges.next();\r\n\r\n this._onModelChange(value);\r\n }\r\n }\r\n protected _value: number | null;\r\n\r\n get empty(): boolean {\r\n return !this._value;\r\n }\r\n\r\n get errorState(): boolean {\r\n if (this.ngControl == null)\r\n return false;\r\n\r\n return (this.touched && this.ngControl?.invalid) ?? false;\r\n }\r\n\r\n get shouldLabelFloat(): boolean {\r\n return this.focused || !this.empty;\r\n }\r\n\r\n @Input()\r\n get required(): boolean { return this._required; }\r\n set required(value: boolean) {\r\n this._required = coerceBooleanProperty(value);\r\n this.stateChanges.next();\r\n }\r\n protected _required = false;\r\n\r\n @Input()\r\n get disabled(): boolean {\r\n if (!isNil(this.ngControl?.disabled)) {\r\n return this.ngControl.disabled;\r\n }\r\n return this._disabled;\r\n }\r\n set disabled(value: BooleanInput) {\r\n this._disabled = coerceBooleanProperty(value);\r\n\r\n if (this.focused) {\r\n this.focused = false;\r\n this.stateChanges.next();\r\n }\r\n }\r\n protected _disabled = false;\r\n\r\n @HostListener('keydown', ['$event'])\r\n onKeyDown(event: KeyboardEvent): void {\r\n if (!this.disabled) {\r\n switch (event.code) {\r\n case 'ArrowRight':\r\n case 'ArrowUp': {\r\n event.preventDefault();\r\n this.updateModelValue(this.value + 1);\r\n break;\r\n }\r\n case 'ArrowLeft':\r\n case 'ArrowDown': {\r\n event.preventDefault();\r\n this.updateModelValue(this.value - 1);\r\n break;\r\n }\r\n case 'Home': {\r\n event.preventDefault();\r\n this.updateModelValue(this.min);\r\n break;\r\n }\r\n case 'End': {\r\n event.preventDefault();\r\n this.updateModelValue(this.max);\r\n break;\r\n }\r\n case 'PageUp': {\r\n event.preventDefault();\r\n this.updateModelValue(this.value + 10);\r\n break;\r\n }\r\n case 'PageDown': {\r\n event.preventDefault();\r\n this.updateModelValue(this.value - 10);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n @HostListener('mousedown', ['$event'])\r\n onMouseDown(event: MouseEvent): void {\r\n if (!this.disabled) {\r\n const window = this._document.defaultView ?? 'window';\r\n this.windowMouseMoveListener = this._renderer.listen(window, 'mousemove', this.onMouseMove.bind(this));\r\n this.windowMouseUpListener = this._renderer.listen(window, 'mouseup', this.onMouseUp.bind(this));\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n @HostListener('mouseup', ['$event'])\r\n onMouseUp(event: MouseEvent): void {\r\n if (!this.disabled) {\r\n if (this.windowMouseMoveListener) {\r\n this.windowMouseMoveListener();\r\n this.windowMouseUpListener = null;\r\n }\r\n\r\n if (this.windowMouseUpListener) {\r\n this.windowMouseUpListener();\r\n this.windowMouseMoveListener = null;\r\n }\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n @HostListener('touchstart', ['$event'])\r\n onTouchStart(event: TouchEvent): void {\r\n if (!this.disabled) {\r\n const window = this._document.defaultView ?? 'window';\r\n this.windowTouchMoveListener = this._renderer.listen(window, 'touchmove', this.onTouchMove.bind(this));\r\n this.windowTouchEndListener = this._renderer.listen(window, 'touchend', this.onTouchEnd.bind(this));\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n @HostListener('touchend', ['$event'])\r\n onTouchEnd(event: TouchEvent): void {\r\n if (!this.disabled) {\r\n if (this.windowTouchMoveListener) {\r\n this.windowTouchMoveListener();\r\n }\r\n if (this.windowTouchEndListener) {\r\n this.windowTouchEndListener();\r\n }\r\n this.windowTouchMoveListener = null;\r\n this.windowTouchEndListener = null;\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n mapRange(x: number, inMin: number, inMax: number, outMin: number, outMax: number): number {\r\n return ((x - inMin) * (outMax - outMin)) / (inMax - inMin) + outMin;\r\n }\r\n\r\n onClick(event: MouseEvent): void {\r\n if (!this.disabled) {\r\n this.updateValue(event.offsetX, event.offsetY);\r\n }\r\n }\r\n\r\n onFocusIn(): void {\r\n if (!this.focused) {\r\n this.focused = true;\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n onFocusOut(event: FocusEvent): void {\r\n if (!this._knobElementRef.nativeElement.contains(event.relatedTarget as Element)) {\r\n this.touched = true;\r\n this.focused = false;\r\n this._onTouchedChange();\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n setDescribedByIds(ids: string[]): void {\r\n if (ids.length) {\r\n this._knobElementRef?.nativeElement.setAttribute('aria-describedby', ids.join(' '));\r\n } else {\r\n this._knobElementRef?.nativeElement.removeAttribute('aria-describedby');\r\n }\r\n }\r\n\r\n onContainerClick(): void {\r\n if (!this.focused) {\r\n this._knobElementRef.nativeElement.focus();\r\n }\r\n }\r\n\r\n updateValue(offsetX: number, offsetY: number): void {\r\n let dx = offsetX - this.size / 2;\r\n let dy = this.size / 2 - offsetY;\r\n let angle = Math.atan2(dy, dx);\r\n let start = -Math.PI / 2 - Math.PI / 6;\r\n this.updateModel(angle, start);\r\n }\r\n\r\n updateModel(angle: number, start: number): void {\r\n let mappedValue;\r\n if (angle > this.maxRadians) mappedValue = this.mapRange(angle, this.minRadians, this.maxRadians, this.min, this.max);\r\n else if (angle < start) mappedValue = this.mapRange(angle + 2 * Math.PI, this.minRadians, this.maxRadians, this.min, this.max);\r\n else return;\r\n\r\n let newValue = Math.round((mappedValue - this.min) / this.step) * this.step + this.min;\r\n this.value = newValue;\r\n\r\n this._onModelChange(this.value);\r\n this.valueChange.emit(this.value);\r\n }\r\n\r\n onMouseMove(event: MouseEvent): void {\r\n if (!this.disabled) {\r\n this.updateValue(event.offsetX, event.offsetY);\r\n event.preventDefault();\r\n\r\n this._changeDetectorRef.markForCheck();\r\n }\r\n }\r\n\r\n onTouchMove(event: Event): void {\r\n if (!this.disabled && event instanceof TouchEvent && event.touches.length === 1) {\r\n const rect = this._el.nativeElement.children[0].getBoundingClientRect();\r\n const touch = event.targetTouches.item(0);\r\n if (touch) {\r\n const offsetX = touch.clientX - rect.left;\r\n const offsetY = touch.clientY - rect.top;\r\n this.updateValue(offsetX, offsetY);\r\n\r\n this._changeDetectorRef.markForCheck();\r\n }\r\n }\r\n }\r\n\r\n updateModelValue(newValue: number): void {\r\n if (newValue > this.max) this.value = this.max;\r\n else if (newValue < this.min) this.value = this.min;\r\n else this.value = newValue;\r\n\r\n this._onModelChange(this.value);\r\n this.valueChange.emit(this.value);\r\n }\r\n\r\n\r\n\r\n writeValue(value: any): void {\r\n this.value = value;\r\n this._changeDetectorRef.markForCheck();\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this._onModelChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this._onTouchedChange = fn;\r\n }\r\n\r\n setDisabledState(val: boolean): void {\r\n this.disabled = val;\r\n this._changeDetectorRef.markForCheck();\r\n }\r\n\r\n rangePath(): string {\r\n return `M ${this.minX()} ${this.minY()} A ${this.radius} ${this.radius} 0 1 1 ${this.maxX()} ${this.maxY()}`;\r\n }\r\n\r\n valuePath(): string {\r\n return `M ${this.zeroX()} ${this.zeroY()} A ${this.radius} ${this.radius} 0 ${this.largeArc()} ${this.sweep()} ${this.valueX()} ${this.valueY()}`;\r\n }\r\n\r\n zeroRadians(): number {\r\n if (this.min > 0 && this.max > 0) return this.mapRange(this.min, this.min, this.max, this.minRadians, this.maxRadians);\r\n else return this.mapRange(0, this.min, this.max, this.minRadians, this.maxRadians);\r\n }\r\n\r\n valueRadians(): number {\r\n return this.mapRange(this.value, this.min, this.max, this.minRadians, this.maxRadians);\r\n }\r\n\r\n minX(): number {\r\n return this.midX + Math.cos(this.minRadians) * this.radius;\r\n }\r\n\r\n minY(): number {\r\n return this.midY - Math.sin(this.minRadians) * this.radius;\r\n }\r\n\r\n maxX(): number {\r\n return this.midX + Math.cos(this.maxRadians) * this.radius;\r\n }\r\n\r\n maxY(): number {\r\n return this.midY - Math.sin(this.maxRadians) * this.radius;\r\n }\r\n\r\n zeroX(): number {\r\n return this.midX + Math.cos(this.zeroRadians()) * this.radius;\r\n }\r\n\r\n zeroY(): number {\r\n return this.midY - Math.sin(this.zeroRadians()) * this.radius;\r\n }\r\n\r\n valueX(): number {\r\n return this.midX + Math.cos(this.valueRadians()) * this.radius;\r\n }\r\n\r\n valueY(): number {\r\n return this.midY - Math.sin(this.valueRadians()) * this.radius;\r\n }\r\n\r\n largeArc(): number {\r\n return Math.abs(this.zeroRadians() - this.valueRadians()) < Math.PI ? 0 : 1;\r\n }\r\n\r\n sweep(): number {\r\n return this.valueRadians() > this.zeroRadians() ? 0 : 1;\r\n }\r\n\r\n valueToDisplay(): string {\r\n return this.valueTemplate.replace('{value}', this.value.toString());\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n private _onModelChange: (value: any) => void = () => { };\r\n // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n private _onTouchedChange: () => any = () => { };\r\n}","<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\r\n<!-- eslint-disable @angular-eslint/template/no-inline-styles -->\r\n<div #knob [class.cmat-knob-disabled]=\"disabled\" (focusin)=\"onFocusIn()\" (focusout)=\"onFocusOut($event)\">\r\n <svg viewBox=\"0 0 100 100\" role=\"slider\" [style.width]=\"size + 'px'\" [style.height]=\"size + 'px'\"\r\n [attr.aria-valuemin]=\"min\" [attr.aria-valuemax]=\"max\" [attr.aria-valuenow]=\"value\"\r\n [attr.tabindex]=\"disabled ? -1 : 0\" (click)=\"onClick($event)\">\r\n <path class=\"knob-range\" [attr.d]=\"rangePath()\" [attr.stroke-width]=\"strokeWidth\" [attr.stroke]=\"rangeColor\">\r\n </path>\r\n <path class=\"knob-value\" [attr.d]=\"valuePath()\" [attr.stroke-width]=\"strokeWidth\" [attr.stroke]=\"valueColor\">\r\n </path>\r\n @if(showValue){\r\n <text text-anchor=\"middle\" class=\"knob-text\" [attr.x]=\"50\" [attr.y]=\"57\" [attr.fill]=\"textColor\"\r\n [attr.name]=\"name\">{{ valueToDisplay() }}</text>\r\n }\r\n </svg>\r\n</div>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAAA;AA0BA,IAAI,OAAO,GAAG,CAAC;MAcF,sBAAsB,CAAA;IA8C/B,WAC+B,CAAA,SAAoB,EACrB,SAAmB,EACrC,SAAoB,EACpB,kBAAqC,EACrC,GAAe,EAAA;QAJI,IAAS,CAAA,SAAA,GAAT,SAAS;QACV,IAAS,CAAA,SAAA,GAAT,SAAS;QAC3B,IAAS,CAAA,SAAA,GAAT,SAAS;QACT,IAAkB,CAAA,kBAAA,GAAlB,kBAAkB;QAClB,IAAG,CAAA,GAAA,GAAH,GAAG;AA9CR,QAAA,IAAA,CAAA,EAAE,GAAG,CAAA,gBAAA,EAAmB,OAAO,EAAE,EAAE;QAEjC,IAAU,CAAA,UAAA,GAAW,qBAAqB;QAE1C,IAAU,CAAA,UAAA,GAAW,oBAAoB;QAEzC,IAAS,CAAA,SAAA,GAAW,0BAA0B;QAC9C,IAAa,CAAA,aAAA,GAAW,SAAS;QAGjC,IAAI,CAAA,IAAA,GAAW,GAAG;QAClB,IAAI,CAAA,IAAA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AAX;gBACQ,GAAG,EAAA,CAAA;sBAAX;gBACQ,WAAW,EAAA,CAAA;sBAAnB;gBACQ,SAAS,EAAA,CAAA;sBAAjB;gBAES,WAAW,EAAA,CAAA;sBAApB;gBAyCG,WAAW,EAAA,CAAA;sBADd;gBAWG,KAAK,EAAA,CAAA;sBADR;gBA+BG,QAAQ,EAAA,CAAA;sBADX;gBASG,QAAQ,EAAA,CAAA;sBADX;gBAkBD,SAAS,EAAA,CAAA;sBADR,YAAY;uBAAC,SAAS,EAAE,CAAC,QAAQ,CAAC;gBAyCnC,WAAW,EAAA,CAAA;sBADV,YAAY;uBAAC,WAAW,EAAE,CAAC,QAAQ,CAAC;gBAWrC,SAAS,EAAA,CAAA;sBADR,YAAY;uBAAC,SAAS,EAAE,CAAC,QAAQ,CAAC;gBAiBnC,YAAY,EAAA,CAAA;sBADX,YAAY;uBAAC,YAAY,EAAE,CAAC,QAAQ,CAAC;gBAWtC,UAAU,EAAA,CAAA;sBADT,YAAY;uBAAC,UAAU,EAAE,CAAC,QAAQ,CAAC;;;AEnPxC;;AAEG;;;;"}
|
|
@@ -37,12 +37,12 @@ class CmatMasonryComponent {
|
|
|
37
37
|
this.distributedColumns[i % this.columns].items.push(this.items[i]);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
41
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
40
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CmatMasonryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
41
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: CmatMasonryComponent, isStandalone: true, selector: "cmat-masonry", inputs: { columnsTemplate: "columnsTemplate", columns: "columns", items: "items" }, exportAs: ["cmatMasonry"], usesOnChanges: true, ngImport: i0, template: "<div class=\"flex p-2\">\r\n <ng-container *ngTemplateOutlet=\"columnsTemplate; context: { $implicit: distributedColumns }\"></ng-container>\r\n</div>", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: cmatAnimations, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
42
42
|
}
|
|
43
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
43
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CmatMasonryComponent, decorators: [{
|
|
44
44
|
type: Component,
|
|
45
|
-
args: [{ selector: 'cmat-masonry', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: cmatAnimations, exportAs: 'cmatMasonry',
|
|
45
|
+
args: [{ selector: 'cmat-masonry', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: cmatAnimations, exportAs: 'cmatMasonry', imports: [NgTemplateOutlet], template: "<div class=\"flex p-2\">\r\n <ng-container *ngTemplateOutlet=\"columnsTemplate; context: { $implicit: distributedColumns }\"></ng-container>\r\n</div>" }]
|
|
46
46
|
}], propDecorators: { columnsTemplate: [{
|
|
47
47
|
type: Input,
|
|
48
48
|
args: [{ required: true }]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmat-components-masonry.mjs","sources":["../../../projects/cmat/components/masonry/masonry.component.ts","../../../projects/cmat/components/masonry/masonry.component.html","../../../projects/cmat/components/masonry/cmat-components-masonry.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\r\nimport {AfterViewInit, ChangeDetectionStrategy, Component, Input, OnChanges, SimpleChanges, TemplateRef, ViewEncapsulation} from '@angular/core';\r\nimport {cmatAnimations} from 'cmat/animations';\r\n\r\n@Component({\r\n selector: 'cmat-masonry',\r\n templateUrl: './masonry.component.html',\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n animations: cmatAnimations,\r\n exportAs: 'cmatMasonry',\r\n
|
|
1
|
+
{"version":3,"file":"cmat-components-masonry.mjs","sources":["../../../projects/cmat/components/masonry/masonry.component.ts","../../../projects/cmat/components/masonry/masonry.component.html","../../../projects/cmat/components/masonry/cmat-components-masonry.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\r\nimport {AfterViewInit, ChangeDetectionStrategy, Component, Input, OnChanges, SimpleChanges, TemplateRef, ViewEncapsulation} from '@angular/core';\r\nimport {cmatAnimations} from 'cmat/animations';\r\n\r\n@Component({\r\n selector: 'cmat-masonry',\r\n templateUrl: './masonry.component.html',\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n animations: cmatAnimations,\r\n exportAs: 'cmatMasonry',\r\n imports: [NgTemplateOutlet]\r\n})\r\nexport class CmatMasonryComponent implements OnChanges, AfterViewInit {\r\n @Input({ required: true }) columnsTemplate: TemplateRef<any>;\r\n @Input({ required: true }) columns: number;\r\n @Input() items: any[] = [];\r\n distributedColumns: any[] = [];\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n // Columns\r\n if ('columns' in changes) {\r\n // Distribute the items\r\n this._distributeItems();\r\n }\r\n\r\n // Items\r\n if ('items' in changes) {\r\n // Distribute the items\r\n this._distributeItems();\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n // Distribute the items for the first time\r\n this._distributeItems();\r\n }\r\n\r\n private _distributeItems(): void {\r\n // Return an empty array if there are no items\r\n if (this.items.length === 0) {\r\n this.distributedColumns = [];\r\n return;\r\n }\r\n\r\n // Prepare the distributed columns array\r\n this.distributedColumns = Array.from(Array(this.columns), () => ({items: []}));\r\n\r\n // Distribute the items to columns\r\n for (let i = 0; i < this.items.length; i++) {\r\n this.distributedColumns[i % this.columns].items.push(this.items[i]);\r\n }\r\n }\r\n}\r\n","<div class=\"flex p-2\">\r\n <ng-container *ngTemplateOutlet=\"columnsTemplate; context: { $implicit: distributedColumns }\"></ng-container>\r\n</div>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAaa,oBAAoB,CAAA;AATjC,IAAA,WAAA,GAAA;QAYa,IAAK,CAAA,KAAA,GAAU,EAAE;QAC1B,IAAkB,CAAA,kBAAA,GAAU,EAAE;AAoCjC;AAlCG,IAAA,WAAW,CAAC,OAAsB,EAAA;;AAE9B,QAAA,IAAI,SAAS,IAAI,OAAO,EAAE;;YAEtB,IAAI,CAAC,gBAAgB,EAAE;;;AAI3B,QAAA,IAAI,OAAO,IAAI,OAAO,EAAE;;YAEpB,IAAI,CAAC,gBAAgB,EAAE;;;IAI/B,eAAe,GAAA;;QAEX,IAAI,CAAC,gBAAgB,EAAE;;IAGnB,gBAAgB,GAAA;;QAEpB,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;AACzB,YAAA,IAAI,CAAC,kBAAkB,GAAG,EAAE;YAC5B;;;QAIJ,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,OAAO,EAAC,KAAK,EAAE,EAAE,EAAC,CAAC,CAAC;;AAG9E,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACxC,IAAI,CAAC,kBAAkB,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;;;8GArClE,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAA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
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
146
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
145
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CmatMaterialColorPickerComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
146
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: CmatMaterialColorPickerComponent, isStandalone: true, selector: "cmat-material-color-picker", inputs: { color: "color", title: "title", readonly: "readonly" }, outputs: { colorChanged: "colorChanged" }, providers: [CMAT_MATERIAL_COLOR_PICKER_VALUE_ACCESSOR], exportAs: ["cmatMaterialColorPicker"], ngImport: i0, template: "<div class=\"rounded\" [ngClass]=\"selectedColor.color\">\r\n <mat-select value=\"init\" panelClass=\"min-w-64\" [disableOptionCentering]=\"true\" [hideSingleSelectionIndicator]=\"true\"\r\n [disabled]=\"readonly\" (openedChange)=\"onMenuOpen($event)\">\r\n <mat-select-trigger class=\"flex p-1\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:paint-brush'\"></mat-icon>\r\n </mat-select-trigger>\r\n\r\n <header class=\"shadow flex flex-row content-between justify-between p-2\" [ngClass]=\"'accent'\">\r\n <button type=\"button\" mat-icon-button class=\"secondary-text\" aria-label=\"\u8C03\u8272\u677F\"\r\n [class.invisible]=\"view === 'palettes'\" (click)=\"goToPalettesView()\">\r\n <mat-icon svgIcon=\"mat_outline:arrow_back\"></mat-icon>\r\n </button>\r\n <span class=\"align-middle leading-loose text-xl font-bold\">{{title}}</span>\r\n <button type=\"button\" mat-icon-button class=\"remove-color-button secondary-text\" aria-label=\"\u79FB\u9664\u989C\u8272\"\r\n matTooltip=\"\u79FB\u9664\u989C\u8272\" (click)=\"removeColor()\">\r\n <mat-icon color=\"warn\" [svgIcon]=\"'mat_outline:cleaning_services'\"></mat-icon>\r\n </button>\r\n </header>\r\n\r\n <div class=\"flex flex-wrap w-60 m-2\">\r\n <mat-option value=\"init\" class=\"hidden\">\u521D\u59CB\u5316</mat-option>\r\n <div>\r\n @switch (view) {\r\n @case ('palettes') {\r\n <div>\r\n <div class=\"flex flex-row flex-wrap justify-start content-start colors\">\r\n @for (palette of palettes; track $index) {\r\n <div role=\"presentation\"\r\n class=\"cursor-pointer\" (click)=\"selectPalette(palette)\">\r\n <mat-option\r\n class=\"relative flex w-12 h-12 p-0 pointer-events-none rounded-full bg-transparent hover:opacity-50\"\r\n [value]=\"selectedPalette\">\r\n @if (selectedColor.color===palette + '-' + selectedHue) {\r\n <mat-icon class=\"absolute m-3 text-white\"\r\n [svgIcon]=\"'heroicons_outline:check'\"></mat-icon>\r\n }\r\n <span class=\"flex w-10 h-10 m-1 rounded-full\"\r\n [ngClass]=\"palette + '-' + selectedHue\"></span>\r\n </mat-option>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n @case ('hues') {\r\n <div>\r\n <div class=\"flex flex-row flex-wrap justify-start content-start colors\">\r\n @for (hue of hues; track $index) {\r\n <div role=\"presentation\" class=\"cursor-pointer\"\r\n (click)=\"selectHue(hue)\">\r\n <mat-option\r\n class=\"relative flex w-12 h-12 p-0 pointer-events-none rounded-full bg-transparent hover:opacity-50\"\r\n [value]=\"selectedHue\">\r\n @if (selectedColor.color===selectedPalette + '-' + hue) {\r\n <mat-icon class=\"absolute m-3 text-white\"\r\n [svgIcon]=\"'heroicons_outline:check'\"></mat-icon>\r\n }\r\n <span class=\"flex w-10 h-10 m-1 rounded-full\"\r\n [ngClass]=\"selectedPalette + '-' + hue\"></span>\r\n </mat-option>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n }\r\n </div>\r\n </div>\r\n </mat-select>\r\n</div>", styles: ["cmat-material-color-picker .mat-mdc-select-arrow-wrapper{display:none!important}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i1.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], animations: cmatAnimations, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
147
147
|
}
|
|
148
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
148
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CmatMaterialColorPickerComponent, decorators: [{
|
|
149
149
|
type: Component,
|
|
150
|
-
args: [{ selector: 'cmat-material-color-picker', animations: cmatAnimations, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatMaterialColorPicker', providers: [CMAT_MATERIAL_COLOR_PICKER_VALUE_ACCESSOR],
|
|
150
|
+
args: [{ selector: 'cmat-material-color-picker', animations: cmatAnimations, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatMaterialColorPicker', providers: [CMAT_MATERIAL_COLOR_PICKER_VALUE_ACCESSOR], imports: [NgClass, MatSelectModule, MatIconModule, MatButtonModule, MatTooltipModule], template: "<div class=\"rounded\" [ngClass]=\"selectedColor.color\">\r\n <mat-select value=\"init\" panelClass=\"min-w-64\" [disableOptionCentering]=\"true\" [hideSingleSelectionIndicator]=\"true\"\r\n [disabled]=\"readonly\" (openedChange)=\"onMenuOpen($event)\">\r\n <mat-select-trigger class=\"flex p-1\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:paint-brush'\"></mat-icon>\r\n </mat-select-trigger>\r\n\r\n <header class=\"shadow flex flex-row content-between justify-between p-2\" [ngClass]=\"'accent'\">\r\n <button type=\"button\" mat-icon-button class=\"secondary-text\" aria-label=\"\u8C03\u8272\u677F\"\r\n [class.invisible]=\"view === 'palettes'\" (click)=\"goToPalettesView()\">\r\n <mat-icon svgIcon=\"mat_outline:arrow_back\"></mat-icon>\r\n </button>\r\n <span class=\"align-middle leading-loose text-xl font-bold\">{{title}}</span>\r\n <button type=\"button\" mat-icon-button class=\"remove-color-button secondary-text\" aria-label=\"\u79FB\u9664\u989C\u8272\"\r\n matTooltip=\"\u79FB\u9664\u989C\u8272\" (click)=\"removeColor()\">\r\n <mat-icon color=\"warn\" [svgIcon]=\"'mat_outline:cleaning_services'\"></mat-icon>\r\n </button>\r\n </header>\r\n\r\n <div class=\"flex flex-wrap w-60 m-2\">\r\n <mat-option value=\"init\" class=\"hidden\">\u521D\u59CB\u5316</mat-option>\r\n <div>\r\n @switch (view) {\r\n @case ('palettes') {\r\n <div>\r\n <div class=\"flex flex-row flex-wrap justify-start content-start colors\">\r\n @for (palette of palettes; track $index) {\r\n <div role=\"presentation\"\r\n class=\"cursor-pointer\" (click)=\"selectPalette(palette)\">\r\n <mat-option\r\n class=\"relative flex w-12 h-12 p-0 pointer-events-none rounded-full bg-transparent hover:opacity-50\"\r\n [value]=\"selectedPalette\">\r\n @if (selectedColor.color===palette + '-' + selectedHue) {\r\n <mat-icon class=\"absolute m-3 text-white\"\r\n [svgIcon]=\"'heroicons_outline:check'\"></mat-icon>\r\n }\r\n <span class=\"flex w-10 h-10 m-1 rounded-full\"\r\n [ngClass]=\"palette + '-' + selectedHue\"></span>\r\n </mat-option>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n @case ('hues') {\r\n <div>\r\n <div class=\"flex flex-row flex-wrap justify-start content-start colors\">\r\n @for (hue of hues; track $index) {\r\n <div role=\"presentation\" class=\"cursor-pointer\"\r\n (click)=\"selectHue(hue)\">\r\n <mat-option\r\n class=\"relative flex w-12 h-12 p-0 pointer-events-none rounded-full bg-transparent hover:opacity-50\"\r\n [value]=\"selectedHue\">\r\n @if (selectedColor.color===selectedPalette + '-' + hue) {\r\n <mat-icon class=\"absolute m-3 text-white\"\r\n [svgIcon]=\"'heroicons_outline:check'\"></mat-icon>\r\n }\r\n <span class=\"flex w-10 h-10 m-1 rounded-full\"\r\n [ngClass]=\"selectedPalette + '-' + hue\"></span>\r\n </mat-option>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n }\r\n </div>\r\n </div>\r\n </mat-select>\r\n</div>", styles: ["cmat-material-color-picker .mat-mdc-select-arrow-wrapper{display:none!important}\n"] }]
|
|
151
151
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { colorChanged: [{
|
|
152
152
|
type: Output
|
|
153
153
|
}], color: [{
|