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,80 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, Input, SecurityContext, TemplateRef, ViewChild, ViewEncapsulation } from '@angular/core';
|
|
2
|
+
import { NgClass } from '@angular/common';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/platform-browser";
|
|
5
|
+
import * as i2 from "./highlight.service";
|
|
6
|
+
export class CmatHighlightComponent {
|
|
7
|
+
constructor(_domSanitizer, _elementRef, _cmatHighlightService, _viewContainerRef) {
|
|
8
|
+
this._domSanitizer = _domSanitizer;
|
|
9
|
+
this._elementRef = _elementRef;
|
|
10
|
+
this._cmatHighlightService = _cmatHighlightService;
|
|
11
|
+
this._viewContainerRef = _viewContainerRef;
|
|
12
|
+
}
|
|
13
|
+
ngOnChanges(changes) {
|
|
14
|
+
// Code & Lang
|
|
15
|
+
if ('code' in changes || 'lang' in changes) {
|
|
16
|
+
// Return if the viewContainerRef is not available
|
|
17
|
+
if (!this._viewContainerRef.length) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
// Highlight and insert the code
|
|
21
|
+
this._highlightAndInsert();
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
ngAfterViewInit() {
|
|
25
|
+
// Return if there is no language set
|
|
26
|
+
if (!this.lang) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
// If there is no code input, get the code from
|
|
30
|
+
// the textarea
|
|
31
|
+
if (!this.code) {
|
|
32
|
+
// Get the code
|
|
33
|
+
this.code = this._elementRef.nativeElement.value;
|
|
34
|
+
}
|
|
35
|
+
// Highlight and insert
|
|
36
|
+
this._highlightAndInsert();
|
|
37
|
+
}
|
|
38
|
+
_highlightAndInsert() {
|
|
39
|
+
// Return if the template reference is not available
|
|
40
|
+
if (!this.templateRef) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
// Return if the code or language is not defined
|
|
44
|
+
if (!this.code || !this.lang) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
// Destroy the component if there is already one
|
|
48
|
+
if (this._viewRef) {
|
|
49
|
+
this._viewRef.destroy();
|
|
50
|
+
this._viewRef = null;
|
|
51
|
+
}
|
|
52
|
+
// Highlight and sanitize the code just in case
|
|
53
|
+
this.highlightedCode = this._domSanitizer.sanitize(SecurityContext.HTML, this._cmatHighlightService.highlight(this.code, this.lang));
|
|
54
|
+
// Return if the highlighted code is null
|
|
55
|
+
if (this.highlightedCode === null) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
// Render and insert the template
|
|
59
|
+
this._viewRef = this._viewContainerRef.createEmbeddedView(this.templateRef, {
|
|
60
|
+
highlightedCode: this.highlightedCode,
|
|
61
|
+
lang: this.lang
|
|
62
|
+
});
|
|
63
|
+
// Detect the changes
|
|
64
|
+
this._viewRef.detectChanges();
|
|
65
|
+
}
|
|
66
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatHighlightComponent, deps: [{ token: i1.DomSanitizer }, { token: i0.ElementRef }, { token: i2.CmatHighlightService }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
67
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.0", type: CmatHighlightComponent, isStandalone: true, selector: "textarea[cmat-highlight]", inputs: { code: "code", lang: "lang" }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true }], exportAs: ["cmatHighlight"], usesOnChanges: true, ngImport: i0, template: "<ng-content></ng-content>\r\n\r\n<ng-template let-highlightedCode=\"highlightedCode\" let-lang=\"lang\">\r\n <div class=\"cmat-highlight cmat-highlight-code-container\">\r\n <pre [ngClass]=\"'language-' + lang\"><code [ngClass]=\"'language-' + lang\" [innerHTML]=\"highlightedCode\"></code>\r\n </pre>\r\n </div>\r\n</ng-template>", styles: ["textarea[cmat-highlight]{display:none}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
68
|
+
}
|
|
69
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatHighlightComponent, decorators: [{
|
|
70
|
+
type: Component,
|
|
71
|
+
args: [{ selector: 'textarea[cmat-highlight]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatHighlight', standalone: true, imports: [NgClass], template: "<ng-content></ng-content>\r\n\r\n<ng-template let-highlightedCode=\"highlightedCode\" let-lang=\"lang\">\r\n <div class=\"cmat-highlight cmat-highlight-code-container\">\r\n <pre [ngClass]=\"'language-' + lang\"><code [ngClass]=\"'language-' + lang\" [innerHTML]=\"highlightedCode\"></code>\r\n </pre>\r\n </div>\r\n</ng-template>", styles: ["textarea[cmat-highlight]{display:none}\n"] }]
|
|
72
|
+
}], ctorParameters: () => [{ type: i1.DomSanitizer }, { type: i0.ElementRef }, { type: i2.CmatHighlightService }, { type: i0.ViewContainerRef }], propDecorators: { code: [{
|
|
73
|
+
type: Input
|
|
74
|
+
}], lang: [{
|
|
75
|
+
type: Input
|
|
76
|
+
}], templateRef: [{
|
|
77
|
+
type: ViewChild,
|
|
78
|
+
args: [TemplateRef]
|
|
79
|
+
}] } });
|
|
80
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGlnaGxpZ2h0LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NtYXQvY29tcG9uZW50cy9oaWdobGlnaHQvaGlnaGxpZ2h0LmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NtYXQvY29tcG9uZW50cy9oaWdobGlnaHQvaGlnaGxpZ2h0LmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGlu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lnaHRlZENvZGVcIj48L2NvZGU+XHJcbiAgICAgICAgPC9wcmU+XHJcbiAgICA8L2Rpdj5cclxuPC9uZy10ZW1wbGF0ZT4iXX0=
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import hljs from 'highlight.js';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class CmatHighlightService {
|
|
5
|
+
highlight(code, language) {
|
|
6
|
+
// Format the code
|
|
7
|
+
code = this._format(code);
|
|
8
|
+
// Highlight and return the code
|
|
9
|
+
return hljs.highlight(code, { language }).value;
|
|
10
|
+
}
|
|
11
|
+
_format(code) {
|
|
12
|
+
let indentation = 0;
|
|
13
|
+
// Split the code into lines and store the lines
|
|
14
|
+
const lines = code.split('\n');
|
|
15
|
+
// Trim the empty lines around the code block
|
|
16
|
+
while (lines.length && lines[0].trim() === '') {
|
|
17
|
+
lines.shift();
|
|
18
|
+
}
|
|
19
|
+
while (lines.length && lines[lines.length - 1].trim() === '') {
|
|
20
|
+
lines.pop();
|
|
21
|
+
}
|
|
22
|
+
// Iterate through the lines
|
|
23
|
+
lines.filter(line => line.length)
|
|
24
|
+
.forEach((line, index) => {
|
|
25
|
+
// Always get the indentation of the first line so we can
|
|
26
|
+
// have something to compare with
|
|
27
|
+
if (index === 0) {
|
|
28
|
+
indentation = line.search(/\S|$/);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
// Look at all the remaining lines to figure out the smallest indentation.
|
|
32
|
+
indentation = Math.min(line.search(/\S|$/), indentation);
|
|
33
|
+
});
|
|
34
|
+
// Iterate through the lines one more time, remove the extra
|
|
35
|
+
// indentation, join them together and return it
|
|
36
|
+
return lines.map(line => line.substring(indentation)).join('\n');
|
|
37
|
+
}
|
|
38
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatHighlightService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
39
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatHighlightService, providedIn: 'root' }); }
|
|
40
|
+
}
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatHighlightService, decorators: [{
|
|
42
|
+
type: Injectable,
|
|
43
|
+
args: [{
|
|
44
|
+
providedIn: 'root'
|
|
45
|
+
}]
|
|
46
|
+
}] });
|
|
47
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGlnaGxpZ2h0LnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jbWF0L2NvbXBvbmVudHMvaGlnaGxpZ2h0L2hpZ2hsaWdodC5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyxJQUFJLE1BQU0sY0FBYyxDQUFDOztBQUtoQyxNQUFNLE9BQU8sb0JBQW9CO0lBQzdCLFNBQVMsQ0FBQyxJQUFZLEVBQUUsUUFBZ0I7UUFDcEMsa0JBQWtCO1FBQ2xCLElBQUksR0FBRyxJQUFJLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO1FBRTFCLGdDQUFnQztRQUNoQyxPQUFPLElBQUksQ0FBQyxTQUFTLENBQUMsSUFBSSxFQUFFLEVBQUUsUUFBUSxFQUFFLENBQUMsQ0FBQyxLQUFLLENBQUM7SUFDcEQsQ0FBQztJQUVPLE9BQU8sQ0FBQyxJQUFZO1FBQ3hCLElBQUksV0FBVyxHQUFHLENBQUMsQ0FBQztRQUVwQixnREFBZ0Q7UUFDaEQsTUFBTSxLQUFLLEdBQUcsSUFBSSxDQUFDLEtBQUss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JcbiAgICAgICAgd2hpbGUgKGxpbmVzLmxlbmd0aCAmJiBsaW5lc1swXS50cmltKCkgPT09ICcnKSB7XHJcbiAgICAgICAgICAgIGxpbmVzLnNoaWZ0KCk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICB3aGlsZSAobGluZXMubGVuZ3RoICYmIGxpbmVzW2xpbmVzLmxlbmd0aCAtIDFdLnRyaW0oKSA9PT0gJycpIHtcclxuICAgICAgICAgICAgbGluZXMucG9wKCk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBJdGVyYXRlIHRocm91Z2ggdGhlIGxpbmVzXHJcbiAgICAgICAgbGluZXMuZmlsdGVyKGxpbmUgPT4gbGluZS5sZW5ndGgpXHJcbiAgICAgICAgICAgIC5mb3JFYWNoKChsaW5lLCBpbmRleCkgPT4ge1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIEFsd2F5cyBnZXQgdGhlIGluZGVudGF0aW9uIG9mIHRoZSBmaXJzdCBsaW5lIHNvIHdlIGNhblxyXG4gICAgICAgICAgICAgICAgLy8gaGF2ZSBzb21ldGhpbmcgdG8gY29tcGFyZSB3aXRoXHJcbiAgICAgICAgICAgICAgICBpZiAoaW5kZXggPT09IDApIHtcclxuICAgICAgICAgICAgICAgICAgICBpbmRlbnRhdGlvbiA9IGxpbmUuc2VhcmNoKC9cXFN8JC8pO1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAvLyBMb29rIGF0IGFsbCB0aGUgcmVtYWluaW5nIGxpbmVzIHRvIGZpZ3VyZSBvdXQgdGhlIHNtYWxsZXN0IGluZGVudGF0aW9uLlxyXG4gICAgICAgICAgICAgICAgaW5kZW50YXRpb24gPSBNYXRoLm1pbihsaW5lLnNlYXJjaCgvXFxTfCQvKSwgaW5kZW50YXRpb24pO1xyXG4gICAgICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgLy8gSXRlcmF0ZSB0aHJvdWdoIHRoZSBsaW5lcyBvbmUgbW9yZSB0aW1lLCByZW1vdmUgdGhlIGV4dHJhXHJcbiAgICAgICAgLy8gaW5kZW50YXRpb24sIGpvaW4gdGhlbSB0b2dldGhlciBhbmQgcmV0dXJuIGl0XHJcbiAgICAgICAgcmV0dXJuIGxpbmVzLm1hcChsaW5lID0+IGxpbmUuc3Vic3RyaW5nKGluZGVudGF0aW9uKSkuam9pbignXFxuJyk7XHJcbiAgICB9XHJcbn1cclxuIl19
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export * from './highlight.component';
|
|
2
|
+
export * from './highlight.service';
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NtYXQvY29tcG9uZW50cy9oaWdobGlnaHQvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHVCQUF1QixDQUFDO0FBQ3RDLGNBQWMscUJBQXFCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2hpZ2hsaWdodC5jb21wb25lbnQnO1xyXG5leHBvcnQgKiBmcm9tICcuL2hpZ2hsaWdodC5zZXJ2aWNlJztcclxuIl19
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './public-api';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY21hdC1jb21wb25lbnRzLW1hc29ucnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jbWF0L2NvbXBvbmVudHMvbWFzb25yeS9jbWF0LWNvbXBvbmVudHMtbWFzb25yeS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpYy1hcGknO1xuIl19
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';
|
|
2
|
+
import { cmatAnimations } from 'cmat/animations';
|
|
3
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export class CmatMasonryComponent {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.items = [];
|
|
8
|
+
this.distributedColumns = [];
|
|
9
|
+
}
|
|
10
|
+
ngOnChanges(changes) {
|
|
11
|
+
// Columns
|
|
12
|
+
if ('columns' in changes) {
|
|
13
|
+
// Distribute the items
|
|
14
|
+
this._distributeItems();
|
|
15
|
+
}
|
|
16
|
+
// Items
|
|
17
|
+
if ('items' in changes) {
|
|
18
|
+
// Distribute the items
|
|
19
|
+
this._distributeItems();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
ngAfterViewInit() {
|
|
23
|
+
// Distribute the items for the first time
|
|
24
|
+
this._distributeItems();
|
|
25
|
+
}
|
|
26
|
+
_distributeItems() {
|
|
27
|
+
// Return an empty array if there are no items
|
|
28
|
+
if (this.items.length === 0) {
|
|
29
|
+
this.distributedColumns = [];
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
// Prepare the distributed columns array
|
|
33
|
+
this.distributedColumns = Array.from(Array(this.columns), () => ({ items: [] }));
|
|
34
|
+
// Distribute the items to columns
|
|
35
|
+
for (let i = 0; i < this.items.length; i++) {
|
|
36
|
+
this.distributedColumns[i % this.columns].items.push(this.items[i]);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatMasonryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
40
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.0", type: CmatMasonryComponent, isStandalone: true, selector: "cmat-masonry", inputs: { columnsTemplate: "columnsTemplate", columns: "columns", items: "items" }, exportAs: ["cmatMasonry"], usesOnChanges: true, ngImport: i0, template: "<div class=\"flex p-2\">\r\n <ng-container *ngTemplateOutlet=\"columnsTemplate; context: { $implicit: distributedColumns }\"></ng-container>\r\n</div>", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: cmatAnimations, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
41
|
+
}
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatMasonryComponent, decorators: [{
|
|
43
|
+
type: Component,
|
|
44
|
+
args: [{ selector: 'cmat-masonry', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: cmatAnimations, exportAs: 'cmatMasonry', standalone: true, imports: [NgTemplateOutlet], template: "<div class=\"flex p-2\">\r\n <ng-container *ngTemplateOutlet=\"columnsTemplate; context: { $implicit: distributedColumns }\"></ng-container>\r\n</div>" }]
|
|
45
|
+
}], propDecorators: { columnsTemplate: [{
|
|
46
|
+
type: Input,
|
|
47
|
+
args: [{ required: true }]
|
|
48
|
+
}], columns: [{
|
|
49
|
+
type: Input,
|
|
50
|
+
args: [{ required: true }]
|
|
51
|
+
}], items: [{
|
|
52
|
+
type: Input
|
|
53
|
+
}] } });
|
|
54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sdW1ucyA9IFtdO1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBQcmVwYXJlIHRoZSBkaXN0cmlidXRlZCBjb2x1bW5zIGFycmF5XHJcbiAgICAgICAgdGhpcy5kaXN0cmlidXRlZENvbHVtbnMgPSBBcnJheS5mcm9tKEFycmF5KHRoaXMuY29sdW1ucyksICgpID0+ICh7aXRlbXM6IFtdfSkpO1xyXG5cclxuICAgICAgICAvLyBEaXN0cmlidXRlIHRoZSBpdGVtcyB0byBjb2x1bW5zXHJcbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB0aGlzLml0ZW1zLmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIHRoaXMuZGlzdHJpYnV0ZWRDb2x1bW5zW2kgJSB0aGlzLmNvbHVtbnNdLml0ZW1zLnB1c2godGhpcy5pdGVtc1tpXSk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG59XHJcbiIsIjxkaXYgY2xhc3M9XCJmbGV4IHAtMlwiPlxyXG4gICAgPG5nLWNvbnRhaW5lciAqbmdUZW1wbGF0ZU91dGxldD1cImNvbHVtbnNUZW1wbGF0ZTsgY29udGV4dDogeyAkaW1wbGljaXQ6IGRpc3RyaWJ1dGVkQ29sdW1ucyB9XCI+PC9uZy1jb250YWluZXI+XHJcbjwvZGl2PiJdfQ==
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export * from './masonry.component';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NtYXQvY29tcG9uZW50cy9tYXNvbnJ5L3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxxQkFBcUIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vbWFzb25yeS5jb21wb25lbnQnO1xyXG4iXX0=
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const baseColors = [
|
|
2
|
+
'bg-slate',
|
|
3
|
+
'bg-red',
|
|
4
|
+
'bg-amber',
|
|
5
|
+
'bg-orange',
|
|
6
|
+
'bg-emerald',
|
|
7
|
+
'bg-teal',
|
|
8
|
+
'bg-blue',
|
|
9
|
+
'bg-indigo',
|
|
10
|
+
'bg-violet',
|
|
11
|
+
'bg-pink'
|
|
12
|
+
];
|
|
13
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS1jb2xvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NtYXQvY29tcG9uZW50cy9tYXRlcmlhbC1jb2xvci1waWNrZXIvYmFzZS1jb2xvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQUMsTUFBTSxVQUFVLEdBQUc7SUFDdEIsVUFBVTtJQUNWLFFBQVE7SUFDUixVQUFVO0lBQ1YsV0FBVztJQUNYLFlBQVk7SUFDWixTQUFTO0lBQ1QsU0FBUztJQUNULFdBQVc7SUFDWCxXQUFXO0lBQ1gsU0FBUztDQUNaLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY29uc3QgYmFzZUNvbG9ycyA9IFtcclxuICAgICdiZy1zbGF0ZScsXHJcbiAgICAnYmctcmVkJyxcclxuICAgICdiZy1hbWJlcicsXHJcbiAgICAnYmctb3JhbmdlJyxcclxuICAgICdiZy1lbWVyYWxkJyxcclxuICAgICdiZy10ZWFsJyxcclxuICAgICdiZy1ibHVlJyxcclxuICAgICdiZy1pbmRpZ28nLFxyXG4gICAgJ2JnLXZpb2xldCcsXHJcbiAgICAnYmctcGluaydcclxuXTtcclxuIl19
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './public-api';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY21hdC1jb21wb25lbnRzLW1hdGVyaWFsLWNvbG9yLXBpY2tlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NtYXQvY29tcG9uZW50cy9tYXRlcmlhbC1jb2xvci1waWNrZXIvY21hdC1jb21wb25lbnRzLW1hdGVyaWFsLWNvbG9yLXBpY2tlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpYy1hcGknO1xuIl19
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
2
|
+
import { ChangeDetectionStrategy, Component, EventEmitter, forwardRef, Input, Output, ViewEncapsulation } from '@angular/core';
|
|
3
|
+
import { cmatAnimations } from 'cmat/animations';
|
|
4
|
+
import { baseColors } from './base-color';
|
|
5
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
6
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
7
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
8
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
9
|
+
import { MatSelectModule } from '@angular/material/select';
|
|
10
|
+
import { NgClass, NgSwitch, NgSwitchCase, NgFor, NgIf } from '@angular/common';
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
12
|
+
import * as i1 from "@angular/material/select";
|
|
13
|
+
import * as i2 from "@angular/material/core";
|
|
14
|
+
import * as i3 from "@angular/material/icon";
|
|
15
|
+
import * as i4 from "@angular/material/button";
|
|
16
|
+
import * as i5 from "@angular/material/tooltip";
|
|
17
|
+
export const CMAT_MATERIAL_COLOR_PICKER_VALUE_ACCESSOR = {
|
|
18
|
+
provide: NG_VALUE_ACCESSOR,
|
|
19
|
+
useExisting: forwardRef(() => CmatMaterialColorPickerComponent),
|
|
20
|
+
multi: true
|
|
21
|
+
};
|
|
22
|
+
export class CmatMaterialColorPickerComponent {
|
|
23
|
+
constructor() {
|
|
24
|
+
// Set the defaults
|
|
25
|
+
this.colorChanged = new EventEmitter();
|
|
26
|
+
this.palettes = baseColors;
|
|
27
|
+
this.hues = ['50', '100', '200', '300', '400', '500', '600', '700', '800', '900'];
|
|
28
|
+
this.selectedHue = '500';
|
|
29
|
+
this.selectedPalette = 'bg-indigo';
|
|
30
|
+
this.view = 'palettes';
|
|
31
|
+
this._modelChange = () => { };
|
|
32
|
+
this._modelTouched = () => { };
|
|
33
|
+
this.updateSelectedColor();
|
|
34
|
+
}
|
|
35
|
+
get color() {
|
|
36
|
+
return this._color;
|
|
37
|
+
}
|
|
38
|
+
set color(value) {
|
|
39
|
+
if (!value || value === '' || this._color === value) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
// Split the color value (bg-red-400, bg-blue-500 etc.)
|
|
43
|
+
const colorParts = value.split('-');
|
|
44
|
+
// Take the very last part as the selected hue value
|
|
45
|
+
this.selectedHue = colorParts[colorParts.length - 1];
|
|
46
|
+
// Remove the last part
|
|
47
|
+
colorParts.pop();
|
|
48
|
+
// Rejoin the remaining parts as the selected palette name
|
|
49
|
+
this.selectedPalette = colorParts.join('-');
|
|
50
|
+
// Update the selected color
|
|
51
|
+
this.updateSelectedColor();
|
|
52
|
+
}
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/member-ordering
|
|
54
|
+
get title() {
|
|
55
|
+
return this._title;
|
|
56
|
+
}
|
|
57
|
+
set title(value) {
|
|
58
|
+
this._title = value;
|
|
59
|
+
}
|
|
60
|
+
registerOnChange(fn) {
|
|
61
|
+
this._modelChange = fn;
|
|
62
|
+
}
|
|
63
|
+
registerOnTouched(fn) {
|
|
64
|
+
this._modelTouched = fn;
|
|
65
|
+
}
|
|
66
|
+
writeValue(color) {
|
|
67
|
+
// Return if null
|
|
68
|
+
if (!color) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
// Set the color
|
|
72
|
+
this.color = color;
|
|
73
|
+
}
|
|
74
|
+
selectPalette(palette) {
|
|
75
|
+
// Go to 'hues' view
|
|
76
|
+
this.view = 'hues';
|
|
77
|
+
// Update the selected palette
|
|
78
|
+
this.selectedPalette = palette;
|
|
79
|
+
// Update the selected color
|
|
80
|
+
this.updateSelectedColor();
|
|
81
|
+
}
|
|
82
|
+
selectHue(hue) {
|
|
83
|
+
// Update the selected hue
|
|
84
|
+
this.selectedHue = hue;
|
|
85
|
+
// Update the selected color
|
|
86
|
+
this.updateSelectedColor();
|
|
87
|
+
}
|
|
88
|
+
removeColor() {
|
|
89
|
+
// Return to the 'palettes' view
|
|
90
|
+
this.view = 'palettes';
|
|
91
|
+
// Clear the selected palette and hue
|
|
92
|
+
this.selectedPalette = 'bg-indigo';
|
|
93
|
+
this.selectedHue = '500';
|
|
94
|
+
// Update the selected color
|
|
95
|
+
this.updateSelectedColor();
|
|
96
|
+
}
|
|
97
|
+
updateSelectedColor() {
|
|
98
|
+
if (this.selectedColor && this.selectedColor.palette === this.selectedPalette && this.selectedColor.hue === this.selectedHue) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
// Set the selected color object
|
|
102
|
+
this.selectedColor = {
|
|
103
|
+
palette: this.selectedPalette,
|
|
104
|
+
hue: this.selectedHue,
|
|
105
|
+
color: this.selectedPalette + '-' + this.selectedHue
|
|
106
|
+
};
|
|
107
|
+
this._color = this.selectedColor.color;
|
|
108
|
+
this.colorChanged.emit(this.selectedColor);
|
|
109
|
+
// Mark the model as touched
|
|
110
|
+
this._modelTouched(this.selectedColor.color);
|
|
111
|
+
// Update the model
|
|
112
|
+
this._modelChange(this.selectedColor.color);
|
|
113
|
+
}
|
|
114
|
+
goToPalettesView() {
|
|
115
|
+
this.view = 'palettes';
|
|
116
|
+
}
|
|
117
|
+
onMenuOpen(opened) {
|
|
118
|
+
if (opened) {
|
|
119
|
+
this.view = 'hues';
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
trackByFn(index, item) {
|
|
123
|
+
return index || item;
|
|
124
|
+
}
|
|
125
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatMaterialColorPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
126
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.0", type: CmatMaterialColorPickerComponent, isStandalone: true, selector: "cmat-material-color-picker", inputs: { color: "color", title: "title" }, outputs: { colorChanged: "colorChanged" }, providers: [CMAT_MATERIAL_COLOR_PICKER_VALUE_ACCESSOR], exportAs: ["cmatMaterialColorPicker"], ngImport: i0, template: "<div class=\"rounded\" [ngClass]=\"selectedColor.color\">\r\n <mat-select value=\"init\" [disableOptionCentering]=\"true\" [hideSingleSelectionIndicator]=\"true\"\r\n (openedChange)=\"onMenuOpen($event)\">\r\n <mat-select-trigger class=\"flex p-1\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:paint-brush'\"></mat-icon>\r\n </mat-select-trigger>\r\n\r\n <header [ngClass]=\"'accent'\" class=\"shadow flex flex-row content-between justify-between p-2\">\r\n <button type=\"button\" mat-icon-button class=\"secondary-text\" [class.invisible]=\"view === 'palettes'\"\r\n (click)=\"goToPalettesView()\" aria-label=\"\u8C03\u8272\u677F\">\r\n <mat-icon svgIcon=\"mat_outline:arrow_back\"></mat-icon>\r\n </button>\r\n <span class=\"align-middle leading-loose text-xl font-bold\">{{title}}</span>\r\n <button type=\"button\" mat-icon-button class=\"remove-color-button secondary-text\" (click)=\"removeColor()\"\r\n aria-label=\"\u79FB\u9664\u989C\u8272\" matTooltip=\"\u79FB\u9664\u989C\u8272\">\r\n <mat-icon color=\"warn\" [svgIcon]=\"'mat_outline:cleaning_services'\"></mat-icon>\r\n </button>\r\n </header>\r\n\r\n <div class=\"flex flex-wrap w-60 m-2\">\r\n <mat-option value=\"init\" class=\"hidden\">\u521D\u59CB\u5316</mat-option>\r\n <div [ngSwitch]=\"view\">\r\n <div *ngSwitchCase=\"'palettes'\">\r\n <div class=\"flex flex-row flex-wrap justify-start content-start colors\">\r\n <div role=\"presentation\" *ngFor=\"let palette of palettes;trackBy: trackByFn\"\r\n class=\"cursor-pointer\" (click)=\"selectPalette(palette)\">\r\n <mat-option\r\n class=\"relative flex w-12 h-12 p-0 pointer-events-none rounded-full bg-transparent hover:opacity-50\"\r\n [value]=\"selectedPalette\">\r\n <mat-icon class=\"absolute m-3 text-white\"\r\n *ngIf=\"selectedColor.color===palette + '-' + selectedHue\"\r\n [svgIcon]=\"'heroicons_outline:check'\"></mat-icon>\r\n <span class=\"flex w-10 h-10 m-1 rounded-full\"\r\n [ngClass]=\"palette + '-' + selectedHue\"></span>\r\n </mat-option>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngSwitchCase=\"'hues'\">\r\n <div class=\"flex flex-row flex-wrap justify-start content-start colors\">\r\n <div role=\"presentation\" *ngFor=\"let hue of hues;trackBy: trackByFn\" class=\"cursor-pointer\"\r\n (click)=\"selectHue(hue)\">\r\n <mat-option\r\n class=\"relative flex w-12 h-12 p-0 pointer-events-none rounded-full bg-transparent hover:opacity-50\"\r\n [value]=\"selectedHue\">\r\n <mat-icon class=\"absolute m-3 text-white\"\r\n *ngIf=\"selectedColor.color===selectedPalette + '-' + hue\"\r\n [svgIcon]=\"'heroicons_outline:check'\"></mat-icon>\r\n <span class=\"flex w-10 h-10 m-1 rounded-full\"\r\n [ngClass]=\"selectedPalette + '-' + hue\"></span>\r\n </mat-option>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </mat-select>\r\n</div>", styles: ["cmat-material-color-picker .mat-mdc-select-arrow-wrapper{display:none!important}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i1.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: cmatAnimations, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
127
|
+
}
|
|
128
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatMaterialColorPickerComponent, decorators: [{
|
|
129
|
+
type: Component,
|
|
130
|
+
args: [{ selector: 'cmat-material-color-picker', animations: cmatAnimations, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatMaterialColorPicker', providers: [CMAT_MATERIAL_COLOR_PICKER_VALUE_ACCESSOR], standalone: true, imports: [NgClass, MatSelectModule, MatIconModule, MatButtonModule, MatTooltipModule, NgSwitch, NgSwitchCase, NgFor, NgIf], template: "<div class=\"rounded\" [ngClass]=\"selectedColor.color\">\r\n <mat-select value=\"init\" [disableOptionCentering]=\"true\" [hideSingleSelectionIndicator]=\"true\"\r\n (openedChange)=\"onMenuOpen($event)\">\r\n <mat-select-trigger class=\"flex p-1\">\r\n <mat-icon [svgIcon]=\"'heroicons_outline:paint-brush'\"></mat-icon>\r\n </mat-select-trigger>\r\n\r\n <header [ngClass]=\"'accent'\" class=\"shadow flex flex-row content-between justify-between p-2\">\r\n <button type=\"button\" mat-icon-button class=\"secondary-text\" [class.invisible]=\"view === 'palettes'\"\r\n (click)=\"goToPalettesView()\" aria-label=\"\u8C03\u8272\u677F\">\r\n <mat-icon svgIcon=\"mat_outline:arrow_back\"></mat-icon>\r\n </button>\r\n <span class=\"align-middle leading-loose text-xl font-bold\">{{title}}</span>\r\n <button type=\"button\" mat-icon-button class=\"remove-color-button secondary-text\" (click)=\"removeColor()\"\r\n aria-label=\"\u79FB\u9664\u989C\u8272\" matTooltip=\"\u79FB\u9664\u989C\u8272\">\r\n <mat-icon color=\"warn\" [svgIcon]=\"'mat_outline:cleaning_services'\"></mat-icon>\r\n </button>\r\n </header>\r\n\r\n <div class=\"flex flex-wrap w-60 m-2\">\r\n <mat-option value=\"init\" class=\"hidden\">\u521D\u59CB\u5316</mat-option>\r\n <div [ngSwitch]=\"view\">\r\n <div *ngSwitchCase=\"'palettes'\">\r\n <div class=\"flex flex-row flex-wrap justify-start content-start colors\">\r\n <div role=\"presentation\" *ngFor=\"let palette of palettes;trackBy: trackByFn\"\r\n class=\"cursor-pointer\" (click)=\"selectPalette(palette)\">\r\n <mat-option\r\n class=\"relative flex w-12 h-12 p-0 pointer-events-none rounded-full bg-transparent hover:opacity-50\"\r\n [value]=\"selectedPalette\">\r\n <mat-icon class=\"absolute m-3 text-white\"\r\n *ngIf=\"selectedColor.color===palette + '-' + selectedHue\"\r\n [svgIcon]=\"'heroicons_outline:check'\"></mat-icon>\r\n <span class=\"flex w-10 h-10 m-1 rounded-full\"\r\n [ngClass]=\"palette + '-' + selectedHue\"></span>\r\n </mat-option>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngSwitchCase=\"'hues'\">\r\n <div class=\"flex flex-row flex-wrap justify-start content-start colors\">\r\n <div role=\"presentation\" *ngFor=\"let hue of hues;trackBy: trackByFn\" class=\"cursor-pointer\"\r\n (click)=\"selectHue(hue)\">\r\n <mat-option\r\n class=\"relative flex w-12 h-12 p-0 pointer-events-none rounded-full bg-transparent hover:opacity-50\"\r\n [value]=\"selectedHue\">\r\n <mat-icon class=\"absolute m-3 text-white\"\r\n *ngIf=\"selectedColor.color===selectedPalette + '-' + hue\"\r\n [svgIcon]=\"'heroicons_outline:check'\"></mat-icon>\r\n <span class=\"flex w-10 h-10 m-1 rounded-full\"\r\n [ngClass]=\"selectedPalette + '-' + hue\"></span>\r\n </mat-option>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </mat-select>\r\n</div>", styles: ["cmat-material-color-picker .mat-mdc-select-arrow-wrapper{display:none!important}\n"] }]
|
|
131
|
+
}], ctorParameters: () => [], propDecorators: { colorChanged: [{
|
|
132
|
+
type: Output
|
|
133
|
+
}], color: [{
|
|
134
|
+
type: Input
|
|
135
|
+
}], title: [{
|
|
136
|
+
type: Input
|
|
137
|
+
}] } });
|
|
138
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWF0ZXJpYWwtY29sb3ItcGlja2VyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NtYXQvY29tcG9uZW50cy9tYXRlcmlhbC1jb2xvci1waWNrZXIvbWF0ZXJpYWwtY29sb3ItcGlja2VyLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NtYXQvY29tcG9uZW50cy9tYXRlcmlhbC1jb2xvci1waWNrZXIvbWF0ZXJpYWwtY29sb3ItcGlja2VyLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLHlEQUF5RDtBQUN6RCxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBRSxVQUFVLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUUvSCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFFakQsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGNBQWMsQ0FBQztBQUMxQyxPQUFPLEVBQXdCLGlCQUFpQixFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDekUsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFDN0QsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBQzNELE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQztBQUN2RCxPQ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c6ImyXCIgbWF0VG9vbHRpcD1cIuenu+mZpOminOiJslwiPlxyXG4gICAgICAgICAgICAgICAgPG1hdC1pY29uIGNvbG9yPVwid2FyblwiIFtzdmdJY29uXT1cIidtYXRfb3V0bGluZTpjbGVhbmluZ19zZXJ2aWNlcydcIj48L21hdC1pY29uPlxyXG4gICAgICAgICAgICA8L2J1dHRvbj5cclxuICAgICAgICA8L2hlYWRlcj5cclxuXHJcbiAgICAgICAgPGRpdiBjbGFzcz1cImZsZXggZmxleC13cmFwIHctNjAgbS0yXCI+XHJcbiAgICAgICAgICAgIDxtYXQtb3B0aW9uIHZhbHVlPVwiaW5pdFwiIGNsYXNzPVwiaGlkZGVuXCI+5Yid5aeL5YyWPC9tYXQtb3B0aW9uPlxyXG4gICAgICAgICAgICA8ZGl2IFtuZ1N3aXRjaF09XCJ2aWV3XCI+XHJcbiAgICAgICAgICAgICAgICA8ZGl2ICpuZ1N3aXRjaENhc2U9XCIncGFsZXR0ZXMnXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImZsZXggZmxleC1yb3cgZmxleC13cmFwIGp1c3RpZnktc3RhcnQgY29udGVudC1zdGFydCBjb2xvcnNcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiByb2xlPVwicHJlc2VudGF0aW9uXCIgKm5nRm9yPVwibGV0IHBhbGV0dGUgb2YgcGFsZXR0ZXM7dHJhY2tCeTogdHJhY2tCeUZuXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzPVwiY3Vyc29yLXBvaW50ZXJcIiAoY2xpY2spPVwic2VsZWN0UGFsZXR0ZShwYWxldHRlKVwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPG1hdC1vcHRpb25cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGFzcz1cInJlbGF0aXZlIGZsZXggdy0xMiBoLTEyIHAtMCBwb2ludGVyLWV2ZW50cy1ub25lIHJvdW5kZWQtZnVsbCBiZy10cmFuc3BhcmVudCBob3ZlcjpvcGFjaXR5LTUwXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbdmFsdWVdPVwic2VsZWN0ZWRQYWxldHRlXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPG1hdC1pY29uIGNsYXNzPVwiYWJzb2x1dGUgbS0zIHRleHQtd2hpdGVcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqbmdJZj1cInNlbGVjdGVkQ29sb3IuY29sb3I9PT1wYWxldHRlICsgJy0nICsgc2VsZWN0ZWRIdWVcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbc3ZnSWNvbl09XCInaGVyb2ljb25zX291dGxpbmU6Y2hlY2snXCI+PC9tYXQtaWNvbj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz1cImZsZXggdy0xMCBoLTEwIG0tMSByb3VuZGVkLWZ1bGxcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbbmdDbGFzc109XCJwYWxldHRlICsgJy0nICsgc2VsZWN0ZWRIdWVcIj48L3NwYW4+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L21hdC1vcHRpb24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICA8ZGl2ICpuZ1N3aXRjaENhc2U9XCInaHVlcydcIj5cclxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiZmxleCBmbGV4LXJvdyBmbGV4LXdyYXAganVzdGlmeS1zdGFydCBjb250ZW50LXN0YXJ0IGNvbG9yc1wiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IHJvbGU9XCJwcmVzZW50YXRpb25cIiAqbmdGb3I9XCJsZXQgaHVlIG9mIGh1ZXM7dHJhY2tCeTogdHJhY2tCeUZuXCIgY2xhc3M9XCJjdXJzb3ItcG9pbnRlclwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY2xpY2spPVwic2VsZWN0SHVlKGh1ZSlcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxtYXQtb3B0aW9uXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M9XCJyZWxhdGl2ZSBmbGV4IHctMTIgaC0xMiBwLTAgcG9pbnRlci1ldmVudHMtbm9uZSByb3VuZGVkLWZ1bGwgYmctdHJhbnNwYXJlbnQgaG92ZXI6b3BhY2l0eS01MFwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW3ZhbHVlXT1cInNlbGVjdGVkSHVlXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPG1hdC1pY29uIGNsYXNzPVwiYWJzb2x1dGUgbS0zIHRleHQtd2hpdGVcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqbmdJZj1cInNlbGVjdGVkQ29sb3IuY29sb3I9PT1zZWxlY3RlZFBhbGV0dGUgKyAnLScgKyBodWVcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbc3ZnSWNvbl09XCInaGVyb2ljb25zX291dGxpbmU6Y2hlY2snXCI+PC9tYXQtaWNvbj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz1cImZsZXggdy0xMCBoLTEwIG0tMSByb3VuZGVkLWZ1bGxcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbbmdDbGFzc109XCJzZWxlY3RlZFBhbGV0dGUgKyAnLScgKyBodWVcIj48L3NwYW4+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L21hdC1vcHRpb24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgIDwvZGl2PlxyXG4gICAgPC9tYXQtc2VsZWN0PlxyXG48L2Rpdj4iXX0=
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export * from './material-color-picker.component';
|
|
2
|
+
export * from './selected-color';
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NtYXQvY29tcG9uZW50cy9tYXRlcmlhbC1jb2xvci1waWNrZXIvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLG1DQUFtQyxDQUFDO0FBQ2xELGNBQWMsa0JBQWtCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL21hdGVyaWFsLWNvbG9yLXBpY2tlci5jb21wb25lbnQnO1xyXG5leHBvcnQgKiBmcm9tICcuL3NlbGVjdGVkLWNvbG9yJztcclxuIl19
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export class CmatSelectedColor {
|
|
2
|
+
}
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VsZWN0ZWQtY29sb3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jbWF0L2NvbXBvbmVudHMvbWF0ZXJpYWwtY29sb3ItcGlja2VyL3NlbGVjdGVkLWNvbG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sT0FBTyxpQkFBaUI7Q0FJN0IiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY2xhc3MgQ21hdFNlbGVjdGVkQ29sb3Ige1xyXG4gICAgcGFsZXR0ZTogc3RyaW5nO1xyXG4gICAgaHVlOiBzdHJpbmc7XHJcbiAgICBjb2xvcjogc3RyaW5nO1xyXG59XHJcbiJdfQ==
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Input, Output, ViewEncapsulation } from '@angular/core';
|
|
2
|
+
import { NgIf, NgFor } from '@angular/common';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* An internal class that represents the data corresponding to a single calendar cell.
|
|
6
|
+
*/
|
|
7
|
+
export class CmatDatetimepickerCalendarCellComponent {
|
|
8
|
+
constructor(value, displayValue, ariaLabel, enabled) {
|
|
9
|
+
this.value = value;
|
|
10
|
+
this.displayValue = displayValue;
|
|
11
|
+
this.ariaLabel = ariaLabel;
|
|
12
|
+
this.enabled = enabled;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* An internal component used to display calendar data in a table.
|
|
17
|
+
*/
|
|
18
|
+
export class CmatDatetimepickerCalendarBodyComponent {
|
|
19
|
+
constructor() {
|
|
20
|
+
/** The number of columns in the table. */
|
|
21
|
+
this.numCols = 7;
|
|
22
|
+
/** Whether to allow selection of disabled cells. */
|
|
23
|
+
this.allowDisabledSelection = false;
|
|
24
|
+
/** The cell number of the active cell in the table. */
|
|
25
|
+
this.activeCell = 0;
|
|
26
|
+
/** Emits when a new value is selected. */
|
|
27
|
+
this.selectedValueChange = new EventEmitter();
|
|
28
|
+
this.class = 'cmat-datetimepicker-calendar-body';
|
|
29
|
+
}
|
|
30
|
+
/** The number of blank cells to put at the beginning for the first row. */
|
|
31
|
+
get _firstRowOffset() {
|
|
32
|
+
return this.rows && this.rows.length && this.rows[0].length ?
|
|
33
|
+
this.numCols - this.rows[0].length : 0;
|
|
34
|
+
}
|
|
35
|
+
cellClicked(cell) {
|
|
36
|
+
if (!this.allowDisabledSelection && !cell.enabled) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
this.selectedValueChange.emit(cell.value);
|
|
40
|
+
}
|
|
41
|
+
isActiveCell(rowIndex, colIndex) {
|
|
42
|
+
let cellNumber = rowIndex * this.numCols + colIndex;
|
|
43
|
+
// Account for the fact that the first row may not have as many cells.
|
|
44
|
+
if (rowIndex) {
|
|
45
|
+
cellNumber -= this._firstRowOffset;
|
|
46
|
+
}
|
|
47
|
+
return cellNumber === this.activeCell;
|
|
48
|
+
}
|
|
49
|
+
trackByFn(index, item) {
|
|
50
|
+
return item.value || index;
|
|
51
|
+
}
|
|
52
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatDatetimepickerCalendarBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
53
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.0", type: CmatDatetimepickerCalendarBodyComponent, isStandalone: true, selector: "[cmat-datetimepicker-calendar-body]", inputs: { label: "label", rows: "rows", todayValue: "todayValue", selectedValue: "selectedValue", labelMinRequiredCells: "labelMinRequiredCells", numCols: "numCols", allowDisabledSelection: "allowDisabledSelection", activeCell: "activeCell" }, outputs: { selectedValueChange: "selectedValueChange" }, host: { properties: { "class": "this.class" } }, exportAs: ["cmatDatetimepickerCalendarBody"], ngImport: i0, template: "<!--\r\n If there's not enough space in the first row, create a separate label row. We mark this row as\r\n aria-hidden because we don't want it to be read out as one of the weeks in the month.\r\n-->\r\n<tr *ngIf=\"_firstRowOffset < labelMinRequiredCells\" aria-hidden=\"true\">\r\n <td [attr.colspan]=\"numCols\" class=\"cmat-datetimepicker-calendar-body-label\">{{ label }}</td>\r\n</tr>\r\n\r\n<!-- Create the first row separately so we can include a special spacer cell. -->\r\n<tr *ngFor=\"let row of rows; let rowIndex = index\" role=\"row\">\r\n <!--\r\n We mark this cell as aria-hidden so it doesn't get read out as one of the days in the week.\r\n -->\r\n <td *ngIf=\"rowIndex === 0 && _firstRowOffset\" [attr.colspan]=\"_firstRowOffset\" aria-hidden=\"true\"\r\n class=\"cmat-datetimepicker-calendar-body-label\">\r\n {{ _firstRowOffset >= labelMinRequiredCells ? label : '' }}\r\n </td>\r\n <td role=\"presentation\" (click)=\"cellClicked(item)\"\r\n *ngFor=\"let item of row; let colIndex = index;trackBy: trackByFn\" [attr.aria-disabled]=\"!item.enabled || null\"\r\n [attr.aria-label]=\"item.ariaLabel\"\r\n [class.cmat-datetimepicker-calendar-body-active]=\"isActiveCell(rowIndex, colIndex)\"\r\n [class.cmat-datetimepicker-calendar-body-disabled]=\"!item.enabled\"\r\n class=\"cmat-datetimepicker-calendar-body-cell\" role=\"button\">\r\n <div [attr.aria-selected]=\"selectedValue === item.value\"\r\n [class.cmat-datetimepicker-calendar-body-selected]=\"selectedValue === item.value\"\r\n [class.cmat-datetimepicker-calendar-body-today]=\"todayValue === item.value\"\r\n class=\"cmat-datetimepicker-calendar-body-cell-content\">\r\n {{ item.displayValue }}\r\n </div>\r\n </td>\r\n</tr>", styles: [".cmat-datetimepicker-calendar-body{min-width:224px}.cmat-datetimepicker-calendar-body-label{height:0;line-height:0;text-align:left;padding:7.1428571429% 4.7142857143%}[dir=rtl] .cmat-datetimepicker-calendar-body-label{text-align:right}.cmat-datetimepicker-calendar-body-cell{position:relative;width:14.2857142857%;height:0;line-height:0;padding:7.1428571429% 0;text-align:center;outline:none;cursor:pointer}.cmat-datetimepicker-calendar-body-disabled{cursor:default;pointer-events:none}.cmat-datetimepicker-calendar-body-cell-content{position:absolute;top:5%;left:5%;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;border:1px solid transparent;border-radius:999px}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
54
|
+
}
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: CmatDatetimepickerCalendarBodyComponent, decorators: [{
|
|
56
|
+
type: Component,
|
|
57
|
+
args: [{ selector: '[cmat-datetimepicker-calendar-body]', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'cmatDatetimepickerCalendarBody', standalone: true, imports: [NgIf, NgFor], template: "<!--\r\n If there's not enough space in the first row, create a separate label row. We mark this row as\r\n aria-hidden because we don't want it to be read out as one of the weeks in the month.\r\n-->\r\n<tr *ngIf=\"_firstRowOffset < labelMinRequiredCells\" aria-hidden=\"true\">\r\n <td [attr.colspan]=\"numCols\" class=\"cmat-datetimepicker-calendar-body-label\">{{ label }}</td>\r\n</tr>\r\n\r\n<!-- Create the first row separately so we can include a special spacer cell. -->\r\n<tr *ngFor=\"let row of rows; let rowIndex = index\" role=\"row\">\r\n <!--\r\n We mark this cell as aria-hidden so it doesn't get read out as one of the days in the week.\r\n -->\r\n <td *ngIf=\"rowIndex === 0 && _firstRowOffset\" [attr.colspan]=\"_firstRowOffset\" aria-hidden=\"true\"\r\n class=\"cmat-datetimepicker-calendar-body-label\">\r\n {{ _firstRowOffset >= labelMinRequiredCells ? label : '' }}\r\n </td>\r\n <td role=\"presentation\" (click)=\"cellClicked(item)\"\r\n *ngFor=\"let item of row; let colIndex = index;trackBy: trackByFn\" [attr.aria-disabled]=\"!item.enabled || null\"\r\n [attr.aria-label]=\"item.ariaLabel\"\r\n [class.cmat-datetimepicker-calendar-body-active]=\"isActiveCell(rowIndex, colIndex)\"\r\n [class.cmat-datetimepicker-calendar-body-disabled]=\"!item.enabled\"\r\n class=\"cmat-datetimepicker-calendar-body-cell\" role=\"button\">\r\n <div [attr.aria-selected]=\"selectedValue === item.value\"\r\n [class.cmat-datetimepicker-calendar-body-selected]=\"selectedValue === item.value\"\r\n [class.cmat-datetimepicker-calendar-body-today]=\"todayValue === item.value\"\r\n class=\"cmat-datetimepicker-calendar-body-cell-content\">\r\n {{ item.displayValue }}\r\n </div>\r\n </td>\r\n</tr>", styles: [".cmat-datetimepicker-calendar-body{min-width:224px}.cmat-datetimepicker-calendar-body-label{height:0;line-height:0;text-align:left;padding:7.1428571429% 4.7142857143%}[dir=rtl] .cmat-datetimepicker-calendar-body-label{text-align:right}.cmat-datetimepicker-calendar-body-cell{position:relative;width:14.2857142857%;height:0;line-height:0;padding:7.1428571429% 0;text-align:center;outline:none;cursor:pointer}.cmat-datetimepicker-calendar-body-disabled{cursor:default;pointer-events:none}.cmat-datetimepicker-calendar-body-cell-content{position:absolute;top:5%;left:5%;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;border:1px solid transparent;border-radius:999px}\n"] }]
|
|
58
|
+
}], propDecorators: { label: [{
|
|
59
|
+
type: Input
|
|
60
|
+
}], rows: [{
|
|
61
|
+
type: Input
|
|
62
|
+
}], todayValue: [{
|
|
63
|
+
type: Input
|
|
64
|
+
}], selectedValue: [{
|
|
65
|
+
type: Input
|
|
66
|
+
}], labelMinRequiredCells: [{
|
|
67
|
+
type: Input
|
|
68
|
+
}], numCols: [{
|
|
69
|
+
type: Input
|
|
70
|
+
}], allowDisabledSelection: [{
|
|
71
|
+
type: Input
|
|
72
|
+
}], activeCell: [{
|
|
73
|
+
type: Input
|
|
74
|
+
}], selectedValueChange: [{
|
|
75
|
+
type: Output
|
|
76
|
+
}], class: [{
|
|
77
|
+
type: HostBinding,
|
|
78
|
+
args: ['class']
|
|
79
|
+
}] } });
|
|
80
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FsZW5kYXItYm9keS5qcyIsInNv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