cmat 0.0.16 → 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-search/select-search.component.d.ts +2 -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 +5 -5
- 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 +35 -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 +81 -147
- package/services/data/data.service.d.ts +1 -1
- 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/services/utils/utils.service.d.ts +4 -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 -435
- 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,457 @@
|
|
|
1
|
+
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
2
|
+
import * as i2 from '@angular/common';
|
|
3
|
+
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
4
|
+
import * as i0 from '@angular/core';
|
|
5
|
+
import { Component, ViewEncapsulation, ChangeDetectionStrategy, Optional, Self, Inject, HostBinding, Input, Output } from '@angular/core';
|
|
6
|
+
import * as i1 from '@angular/forms';
|
|
7
|
+
import { FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
8
|
+
import { MatFormFieldControl } from '@angular/material/form-field';
|
|
9
|
+
import { isNil } from 'lodash';
|
|
10
|
+
import { Subject } from 'rxjs';
|
|
11
|
+
import { takeUntil } from 'rxjs/operators';
|
|
12
|
+
|
|
13
|
+
class KeyboardUtil {
|
|
14
|
+
static ifTab(event) {
|
|
15
|
+
return this.ifKey(event, 'Tab');
|
|
16
|
+
}
|
|
17
|
+
static ifDelete(event) {
|
|
18
|
+
return this.ifKey(event, 'Delete;Del');
|
|
19
|
+
}
|
|
20
|
+
static ifBackspace(event) {
|
|
21
|
+
return this.ifKey(event, 'Backspace');
|
|
22
|
+
}
|
|
23
|
+
static ifRightArrow(event) {
|
|
24
|
+
return this.ifKey(event, 'ArrowRight;Right');
|
|
25
|
+
}
|
|
26
|
+
static ifLeftArrow(event) {
|
|
27
|
+
return this.ifKey(event, 'ArrowLeft;Left');
|
|
28
|
+
}
|
|
29
|
+
static ifSpacebar(event) {
|
|
30
|
+
return this.ifKey(event, 'Spacebar; '); //don't remove the space after ; as this will check for space key
|
|
31
|
+
}
|
|
32
|
+
static ifKey(event, keys) {
|
|
33
|
+
let keysToCheck = keys.split(';');
|
|
34
|
+
return keysToCheck.some(k => k === event.key);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
class ObjectUtil {
|
|
39
|
+
static keys(obj) {
|
|
40
|
+
if (!obj)
|
|
41
|
+
return [];
|
|
42
|
+
return Object.keys(obj);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* eslint-disable @angular-eslint/no-output-on-prefix */
|
|
47
|
+
/* eslint-disable @typescript-eslint/member-ordering */
|
|
48
|
+
let NEXT_ID = 0;
|
|
49
|
+
class CmatOtpInputComponent {
|
|
50
|
+
constructor(ngControl, _document, _formBuilder) {
|
|
51
|
+
this.ngControl = ngControl;
|
|
52
|
+
this._document = _document;
|
|
53
|
+
this._formBuilder = _formBuilder;
|
|
54
|
+
this.id = `cmat-otp-input-${NEXT_ID++}`;
|
|
55
|
+
this.onBlur = new Subject();
|
|
56
|
+
this.onInputChange = new Subject();
|
|
57
|
+
this.config = { length: 4 };
|
|
58
|
+
this.componentKey = Math.random()
|
|
59
|
+
.toString(36)
|
|
60
|
+
.substring(2) + new Date().getTime().toString(36);
|
|
61
|
+
this.stateChanges = new Subject();
|
|
62
|
+
this.focused = false;
|
|
63
|
+
this._unsubscribeAll = new Subject();
|
|
64
|
+
this._activeFocusCount = 0;
|
|
65
|
+
this._placeholder = '';
|
|
66
|
+
this._required = false;
|
|
67
|
+
this._disabled = false;
|
|
68
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
69
|
+
this._onModelChange = () => { };
|
|
70
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
71
|
+
this._onTouchedChange = () => { };
|
|
72
|
+
this.otpForm = this._formBuilder.group({});
|
|
73
|
+
if (this.ngControl != null) {
|
|
74
|
+
this.ngControl.valueAccessor = this;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
get inputType() {
|
|
78
|
+
return this.config?.isPasswordInput
|
|
79
|
+
? 'password'
|
|
80
|
+
: this.config?.allowNumbersOnly
|
|
81
|
+
? 'tel'
|
|
82
|
+
: 'text';
|
|
83
|
+
}
|
|
84
|
+
get controlKeys() { return ObjectUtil.keys(this.otpForm?.controls); }
|
|
85
|
+
;
|
|
86
|
+
get errorState() {
|
|
87
|
+
if (this.ngControl == null)
|
|
88
|
+
return false;
|
|
89
|
+
return (this.ngControl.invalid && ((this.ngControl.dirty ?? false) || this.ngControl.touched)) ?? false;
|
|
90
|
+
}
|
|
91
|
+
ngOnChanges(changes) {
|
|
92
|
+
if (changes.config) {
|
|
93
|
+
if (this.config.length !== ((this.otpForm?.controls).length ?? 0)) {
|
|
94
|
+
this.otpForm = this._formBuilder.group({});
|
|
95
|
+
for (let index = 0; index < this.config.length; index++) {
|
|
96
|
+
this.otpForm.addControl(this._getControlName(index), new FormControl());
|
|
97
|
+
}
|
|
98
|
+
this.otpForm.valueChanges.pipe(takeUntil(this._unsubscribeAll)).subscribe(() => {
|
|
99
|
+
ObjectUtil.keys(this.otpForm.controls).forEach((k) => {
|
|
100
|
+
var val = this.otpForm.controls[k].value;
|
|
101
|
+
if (val && val.length > 1) {
|
|
102
|
+
if (val.length >= this.config.length) {
|
|
103
|
+
this.setValue(val);
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
this._rebuildValue();
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
setDisabledState(isDisabled) {
|
|
115
|
+
if (this.otpForm) {
|
|
116
|
+
if (isDisabled) {
|
|
117
|
+
this.otpForm.disable({ emitEvent: false });
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
this.otpForm.enable({ emitEvent: false });
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
writeValue(value) {
|
|
125
|
+
this.currentVal = value || null;
|
|
126
|
+
if (this.otpForm && this.currentVal) {
|
|
127
|
+
this.setValue(this.currentVal);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
registerOnChange(fn) {
|
|
131
|
+
this._onModelChange = fn;
|
|
132
|
+
}
|
|
133
|
+
registerOnTouched(fn) {
|
|
134
|
+
this._onTouchedChange = fn;
|
|
135
|
+
}
|
|
136
|
+
onFocusIn() {
|
|
137
|
+
this._onTouchedChange();
|
|
138
|
+
this._activeFocusCount++;
|
|
139
|
+
if (!this.focused) {
|
|
140
|
+
this.focused = true;
|
|
141
|
+
this.stateChanges.next();
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
onFocusOut() {
|
|
145
|
+
setTimeout(() => {
|
|
146
|
+
this._activeFocusCount--;
|
|
147
|
+
if (this._activeFocusCount === 0) {
|
|
148
|
+
this.focused = false;
|
|
149
|
+
this._onTouchedChange();
|
|
150
|
+
this.onBlur.next();
|
|
151
|
+
this.stateChanges.next();
|
|
152
|
+
}
|
|
153
|
+
}, 0);
|
|
154
|
+
}
|
|
155
|
+
ngAfterViewInit() {
|
|
156
|
+
if (!this.config.disableAutoFocus) {
|
|
157
|
+
const containerItem = this._document.getElementById(`c_${this.componentKey}`);
|
|
158
|
+
if (containerItem) {
|
|
159
|
+
const ele = containerItem.getElementsByClassName('cmat-otp-input')[0];
|
|
160
|
+
if (ele?.focus) {
|
|
161
|
+
ele.focus();
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
ngOnDestroy() {
|
|
167
|
+
this.stateChanges.complete();
|
|
168
|
+
this._unsubscribeAll.next(void 0);
|
|
169
|
+
this._unsubscribeAll.complete();
|
|
170
|
+
}
|
|
171
|
+
get placeholder() {
|
|
172
|
+
return this._placeholder;
|
|
173
|
+
}
|
|
174
|
+
set placeholder(value) {
|
|
175
|
+
this._placeholder = value;
|
|
176
|
+
this.stateChanges.next();
|
|
177
|
+
}
|
|
178
|
+
get value() {
|
|
179
|
+
return this._value;
|
|
180
|
+
}
|
|
181
|
+
set value(value) {
|
|
182
|
+
if (value !== this.value) {
|
|
183
|
+
this._value = value;
|
|
184
|
+
this.stateChanges.next();
|
|
185
|
+
this._onModelChange(value);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
get empty() {
|
|
189
|
+
return !this._value;
|
|
190
|
+
}
|
|
191
|
+
get shouldLabelFloat() {
|
|
192
|
+
return this.focused || !this.empty;
|
|
193
|
+
}
|
|
194
|
+
get required() { return this._required; }
|
|
195
|
+
set required(value) {
|
|
196
|
+
this._required = coerceBooleanProperty(value);
|
|
197
|
+
this.stateChanges.next();
|
|
198
|
+
}
|
|
199
|
+
get disabled() {
|
|
200
|
+
if (!isNil(this.ngControl?.disabled)) {
|
|
201
|
+
return this.ngControl.disabled;
|
|
202
|
+
}
|
|
203
|
+
return this._disabled;
|
|
204
|
+
}
|
|
205
|
+
set disabled(value) {
|
|
206
|
+
this._disabled = coerceBooleanProperty(value);
|
|
207
|
+
this.setDisabledState(this._disabled);
|
|
208
|
+
if (this.focused) {
|
|
209
|
+
this.focused = false;
|
|
210
|
+
this.stateChanges.next();
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
setDescribedByIds(ids) {
|
|
214
|
+
const containerItem = this._document.getElementById(`c_${this.componentKey}`);
|
|
215
|
+
if (containerItem) {
|
|
216
|
+
if (ids.length) {
|
|
217
|
+
containerItem.setAttribute('aria-describedby', ids.join(' '));
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
containerItem.removeAttribute('aria-describedby');
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
onContainerClick() {
|
|
225
|
+
const containerItem = this._document.getElementById(`c_${this.componentKey}`);
|
|
226
|
+
if (!this.focused && containerItem) {
|
|
227
|
+
containerItem.focus();
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
onKeyDown($event, inputIdx) {
|
|
231
|
+
const prevInputId = this.getBoxId(inputIdx - 1);
|
|
232
|
+
const currentInputId = this.getBoxId(inputIdx);
|
|
233
|
+
const nextInputId = this.getBoxId(inputIdx + 1);
|
|
234
|
+
if (KeyboardUtil.ifSpacebar($event)) {
|
|
235
|
+
$event.preventDefault();
|
|
236
|
+
return false;
|
|
237
|
+
}
|
|
238
|
+
if (KeyboardUtil.ifBackspace($event)) {
|
|
239
|
+
if (!$event.target.value) {
|
|
240
|
+
this._clearInput(prevInputId, inputIdx - 1);
|
|
241
|
+
this._setSelected(prevInputId);
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
244
|
+
this._clearInput(currentInputId, inputIdx);
|
|
245
|
+
}
|
|
246
|
+
this._rebuildValue();
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
if (KeyboardUtil.ifDelete($event)) {
|
|
250
|
+
if (!$event.target.value) {
|
|
251
|
+
this._clearInput(prevInputId, inputIdx - 1);
|
|
252
|
+
this._setSelected(prevInputId);
|
|
253
|
+
}
|
|
254
|
+
else {
|
|
255
|
+
this._clearInput(currentInputId, inputIdx);
|
|
256
|
+
}
|
|
257
|
+
this._rebuildValue();
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
if (this.ifValidKeyCode($event)) {
|
|
261
|
+
$event.target.value = $event.key;
|
|
262
|
+
let ctrlName = this._getControlName(inputIdx);
|
|
263
|
+
this.otpForm.controls[ctrlName]?.setValue($event.key);
|
|
264
|
+
$event.preventDefault();
|
|
265
|
+
this._setSelected(nextInputId);
|
|
266
|
+
this._rebuildValue();
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
onInput($event, inputIdx) {
|
|
270
|
+
let newVal = this.currentVal ? `${this.currentVal}${$event.target.value}` : $event.target.value;
|
|
271
|
+
if (this.config.allowNumbersOnly && !this.validateNumber(newVal)) {
|
|
272
|
+
$event.target.value = null;
|
|
273
|
+
$event.stopPropagation();
|
|
274
|
+
$event.preventDefault();
|
|
275
|
+
this._clearInput(null, inputIdx);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
onKeyUp($event, inputIdx) {
|
|
279
|
+
if (KeyboardUtil.ifTab($event)) {
|
|
280
|
+
inputIdx -= 1;
|
|
281
|
+
}
|
|
282
|
+
const nextInputId = this.getBoxId(inputIdx + 1);
|
|
283
|
+
const prevInputId = this.getBoxId(inputIdx - 1);
|
|
284
|
+
if (KeyboardUtil.ifRightArrow($event)) {
|
|
285
|
+
$event.preventDefault();
|
|
286
|
+
this._setSelected(nextInputId);
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
if (KeyboardUtil.ifLeftArrow($event)) {
|
|
290
|
+
$event.preventDefault();
|
|
291
|
+
this._setSelected(prevInputId);
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
if (!$event.target.value) {
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
validateNumber(val) {
|
|
299
|
+
return val && /^[0-9]+$/.test(val);
|
|
300
|
+
}
|
|
301
|
+
getBoxId(idx) {
|
|
302
|
+
return `otp_${idx}_${this.componentKey}`;
|
|
303
|
+
}
|
|
304
|
+
focusTo(eleId) {
|
|
305
|
+
const ele = this._document.getElementById(eleId);
|
|
306
|
+
if (ele) {
|
|
307
|
+
ele.focus();
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
setValue(value) {
|
|
311
|
+
if (this.config.allowNumbersOnly && isNaN(value)) {
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
this.otpForm.reset();
|
|
315
|
+
if (!value) {
|
|
316
|
+
this._rebuildValue();
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
value = value.toString().replace(/\s/g, ''); // remove whitespace
|
|
320
|
+
Array.from(value).forEach((c, idx) => {
|
|
321
|
+
if (this.otpForm.get(this._getControlName(idx))) {
|
|
322
|
+
this.otpForm.get(this._getControlName(idx)).setValue(c);
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
if (!this.config.disableAutoFocus) {
|
|
326
|
+
setTimeout(() => {
|
|
327
|
+
const containerItem = this._document.getElementById(`c_${this.componentKey}`);
|
|
328
|
+
var indexOfElementToFocus = value.length < this.config.length ? value.length : (this.config.length - 1);
|
|
329
|
+
let ele = containerItem.getElementsByClassName('cmat-otp-input')[indexOfElementToFocus];
|
|
330
|
+
if (ele?.focus) {
|
|
331
|
+
setTimeout(() => {
|
|
332
|
+
ele.focus();
|
|
333
|
+
}, 1);
|
|
334
|
+
}
|
|
335
|
+
}, 0);
|
|
336
|
+
}
|
|
337
|
+
this._rebuildValue();
|
|
338
|
+
}
|
|
339
|
+
handlePaste(e) {
|
|
340
|
+
// Get pasted data via clipboard API
|
|
341
|
+
let clipboardData = e.clipboardData || window['clipboardData'];
|
|
342
|
+
if (clipboardData) {
|
|
343
|
+
var pastedData = clipboardData.getData('Text');
|
|
344
|
+
}
|
|
345
|
+
e.stopPropagation();
|
|
346
|
+
e.preventDefault();
|
|
347
|
+
if (!pastedData || (this.config.allowNumbersOnly && !this.validateNumber(pastedData))) {
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
this.setValue(pastedData);
|
|
351
|
+
}
|
|
352
|
+
getFormControl(key) {
|
|
353
|
+
return this.otpForm.controls[key];
|
|
354
|
+
}
|
|
355
|
+
_getControlName(idx) {
|
|
356
|
+
return `ctrl_${idx}`;
|
|
357
|
+
}
|
|
358
|
+
_clearInput(eleId, inputIdx) {
|
|
359
|
+
let ctrlName = this._getControlName(inputIdx);
|
|
360
|
+
this.otpForm.controls[ctrlName]?.setValue(null);
|
|
361
|
+
if (eleId) {
|
|
362
|
+
const ele = this._document.getElementById(eleId);
|
|
363
|
+
if (ele && ele instanceof HTMLInputElement) {
|
|
364
|
+
ele.value = '';
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
_setSelected(eleId) {
|
|
369
|
+
this.focusTo(eleId);
|
|
370
|
+
const ele = this._document.getElementById(eleId);
|
|
371
|
+
if (ele?.setSelectionRange) {
|
|
372
|
+
setTimeout(() => {
|
|
373
|
+
ele.setSelectionRange(0, 1);
|
|
374
|
+
}, 0);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
ifValidKeyCode(event) {
|
|
378
|
+
const inp = event.key;
|
|
379
|
+
if (this.config?.allowNumbersOnly) {
|
|
380
|
+
return this.validateNumber(inp);
|
|
381
|
+
}
|
|
382
|
+
const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
|
|
383
|
+
return isMobile ||
|
|
384
|
+
(/^[a-zA-Z0-9%*_\-@#$!]$/.test(inp) && inp.length == 1);
|
|
385
|
+
}
|
|
386
|
+
_rebuildValue() {
|
|
387
|
+
let val = null;
|
|
388
|
+
ObjectUtil.keys(this.otpForm.controls).forEach((k) => {
|
|
389
|
+
let ctrlVal = this.otpForm.controls[k].value;
|
|
390
|
+
if (ctrlVal) {
|
|
391
|
+
let isLengthExceed = ctrlVal.length > 1;
|
|
392
|
+
let isCaseTransformEnabled = !this.config.allowNumbersOnly && this.config.letterCase && (this.config.letterCase.toLocaleLowerCase() == 'upper' || this.config.letterCase.toLocaleLowerCase() == 'lower');
|
|
393
|
+
ctrlVal = ctrlVal[0];
|
|
394
|
+
let transformedVal = isCaseTransformEnabled ? this.config.letterCase?.toLocaleLowerCase() == 'upper' ? ctrlVal.toUpperCase() : ctrlVal.toLowerCase() : ctrlVal;
|
|
395
|
+
if (isCaseTransformEnabled && transformedVal == ctrlVal) {
|
|
396
|
+
isCaseTransformEnabled = false;
|
|
397
|
+
}
|
|
398
|
+
else {
|
|
399
|
+
ctrlVal = transformedVal;
|
|
400
|
+
}
|
|
401
|
+
if (val == null) {
|
|
402
|
+
val = ctrlVal;
|
|
403
|
+
}
|
|
404
|
+
else {
|
|
405
|
+
val += ctrlVal;
|
|
406
|
+
}
|
|
407
|
+
if (isLengthExceed || isCaseTransformEnabled) {
|
|
408
|
+
this.otpForm.controls[k].setValue(ctrlVal);
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
});
|
|
412
|
+
if (this.currentVal != val) {
|
|
413
|
+
this.currentVal = val;
|
|
414
|
+
this._onModelChange(val);
|
|
415
|
+
this.onInputChange.next(val);
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CmatOtpInputComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: DOCUMENT }, { token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
419
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: CmatOtpInputComponent, isStandalone: true, selector: "cmat-otp-input", inputs: { id: "id", config: "config", placeholder: "placeholder", value: "value", required: "required", disabled: "disabled" }, outputs: { onBlur: "onBlur", onInputChange: "onInputChange" }, host: { properties: { "attr.id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: CmatOtpInputComponent }], exportAs: ["cmatOtpInput"], usesOnChanges: true, ngImport: i0, template: "@if(otpForm.controls){\r\n<div [attr.tabindex]=\"disabled ? -1 : 0\" class=\"cmat-otp-input-wrapper wrapper {{config.containerClass}}\"\r\n id=\"c_{{componentKey}}\" [ngStyle]=\"config.containerStyles\" (focusin)=\"onFocusIn()\" (focusout)=\"onFocusOut()\">\r\n <div class=\"n-o-c\">\r\n @for (item of controlKeys; track $index) {\r\n <input #inp autocomplete=\"one-time-code\" [pattern]=\"config.allowNumbersOnly ? '\\\\d*' : ''\" [type]=\"inputType\"\r\n [placeholder]=\"config.placeholder || ''\" [ngStyle]=\"config.inputStyles\"\r\n class=\"cmat-otp-input {{config.inputClass}}\" [id]=\"getBoxId($index)\"\r\n [ngClass]=\"{'error-input': (config.showError && errorState)}\"\r\n [formControl]=\"getFormControl(item)\" (paste)=\"handlePaste($event)\" (keyup)=\"onKeyUp($event,$index)\"\r\n (input)=\"onInput($event,$index)\" (keydown)=\"onKeyDown($event,$index)\">\r\n @if(config.separator && !$last){\r\n {{config.separator}}\r\n }\r\n }\r\n </div>\r\n</div>\r\n}", styles: [".cmat-otp-input{width:50px;height:50px;border-radius:4px;border:solid 1px;border-color:var(--cmat-text-hint);text-align:center;font-size:32px}.cmat-otp-input:focus{background-color:var(--cmat-divider);border:solid 2px var(--cmat-primary)}.cmat-otp-input-wrapper .cmat-otp-input{margin:0 .51rem}.cmat-otp-input-wrapper .cmat-otp-input:first-child{margin-left:0}.cmat-otp-input-wrapper .cmat-otp-input:last-child{margin-right:0}.n-o-c{display:flex;align-items:center}.error-input{border-color:var(--cmat-warn)}@media screen and (max-width: 767px){.cmat-otp-input{width:40px;font-size:24px;height:40px}}@media screen and (max-width: 420px){.cmat-otp-input{width:30px;font-size:18px;height:30px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
420
|
+
}
|
|
421
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CmatOtpInputComponent, decorators: [{
|
|
422
|
+
type: Component,
|
|
423
|
+
args: [{ selector: 'cmat-otp-input', exportAs: 'cmatOtpInput', imports: [CommonModule, ReactiveFormsModule], providers: [{ provide: MatFormFieldControl, useExisting: CmatOtpInputComponent }], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if(otpForm.controls){\r\n<div [attr.tabindex]=\"disabled ? -1 : 0\" class=\"cmat-otp-input-wrapper wrapper {{config.containerClass}}\"\r\n id=\"c_{{componentKey}}\" [ngStyle]=\"config.containerStyles\" (focusin)=\"onFocusIn()\" (focusout)=\"onFocusOut()\">\r\n <div class=\"n-o-c\">\r\n @for (item of controlKeys; track $index) {\r\n <input #inp autocomplete=\"one-time-code\" [pattern]=\"config.allowNumbersOnly ? '\\\\d*' : ''\" [type]=\"inputType\"\r\n [placeholder]=\"config.placeholder || ''\" [ngStyle]=\"config.inputStyles\"\r\n class=\"cmat-otp-input {{config.inputClass}}\" [id]=\"getBoxId($index)\"\r\n [ngClass]=\"{'error-input': (config.showError && errorState)}\"\r\n [formControl]=\"getFormControl(item)\" (paste)=\"handlePaste($event)\" (keyup)=\"onKeyUp($event,$index)\"\r\n (input)=\"onInput($event,$index)\" (keydown)=\"onKeyDown($event,$index)\">\r\n @if(config.separator && !$last){\r\n {{config.separator}}\r\n }\r\n }\r\n </div>\r\n</div>\r\n}", styles: [".cmat-otp-input{width:50px;height:50px;border-radius:4px;border:solid 1px;border-color:var(--cmat-text-hint);text-align:center;font-size:32px}.cmat-otp-input:focus{background-color:var(--cmat-divider);border:solid 2px var(--cmat-primary)}.cmat-otp-input-wrapper .cmat-otp-input{margin:0 .51rem}.cmat-otp-input-wrapper .cmat-otp-input:first-child{margin-left:0}.cmat-otp-input-wrapper .cmat-otp-input:last-child{margin-right:0}.n-o-c{display:flex;align-items:center}.error-input{border-color:var(--cmat-warn)}@media screen and (max-width: 767px){.cmat-otp-input{width:40px;font-size:24px;height:40px}}@media screen and (max-width: 420px){.cmat-otp-input{width:30px;font-size:18px;height:30px}}\n"] }]
|
|
424
|
+
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
425
|
+
type: Optional
|
|
426
|
+
}, {
|
|
427
|
+
type: Self
|
|
428
|
+
}] }, { type: Document, decorators: [{
|
|
429
|
+
type: Inject,
|
|
430
|
+
args: [DOCUMENT]
|
|
431
|
+
}] }, { type: i1.FormBuilder }], propDecorators: { id: [{
|
|
432
|
+
type: HostBinding,
|
|
433
|
+
args: ['attr.id']
|
|
434
|
+
}, {
|
|
435
|
+
type: Input
|
|
436
|
+
}], onBlur: [{
|
|
437
|
+
type: Output
|
|
438
|
+
}], onInputChange: [{
|
|
439
|
+
type: Output
|
|
440
|
+
}], config: [{
|
|
441
|
+
type: Input
|
|
442
|
+
}], placeholder: [{
|
|
443
|
+
type: Input
|
|
444
|
+
}], value: [{
|
|
445
|
+
type: Input
|
|
446
|
+
}], required: [{
|
|
447
|
+
type: Input
|
|
448
|
+
}], disabled: [{
|
|
449
|
+
type: Input
|
|
450
|
+
}] } });
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* Generated bundle index. Do not edit.
|
|
454
|
+
*/
|
|
455
|
+
|
|
456
|
+
export { CmatOtpInputComponent };
|
|
457
|
+
//# sourceMappingURL=cmat-components-opt-input.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cmat-components-opt-input.mjs","sources":["../../../projects/cmat/components/opt-input/utils/keyboard-util.ts","../../../projects/cmat/components/opt-input/utils/object-util.ts","../../../projects/cmat/components/opt-input/otp-input.component.ts","../../../projects/cmat/components/opt-input/otp-input.component.html","../../../projects/cmat/components/opt-input/cmat-components-opt-input.ts"],"sourcesContent":["export class KeyboardUtil {\r\n static ifTab(event: KeyboardEvent): boolean {\r\n return this.ifKey(event, 'Tab');\r\n }\r\n static ifDelete(event: KeyboardEvent): boolean {\r\n return this.ifKey(event, 'Delete;Del');\r\n }\r\n static ifBackspace(event: KeyboardEvent): boolean {\r\n return this.ifKey(event, 'Backspace');\r\n }\r\n static ifRightArrow(event: KeyboardEvent): boolean {\r\n return this.ifKey(event, 'ArrowRight;Right')\r\n }\r\n static ifLeftArrow(event: KeyboardEvent): boolean {\r\n return this.ifKey(event, 'ArrowLeft;Left')\r\n }\r\n static ifSpacebar(event: KeyboardEvent): boolean {\r\n return this.ifKey(event, 'Spacebar; ')//don't remove the space after ; as this will check for space key\r\n }\r\n static ifKey(event: KeyboardEvent, keys: string): boolean {\r\n let keysToCheck = keys.split(';');\r\n return keysToCheck.some(k => k === event.key);\r\n }\r\n}\r\n","export class ObjectUtil{\r\n static keys(obj:any):string[]{\r\n if(!obj) return [];\r\n return Object.keys(obj);\r\n }\r\n}\r\n","/* eslint-disable @angular-eslint/no-output-on-prefix */\r\n/* eslint-disable @typescript-eslint/member-ordering */\r\nimport { coerceBooleanProperty, BooleanInput } from '@angular/cdk/coercion';\r\nimport { CommonModule, DOCUMENT } from '@angular/common';\r\nimport {\r\n Component,\r\n Input,\r\n Output,\r\n AfterViewInit,\r\n Inject,\r\n OnDestroy,\r\n OnChanges,\r\n SimpleChanges,\r\n ChangeDetectionStrategy,\r\n ViewEncapsulation,\r\n Optional,\r\n Self,\r\n HostBinding\r\n} from '@angular/core';\r\nimport { FormControl, ReactiveFormsModule, ControlValueAccessor, FormBuilder, UntypedFormGroup, NgControl } from '@angular/forms';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { isNil } from 'lodash';\r\nimport { Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { OptInputConfig } from './models/config';\r\nimport { KeyboardUtil } from './utils/keyboard-util';\r\nimport { ObjectUtil } from './utils/object-util';\r\n\r\nlet NEXT_ID = 0;\r\n\r\n@Component({\r\n selector: 'cmat-otp-input',\r\n templateUrl: './otp-input.component.html',\r\n styleUrls: ['./otp-input.component.scss'],\r\n exportAs: 'cmatOtpInput',\r\n imports: [CommonModule, ReactiveFormsModule],\r\n providers: [{ provide: MatFormFieldControl, useExisting: CmatOtpInputComponent }],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class CmatOtpInputComponent implements MatFormFieldControl<any>, AfterViewInit, OnDestroy, OnChanges, ControlValueAccessor {\r\n @HostBinding('attr.id')\r\n @Input()\r\n public id = `cmat-otp-input-${NEXT_ID++}`;\r\n\r\n @Output() onBlur = new Subject<void>();\r\n @Output() onInputChange = new Subject<string | null>();\r\n @Input() config: OptInputConfig = { length: 4 };\r\n\r\n otpForm: UntypedFormGroup;\r\n currentVal: string | null;\r\n\r\n componentKey = Math.random()\r\n .toString(36)\r\n .substring(2) + new Date().getTime().toString(36);\r\n\r\n readonly stateChanges: Subject<void> = new Subject<void>();\r\n focused: boolean = false;\r\n private _unsubscribeAll: Subject<void> = new Subject<void>();\r\n private _activeFocusCount = 0;\r\n\r\n constructor(@Optional() @Self() public ngControl: NgControl, @Inject(DOCUMENT) private _document: Document, private _formBuilder: FormBuilder) {\r\n this.otpForm = this._formBuilder.group({});\r\n\r\n if (this.ngControl != null) {\r\n this.ngControl.valueAccessor = this;\r\n }\r\n }\r\n\r\n get inputType(): string {\r\n return this.config?.isPasswordInput\r\n ? 'password'\r\n : this.config?.allowNumbersOnly\r\n ? 'tel'\r\n : 'text';\r\n }\r\n get controlKeys(): string[] { return ObjectUtil.keys(this.otpForm?.controls) };\r\n\r\n get errorState(): boolean {\r\n if (this.ngControl == null)\r\n return false;\r\n\r\n return (this.ngControl.invalid && ((this.ngControl.dirty ?? false) || this.ngControl.touched)) ?? false;\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.config) {\r\n if (this.config.length !== ((this.otpForm?.controls as any).length ?? 0)) {\r\n this.otpForm = this._formBuilder.group({});\r\n for (let index = 0; index < this.config.length; index++) {\r\n this.otpForm.addControl(this._getControlName(index), new FormControl());\r\n }\r\n this.otpForm.valueChanges.pipe(takeUntil(this._unsubscribeAll)).subscribe(() => {\r\n ObjectUtil.keys(this.otpForm.controls).forEach((k) => {\r\n var val = this.otpForm.controls[k].value;\r\n if (val && val.length > 1) {\r\n if (val.length >= this.config.length) {\r\n this.setValue(val);\r\n } else {\r\n this._rebuildValue();\r\n }\r\n }\r\n });\r\n });\r\n }\r\n }\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n if (this.otpForm) {\r\n if (isDisabled) {\r\n this.otpForm.disable({ emitEvent: false });\r\n } else {\r\n this.otpForm.enable({ emitEvent: false });\r\n }\r\n }\r\n }\r\n writeValue(value: string): void {\r\n this.currentVal = value || null;\r\n if (this.otpForm && this.currentVal) {\r\n this.setValue(this.currentVal);\r\n }\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 onFocusIn(): void {\r\n this._onTouchedChange();\r\n this._activeFocusCount++;\r\n\r\n if (!this.focused) {\r\n this.focused = true;\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n onFocusOut(): void {\r\n setTimeout(() => {\r\n this._activeFocusCount--;\r\n if (this._activeFocusCount === 0) {\r\n this.focused = false;\r\n this._onTouchedChange();\r\n this.onBlur.next();\r\n this.stateChanges.next();\r\n }\r\n }, 0);\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n if (!this.config.disableAutoFocus) {\r\n const containerItem = this._document.getElementById(`c_${this.componentKey}`);\r\n if (containerItem) {\r\n const ele: any = containerItem.getElementsByClassName('cmat-otp-input')[0];\r\n if (ele?.focus) {\r\n ele.focus();\r\n }\r\n }\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.stateChanges.complete();\r\n this._unsubscribeAll.next(void 0);\r\n this._unsubscribeAll.complete();\r\n }\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(): any {\r\n return this._value;\r\n }\r\n set value(value: any) {\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: any;\r\n\r\n get empty(): boolean {\r\n return !this._value;\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: any) {\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 this.setDisabledState(this._disabled);\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 setDescribedByIds(ids: string[]): void {\r\n const containerItem = this._document.getElementById(`c_${this.componentKey}`);\r\n\r\n if (containerItem) {\r\n if (ids.length) {\r\n containerItem.setAttribute('aria-describedby', ids.join(' '));\r\n } else {\r\n containerItem.removeAttribute('aria-describedby');\r\n }\r\n }\r\n }\r\n\r\n onContainerClick(): void {\r\n const containerItem = this._document.getElementById(`c_${this.componentKey}`);\r\n\r\n if (!this.focused && containerItem) {\r\n containerItem.focus();\r\n }\r\n }\r\n\r\n onKeyDown($event: any, inputIdx: number): any {\r\n const prevInputId = this.getBoxId(inputIdx - 1);\r\n const currentInputId = this.getBoxId(inputIdx);\r\n const nextInputId = this.getBoxId(inputIdx + 1);\r\n if (KeyboardUtil.ifSpacebar($event)) {\r\n $event.preventDefault();\r\n return false;\r\n }\r\n if (KeyboardUtil.ifBackspace($event)) {\r\n if (!$event.target.value) {\r\n this._clearInput(prevInputId, inputIdx - 1);\r\n this._setSelected(prevInputId);\r\n } else {\r\n this._clearInput(currentInputId, inputIdx);\r\n }\r\n this._rebuildValue();\r\n return;\r\n }\r\n if (KeyboardUtil.ifDelete($event)) {\r\n if (!$event.target.value) {\r\n this._clearInput(prevInputId, inputIdx - 1);\r\n this._setSelected(prevInputId);\r\n } else {\r\n this._clearInput(currentInputId, inputIdx);\r\n }\r\n this._rebuildValue();\r\n return;\r\n }\r\n if (this.ifValidKeyCode($event)) {\r\n $event.target.value = $event.key;\r\n let ctrlName = this._getControlName(inputIdx);\r\n this.otpForm.controls[ctrlName]?.setValue($event.key);\r\n $event.preventDefault();\r\n this._setSelected(nextInputId);\r\n this._rebuildValue();\r\n }\r\n }\r\n onInput($event: any, inputIdx: number): void {\r\n let newVal = this.currentVal ? `${this.currentVal}${$event.target.value}` : $event.target.value;\r\n if (this.config.allowNumbersOnly && !this.validateNumber(newVal)) {\r\n $event.target.value = null;\r\n $event.stopPropagation();\r\n $event.preventDefault();\r\n this._clearInput(null, inputIdx);\r\n }\r\n }\r\n\r\n\r\n onKeyUp($event: any, inputIdx: number): void {\r\n if (KeyboardUtil.ifTab($event)) {\r\n inputIdx -= 1;\r\n }\r\n const nextInputId = this.getBoxId(inputIdx + 1);\r\n const prevInputId = this.getBoxId(inputIdx - 1);\r\n if (KeyboardUtil.ifRightArrow($event)) {\r\n $event.preventDefault();\r\n this._setSelected(nextInputId);\r\n return;\r\n }\r\n if (KeyboardUtil.ifLeftArrow($event)) {\r\n $event.preventDefault();\r\n this._setSelected(prevInputId);\r\n return;\r\n }\r\n\r\n if (!$event.target.value) {\r\n return;\r\n }\r\n }\r\n\r\n validateNumber(val: string): boolean | string {\r\n return val && /^[0-9]+$/.test(val);\r\n }\r\n\r\n getBoxId(idx: string | number): string {\r\n return `otp_${idx}_${this.componentKey}`;\r\n }\r\n\r\n focusTo(eleId: string): void {\r\n const ele: any = this._document.getElementById(eleId);\r\n if (ele) {\r\n ele.focus();\r\n }\r\n }\r\n\r\n setValue(value: any): void {\r\n if (this.config.allowNumbersOnly && isNaN(value)) {\r\n return;\r\n }\r\n this.otpForm.reset();\r\n if (!value) {\r\n this._rebuildValue();\r\n return;\r\n }\r\n value = value.toString().replace(/\\s/g, ''); // remove whitespace\r\n Array.from(value).forEach((c, idx) => {\r\n if (this.otpForm.get(this._getControlName(idx))) {\r\n this.otpForm.get(this._getControlName(idx))!.setValue(c);\r\n }\r\n });\r\n if (!this.config.disableAutoFocus) {\r\n setTimeout(() => {\r\n const containerItem = this._document.getElementById(`c_${this.componentKey}`);\r\n var indexOfElementToFocus = value.length < this.config.length ? value.length : (this.config.length - 1);\r\n let ele: any = containerItem!.getElementsByClassName('cmat-otp-input')[indexOfElementToFocus];\r\n if (ele?.focus) {\r\n setTimeout(() => {\r\n ele.focus();\r\n }, 1);\r\n }\r\n }, 0);\r\n\r\n }\r\n this._rebuildValue();\r\n }\r\n\r\n handlePaste(e: any): void {\r\n // Get pasted data via clipboard API\r\n let clipboardData = e.clipboardData || (window as any)['clipboardData'];\r\n if (clipboardData) {\r\n var pastedData = clipboardData.getData('Text');\r\n }\r\n e.stopPropagation();\r\n e.preventDefault();\r\n if (!pastedData || (this.config.allowNumbersOnly && !this.validateNumber(pastedData))) {\r\n return;\r\n }\r\n this.setValue(pastedData);\r\n }\r\n\r\n getFormControl(key: string): FormControl {\r\n return this.otpForm.controls[key] as FormControl;\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\r\n private _getControlName(idx: number): string {\r\n return `ctrl_${idx}`;\r\n }\r\n\r\n private _clearInput(eleId: string | null, inputIdx: number): void {\r\n let ctrlName = this._getControlName(inputIdx);\r\n this.otpForm.controls[ctrlName]?.setValue(null);\r\n if (eleId) {\r\n const ele = this._document.getElementById(eleId);\r\n if (ele && ele instanceof HTMLInputElement) {\r\n ele.value = '';\r\n }\r\n }\r\n }\r\n\r\n private _setSelected(eleId: string): void {\r\n this.focusTo(eleId);\r\n const ele: any = this._document.getElementById(eleId);\r\n if (ele?.setSelectionRange) {\r\n setTimeout(() => {\r\n ele.setSelectionRange(0, 1);\r\n }, 0);\r\n }\r\n }\r\n\r\n private ifValidKeyCode(event: any): boolean | string {\r\n const inp = event.key;\r\n if (this.config?.allowNumbersOnly) {\r\n return this.validateNumber(inp);\r\n }\r\n const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);\r\n return isMobile ||\r\n (/^[a-zA-Z0-9%*_\\-@#$!]$/.test(inp) && inp.length == 1);\r\n }\r\n\r\n\r\n private _rebuildValue(): void {\r\n let val: string | null = null;\r\n ObjectUtil.keys(this.otpForm.controls).forEach((k) => {\r\n let ctrlVal = this.otpForm.controls[k].value;\r\n if (ctrlVal) {\r\n let isLengthExceed = ctrlVal.length > 1;\r\n let isCaseTransformEnabled = !this.config.allowNumbersOnly && this.config.letterCase && (this.config.letterCase.toLocaleLowerCase() == 'upper' || this.config.letterCase.toLocaleLowerCase() == 'lower');\r\n ctrlVal = ctrlVal[0];\r\n let transformedVal = isCaseTransformEnabled ? this.config.letterCase?.toLocaleLowerCase() == 'upper' ? ctrlVal.toUpperCase() : ctrlVal.toLowerCase() : ctrlVal;\r\n if (isCaseTransformEnabled && transformedVal == ctrlVal) {\r\n isCaseTransformEnabled = false;\r\n } else {\r\n ctrlVal = transformedVal;\r\n }\r\n if (val == null) {\r\n val = ctrlVal;\r\n } else {\r\n val += ctrlVal;\r\n }\r\n if (isLengthExceed || isCaseTransformEnabled) {\r\n this.otpForm.controls[k].setValue(ctrlVal);\r\n }\r\n }\r\n });\r\n if (this.currentVal != val) {\r\n this.currentVal = val;\r\n this._onModelChange(val);\r\n\r\n this.onInputChange.next(val);\r\n }\r\n }\r\n}\r\n\r\n","@if(otpForm.controls){\r\n<div [attr.tabindex]=\"disabled ? -1 : 0\" class=\"cmat-otp-input-wrapper wrapper {{config.containerClass}}\"\r\n id=\"c_{{componentKey}}\" [ngStyle]=\"config.containerStyles\" (focusin)=\"onFocusIn()\" (focusout)=\"onFocusOut()\">\r\n <div class=\"n-o-c\">\r\n @for (item of controlKeys; track $index) {\r\n <input #inp autocomplete=\"one-time-code\" [pattern]=\"config.allowNumbersOnly ? '\\\\d*' : ''\" [type]=\"inputType\"\r\n [placeholder]=\"config.placeholder || ''\" [ngStyle]=\"config.inputStyles\"\r\n class=\"cmat-otp-input {{config.inputClass}}\" [id]=\"getBoxId($index)\"\r\n [ngClass]=\"{'error-input': (config.showError && errorState)}\"\r\n [formControl]=\"getFormControl(item)\" (paste)=\"handlePaste($event)\" (keyup)=\"onKeyUp($event,$index)\"\r\n (input)=\"onInput($event,$index)\" (keydown)=\"onKeyDown($event,$index)\">\r\n @if(config.separator && !$last){\r\n {{config.separator}}\r\n }\r\n }\r\n </div>\r\n</div>\r\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAAa,YAAY,CAAA;IACrB,OAAO,KAAK,CAAC,KAAoB,EAAA;QAC7B,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC;;IAEnC,OAAO,QAAQ,CAAC,KAAoB,EAAA;QAChC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,YAAY,CAAC;;IAE1C,OAAO,WAAW,CAAC,KAAoB,EAAA;QACnC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,WAAW,CAAC;;IAEzC,OAAO,YAAY,CAAC,KAAoB,EAAA;QACpC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,kBAAkB,CAAC;;IAEhD,OAAO,WAAW,CAAC,KAAoB,EAAA;QACnC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,gBAAgB,CAAC;;IAE9C,OAAO,UAAU,CAAC,KAAoB,EAAA;QAClC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,YAAY,CAAC,CAAA;;AAE1C,IAAA,OAAO,KAAK,CAAC,KAAoB,EAAE,IAAY,EAAA;QAC3C,IAAI,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;AACjC,QAAA,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,K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