cmat 0.0.3
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/README.md +3 -0
- package/animations/defaults.d.ts +11 -0
- package/animations/drop.d.ts +2 -0
- package/animations/expand-collapse.d.ts +2 -0
- package/animations/fade.d.ts +11 -0
- package/animations/index.d.ts +5 -0
- package/animations/public-api.d.ts +1 -0
- package/animations/shake.d.ts +2 -0
- package/animations/slide.d.ts +9 -0
- package/animations/transform.d.ts +2 -0
- package/animations/zoom.d.ts +3 -0
- package/components/adapter/datetime-adapter.d.ts +45 -0
- package/components/adapter/datetime-formats.d.ts +22 -0
- package/components/adapter/dayjs-date-adapter.d.ts +63 -0
- package/components/adapter/dayjs-date-formats.d.ts +2 -0
- package/components/adapter/dayjs-datetime-adapter.d.ts +22 -0
- package/components/adapter/dayjs-datetime-formats.d.ts +2 -0
- package/components/adapter/index.d.ts +5 -0
- package/components/adapter/native-datetime-adapter.d.ts +31 -0
- package/components/adapter/native-datetime-formats.d.ts +2 -0
- package/components/adapter/public-api.d.ts +8 -0
- package/components/breadcrumb/breadcrumb-item.directive.d.ts +10 -0
- package/components/breadcrumb/breadcrumb.component.d.ts +57 -0
- package/components/breadcrumb/breadcrumb.component.scss +18 -0
- package/components/breadcrumb/breadcrumb.service.d.ts +126 -0
- package/components/breadcrumb/index.d.ts +5 -0
- package/components/breadcrumb/public-api.d.ts +3 -0
- package/components/breadcrumb/types/breadcrumb.config.d.ts +33 -0
- package/components/breadcrumb/types/breadcrumb.d.ts +23 -0
- package/components/card/card.component.d.ts +20 -0
- package/components/card/card.component.scss +63 -0
- package/components/card/card.types.d.ts +1 -0
- package/components/card/index.d.ts +5 -0
- package/components/card/public-api.d.ts +1 -0
- package/components/cascade/cascade-bottom-sheet/cascade-bottom-sheet.component.d.ts +14 -0
- package/components/cascade/cascade-bottom-sheet/cascade-bottom-sheet.component.scss +43 -0
- package/components/cascade/cascade-list/cascade-list.component.d.ts +52 -0
- package/components/cascade/cascade-list/cascade-list.component.scss +22 -0
- package/components/cascade/cascade-menu/cascade-menu.component.d.ts +10 -0
- package/components/cascade/cascade-menu/cascade-menu.component.scss +48 -0
- package/components/cascade/index.d.ts +5 -0
- package/components/cascade/options.interface.d.ts +8 -0
- package/components/cascade/public-api.d.ts +2 -0
- package/components/date-range/date-range.component.d.ts +134 -0
- package/components/date-range/date-range.component.scss +232 -0
- package/components/date-range/index.d.ts +5 -0
- package/components/date-range/public-api.d.ts +1 -0
- package/components/drawer/drawer.component.d.ts +75 -0
- package/components/drawer/drawer.component.scss +133 -0
- package/components/drawer/drawer.service.d.ts +26 -0
- package/components/drawer/drawer.types.d.ts +2 -0
- package/components/drawer/index.d.ts +5 -0
- package/components/drawer/public-api.d.ts +3 -0
- package/components/fullscreen/fullscreen.component.d.ts +18 -0
- package/components/fullscreen/fullscreen.types.d.ts +13 -0
- package/components/fullscreen/index.d.ts +5 -0
- package/components/fullscreen/public-api.d.ts +2 -0
- package/components/highlight/highlight.component.d.ts +21 -0
- package/components/highlight/highlight.component.scss +3 -0
- package/components/highlight/highlight.service.d.ts +7 -0
- package/components/highlight/index.d.ts +5 -0
- package/components/highlight/public-api.d.ts +2 -0
- package/components/masonry/index.d.ts +5 -0
- package/components/masonry/masonry.component.d.ts +13 -0
- package/components/masonry/public-api.d.ts +1 -0
- package/components/material-color-picker/base-color.d.ts +1 -0
- package/components/material-color-picker/index.d.ts +5 -0
- package/components/material-color-picker/material-color-picker.component.d.ts +35 -0
- package/components/material-color-picker/material-color-picker.component.scss +5 -0
- package/components/material-color-picker/public-api.d.ts +2 -0
- package/components/material-color-picker/selected-color.d.ts +5 -0
- package/components/material-datetimepicker/calendar-body.d.ts +43 -0
- package/components/material-datetimepicker/calendar-body.scss +58 -0
- package/components/material-datetimepicker/calendar.d.ts +146 -0
- package/components/material-datetimepicker/calendar.scss +194 -0
- package/components/material-datetimepicker/clock.d.ts +74 -0
- package/components/material-datetimepicker/clock.scss +90 -0
- package/components/material-datetimepicker/datetimepicker-animations.d.ts +4 -0
- package/components/material-datetimepicker/datetimepicker-content.scss +151 -0
- package/components/material-datetimepicker/datetimepicker-errors.d.ts +1 -0
- package/components/material-datetimepicker/datetimepicker-filtertype.d.ts +5 -0
- package/components/material-datetimepicker/datetimepicker-input.d.ts +106 -0
- package/components/material-datetimepicker/datetimepicker-intl.d.ts +51 -0
- package/components/material-datetimepicker/datetimepicker-toggle.d.ts +40 -0
- package/components/material-datetimepicker/datetimepicker-types.d.ts +13 -0
- package/components/material-datetimepicker/datetimepicker.d.ts +195 -0
- package/components/material-datetimepicker/datetimepicker.scss +145 -0
- package/components/material-datetimepicker/index.d.ts +5 -0
- package/components/material-datetimepicker/month-view.d.ts +64 -0
- package/components/material-datetimepicker/multi-year-view.d.ts +74 -0
- package/components/material-datetimepicker/public-api.d.ts +9 -0
- package/components/material-datetimepicker/time.d.ts +129 -0
- package/components/material-datetimepicker/time.scss +82 -0
- package/components/material-datetimepicker/year-view.d.ts +56 -0
- package/components/navigation/horizontal/components/basic/basic.component.d.ts +27 -0
- package/components/navigation/horizontal/components/branch/branch.component.d.ts +39 -0
- package/components/navigation/horizontal/components/divider/divider.component.d.ts +23 -0
- package/components/navigation/horizontal/components/spacer/spacer.component.d.ts +23 -0
- package/components/navigation/horizontal/horizontal.component.d.ts +43 -0
- package/components/navigation/horizontal/horizontal.component.scss +167 -0
- package/components/navigation/index.d.ts +5 -0
- package/components/navigation/navigation.service.d.ts +71 -0
- package/components/navigation/navigation.types.d.ts +34 -0
- package/components/navigation/public-api.d.ts +4 -0
- package/components/navigation/vertical/components/aside/aside.component.d.ts +63 -0
- package/components/navigation/vertical/components/basic/basic.component.d.ts +30 -0
- package/components/navigation/vertical/components/collapsable/collapsable.component.d.ts +74 -0
- package/components/navigation/vertical/components/divider/divider.component.d.ts +26 -0
- package/components/navigation/vertical/components/group/group.component.d.ts +36 -0
- package/components/navigation/vertical/components/spacer/spacer.component.d.ts +26 -0
- package/components/navigation/vertical/styles/appearances/compact.scss +103 -0
- package/components/navigation/vertical/styles/appearances/default.scss +550 -0
- package/components/navigation/vertical/styles/appearances/dense.scss +171 -0
- package/components/navigation/vertical/styles/appearances/thin.scss +91 -0
- package/components/navigation/vertical/vertical.component.d.ts +176 -0
- package/components/navigation/vertical/vertical.component.scss +4 -0
- package/components/pagination/index.d.ts +5 -0
- package/components/pagination/pagination.component.d.ts +24 -0
- package/components/pagination/pagination.directive.d.ts +40 -0
- package/components/pagination/pagination.instance.d.ts +11 -0
- package/components/pagination/pagination.pipe.d.ts +29 -0
- package/components/pagination/pagination.service.d.ts +20 -0
- package/components/pagination/public-api.d.ts +4 -0
- package/components/password-strength/animations/index.d.ts +4 -0
- package/components/password-strength/enum.d.ts +13 -0
- package/components/password-strength/index.d.ts +5 -0
- package/components/password-strength/mat-pass-toggle-visibility/mat-pass-toggle-visibility.component.d.ts +11 -0
- package/components/password-strength/mat-password-strength/mat-password-strength.component.d.ts +52 -0
- package/components/password-strength/mat-password-strength-info/mat-password-strength-info.component.d.ts +16 -0
- package/components/password-strength/mat-password-strength-info/mat-password-strength-info.component.scss +19 -0
- package/components/password-strength/mat-password-strength-validator.d.ts +6 -0
- package/components/password-strength/public-api.d.ts +3 -0
- package/components/password-strength/regexp.class.d.ts +6 -0
- package/components/popover/index.d.ts +5 -0
- package/components/popover/popover.component.d.ts +139 -0
- package/components/popover/popover.component.scss +174 -0
- package/components/popover/popover.errors.d.ts +14 -0
- package/components/popover/popover.interfaces.d.ts +44 -0
- package/components/popover/popover.type.d.ts +5 -0
- package/components/popover/public-api.d.ts +1 -0
- package/components/progress-bar/index.d.ts +5 -0
- package/components/progress-bar/progress-bar.component.d.ts +17 -0
- package/components/progress-bar/progress-bar.component.scss +7 -0
- package/components/progress-bar/public-api.d.ts +1 -0
- package/components/rating/index.d.ts +5 -0
- package/components/rating/public-api.d.ts +1 -0
- package/components/rating/rating.component.d.ts +28 -0
- package/components/rating/rating.component.scss +33 -0
- package/components/select-search/default-options.d.ts +8 -0
- package/components/select-search/index.d.ts +5 -0
- package/components/select-search/public-api.d.ts +2 -0
- package/components/select-search/select-no-entries-found.directive.d.ts +5 -0
- package/components/select-search/select-search-clear.directive.d.ts +5 -0
- package/components/select-search/select-search.component.d.ts +91 -0
- package/components/select-search/select-search.component.scss +126 -0
- package/components/select-tree/index.d.ts +5 -0
- package/components/select-tree/public-api.d.ts +1 -0
- package/components/select-tree/select-tree.component.d.ts +85 -0
- package/components/select-tree/select-tree.component.scss +54 -0
- package/components/select-tree/select-tree.flatnode.d.ts +6 -0
- package/components/select-tree/select-tree.node.d.ts +5 -0
- package/components/timeline/index.d.ts +5 -0
- package/components/timeline/public-api.d.ts +2 -0
- package/components/timeline/timeline-item/timeline-item.component.d.ts +25 -0
- package/components/timeline/timeline-item/timeline-item.component.scss +329 -0
- package/components/timeline/timeline.component.d.ts +32 -0
- package/components/timeline/timeline.component.scss +42 -0
- package/components/toast/index.d.ts +5 -0
- package/components/toast/models/global-config.model.d.ts +12 -0
- package/components/toast/models/toast.model.d.ts +6 -0
- package/components/toast/models/type.model.d.ts +12 -0
- package/components/toast/public-api.d.ts +2 -0
- package/components/toast/toast-modal.component.d.ts +18 -0
- package/components/toast/toast-modal.component.scss +119 -0
- package/components/toast/toast.component.d.ts +17 -0
- package/components/toast/toast.component.scss +62 -0
- package/components/toast/toast.service.d.ts +26 -0
- package/components/transfer-picker/filter/filter.component.d.ts +24 -0
- package/components/transfer-picker/filter/filter.component.scss +40 -0
- package/components/transfer-picker/index.d.ts +5 -0
- package/components/transfer-picker/interface.d.ts +42 -0
- package/components/transfer-picker/public-api.d.ts +7 -0
- package/components/transfer-picker/search/search.component.d.ts +14 -0
- package/components/transfer-picker/search/search.component.scss +7 -0
- package/components/transfer-picker/transfer-picker-source/transfer-picker-source.component.d.ts +49 -0
- package/components/transfer-picker/transfer-picker-source/transfer-picker-source.component.scss +25 -0
- package/components/transfer-picker/transfer-picker-target/transfer-picker-target.component.d.ts +12 -0
- package/components/transfer-picker/transfer-picker-target/transfer-picker-target.component.scss +27 -0
- package/components/transfer-picker/transfer-picker.component.d.ts +28 -0
- package/components/transfer-picker/transfer-picker.component.scss +8 -0
- package/components/transfer-picker/transfer-picker.service.d.ts +31 -0
- package/directives/animate-on-scroll/animate-on-scroll.directive.d.ts +29 -0
- package/directives/animate-on-scroll/index.d.ts +5 -0
- package/directives/animate-on-scroll/public-api.d.ts +1 -0
- package/directives/animate-on-scroll/scroll.service.d.ts +15 -0
- package/directives/autofocus/autofocus.directive.d.ts +10 -0
- package/directives/autofocus/index.d.ts +5 -0
- package/directives/autofocus/public-api.d.ts +1 -0
- package/directives/debounce/abstract-debounce.directive.d.ts +15 -0
- package/directives/debounce/debounce-click.directive.d.ts +8 -0
- package/directives/debounce/debounce-keyup.directive.d.ts +8 -0
- package/directives/debounce/index.d.ts +5 -0
- package/directives/debounce/public-api.d.ts +2 -0
- package/directives/digit-only/digit-only.directive.d.ts +34 -0
- package/directives/digit-only/index.d.ts +5 -0
- package/directives/digit-only/mask.directive.d.ts +14 -0
- package/directives/digit-only/public-api.d.ts +2 -0
- package/directives/equal-validator/equal-validator.directive.d.ts +14 -0
- package/directives/equal-validator/index.d.ts +5 -0
- package/directives/equal-validator/public-api.d.ts +1 -0
- package/esm2022/animations/cmat-animations.mjs +5 -0
- package/esm2022/animations/defaults.mjs +12 -0
- package/esm2022/animations/drop.mjs +26 -0
- package/esm2022/animations/expand-collapse.mjs +17 -0
- package/esm2022/animations/fade.mjs +170 -0
- package/esm2022/animations/public-api.mjs +19 -0
- package/esm2022/animations/shake.mjs +59 -0
- package/esm2022/animations/slide.mjs +124 -0
- package/esm2022/animations/transform.mjs +16 -0
- package/esm2022/animations/zoom.mjs +38 -0
- package/esm2022/cmat.mjs +5 -0
- package/esm2022/components/adapter/cmat-components-adapter.mjs +5 -0
- package/esm2022/components/adapter/datetime-adapter.mjs +127 -0
- package/esm2022/components/adapter/datetime-formats.mjs +3 -0
- package/esm2022/components/adapter/dayjs-date-adapter.mjs +198 -0
- package/esm2022/components/adapter/dayjs-date-formats.mjs +12 -0
- package/esm2022/components/adapter/dayjs-datetime-adapter.mjs +100 -0
- package/esm2022/components/adapter/dayjs-datetime-formats.mjs +21 -0
- package/esm2022/components/adapter/native-datetime-adapter.mjs +130 -0
- package/esm2022/components/adapter/native-datetime-formats.mjs +15 -0
- package/esm2022/components/adapter/public-api.mjs +9 -0
- package/esm2022/components/breadcrumb/breadcrumb-item.directive.mjs +19 -0
- package/esm2022/components/breadcrumb/breadcrumb.component.mjs +95 -0
- package/esm2022/components/breadcrumb/breadcrumb.service.mjs +336 -0
- package/esm2022/components/breadcrumb/cmat-components-breadcrumb.mjs +5 -0
- package/esm2022/components/breadcrumb/public-api.mjs +4 -0
- package/esm2022/components/breadcrumb/types/breadcrumb.config.mjs +2 -0
- package/esm2022/components/breadcrumb/types/breadcrumb.mjs +2 -0
- package/esm2022/components/card/card.component.mjs +58 -0
- package/esm2022/components/card/card.types.mjs +2 -0
- package/esm2022/components/card/cmat-components-card.mjs +5 -0
- package/esm2022/components/card/public-api.mjs +2 -0
- package/esm2022/components/cascade/cascade-bottom-sheet/cascade-bottom-sheet.component.mjs +53 -0
- package/esm2022/components/cascade/cascade-list/cascade-list.component.mjs +263 -0
- package/esm2022/components/cascade/cascade-menu/cascade-menu.component.mjs +29 -0
- package/esm2022/components/cascade/cmat-components-cascade.mjs +5 -0
- package/esm2022/components/cascade/options.interface.mjs +2 -0
- package/esm2022/components/cascade/public-api.mjs +3 -0
- package/esm2022/components/date-range/cmat-components-date-range.mjs +5 -0
- package/esm2022/components/date-range/date-range.component.mjs +540 -0
- package/esm2022/components/date-range/public-api.mjs +2 -0
- package/esm2022/components/drawer/cmat-components-drawer.mjs +5 -0
- package/esm2022/components/drawer/drawer.component.mjs +301 -0
- package/esm2022/components/drawer/drawer.service.mjs +41 -0
- package/esm2022/components/drawer/drawer.types.mjs +2 -0
- package/esm2022/components/drawer/public-api.mjs +4 -0
- package/esm2022/components/fullscreen/cmat-components-fullscreen.mjs +5 -0
- package/esm2022/components/fullscreen/fullscreen.component.mjs +101 -0
- package/esm2022/components/fullscreen/fullscreen.types.mjs +2 -0
- package/esm2022/components/fullscreen/public-api.mjs +3 -0
- package/esm2022/components/highlight/cmat-components-highlight.mjs +5 -0
- package/esm2022/components/highlight/highlight.component.mjs +80 -0
- package/esm2022/components/highlight/highlight.service.mjs +47 -0
- package/esm2022/components/highlight/public-api.mjs +3 -0
- package/esm2022/components/masonry/cmat-components-masonry.mjs +5 -0
- package/esm2022/components/masonry/masonry.component.mjs +54 -0
- package/esm2022/components/masonry/public-api.mjs +2 -0
- package/esm2022/components/material-color-picker/base-color.mjs +13 -0
- package/esm2022/components/material-color-picker/cmat-components-material-color-picker.mjs +5 -0
- package/esm2022/components/material-color-picker/material-color-picker.component.mjs +138 -0
- package/esm2022/components/material-color-picker/public-api.mjs +3 -0
- package/esm2022/components/material-color-picker/selected-color.mjs +3 -0
- package/esm2022/components/material-datetimepicker/calendar-body.mjs +80 -0
- package/esm2022/components/material-datetimepicker/calendar.mjs +678 -0
- package/esm2022/components/material-datetimepicker/clock.mjs +293 -0
- package/esm2022/components/material-datetimepicker/cmat-components-material-datetimepicker.mjs +5 -0
- package/esm2022/components/material-datetimepicker/datetimepicker-animations.mjs +34 -0
- package/esm2022/components/material-datetimepicker/datetimepicker-errors.mjs +6 -0
- package/esm2022/components/material-datetimepicker/datetimepicker-filtertype.mjs +8 -0
- package/esm2022/components/material-datetimepicker/datetimepicker-input.mjs +340 -0
- package/esm2022/components/material-datetimepicker/datetimepicker-intl.mjs +63 -0
- package/esm2022/components/material-datetimepicker/datetimepicker-toggle.mjs +88 -0
- package/esm2022/components/material-datetimepicker/datetimepicker-types.mjs +2 -0
- package/esm2022/components/material-datetimepicker/datetimepicker.mjs +534 -0
- package/esm2022/components/material-datetimepicker/month-view.mjs +146 -0
- package/esm2022/components/material-datetimepicker/multi-year-view.mjs +198 -0
- package/esm2022/components/material-datetimepicker/public-api.mjs +10 -0
- package/esm2022/components/material-datetimepicker/time.mjs +456 -0
- package/esm2022/components/material-datetimepicker/year-view.mjs +125 -0
- package/esm2022/components/navigation/cmat-components-navigation.mjs +5 -0
- package/esm2022/components/navigation/horizontal/components/basic/basic.component.mjs +70 -0
- package/esm2022/components/navigation/horizontal/components/branch/branch.component.mjs +83 -0
- package/esm2022/components/navigation/horizontal/components/divider/divider.component.mjs +47 -0
- package/esm2022/components/navigation/horizontal/components/spacer/spacer.component.mjs +47 -0
- package/esm2022/components/navigation/horizontal/horizontal.component.mjs +88 -0
- package/esm2022/components/navigation/navigation.service.mjs +140 -0
- package/esm2022/components/navigation/navigation.types.mjs +3 -0
- package/esm2022/components/navigation/public-api.mjs +5 -0
- package/esm2022/components/navigation/vertical/components/aside/aside.component.mjs +162 -0
- package/esm2022/components/navigation/vertical/components/basic/basic.component.mjs +76 -0
- package/esm2022/components/navigation/vertical/components/collapsable/collapsable.component.mjs +279 -0
- package/esm2022/components/navigation/vertical/components/divider/divider.component.mjs +56 -0
- package/esm2022/components/navigation/vertical/components/group/group.component.mjs +79 -0
- package/esm2022/components/navigation/vertical/components/spacer/spacer.component.mjs +56 -0
- package/esm2022/components/navigation/vertical/vertical.component.mjs +586 -0
- package/esm2022/components/pagination/cmat-components-pagination.mjs +5 -0
- package/esm2022/components/pagination/pagination.component.mjs +71 -0
- package/esm2022/components/pagination/pagination.directive.mjs +197 -0
- package/esm2022/components/pagination/pagination.instance.mjs +2 -0
- package/esm2022/components/pagination/pagination.pipe.mjs +100 -0
- package/esm2022/components/pagination/pagination.service.mjs +90 -0
- package/esm2022/components/pagination/public-api.mjs +5 -0
- package/esm2022/components/password-strength/animations/index.mjs +48 -0
- package/esm2022/components/password-strength/cmat-components-password-strength.mjs +5 -0
- package/esm2022/components/password-strength/enum.mjs +17 -0
- package/esm2022/components/password-strength/mat-pass-toggle-visibility/mat-pass-toggle-visibility.component.mjs +27 -0
- package/esm2022/components/password-strength/mat-password-strength/mat-password-strength.component.mjs +206 -0
- package/esm2022/components/password-strength/mat-password-strength-info/mat-password-strength-info.component.mjs +151 -0
- package/esm2022/components/password-strength/mat-password-strength-validator.mjs +36 -0
- package/esm2022/components/password-strength/public-api.mjs +4 -0
- package/esm2022/components/password-strength/regexp.class.mjs +8 -0
- package/esm2022/components/popover/cmat-components-popover.mjs +5 -0
- package/esm2022/components/popover/popover.component.mjs +350 -0
- package/esm2022/components/popover/popover.errors.mjs +27 -0
- package/esm2022/components/popover/popover.interfaces.mjs +2 -0
- package/esm2022/components/popover/popover.type.mjs +2 -0
- package/esm2022/components/popover/public-api.mjs +2 -0
- package/esm2022/components/progress-bar/cmat-components-progress-bar.mjs +5 -0
- package/esm2022/components/progress-bar/progress-bar.component.mjs +55 -0
- package/esm2022/components/progress-bar/public-api.mjs +2 -0
- package/esm2022/components/rating/cmat-components-rating.mjs +5 -0
- package/esm2022/components/rating/public-api.mjs +2 -0
- package/esm2022/components/rating/rating.component.mjs +91 -0
- package/esm2022/components/select-search/cmat-components-select-search.mjs +5 -0
- package/esm2022/components/select-search/default-options.mjs +16 -0
- package/esm2022/components/select-search/public-api.mjs +3 -0
- package/esm2022/components/select-search/select-no-entries-found.directive.mjs +14 -0
- package/esm2022/components/select-search/select-search-clear.directive.mjs +14 -0
- package/esm2022/components/select-search/select-search.component.mjs +488 -0
- package/esm2022/components/select-tree/cmat-components-select-tree.mjs +5 -0
- package/esm2022/components/select-tree/public-api.mjs +2 -0
- package/esm2022/components/select-tree/select-tree.component.mjs +458 -0
- package/esm2022/components/select-tree/select-tree.flatnode.mjs +3 -0
- package/esm2022/components/select-tree/select-tree.node.mjs +3 -0
- package/esm2022/components/timeline/cmat-components-timeline.mjs +5 -0
- package/esm2022/components/timeline/public-api.mjs +3 -0
- package/esm2022/components/timeline/timeline-item/timeline-item.component.mjs +68 -0
- package/esm2022/components/timeline/timeline.component.mjs +114 -0
- package/esm2022/components/toast/cmat-components-toast.mjs +5 -0
- package/esm2022/components/toast/models/global-config.model.mjs +2 -0
- package/esm2022/components/toast/models/toast.model.mjs +2 -0
- package/esm2022/components/toast/models/type.model.mjs +2 -0
- package/esm2022/components/toast/public-api.mjs +3 -0
- package/esm2022/components/toast/toast-modal.component.mjs +53 -0
- package/esm2022/components/toast/toast.component.mjs +30 -0
- package/esm2022/components/toast/toast.service.mjs +122 -0
- package/esm2022/components/transfer-picker/cmat-components-transfer-picker.mjs +5 -0
- package/esm2022/components/transfer-picker/filter/filter.component.mjs +85 -0
- package/esm2022/components/transfer-picker/interface.mjs +17 -0
- package/esm2022/components/transfer-picker/public-api.mjs +8 -0
- package/esm2022/components/transfer-picker/search/search.component.mjs +34 -0
- package/esm2022/components/transfer-picker/transfer-picker-source/transfer-picker-source.component.mjs +178 -0
- package/esm2022/components/transfer-picker/transfer-picker-target/transfer-picker-target.component.mjs +34 -0
- package/esm2022/components/transfer-picker/transfer-picker.component.mjs +82 -0
- package/esm2022/components/transfer-picker/transfer-picker.service.mjs +134 -0
- package/esm2022/directives/animate-on-scroll/animate-on-scroll.directive.mjs +126 -0
- package/esm2022/directives/animate-on-scroll/cmat-directives-animate-on-scroll.mjs +5 -0
- package/esm2022/directives/animate-on-scroll/public-api.mjs +2 -0
- package/esm2022/directives/animate-on-scroll/scroll.service.mjs +38 -0
- package/esm2022/directives/autofocus/autofocus.directive.mjs +20 -0
- package/esm2022/directives/autofocus/cmat-directives-autofocus.mjs +5 -0
- package/esm2022/directives/autofocus/public-api.mjs +2 -0
- package/esm2022/directives/debounce/abstract-debounce.directive.mjs +34 -0
- package/esm2022/directives/debounce/cmat-directives-debounce.mjs +5 -0
- package/esm2022/directives/debounce/debounce-click.directive.mjs +25 -0
- package/esm2022/directives/debounce/debounce-keyup.directive.mjs +25 -0
- package/esm2022/directives/debounce/public-api.mjs +3 -0
- package/esm2022/directives/digit-only/cmat-directives-digit-only.mjs +5 -0
- package/esm2022/directives/digit-only/digit-only.directive.mjs +282 -0
- package/esm2022/directives/digit-only/mask.directive.mjs +69 -0
- package/esm2022/directives/digit-only/public-api.mjs +3 -0
- package/esm2022/directives/equal-validator/cmat-directives-equal-validator.mjs +5 -0
- package/esm2022/directives/equal-validator/equal-validator.directive.mjs +54 -0
- package/esm2022/directives/equal-validator/public-api.mjs +2 -0
- package/esm2022/lib/mock-api/cmat-lib-mock-api.mjs +5 -0
- package/esm2022/lib/mock-api/mock-api.constants.mjs +3 -0
- package/esm2022/lib/mock-api/mock-api.interceptor.mjs +73 -0
- package/esm2022/lib/mock-api/mock-api.request-handler.mjs +48 -0
- package/esm2022/lib/mock-api/mock-api.service.mjs +93 -0
- package/esm2022/lib/mock-api/mock-api.types.mjs +2 -0
- package/esm2022/lib/mock-api/mock-api.utils.mjs +17 -0
- package/esm2022/lib/mock-api/public-api.mjs +6 -0
- package/esm2022/pipes/bytes/bytes.pipe.mjs +25 -0
- package/esm2022/pipes/bytes/cmat-pipes-bytes.mjs +5 -0
- package/esm2022/pipes/bytes/public-api.mjs +2 -0
- package/esm2022/pipes/date-format/cmat-pipes-date-format.mjs +5 -0
- package/esm2022/pipes/date-format/date-format.pipe.mjs +18 -0
- package/esm2022/pipes/date-format/public-api.mjs +2 -0
- package/esm2022/pipes/find-by-key/cmat-pipes-find-by-key.mjs +5 -0
- package/esm2022/pipes/find-by-key/find-by-key.pipe.mjs +23 -0
- package/esm2022/pipes/find-by-key/public-api.mjs +2 -0
- package/esm2022/pipes/group-by/cmat-pipes-group-by.mjs +5 -0
- package/esm2022/pipes/group-by/group-by.pipe.mjs +29 -0
- package/esm2022/pipes/group-by/public-api.mjs +2 -0
- package/esm2022/pipes/keys/cmat-pipes-keys.mjs +5 -0
- package/esm2022/pipes/keys/keys.pipe.mjs +26 -0
- package/esm2022/pipes/keys/public-api.mjs +2 -0
- package/esm2022/pipes/secure/cmat-pipes-secure.mjs +5 -0
- package/esm2022/pipes/secure/public-api.mjs +2 -0
- package/esm2022/pipes/secure/secure-pipe.mjs +43 -0
- package/esm2022/pipes/uppercase/cmat-pipes-uppercase.mjs +5 -0
- package/esm2022/pipes/uppercase/public-api.mjs +2 -0
- package/esm2022/pipes/uppercase/uppercase.pipe.mjs +17 -0
- package/esm2022/public-api.mjs +2 -0
- package/esm2022/services/alert/alert.dialog.mjs +12 -0
- package/esm2022/services/alert/alert.message.mjs +9 -0
- package/esm2022/services/alert/alert.service.mjs +165 -0
- package/esm2022/services/alert/cmat-services-alert.mjs +5 -0
- package/esm2022/services/alert/enum.mjs +15 -0
- package/esm2022/services/alert/public-api.mjs +5 -0
- package/esm2022/services/config/cmat-services-config.mjs +5 -0
- package/esm2022/services/config/config.constants.mjs +3 -0
- package/esm2022/services/config/config.service.mjs +35 -0
- package/esm2022/services/config/public-api.mjs +4 -0
- package/esm2022/services/config/urlStateConfig.service.mjs +30 -0
- package/esm2022/services/confirmation/cmat-services-confirmation.mjs +5 -0
- package/esm2022/services/confirmation/confirmation.service.mjs +51 -0
- package/esm2022/services/confirmation/confirmation.types.mjs +2 -0
- package/esm2022/services/confirmation/dialog/dialog.component.mjs +25 -0
- package/esm2022/services/confirmation/public-api.mjs +3 -0
- package/esm2022/services/data/cmat-services-data.mjs +5 -0
- package/esm2022/services/data/data.service.mjs +169 -0
- package/esm2022/services/data/public-api.mjs +2 -0
- package/esm2022/services/loading/cmat-services-loading.mjs +5 -0
- package/esm2022/services/loading/loading.interceptor.mjs +29 -0
- package/esm2022/services/loading/loading.service.mjs +72 -0
- package/esm2022/services/loading/public-api.mjs +3 -0
- package/esm2022/services/local-storage/cmat-services-local-storage.mjs +5 -0
- package/esm2022/services/local-storage/local-storage.service.mjs +22 -0
- package/esm2022/services/local-storage/public-api.mjs +2 -0
- package/esm2022/services/media-watcher/cmat-services-media-watcher.mjs +5 -0
- package/esm2022/services/media-watcher/media-watcher.service.mjs +55 -0
- package/esm2022/services/media-watcher/public-api.mjs +2 -0
- package/esm2022/services/platform/cmat-services-platform.mjs +5 -0
- package/esm2022/services/platform/platform.service.mjs +46 -0
- package/esm2022/services/platform/public-api.mjs +2 -0
- package/esm2022/services/splash-screen/cmat-services-splash-screen.mjs +5 -0
- package/esm2022/services/splash-screen/public-api.mjs +2 -0
- package/esm2022/services/splash-screen/splash-screen.service.mjs +42 -0
- package/esm2022/services/title/cmat-services-title.mjs +5 -0
- package/esm2022/services/title/public-api.mjs +2 -0
- package/esm2022/services/title/title.service.mjs +46 -0
- package/esm2022/services/translation/cmat-services-translation.mjs +5 -0
- package/esm2022/services/translation/public-api.mjs +2 -0
- package/esm2022/services/translation/translation.service.mjs +62 -0
- package/esm2022/services/utils/cmat-services-utils.mjs +5 -0
- package/esm2022/services/utils/public-api.mjs +2 -0
- package/esm2022/services/utils/utils.service.mjs +391 -0
- package/esm2022/validators/cmat-validators.mjs +5 -0
- package/esm2022/validators/public-api.mjs +2 -0
- package/esm2022/validators/validators.mjs +33 -0
- package/esm2022/version/cmat-version.mjs +5 -0
- package/esm2022/version/public-api.mjs +2 -0
- package/esm2022/version/version.mjs +11 -0
- package/fesm2022/cmat-animations.mjs +466 -0
- package/fesm2022/cmat-animations.mjs.map +1 -0
- package/fesm2022/cmat-components-adapter.mjs +600 -0
- package/fesm2022/cmat-components-adapter.mjs.map +1 -0
- package/fesm2022/cmat-components-breadcrumb.mjs +449 -0
- package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -0
- package/fesm2022/cmat-components-card.mjs +65 -0
- package/fesm2022/cmat-components-card.mjs.map +1 -0
- package/fesm2022/cmat-components-cascade.mjs +334 -0
- package/fesm2022/cmat-components-cascade.mjs.map +1 -0
- package/fesm2022/cmat-components-date-range.mjs +547 -0
- package/fesm2022/cmat-components-date-range.mjs.map +1 -0
- package/fesm2022/cmat-components-drawer.mjs +346 -0
- package/fesm2022/cmat-components-drawer.mjs.map +1 -0
- package/fesm2022/cmat-components-fullscreen.mjs +108 -0
- package/fesm2022/cmat-components-fullscreen.mjs.map +1 -0
- package/fesm2022/cmat-components-highlight.mjs +131 -0
- package/fesm2022/cmat-components-highlight.mjs.map +1 -0
- package/fesm2022/cmat-components-masonry.mjs +61 -0
- package/fesm2022/cmat-components-masonry.mjs.map +1 -0
- package/fesm2022/cmat-components-material-color-picker.mjs +160 -0
- package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -0
- package/fesm2022/cmat-components-material-datetimepicker.mjs +2976 -0
- package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -0
- package/fesm2022/cmat-components-navigation.mjs +1656 -0
- package/fesm2022/cmat-components-navigation.mjs.map +1 -0
- package/fesm2022/cmat-components-pagination.mjs +455 -0
- package/fesm2022/cmat-components-pagination.mjs.map +1 -0
- package/fesm2022/cmat-components-password-strength.mjs +489 -0
- package/fesm2022/cmat-components-password-strength.mjs.map +1 -0
- package/fesm2022/cmat-components-popover.mjs +383 -0
- package/fesm2022/cmat-components-popover.mjs.map +1 -0
- package/fesm2022/cmat-components-progress-bar.mjs +62 -0
- package/fesm2022/cmat-components-progress-bar.mjs.map +1 -0
- package/fesm2022/cmat-components-rating.mjs +98 -0
- package/fesm2022/cmat-components-rating.mjs.map +1 -0
- package/fesm2022/cmat-components-select-search.mjs +531 -0
- package/fesm2022/cmat-components-select-search.mjs.map +1 -0
- package/fesm2022/cmat-components-select-tree.mjs +467 -0
- package/fesm2022/cmat-components-select-tree.mjs.map +1 -0
- package/fesm2022/cmat-components-timeline.mjs +186 -0
- package/fesm2022/cmat-components-timeline.mjs.map +1 -0
- package/fesm2022/cmat-components-toast.mjs +205 -0
- package/fesm2022/cmat-components-toast.mjs.map +1 -0
- package/fesm2022/cmat-components-transfer-picker.mjs +536 -0
- package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -0
- package/fesm2022/cmat-directives-animate-on-scroll.mjs +166 -0
- package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -0
- package/fesm2022/cmat-directives-autofocus.mjs +27 -0
- package/fesm2022/cmat-directives-autofocus.mjs.map +1 -0
- package/fesm2022/cmat-directives-debounce.mjs +85 -0
- package/fesm2022/cmat-directives-debounce.mjs.map +1 -0
- package/fesm2022/cmat-directives-digit-only.mjs +356 -0
- package/fesm2022/cmat-directives-digit-only.mjs.map +1 -0
- package/fesm2022/cmat-directives-equal-validator.mjs +61 -0
- package/fesm2022/cmat-directives-equal-validator.mjs.map +1 -0
- package/fesm2022/cmat-lib-mock-api.mjs +232 -0
- package/fesm2022/cmat-lib-mock-api.mjs.map +1 -0
- package/fesm2022/cmat-pipes-bytes.mjs +32 -0
- package/fesm2022/cmat-pipes-bytes.mjs.map +1 -0
- package/fesm2022/cmat-pipes-date-format.mjs +25 -0
- package/fesm2022/cmat-pipes-date-format.mjs.map +1 -0
- package/fesm2022/cmat-pipes-find-by-key.mjs +30 -0
- package/fesm2022/cmat-pipes-find-by-key.mjs.map +1 -0
- package/fesm2022/cmat-pipes-group-by.mjs +36 -0
- package/fesm2022/cmat-pipes-group-by.mjs.map +1 -0
- package/fesm2022/cmat-pipes-keys.mjs +33 -0
- package/fesm2022/cmat-pipes-keys.mjs.map +1 -0
- package/fesm2022/cmat-pipes-secure.mjs +50 -0
- package/fesm2022/cmat-pipes-secure.mjs.map +1 -0
- package/fesm2022/cmat-pipes-uppercase.mjs +24 -0
- package/fesm2022/cmat-pipes-uppercase.mjs.map +1 -0
- package/fesm2022/cmat-services-alert.mjs +207 -0
- package/fesm2022/cmat-services-alert.mjs.map +1 -0
- package/fesm2022/cmat-services-config.mjs +69 -0
- package/fesm2022/cmat-services-config.mjs.map +1 -0
- package/fesm2022/cmat-services-confirmation.mjs +79 -0
- package/fesm2022/cmat-services-confirmation.mjs.map +1 -0
- package/fesm2022/cmat-services-data.mjs +176 -0
- package/fesm2022/cmat-services-data.mjs.map +1 -0
- package/fesm2022/cmat-services-loading.mjs +104 -0
- package/fesm2022/cmat-services-loading.mjs.map +1 -0
- package/fesm2022/cmat-services-local-storage.mjs +29 -0
- package/fesm2022/cmat-services-local-storage.mjs.map +1 -0
- package/fesm2022/cmat-services-media-watcher.mjs +62 -0
- package/fesm2022/cmat-services-media-watcher.mjs.map +1 -0
- package/fesm2022/cmat-services-platform.mjs +53 -0
- package/fesm2022/cmat-services-platform.mjs.map +1 -0
- package/fesm2022/cmat-services-splash-screen.mjs +49 -0
- package/fesm2022/cmat-services-splash-screen.mjs.map +1 -0
- package/fesm2022/cmat-services-title.mjs +53 -0
- package/fesm2022/cmat-services-title.mjs.map +1 -0
- package/fesm2022/cmat-services-translation.mjs +69 -0
- package/fesm2022/cmat-services-translation.mjs.map +1 -0
- package/fesm2022/cmat-services-utils.mjs +398 -0
- package/fesm2022/cmat-services-utils.mjs.map +1 -0
- package/fesm2022/cmat-validators.mjs +39 -0
- package/fesm2022/cmat-validators.mjs.map +1 -0
- package/fesm2022/cmat-version.mjs +17 -0
- package/fesm2022/cmat-version.mjs.map +1 -0
- package/fesm2022/cmat.mjs +4 -0
- package/fesm2022/cmat.mjs.map +1 -0
- package/icons/CSV.svg +3 -0
- package/icons/EXCEL.svg +3 -0
- package/icons/FILE.svg +3 -0
- package/icons/GIF.svg +3 -0
- package/icons/JPG.svg +3 -0
- package/icons/PDF.svg +3 -0
- package/icons/PNG.svg +3 -0
- package/icons/PPT.svg +3 -0
- package/icons/TEXT.svg +3 -0
- package/icons/VIDEO.svg +3 -0
- package/icons/WORD.svg +3 -0
- package/icons/ZIP.svg +3 -0
- package/icons/arrow-cursor.svg +3 -0
- package/icons/material-icons/heroicons-outline.svg +893 -0
- package/icons/material-icons/heroicons-solid.svg +958 -0
- package/icons/material-icons/material-outline.svg +3586 -0
- package/icons/material-icons/material-solid.svg +3586 -0
- package/index.d.ts +5 -0
- package/lib/mock-api/index.d.ts +5 -0
- package/lib/mock-api/mock-api.constants.d.ts +2 -0
- package/lib/mock-api/mock-api.interceptor.d.ts +12 -0
- package/lib/mock-api/mock-api.request-handler.d.ts +18 -0
- package/lib/mock-api/mock-api.service.d.ts +22 -0
- package/lib/mock-api/mock-api.types.d.ts +9 -0
- package/lib/mock-api/mock-api.utils.d.ts +3 -0
- package/lib/mock-api/public-api.d.ts +5 -0
- package/package.json +344 -0
- package/pipes/bytes/bytes.pipe.d.ts +7 -0
- package/pipes/bytes/index.d.ts +5 -0
- package/pipes/bytes/public-api.d.ts +1 -0
- package/pipes/date-format/date-format.pipe.d.ts +7 -0
- package/pipes/date-format/index.d.ts +5 -0
- package/pipes/date-format/public-api.d.ts +1 -0
- package/pipes/find-by-key/find-by-key.pipe.d.ts +7 -0
- package/pipes/find-by-key/index.d.ts +5 -0
- package/pipes/find-by-key/public-api.d.ts +1 -0
- package/pipes/group-by/group-by.pipe.d.ts +7 -0
- package/pipes/group-by/index.d.ts +5 -0
- package/pipes/group-by/public-api.d.ts +1 -0
- package/pipes/keys/index.d.ts +5 -0
- package/pipes/keys/keys.pipe.d.ts +7 -0
- package/pipes/keys/public-api.d.ts +1 -0
- package/pipes/secure/index.d.ts +5 -0
- package/pipes/secure/public-api.d.ts +1 -0
- package/pipes/secure/secure-pipe.d.ts +18 -0
- package/pipes/uppercase/index.d.ts +5 -0
- package/pipes/uppercase/public-api.d.ts +1 -0
- package/pipes/uppercase/uppercase.pipe.d.ts +7 -0
- package/public-api.d.ts +1 -0
- package/services/alert/alert.dialog.d.ts +11 -0
- package/services/alert/alert.message.d.ts +8 -0
- package/services/alert/alert.service.d.ts +37 -0
- package/services/alert/enum.d.ts +12 -0
- package/services/alert/index.d.ts +5 -0
- package/services/alert/public-api.d.ts +4 -0
- package/services/config/config.constants.d.ts +6 -0
- package/services/config/config.service.d.ts +11 -0
- package/services/config/index.d.ts +5 -0
- package/services/config/public-api.d.ts +3 -0
- package/services/config/urlStateConfig.service.d.ts +10 -0
- package/services/confirmation/confirmation.service.d.ts +12 -0
- package/services/confirmation/confirmation.types.d.ts +21 -0
- package/services/confirmation/dialog/dialog.component.d.ts +10 -0
- package/services/confirmation/index.d.ts +5 -0
- package/services/confirmation/public-api.d.ts +2 -0
- package/services/data/data.service.d.ts +20 -0
- package/services/data/index.d.ts +5 -0
- package/services/data/public-api.d.ts +1 -0
- package/services/loading/index.d.ts +5 -0
- package/services/loading/loading.interceptor.d.ts +12 -0
- package/services/loading/loading.service.d.ts +24 -0
- package/services/loading/public-api.d.ts +2 -0
- package/services/local-storage/index.d.ts +5 -0
- package/services/local-storage/local-storage.service.d.ts +8 -0
- package/services/local-storage/public-api.d.ts +1 -0
- package/services/media-watcher/index.d.ts +5 -0
- package/services/media-watcher/media-watcher.service.d.ts +20 -0
- package/services/media-watcher/public-api.d.ts +1 -0
- package/services/platform/index.d.ts +5 -0
- package/services/platform/platform.service.d.ts +9 -0
- package/services/platform/public-api.d.ts +1 -0
- package/services/splash-screen/index.d.ts +5 -0
- package/services/splash-screen/public-api.d.ts +1 -0
- package/services/splash-screen/splash-screen.service.d.ts +14 -0
- package/services/title/index.d.ts +5 -0
- package/services/title/public-api.d.ts +1 -0
- package/services/title/title.service.d.ts +13 -0
- package/services/translation/index.d.ts +5 -0
- package/services/translation/public-api.d.ts +1 -0
- package/services/translation/translation.service.d.ts +20 -0
- package/services/utils/index.d.ts +5 -0
- package/services/utils/public-api.d.ts +1 -0
- package/services/utils/utils.service.d.ts +57 -0
- package/styles/components/input.scss +42 -0
- package/styles/main.scss +9 -0
- package/styles/overrides/angular-material.scss +1403 -0
- package/styles/overrides/fullcalendar.scss +550 -0
- package/styles/overrides/highlightjs.scss +81 -0
- package/styles/styles.scss +3 -0
- package/styles/tailwind.scss +86 -0
- package/styles/themes.scss +164 -0
- package/styles/user-themes.scss +1 -0
- package/tailwind/plugins/icon-size.js +49 -0
- package/tailwind/plugins/theming.js +256 -0
- package/tailwind/plugins/utilities.js +66 -0
- package/tailwind/utils/generate-contrasts.js +29 -0
- package/tailwind/utils/generate-palette.js +100 -0
- package/tailwind/utils/json-to-sass-map.js +67 -0
- package/validators/index.d.ts +5 -0
- package/validators/public-api.d.ts +1 -0
- package/validators/validators.d.ts +5 -0
- package/version/index.d.ts +5 -0
- package/version/public-api.d.ts +1 -0
- package/version/version.d.ts +9 -0
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable } from '@angular/core';
|
|
3
|
+
import { HttpResponseBase } from '@angular/common/http';
|
|
4
|
+
import { Subject } from 'rxjs';
|
|
5
|
+
import { CmatUtilsService } from 'cmat/services/utils';
|
|
6
|
+
|
|
7
|
+
class CmatAlertDialog {
|
|
8
|
+
constructor(message, type, okCallback, cancelCallback, defaultValue, okLabel, cancelLabel) {
|
|
9
|
+
this.message = message;
|
|
10
|
+
this.type = type;
|
|
11
|
+
this.okCallback = okCallback;
|
|
12
|
+
this.cancelCallback = cancelCallback;
|
|
13
|
+
this.defaultValue = defaultValue;
|
|
14
|
+
this.okLabel = okLabel;
|
|
15
|
+
this.cancelLabel = cancelLabel;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
class CmatAlertMessage {
|
|
20
|
+
constructor(severity, summary, detail, isPostionBottom = false) {
|
|
21
|
+
this.severity = severity;
|
|
22
|
+
this.summary = summary;
|
|
23
|
+
this.detail = detail;
|
|
24
|
+
this.isPostionBottom = isPostionBottom;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var CmatDialogType;
|
|
29
|
+
(function (CmatDialogType) {
|
|
30
|
+
CmatDialogType[CmatDialogType["alert"] = 0] = "alert";
|
|
31
|
+
CmatDialogType[CmatDialogType["confirm"] = 1] = "confirm";
|
|
32
|
+
CmatDialogType[CmatDialogType["prompt"] = 2] = "prompt";
|
|
33
|
+
})(CmatDialogType || (CmatDialogType = {}));
|
|
34
|
+
var CmatMessageSeverity;
|
|
35
|
+
(function (CmatMessageSeverity) {
|
|
36
|
+
CmatMessageSeverity["info"] = "info";
|
|
37
|
+
CmatMessageSeverity["success"] = "success";
|
|
38
|
+
CmatMessageSeverity["error"] = "error";
|
|
39
|
+
CmatMessageSeverity["warn"] = "warn";
|
|
40
|
+
CmatMessageSeverity["wait"] = "wait";
|
|
41
|
+
})(CmatMessageSeverity || (CmatMessageSeverity = {}));
|
|
42
|
+
|
|
43
|
+
class CmatAlertService {
|
|
44
|
+
constructor() {
|
|
45
|
+
this._messages = new Subject();
|
|
46
|
+
this._stickyMessages = new Subject();
|
|
47
|
+
this._dialogs = new Subject();
|
|
48
|
+
this._isLoading = new Subject();
|
|
49
|
+
}
|
|
50
|
+
showDialog(message, type, okCallback, cancelCallback, okLabel, cancelLabel, defaultValue) {
|
|
51
|
+
if (!type) {
|
|
52
|
+
type = CmatDialogType.alert;
|
|
53
|
+
}
|
|
54
|
+
this._dialogs.next({
|
|
55
|
+
message: message,
|
|
56
|
+
type: type,
|
|
57
|
+
okCallback: okCallback,
|
|
58
|
+
cancelCallback: cancelCallback,
|
|
59
|
+
okLabel: okLabel,
|
|
60
|
+
cancelLabel: cancelLabel,
|
|
61
|
+
defaultValue: defaultValue
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
showMessage(data, separatorOrDetail, severity) {
|
|
65
|
+
if (!severity) {
|
|
66
|
+
severity = CmatMessageSeverity.info;
|
|
67
|
+
}
|
|
68
|
+
if (data instanceof HttpResponseBase) {
|
|
69
|
+
data = CmatUtilsService.getHttpResponseMessage(data);
|
|
70
|
+
separatorOrDetail = CmatUtilsService.captionAndMessageSeparator;
|
|
71
|
+
}
|
|
72
|
+
if (data instanceof Array) {
|
|
73
|
+
for (const message of data) {
|
|
74
|
+
const msgObject = CmatUtilsService.splitInTwo(message, separatorOrDetail);
|
|
75
|
+
this._showMessageHelper(msgObject.firstPart, msgObject.secondPart || '', severity, false);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
this._showMessageHelper(data, separatorOrDetail || '', severity, false);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
showBottomMessage(data, separatorOrDetail, severity) {
|
|
83
|
+
if (!severity) {
|
|
84
|
+
severity = CmatMessageSeverity.info;
|
|
85
|
+
}
|
|
86
|
+
if (data instanceof HttpResponseBase) {
|
|
87
|
+
data = CmatUtilsService.getHttpResponseMessage(data);
|
|
88
|
+
separatorOrDetail = CmatUtilsService.captionAndMessageSeparator;
|
|
89
|
+
}
|
|
90
|
+
if (data instanceof Array) {
|
|
91
|
+
for (const message of data) {
|
|
92
|
+
const msgObject = CmatUtilsService.splitInTwo(message, separatorOrDetail);
|
|
93
|
+
this._showMessageHelper(msgObject.firstPart, msgObject.secondPart || '', severity, true, true);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
this._showMessageHelper(data, separatorOrDetail || '', severity, true, true);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
showStickyMessage(data, separatorOrDetail, severity, error) {
|
|
101
|
+
if (!severity) {
|
|
102
|
+
severity = CmatMessageSeverity.info;
|
|
103
|
+
}
|
|
104
|
+
if (data instanceof HttpResponseBase) {
|
|
105
|
+
data = CmatUtilsService.getHttpResponseMessage(data);
|
|
106
|
+
separatorOrDetail = CmatUtilsService.captionAndMessageSeparator;
|
|
107
|
+
}
|
|
108
|
+
if (data instanceof Array) {
|
|
109
|
+
for (const message of data) {
|
|
110
|
+
const msgObject = CmatUtilsService.splitInTwo(message, separatorOrDetail);
|
|
111
|
+
this._showMessageHelper(msgObject.firstPart, msgObject.secondPart || '', severity, true);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
if (error) {
|
|
116
|
+
const msg = `Message.Severity: "${CmatMessageSeverity[severity]}", Message.Summary: "${data}",
|
|
117
|
+
Message.Detail: "${separatorOrDetail}", Message.Error: "${CmatUtilsService.safeStringify(error)}"`;
|
|
118
|
+
switch (severity) {
|
|
119
|
+
case CmatMessageSeverity.info:
|
|
120
|
+
this.logInfo(msg);
|
|
121
|
+
break;
|
|
122
|
+
case CmatMessageSeverity.success:
|
|
123
|
+
this.logMessage(msg);
|
|
124
|
+
break;
|
|
125
|
+
case CmatMessageSeverity.error:
|
|
126
|
+
this.logError(msg);
|
|
127
|
+
break;
|
|
128
|
+
case CmatMessageSeverity.warn:
|
|
129
|
+
this.logWarning(msg);
|
|
130
|
+
break;
|
|
131
|
+
case CmatMessageSeverity.wait:
|
|
132
|
+
this.logTrace(msg);
|
|
133
|
+
break;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
this._showMessageHelper((data), separatorOrDetail || '', severity, true);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
startLoadingMessage(message = '载入中...', caption = '') {
|
|
140
|
+
this._isLoading.next(true);
|
|
141
|
+
clearTimeout(this._loadingMessageId);
|
|
142
|
+
this._loadingMessageId = setTimeout(() => {
|
|
143
|
+
this.showStickyMessage(caption, message, CmatMessageSeverity.wait);
|
|
144
|
+
}, 1000);
|
|
145
|
+
}
|
|
146
|
+
stopLoadingMessage() {
|
|
147
|
+
this._isLoading.next(false);
|
|
148
|
+
clearTimeout(this._loadingMessageId);
|
|
149
|
+
this.resetStickyMessage();
|
|
150
|
+
}
|
|
151
|
+
logDebug(msg) {
|
|
152
|
+
console.debug(msg);
|
|
153
|
+
}
|
|
154
|
+
logError(msg) {
|
|
155
|
+
console.error(msg);
|
|
156
|
+
}
|
|
157
|
+
logInfo(msg) {
|
|
158
|
+
console.info(msg);
|
|
159
|
+
}
|
|
160
|
+
logMessage(msg) {
|
|
161
|
+
console.log(msg);
|
|
162
|
+
}
|
|
163
|
+
logTrace(msg) {
|
|
164
|
+
console.trace(msg);
|
|
165
|
+
}
|
|
166
|
+
logWarning(msg) {
|
|
167
|
+
console.warn(msg);
|
|
168
|
+
}
|
|
169
|
+
resetStickyMessage() {
|
|
170
|
+
this._stickyMessages.next(void 0);
|
|
171
|
+
}
|
|
172
|
+
getDialogEvent$() {
|
|
173
|
+
return this._dialogs.asObservable();
|
|
174
|
+
}
|
|
175
|
+
getMessageEvent$() {
|
|
176
|
+
return this._messages.asObservable();
|
|
177
|
+
}
|
|
178
|
+
getStickyMessageEvent$() {
|
|
179
|
+
return this._stickyMessages.asObservable();
|
|
180
|
+
}
|
|
181
|
+
isLoadingInProgress$() {
|
|
182
|
+
return this._isLoading.asObservable();
|
|
183
|
+
}
|
|
184
|
+
_showMessageHelper(summary, detail, severity, isSticky, isPostionBottom = false) {
|
|
185
|
+
if (isSticky) {
|
|
186
|
+
this._stickyMessages.next({ severity: severity, summary: summary, detail: detail, isPostionBottom: isPostionBottom });
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
this._messages.next({ severity: severity, summary: summary, detail: detail, isPostionBottom: isPostionBottom });
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatAlertService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
193
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatAlertService, providedIn: 'root' }); }
|
|
194
|
+
}
|
|
195
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatAlertService, decorators: [{
|
|
196
|
+
type: Injectable,
|
|
197
|
+
args: [{
|
|
198
|
+
providedIn: 'root'
|
|
199
|
+
}]
|
|
200
|
+
}] });
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Generated bundle index. Do not edit.
|
|
204
|
+
*/
|
|
205
|
+
|
|
206
|
+
export { CmatAlertDialog, CmatAlertMessage, CmatAlertService, CmatDialogType, CmatMessageSeverity };
|
|
207
|
+
//# sourceMappingURL=cmat-services-alert.mjs.map
|
|
@@ -0,0 +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 warn = 'warn',\r\n wait = 'wait'\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpResponseBase } from '@angular/common/http';\r\nimport { Observable, Subject } from 'rxjs';\r\n\r\nimport { CmatAlertDialog } from './alert.dialog';\r\nimport { CmatAlertMessage } from './alert.message';\r\nimport { CmatDialogType, CmatMessageSeverity } from './enum';\r\nimport { CmatUtilsService } from 'cmat/services/utils';\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 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);\r\n\r\n this._showMessageHelper(msgObject.firstPart, msgObject.secondPart || '', severity, true);\r\n }\r\n } else {\r\n\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.warn:\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 getDialogEvent$(): Observable<CmatAlertDialog> {\r\n return this._dialogs.asObservable();\r\n }\r\n\r\n\r\n getMessageEvent$(): Observable<CmatAlertMessage> {\r\n return this._messages.asObservable();\r\n }\r\n\r\n getStickyMessageEvent$(): Observable<CmatAlertMessage | void> {\r\n return this._stickyMessages.asObservable();\r\n }\r\n\r\n isLoadingInProgress$(): Observable<boolean> {\r\n return this._isLoading.asObservable();\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,CAAQ;QAAS,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAgB;QAAS,IAAU,CAAA,UAAA,GAAV,UAAU,CAAqB;QAAS,IAAc,CAAA,cAAA,GAAd,cAAc,CAAY;QAC/H,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAS;QAAS,IAAO,CAAA,OAAA,GAAP,OAAO,CAAS;QAAS,IAAW,CAAA,WAAA,GAAX,WAAW,CAAS;KAErF;AACJ;;MCLY,gBAAgB,CAAA;AACzB,IAAA,WAAA,CAAmB,QAA6B,EAAS,OAAe,EAAS,MAAc,EAAS,kBAA2B,KAAK,EAAA;QAArH,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAqB;QAAS,IAAO,CAAA,OAAA,GAAP,OAAO,CAAQ;QAAS,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;QAAS,IAAe,CAA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|
2
|
+
import { InjectionToken, Injectable, Inject } from '@angular/core';
|
|
3
|
+
import { BehaviorSubject } from 'rxjs';
|
|
4
|
+
import { merge } from 'lodash-es';
|
|
5
|
+
|
|
6
|
+
const CMAT_APP_CONFIG = new InjectionToken('CMAT_APP_CONFIG');
|
|
7
|
+
|
|
8
|
+
class CmatConfigService {
|
|
9
|
+
constructor(config) {
|
|
10
|
+
this._config = new BehaviorSubject(config);
|
|
11
|
+
}
|
|
12
|
+
get config$() {
|
|
13
|
+
return this._config.asObservable();
|
|
14
|
+
}
|
|
15
|
+
set config(value) {
|
|
16
|
+
// Merge the new config over to the current config
|
|
17
|
+
const config = merge({}, this._config.getValue(), value);
|
|
18
|
+
// Execute the observable
|
|
19
|
+
this._config.next(config);
|
|
20
|
+
}
|
|
21
|
+
reset() {
|
|
22
|
+
// Set the config
|
|
23
|
+
this._config.next(this.config);
|
|
24
|
+
}
|
|
25
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.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: "17.1.0", ngImport: i0, type: CmatConfigService, providedIn: 'root' }); }
|
|
27
|
+
}
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatConfigService, decorators: [{
|
|
29
|
+
type: Injectable,
|
|
30
|
+
args: [{
|
|
31
|
+
providedIn: 'root'
|
|
32
|
+
}]
|
|
33
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
34
|
+
type: Inject,
|
|
35
|
+
args: [CMAT_APP_CONFIG]
|
|
36
|
+
}] }] });
|
|
37
|
+
|
|
38
|
+
class CmatUrlStateConfigService {
|
|
39
|
+
constructor() {
|
|
40
|
+
this._config = new BehaviorSubject({
|
|
41
|
+
fileUrl: '',
|
|
42
|
+
enableDataProtect: false
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
get config$() {
|
|
46
|
+
return this._config.asObservable();
|
|
47
|
+
}
|
|
48
|
+
set config(value) {
|
|
49
|
+
// Merge the new config over to the current config
|
|
50
|
+
const config = merge({}, this._config.getValue(), value);
|
|
51
|
+
// Execute the observable
|
|
52
|
+
this._config.next(config);
|
|
53
|
+
}
|
|
54
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatUrlStateConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
55
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatUrlStateConfigService, providedIn: 'root' }); }
|
|
56
|
+
}
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatUrlStateConfigService, decorators: [{
|
|
58
|
+
type: Injectable,
|
|
59
|
+
args: [{
|
|
60
|
+
providedIn: 'root'
|
|
61
|
+
}]
|
|
62
|
+
}], ctorParameters: () => [] });
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Generated bundle index. Do not edit.
|
|
66
|
+
*/
|
|
67
|
+
|
|
68
|
+
export { CMAT_APP_CONFIG, CmatConfigService, CmatUrlStateConfigService };
|
|
69
|
+
//# sourceMappingURL=cmat-services-config.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cmat-services-config.mjs","sources":["../../../projects/cmat/services/config/config.constants.ts","../../../projects/cmat/services/config/config.service.ts","../../../projects/cmat/services/config/urlStateConfig.service.ts","../../../projects/cmat/services/config/cmat-services-config.ts"],"sourcesContent":["import {InjectionToken} from '@angular/core';\r\n\r\nexport const CMAT_APP_CONFIG = new InjectionToken<any>('CMAT_APP_CONFIG');\r\n\r\nexport interface IUrlStateCONFIG {\r\n fileUrl: string;\r\n enableDataProtect: boolean;\r\n}\r\n","import { Inject, Injectable } from '@angular/core';\r\nimport { BehaviorSubject, Observable } from 'rxjs';\r\nimport { merge } from 'lodash-es';\r\nimport { CMAT_APP_CONFIG } from './config.constants';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatConfigService {\r\n private _config: BehaviorSubject<any>;\r\n\r\n constructor(@Inject(CMAT_APP_CONFIG) config: any) {\r\n this._config = new BehaviorSubject(config);\r\n }\r\n\r\n get config$(): Observable<any> {\r\n return this._config.asObservable();\r\n }\r\n\r\n set config(value: any) {\r\n // Merge the new config over to the current config\r\n const config = merge({}, this._config.getValue(), value);\r\n\r\n // Execute the observable\r\n this._config.next(config);\r\n }\r\n\r\n reset(): void {\r\n // Set the config\r\n this._config.next(this.config);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { BehaviorSubject, Observable } from 'rxjs';\r\nimport { merge } from 'lodash-es';\r\nimport { IUrlStateCONFIG } from './config.constants';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatUrlStateConfigService {\r\n private _config: BehaviorSubject<IUrlStateCONFIG> = new BehaviorSubject<IUrlStateCONFIG>({\r\n fileUrl: '',\r\n enableDataProtect: false\r\n });\r\n\r\n constructor() {\r\n\r\n }\r\n\r\n get config$(): Observable<any> {\r\n return this._config.asObservable();\r\n }\r\n\r\n set config(value: any) {\r\n // Merge the new config over to the current config\r\n const config = merge({}, this._config.getValue(), value);\r\n\r\n // Execute the observable\r\n this._config.next(config);\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAEa,eAAe,GAAG,IAAI,cAAc,CAAM,iBAAiB;;MCM3D,iBAAiB,CAAA;AAG1B,IAAA,WAAA,CAAqC,MAAW,EAAA;QAC5C,IAAI,CAAC,OAAO,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC;KAC9C;AAED,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AAC;KAIF;AAED,IAAA,IAAI,OAAO,GAAA;AACP,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;KACtC;IAED,IAAI,MAAM,CAAC,KAAU,EAAA;;AAEjB,QAAA,MAAM,MAAM,GAAG,KAAK,CAAC,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,CAAC;;AAGzD,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KAC7B;8GApBQ,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAzB,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,yBAAyB,cAFtB,MAAM,EAAA,CAAA,CAAA,EAAA;;2FAET,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAHrC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE,MAAM;AACrB,iBAAA,CAAA;;;ACPD;;AAEG;;;;"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, ViewEncapsulation, Inject, Injectable } from '@angular/core';
|
|
3
|
+
import { merge } from 'lodash-es';
|
|
4
|
+
import * as i1 from '@angular/material/dialog';
|
|
5
|
+
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
6
|
+
import * as i3 from '@angular/material/icon';
|
|
7
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
8
|
+
import * as i2 from '@angular/material/button';
|
|
9
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
10
|
+
import { NgIf, NgClass } from '@angular/common';
|
|
11
|
+
|
|
12
|
+
class CmatConfirmationDialogComponent {
|
|
13
|
+
constructor(data, matDialogRef) {
|
|
14
|
+
this.data = data;
|
|
15
|
+
this.matDialogRef = matDialogRef;
|
|
16
|
+
}
|
|
17
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatConfirmationDialogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
18
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.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 <ng-container *ngIf=\"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 </ng-container>\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 <ng-container *ngIf=\"data.icon?.show\">\r\n <div class=\"flex flex-0 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 <mat-icon class=\"text-current\" *ngIf=\"data.icon?.name\" [svgIcon]=\"data.icon?.name||''\"></mat-icon>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"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 space-y-1 text-center sm:text-left\">\r\n\r\n <!-- Title -->\r\n <ng-container *ngIf=\"data.title\">\r\n <div class=\"text-xl leading-6 font-medium\" [innerHTML]=\"data.title\"></div>\r\n </ng-container>\r\n\r\n <!-- Message -->\r\n <ng-container *ngIf=\"data.message\">\r\n <div class=\"text-secondary\" [innerHTML]=\"data.message\"></div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n\r\n </div>\r\n\r\n <!-- Actions -->\r\n <ng-container *ngIf=\"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 space-x-3 bg-slate-50 dark:bg-black dark:bg-opacity-10\">\r\n\r\n <!-- Confirm -->\r\n <ng-container *ngIf=\"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 </ng-container>\r\n\r\n <!-- Cancel -->\r\n <ng-container *ngIf=\"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 </ng-container>\r\n\r\n </div>\r\n </ng-container>\r\n\r\n</div>", styles: [".cmat-confirmation-dialog-panel{@apply md:w-128;}.cmat-confirmation-dialog-panel .mat-mdc-dialog-container{padding:0!important}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { 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
|
+
}
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatConfirmationDialogComponent, decorators: [{
|
|
21
|
+
type: Component,
|
|
22
|
+
args: [{ selector: 'cmat-confirmation-dialog', encapsulation: ViewEncapsulation.None, standalone: true, imports: [NgIf, MatButtonModule, MatDialogModule, MatIconModule, NgClass], template: "<div class=\"relative flex flex-col w-full h-full\">\r\n\r\n <!-- Dismiss button -->\r\n <ng-container *ngIf=\"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 </ng-container>\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 <ng-container *ngIf=\"data.icon?.show\">\r\n <div class=\"flex flex-0 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 <mat-icon class=\"text-current\" *ngIf=\"data.icon?.name\" [svgIcon]=\"data.icon?.name||''\"></mat-icon>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"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 space-y-1 text-center sm:text-left\">\r\n\r\n <!-- Title -->\r\n <ng-container *ngIf=\"data.title\">\r\n <div class=\"text-xl leading-6 font-medium\" [innerHTML]=\"data.title\"></div>\r\n </ng-container>\r\n\r\n <!-- Message -->\r\n <ng-container *ngIf=\"data.message\">\r\n <div class=\"text-secondary\" [innerHTML]=\"data.message\"></div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n\r\n </div>\r\n\r\n <!-- Actions -->\r\n <ng-container *ngIf=\"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 space-x-3 bg-slate-50 dark:bg-black dark:bg-opacity-10\">\r\n\r\n <!-- Confirm -->\r\n <ng-container *ngIf=\"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 </ng-container>\r\n\r\n <!-- Cancel -->\r\n <ng-container *ngIf=\"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 </ng-container>\r\n\r\n </div>\r\n </ng-container>\r\n\r\n</div>", styles: [".cmat-confirmation-dialog-panel{@apply md:w-128;}.cmat-confirmation-dialog-panel .mat-mdc-dialog-container{padding:0!important}\n"] }]
|
|
23
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
24
|
+
type: Inject,
|
|
25
|
+
args: [MAT_DIALOG_DATA]
|
|
26
|
+
}] }, { type: i1.MatDialogRef }] });
|
|
27
|
+
|
|
28
|
+
class CmatConfirmationService {
|
|
29
|
+
constructor(_matDialog) {
|
|
30
|
+
this._matDialog = _matDialog;
|
|
31
|
+
this._defaultConfig = {
|
|
32
|
+
title: '确认动作',
|
|
33
|
+
message: '确认此动作吗?',
|
|
34
|
+
icon: {
|
|
35
|
+
show: true,
|
|
36
|
+
name: 'heroicons_outline:exclamation',
|
|
37
|
+
color: 'warn'
|
|
38
|
+
},
|
|
39
|
+
actions: {
|
|
40
|
+
confirm: {
|
|
41
|
+
show: true,
|
|
42
|
+
label: '确认',
|
|
43
|
+
color: 'warn'
|
|
44
|
+
},
|
|
45
|
+
cancel: {
|
|
46
|
+
show: true,
|
|
47
|
+
label: '取消'
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
dismissible: false
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
open(config = {}) {
|
|
54
|
+
// Merge the user config with the default config
|
|
55
|
+
const userConfig = merge({}, this._defaultConfig, config);
|
|
56
|
+
// Open the dialog
|
|
57
|
+
return this._matDialog.open(CmatConfirmationDialogComponent, {
|
|
58
|
+
autoFocus: false,
|
|
59
|
+
disableClose: !userConfig.dismissible,
|
|
60
|
+
data: userConfig,
|
|
61
|
+
panelClass: 'cmat-confirmation-dialog-panel'
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatConfirmationService, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
65
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatConfirmationService, providedIn: 'root' }); }
|
|
66
|
+
}
|
|
67
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatConfirmationService, decorators: [{
|
|
68
|
+
type: Injectable,
|
|
69
|
+
args: [{
|
|
70
|
+
providedIn: 'root'
|
|
71
|
+
}]
|
|
72
|
+
}], ctorParameters: () => [{ type: i1.MatDialog }] });
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Generated bundle index. Do not edit.
|
|
76
|
+
*/
|
|
77
|
+
|
|
78
|
+
export { CmatConfirmationService };
|
|
79
|
+
//# sourceMappingURL=cmat-services-confirmation.mjs.map
|
|
@@ -0,0 +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 { Component, Inject, ViewEncapsulation } from '@angular/core';\r\nimport { MAT_DIALOG_DATA, MatDialogRef, MatDialogModule } from '@angular/material/dialog';\r\nimport { CmatConfirmationConfig } from '../confirmation.types';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { NgIf, NgClass } from '@angular/common';\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 @apply md:w-128;\r\n\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 standalone: true,\r\n imports: [NgIf, 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 <ng-container *ngIf=\"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 </ng-container>\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 <ng-container *ngIf=\"data.icon?.show\">\r\n <div class=\"flex flex-0 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 <mat-icon class=\"text-current\" *ngIf=\"data.icon?.name\" [svgIcon]=\"data.icon?.name||''\"></mat-icon>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"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 space-y-1 text-center sm:text-left\">\r\n\r\n <!-- Title -->\r\n <ng-container *ngIf=\"data.title\">\r\n <div class=\"text-xl leading-6 font-medium\" [innerHTML]=\"data.title\"></div>\r\n </ng-container>\r\n\r\n <!-- Message -->\r\n <ng-container *ngIf=\"data.message\">\r\n <div class=\"text-secondary\" [innerHTML]=\"data.message\"></div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n\r\n </div>\r\n\r\n <!-- Actions -->\r\n <ng-container *ngIf=\"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 space-x-3 bg-slate-50 dark:bg-black dark:bg-opacity-10\">\r\n\r\n <!-- Confirm -->\r\n <ng-container *ngIf=\"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 </ng-container>\r\n\r\n <!-- Cancel -->\r\n <ng-container *ngIf=\"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 </ng-container>\r\n\r\n </div>\r\n </ng-container>\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 { CmatConfirmationDialogComponent } from './dialog/dialog.component';\r\nimport { CmatConfirmationConfig } from './confirmation.types';\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',\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":";;;;;;;;;;;MA0Ba,+BAA+B,CAAA;IAExC,WACoC,CAAA,IAA4B,EACrD,YAA2D,EAAA;QADlC,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAwB;QACrD,IAAY,CAAA,YAAA,GAAZ,YAAY,CAA+C;KAErE;AANQ,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,EA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iBAAA;AACJ,aAAA;AACD,YAAA,WAAW,EAAE,KAAK;SACrB,CAAC;KAID;IAED,IAAI,CAAC,SAAiC,EAAE,EAAA;;AAEpC,QAAA,MAAM,UAAU,GAAG,KAAK,CAAC,EAAE,EAAE,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;;AAG1D,QAAA,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,+BAA+B,EAAE;AACzD,YAAA,SAAS,EAAE,KAAK;AAChB,YAAA,YAAY,EAAE,CAAC,UAAU,CAAC,WAAW;AACrC,YAAA,IAAI,EAAE,UAAU;AAChB,YAAA,UAAU,EAAE,gCAAgC;AAC/C,SAAA,CAAC,CAAC;KACN;8GAtCQ,uBAAuB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,SAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAvB,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,uBAAuB,cAFpB,MAAM,EAAA,CAAA,CAAA,EAAA;;2FAET,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAHnC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE,MAAM;AACrB,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common/http';
|
|
4
|
+
import { HttpParams } from '@angular/common/http';
|
|
5
|
+
import { Subject } from 'rxjs';
|
|
6
|
+
import { takeUntil, retry, map, catchError, tap } from 'rxjs/operators';
|
|
7
|
+
import { CmatUtilsService } from 'cmat/services/utils';
|
|
8
|
+
import * as i2 from 'cmat/services/config';
|
|
9
|
+
|
|
10
|
+
class CmatDataService {
|
|
11
|
+
constructor(_http, _urlStateConfigService) {
|
|
12
|
+
this._http = _http;
|
|
13
|
+
this._urlStateConfigService = _urlStateConfigService;
|
|
14
|
+
this._enableDataProtect = false;
|
|
15
|
+
this._unsubscribeAll = new Subject();
|
|
16
|
+
this._urlStateConfigService.config$
|
|
17
|
+
.pipe(takeUntil(this._unsubscribeAll))
|
|
18
|
+
.subscribe((config) => {
|
|
19
|
+
this._enableDataProtect = config.enableDataProtect;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
ngOnDestroy() {
|
|
23
|
+
this._unsubscribeAll.next(void 0);
|
|
24
|
+
this._unsubscribeAll.complete();
|
|
25
|
+
}
|
|
26
|
+
get(url, params = {}, auth = true) {
|
|
27
|
+
const httpParams = new HttpParams();
|
|
28
|
+
const headers = auth ? CmatUtilsService.getRequestHeaders() : CmatUtilsService.getRequestCryptoHeaders('');
|
|
29
|
+
if (Object.keys(params).length !== 0) {
|
|
30
|
+
if (this._enableDataProtect) {
|
|
31
|
+
httpParams.appendAll({
|
|
32
|
+
params: CmatUtilsService.getEncryptData(JSON.stringify({ params: params }))
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
httpParams.appendAll(params);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
const options = { params: httpParams };
|
|
40
|
+
if (this._enableDataProtect) {
|
|
41
|
+
return this._http.get(url, { ...options, headers: headers })
|
|
42
|
+
.pipe(retry({ count: 3, delay: 1000 }), map((res) => {
|
|
43
|
+
if (res) {
|
|
44
|
+
return JSON.parse(CmatUtilsService.getDecryptData(res));
|
|
45
|
+
}
|
|
46
|
+
return res;
|
|
47
|
+
}), catchError((err) => CmatUtilsService.handleError(err)));
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
return this._http.get(url, { ...options, headers: headers })
|
|
51
|
+
.pipe(retry({ count: 3, delay: 1000 }), tap((res) => res), catchError((err) => CmatUtilsService.handleError(err)));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
post(url, data, params = {}, auth = true) {
|
|
55
|
+
const httpParams = new HttpParams();
|
|
56
|
+
const headers = auth ? CmatUtilsService.getRequestBypassHeaders() : CmatUtilsService.getRequestCryptoBypassHeaders('');
|
|
57
|
+
if (Object.keys(params).length !== 0) {
|
|
58
|
+
if (this._enableDataProtect) {
|
|
59
|
+
httpParams.appendAll({
|
|
60
|
+
params: CmatUtilsService.getEncryptData(JSON.stringify(params))
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
httpParams.appendAll(params);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
const options = { params: httpParams };
|
|
68
|
+
if (this._enableDataProtect) {
|
|
69
|
+
data = CmatUtilsService.getEncryptData(JSON.stringify(data));
|
|
70
|
+
return this._http.post(url, data, { ...options, headers: headers })
|
|
71
|
+
.pipe(map((res) => {
|
|
72
|
+
if (res) {
|
|
73
|
+
return JSON.parse(CmatUtilsService.getDecryptData(res));
|
|
74
|
+
}
|
|
75
|
+
return res;
|
|
76
|
+
}), catchError((err) => CmatUtilsService.handleError(err)));
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
return this._http.post(url, data, { ...options, headers: headers })
|
|
80
|
+
.pipe(tap((res) => res), catchError((err) => CmatUtilsService.handleError(err)));
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
put(url, data, params = {}, auth = true) {
|
|
84
|
+
const httpParams = new HttpParams();
|
|
85
|
+
const headers = auth ? CmatUtilsService.getRequestBypassHeaders() : CmatUtilsService.getRequestCryptoBypassHeaders('');
|
|
86
|
+
if (Object.keys(params).length !== 0) {
|
|
87
|
+
if (this._enableDataProtect) {
|
|
88
|
+
httpParams.appendAll({
|
|
89
|
+
params: CmatUtilsService.getEncryptData(JSON.stringify(params))
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
httpParams.appendAll(params);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
const options = { params: httpParams };
|
|
97
|
+
if (this._enableDataProtect) {
|
|
98
|
+
data = CmatUtilsService.getEncryptData(JSON.stringify(data));
|
|
99
|
+
return this._http.put(url, data, { ...options, headers: headers })
|
|
100
|
+
.pipe(map((res) => {
|
|
101
|
+
if (res) {
|
|
102
|
+
return JSON.parse(CmatUtilsService.getDecryptData(res));
|
|
103
|
+
}
|
|
104
|
+
return res;
|
|
105
|
+
}), catchError((err) => CmatUtilsService.handleError(err)));
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
return this._http.put(url, data, { ...options, headers: headers })
|
|
109
|
+
.pipe(tap((res) => res), catchError((err) => CmatUtilsService.handleError(err)));
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
delete(url, params = {}, auth = true) {
|
|
113
|
+
const httpParams = new HttpParams();
|
|
114
|
+
const headers = auth ? CmatUtilsService.getRequestBypassHeaders() : CmatUtilsService.getRequestCryptoBypassHeaders('');
|
|
115
|
+
if (Object.keys(params).length !== 0) {
|
|
116
|
+
if (this._enableDataProtect) {
|
|
117
|
+
httpParams.appendAll({
|
|
118
|
+
params: CmatUtilsService.getEncryptData(JSON.stringify(params))
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
httpParams.appendAll(params);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
const options = { params: httpParams };
|
|
126
|
+
return this._http.delete(url, {
|
|
127
|
+
...options,
|
|
128
|
+
headers: headers
|
|
129
|
+
})
|
|
130
|
+
.pipe(tap((res) => res), catchError((err) => CmatUtilsService.handleError(err)));
|
|
131
|
+
}
|
|
132
|
+
patch(url, data, params = {}, auth = true) {
|
|
133
|
+
const httpParams = new HttpParams();
|
|
134
|
+
const headers = auth ? CmatUtilsService.getRequestBypassHeaders() : CmatUtilsService.getRequestCryptoBypassHeaders('');
|
|
135
|
+
if (Object.keys(params).length !== 0) {
|
|
136
|
+
if (this._enableDataProtect) {
|
|
137
|
+
httpParams.appendAll({
|
|
138
|
+
params: CmatUtilsService.getEncryptData(JSON.stringify(params))
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
httpParams.appendAll(params);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
const options = { params: httpParams };
|
|
146
|
+
if (this._enableDataProtect) {
|
|
147
|
+
data = CmatUtilsService.getEncryptData(JSON.stringify(data));
|
|
148
|
+
return this._http.patch(url, data, { ...options, headers: headers })
|
|
149
|
+
.pipe(map((res) => {
|
|
150
|
+
if (res) {
|
|
151
|
+
return JSON.parse(CmatUtilsService.getDecryptData(res));
|
|
152
|
+
}
|
|
153
|
+
return res;
|
|
154
|
+
}), catchError((err) => CmatUtilsService.handleError(err)));
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
return this._http.patch(url, data, { ...options, headers: headers })
|
|
158
|
+
.pipe(tap((res) => res), catchError((err) => CmatUtilsService.handleError(err)));
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.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: "17.1.0", ngImport: i0, type: CmatDataService, providedIn: 'root' }); }
|
|
163
|
+
}
|
|
164
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatDataService, decorators: [{
|
|
165
|
+
type: Injectable,
|
|
166
|
+
args: [{
|
|
167
|
+
providedIn: 'root'
|
|
168
|
+
}]
|
|
169
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.CmatUrlStateConfigService }] });
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Generated bundle index. Do not edit.
|
|
173
|
+
*/
|
|
174
|
+
|
|
175
|
+
export { CmatDataService };
|
|
176
|
+
//# sourceMappingURL=cmat-services-data.mjs.map
|