cmat 0.0.28 → 0.0.30
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/animations/index.d.ts +5 -5
- package/components/adapter/index.d.ts +187 -5
- package/components/breadcrumb/index.d.ts +243 -3
- package/components/card/index.d.ts +20 -5
- package/components/carousel/index.d.ts +175 -5
- package/components/cascade/index.d.ts +101 -5
- package/components/chip-input/index.d.ts +65 -5
- package/components/custom-formly/index.d.ts +669 -5
- package/components/date-range/index.d.ts +139 -5
- package/components/drawer/index.d.ts +101 -5
- package/components/fullscreen/index.d.ts +13 -5
- package/components/highlight/index.d.ts +28 -5
- package/components/image-viewer/index.d.ts +78 -5
- package/components/json-editor/index.d.ts +27 -5
- package/components/knob-input/index.d.ts +98 -5
- package/components/masonry/index.d.ts +16 -5
- package/components/material-color-picker/index.d.ts +46 -5
- package/components/material-datetimepicker/index.d.ts +752 -3
- package/components/navigation/index.d.ts +314 -5
- package/components/opt-input/index.d.ts +87 -5
- package/components/org-chart/index.d.ts +38 -5
- package/components/pagination/index.d.ts +119 -5
- package/components/password-strength/index.d.ts +92 -5
- package/components/popover/index.d.ts +289 -3
- package/components/progress-bar/index.d.ts +19 -5
- package/components/rating/index.d.ts +61 -5
- package/components/select-search/index.d.ts +108 -5
- package/components/select-table/index.d.ts +120 -5
- package/components/select-tree/index.d.ts +120 -5
- package/components/speed-dial/index.d.ts +66 -5
- package/components/timeline/index.d.ts +56 -5
- package/components/toast/index.d.ts +84 -5
- package/components/transfer-picker/index.d.ts +188 -3
- package/components/treetable/index.d.ts +43 -5
- package/components/upload/index.d.ts +111 -5
- package/components/x6-angular-shape/index.d.ts +43 -5
- package/directives/animate-on-scroll/index.d.ts +30 -5
- package/directives/arrow-cursor/index.d.ts +32 -5
- package/directives/autofocus/index.d.ts +11 -5
- package/directives/data-exporter/index.d.ts +41 -5
- package/directives/debounce/index.d.ts +32 -5
- package/directives/digit-only/index.d.ts +54 -5
- package/directives/equal-validator/index.d.ts +14 -5
- package/fesm2022/cmat-components-adapter.mjs +22 -39
- package/fesm2022/cmat-components-adapter.mjs.map +1 -1
- package/fesm2022/cmat-components-breadcrumb.mjs +19 -21
- package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/cmat-components-card.mjs +3 -3
- package/fesm2022/cmat-components-carousel.mjs +116 -133
- package/fesm2022/cmat-components-carousel.mjs.map +1 -1
- package/fesm2022/cmat-components-cascade.mjs +61 -73
- package/fesm2022/cmat-components-cascade.mjs.map +1 -1
- package/fesm2022/cmat-components-chip-input.mjs +14 -18
- package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
- package/fesm2022/cmat-components-custom-formly.mjs +176 -178
- package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
- package/fesm2022/cmat-components-date-range.mjs +18 -18
- package/fesm2022/cmat-components-date-range.mjs.map +1 -1
- package/fesm2022/cmat-components-drawer.mjs +17 -19
- package/fesm2022/cmat-components-drawer.mjs.map +1 -1
- package/fesm2022/cmat-components-fullscreen.mjs +8 -11
- package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
- package/fesm2022/cmat-components-highlight.mjs +14 -14
- package/fesm2022/cmat-components-highlight.mjs.map +1 -1
- package/fesm2022/cmat-components-image-viewer.mjs +10 -13
- package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
- package/fesm2022/cmat-components-json-editor.mjs +7 -7
- package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-knob-input.mjs +13 -20
- package/fesm2022/cmat-components-knob-input.mjs.map +1 -1
- package/fesm2022/cmat-components-masonry.mjs +3 -3
- package/fesm2022/cmat-components-material-color-picker.mjs +8 -7
- package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-material-datetimepicker.mjs +168 -220
- package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
- package/fesm2022/cmat-components-navigation.mjs +115 -119
- package/fesm2022/cmat-components-navigation.mjs.map +1 -1
- package/fesm2022/cmat-components-opt-input.mjs +15 -22
- package/fesm2022/cmat-components-opt-input.mjs.map +1 -1
- package/fesm2022/cmat-components-org-chart.mjs +9 -9
- package/fesm2022/cmat-components-org-chart.mjs.map +1 -1
- package/fesm2022/cmat-components-pagination.mjs +34 -40
- package/fesm2022/cmat-components-pagination.mjs.map +1 -1
- package/fesm2022/cmat-components-password-strength.mjs +15 -15
- package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
- package/fesm2022/cmat-components-popover.mjs +27 -32
- package/fesm2022/cmat-components-popover.mjs.map +1 -1
- package/fesm2022/cmat-components-progress-bar.mjs +10 -10
- package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
- package/fesm2022/cmat-components-rating.mjs +10 -14
- package/fesm2022/cmat-components-rating.mjs.map +1 -1
- package/fesm2022/cmat-components-select-search.mjs +30 -53
- package/fesm2022/cmat-components-select-search.mjs.map +1 -1
- package/fesm2022/cmat-components-select-table.mjs +28 -33
- package/fesm2022/cmat-components-select-table.mjs.map +1 -1
- package/fesm2022/cmat-components-select-tree.mjs +55 -61
- package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
- package/fesm2022/cmat-components-speed-dial.mjs +16 -19
- package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
- package/fesm2022/cmat-components-timeline.mjs +18 -20
- package/fesm2022/cmat-components-timeline.mjs.map +1 -1
- package/fesm2022/cmat-components-toast.mjs +16 -16
- package/fesm2022/cmat-components-toast.mjs.map +1 -1
- package/fesm2022/cmat-components-transfer-picker.mjs +49 -49
- package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-treetable.mjs +11 -12
- package/fesm2022/cmat-components-treetable.mjs.map +1 -1
- package/fesm2022/cmat-components-upload.mjs +33 -34
- package/fesm2022/cmat-components-upload.mjs.map +1 -1
- package/fesm2022/cmat-directives-animate-on-scroll.mjs +13 -14
- package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
- package/fesm2022/cmat-directives-arrow-cursor.mjs +11 -15
- package/fesm2022/cmat-directives-arrow-cursor.mjs.map +1 -1
- package/fesm2022/cmat-directives-autofocus.mjs +8 -9
- package/fesm2022/cmat-directives-autofocus.mjs.map +1 -1
- package/fesm2022/cmat-directives-data-exporter.mjs +29 -31
- package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -1
- package/fesm2022/cmat-directives-debounce.mjs +11 -13
- package/fesm2022/cmat-directives-debounce.mjs.map +1 -1
- package/fesm2022/cmat-directives-digit-only.mjs +17 -17
- package/fesm2022/cmat-directives-digit-only.mjs.map +1 -1
- package/fesm2022/cmat-directives-equal-validator.mjs +9 -16
- package/fesm2022/cmat-directives-equal-validator.mjs.map +1 -1
- package/fesm2022/cmat-lib-mock-api.mjs +11 -14
- package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
- package/fesm2022/cmat-pipes-bytes.mjs +4 -5
- package/fesm2022/cmat-pipes-bytes.mjs.map +1 -1
- package/fesm2022/cmat-pipes-date-format.mjs +4 -5
- package/fesm2022/cmat-pipes-date-format.mjs.map +1 -1
- package/fesm2022/cmat-pipes-find-by-key.mjs +4 -5
- package/fesm2022/cmat-pipes-find-by-key.mjs.map +1 -1
- package/fesm2022/cmat-pipes-group-by.mjs +4 -5
- package/fesm2022/cmat-pipes-group-by.mjs.map +1 -1
- package/fesm2022/cmat-pipes-keys.mjs +4 -5
- package/fesm2022/cmat-pipes-keys.mjs.map +1 -1
- package/fesm2022/cmat-pipes-secure.mjs +13 -14
- package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
- package/fesm2022/cmat-pipes-uppercase.mjs +4 -5
- package/fesm2022/cmat-pipes-uppercase.mjs.map +1 -1
- package/fesm2022/cmat-services-alert.mjs +7 -16
- package/fesm2022/cmat-services-alert.mjs.map +1 -1
- package/fesm2022/cmat-services-config.mjs +10 -12
- package/fesm2022/cmat-services-config.mjs.map +1 -1
- package/fesm2022/cmat-services-confirmation.mjs +17 -20
- package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
- package/fesm2022/cmat-services-data.mjs +10 -11
- package/fesm2022/cmat-services-data.mjs.map +1 -1
- package/fesm2022/cmat-services-export-as.mjs +3 -3
- package/fesm2022/cmat-services-loading.mjs +14 -14
- package/fesm2022/cmat-services-loading.mjs.map +1 -1
- package/fesm2022/cmat-services-local-storage.mjs +3 -3
- package/fesm2022/cmat-services-media-watcher.mjs +10 -10
- package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
- package/fesm2022/cmat-services-platform.mjs +8 -8
- package/fesm2022/cmat-services-platform.mjs.map +1 -1
- package/fesm2022/cmat-services-splash-screen.mjs +9 -14
- package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
- package/fesm2022/cmat-services-title.mjs +10 -11
- package/fesm2022/cmat-services-title.mjs.map +1 -1
- package/fesm2022/cmat-services-translation.mjs +8 -8
- package/fesm2022/cmat-services-translation.mjs.map +1 -1
- package/fesm2022/cmat-services-utils.mjs +5 -5
- package/fesm2022/cmat-services-utils.mjs.map +1 -1
- package/index.d.ts +2 -5
- package/lib/mock-api/index.d.ts +60 -5
- package/package.json +71 -71
- package/pipes/bytes/index.d.ts +10 -5
- package/pipes/date-format/index.d.ts +10 -5
- package/pipes/find-by-key/index.d.ts +10 -5
- package/pipes/group-by/index.d.ts +10 -5
- package/pipes/keys/index.d.ts +10 -5
- package/pipes/secure/index.d.ts +19 -5
- package/pipes/uppercase/index.d.ts +10 -5
- package/services/alert/index.d.ts +69 -5
- package/services/config/index.d.ts +30 -5
- package/services/confirmation/index.d.ts +42 -5
- package/services/data/index.d.ts +21 -5
- package/services/export-as/index.d.ts +55 -5
- package/services/loading/index.d.ts +35 -5
- package/services/local-storage/index.d.ts +11 -5
- package/services/media-watcher/index.d.ts +22 -5
- package/services/platform/index.d.ts +11 -5
- package/services/splash-screen/index.d.ts +16 -5
- package/services/title/index.d.ts +14 -5
- package/services/translation/index.d.ts +22 -5
- package/services/utils/index.d.ts +63 -5
- package/styles/themes.scss +2 -1
- package/validators/index.d.ts +8 -5
- package/version/index.d.ts +11 -5
- package/animations/defaults.d.ts +0 -11
- package/animations/dropdown.d.ts +0 -2
- package/animations/expand-collapse.d.ts +0 -2
- package/animations/fade.d.ts +0 -11
- package/animations/public-api.d.ts +0 -1
- package/animations/shake.d.ts +0 -2
- package/animations/slide.d.ts +0 -9
- package/animations/transform.d.ts +0 -2
- package/animations/zoom.d.ts +0 -3
- package/components/adapter/datetime-adapter.d.ts +0 -45
- package/components/adapter/datetime-formats.d.ts +0 -22
- package/components/adapter/dayjs-date-adapter.d.ts +0 -63
- package/components/adapter/dayjs-date-formats.d.ts +0 -2
- package/components/adapter/dayjs-datetime-adapter.d.ts +0 -22
- package/components/adapter/dayjs-datetime-formats.d.ts +0 -2
- package/components/adapter/native-datetime-adapter.d.ts +0 -31
- package/components/adapter/native-datetime-formats.d.ts +0 -2
- package/components/adapter/public-api.d.ts +0 -8
- package/components/breadcrumb/breadcrumb-item.directive.d.ts +0 -10
- package/components/breadcrumb/breadcrumb.component.d.ts +0 -55
- package/components/breadcrumb/breadcrumb.service.d.ts +0 -126
- package/components/breadcrumb/public-api.d.ts +0 -5
- package/components/breadcrumb/types/breadcrumb.config.d.ts +0 -33
- package/components/breadcrumb/types/breadcrumb.d.ts +0 -23
- package/components/card/card.component.d.ts +0 -15
- package/components/card/card.types.d.ts +0 -1
- package/components/card/public-api.d.ts +0 -2
- package/components/carousel/carousel.component.d.ts +0 -136
- package/components/carousel/carousel.interface.d.ts +0 -38
- package/components/carousel/public-api.d.ts +0 -2
- package/components/cascade/cascade-bottom-sheet/cascade-bottom-sheet.component.d.ts +0 -13
- package/components/cascade/cascade-list/cascade-list.component.d.ts +0 -79
- package/components/cascade/cascade-menu/cascade-menu.component.d.ts +0 -8
- package/components/cascade/options.interface.d.ts +0 -8
- package/components/cascade/public-api.d.ts +0 -3
- package/components/chip-input/chip-input.component.d.ts +0 -62
- package/components/chip-input/public-api.d.ts +0 -1
- package/components/custom-formly/extension/addons.extension.d.ts +0 -2
- package/components/custom-formly/public-api.d.ts +0 -30
- package/components/custom-formly/types/button/button.component.d.ts +0 -34
- package/components/custom-formly/types/cascade/cascade.component.d.ts +0 -39
- package/components/custom-formly/types/checklist/checklist.component.d.ts +0 -42
- package/components/custom-formly/types/chips/chips.component.d.ts +0 -28
- package/components/custom-formly/types/color-picker/color-picker.component.d.ts +0 -7
- package/components/custom-formly/types/date-range/date-range.component.d.ts +0 -21
- package/components/custom-formly/types/datepicker/datepicker.component.d.ts +0 -42
- package/components/custom-formly/types/knob/knob.component.d.ts +0 -36
- package/components/custom-formly/types/multicheckbox/multicheckbox.component.d.ts +0 -44
- package/components/custom-formly/types/number/number.component.d.ts +0 -21
- package/components/custom-formly/types/quill/quill.component.d.ts +0 -43
- package/components/custom-formly/types/radio/radio.component.d.ts +0 -44
- package/components/custom-formly/types/rating/rating.component.d.ts +0 -25
- package/components/custom-formly/types/repeat/repeat.component.d.ts +0 -16
- package/components/custom-formly/types/select/select.component.d.ts +0 -54
- package/components/custom-formly/types/select-table/select-table.component.d.ts +0 -40
- package/components/custom-formly/types/select-tree/select-tree.component.d.ts +0 -43
- package/components/custom-formly/types/stepper/horizontal/stepper.component.d.ts +0 -8
- package/components/custom-formly/types/stepper/stepper.type.d.ts +0 -6
- package/components/custom-formly/types/stepper/vertical/stepper.component.d.ts +0 -8
- package/components/custom-formly/types/table/table.component.d.ts +0 -43
- package/components/custom-formly/types/tabs/tab.component.d.ts +0 -7
- package/components/custom-formly/types/tags/tags.component.d.ts +0 -41
- package/components/custom-formly/types/textarea/textarea.component.d.ts +0 -13
- package/components/custom-formly/types/upload/upload.component.d.ts +0 -32
- package/components/custom-formly/wrappers/addons/addons.component.d.ts +0 -10
- package/components/custom-formly/wrappers/card/card.component.d.ts +0 -6
- package/components/custom-formly/wrappers/expansion/expansion.component.d.ts +0 -6
- package/components/custom-formly/wrappers/form-field/form-field.component.d.ts +0 -25
- package/components/custom-formly/wrappers/panel/panel.component.d.ts +0 -6
- package/components/date-range/date-range.component.d.ts +0 -137
- package/components/date-range/public-api.d.ts +0 -1
- package/components/drawer/drawer.component.d.ts +0 -75
- package/components/drawer/drawer.service.d.ts +0 -26
- package/components/drawer/drawer.types.d.ts +0 -2
- package/components/drawer/public-api.d.ts +0 -3
- package/components/fullscreen/fullscreen.component.d.ts +0 -11
- package/components/fullscreen/public-api.d.ts +0 -1
- package/components/highlight/highlight.component.d.ts +0 -21
- package/components/highlight/highlight.service.d.ts +0 -7
- package/components/highlight/public-api.d.ts +0 -2
- package/components/image-viewer/image-viewer.component.d.ts +0 -76
- package/components/image-viewer/public-api.d.ts +0 -1
- package/components/json-editor/json-editor.component.d.ts +0 -25
- package/components/json-editor/public-api.d.ts +0 -1
- package/components/knob-input/knob-input.component.d.ts +0 -95
- package/components/knob-input/public-api.d.ts +0 -1
- package/components/masonry/masonry.component.d.ts +0 -13
- package/components/masonry/public-api.d.ts +0 -1
- package/components/material-color-picker/base-color.d.ts +0 -2
- package/components/material-color-picker/material-color-picker.component.d.ts +0 -38
- package/components/material-color-picker/public-api.d.ts +0 -2
- package/components/material-color-picker/selected-color.d.ts +0 -5
- package/components/material-datetimepicker/calendar-body.d.ts +0 -42
- package/components/material-datetimepicker/calendar.d.ts +0 -145
- package/components/material-datetimepicker/clock.d.ts +0 -73
- package/components/material-datetimepicker/datetimepicker-animations.d.ts +0 -4
- package/components/material-datetimepicker/datetimepicker-errors.d.ts +0 -1
- package/components/material-datetimepicker/datetimepicker-filtertype.d.ts +0 -5
- package/components/material-datetimepicker/datetimepicker-input.d.ts +0 -106
- package/components/material-datetimepicker/datetimepicker-intl.d.ts +0 -51
- package/components/material-datetimepicker/datetimepicker-toggle.d.ts +0 -40
- package/components/material-datetimepicker/datetimepicker-types.d.ts +0 -13
- package/components/material-datetimepicker/datetimepicker.d.ts +0 -190
- package/components/material-datetimepicker/month-view.d.ts +0 -62
- package/components/material-datetimepicker/multi-year-view.d.ts +0 -74
- package/components/material-datetimepicker/public-api.d.ts +0 -10
- package/components/material-datetimepicker/time.d.ts +0 -129
- package/components/material-datetimepicker/year-view.d.ts +0 -56
- package/components/navigation/horizontal/components/basic/basic.component.d.ts +0 -27
- package/components/navigation/horizontal/components/branch/branch.component.d.ts +0 -39
- package/components/navigation/horizontal/components/divider/divider.component.d.ts +0 -23
- package/components/navigation/horizontal/components/spacer/spacer.component.d.ts +0 -23
- package/components/navigation/horizontal/horizontal.component.d.ts +0 -43
- package/components/navigation/navigation.service.d.ts +0 -71
- package/components/navigation/navigation.types.d.ts +0 -34
- package/components/navigation/public-api.d.ts +0 -4
- package/components/navigation/vertical/components/aside/aside.component.d.ts +0 -63
- package/components/navigation/vertical/components/basic/basic.component.d.ts +0 -24
- package/components/navigation/vertical/components/collapsable/collapsable.component.d.ts +0 -74
- package/components/navigation/vertical/components/divider/divider.component.d.ts +0 -26
- package/components/navigation/vertical/components/group/group.component.d.ts +0 -36
- package/components/navigation/vertical/components/spacer/spacer.component.d.ts +0 -26
- package/components/navigation/vertical/vertical.component.d.ts +0 -176
- package/components/opt-input/models/config.d.ts +0 -14
- package/components/opt-input/otp-input.component.d.ts +0 -70
- package/components/opt-input/public-api.d.ts +0 -1
- package/components/opt-input/utils/keyboard-util.d.ts +0 -9
- package/components/opt-input/utils/object-util.d.ts +0 -3
- package/components/org-chart/designer/chart-designer.component.d.ts +0 -17
- package/components/org-chart/node/chart-node.component.d.ts +0 -17
- package/components/org-chart/node/node.type.d.ts +0 -22
- package/components/org-chart/org-chart.component.d.ts +0 -12
- package/components/org-chart/public-api.d.ts +0 -2
- package/components/pagination/pagination.component.d.ts +0 -23
- package/components/pagination/pagination.directive.d.ts +0 -40
- package/components/pagination/pagination.instance.d.ts +0 -11
- package/components/pagination/pagination.pipe.d.ts +0 -29
- package/components/pagination/pagination.service.d.ts +0 -20
- package/components/pagination/public-api.d.ts +0 -5
- package/components/password-strength/animations/index.d.ts +0 -4
- package/components/password-strength/enum.d.ts +0 -13
- package/components/password-strength/mat-pass-toggle-visibility/mat-pass-toggle-visibility.component.d.ts +0 -11
- package/components/password-strength/mat-password-strength/mat-password-strength.component.d.ts +0 -52
- package/components/password-strength/mat-password-strength-info/mat-password-strength-info.component.d.ts +0 -16
- package/components/password-strength/mat-password-strength-validator.d.ts +0 -6
- package/components/password-strength/public-api.d.ts +0 -3
- package/components/password-strength/regexp.class.d.ts +0 -6
- package/components/popover/popover-trigger.d.ts +0 -121
- package/components/popover/popover.component.d.ts +0 -136
- package/components/popover/popover.errors.d.ts +0 -14
- package/components/popover/popover.interfaces.d.ts +0 -43
- package/components/popover/popover.target.d.ts +0 -8
- package/components/popover/popover.type.d.ts +0 -5
- package/components/popover/public-api.d.ts +0 -4
- package/components/progress-bar/progress-bar.component.d.ts +0 -18
- package/components/progress-bar/public-api.d.ts +0 -1
- package/components/rating/public-api.d.ts +0 -1
- package/components/rating/rating.component.d.ts +0 -58
- package/components/select-search/default-options.d.ts +0 -8
- package/components/select-search/public-api.d.ts +0 -2
- package/components/select-search/select-no-entries-found.directive.d.ts +0 -5
- package/components/select-search/select-search-clear.directive.d.ts +0 -5
- package/components/select-search/select-search.component.d.ts +0 -91
- package/components/select-table/public-api.d.ts +0 -2
- package/components/select-table/select-table.component.d.ts +0 -96
- package/components/select-table/select-table.type.d.ts +0 -20
- package/components/select-tree/public-api.d.ts +0 -3
- package/components/select-tree/select-tree.component.d.ts +0 -105
- package/components/select-tree/select-tree.flatnode.d.ts +0 -6
- package/components/select-tree/select-tree.node.d.ts +0 -5
- package/components/speed-dial/public-api.d.ts +0 -2
- package/components/speed-dial/speed-dial.component.d.ts +0 -63
- package/components/timeline/public-api.d.ts +0 -2
- package/components/timeline/timeline-item/timeline-item.component.d.ts +0 -25
- package/components/timeline/timeline.component.d.ts +0 -30
- package/components/toast/models/global-config.model.d.ts +0 -12
- package/components/toast/models/toast.model.d.ts +0 -6
- package/components/toast/models/type.model.d.ts +0 -12
- package/components/toast/public-api.d.ts +0 -6
- package/components/toast/toast-modal.component.d.ts +0 -18
- package/components/toast/toast.component.d.ts +0 -17
- package/components/toast/toast.service.d.ts +0 -26
- package/components/transfer-picker/filter/filter.component.d.ts +0 -23
- package/components/transfer-picker/interface.d.ts +0 -41
- package/components/transfer-picker/public-api.d.ts +0 -7
- package/components/transfer-picker/search/search.component.d.ts +0 -14
- package/components/transfer-picker/transfer-picker-source/transfer-picker-source.component.d.ts +0 -51
- package/components/transfer-picker/transfer-picker-target/transfer-picker-target.component.d.ts +0 -11
- package/components/transfer-picker/transfer-picker.component.d.ts +0 -28
- package/components/transfer-picker/transfer-picker.service.d.ts +0 -32
- package/components/treetable/public-api.d.ts +0 -2
- package/components/treetable/treetable.component.d.ts +0 -32
- package/components/treetable/treetable.interface.d.ts +0 -9
- package/components/upload/files.type.d.ts +0 -22
- package/components/upload/files.util.service.d.ts +0 -20
- package/components/upload/public-api.d.ts +0 -4
- package/components/upload/upload-queue/upload-queue.component.d.ts +0 -40
- package/components/upload/upload.component.d.ts +0 -32
- package/components/x6-angular-shape/node.d.ts +0 -11
- package/components/x6-angular-shape/public-api.d.ts +0 -3
- package/components/x6-angular-shape/registry.d.ts +0 -13
- package/components/x6-angular-shape/view.d.ts +0 -16
- package/directives/animate-on-scroll/animate-on-scroll.directive.d.ts +0 -29
- package/directives/animate-on-scroll/public-api.d.ts +0 -1
- package/directives/animate-on-scroll/scroll.service.d.ts +0 -15
- package/directives/arrow-cursor/arrow-cursor.directive.d.ts +0 -31
- package/directives/arrow-cursor/public-api.d.ts +0 -1
- package/directives/autofocus/autofocus.directive.d.ts +0 -8
- package/directives/autofocus/public-api.d.ts +0 -1
- package/directives/data-exporter/constants.d.ts +0 -26
- package/directives/data-exporter/data-exporter.directive.d.ts +0 -18
- package/directives/data-exporter/mime.d.ts +0 -5
- package/directives/data-exporter/options.d.ts +0 -21
- package/directives/data-exporter/public-api.d.ts +0 -2
- package/directives/data-exporter/services/exporters/csv-exporter.service.d.ts +0 -12
- package/directives/data-exporter/services/exporters/exporter.d.ts +0 -4
- package/directives/data-exporter/services/exporters/file-exporter.d.ts +0 -8
- package/directives/data-exporter/services/exporters/json-exporter.service.d.ts +0 -11
- package/directives/data-exporter/services/exporters/txt-exporter.service.d.ts +0 -12
- package/directives/data-exporter/services/exporters/worksheet-exporter.d.ts +0 -10
- package/directives/data-exporter/services/exporters/xls-exporter.service.d.ts +0 -14
- package/directives/data-exporter/services/exporters/xlsx-exporter.service.d.ts +0 -9
- package/directives/data-exporter/services/file-util.d.ts +0 -8
- package/directives/data-exporter/services/service-locator.service.d.ts +0 -11
- package/directives/debounce/abstract-debounce.directive.d.ts +0 -15
- package/directives/debounce/debounce-click.directive.d.ts +0 -8
- package/directives/debounce/debounce-keyup.directive.d.ts +0 -8
- package/directives/debounce/public-api.d.ts +0 -2
- package/directives/digit-only/digit-only.directive.d.ts +0 -36
- package/directives/digit-only/mask.directive.d.ts +0 -16
- package/directives/digit-only/public-api.d.ts +0 -2
- package/directives/equal-validator/equal-validator.directive.d.ts +0 -12
- package/directives/equal-validator/public-api.d.ts +0 -1
- package/lib/mock-api/mock-api.constants.d.ts +0 -2
- package/lib/mock-api/mock-api.interceptor.d.ts +0 -12
- package/lib/mock-api/mock-api.request-handler.d.ts +0 -16
- package/lib/mock-api/mock-api.service.d.ts +0 -20
- package/lib/mock-api/mock-api.types.d.ts +0 -7
- package/lib/mock-api/mock-api.utils.d.ts +0 -3
- package/lib/mock-api/public-api.d.ts +0 -5
- package/pipes/bytes/bytes.pipe.d.ts +0 -7
- package/pipes/bytes/public-api.d.ts +0 -1
- package/pipes/date-format/date-format.pipe.d.ts +0 -7
- package/pipes/date-format/public-api.d.ts +0 -1
- package/pipes/find-by-key/find-by-key.pipe.d.ts +0 -7
- package/pipes/find-by-key/public-api.d.ts +0 -1
- package/pipes/group-by/group-by.pipe.d.ts +0 -7
- package/pipes/group-by/public-api.d.ts +0 -1
- package/pipes/keys/keys.pipe.d.ts +0 -7
- package/pipes/keys/public-api.d.ts +0 -1
- package/pipes/secure/public-api.d.ts +0 -1
- package/pipes/secure/secure-pipe.d.ts +0 -18
- package/pipes/uppercase/public-api.d.ts +0 -1
- package/pipes/uppercase/uppercase.pipe.d.ts +0 -7
- package/public-api.d.ts +0 -1
- package/services/alert/alert.dialog.d.ts +0 -11
- package/services/alert/alert.message.d.ts +0 -8
- package/services/alert/alert.service.d.ts +0 -37
- package/services/alert/enum.d.ts +0 -12
- package/services/alert/public-api.d.ts +0 -4
- package/services/config/config.constants.d.ts +0 -6
- package/services/config/config.service.d.ts +0 -11
- package/services/config/public-api.d.ts +0 -3
- package/services/config/urlStateConfig.service.d.ts +0 -10
- package/services/confirmation/confirmation.service.d.ts +0 -12
- package/services/confirmation/confirmation.types.d.ts +0 -21
- package/services/confirmation/dialog/dialog.component.d.ts +0 -10
- package/services/confirmation/public-api.d.ts +0 -2
- package/services/data/data.service.d.ts +0 -20
- package/services/data/public-api.d.ts +0 -1
- package/services/export-as/export-as-config.model.d.ts +0 -8
- package/services/export-as/export-as.service.d.ts +0 -43
- package/services/export-as/public-api.d.ts +0 -2
- package/services/loading/loading.interceptor.d.ts +0 -12
- package/services/loading/loading.service.d.ts +0 -24
- package/services/loading/public-api.d.ts +0 -2
- package/services/local-storage/local-storage.service.d.ts +0 -8
- package/services/local-storage/public-api.d.ts +0 -1
- package/services/media-watcher/media-watcher.service.d.ts +0 -20
- package/services/media-watcher/public-api.d.ts +0 -1
- package/services/platform/platform.service.d.ts +0 -9
- package/services/platform/public-api.d.ts +0 -1
- package/services/splash-screen/public-api.d.ts +0 -1
- package/services/splash-screen/splash-screen.service.d.ts +0 -14
- package/services/title/public-api.d.ts +0 -1
- package/services/title/title.service.d.ts +0 -13
- package/services/translation/public-api.d.ts +0 -1
- package/services/translation/translation.service.d.ts +0 -20
- package/services/utils/public-api.d.ts +0 -1
- package/services/utils/utils.service.d.ts +0 -60
- package/validators/public-api.d.ts +0 -1
- package/validators/validators.d.ts +0 -5
- package/version/public-api.d.ts +0 -1
- package/version/version.d.ts +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmat-directives-digit-only.mjs","sources":["../../../projects/cmat/directives/digit-only/digit-only.directive.ts","../../../projects/cmat/directives/digit-only/mask.directive.ts","../../../projects/cmat/directives/digit-only/cmat-directives-digit-only.ts"],"sourcesContent":["import {\r\n Directive,\r\n ElementRef,\r\n HostListener,\r\n Input,\r\n OnChanges,\r\n SimpleChanges,\r\n} from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[cmatDigitOnly]',\r\n standalone: true\r\n})\r\nexport class CmatDigitOnlyDirective implements OnChanges {\r\n @Input() decimal = false;\r\n @Input() decimalSeparator = '.';\r\n @Input() allowNegatives = false;\r\n @Input() allowPaste = true;\r\n @Input() negativeSign = '-';\r\n @Input() min = -Infinity;\r\n @Input() max = Infinity;\r\n @Input() pattern?: string | RegExp;\r\n inputElement: HTMLInputElement;\r\n value: string = '';\r\n\r\n private _regex: RegExp | null = null;\r\n private _hasDecimalPoint = false;\r\n private _hasNegativeSign = false;\r\n private _navigationKeys = [\r\n 'Backspace',\r\n 'Delete',\r\n 'Tab',\r\n 'Escape',\r\n 'Enter',\r\n 'Home',\r\n 'End',\r\n 'ArrowLeft',\r\n 'ArrowRight',\r\n 'Clear',\r\n 'Copy',\r\n 'Paste',\r\n ];\r\n\r\n constructor(public el: ElementRef) {\r\n this.inputElement = el.nativeElement;\r\n }\r\n\r\n @HostListener('beforeinput', ['$event'])\r\n onBeforeInput(e: InputEvent): any {\r\n if (isNaN(Number(e.data))) {\r\n if (\r\n e.data === this.decimalSeparator ||\r\n (e.data === this.negativeSign && this.allowNegatives)\r\n ) {\r\n return; // go on\r\n }\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n }\r\n\r\n @HostListener('input', ['$event'])\r\n onInputChange(event: any): void {\r\n const reg = /^-?(0|[1-9][0-9]*)(\\.[0-9]*)?$/;\r\n const value = event.target.value;\r\n if ((!isNaN(+value) && reg.test(value)) || value === '' || value === '-') {\r\n this.value = value;\r\n }\r\n this.inputElement.value = this.value;\r\n }\r\n\r\n @HostListener('keydown', ['$event'])\r\n onKeyDown(e: KeyboardEvent): any {\r\n if (e.key === 'Process') {\r\n e.preventDefault();\r\n return;\r\n }\r\n if (\r\n this._navigationKeys.includes(e.key) || // Allow: navigation keys: backspace, delete, arrows etc.\r\n ((e.key === 'a' || e.code === 'KeyA') && e.ctrlKey === true) || // Allow: Ctrl+A\r\n ((e.key === 'c' || e.code === 'KeyC') && e.ctrlKey === true) || // Allow: Ctrl+C\r\n ((e.key === 'v' || e.code === 'KeyV') && e.ctrlKey === true) || // Allow: Ctrl+V\r\n ((e.key === 'x' || e.code === 'KeyX') && e.ctrlKey === true) || // Allow: Ctrl+X\r\n ((e.key === 'a' || e.code === 'KeyA') && e.metaKey === true) || // Allow: Cmd+A (Mac)\r\n ((e.key === 'c' || e.code === 'KeyC') && e.metaKey === true) || // Allow: Cmd+C (Mac)\r\n ((e.key === 'v' || e.code === 'KeyV') && e.metaKey === true) || // Allow: Cmd+V (Mac)\r\n ((e.key === 'x' || e.code === 'KeyX') && e.metaKey === true) // Allow: Cmd+X (Mac)\r\n ) {\r\n // let it happen, don't do anything\r\n return;\r\n }\r\n\r\n let newValue = '';\r\n\r\n if (this.decimal && e.key === this.decimalSeparator) {\r\n newValue = this._forecastValue(e.key);\r\n if (newValue.split(this.decimalSeparator).length > 2) {\r\n // has two or more decimal points\r\n e.preventDefault();\r\n return;\r\n } else {\r\n this._hasDecimalPoint = newValue.includes(this.decimalSeparator);\r\n return; // Allow: only one decimal point\r\n }\r\n }\r\n\r\n if (e.key === this.negativeSign && this.allowNegatives) {\r\n newValue = this._forecastValue(e.key);\r\n if (\r\n newValue.startsWith(this.negativeSign) ||\r\n newValue.split(this.negativeSign).length > 2\r\n ) {\r\n e.preventDefault();\r\n return;\r\n } else {\r\n this._hasNegativeSign = newValue.split(this.negativeSign).length > -1;\r\n return;\r\n }\r\n }\r\n\r\n // Ensure that it is a number and stop the keypress\r\n if (e.key === ' ' || isNaN(Number(e.key))) {\r\n e.preventDefault();\r\n return;\r\n }\r\n\r\n newValue = newValue || this._forecastValue(e.key);\r\n // check the input pattern RegExp\r\n if (this._regex) {\r\n if (!this._regex.test(newValue)) {\r\n e.preventDefault();\r\n return;\r\n }\r\n }\r\n\r\n const newNumber = Number(newValue);\r\n if (newNumber > this.max || newNumber < this.min) {\r\n e.preventDefault();\r\n }\r\n }\r\n\r\n @HostListener('paste', ['$event'])\r\n onPaste(event: any): void {\r\n if (this.allowPaste === true) {\r\n let pastedInput: string = '';\r\n if ((window as Record<string, any>)['clipboardData']) {\r\n // Browser is IE\r\n pastedInput = (window as Record<string, any>)[\r\n 'clipboardData'\r\n ].getData('text');\r\n } else if (event.clipboardData?.getData) {\r\n // Other browsers\r\n pastedInput = event.clipboardData.getData('text/plain');\r\n }\r\n\r\n this._pasteData(pastedInput);\r\n event.preventDefault();\r\n } else {\r\n // this prevents the paste\r\n event.preventDefault();\r\n event.stopPropagation();\r\n }\r\n }\r\n\r\n @HostListener('drop', ['$event'])\r\n onDrop(event: DragEvent): void {\r\n const textData = event.dataTransfer?.getData('text') ?? '';\r\n this.inputElement.focus();\r\n this._pasteData(textData);\r\n event.preventDefault();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['pattern']) {\r\n this._regex = this.pattern ? RegExp(this.pattern) : null;\r\n }\r\n\r\n if (changes['min']) {\r\n const maybeMin = Number(this.min);\r\n this.min = isNaN(maybeMin) ? -Infinity : maybeMin;\r\n }\r\n\r\n if (changes['max']) {\r\n const maybeMax = Number(this.max);\r\n this.max = isNaN(maybeMax) ? Infinity : maybeMax;\r\n }\r\n }\r\n\r\n\r\n\r\n private _pasteData(pastedContent: string): void {\r\n const sanitizedContent = this._sanitizeInput(pastedContent);\r\n if (\r\n sanitizedContent.includes(this.negativeSign) &&\r\n this._hasNegativeSign &&\r\n !this._getSelection().includes(this.negativeSign)\r\n ) {\r\n return;\r\n }\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n const pasted = document.execCommand('insertText', false, sanitizedContent);\r\n if (!pasted) {\r\n if (this.inputElement.setRangeText) {\r\n const { selectionStart: start, selectionEnd: end } = this.inputElement;\r\n this.inputElement.setRangeText(\r\n sanitizedContent,\r\n start ?? 0,\r\n end ?? 0,\r\n 'end'\r\n );\r\n // Angular's Reactive Form relies on \"input\" event, but on Firefox, the setRangeText method doesn't trigger it\r\n // so we have to trigger it ourself.\r\n if (\r\n typeof (window as Record<string, any>)['InstallTrigger'] !==\r\n 'undefined'\r\n ) {\r\n this.inputElement.dispatchEvent(\r\n new Event('input', { cancelable: true })\r\n );\r\n }\r\n } else {\r\n // Browser does not support setRangeText, e.g. IE\r\n this._insertAtCursor(this.inputElement, sanitizedContent);\r\n }\r\n }\r\n if (this.decimal) {\r\n this._hasDecimalPoint =\r\n this.inputElement.value.includes(this.decimalSeparator);\r\n }\r\n this._hasNegativeSign =\r\n this.inputElement.value.includes(this.negativeSign);\r\n }\r\n\r\n // The following 2 methods were added from the below article for browsers that do not support setRangeText\r\n // https://stackoverflow.com/questions/11076975/how-to-insert-text-into-the-textarea-at-the-current-cursor-position\r\n private _insertAtCursor(myField: HTMLInputElement, myValue: string): void {\r\n const startPos = myField.selectionStart ?? 0;\r\n const endPos = myField.selectionEnd ?? 0;\r\n\r\n myField.value =\r\n myField.value.substring(0, startPos) +\r\n myValue +\r\n myField.value.substring(endPos, myField.value.length);\r\n\r\n const pos = startPos + myValue.length;\r\n myField.focus();\r\n myField.setSelectionRange(pos, pos);\r\n\r\n this._triggerEvent(myField, 'input');\r\n }\r\n\r\n private _triggerEvent(el: HTMLInputElement, type: string): void {\r\n if ('createEvent' in document) {\r\n // modern browsers, IE9+\r\n const e = document.createEvent('HTMLEvents');\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n e.initEvent(type, false, true);\r\n el.dispatchEvent(e);\r\n }\r\n }\r\n // end stack overflow code\r\n\r\n private _sanitizeInput(input: string): string {\r\n let result = '';\r\n let regex: RegExp;\r\n if (this.decimal && this._isValidDecimal(input)) {\r\n regex = new RegExp(\r\n `${this._getNegativeSignRegExp()}[^0-9${this.decimalSeparator}]`,\r\n 'g'\r\n );\r\n } else {\r\n regex = new RegExp(`${this._getNegativeSignRegExp()}[^0-9]`, 'g');\r\n }\r\n result = input.replace(regex, '');\r\n\r\n const maxLength = this.inputElement.maxLength;\r\n if (maxLength > 0) {\r\n // the input element has maxLength limit\r\n const allowedLength =\r\n maxLength -\r\n this.inputElement.value.length +\r\n (result.includes(`${this.negativeSign}`) ? 1 : 0);\r\n result = allowedLength > 0 ? result.substring(0, allowedLength) : '';\r\n }\r\n return result;\r\n }\r\n\r\n private _getNegativeSignRegExp(): string {\r\n return this.allowNegatives &&\r\n (!this._hasNegativeSign || this._getSelection().includes(this.negativeSign))\r\n ? `(?!^${this.negativeSign})`\r\n : '';\r\n }\r\n\r\n private _isValidDecimal(str: string): boolean {\r\n if (!this._hasDecimalPoint) {\r\n return str.split(this.decimalSeparator).length <= 2;\r\n } else {\r\n // the input element already has a decimal separator\r\n const selectedText = this._getSelection();\r\n if (selectedText?.includes(this.decimalSeparator)) {\r\n return str.split(this.decimalSeparator).length <= 2;\r\n } else {\r\n return !str.includes(this.decimalSeparator);\r\n }\r\n }\r\n }\r\n\r\n private _getSelection(): string {\r\n return this.inputElement.value.substring(\r\n this.inputElement.selectionStart ?? 0,\r\n this.inputElement.selectionEnd ?? 0\r\n );\r\n }\r\n\r\n private _forecastValue(key: string): string {\r\n const selectionStart = this.inputElement.selectionStart ?? 0;\r\n const selectionEnd = this.inputElement.selectionEnd ?? 0;\r\n const oldValue = this.inputElement.value;\r\n return (\r\n oldValue.substring(0, selectionStart) +\r\n key +\r\n oldValue.substring(selectionEnd)\r\n );\r\n }\r\n}\r\n","import { Directive, ElementRef, HostListener, OnInit } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[cmatMask]',\r\n standalone: true\r\n})\r\nexport class CmatMaskDirective implements OnInit {\r\n inputElement: HTMLInputElement;\r\n value: string = '';\r\n regex: RegExp = new RegExp('');\r\n\r\n private _navigationKeys = [\r\n 'Backspace',\r\n 'Delete',\r\n 'Tab',\r\n 'Escape',\r\n 'Enter',\r\n 'Home',\r\n 'End',\r\n 'ArrowLeft',\r\n 'ArrowRight',\r\n 'Clear',\r\n 'Copy',\r\n 'Paste',\r\n ];\r\n\r\n constructor(public el: ElementRef) {\r\n this.inputElement = el.nativeElement;\r\n }\r\n\r\n @HostListener('input', ['$event'])\r\n onInputChange(event: any): void {\r\n const value = event.target.value;\r\n if (this.regex.test(value)) {\r\n this.value = value;\r\n }\r\n this.inputElement.value = this.value;\r\n }\r\n\r\n @HostListener('keydown', ['$event'])\r\n onKeyDown(e: KeyboardEvent): void {\r\n if (e.key === 'Process') {\r\n e.preventDefault();\r\n return; \r\n }\r\n if (\r\n this._navigationKeys.includes(e.key) || // Allow: navigation keys: backspace, delete, arrows etc.\r\n ((e.key === 'a' || e.code === 'KeyA') && e.ctrlKey === true) || // Allow: Ctrl+A\r\n ((e.key === 'c' || e.code === 'KeyC') && e.ctrlKey === true) || // Allow: Ctrl+C\r\n ((e.key === 'v' || e.code === 'KeyV') && e.ctrlKey === true) || // Allow: Ctrl+V\r\n ((e.key === 'x' || e.code === 'KeyX') && e.ctrlKey === true) || // Allow: Ctrl+X\r\n ((e.key === 'a' || e.code === 'KeyA') && e.metaKey === true) || // Allow: Cmd+A (Mac)\r\n ((e.key === 'c' || e.code === 'KeyC') && e.metaKey === true) || // Allow: Cmd+C (Mac)\r\n ((e.key === 'v' || e.code === 'KeyV') && e.metaKey === true) || // Allow: Cmd+V (Mac)\r\n ((e.key === 'x' || e.code === 'KeyX') && e.metaKey === true) // Allow: Cmd+X (Mac)\r\n ) {\r\n // let it happen, don't do anything\r\n return;\r\n }\r\n\r\n const newValue = this._forecastValue(e.key);\r\n if (!this.regex.test(newValue)) {\r\n e.preventDefault();\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n this.regex = new RegExp(this.inputElement.pattern);\r\n }\r\n\r\n private _forecastValue(key: string): string {\r\n const selectionStart = this.inputElement.selectionStart ?? 0;\r\n const selectionEnd = this.inputElement.selectionEnd ?? 0;\r\n const oldValue = this.inputElement.value;\r\n const selection = oldValue.substring(selectionStart, selectionEnd);\r\n return selection\r\n ? oldValue.replace(selection, key)\r\n : oldValue.substring(0, selectionStart) +\r\n key +\r\n oldValue.substring(selectionStart);\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAaa,sBAAsB,CAAA;AA8B/B,IAAA,WAAA,CAAmB,EAAc,EAAA;QAAd,IAAE,CAAA,EAAA,GAAF,EAAE;QA7BZ,IAAO,CAAA,OAAA,GAAG,KAAK;QACf,IAAgB,CAAA,gBAAA,GAAG,GAAG;QACtB,IAAc,CAAA,cAAA,GAAG,KAAK;QACtB,IAAU,CAAA,UAAA,GAAG,IAAI;QACjB,IAAY,CAAA,YAAA,GAAG,GAAG;QAClB,IAAG,CAAA,GAAA,GAAG,CAAC,QAAQ;QACf,IAAG,CAAA,GAAA,GAAG,QAAQ;QAGvB,IAAK,CAAA,KAAA,GAAW,EAAE;QAEV,IAAM,CAAA,MAAA,GAAkB,IAAI;QAC5B,IAAgB,CAAA,gBAAA,GAAG,KAAK;QACxB,IAAgB,CAAA,gBAAA,GAAG,KAAK;AACxB,QAAA,IAAA,CAAA,eAAe,GAAG;YACtB,WAAW;YACX,QAAQ;YACR,KAAK;YACL,QAAQ;YACR,OAAO;YACP,MAAM;YACN,KAAK;YACL,WAAW;YACX,YAAY;YACZ,OAAO;YACP,MAAM;YACN,OAAO;SACV;AAGG,QAAA,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC,aAAa;;AAIxC,IAAA,aAAa,CAAC,CAAa,EAAA;QACvB,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE;AACvB,YAAA,IACI,CAAC,CAAC,I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;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,YAAY;AACtB,oBAAA,UAAU,EAAE;AACf,iBAAA;+EA0BG,aAAa,EAAA,CAAA;sBADZ,YAAY;uBAAC,OAAO,EAAE,CAAC,QAAQ,CAAC;gBAUjC,SAAS,EAAA,CAAA;sBADR,YAAY;uBAAC,SAAS,EAAE,CAAC,QAAQ,CAAC;;;ACvCvC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cmat-directives-digit-only.mjs","sources":["../../../projects/cmat/directives/digit-only/digit-only.directive.ts","../../../projects/cmat/directives/digit-only/mask.directive.ts","../../../projects/cmat/directives/digit-only/cmat-directives-digit-only.ts"],"sourcesContent":["import { Directive, ElementRef, HostListener, Input, OnChanges, SimpleChanges, inject } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[cmatDigitOnly]'\r\n})\r\nexport class CmatDigitOnlyDirective implements OnChanges {\r\n @Input() decimal = false;\r\n @Input() decimalSeparator = '.';\r\n @Input() allowNegatives = false;\r\n @Input() allowPaste = true;\r\n @Input() negativeSign = '-';\r\n @Input() min = -Infinity;\r\n @Input() max = Infinity;\r\n @Input() pattern?: string | RegExp;\r\n inputElement: HTMLInputElement;\r\n value: string = '';\r\n\r\n el = inject(ElementRef);\r\n\r\n private _regex: RegExp | null = null;\r\n private _hasDecimalPoint = false;\r\n private _hasNegativeSign = false;\r\n private _navigationKeys = [\r\n 'Backspace',\r\n 'Delete',\r\n 'Tab',\r\n 'Escape',\r\n 'Enter',\r\n 'Home',\r\n 'End',\r\n 'ArrowLeft',\r\n 'ArrowRight',\r\n 'Clear',\r\n 'Copy',\r\n 'Paste',\r\n ];\r\n\r\n constructor() {\r\n const el = this.el;\r\n\r\n this.inputElement = el.nativeElement;\r\n }\r\n\r\n @HostListener('beforeinput', ['$event'])\r\n onBeforeInput(e: InputEvent): any {\r\n if (isNaN(Number(e.data))) {\r\n if (\r\n e.data === this.decimalSeparator ||\r\n (e.data === this.negativeSign && this.allowNegatives)\r\n ) {\r\n return; // go on\r\n }\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n }\r\n\r\n @HostListener('input', ['$event'])\r\n onInputChange(event: any): void {\r\n const reg = /^-?(0|[1-9][0-9]*)(\\.[0-9]*)?$/;\r\n const value = event.target.value;\r\n if ((!isNaN(+value) && reg.test(value)) || value === '' || value === '-') {\r\n this.value = value;\r\n }\r\n this.inputElement.value = this.value;\r\n }\r\n\r\n @HostListener('keydown', ['$event'])\r\n onKeyDown(e: KeyboardEvent): any {\r\n if (e.key === 'Process') {\r\n e.preventDefault();\r\n return;\r\n }\r\n if (\r\n this._navigationKeys.includes(e.key) || // Allow: navigation keys: backspace, delete, arrows etc.\r\n ((e.key === 'a' || e.code === 'KeyA') && e.ctrlKey === true) || // Allow: Ctrl+A\r\n ((e.key === 'c' || e.code === 'KeyC') && e.ctrlKey === true) || // Allow: Ctrl+C\r\n ((e.key === 'v' || e.code === 'KeyV') && e.ctrlKey === true) || // Allow: Ctrl+V\r\n ((e.key === 'x' || e.code === 'KeyX') && e.ctrlKey === true) || // Allow: Ctrl+X\r\n ((e.key === 'a' || e.code === 'KeyA') && e.metaKey === true) || // Allow: Cmd+A (Mac)\r\n ((e.key === 'c' || e.code === 'KeyC') && e.metaKey === true) || // Allow: Cmd+C (Mac)\r\n ((e.key === 'v' || e.code === 'KeyV') && e.metaKey === true) || // Allow: Cmd+V (Mac)\r\n ((e.key === 'x' || e.code === 'KeyX') && e.metaKey === true) // Allow: Cmd+X (Mac)\r\n ) {\r\n // let it happen, don't do anything\r\n return;\r\n }\r\n\r\n let newValue = '';\r\n\r\n if (this.decimal && e.key === this.decimalSeparator) {\r\n newValue = this._forecastValue(e.key);\r\n if (newValue.split(this.decimalSeparator).length > 2) {\r\n // has two or more decimal points\r\n e.preventDefault();\r\n return;\r\n } else {\r\n this._hasDecimalPoint = newValue.includes(this.decimalSeparator);\r\n return; // Allow: only one decimal point\r\n }\r\n }\r\n\r\n if (e.key === this.negativeSign && this.allowNegatives) {\r\n newValue = this._forecastValue(e.key);\r\n if (\r\n newValue.startsWith(this.negativeSign) ||\r\n newValue.split(this.negativeSign).length > 2\r\n ) {\r\n e.preventDefault();\r\n return;\r\n } else {\r\n this._hasNegativeSign = newValue.split(this.negativeSign).length > -1;\r\n return;\r\n }\r\n }\r\n\r\n // Ensure that it is a number and stop the keypress\r\n if (e.key === ' ' || isNaN(Number(e.key))) {\r\n e.preventDefault();\r\n return;\r\n }\r\n\r\n newValue = newValue || this._forecastValue(e.key);\r\n // check the input pattern RegExp\r\n if (this._regex) {\r\n if (!this._regex.test(newValue)) {\r\n e.preventDefault();\r\n return;\r\n }\r\n }\r\n\r\n const newNumber = Number(newValue);\r\n if (newNumber > this.max || newNumber < this.min) {\r\n e.preventDefault();\r\n }\r\n }\r\n\r\n @HostListener('paste', ['$event'])\r\n onPaste(event: any): void {\r\n if (this.allowPaste === true) {\r\n let pastedInput: string = '';\r\n if ((window as Record<string, any>)['clipboardData']) {\r\n // Browser is IE\r\n pastedInput = (window as Record<string, any>)[\r\n 'clipboardData'\r\n ].getData('text');\r\n } else if (event.clipboardData?.getData) {\r\n // Other browsers\r\n pastedInput = event.clipboardData.getData('text/plain');\r\n }\r\n\r\n this._pasteData(pastedInput);\r\n event.preventDefault();\r\n } else {\r\n // this prevents the paste\r\n event.preventDefault();\r\n event.stopPropagation();\r\n }\r\n }\r\n\r\n @HostListener('drop', ['$event'])\r\n onDrop(event: DragEvent): void {\r\n const textData = event.dataTransfer?.getData('text') ?? '';\r\n this.inputElement.focus();\r\n this._pasteData(textData);\r\n event.preventDefault();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['pattern']) {\r\n this._regex = this.pattern ? RegExp(this.pattern) : null;\r\n }\r\n\r\n if (changes['min']) {\r\n const maybeMin = Number(this.min);\r\n this.min = isNaN(maybeMin) ? -Infinity : maybeMin;\r\n }\r\n\r\n if (changes['max']) {\r\n const maybeMax = Number(this.max);\r\n this.max = isNaN(maybeMax) ? Infinity : maybeMax;\r\n }\r\n }\r\n\r\n\r\n\r\n private _pasteData(pastedContent: string): void {\r\n const sanitizedContent = this._sanitizeInput(pastedContent);\r\n if (\r\n sanitizedContent.includes(this.negativeSign) &&\r\n this._hasNegativeSign &&\r\n !this._getSelection().includes(this.negativeSign)\r\n ) {\r\n return;\r\n }\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n const pasted = document.execCommand('insertText', false, sanitizedContent);\r\n if (!pasted) {\r\n if (this.inputElement.setRangeText) {\r\n const { selectionStart: start, selectionEnd: end } = this.inputElement;\r\n this.inputElement.setRangeText(\r\n sanitizedContent,\r\n start ?? 0,\r\n end ?? 0,\r\n 'end'\r\n );\r\n // Angular's Reactive Form relies on \"input\" event, but on Firefox, the setRangeText method doesn't trigger it\r\n // so we have to trigger it ourself.\r\n if (\r\n typeof (window as Record<string, any>)['InstallTrigger'] !==\r\n 'undefined'\r\n ) {\r\n this.inputElement.dispatchEvent(\r\n new Event('input', { cancelable: true })\r\n );\r\n }\r\n } else {\r\n // Browser does not support setRangeText, e.g. IE\r\n this._insertAtCursor(this.inputElement, sanitizedContent);\r\n }\r\n }\r\n if (this.decimal) {\r\n this._hasDecimalPoint =\r\n this.inputElement.value.includes(this.decimalSeparator);\r\n }\r\n this._hasNegativeSign =\r\n this.inputElement.value.includes(this.negativeSign);\r\n }\r\n\r\n // The following 2 methods were added from the below article for browsers that do not support setRangeText\r\n // https://stackoverflow.com/questions/11076975/how-to-insert-text-into-the-textarea-at-the-current-cursor-position\r\n private _insertAtCursor(myField: HTMLInputElement, myValue: string): void {\r\n const startPos = myField.selectionStart ?? 0;\r\n const endPos = myField.selectionEnd ?? 0;\r\n\r\n myField.value =\r\n myField.value.substring(0, startPos) +\r\n myValue +\r\n myField.value.substring(endPos, myField.value.length);\r\n\r\n const pos = startPos + myValue.length;\r\n myField.focus();\r\n myField.setSelectionRange(pos, pos);\r\n\r\n this._triggerEvent(myField, 'input');\r\n }\r\n\r\n private _triggerEvent(el: HTMLInputElement, type: string): void {\r\n if ('createEvent' in document) {\r\n // modern browsers, IE9+\r\n const e = document.createEvent('HTMLEvents');\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n e.initEvent(type, false, true);\r\n el.dispatchEvent(e);\r\n }\r\n }\r\n // end stack overflow code\r\n\r\n private _sanitizeInput(input: string): string {\r\n let result = '';\r\n let regex: RegExp;\r\n if (this.decimal && this._isValidDecimal(input)) {\r\n regex = new RegExp(\r\n `${this._getNegativeSignRegExp()}[^0-9${this.decimalSeparator}]`,\r\n 'g'\r\n );\r\n } else {\r\n regex = new RegExp(`${this._getNegativeSignRegExp()}[^0-9]`, 'g');\r\n }\r\n result = input.replace(regex, '');\r\n\r\n const maxLength = this.inputElement.maxLength;\r\n if (maxLength > 0) {\r\n // the input element has maxLength limit\r\n const allowedLength =\r\n maxLength -\r\n this.inputElement.value.length +\r\n (result.includes(`${this.negativeSign}`) ? 1 : 0);\r\n result = allowedLength > 0 ? result.substring(0, allowedLength) : '';\r\n }\r\n return result;\r\n }\r\n\r\n private _getNegativeSignRegExp(): string {\r\n return this.allowNegatives &&\r\n (!this._hasNegativeSign || this._getSelection().includes(this.negativeSign))\r\n ? `(?!^${this.negativeSign})`\r\n : '';\r\n }\r\n\r\n private _isValidDecimal(str: string): boolean {\r\n if (!this._hasDecimalPoint) {\r\n return str.split(this.decimalSeparator).length <= 2;\r\n } else {\r\n // the input element already has a decimal separator\r\n const selectedText = this._getSelection();\r\n if (selectedText?.includes(this.decimalSeparator)) {\r\n return str.split(this.decimalSeparator).length <= 2;\r\n } else {\r\n return !str.includes(this.decimalSeparator);\r\n }\r\n }\r\n }\r\n\r\n private _getSelection(): string {\r\n return this.inputElement.value.substring(\r\n this.inputElement.selectionStart ?? 0,\r\n this.inputElement.selectionEnd ?? 0\r\n );\r\n }\r\n\r\n private _forecastValue(key: string): string {\r\n const selectionStart = this.inputElement.selectionStart ?? 0;\r\n const selectionEnd = this.inputElement.selectionEnd ?? 0;\r\n const oldValue = this.inputElement.value;\r\n return (\r\n oldValue.substring(0, selectionStart) +\r\n key +\r\n oldValue.substring(selectionEnd)\r\n );\r\n }\r\n}\r\n","import { Directive, ElementRef, HostListener, OnInit, inject } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[cmatMask]'\r\n})\r\nexport class CmatMaskDirective implements OnInit {\r\n el = inject(ElementRef);\r\n\r\n inputElement: HTMLInputElement;\r\n value: string = '';\r\n regex: RegExp = new RegExp('');\r\n\r\n private _navigationKeys = [\r\n 'Backspace',\r\n 'Delete',\r\n 'Tab',\r\n 'Escape',\r\n 'Enter',\r\n 'Home',\r\n 'End',\r\n 'ArrowLeft',\r\n 'ArrowRight',\r\n 'Clear',\r\n 'Copy',\r\n 'Paste',\r\n ]; \r\n\r\n constructor() {\r\n const el = this.el;\r\n\r\n this.inputElement = el.nativeElement;\r\n }\r\n\r\n @HostListener('input', ['$event'])\r\n onInputChange(event: any): void {\r\n const value = event.target.value;\r\n if (this.regex.test(value)) {\r\n this.value = value;\r\n }\r\n this.inputElement.value = this.value;\r\n }\r\n\r\n @HostListener('keydown', ['$event'])\r\n onKeyDown(e: KeyboardEvent): void {\r\n if (e.key === 'Process') {\r\n e.preventDefault();\r\n return; \r\n }\r\n if (\r\n this._navigationKeys.includes(e.key) || // Allow: navigation keys: backspace, delete, arrows etc.\r\n ((e.key === 'a' || e.code === 'KeyA') && e.ctrlKey === true) || // Allow: Ctrl+A\r\n ((e.key === 'c' || e.code === 'KeyC') && e.ctrlKey === true) || // Allow: Ctrl+C\r\n ((e.key === 'v' || e.code === 'KeyV') && e.ctrlKey === true) || // Allow: Ctrl+V\r\n ((e.key === 'x' || e.code === 'KeyX') && e.ctrlKey === true) || // Allow: Ctrl+X\r\n ((e.key === 'a' || e.code === 'KeyA') && e.metaKey === true) || // Allow: Cmd+A (Mac)\r\n ((e.key === 'c' || e.code === 'KeyC') && e.metaKey === true) || // Allow: Cmd+C (Mac)\r\n ((e.key === 'v' || e.code === 'KeyV') && e.metaKey === true) || // Allow: Cmd+V (Mac)\r\n ((e.key === 'x' || e.code === 'KeyX') && e.metaKey === true) // Allow: Cmd+X (Mac)\r\n ) {\r\n // let it happen, don't do anything\r\n return;\r\n }\r\n\r\n const newValue = this._forecastValue(e.key);\r\n if (!this.regex.test(newValue)) {\r\n e.preventDefault();\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n this.regex = new RegExp(this.inputElement.pattern);\r\n }\r\n\r\n private _forecastValue(key: string): string {\r\n const selectionStart = this.inputElement.selectionStart ?? 0;\r\n const selectionEnd = this.inputElement.selectionEnd ?? 0;\r\n const oldValue = this.inputElement.value;\r\n const selection = oldValue.substring(selectionStart, selectionEnd);\r\n return selection\r\n ? oldValue.replace(selection, key)\r\n : oldValue.substring(0, selectionStart) +\r\n key +\r\n oldValue.substring(selectionStart);\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAKa,sBAAsB,CAAA;AAgC/B,IAAA,WAAA,GAAA;QA/BS,IAAO,CAAA,OAAA,GAAG,KAAK;QACf,IAAgB,CAAA,gBAAA,GAAG,GAAG;QACtB,IAAc,CAAA,cAAA,GAAG,KAAK;QACtB,IAAU,CAAA,UAAA,GAAG,IAAI;QACjB,IAAY,CAAA,YAAA,GAAG,GAAG;QAClB,IAAG,CAAA,GAAA,GAAG,CAAC,QAAQ;QACf,IAAG,CAAA,GAAA,GAAG,QAAQ;QAGvB,IAAK,CAAA,KAAA,GAAW,EAAE;AAElB,QAAA,IAAA,CAAA,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC;QAEf,IAAM,CAAA,MAAA,GAAkB,IAAI;QAC5B,IAAgB,CAAA,gBAAA,GAAG,KAAK;QACxB,IAAgB,CAAA,gBAAA,GAAG,KAAK;AACxB,QAAA,IAAA,CAAA,eAA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AAC;;8GA7EjC,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,uBAAA,EAAA,SAAA,EAAA,mBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAH7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE;AACb,iBAAA;wDA8BG,aAAa,EAAA,CAAA;sBADZ,YAAY;uBAAC,OAAO,EAAE,CAAC,QAAQ,CAAC;gBAUjC,SAAS,EAAA,CAAA;sBADR,YAAY;uBAAC,SAAS,EAAE,CAAC,QAAQ,CAAC;;;AC1CvC;;AAEG;;;;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { inject, HostAttributeToken, forwardRef, Directive } from '@angular/core';
|
|
3
3
|
import { NG_VALIDATORS } from '@angular/forms';
|
|
4
4
|
|
|
5
5
|
class CmatEqualValidatorDirective {
|
|
6
|
-
constructor(
|
|
7
|
-
this._validateEqual =
|
|
8
|
-
this._reverse =
|
|
6
|
+
constructor() {
|
|
7
|
+
this._validateEqual = inject(new HostAttributeToken('cmatValidateEqual'), { optional: true });
|
|
8
|
+
this._reverse = inject(new HostAttributeToken('reverse'), { optional: true });
|
|
9
9
|
}
|
|
10
10
|
static _validateNoReverse(c, other) {
|
|
11
11
|
return other.value === c.value ? null : { validateEqual: true };
|
|
@@ -31,27 +31,20 @@ class CmatEqualValidatorDirective {
|
|
|
31
31
|
}
|
|
32
32
|
return this._reverse === 'true' ? CmatEqualValidatorDirective._validateReverse(c, other) : CmatEqualValidatorDirective._validateNoReverse(c, other);
|
|
33
33
|
}
|
|
34
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
35
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
34
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatEqualValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
35
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.2", type: CmatEqualValidatorDirective, isStandalone: true, selector: "[cmatValidateEqual][formControlName],[cmatValidateEqual][formControl],[cmatValidateEqual][ngModel]", providers: [
|
|
36
36
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => CmatEqualValidatorDirective), multi: true }
|
|
37
37
|
], ngImport: i0 }); }
|
|
38
38
|
}
|
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatEqualValidatorDirective, decorators: [{
|
|
40
40
|
type: Directive,
|
|
41
41
|
args: [{
|
|
42
42
|
selector: '[cmatValidateEqual][formControlName],[cmatValidateEqual][formControl],[cmatValidateEqual][ngModel]',
|
|
43
43
|
providers: [
|
|
44
44
|
{ provide: NG_VALIDATORS, useExisting: forwardRef(() => CmatEqualValidatorDirective), multi: true }
|
|
45
|
-
]
|
|
46
|
-
standalone: true
|
|
45
|
+
]
|
|
47
46
|
}]
|
|
48
|
-
}]
|
|
49
|
-
type: Attribute,
|
|
50
|
-
args: ['cmatValidateEqual']
|
|
51
|
-
}] }, { type: undefined, decorators: [{
|
|
52
|
-
type: Attribute,
|
|
53
|
-
args: ['reverse']
|
|
54
|
-
}] }] });
|
|
47
|
+
}] });
|
|
55
48
|
|
|
56
49
|
/**
|
|
57
50
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmat-directives-equal-validator.mjs","sources":["../../../projects/cmat/directives/equal-validator/equal-validator.directive.ts","../../../projects/cmat/directives/equal-validator/cmat-directives-equal-validator.ts"],"sourcesContent":["import { Directive, forwardRef,
|
|
1
|
+
{"version":3,"file":"cmat-directives-equal-validator.mjs","sources":["../../../projects/cmat/directives/equal-validator/equal-validator.directive.ts","../../../projects/cmat/directives/equal-validator/cmat-directives-equal-validator.ts"],"sourcesContent":["import { Directive, forwardRef, HostAttributeToken, inject } from '@angular/core';\r\nimport { Validator, AbstractControl, NG_VALIDATORS } from '@angular/forms';\r\n\r\n@Directive({\r\n selector: '[cmatValidateEqual][formControlName],[cmatValidateEqual][formControl],[cmatValidateEqual][ngModel]',\r\n providers: [\r\n { provide: NG_VALIDATORS, useExisting: forwardRef(() => CmatEqualValidatorDirective), multi: true }\r\n ]\r\n})\r\nexport class CmatEqualValidatorDirective implements Validator {\r\n private _validateEqual = inject(new HostAttributeToken('cmatValidateEqual'), { optional: true })!;\r\n private _reverse = inject(new HostAttributeToken('reverse'), { optional: true })!;\r\n\r\n private static _validateNoReverse(c: AbstractControl, other: AbstractControl): Record<string, any> | null {\r\n return other.value === c.value ? null : { validateEqual: true };\r\n }\r\n\r\n private static _validateReverse(c: AbstractControl, other: AbstractControl): Record<string, any> | null {\r\n if (c.value === other.value) {\r\n if (other.errors) {\r\n delete other.errors['cmatValidateEqual'];\r\n\r\n if (Object.keys(other.errors).length === 0) {\r\n other.setErrors(null);\r\n }\r\n }\r\n } else {\r\n other.setErrors({ validateEqual: true });\r\n }\r\n\r\n return null;\r\n }\r\n\r\n validate(c: AbstractControl): Record<string, any> | null {\r\n const other = c.root.get(this._validateEqual);\r\n\r\n if (!other) { return null; }\r\n\r\n return this._reverse === 'true' ? CmatEqualValidatorDirective._validateReverse(c, other) : CmatEqualValidatorDirective._validateNoReverse(c, other);\r\n }\r\n}\r\n","/**\n *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M,GAAG,2BAA2B,CAAC,gBAAgB,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,2BAA2B,CAAC,kBAAkB,CAAC,CAAC,EAAE,KAAK,CAAC;;8GA7B1I,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAA3B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,2BAA2B,EAJ3B,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oGAAA,EAAA,SAAA,EAAA;AACT,YAAA,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,CAAC,MAAM,2BAA2B,CAAC,EAAE,KAAK,EAAE,IAAI;AAClG,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAEU,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBANvC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oGAAoG;AAC9G,oBAAA,SAAS,EAAE;AACT,wBAAA,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,CAAC,iCAAiC,CAAC,EAAE,KAAK,EAAE,IAAI;AAClG;AACF,iBAAA;;;ACRD;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, Injectable,
|
|
2
|
+
import { InjectionToken, Injectable, inject } from '@angular/core';
|
|
3
3
|
import { fromPairs, compact, isUndefined } from 'lodash-es';
|
|
4
4
|
import { throwError, Observable, of } from 'rxjs';
|
|
5
5
|
import { take, delay, switchMap } from 'rxjs/operators';
|
|
@@ -132,10 +132,10 @@ class CmatMockApiService {
|
|
|
132
132
|
// Return the instance
|
|
133
133
|
return cmatMockHttp;
|
|
134
134
|
}
|
|
135
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
136
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
135
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatMockApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
136
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatMockApiService, providedIn: 'root' }); }
|
|
137
137
|
}
|
|
138
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
138
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatMockApiService, decorators: [{
|
|
139
139
|
type: Injectable,
|
|
140
140
|
args: [{
|
|
141
141
|
providedIn: 'root'
|
|
@@ -158,9 +158,9 @@ class CmatMockApiUtils {
|
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
class CmatMockApiInterceptor {
|
|
161
|
-
constructor(
|
|
162
|
-
this._defaultDelay =
|
|
163
|
-
this._cmatMockApiService =
|
|
161
|
+
constructor() {
|
|
162
|
+
this._defaultDelay = inject(CMAT_MOCK_API_DEFAULT_DELAY);
|
|
163
|
+
this._cmatMockApiService = inject(CmatMockApiService);
|
|
164
164
|
}
|
|
165
165
|
intercept(request, next) {
|
|
166
166
|
// Try to get the request handler
|
|
@@ -210,18 +210,15 @@ class CmatMockApiInterceptor {
|
|
|
210
210
|
return throwError(() => response);
|
|
211
211
|
}));
|
|
212
212
|
}
|
|
213
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
214
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
213
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatMockApiInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
214
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatMockApiInterceptor, providedIn: 'root' }); }
|
|
215
215
|
}
|
|
216
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
216
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatMockApiInterceptor, decorators: [{
|
|
217
217
|
type: Injectable,
|
|
218
218
|
args: [{
|
|
219
219
|
providedIn: 'root'
|
|
220
220
|
}]
|
|
221
|
-
}]
|
|
222
|
-
type: Inject,
|
|
223
|
-
args: [CMAT_MOCK_API_DEFAULT_DELAY]
|
|
224
|
-
}] }, { type: CmatMockApiService }] });
|
|
221
|
+
}] });
|
|
225
222
|
|
|
226
223
|
/**
|
|
227
224
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmat-lib-mock-api.mjs","sources":["../../../projects/cmat/lib/mock-api/mock-api.constants.ts","../../../projects/cmat/lib/mock-api/mock-api.request-handler.ts","../../../projects/cmat/lib/mock-api/mock-api.service.ts","../../../projects/cmat/lib/mock-api/mock-api.utils.ts","../../../projects/cmat/lib/mock-api/mock-api.interceptor.ts","../../../projects/cmat/lib/mock-api/cmat-lib-mock-api.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\r\n\r\nexport const CMAT_MOCK_API_DEFAULT_DELAY = new InjectionToken<number>('CMAT_MOCK_API_DEFAULT_DELAY');\r\n","import { HttpRequest } from '@angular/common/http';\r\nimport { Observable, of, throwError } from 'rxjs';\r\nimport { take } from 'rxjs/operators';\r\nimport { CmatMockApiReplyCallback } from './mock-api.types';\r\n\r\nexport class CmatMockApiHandler {\r\n request!: HttpRequest<any>;\r\n urlParams!: Record<string, string>;\r\n\r\n private _reply: CmatMockApiReplyCallback = void 0;\r\n private _replyCount = 0;\r\n private _replied = 0;\r\n\r\n constructor(\r\n public url: string,\r\n public delay?: number\r\n ) {\r\n }\r\n\r\n get response(): Observable<any> {\r\n // If the execution limit has been reached, throw an error\r\n if (this._replyCount > 0 && this._replyCount <= this._replied) {\r\n return throwError(() => new Error('Execution limit has been reached!'));\r\n }\r\n\r\n // If the response callback has not been set, throw an error\r\n if (!this._reply) {\r\n return throwError(() => new Error('Response callback function does not exist!'));\r\n }\r\n\r\n // If the request has not been set, throw an error\r\n if (!this.request) {\r\n return throwError(() => new Error('Request does not exist!'));\r\n }\r\n\r\n // Increase the replied count\r\n this._replied++;\r\n\r\n // Execute the reply callback\r\n const replyResult = this._reply({\r\n request: this.request,\r\n urlParams: this.urlParams\r\n });\r\n\r\n // If the result of the reply callback is an observable...\r\n if (replyResult instanceof Observable) {\r\n // Return the result as it is\r\n return replyResult.pipe(take(1));\r\n }\r\n\r\n // Otherwise, return the result as an observable\r\n return of(replyResult).pipe(take(1));\r\n }\r\n\r\n reply(callback: CmatMockApiReplyCallback): void {\r\n // Store the reply\r\n this._reply = callback;\r\n }\r\n\r\n replyCount(count: number): void {\r\n // Store the reply count\r\n this._replyCount = count;\r\n }\r\n}\r\n\r\n\r\n","import { Injectable } from '@angular/core';\r\nimport { compact, fromPairs } from 'lodash-es';\r\nimport { CmatMockApiHandler } from './mock-api.request-handler';\r\nimport { CmatMockApiMethods } from './mock-api.types';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatMockApiService {\r\n private _handlers: Record<string, Map<string, CmatMockApiHandler>> = {\r\n 'get': new Map<string, CmatMockApiHandler>(),\r\n 'post': new Map<string, CmatMockApiHandler>(),\r\n 'patch': new Map<string, CmatMockApiHandler>(),\r\n 'delete': new Map<string, CmatMockApiHandler>(),\r\n 'put': new Map<string, CmatMockApiHandler>(),\r\n 'head': new Map<string, CmatMockApiHandler>(),\r\n 'jsonp': new Map<string, CmatMockApiHandler>(),\r\n 'options': new Map<string, CmatMockApiHandler>()\r\n };\r\n\r\n findHandler(method: string, url: string): { handler: CmatMockApiHandler | void; urlParams: Record<string, string> } {\r\n // Prepare the return object\r\n const matchingHandler: { handler: CmatMockApiHandler | void; urlParams: Record<string, string> } = {\r\n handler: void 0,\r\n urlParams: {}\r\n };\r\n\r\n // Split the url\r\n const urlParts = url.split('/');\r\n\r\n // Get all related request handlers\r\n const handlers = this._handlers[method.toLowerCase()];\r\n\r\n // Iterate through the handlers\r\n handlers.forEach((handler, handlerUrl) => {\r\n\r\n // Skip if there is already a matching handler\r\n if (matchingHandler.handler) {\r\n return;\r\n }\r\n\r\n // Split the handler url\r\n const handlerUrlParts = handlerUrl.split('/');\r\n\r\n // Skip if the lengths of the urls we are comparing are not the same\r\n if (urlParts.length !== handlerUrlParts.length) {\r\n return;\r\n }\r\n\r\n // Compare\r\n const matches = handlerUrlParts.every((handlerUrlPart, index) => handlerUrlPart === urlParts[index] || handlerUrlPart.startsWith(':'));\r\n\r\n // If there is a match...\r\n if (matches) {\r\n // Assign the matching handler\r\n matchingHandler.handler = handler;\r\n\r\n // Extract and assign the parameters\r\n matchingHandler.urlParams = fromPairs(compact(handlerUrlParts.map((handlerUrlPart, index) =>\r\n handlerUrlPart.startsWith(':') ? [handlerUrlPart.substring(1), urlParts[index]] : void 0\r\n )));\r\n }\r\n });\r\n\r\n return matchingHandler;\r\n }\r\n\r\n onDelete(url: string, delay?: number): CmatMockApiHandler {\r\n return this._registerHandler('delete', url, delay);\r\n }\r\n\r\n onGet(url: string, delay?: number): CmatMockApiHandler {\r\n return this._registerHandler('get', url, delay);\r\n }\r\n\r\n onPatch(url: string, delay?: number): CmatMockApiHandler {\r\n return this._registerHandler('patch', url, delay);\r\n }\r\n\r\n onPost(url: string, delay?: number): CmatMockApiHandler {\r\n return this._registerHandler('post', url, delay);\r\n }\r\n\r\n onPut(url: string, delay?: number): CmatMockApiHandler {\r\n return this._registerHandler('put', url, delay);\r\n }\r\n\r\n onHead(url: string, delay?: number): CmatMockApiHandler {\r\n return this._registerHandler('head', url, delay);\r\n }\r\n\r\n onJsonp(url: string, delay?: number): CmatMockApiHandler {\r\n return this._registerHandler('jsonp', url, delay);\r\n }\r\n\r\n onOptions(url: string, delay?: number): CmatMockApiHandler {\r\n return this._registerHandler('options', url, delay);\r\n }\r\n\r\n private _registerHandler(method: CmatMockApiMethods, url: string, delay?: number): CmatMockApiHandler {\r\n // Create a new instance of CmatMockApiRequestHandler\r\n const cmatMockHttp = new CmatMockApiHandler(url, delay);\r\n\r\n // Store the handler to access it from the interceptor\r\n this._handlers[method].set(url, cmatMockHttp);\r\n\r\n // Return the instance\r\n return cmatMockHttp;\r\n }\r\n}\r\n","import { isUndefined } from 'lodash-es';\r\n\r\nexport class CmatMockApiUtils {\r\n static guid(): string {\r\n \r\n\r\n let d = new Date().getTime();\r\n\r\n // Use high-precision timer if available\r\n if (!isUndefined(performance) && typeof performance.now === 'function') {\r\n d += performance.now();\r\n }\r\n\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\r\n const r = (d + Math.random() * 16) % 16 | 0;\r\n d = Math.floor(d / 16);\r\n return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16);\r\n });\r\n }\r\n}\r\n","import { HttpErrorResponse, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpResponse } from '@angular/common/http';\r\nimport { Inject, Injectable } from '@angular/core';\r\nimport { Observable, of, throwError } from 'rxjs';\r\nimport { delay, switchMap } from 'rxjs/operators';\r\nimport { CMAT_MOCK_API_DEFAULT_DELAY } from './mock-api.constants';\r\nimport { CmatMockApiService } from './mock-api.service';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatMockApiInterceptor implements HttpInterceptor {\r\n constructor(\r\n @Inject(CMAT_MOCK_API_DEFAULT_DELAY) private _defaultDelay: number,\r\n private _cmatMockApiService: CmatMockApiService\r\n ) {\r\n }\r\n\r\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\r\n // Try to get the request handler\r\n const {\r\n handler,\r\n urlParams\r\n } = this._cmatMockApiService.findHandler(request.method.toUpperCase(), request.url);\r\n\r\n // Pass through if the request handler does not exist\r\n if (!handler) {\r\n return next.handle(request);\r\n }\r\n\r\n // Set the intercepted request on the handler\r\n handler.request = request;\r\n\r\n // Set the url params on the handler\r\n handler.urlParams = urlParams;\r\n\r\n // Subscribe to the response function observable\r\n return handler.response.pipe(\r\n delay(handler.delay ?? this._defaultDelay ?? 0),\r\n switchMap((response: any) => {\r\n\r\n // If there is no response data,\r\n // throw an error response\r\n if (!response) {\r\n response = new HttpErrorResponse({\r\n error: 'NOT FOUND',\r\n status: 404,\r\n statusText: 'NOT FOUND'\r\n });\r\n\r\n return throwError(() => response);\r\n }\r\n\r\n // Parse the response data\r\n const data = {\r\n status: response[0],\r\n body: response[1]\r\n };\r\n\r\n // If the status code is in between 200 and 300,\r\n // return a success response\r\n if (data.status >= 200 && data.status < 300) {\r\n response = new HttpResponse({\r\n body: data.body,\r\n status: data.status,\r\n statusText: 'OK'\r\n });\r\n\r\n return of(response);\r\n }\r\n\r\n // For other status codes,\r\n // throw an error response\r\n response = new HttpErrorResponse({\r\n error: data.body.error,\r\n status: data.status,\r\n statusText: 'ERROR'\r\n });\r\n\r\n return throwError(() => response);\r\n }));\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.CmatMockApiService"],"mappings":";;;;;;;MAEa,2BAA2B,GAAG,IAAI,cAAc,CAAS,6BAA6B;;MCGtF,kBAAkB,CAAA;IAQ3B,WACW,CAAA,GAAW,EACX,KAAc,EAAA;QADd,IAAG,CAAA,GAAA,GAAH,GAAG;QACH,IAAK,CAAA,KAAA,GAAL,KAAK;QANR,IAAM,CAAA,MAAA,GAA6B,KAAK,CAAC;QACzC,IAAW,CA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CAAC,QAAQ,CAAC;;;;YAKvB,QAAQ,GAAG,IAAI,iBAAiB,CAAC;AAC7B,gBAAA,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK;gBACtB,MAAM,EAAE,IAAI,CAAC,MAAM;AACnB,gBAAA,UAAU,EAAE;AACf,aAAA,CAAC;AAEF,YAAA,OAAO,UAAU,CAAC,MAAM,QAAQ,CAAC;SACpC,CAAC,CAAC;;AArEF,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,kBAEnB,2BAA2B,EAAA,EAAA,EAAA,KAAA,EAAAA,kBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAF9B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,cAFnB,MAAM,EAAA,CAAA,CAAA;;2FAET,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAHlC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE;AACf,iBAAA;;0BAGQ,MAAM;2BAAC,2BAA2B;;;ACZ3C;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cmat-lib-mock-api.mjs","sources":["../../../projects/cmat/lib/mock-api/mock-api.constants.ts","../../../projects/cmat/lib/mock-api/mock-api.request-handler.ts","../../../projects/cmat/lib/mock-api/mock-api.service.ts","../../../projects/cmat/lib/mock-api/mock-api.utils.ts","../../../projects/cmat/lib/mock-api/mock-api.interceptor.ts","../../../projects/cmat/lib/mock-api/cmat-lib-mock-api.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\r\n\r\nexport const CMAT_MOCK_API_DEFAULT_DELAY = new InjectionToken<number>('CMAT_MOCK_API_DEFAULT_DELAY');\r\n","import { HttpRequest } from '@angular/common/http';\r\nimport { Observable, of, throwError } from 'rxjs';\r\nimport { take } from 'rxjs/operators';\r\nimport { CmatMockApiReplyCallback } from './mock-api.types';\r\n\r\nexport class CmatMockApiHandler {\r\n request!: HttpRequest<any>;\r\n urlParams!: Record<string, string>;\r\n\r\n private _reply: CmatMockApiReplyCallback = void 0;\r\n private _replyCount = 0;\r\n private _replied = 0;\r\n\r\n constructor(\r\n public url: string,\r\n public delay?: number\r\n ) {\r\n }\r\n\r\n get response(): Observable<any> {\r\n // If the execution limit has been reached, throw an error\r\n if (this._replyCount > 0 && this._replyCount <= this._replied) {\r\n return throwError(() => new Error('Execution limit has been reached!'));\r\n }\r\n\r\n // If the response callback has not been set, throw an error\r\n if (!this._reply) {\r\n return throwError(() => new Error('Response callback function does not exist!'));\r\n }\r\n\r\n // If the request has not been set, throw an error\r\n if (!this.request) {\r\n return throwError(() => new Error('Request does not exist!'));\r\n }\r\n\r\n // Increase the replied count\r\n this._replied++;\r\n\r\n // Execute the reply callback\r\n const replyResult = this._reply({\r\n request: this.request,\r\n urlParams: this.urlParams\r\n });\r\n\r\n // If the result of the reply callback is an observable...\r\n if (replyResult instanceof Observable) {\r\n // Return the result as it is\r\n return replyResult.pipe(take(1));\r\n }\r\n\r\n // Otherwise, return the result as an observable\r\n return of(replyResult).pipe(take(1));\r\n }\r\n\r\n reply(callback: CmatMockApiReplyCallback): void {\r\n // Store the reply\r\n this._reply = callback;\r\n }\r\n\r\n replyCount(count: number): void {\r\n // Store the reply count\r\n this._replyCount = count;\r\n }\r\n}\r\n\r\n\r\n","import { Injectable } from '@angular/core';\r\nimport { compact, fromPairs } from 'lodash-es';\r\nimport { CmatMockApiHandler } from './mock-api.request-handler';\r\nimport { CmatMockApiMethods } from './mock-api.types';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatMockApiService {\r\n private _handlers: Record<string, Map<string, CmatMockApiHandler>> = {\r\n 'get': new Map<string, CmatMockApiHandler>(),\r\n 'post': new Map<string, CmatMockApiHandler>(),\r\n 'patch': new Map<string, CmatMockApiHandler>(),\r\n 'delete': new Map<string, CmatMockApiHandler>(),\r\n 'put': new Map<string, CmatMockApiHandler>(),\r\n 'head': new Map<string, CmatMockApiHandler>(),\r\n 'jsonp': new Map<string, CmatMockApiHandler>(),\r\n 'options': new Map<string, CmatMockApiHandler>()\r\n };\r\n\r\n findHandler(method: string, url: string): { handler: CmatMockApiHandler | void; urlParams: Record<string, string> } {\r\n // Prepare the return object\r\n const matchingHandler: { handler: CmatMockApiHandler | void; urlParams: Record<string, string> } = {\r\n handler: void 0,\r\n urlParams: {}\r\n };\r\n\r\n // Split the url\r\n const urlParts = url.split('/');\r\n\r\n // Get all related request handlers\r\n const handlers = this._handlers[method.toLowerCase()];\r\n\r\n // Iterate through the handlers\r\n handlers.forEach((handler, handlerUrl) => {\r\n\r\n // Skip if there is already a matching handler\r\n if (matchingHandler.handler) {\r\n return;\r\n }\r\n\r\n // Split the handler url\r\n const handlerUrlParts = handlerUrl.split('/');\r\n\r\n // Skip if the lengths of the urls we are comparing are not the same\r\n if (urlParts.length !== handlerUrlParts.length) {\r\n return;\r\n }\r\n\r\n // Compare\r\n const matches = handlerUrlParts.every((handlerUrlPart, index) => handlerUrlPart === urlParts[index] || handlerUrlPart.startsWith(':'));\r\n\r\n // If there is a match...\r\n if (matches) {\r\n // Assign the matching handler\r\n matchingHandler.handler = handler;\r\n\r\n // Extract and assign the parameters\r\n matchingHandler.urlParams = fromPairs(compact(handlerUrlParts.map((handlerUrlPart, index) =>\r\n handlerUrlPart.startsWith(':') ? [handlerUrlPart.substring(1), urlParts[index]] : void 0\r\n )));\r\n }\r\n });\r\n\r\n return matchingHandler;\r\n }\r\n\r\n onDelete(url: string, delay?: number): CmatMockApiHandler {\r\n return this._registerHandler('delete', url, delay);\r\n }\r\n\r\n onGet(url: string, delay?: number): CmatMockApiHandler {\r\n return this._registerHandler('get', url, delay);\r\n }\r\n\r\n onPatch(url: string, delay?: number): CmatMockApiHandler {\r\n return this._registerHandler('patch', url, delay);\r\n }\r\n\r\n onPost(url: string, delay?: number): CmatMockApiHandler {\r\n return this._registerHandler('post', url, delay);\r\n }\r\n\r\n onPut(url: string, delay?: number): CmatMockApiHandler {\r\n return this._registerHandler('put', url, delay);\r\n }\r\n\r\n onHead(url: string, delay?: number): CmatMockApiHandler {\r\n return this._registerHandler('head', url, delay);\r\n }\r\n\r\n onJsonp(url: string, delay?: number): CmatMockApiHandler {\r\n return this._registerHandler('jsonp', url, delay);\r\n }\r\n\r\n onOptions(url: string, delay?: number): CmatMockApiHandler {\r\n return this._registerHandler('options', url, delay);\r\n }\r\n\r\n private _registerHandler(method: CmatMockApiMethods, url: string, delay?: number): CmatMockApiHandler {\r\n // Create a new instance of CmatMockApiRequestHandler\r\n const cmatMockHttp = new CmatMockApiHandler(url, delay);\r\n\r\n // Store the handler to access it from the interceptor\r\n this._handlers[method].set(url, cmatMockHttp);\r\n\r\n // Return the instance\r\n return cmatMockHttp;\r\n }\r\n}\r\n","import { isUndefined } from 'lodash-es';\r\n\r\nexport class CmatMockApiUtils {\r\n static guid(): string {\r\n \r\n\r\n let d = new Date().getTime();\r\n\r\n // Use high-precision timer if available\r\n if (!isUndefined(performance) && typeof performance.now === 'function') {\r\n d += performance.now();\r\n }\r\n\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\r\n const r = (d + Math.random() * 16) % 16 | 0;\r\n d = Math.floor(d / 16);\r\n return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16);\r\n });\r\n }\r\n}\r\n","import { HttpErrorResponse, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpResponse } from '@angular/common/http';\r\nimport { Injectable, inject } from '@angular/core';\r\nimport { Observable, of, throwError } from 'rxjs';\r\nimport { delay, switchMap } from 'rxjs/operators';\r\nimport { CMAT_MOCK_API_DEFAULT_DELAY } from './mock-api.constants';\r\nimport { CmatMockApiService } from './mock-api.service';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatMockApiInterceptor implements HttpInterceptor {\r\n private _defaultDelay = inject(CMAT_MOCK_API_DEFAULT_DELAY);\r\n private _cmatMockApiService = inject(CmatMockApiService);\r\n\r\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\r\n // Try to get the request handler\r\n const {\r\n handler,\r\n urlParams\r\n } = this._cmatMockApiService.findHandler(request.method.toUpperCase(), request.url);\r\n\r\n // Pass through if the request handler does not exist\r\n if (!handler) {\r\n return next.handle(request);\r\n }\r\n\r\n // Set the intercepted request on the handler\r\n handler.request = request;\r\n\r\n // Set the url params on the handler\r\n handler.urlParams = urlParams;\r\n\r\n // Subscribe to the response function observable\r\n return handler.response.pipe(\r\n delay(handler.delay ?? this._defaultDelay ?? 0),\r\n switchMap((response: any) => {\r\n\r\n // If there is no response data,\r\n // throw an error response\r\n if (!response) {\r\n response = new HttpErrorResponse({\r\n error: 'NOT FOUND',\r\n status: 404,\r\n statusText: 'NOT FOUND'\r\n });\r\n\r\n return throwError(() => response);\r\n }\r\n\r\n // Parse the response data\r\n const data = {\r\n status: response[0],\r\n body: response[1]\r\n };\r\n\r\n // If the status code is in between 200 and 300,\r\n // return a success response\r\n if (data.status >= 200 && data.status < 300) {\r\n response = new HttpResponse({\r\n body: data.body,\r\n status: data.status,\r\n statusText: 'OK'\r\n });\r\n\r\n return of(response);\r\n }\r\n\r\n // For other status codes,\r\n // throw an error response\r\n response = new HttpErrorResponse({\r\n error: data.body.error,\r\n status: data.status,\r\n statusText: 'ERROR'\r\n });\r\n\r\n return throwError(() => response);\r\n }));\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAEa,2BAA2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A,IAAI,IAAI,CAAC,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,MAAM,GAAG,GAAG,EAAE;gBACzC,QAAQ,GAAG,IAAI,YAAY,CAAC;oBACxB,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,MAAM,EAAE,IAAI,CAAC,MAAM;AACnB,oBAAA,UAAU,EAAE;AACf,iBAAA,CAAC;AAEF,gBAAA,OAAO,EAAE,CAAC,QAAQ,CAAC;;;;YAKvB,QAAQ,GAAG,IAAI,iBAAiB,CAAC;AAC7B,gBAAA,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK;gBACtB,MAAM,EAAE,IAAI,CAAC,MAAM;AACnB,gBAAA,UAAU,EAAE;AACf,aAAA,CAAC;AAEF,YAAA,OAAO,UAAU,CAAC,MAAM,QAAQ,CAAC;SACpC,CAAC,CAAC;;8GAlEF,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,cAFnB,MAAM,EAAA,CAAA,CAAA;;2FAET,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAHlC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE;AACf,iBAAA;;;ACTD;;AAEG;;;;"}
|
|
@@ -13,14 +13,13 @@ class CmatBytesPipe {
|
|
|
13
13
|
const size = Math.floor(Math.log(bytes) / Math.log(1024));
|
|
14
14
|
return (bytes / Math.pow(1024, Math.floor(size))).toFixed(1) + ' ' + units[size];
|
|
15
15
|
}
|
|
16
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
17
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
16
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatBytesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
17
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.2", ngImport: i0, type: CmatBytesPipe, isStandalone: true, name: "cmatBytes" }); }
|
|
18
18
|
}
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatBytesPipe, decorators: [{
|
|
20
20
|
type: Pipe,
|
|
21
21
|
args: [{
|
|
22
|
-
name: 'cmatBytes'
|
|
23
|
-
standalone: true
|
|
22
|
+
name: 'cmatBytes'
|
|
24
23
|
}]
|
|
25
24
|
}] });
|
|
26
25
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmat-pipes-bytes.mjs","sources":["../../../projects/cmat/pipes/bytes/bytes.pipe.ts","../../../projects/cmat/pipes/bytes/cmat-pipes-bytes.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n name: 'cmatBytes'
|
|
1
|
+
{"version":3,"file":"cmat-pipes-bytes.mjs","sources":["../../../projects/cmat/pipes/bytes/bytes.pipe.ts","../../../projects/cmat/pipes/bytes/cmat-pipes-bytes.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n name: 'cmatBytes'\r\n})\r\nexport class CmatBytesPipe implements PipeTransform {\r\n public transform(bytes: number): string {\r\n if (isNaN(parseFloat('' + bytes)) || !isFinite(bytes)) {\r\n return '-';\r\n }\r\n if (bytes <= 0) {\r\n return '0';\r\n }\r\n const units = ['bytes', 'KB', 'MB', 'GB', 'TB', 'PB'];\r\n const size = Math.floor(Math.log(bytes) / Math.log(1024));\r\n return (bytes / Math.pow(1024, Math.floor(size))).toFixed(1) + ' ' + units[size];\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAKa,aAAa,CAAA;AACf,IAAA,SAAS,CAAC,KAAa,EAAA;AAC1B,QAAA,IAAI,KAAK,CAAC,UAAU,CAAC,EAAE,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;AACnD,YAAA,OAAO,GAAG;;AAEd,QAAA,IAAI,KAAK,IAAI,CAAC,EAAE;AACZ,YAAA,OAAO,GAAG;;AAEd,QAAA,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;QACrD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACzD,QAAA,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC;;8GAV3E,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAAb,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,CAAA;;2FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBAHzB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,IAAI,EAAE;AACT,iBAAA;;;ACJD;;AAEG;;;;"}
|
|
@@ -8,14 +8,13 @@ class CmatDateFormatPipe {
|
|
|
8
8
|
return dayjs(value).format(format);
|
|
9
9
|
return '';
|
|
10
10
|
}
|
|
11
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
12
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
11
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatDateFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
12
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.2", ngImport: i0, type: CmatDateFormatPipe, isStandalone: true, name: "cmatDateFormat" }); }
|
|
13
13
|
}
|
|
14
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatDateFormatPipe, decorators: [{
|
|
15
15
|
type: Pipe,
|
|
16
16
|
args: [{
|
|
17
|
-
name: 'cmatDateFormat'
|
|
18
|
-
standalone: true
|
|
17
|
+
name: 'cmatDateFormat'
|
|
19
18
|
}]
|
|
20
19
|
}] });
|
|
21
20
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmat-pipes-date-format.mjs","sources":["../../../projects/cmat/pipes/date-format/date-format.pipe.ts","../../../projects/cmat/pipes/date-format/cmat-pipes-date-format.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\r\nimport dayjs from 'dayjs';\r\n\r\n@Pipe({\r\n name: 'cmatDateFormat'
|
|
1
|
+
{"version":3,"file":"cmat-pipes-date-format.mjs","sources":["../../../projects/cmat/pipes/date-format/date-format.pipe.ts","../../../projects/cmat/pipes/date-format/cmat-pipes-date-format.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\r\nimport dayjs from 'dayjs';\r\n\r\n@Pipe({\r\n name: 'cmatDateFormat'\r\n})\r\nexport class CmatDateFormatPipe implements PipeTransform {\r\n transform(value: string | Date | void, format: string): string {\r\n if (value)\r\n return dayjs(value).format(format);\r\n\r\n return '';\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAMa,kBAAkB,CAAA;IAC3B,SAAS,CAAC,KAA2B,EAAE,MAAc,EAAA;AACjD,QAAA,IAAI,KAAK;YACL,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;AAEtC,QAAA,OAAO,EAAE;;8GALJ,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,gBAAA,EAAA,CAAA,CAAA;;2FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAH9B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,IAAI,EAAE;AACT,iBAAA;;;ACLD;;AAEG;;;;"}
|
|
@@ -10,15 +10,14 @@ class CmatFindByKeyPipe {
|
|
|
10
10
|
// If the value is a string...
|
|
11
11
|
return source.find(sourceItem => sourceItem[key] === value);
|
|
12
12
|
}
|
|
13
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
14
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
13
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatFindByKeyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
14
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.2", ngImport: i0, type: CmatFindByKeyPipe, isStandalone: true, name: "cmatFindByKey", pure: false }); }
|
|
15
15
|
}
|
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatFindByKeyPipe, decorators: [{
|
|
17
17
|
type: Pipe,
|
|
18
18
|
args: [{
|
|
19
19
|
name: 'cmatFindByKey',
|
|
20
|
-
pure: false
|
|
21
|
-
standalone: true
|
|
20
|
+
pure: false
|
|
22
21
|
}]
|
|
23
22
|
}] });
|
|
24
23
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmat-pipes-find-by-key.mjs","sources":["../../../projects/cmat/pipes/find-by-key/find-by-key.pipe.ts","../../../projects/cmat/pipes/find-by-key/cmat-pipes-find-by-key.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n name: 'cmatFindByKey',\r\n pure: false
|
|
1
|
+
{"version":3,"file":"cmat-pipes-find-by-key.mjs","sources":["../../../projects/cmat/pipes/find-by-key/find-by-key.pipe.ts","../../../projects/cmat/pipes/find-by-key/cmat-pipes-find-by-key.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n name: 'cmatFindByKey',\r\n pure: false\r\n})\r\nexport class CmatFindByKeyPipe implements PipeTransform {\r\n transform(value: string | string[], key: string, source: any[]): any {\r\n // If the given value is an array of strings...\r\n if (Array.isArray(value)) {\r\n return value.map(item => source.find(sourceItem => sourceItem[key] === item));\r\n }\r\n\r\n // If the value is a string...\r\n return source.find(sourceItem => sourceItem[key] === value);\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAMa,iBAAiB,CAAA;AAC1B,IAAA,SAAS,CAAC,KAAwB,EAAE,GAAW,EAAE,MAAa,EAAA;;AAE1D,QAAA,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACtB,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC;;;AAIjF,QAAA,OAAO,MAAM,CAAC,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC;;8GARtD,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,eAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,IAAI,EAAE,eAAe;AACrB,oBAAA,IAAI,EAAE;AACT,iBAAA;;;ACLD;;AAEG;;;;"}
|
|
@@ -17,14 +17,13 @@ class CmatGroupByPipe {
|
|
|
17
17
|
}, {});
|
|
18
18
|
return Object.keys(groupedObj).map(key => ({ key, value: groupedObj[key] }));
|
|
19
19
|
}
|
|
20
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
21
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
20
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatGroupByPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
21
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.2", ngImport: i0, type: CmatGroupByPipe, isStandalone: true, name: "cmatGroupBy" }); }
|
|
22
22
|
}
|
|
23
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatGroupByPipe, decorators: [{
|
|
24
24
|
type: Pipe,
|
|
25
25
|
args: [{
|
|
26
|
-
name: 'cmatGroupBy'
|
|
27
|
-
standalone: true
|
|
26
|
+
name: 'cmatGroupBy'
|
|
28
27
|
}]
|
|
29
28
|
}] });
|
|
30
29
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmat-pipes-group-by.mjs","sources":["../../../projects/cmat/pipes/group-by/group-by.pipe.ts","../../../projects/cmat/pipes/group-by/cmat-pipes-group-by.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n name: 'cmatGroupBy'
|
|
1
|
+
{"version":3,"file":"cmat-pipes-group-by.mjs","sources":["../../../projects/cmat/pipes/group-by/group-by.pipe.ts","../../../projects/cmat/pipes/group-by/cmat-pipes-group-by.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n name: 'cmatGroupBy'\r\n})\r\nexport class CmatGroupByPipe implements PipeTransform {\r\n\r\n transform(value: any[], field: string): any[] {\r\n\r\n if (!value) {\r\n return value;\r\n }\r\n\r\n const groupedObj = value.reduce((prev, cur) => {\r\n if (!prev[cur[field]]) {\r\n prev[cur[field]] = [cur];\r\n } else {\r\n prev[cur[field]].push(cur);\r\n }\r\n\r\n return prev;\r\n }, {});\r\n\r\n return Object.keys(groupedObj).map(key => ({ key, value: groupedObj[key] }));\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAKa,eAAe,CAAA;IAExB,SAAS,CAAC,KAAY,EAAE,KAAa,EAAA;QAEjC,IAAI,CAAC,KAAK,EAAE;AACR,YAAA,OAAO,KAAK;;QAGhB,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,GAAG,KAAI;YAC1C,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;gBACnB,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;;iBACrB;gBACH,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;;AAG9B,YAAA,OAAO,IAAI;SACd,EAAE,EAAE,CAAC;QAEN,OAAO,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;;8GAlBvE,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,aAAA,EAAA,CAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAH3B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,IAAI,EAAE;AACT,iBAAA;;;ACJD;;AAEG;;;;"}
|
|
@@ -14,14 +14,13 @@ class CmatKeysPipe {
|
|
|
14
14
|
}
|
|
15
15
|
return keys;
|
|
16
16
|
}
|
|
17
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
18
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
17
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatKeysPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
18
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.2", ngImport: i0, type: CmatKeysPipe, isStandalone: true, name: "cmatKeys" }); }
|
|
19
19
|
}
|
|
20
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatKeysPipe, decorators: [{
|
|
21
21
|
type: Pipe,
|
|
22
22
|
args: [{
|
|
23
|
-
name: 'cmatKeys'
|
|
24
|
-
standalone: true
|
|
23
|
+
name: 'cmatKeys'
|
|
25
24
|
}]
|
|
26
25
|
}] });
|
|
27
26
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmat-pipes-keys.mjs","sources":["../../../projects/cmat/pipes/keys/keys.pipe.ts","../../../projects/cmat/pipes/keys/cmat-pipes-keys.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n name: 'cmatKeys'
|
|
1
|
+
{"version":3,"file":"cmat-pipes-keys.mjs","sources":["../../../projects/cmat/pipes/keys/keys.pipe.ts","../../../projects/cmat/pipes/keys/cmat-pipes-keys.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n name: 'cmatKeys'\r\n})\r\nexport class CmatKeysPipe implements PipeTransform {\r\n transform(value: any): any {\r\n const keys: any[] = [];\r\n\r\n for (const key in value) {\r\n if (Object.prototype.hasOwnProperty.call(value, key)) {\r\n keys.push({\r\n key: key,\r\n value: value[key]\r\n });\r\n }\r\n }\r\n\r\n return keys;\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAKa,YAAY,CAAA;AACrB,IAAA,SAAS,CAAC,KAAU,EAAA;QAChB,MAAM,IAAI,GAAU,EAAE;AAEtB,QAAA,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE;AACrB,YAAA,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE;gBAClD,IAAI,CAAC,IAAI,CAAC;AACN,oBAAA,GAAG,EAAE,GAAG;AACR,oBAAA,KAAK,EAAE,KAAK,CAAC,GAAG;AACnB,iBAAA,CAAC;;;AAIV,QAAA,OAAO,IAAI;;8GAbN,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,CAAA;;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAHxB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,IAAI,EAAE;AACT,iBAAA;;;ACJD;;AAEG;;;;"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
1
2
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Pipe } from '@angular/core';
|
|
3
|
+
import { inject, Pipe } from '@angular/core';
|
|
4
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
3
5
|
import { Subject } from 'rxjs';
|
|
4
6
|
import { takeUntil, map } from 'rxjs/operators';
|
|
7
|
+
import { CmatUrlStateConfigService } from 'cmat/services/config';
|
|
5
8
|
import { CmatUtilsService } from 'cmat/services/utils';
|
|
6
|
-
import * as i1 from '@angular/common/http';
|
|
7
|
-
import * as i2 from '@angular/platform-browser';
|
|
8
|
-
import * as i3 from 'cmat/services/config';
|
|
9
9
|
|
|
10
10
|
class CmatSecurePipe {
|
|
11
|
-
constructor(
|
|
12
|
-
this._http =
|
|
13
|
-
this._sanitizer =
|
|
14
|
-
this._urlStateConfigService =
|
|
11
|
+
constructor() {
|
|
12
|
+
this._http = inject(HttpClient);
|
|
13
|
+
this._sanitizer = inject(DomSanitizer);
|
|
14
|
+
this._urlStateConfigService = inject(CmatUrlStateConfigService);
|
|
15
15
|
this._unsubscribeAll = new Subject();
|
|
16
16
|
this._urlStateConfigService.config$
|
|
17
17
|
.pipe(takeUntil(this._unsubscribeAll))
|
|
@@ -34,16 +34,15 @@ class CmatSecurePipe {
|
|
|
34
34
|
})
|
|
35
35
|
.pipe(map((val) => this._sanitizer.bypassSecurityTrustUrl(URL.createObjectURL(val))));
|
|
36
36
|
}
|
|
37
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
38
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
37
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatSecurePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
38
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.0.2", ngImport: i0, type: CmatSecurePipe, isStandalone: true, name: "cmatSecure" }); }
|
|
39
39
|
}
|
|
40
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImport: i0, type: CmatSecurePipe, decorators: [{
|
|
41
41
|
type: Pipe,
|
|
42
42
|
args: [{
|
|
43
|
-
name: 'cmatSecure'
|
|
44
|
-
standalone: true
|
|
43
|
+
name: 'cmatSecure'
|
|
45
44
|
}]
|
|
46
|
-
}], ctorParameters: () => [
|
|
45
|
+
}], ctorParameters: () => [] });
|
|
47
46
|
|
|
48
47
|
/**
|
|
49
48
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmat-pipes-secure.mjs","sources":["../../../projects/cmat/pipes/secure/secure-pipe.ts","../../../projects/cmat/pipes/secure/cmat-pipes-secure.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\r\nimport { OnDestroy, Pipe, PipeTransform } from '@angular/core';\r\nimport { DomSanitizer, SafeUrl } from '@angular/platform-browser';\r\nimport { Observable, Subject } from 'rxjs';\r\nimport { map, takeUntil } from 'rxjs/operators';\r\nimport { CmatUrlStateConfigService, IUrlStateConfig } from 'cmat/services/config';\r\nimport { CmatUtilsService } from 'cmat/services/utils';\r\n\r\n\r\n@Pipe({\r\n name: 'cmatSecure'
|
|
1
|
+
{"version":3,"file":"cmat-pipes-secure.mjs","sources":["../../../projects/cmat/pipes/secure/secure-pipe.ts","../../../projects/cmat/pipes/secure/cmat-pipes-secure.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\r\nimport { OnDestroy, Pipe, PipeTransform, inject } from '@angular/core';\r\nimport { DomSanitizer, SafeUrl } from '@angular/platform-browser';\r\nimport { Observable, Subject } from 'rxjs';\r\nimport { map, takeUntil } from 'rxjs/operators';\r\nimport { CmatUrlStateConfigService, IUrlStateConfig } from 'cmat/services/config';\r\nimport { CmatUtilsService } from 'cmat/services/utils';\r\n\r\n\r\n@Pipe({\r\n name: 'cmatSecure'\r\n})\r\nexport class CmatSecurePipe implements PipeTransform, OnDestroy {\r\n private _http = inject(HttpClient);\r\n private _sanitizer = inject(DomSanitizer);\r\n private _urlStateConfigService = inject(CmatUrlStateConfigService);\r\n\r\n private _config: IUrlStateConfig;\r\n private _unsubscribeAll: Subject<void> = new Subject<void>();\r\n\r\n \r\n\r\n constructor() {\r\n this._urlStateConfigService.config$\r\n .pipe(takeUntil(this._unsubscribeAll))\r\n .subscribe((config: IUrlStateConfig) => {\r\n this._config = config;\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._unsubscribeAll.next(void 0);\r\n this._unsubscribeAll.complete();\r\n }\r\n\r\n transform(fileId: string): Observable<SafeUrl> {\r\n return this._http\r\n .get(`${this._config.fileUrl}/download/${fileId}`, {\r\n headers: CmatUtilsService.getRequestCryptoHeaders(fileId.toString()),\r\n responseType: 'blob',\r\n params: {\r\n isStream: false\r\n }\r\n })\r\n .pipe(map((val: Blob | MediaSource) => this._sanitizer.bypassSecurityTrustUrl(URL.createObject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