cmat 0.0.28 → 0.0.29
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 +188 -5
- package/components/breadcrumb/index.d.ts +245 -3
- package/components/card/index.d.ts +20 -5
- package/components/carousel/index.d.ts +177 -5
- package/components/cascade/index.d.ts +102 -5
- package/components/chip-input/index.d.ts +65 -5
- package/components/custom-formly/index.d.ts +677 -5
- package/components/date-range/index.d.ts +140 -5
- package/components/drawer/index.d.ts +105 -5
- package/components/fullscreen/index.d.ts +14 -5
- package/components/highlight/index.d.ts +30 -5
- package/components/image-viewer/index.d.ts +79 -5
- package/components/json-editor/index.d.ts +28 -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 +756 -3
- package/components/navigation/index.d.ts +320 -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 +122 -5
- package/components/password-strength/index.d.ts +92 -5
- package/components/popover/index.d.ts +292 -3
- package/components/progress-bar/index.d.ts +21 -5
- package/components/rating/index.d.ts +61 -5
- package/components/select-search/index.d.ts +109 -5
- package/components/select-table/index.d.ts +120 -5
- package/components/select-tree/index.d.ts +119 -5
- package/components/speed-dial/index.d.ts +67 -5
- package/components/timeline/index.d.ts +57 -5
- package/components/toast/index.d.ts +86 -5
- package/components/transfer-picker/index.d.ts +189 -3
- package/components/treetable/index.d.ts +44 -5
- package/components/upload/index.d.ts +115 -5
- package/components/x6-angular-shape/index.d.ts +43 -5
- package/directives/animate-on-scroll/index.d.ts +45 -5
- package/directives/arrow-cursor/index.d.ts +34 -5
- package/directives/autofocus/index.d.ts +11 -5
- package/directives/data-exporter/index.d.ts +54 -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 +15 -5
- package/fesm2022/cmat-components-adapter.mjs +9 -9
- package/fesm2022/cmat-components-breadcrumb.mjs +9 -9
- package/fesm2022/cmat-components-card.mjs +3 -3
- package/fesm2022/cmat-components-carousel.mjs +21 -23
- package/fesm2022/cmat-components-carousel.mjs.map +1 -1
- package/fesm2022/cmat-components-cascade.mjs +9 -9
- package/fesm2022/cmat-components-cascade.mjs.map +1 -1
- package/fesm2022/cmat-components-chip-input.mjs +4 -4
- package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
- package/fesm2022/cmat-components-custom-formly.mjs +96 -96
- package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
- package/fesm2022/cmat-components-date-range.mjs +5 -5
- package/fesm2022/cmat-components-date-range.mjs.map +1 -1
- package/fesm2022/cmat-components-drawer.mjs +6 -6
- package/fesm2022/cmat-components-fullscreen.mjs +5 -5
- package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
- package/fesm2022/cmat-components-highlight.mjs +6 -6
- package/fesm2022/cmat-components-image-viewer.mjs +5 -5
- package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
- package/fesm2022/cmat-components-json-editor.mjs +3 -3
- package/fesm2022/cmat-components-knob-input.mjs +5 -5
- 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 +3 -3
- package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-material-datetimepicker.mjs +45 -47
- package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
- package/fesm2022/cmat-components-navigation.mjs +46 -46
- package/fesm2022/cmat-components-navigation.mjs.map +1 -1
- package/fesm2022/cmat-components-opt-input.mjs +7 -7
- 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 +14 -18
- 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 +9 -9
- package/fesm2022/cmat-components-progress-bar.mjs +3 -3
- package/fesm2022/cmat-components-rating.mjs +3 -3
- package/fesm2022/cmat-components-select-search.mjs +10 -10
- package/fesm2022/cmat-components-select-search.mjs.map +1 -1
- package/fesm2022/cmat-components-select-table.mjs +3 -3
- package/fesm2022/cmat-components-select-tree.mjs +3 -3
- package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
- package/fesm2022/cmat-components-speed-dial.mjs +13 -16
- package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
- package/fesm2022/cmat-components-timeline.mjs +12 -12
- package/fesm2022/cmat-components-toast.mjs +9 -9
- package/fesm2022/cmat-components-transfer-picker.mjs +20 -20
- package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-treetable.mjs +6 -6
- package/fesm2022/cmat-components-treetable.mjs.map +1 -1
- package/fesm2022/cmat-components-upload.mjs +10 -10
- package/fesm2022/cmat-components-upload.mjs.map +1 -1
- package/fesm2022/cmat-directives-animate-on-scroll.mjs +6 -6
- package/fesm2022/cmat-directives-arrow-cursor.mjs +4 -5
- package/fesm2022/cmat-directives-arrow-cursor.mjs.map +1 -1
- package/fesm2022/cmat-directives-autofocus.mjs +3 -3
- package/fesm2022/cmat-directives-data-exporter.mjs +22 -24
- package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -1
- package/fesm2022/cmat-directives-debounce.mjs +9 -9
- package/fesm2022/cmat-directives-digit-only.mjs +6 -6
- package/fesm2022/cmat-directives-equal-validator.mjs +3 -3
- package/fesm2022/cmat-lib-mock-api.mjs +6 -6
- package/fesm2022/cmat-pipes-bytes.mjs +3 -3
- package/fesm2022/cmat-pipes-date-format.mjs +3 -3
- package/fesm2022/cmat-pipes-find-by-key.mjs +3 -3
- package/fesm2022/cmat-pipes-group-by.mjs +3 -3
- package/fesm2022/cmat-pipes-keys.mjs +3 -3
- package/fesm2022/cmat-pipes-secure.mjs +3 -3
- package/fesm2022/cmat-pipes-uppercase.mjs +3 -3
- package/fesm2022/cmat-services-alert.mjs +7 -16
- package/fesm2022/cmat-services-alert.mjs.map +1 -1
- package/fesm2022/cmat-services-config.mjs +6 -6
- package/fesm2022/cmat-services-confirmation.mjs +6 -6
- package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
- package/fesm2022/cmat-services-data.mjs +3 -3
- package/fesm2022/cmat-services-export-as.mjs +3 -3
- package/fesm2022/cmat-services-loading.mjs +6 -6
- package/fesm2022/cmat-services-local-storage.mjs +3 -3
- package/fesm2022/cmat-services-media-watcher.mjs +3 -3
- package/fesm2022/cmat-services-platform.mjs +3 -3
- package/fesm2022/cmat-services-splash-screen.mjs +4 -5
- package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
- package/fesm2022/cmat-services-title.mjs +3 -3
- package/fesm2022/cmat-services-translation.mjs +3 -3
- 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 +61 -5
- package/package.json +51 -51
- 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 +21 -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 +44 -5
- package/services/data/index.d.ts +23 -5
- package/services/export-as/index.d.ts +55 -5
- package/services/loading/index.d.ts +36 -5
- package/services/local-storage/index.d.ts +11 -5
- package/services/media-watcher/index.d.ts +23 -5
- package/services/platform/index.d.ts +12 -5
- package/services/splash-screen/index.d.ts +17 -5
- package/services/title/index.d.ts +16 -5
- package/services/translation/index.d.ts +23 -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-services-alert.mjs","sources":["../../../projects/cmat/services/alert/alert.dialog.ts","../../../projects/cmat/services/alert/alert.message.ts","../../../projects/cmat/services/alert/enum.ts","../../../projects/cmat/services/alert/alert.service.ts","../../../projects/cmat/services/alert/cmat-services-alert.ts"],"sourcesContent":["import { CmatDialogType } from './enum';\r\n\r\nexport class CmatAlertDialog {\r\n constructor(public message: string, public type: CmatDialogType, public okCallback?: (val?: any) => any, public cancelCallback?: () => any,\r\n public defaultValue?: string, public okLabel?: string, public cancelLabel?: string) {\r\n\r\n }\r\n}\r\n","import { CmatMessageSeverity } from './enum';\r\n\r\nexport class CmatAlertMessage {\r\n constructor(public severity: CmatMessageSeverity, public summary: string, public detail: string, public isPostionBottom: boolean = false) { }\r\n}\r\n","export enum CmatDialogType {\r\n alert,\r\n confirm,\r\n prompt\r\n}\r\n\r\nexport enum CmatMessageSeverity {\r\n info = 'info',\r\n success = 'success',\r\n error = 'error',\r\n warning = 'warning',\r\n wait = 'wait'\r\n}\r\n","/* eslint-disable no-dupe-class-members */\r\nimport { HttpResponseBase } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable, Subject } from 'rxjs';\r\nimport { CmatUtilsService } from 'cmat/services/utils';\r\nimport { CmatAlertDialog } from './alert.dialog';\r\nimport { CmatAlertMessage } from './alert.message';\r\nimport { CmatDialogType, CmatMessageSeverity } from './enum';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatAlertService {\r\n private _messages = new Subject<CmatAlertMessage>();\r\n private _stickyMessages = new Subject<CmatAlertMessage | void>();\r\n private _dialogs = new Subject<CmatAlertDialog>();\r\n\r\n private _isLoading = new Subject<boolean>();\r\n private _loadingMessageId: any;\r\n\r\n get dialogEvent$(): Observable<CmatAlertDialog> {\r\n return this._dialogs.asObservable();\r\n }\r\n\r\n\r\n get messageEvent$(): Observable<CmatAlertMessage> {\r\n return this._messages.asObservable();\r\n }\r\n\r\n get stickyMessageEvent$(): Observable<CmatAlertMessage | void> {\r\n return this._stickyMessages.asObservable();\r\n }\r\n\r\n get isLoadingInProgress$(): Observable<boolean> {\r\n return this._isLoading.asObservable();\r\n }\r\n\r\n showDialog(message: string, type?: CmatDialogType, okCallback?: (val?: any) => any, cancelCallback?: () => any,\r\n okLabel?: string, cancelLabel?: string, defaultValue?: string): void {\r\n\r\n if (!type) {\r\n type = CmatDialogType.alert;\r\n }\r\n\r\n this._dialogs.next({\r\n message: message,\r\n type: type,\r\n okCallback: okCallback,\r\n cancelCallback: cancelCallback,\r\n okLabel: okLabel,\r\n cancelLabel: cancelLabel,\r\n defaultValue: defaultValue\r\n });\r\n }\r\n\r\n showMessage(summary: string): void;\r\n showMessage(detail: string | string[] | HttpResponseBase, params: string, severity: CmatMessageSeverity): void;\r\n showMessage(data: any, separatorOrDetail?: string, severity?: CmatMessageSeverity): void {\r\n if (!severity) {\r\n severity = CmatMessageSeverity.info;\r\n }\r\n\r\n if (data instanceof HttpResponseBase) {\r\n data = CmatUtilsService.getHttpResponseMessage(data);\r\n separatorOrDetail = CmatUtilsService.captionAndMessageSeparator;\r\n }\r\n\r\n if (data instanceof Array) {\r\n for (const message of data) {\r\n const msgObject = CmatUtilsService.splitInTwo(message, separatorOrDetail);\r\n\r\n this._showMessageHelper(msgObject.firstPart, msgObject.secondPart ?? '', severity, false);\r\n }\r\n } else {\r\n this._showMessageHelper(data, separatorOrDetail ?? '', severity, false);\r\n }\r\n }\r\n\r\n showBottomMessage(summary: string): void;\r\n showBottomMessage(summary: string, detail: string, severity: CmatMessageSeverity): void;\r\n showBottomMessage(data: any, separatorOrDetail?: string, severity?: CmatMessageSeverity): void {\r\n if (!severity) {\r\n severity = CmatMessageSeverity.info;\r\n }\r\n\r\n if (data instanceof HttpResponseBase) {\r\n data = CmatUtilsService.getHttpResponseMessage(data);\r\n separatorOrDetail = CmatUtilsService.captionAndMessageSeparator;\r\n }\r\n\r\n if (data instanceof Array) {\r\n for (const message of data) {\r\n const msgObject = CmatUtilsService.splitInTwo(message, separatorOrDetail);\r\n\r\n this._showMessageHelper(msgObject.firstPart, msgObject.secondPart ?? '', severity, true, true);\r\n }\r\n } else {\r\n this._showMessageHelper(data, separatorOrDetail ?? '', severity, true, true);\r\n }\r\n }\r\n\r\n\r\n showStickyMessage(summary: string): void;\r\n showStickyMessage(summary: string, detail: string, severity: CmatMessageSeverity, error?: any): void;\r\n showStickyMessage(detail: string[] | HttpResponseBase, params: string, severity: CmatMessageSeverity): void;\r\n showStickyMessage(data: string | string[] | HttpResponseBase, separatorOrDetail?: string, severity?: CmatMessageSeverity, error?: any): void {\r\n\r\n if (!severity) {\r\n severity = CmatMessageSeverity.info;\r\n }\r\n\r\n if (data instanceof HttpResponseBase) {\r\n data = CmatUtilsService.getHttpResponseMessage(data);\r\n separatorOrDetail = CmatUtilsService.captionAndMessageSeparator;\r\n }\r\n\r\n\r\n if (data instanceof Array) {\r\n for (const message of data) {\r\n const msgObject = CmatUtilsService.splitInTwo(message, separatorOrDetail); this._showMessageHelper(msgObject.firstPart, msgObject.secondPart ?? '', severity, true);\r\n }\r\n } else {\r\n if (error) {\r\n\r\n const msg = `Message.Severity: \"${CmatMessageSeverity[severity]}\", Message.Summary: \"${data}\", \r\n Message.Detail: \"${separatorOrDetail}\", Message.Error: \"${CmatUtilsService.safeStringify(error)}\"`;\r\n\r\n switch (severity) {\r\n case CmatMessageSeverity.info:\r\n this.logInfo(msg);\r\n break;\r\n case CmatMessageSeverity.success:\r\n this.logMessage(msg);\r\n break;\r\n case CmatMessageSeverity.error:\r\n this.logError(msg);\r\n break;\r\n case CmatMessageSeverity.warning:\r\n this.logWarning(msg);\r\n break;\r\n case CmatMessageSeverity.wait:\r\n this.logTrace(msg);\r\n break;\r\n }\r\n }\r\n\r\n this._showMessageHelper((data) as any, separatorOrDetail ?? '', severity, true);\r\n }\r\n }\r\n\r\n startLoadingMessage(message = '载入中...', caption = ''): void {\r\n this._isLoading.next(true);\r\n clearTimeout(this._loadingMessageId);\r\n\r\n this._loadingMessageId = setTimeout(() => {\r\n this.showStickyMessage(caption, message, CmatMessageSeverity.wait);\r\n }, 1000);\r\n }\r\n\r\n stopLoadingMessage(): void {\r\n this._isLoading.next(false);\r\n clearTimeout(this._loadingMessageId);\r\n this.resetStickyMessage();\r\n }\r\n\r\n\r\n logDebug(msg: any): void {\r\n console.debug(msg);\r\n }\r\n\r\n logError(msg: any): void {\r\n console.error(msg);\r\n }\r\n\r\n logInfo(msg: any): void {\r\n console.info(msg);\r\n }\r\n\r\n logMessage(msg: any): void {\r\n console.log(msg);\r\n }\r\n\r\n logTrace(msg: any): void {\r\n console.trace(msg);\r\n }\r\n\r\n logWarning(msg: any): void {\r\n console.warn(msg);\r\n }\r\n\r\n resetStickyMessage(): void {\r\n this._stickyMessages.next(void 0);\r\n }\r\n\r\n private _showMessageHelper(summary: string, detail: string, severity: CmatMessageSeverity, isSticky: boolean, isPostionBottom: boolean = false): void {\r\n\r\n if (isSticky) {\r\n this._stickyMessages.next({ severity: severity, summary: summary, detail: detail, isPostionBottom: isPostionBottom });\r\n } else {\r\n this._messages.next({ severity: severity, summary: summary, detail: detail, isPostionBottom: isPostionBottom });\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,eAAe,CAAA;AACxB,IAAA,WAAA,CAAmB,OAAe,EAAS,IAAoB,EAAS,UAA+B,EAAS,cAA0B,EAC/H,YAAqB,EAAS,OAAgB,EAAS,WAAoB,EAAA;QADnE,IAAO,CAAA,OAAA,GAAP,OAAO;QAAiB,IAAI,CAAA,IAAA,GAAJ,IAAI;QAAyB,IAAU,CAAA,UAAA,GAAV,UAAU;QAA8B,IAAc,CAAA,cAAA,GAAd,cAAc;QACnH,IAAY,CAAA,YAAA,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AAE,MAAc,EAAE,QAA6B,EAAE,QAAiB,EAAE,eAAA,GAA2B,KAAK,EAAA;QAE1I,IAAI,QAAQ,EAAE;YACV,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,CAAC;;aAClH;YACH,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,CAAC;;;8GA3L9G,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAhB,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,gBAAgB,cAFb,MAAM,EAAA,CAAA,CAAA;;2FAET,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE;AACf,iBAAA;;;ACXD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cmat-services-alert.mjs","sources":["../../../projects/cmat/services/alert/alert.dialog.ts","../../../projects/cmat/services/alert/alert.message.ts","../../../projects/cmat/services/alert/enum.ts","../../../projects/cmat/services/alert/alert.service.ts","../../../projects/cmat/services/alert/cmat-services-alert.ts"],"sourcesContent":["import { CmatDialogType } from './enum';\r\n\r\nexport class CmatAlertDialog {\r\n constructor(public message: string, public type: CmatDialogType, public okCallback?: (val?: any) => any, public cancelCallback?: () => any,\r\n public defaultValue?: string, public okLabel?: string, public cancelLabel?: string) {\r\n\r\n }\r\n}\r\n","import { CmatMessageSeverity } from './enum';\r\n\r\nexport class CmatAlertMessage {\r\n constructor(public severity: CmatMessageSeverity, public summary: string, public detail: string, public isPostionBottom: boolean = false) { }\r\n}\r\n","export enum CmatDialogType {\r\n alert,\r\n confirm,\r\n prompt\r\n}\r\n\r\nexport enum CmatMessageSeverity {\r\n info = 'info',\r\n success = 'success',\r\n error = 'error',\r\n warning = 'warning',\r\n wait = 'wait'\r\n}\r\n","import { HttpResponseBase } from '@angular/common/http';\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable, Subject } from 'rxjs';\r\nimport { CmatUtilsService } from 'cmat/services/utils';\r\nimport { CmatAlertDialog } from './alert.dialog';\r\nimport { CmatAlertMessage } from './alert.message';\r\nimport { CmatDialogType, CmatMessageSeverity } from './enum';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatAlertService {\r\n private _messages = new Subject<CmatAlertMessage>();\r\n private _stickyMessages = new Subject<CmatAlertMessage | void>();\r\n private _dialogs = new Subject<CmatAlertDialog>();\r\n\r\n private _isLoading = new Subject<boolean>();\r\n private _loadingMessageId: any;\r\n\r\n get dialogEvent$(): Observable<CmatAlertDialog> {\r\n return this._dialogs.asObservable();\r\n }\r\n\r\n\r\n get messageEvent$(): Observable<CmatAlertMessage> {\r\n return this._messages.asObservable();\r\n }\r\n\r\n get stickyMessageEvent$(): Observable<CmatAlertMessage | void> {\r\n return this._stickyMessages.asObservable();\r\n }\r\n\r\n get isLoadingInProgress$(): Observable<boolean> {\r\n return this._isLoading.asObservable();\r\n }\r\n\r\n showDialog(message: string, type?: CmatDialogType, okCallback?: (val?: any) => any, cancelCallback?: () => any,\r\n okLabel?: string, cancelLabel?: string, defaultValue?: string): void {\r\n\r\n type ??= CmatDialogType.alert;\r\n\r\n this._dialogs.next({\r\n message: message,\r\n type: type,\r\n okCallback: okCallback,\r\n cancelCallback: cancelCallback,\r\n okLabel: okLabel,\r\n cancelLabel: cancelLabel,\r\n defaultValue: defaultValue\r\n });\r\n }\r\n\r\n showMessage(summary: string): void;\r\n showMessage(detail: string | string[] | HttpResponseBase, params: string, severity: CmatMessageSeverity): void;\r\n showMessage(data: any, separatorOrDetail?: string, severity?: CmatMessageSeverity): void {\r\n severity ??= CmatMessageSeverity.info;\r\n\r\n if (data instanceof HttpResponseBase) {\r\n data = CmatUtilsService.getHttpResponseMessage(data);\r\n separatorOrDetail = CmatUtilsService.captionAndMessageSeparator;\r\n }\r\n\r\n if (data instanceof Array) {\r\n for (const message of data) {\r\n const msgObject = CmatUtilsService.splitInTwo(message, separatorOrDetail);\r\n\r\n this._showMessageHelper(msgObject.firstPart, msgObject.secondPart ?? '', severity, false);\r\n }\r\n } else {\r\n this._showMessageHelper(data, separatorOrDetail ?? '', severity, false);\r\n }\r\n }\r\n\r\n showBottomMessage(summary: string): void;\r\n showBottomMessage(summary: string, detail: string, severity: CmatMessageSeverity): void;\r\n showBottomMessage(data: any, separatorOrDetail?: string, severity?: CmatMessageSeverity): void {\r\n severity ??= CmatMessageSeverity.info;\r\n\r\n if (data instanceof HttpResponseBase) {\r\n data = CmatUtilsService.getHttpResponseMessage(data);\r\n separatorOrDetail = CmatUtilsService.captionAndMessageSeparator;\r\n }\r\n\r\n if (data instanceof Array) {\r\n for (const message of data) {\r\n const msgObject = CmatUtilsService.splitInTwo(message, separatorOrDetail);\r\n\r\n this._showMessageHelper(msgObject.firstPart, msgObject.secondPart ?? '', severity, true, true);\r\n }\r\n } else {\r\n this._showMessageHelper(data, separatorOrDetail ?? '', severity, true, true);\r\n }\r\n }\r\n\r\n\r\n showStickyMessage(summary: string): void;\r\n showStickyMessage(summary: string, detail: string, severity: CmatMessageSeverity, error?: any): void;\r\n showStickyMessage(detail: string[] | HttpResponseBase, params: string, severity: CmatMessageSeverity): void;\r\n showStickyMessage(data: string | string[] | HttpResponseBase, separatorOrDetail?: string, severity?: CmatMessageSeverity, error?: any): void {\r\n\r\n severity ??= CmatMessageSeverity.info;\r\n\r\n if (data instanceof HttpResponseBase) {\r\n data = CmatUtilsService.getHttpResponseMessage(data);\r\n separatorOrDetail = CmatUtilsService.captionAndMessageSeparator;\r\n }\r\n\r\n\r\n if (data instanceof Array) {\r\n for (const message of data) {\r\n const msgObject = CmatUtilsService.splitInTwo(message, separatorOrDetail); this._showMessageHelper(msgObject.firstPart, msgObject.secondPart ?? '', severity, true);\r\n }\r\n } else {\r\n if (error) {\r\n\r\n const msg = `Message.Severity: \"${CmatMessageSeverity[severity]}\", Message.Summary: \"${data}\", \r\n Message.Detail: \"${separatorOrDetail}\", Message.Error: \"${CmatUtilsService.safeStringify(error)}\"`;\r\n\r\n switch (severity) {\r\n case CmatMessageSeverity.info:\r\n this.logInfo(msg);\r\n break;\r\n case CmatMessageSeverity.success:\r\n this.logMessage(msg);\r\n break;\r\n case CmatMessageSeverity.error:\r\n this.logError(msg);\r\n break;\r\n case CmatMessageSeverity.warning:\r\n this.logWarning(msg);\r\n break;\r\n case CmatMessageSeverity.wait:\r\n this.logTrace(msg);\r\n break;\r\n }\r\n }\r\n\r\n this._showMessageHelper((data) as any, separatorOrDetail ?? '', severity, true);\r\n }\r\n }\r\n\r\n startLoadingMessage(message = '载入中...', caption = ''): void {\r\n this._isLoading.next(true);\r\n clearTimeout(this._loadingMessageId);\r\n\r\n this._loadingMessageId = setTimeout(() => {\r\n this.showStickyMessage(caption, message, CmatMessageSeverity.wait);\r\n }, 1000);\r\n }\r\n\r\n stopLoadingMessage(): void {\r\n this._isLoading.next(false);\r\n clearTimeout(this._loadingMessageId);\r\n this.resetStickyMessage();\r\n }\r\n\r\n\r\n logDebug(msg: any): void {\r\n console.debug(msg);\r\n }\r\n\r\n logError(msg: any): void {\r\n console.error(msg);\r\n }\r\n\r\n logInfo(msg: any): void {\r\n console.info(msg);\r\n }\r\n\r\n logMessage(msg: any): void {\r\n console.log(msg);\r\n }\r\n\r\n logTrace(msg: any): void {\r\n console.trace(msg);\r\n }\r\n\r\n logWarning(msg: any): void {\r\n console.warn(msg);\r\n }\r\n\r\n resetStickyMessage(): void {\r\n this._stickyMessages.next(void 0);\r\n }\r\n\r\n private _showMessageHelper(summary: string, detail: string, severity: CmatMessageSeverity, isSticky: boolean, isPostionBottom: boolean = false): void {\r\n\r\n if (isSticky) {\r\n this._stickyMessages.next({ severity: severity, summary: summary, detail: detail, isPostionBottom: isPostionBottom });\r\n } else {\r\n this._messages.next({ severity: severity, summary: summary, detail: detail, isPostionBottom: isPostionBottom });\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,eAAe,CAAA;AACxB,IAAA,WAAA,CAAmB,OAAe,EAAS,IAAoB,EAAS,UAA+B,EAAS,cAA0B,EAC/H,YAAqB,EAAS,OAAgB,EAAS,WAAoB,EAAA;QADnE,IAAO,CAAA,OAAA,GAAP,OAAO;QAAiB,IAAI,CAAA,IAAA,GAAJ,IAAI;QAAyB,IAAU,CAAA,UAAA,GAAV,UAAU;QAA8B,IAAc,CAAA,cAAA,GAAd,cAAc;QACnH,IAAY,CAAA,YAAA,GAAZ,YAAY;QAAkB,IAAO,CAAA,OAAA,GAAP,OAAO;QAAkB,IAAW,CAAA,WAAA,GAAX,WAAW;;AAGhF;;MCLY,gBAAgB,CAAA;AACzB,IAAA,WAAA,CAAmB,QAA6B,EAAS,OAAe,EAAS,MAAc,EAAS,kBAA2B,KAAK,EAAA;QAArH,IAAQ,CAAA,QAAA,GAAR,QAAQ;QAA8B,IAAO,CAAA,OAAA,GAAP,OAAO;QAAiB,IAAM,CAAA,MAAA,GAAN,MAAM;QAAiB,IAAe,CAAA,eAAA,GAAf,eAAe;;AAC1H;;ICJW;AAAZ,CAAA,UAAY,cAAc,EAAA;AACtB,IAAA,cAAA,CAAA,cAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAK;AACL,IAAA,cAAA,CAAA,cAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAO;AACP,IAAA,cA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,CAAA,CAAA;;2FAET,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE;AACf,iBAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -22,10 +22,10 @@ class CmatConfigService {
|
|
|
22
22
|
// Set the config
|
|
23
23
|
this._config.next(this.config);
|
|
24
24
|
}
|
|
25
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
26
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
25
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatConfigService, deps: [{ token: CMAT_APP_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
26
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatConfigService, providedIn: 'root' }); }
|
|
27
27
|
}
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatConfigService, decorators: [{
|
|
29
29
|
type: Injectable,
|
|
30
30
|
args: [{
|
|
31
31
|
providedIn: 'root'
|
|
@@ -51,10 +51,10 @@ class CmatUrlStateConfigService {
|
|
|
51
51
|
// Execute the observable
|
|
52
52
|
this._config.next(config);
|
|
53
53
|
}
|
|
54
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
55
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
54
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatUrlStateConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
55
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatUrlStateConfigService, providedIn: 'root' }); }
|
|
56
56
|
}
|
|
57
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatUrlStateConfigService, decorators: [{
|
|
58
58
|
type: Injectable,
|
|
59
59
|
args: [{
|
|
60
60
|
providedIn: 'root'
|
|
@@ -14,10 +14,10 @@ class CmatConfirmationDialogComponent {
|
|
|
14
14
|
this.data = data;
|
|
15
15
|
this.matDialogRef = matDialogRef;
|
|
16
16
|
}
|
|
17
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
18
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
17
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatConfirmationDialogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
18
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.0", type: CmatConfirmationDialogComponent, isStandalone: true, selector: "cmat-confirmation-dialog", ngImport: i0, template: "<div class=\"relative flex flex-col w-full h-full\">\r\n\r\n <!-- Dismiss button -->\r\n @if (data.dismissible) {\r\n <div class=\"absolute top-0 right-0 pt-4 pr-4\">\r\n <button type=\"button\" mat-icon-button [matDialogClose]=\"undefined\">\r\n <mat-icon class=\"text-secondary\" [svgIcon]=\"'heroicons_outline:x-mark'\"></mat-icon>\r\n </button>\r\n </div>\r\n }\r\n\r\n <!-- Content -->\r\n <div class=\"flex flex-col sm:flex-row items-center sm:items-start p-8 pb-6 sm:pb-8\">\r\n\r\n <!-- Icon -->\r\n @if (data.icon?.show) {\r\n <div class=\"flex flex-none items-center justify-center w-10 h-10 sm:mr-4 rounded-full\" [ngClass]=\"{'text-primary-600 bg-primary-100 dark:text-primary-50 dark:bg-primary-600': data.icon?.color === 'primary',\r\n 'text-accent-600 bg-accent-100 dark:text-accent-50 dark:bg-accent-600': data.icon?.color === 'accent',\r\n 'text-warn-600 bg-warn-100 dark:text-warn-50 dark:bg-warn-600': data.icon?.color === 'warn',\r\n 'text-slate-600 bg-slate-100 dark:text-slate-50 dark:bg-slate-600': data.icon?.color === 'basic',\r\n 'text-blue-600 bg-blue-100 dark:text-blue-50 dark:bg-blue-600': data.icon?.color === 'info',\r\n 'text-emerald-500 bg-emerald-100 dark:text-emerald-50 dark:bg-emerald-500': data.icon?.color === 'success',\r\n 'text-amber-500 bg-amber-100 dark:text-amber-50 dark:bg-amber-500': data.icon?.color === 'warning',\r\n 'text-red-600 bg-red-100 dark:text-red-50 dark:bg-red-600': data.icon?.color === 'error'\r\n }\">\r\n @if (data.icon?.name) {\r\n <mat-icon class=\"text-current\" [svgIcon]=\"data.icon?.name||''\"></mat-icon>\r\n }\r\n </div>\r\n }\r\n\r\n @if (data.title || data.message) {\r\n <div\r\n class=\"flex flex-col items-center sm:items-start mt-4 sm:mt-0 sm:pr-8 gap-1 text-center sm:text-left\">\r\n <!-- Title -->\r\n @if (data.title) {\r\n <div class=\"text-xl leading-6 font-medium\" [innerHTML]=\"data.title\"></div>\r\n }\r\n <!-- Message -->\r\n @if (data.message) {\r\n <div class=\"text-secondary\" [innerHTML]=\"data.message\"></div>\r\n }\r\n </div>\r\n }\r\n\r\n </div>\r\n\r\n <!-- Actions -->\r\n @if (data.actions?.confirm?.show || data.actions?.cancel?.show) {\r\n <div\r\n class=\"flex items-center justify-center sm:justify-end px-6 py-4 flex-row gap-3 bg-slate-50 dark:bg-black/10\">\r\n <!-- Confirm -->\r\n @if (data.actions?.confirm?.show) {\r\n <button type=\"button\" mat-flat-button [color]=\"data.actions?.confirm?.color\"\r\n [matDialogClose]=\"'confirmed'\">\r\n {{data.actions?.confirm?.label}}\r\n </button>\r\n }\r\n <!-- Cancel -->\r\n @if (data.actions?.cancel?.show) {\r\n <button type=\"button\" mat-stroked-button [matDialogClose]=\"'cancelled'\">\r\n {{data.actions?.cancel?.label}}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n</div>", styles: [".cmat-confirmation-dialog-panel .mat-mdc-dialog-container{padding:0!important}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
19
19
|
}
|
|
20
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatConfirmationDialogComponent, decorators: [{
|
|
21
21
|
type: Component,
|
|
22
22
|
args: [{ selector: 'cmat-confirmation-dialog', encapsulation: ViewEncapsulation.None, imports: [MatButtonModule, MatDialogModule, MatIconModule, NgClass], template: "<div class=\"relative flex flex-col w-full h-full\">\r\n\r\n <!-- Dismiss button -->\r\n @if (data.dismissible) {\r\n <div class=\"absolute top-0 right-0 pt-4 pr-4\">\r\n <button type=\"button\" mat-icon-button [matDialogClose]=\"undefined\">\r\n <mat-icon class=\"text-secondary\" [svgIcon]=\"'heroicons_outline:x-mark'\"></mat-icon>\r\n </button>\r\n </div>\r\n }\r\n\r\n <!-- Content -->\r\n <div class=\"flex flex-col sm:flex-row items-center sm:items-start p-8 pb-6 sm:pb-8\">\r\n\r\n <!-- Icon -->\r\n @if (data.icon?.show) {\r\n <div class=\"flex flex-none items-center justify-center w-10 h-10 sm:mr-4 rounded-full\" [ngClass]=\"{'text-primary-600 bg-primary-100 dark:text-primary-50 dark:bg-primary-600': data.icon?.color === 'primary',\r\n 'text-accent-600 bg-accent-100 dark:text-accent-50 dark:bg-accent-600': data.icon?.color === 'accent',\r\n 'text-warn-600 bg-warn-100 dark:text-warn-50 dark:bg-warn-600': data.icon?.color === 'warn',\r\n 'text-slate-600 bg-slate-100 dark:text-slate-50 dark:bg-slate-600': data.icon?.color === 'basic',\r\n 'text-blue-600 bg-blue-100 dark:text-blue-50 dark:bg-blue-600': data.icon?.color === 'info',\r\n 'text-emerald-500 bg-emerald-100 dark:text-emerald-50 dark:bg-emerald-500': data.icon?.color === 'success',\r\n 'text-amber-500 bg-amber-100 dark:text-amber-50 dark:bg-amber-500': data.icon?.color === 'warning',\r\n 'text-red-600 bg-red-100 dark:text-red-50 dark:bg-red-600': data.icon?.color === 'error'\r\n }\">\r\n @if (data.icon?.name) {\r\n <mat-icon class=\"text-current\" [svgIcon]=\"data.icon?.name||''\"></mat-icon>\r\n }\r\n </div>\r\n }\r\n\r\n @if (data.title || data.message) {\r\n <div\r\n class=\"flex flex-col items-center sm:items-start mt-4 sm:mt-0 sm:pr-8 gap-1 text-center sm:text-left\">\r\n <!-- Title -->\r\n @if (data.title) {\r\n <div class=\"text-xl leading-6 font-medium\" [innerHTML]=\"data.title\"></div>\r\n }\r\n <!-- Message -->\r\n @if (data.message) {\r\n <div class=\"text-secondary\" [innerHTML]=\"data.message\"></div>\r\n }\r\n </div>\r\n }\r\n\r\n </div>\r\n\r\n <!-- Actions -->\r\n @if (data.actions?.confirm?.show || data.actions?.cancel?.show) {\r\n <div\r\n class=\"flex items-center justify-center sm:justify-end px-6 py-4 flex-row gap-3 bg-slate-50 dark:bg-black/10\">\r\n <!-- Confirm -->\r\n @if (data.actions?.confirm?.show) {\r\n <button type=\"button\" mat-flat-button [color]=\"data.actions?.confirm?.color\"\r\n [matDialogClose]=\"'confirmed'\">\r\n {{data.actions?.confirm?.label}}\r\n </button>\r\n }\r\n <!-- Cancel -->\r\n @if (data.actions?.cancel?.show) {\r\n <button type=\"button\" mat-stroked-button [matDialogClose]=\"'cancelled'\">\r\n {{data.actions?.cancel?.label}}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n</div>", styles: [".cmat-confirmation-dialog-panel .mat-mdc-dialog-container{padding:0!important}\n"] }]
|
|
23
23
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
@@ -61,10 +61,10 @@ class CmatConfirmationService {
|
|
|
61
61
|
panelClass: 'cmat-confirmation-dialog-panel'
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
65
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
64
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatConfirmationService, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
65
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatConfirmationService, providedIn: 'root' }); }
|
|
66
66
|
}
|
|
67
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
67
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatConfirmationService, decorators: [{
|
|
68
68
|
type: Injectable,
|
|
69
69
|
args: [{
|
|
70
70
|
providedIn: 'root'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmat-services-confirmation.mjs","sources":["../../../projects/cmat/services/confirmation/dialog/dialog.component.ts","../../../projects/cmat/services/confirmation/dialog/dialog.component.html","../../../projects/cmat/services/confirmation/confirmation.service.ts","../../../projects/cmat/services/confirmation/cmat-services-confirmation.ts"],"sourcesContent":["import { NgClass } from '@angular/common';\r\nimport { Component, Inject, ViewEncapsulation } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MAT_DIALOG_DATA, MatDialogRef, MatDialogModule } from '@angular/material/dialog';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { CmatConfirmationConfig } from '../confirmation.types';\r\n\r\n@Component({\r\n selector: 'cmat-confirmation-dialog',\r\n templateUrl: './dialog.component.html',\r\n styles: [\r\n /* language=SCSS */\r\n `\r\n .cmat-confirmation-dialog-panel {\r\n .mat-mdc-dialog-container {\r\n padding: 0 !important;\r\n }\r\n }\r\n `\r\n ],\r\n encapsulation: ViewEncapsulation.None,\r\n imports: [MatButtonModule, MatDialogModule, MatIconModule, NgClass]\r\n})\r\nexport class CmatConfirmationDialogComponent {\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public data: CmatConfirmationConfig,\r\n public matDialogRef: MatDialogRef<CmatConfirmationDialogComponent>\r\n ) {\r\n }\r\n}\r\n","<div class=\"relative flex flex-col w-full h-full\">\r\n\r\n <!-- Dismiss button -->\r\n @if (data.dismissible) {\r\n <div class=\"absolute top-0 right-0 pt-4 pr-4\">\r\n <button type=\"button\" mat-icon-button [matDialogClose]=\"undefined\">\r\n <mat-icon class=\"text-secondary\" [svgIcon]=\"'heroicons_outline:x-mark'\"></mat-icon>\r\n </button>\r\n </div>\r\n }\r\n\r\n <!-- Content -->\r\n <div class=\"flex flex-col sm:flex-row items-center sm:items-start p-8 pb-6 sm:pb-8\">\r\n\r\n <!-- Icon -->\r\n @if (data.icon?.show) {\r\n <div class=\"flex flex-none items-center justify-center w-10 h-10 sm:mr-4 rounded-full\" [ngClass]=\"{'text-primary-600 bg-primary-100 dark:text-primary-50 dark:bg-primary-600': data.icon?.color === 'primary',\r\n 'text-accent-600 bg-accent-100 dark:text-accent-50 dark:bg-accent-600': data.icon?.color === 'accent',\r\n 'text-warn-600 bg-warn-100 dark:text-warn-50 dark:bg-warn-600': data.icon?.color === 'warn',\r\n 'text-slate-600 bg-slate-100 dark:text-slate-50 dark:bg-slate-600': data.icon?.color === 'basic',\r\n 'text-blue-600 bg-blue-100 dark:text-blue-50 dark:bg-blue-600': data.icon?.color === 'info',\r\n 'text-emerald-500 bg-emerald-100 dark:text-emerald-50 dark:bg-emerald-500': data.icon?.color === 'success',\r\n 'text-amber-500 bg-amber-100 dark:text-amber-50 dark:bg-amber-500': data.icon?.color === 'warning',\r\n 'text-red-600 bg-red-100 dark:text-red-50 dark:bg-red-600': data.icon?.color === 'error'\r\n }\">\r\n @if (data.icon?.name) {\r\n <mat-icon class=\"text-current\" [svgIcon]=\"data.icon?.name||''\"></mat-icon>\r\n }\r\n </div>\r\n }\r\n\r\n @if (data.title || data.message) {\r\n <div\r\n class=\"flex flex-col items-center sm:items-start mt-4 sm:mt-0 sm:pr-8 gap-1 text-center sm:text-left\">\r\n <!-- Title -->\r\n @if (data.title) {\r\n <div class=\"text-xl leading-6 font-medium\" [innerHTML]=\"data.title\"></div>\r\n }\r\n <!-- Message -->\r\n @if (data.message) {\r\n <div class=\"text-secondary\" [innerHTML]=\"data.message\"></div>\r\n }\r\n </div>\r\n }\r\n\r\n </div>\r\n\r\n <!-- Actions -->\r\n @if (data.actions?.confirm?.show || data.actions?.cancel?.show) {\r\n <div\r\n class=\"flex items-center justify-center sm:justify-end px-6 py-4 flex-row gap-3 bg-slate-50 dark:bg-black/10\">\r\n <!-- Confirm -->\r\n @if (data.actions?.confirm?.show) {\r\n <button type=\"button\" mat-flat-button [color]=\"data.actions?.confirm?.color\"\r\n [matDialogClose]=\"'confirmed'\">\r\n {{data.actions?.confirm?.label}}\r\n </button>\r\n }\r\n <!-- Cancel -->\r\n @if (data.actions?.cancel?.show) {\r\n <button type=\"button\" mat-stroked-button [matDialogClose]=\"'cancelled'\">\r\n {{data.actions?.cancel?.label}}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n</div>","import { Injectable } from '@angular/core';\r\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\r\nimport { merge } from 'lodash-es';\r\nimport { CmatConfirmationConfig } from './confirmation.types';\r\nimport { CmatConfirmationDialogComponent } from './dialog/dialog.component';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatConfirmationService {\r\n private _defaultConfig: CmatConfirmationConfig = {\r\n title: '确认动作',\r\n message: '确认此动作吗?',\r\n icon: {\r\n show: true,\r\n name: 'heroicons_outline:exclamation-triangle',\r\n color: 'warn'\r\n },\r\n actions: {\r\n confirm: {\r\n show: true,\r\n label: '确认',\r\n color: 'warn'\r\n },\r\n cancel: {\r\n show: true,\r\n label: '取消'\r\n }\r\n },\r\n dismissible: false\r\n };\r\n\r\n constructor(private _matDialog: MatDialog) {\r\n\r\n }\r\n\r\n open(config: CmatConfirmationConfig = {}): MatDialogRef<CmatConfirmationDialogComponent> {\r\n // Merge the user config with the default config\r\n const userConfig = merge({}, this._defaultConfig, config);\r\n\r\n // Open the dialog\r\n return this._matDialog.open(CmatConfirmationDialogComponent, {\r\n autoFocus: false,\r\n disableClose: !userConfig.dismissible,\r\n data: userConfig,\r\n panelClass: 'cmat-confirmation-dialog-panel'\r\n });\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MAuBa,+BAA+B,CAAA;IAExC,WACoC,CAAA,IAA4B,EACrD,YAA2D,EAAA;QADlC,IAAI,CAAA,IAAA,GAAJ,IAAI;QAC7B,IAAY,CAAA,YAAA,GAAZ,YAAY;;AAJd,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,+BAA+B,kBAG5B,eAAe,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,YAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAHlB,+BAA+B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECvB5C,4oGAmEM,ED9CQ,MAAA,EAAA,CAAA,kFAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,eAAe,
|
|
1
|
+
{"version":3,"file":"cmat-services-confirmation.mjs","sources":["../../../projects/cmat/services/confirmation/dialog/dialog.component.ts","../../../projects/cmat/services/confirmation/dialog/dialog.component.html","../../../projects/cmat/services/confirmation/confirmation.service.ts","../../../projects/cmat/services/confirmation/cmat-services-confirmation.ts"],"sourcesContent":["import { NgClass } from '@angular/common';\r\nimport { Component, Inject, ViewEncapsulation } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MAT_DIALOG_DATA, MatDialogRef, MatDialogModule } from '@angular/material/dialog';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { CmatConfirmationConfig } from '../confirmation.types';\r\n\r\n@Component({\r\n selector: 'cmat-confirmation-dialog',\r\n templateUrl: './dialog.component.html',\r\n styles: [\r\n /* language=SCSS */\r\n `\r\n .cmat-confirmation-dialog-panel {\r\n .mat-mdc-dialog-container {\r\n padding: 0 !important;\r\n }\r\n }\r\n `\r\n ],\r\n encapsulation: ViewEncapsulation.None,\r\n imports: [MatButtonModule, MatDialogModule, MatIconModule, NgClass]\r\n})\r\nexport class CmatConfirmationDialogComponent {\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public data: CmatConfirmationConfig,\r\n public matDialogRef: MatDialogRef<CmatConfirmationDialogComponent>\r\n ) {\r\n }\r\n}\r\n","<div class=\"relative flex flex-col w-full h-full\">\r\n\r\n <!-- Dismiss button -->\r\n @if (data.dismissible) {\r\n <div class=\"absolute top-0 right-0 pt-4 pr-4\">\r\n <button type=\"button\" mat-icon-button [matDialogClose]=\"undefined\">\r\n <mat-icon class=\"text-secondary\" [svgIcon]=\"'heroicons_outline:x-mark'\"></mat-icon>\r\n </button>\r\n </div>\r\n }\r\n\r\n <!-- Content -->\r\n <div class=\"flex flex-col sm:flex-row items-center sm:items-start p-8 pb-6 sm:pb-8\">\r\n\r\n <!-- Icon -->\r\n @if (data.icon?.show) {\r\n <div class=\"flex flex-none items-center justify-center w-10 h-10 sm:mr-4 rounded-full\" [ngClass]=\"{'text-primary-600 bg-primary-100 dark:text-primary-50 dark:bg-primary-600': data.icon?.color === 'primary',\r\n 'text-accent-600 bg-accent-100 dark:text-accent-50 dark:bg-accent-600': data.icon?.color === 'accent',\r\n 'text-warn-600 bg-warn-100 dark:text-warn-50 dark:bg-warn-600': data.icon?.color === 'warn',\r\n 'text-slate-600 bg-slate-100 dark:text-slate-50 dark:bg-slate-600': data.icon?.color === 'basic',\r\n 'text-blue-600 bg-blue-100 dark:text-blue-50 dark:bg-blue-600': data.icon?.color === 'info',\r\n 'text-emerald-500 bg-emerald-100 dark:text-emerald-50 dark:bg-emerald-500': data.icon?.color === 'success',\r\n 'text-amber-500 bg-amber-100 dark:text-amber-50 dark:bg-amber-500': data.icon?.color === 'warning',\r\n 'text-red-600 bg-red-100 dark:text-red-50 dark:bg-red-600': data.icon?.color === 'error'\r\n }\">\r\n @if (data.icon?.name) {\r\n <mat-icon class=\"text-current\" [svgIcon]=\"data.icon?.name||''\"></mat-icon>\r\n }\r\n </div>\r\n }\r\n\r\n @if (data.title || data.message) {\r\n <div\r\n class=\"flex flex-col items-center sm:items-start mt-4 sm:mt-0 sm:pr-8 gap-1 text-center sm:text-left\">\r\n <!-- Title -->\r\n @if (data.title) {\r\n <div class=\"text-xl leading-6 font-medium\" [innerHTML]=\"data.title\"></div>\r\n }\r\n <!-- Message -->\r\n @if (data.message) {\r\n <div class=\"text-secondary\" [innerHTML]=\"data.message\"></div>\r\n }\r\n </div>\r\n }\r\n\r\n </div>\r\n\r\n <!-- Actions -->\r\n @if (data.actions?.confirm?.show || data.actions?.cancel?.show) {\r\n <div\r\n class=\"flex items-center justify-center sm:justify-end px-6 py-4 flex-row gap-3 bg-slate-50 dark:bg-black/10\">\r\n <!-- Confirm -->\r\n @if (data.actions?.confirm?.show) {\r\n <button type=\"button\" mat-flat-button [color]=\"data.actions?.confirm?.color\"\r\n [matDialogClose]=\"'confirmed'\">\r\n {{data.actions?.confirm?.label}}\r\n </button>\r\n }\r\n <!-- Cancel -->\r\n @if (data.actions?.cancel?.show) {\r\n <button type=\"button\" mat-stroked-button [matDialogClose]=\"'cancelled'\">\r\n {{data.actions?.cancel?.label}}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n</div>","import { Injectable } from '@angular/core';\r\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\r\nimport { merge } from 'lodash-es';\r\nimport { CmatConfirmationConfig } from './confirmation.types';\r\nimport { CmatConfirmationDialogComponent } from './dialog/dialog.component';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatConfirmationService {\r\n private _defaultConfig: CmatConfirmationConfig = {\r\n title: '确认动作',\r\n message: '确认此动作吗?',\r\n icon: {\r\n show: true,\r\n name: 'heroicons_outline:exclamation-triangle',\r\n color: 'warn'\r\n },\r\n actions: {\r\n confirm: {\r\n show: true,\r\n label: '确认',\r\n color: 'warn'\r\n },\r\n cancel: {\r\n show: true,\r\n label: '取消'\r\n }\r\n },\r\n dismissible: false\r\n };\r\n\r\n constructor(private _matDialog: MatDialog) {\r\n\r\n }\r\n\r\n open(config: CmatConfirmationConfig = {}): MatDialogRef<CmatConfirmationDialogComponent> {\r\n // Merge the user config with the default config\r\n const userConfig = merge({}, this._defaultConfig, config);\r\n\r\n // Open the dialog\r\n return this._matDialog.open(CmatConfirmationDialogComponent, {\r\n autoFocus: false,\r\n disableClose: !userConfig.dismissible,\r\n data: userConfig,\r\n panelClass: 'cmat-confirmation-dialog-panel'\r\n });\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MAuBa,+BAA+B,CAAA;IAExC,WACoC,CAAA,IAA4B,EACrD,YAA2D,EAAA;QADlC,IAAI,CAAA,IAAA,GAAJ,IAAI;QAC7B,IAAY,CAAA,YAAA,GAAZ,YAAY;;AAJd,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,+BAA+B,kBAG5B,eAAe,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,YAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAHlB,+BAA+B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECvB5C,4oGAmEM,ED9CQ,MAAA,EAAA,CAAA,kFAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,eAAe,0iBAAE,eAAe,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,cAAA,EAAA,Q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tilsService.handleError(err)));
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
162
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
161
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatDataService, deps: [{ token: i1.HttpClient }, { token: i2.CmatUrlStateConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
162
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatDataService, providedIn: 'root' }); }
|
|
163
163
|
}
|
|
164
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
164
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatDataService, decorators: [{
|
|
165
165
|
type: Injectable,
|
|
166
166
|
args: [{
|
|
167
167
|
providedIn: 'root'
|
|
@@ -193,10 +193,10 @@ class CmatExportAsService {
|
|
|
193
193
|
_btoa(content) {
|
|
194
194
|
return Buffer.from(content.toString(), 'utf-8').toString('base64');
|
|
195
195
|
}
|
|
196
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
197
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
196
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatExportAsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
197
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatExportAsService, providedIn: 'root' }); }
|
|
198
198
|
}
|
|
199
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
199
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatExportAsService, decorators: [{
|
|
200
200
|
type: Injectable,
|
|
201
201
|
args: [{
|
|
202
202
|
providedIn: 'root'
|
|
@@ -61,10 +61,10 @@ class CmatLoadingService {
|
|
|
61
61
|
this._show$.next(false);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
65
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
64
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatLoadingService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
65
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatLoadingService, providedIn: 'root' }); }
|
|
66
66
|
}
|
|
67
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
67
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatLoadingService, decorators: [{
|
|
68
68
|
type: Injectable,
|
|
69
69
|
args: [{
|
|
70
70
|
providedIn: 'root'
|
|
@@ -89,10 +89,10 @@ class CmatLoadingInterceptor {
|
|
|
89
89
|
this._cmatLoadingService.setLoadingStatus(false, req.url);
|
|
90
90
|
}));
|
|
91
91
|
}
|
|
92
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
93
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
92
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatLoadingInterceptor, deps: [{ token: CmatLoadingService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
93
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatLoadingInterceptor }); }
|
|
94
94
|
}
|
|
95
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
95
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatLoadingInterceptor, decorators: [{
|
|
96
96
|
type: Injectable
|
|
97
97
|
}], ctorParameters: () => [{ type: CmatLoadingService }] });
|
|
98
98
|
|
|
@@ -11,10 +11,10 @@ class CmatLocalStorageService {
|
|
|
11
11
|
removeItem(key) {
|
|
12
12
|
localStorage.removeItem(key);
|
|
13
13
|
}
|
|
14
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
15
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
14
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatLocalStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
15
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatLocalStorageService, providedIn: 'root' }); }
|
|
16
16
|
}
|
|
17
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatLocalStorageService, decorators: [{
|
|
18
18
|
type: Injectable,
|
|
19
19
|
args: [{
|
|
20
20
|
providedIn: 'root'
|
|
@@ -44,10 +44,10 @@ class CmatMediaWatcherService {
|
|
|
44
44
|
onMediaQueryChange$(query) {
|
|
45
45
|
return this._breakpointObserver.observe(query);
|
|
46
46
|
}
|
|
47
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
48
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
47
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatMediaWatcherService, deps: [{ token: i1.BreakpointObserver }, { token: i2.CmatConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
48
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatMediaWatcherService, providedIn: 'root' }); }
|
|
49
49
|
}
|
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatMediaWatcherService, decorators: [{
|
|
51
51
|
type: Injectable,
|
|
52
52
|
args: [{
|
|
53
53
|
providedIn: 'root'
|
|
@@ -35,10 +35,10 @@ class CmatPlatformService {
|
|
|
35
35
|
this.osName = 'os-android';
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
39
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
38
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatPlatformService, deps: [{ token: i1.Platform }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
39
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatPlatformService, providedIn: 'root' }); }
|
|
40
40
|
}
|
|
41
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatPlatformService, decorators: [{
|
|
42
42
|
type: Injectable,
|
|
43
43
|
args: [{
|
|
44
44
|
providedIn: 'root'
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { DOCUMENT } from '@angular/common';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Inject, Injectable } from '@angular/core';
|
|
2
|
+
import { DOCUMENT, Inject, Injectable } from '@angular/core';
|
|
4
3
|
import * as i1 from '@angular/router';
|
|
5
4
|
import { NavigationEnd } from '@angular/router';
|
|
6
5
|
import { Subject } from 'rxjs';
|
|
@@ -28,10 +27,10 @@ class CmatSplashScreenService {
|
|
|
28
27
|
hide() {
|
|
29
28
|
this._document.body.classList.add('cmat-splash-screen-hidden');
|
|
30
29
|
}
|
|
31
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
32
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
30
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatSplashScreenService, deps: [{ token: DOCUMENT }, { token: i1.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
31
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatSplashScreenService, providedIn: 'root' }); }
|
|
33
32
|
}
|
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatSplashScreenService, decorators: [{
|
|
35
34
|
type: Injectable,
|
|
36
35
|
args: [{
|
|
37
36
|
providedIn: 'root'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmat-services-splash-screen.mjs","sources":["../../../projects/cmat/services/splash-screen/splash-screen.service.ts","../../../projects/cmat/services/splash-screen/cmat-services-splash-screen.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"cmat-services-splash-screen.mjs","sources":["../../../projects/cmat/services/splash-screen/splash-screen.service.ts","../../../projects/cmat/services/splash-screen/cmat-services-splash-screen.ts"],"sourcesContent":["import { Inject, Injectable, OnDestroy, DOCUMENT } from '@angular/core';\r\nimport { NavigationEnd, Router } from '@angular/router';\r\nimport { Subject } from 'rxjs';\r\nimport { filter, take, takeUntil } from 'rxjs/operators';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatSplashScreenService implements OnDestroy {\r\n private _unsubscribeAll: Subject<void> = new Subject<void>();\r\n\r\n constructor(\r\n @Inject(DOCUMENT) private _document: any,\r\n private _router: Router\r\n ) {\r\n // Hide it on the first NavigationEnd event\r\n this._router.events\r\n .pipe(\r\n takeUntil(this._unsubscribeAll),\r\n filter(event => event instanceof NavigationEnd),\r\n take(1)\r\n )\r\n .subscribe(() => {\r\n this.hide();\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 show(): void {\r\n this._document.body.classList.remove('cmat-splash-screen-hidden');\r\n }\r\n\r\n hide(): void {\r\n this._document.body.classList.add('cmat-splash-screen-hidden');\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAQa,uBAAuB,CAAA;IAGhC,WAC8B,CAAA,SAAc,EAChC,OAAe,EAAA;QADG,IAAS,CAAA,SAAA,GAAT,SAAS;QAC3B,IAAO,CAAA,OAAA,GAAP,OAAO;AAJX,QAAA,IAAA,CAAA,eAAe,GAAkB,IAAI,OAAO,EAAQ;;QAOxD,IAAI,CAAC,OAAO,CAAC;aACR,IAAI,CACD,SAAS,CAAC,IAAI,CAAC,eAAe,CAAC,EAC/B,MAAM,C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
}
|
|
38
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
39
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
38
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatTitleService, deps: [{ token: i1.Title }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
39
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatTitleService, providedIn: 'root' }); }
|
|
40
40
|
}
|
|
41
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatTitleService, decorators: [{
|
|
42
42
|
type: Injectable,
|
|
43
43
|
args: [{
|
|
44
44
|
providedIn: 'root'
|
|
@@ -51,10 +51,10 @@ class CmatTranslationService {
|
|
|
51
51
|
getTranslationAsync(key, interpolateParams) {
|
|
52
52
|
return this._translate.get(key, interpolateParams);
|
|
53
53
|
}
|
|
54
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
55
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
54
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatTranslationService, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
55
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatTranslationService, providedIn: 'root' }); }
|
|
56
56
|
}
|
|
57
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatTranslationService, decorators: [{
|
|
58
58
|
type: Injectable,
|
|
59
59
|
args: [{
|
|
60
60
|
providedIn: 'root'
|
|
@@ -125,7 +125,7 @@ class CmatUtilsService {
|
|
|
125
125
|
`message: ${error.message}`);
|
|
126
126
|
}
|
|
127
127
|
// return an observable with a user-facing error message
|
|
128
|
-
return throwError(() => error
|
|
128
|
+
return throwError(() => error ?? 'server error');
|
|
129
129
|
}
|
|
130
130
|
static getHttpResponseMessage(data) {
|
|
131
131
|
const responses = [];
|
|
@@ -189,7 +189,7 @@ class CmatUtilsService {
|
|
|
189
189
|
return response.body;
|
|
190
190
|
}
|
|
191
191
|
if (response instanceof HttpErrorResponse) {
|
|
192
|
-
return response.error
|
|
192
|
+
return response.error ?? response.message ?? response.statusText;
|
|
193
193
|
}
|
|
194
194
|
return response;
|
|
195
195
|
}
|
|
@@ -456,10 +456,10 @@ class CmatUtilsService {
|
|
|
456
456
|
}
|
|
457
457
|
return id;
|
|
458
458
|
}
|
|
459
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
460
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
459
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatUtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
460
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatUtilsService, providedIn: 'root' }); }
|
|
461
461
|
}
|
|
462
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
462
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: CmatUtilsService, decorators: [{
|
|
463
463
|
type: Injectable,
|
|
464
464
|
args: [{
|
|
465
465
|
providedIn: 'root'
|