cmat 0.0.16 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/carousel/carousel.component.d.ts +136 -0
- package/components/carousel/carousel.interface.d.ts +38 -0
- package/components/carousel/index.d.ts +5 -0
- package/components/carousel/public-api.d.ts +2 -0
- package/components/custom-formly/public-api.d.ts +1 -0
- package/components/custom-formly/types/knob/knob.component.d.ts +36 -0
- package/components/custom-formly/types/table/table.component.d.ts +3 -8
- package/components/custom-formly/wrappers/form-field/form-field.component.d.ts +4 -4
- package/components/image-viewer/image-viewer.component.d.ts +76 -0
- package/components/image-viewer/index.d.ts +5 -0
- package/components/image-viewer/public-api.d.ts +1 -0
- package/components/knob-input/index.d.ts +5 -0
- package/components/knob-input/knob-input.component.d.ts +95 -0
- package/components/knob-input/public-api.d.ts +1 -0
- package/components/material-datetimepicker/datetimepicker-input.d.ts +2 -2
- package/components/opt-input/index.d.ts +5 -0
- package/components/opt-input/models/config.d.ts +14 -0
- package/components/opt-input/otp-input.component.d.ts +70 -0
- package/components/opt-input/public-api.d.ts +1 -0
- package/components/opt-input/utils/keyboard-util.d.ts +9 -0
- package/components/opt-input/utils/object-util.d.ts +3 -0
- package/components/org-chart/designer/chart-designer.component.d.ts +17 -0
- package/components/org-chart/index.d.ts +5 -0
- package/components/org-chart/node/chart-node.component.d.ts +17 -0
- package/components/org-chart/node/node.type.d.ts +22 -0
- package/components/org-chart/org-chart.component.d.ts +12 -0
- package/components/org-chart/public-api.d.ts +2 -0
- package/components/popover/popover.interfaces.d.ts +1 -1
- package/components/select-search/select-search.component.d.ts +2 -1
- package/components/select-table/index.d.ts +5 -0
- package/components/select-table/public-api.d.ts +2 -0
- package/components/select-table/select-table.component.d.ts +96 -0
- package/components/select-table/select-table.type.d.ts +20 -0
- package/components/select-tree/select-tree.component.d.ts +11 -12
- package/components/speed-dial/index.d.ts +5 -0
- package/components/speed-dial/public-api.d.ts +2 -0
- package/components/speed-dial/speed-dial.component.d.ts +63 -0
- package/components/transfer-picker/interface.d.ts +0 -1
- package/components/transfer-picker/transfer-picker-source/transfer-picker-source.component.d.ts +8 -6
- package/components/treetable/index.d.ts +5 -0
- package/components/treetable/public-api.d.ts +2 -0
- package/components/treetable/treetable.component.d.ts +32 -0
- package/components/treetable/treetable.interface.d.ts +9 -0
- package/directives/animate-on-scroll/animate-on-scroll.directive.d.ts +4 -4
- package/directives/arrow-cursor/arrow-cursor.directive.d.ts +31 -0
- package/directives/arrow-cursor/index.d.ts +5 -0
- package/directives/arrow-cursor/public-api.d.ts +1 -0
- package/directives/data-exporter/constants.d.ts +26 -0
- package/directives/data-exporter/data-exporter.directive.d.ts +18 -0
- package/directives/data-exporter/index.d.ts +5 -0
- package/directives/data-exporter/mime.d.ts +5 -0
- package/directives/data-exporter/options.d.ts +21 -0
- package/directives/data-exporter/public-api.d.ts +2 -0
- package/directives/data-exporter/services/exporters/csv-exporter.service.d.ts +12 -0
- package/directives/data-exporter/services/exporters/exporter.d.ts +4 -0
- package/directives/data-exporter/services/exporters/file-exporter.d.ts +8 -0
- package/directives/data-exporter/services/exporters/json-exporter.service.d.ts +11 -0
- package/directives/data-exporter/services/exporters/txt-exporter.service.d.ts +12 -0
- package/directives/data-exporter/services/exporters/worksheet-exporter.d.ts +10 -0
- package/directives/data-exporter/services/exporters/xls-exporter.service.d.ts +14 -0
- package/directives/data-exporter/services/exporters/xlsx-exporter.service.d.ts +9 -0
- package/directives/data-exporter/services/file-util.d.ts +8 -0
- package/directives/data-exporter/services/service-locator.service.d.ts +11 -0
- package/directives/debounce/abstract-debounce.directive.d.ts +1 -1
- package/fesm2022/cmat-animations.mjs.map +1 -1
- package/fesm2022/cmat-components-adapter.mjs +9 -9
- package/fesm2022/cmat-components-adapter.mjs.map +1 -1
- package/fesm2022/cmat-components-breadcrumb.mjs +10 -10
- package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/cmat-components-card.mjs +4 -4
- package/fesm2022/cmat-components-card.mjs.map +1 -1
- package/fesm2022/cmat-components-carousel.mjs +711 -0
- package/fesm2022/cmat-components-carousel.mjs.map +1 -0
- package/fesm2022/cmat-components-cascade.mjs +12 -12
- package/fesm2022/cmat-components-cascade.mjs.map +1 -1
- package/fesm2022/cmat-components-chip-input.mjs +5 -5
- package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
- package/fesm2022/cmat-components-custom-formly.mjs +168 -155
- package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
- package/fesm2022/cmat-components-date-range.mjs +5 -5
- package/fesm2022/cmat-components-date-range.mjs.map +1 -1
- package/fesm2022/cmat-components-drawer.mjs +6 -6
- package/fesm2022/cmat-components-drawer.mjs.map +1 -1
- package/fesm2022/cmat-components-fullscreen.mjs +4 -4
- package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
- package/fesm2022/cmat-components-highlight.mjs +7 -7
- package/fesm2022/cmat-components-highlight.mjs.map +1 -1
- package/fesm2022/cmat-components-image-viewer.mjs +227 -0
- package/fesm2022/cmat-components-image-viewer.mjs.map +1 -0
- package/fesm2022/cmat-components-json-editor.mjs +4 -4
- package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-knob-input.mjs +404 -0
- package/fesm2022/cmat-components-knob-input.mjs.map +1 -0
- package/fesm2022/cmat-components-masonry.mjs +4 -4
- package/fesm2022/cmat-components-masonry.mjs.map +1 -1
- package/fesm2022/cmat-components-material-color-picker.mjs +4 -4
- package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-material-datetimepicker.mjs +53 -53
- package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
- package/fesm2022/cmat-components-navigation.mjs +51 -51
- package/fesm2022/cmat-components-navigation.mjs.map +1 -1
- package/fesm2022/cmat-components-opt-input.mjs +457 -0
- package/fesm2022/cmat-components-opt-input.mjs.map +1 -0
- package/fesm2022/cmat-components-org-chart.mjs +141 -0
- package/fesm2022/cmat-components-org-chart.mjs.map +1 -0
- package/fesm2022/cmat-components-pagination.mjs +13 -13
- package/fesm2022/cmat-components-pagination.mjs.map +1 -1
- package/fesm2022/cmat-components-password-strength.mjs +12 -12
- package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
- package/fesm2022/cmat-components-popover.mjs +10 -10
- package/fesm2022/cmat-components-popover.mjs.map +1 -1
- package/fesm2022/cmat-components-progress-bar.mjs +4 -4
- package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
- package/fesm2022/cmat-components-rating.mjs +4 -4
- package/fesm2022/cmat-components-rating.mjs.map +1 -1
- package/fesm2022/cmat-components-select-search.mjs +11 -11
- package/fesm2022/cmat-components-select-search.mjs.map +1 -1
- package/fesm2022/cmat-components-select-table.mjs +658 -0
- package/fesm2022/cmat-components-select-table.mjs.map +1 -0
- package/fesm2022/cmat-components-select-tree.mjs +75 -57
- package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
- package/fesm2022/cmat-components-speed-dial.mjs +312 -0
- package/fesm2022/cmat-components-speed-dial.mjs.map +1 -0
- package/fesm2022/cmat-components-timeline.mjs +14 -14
- package/fesm2022/cmat-components-timeline.mjs.map +1 -1
- package/fesm2022/cmat-components-toast.mjs +11 -11
- package/fesm2022/cmat-components-toast.mjs.map +1 -1
- package/fesm2022/cmat-components-transfer-picker.mjs +60 -41
- package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-treetable.mjs +122 -0
- package/fesm2022/cmat-components-treetable.mjs.map +1 -0
- package/fesm2022/cmat-components-upload.mjs +11 -11
- package/fesm2022/cmat-components-upload.mjs.map +1 -1
- package/fesm2022/cmat-directives-animate-on-scroll.mjs +21 -21
- package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
- package/fesm2022/cmat-directives-arrow-cursor.mjs +184 -0
- package/fesm2022/cmat-directives-arrow-cursor.mjs.map +1 -0
- package/fesm2022/cmat-directives-autofocus.mjs +3 -3
- package/fesm2022/cmat-directives-autofocus.mjs.map +1 -1
- package/fesm2022/cmat-directives-data-exporter.mjs +324 -0
- package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -0
- package/fesm2022/cmat-directives-debounce.mjs +9 -9
- package/fesm2022/cmat-directives-debounce.mjs.map +1 -1
- package/fesm2022/cmat-directives-digit-only.mjs +8 -6
- package/fesm2022/cmat-directives-digit-only.mjs.map +1 -1
- package/fesm2022/cmat-directives-equal-validator.mjs +3 -3
- package/fesm2022/cmat-directives-equal-validator.mjs.map +1 -1
- package/fesm2022/cmat-lib-mock-api.mjs +6 -6
- package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
- package/fesm2022/cmat-pipes-bytes.mjs +3 -3
- package/fesm2022/cmat-pipes-bytes.mjs.map +1 -1
- package/fesm2022/cmat-pipes-date-format.mjs +3 -3
- package/fesm2022/cmat-pipes-date-format.mjs.map +1 -1
- package/fesm2022/cmat-pipes-find-by-key.mjs +3 -3
- package/fesm2022/cmat-pipes-find-by-key.mjs.map +1 -1
- package/fesm2022/cmat-pipes-group-by.mjs +3 -3
- package/fesm2022/cmat-pipes-group-by.mjs.map +1 -1
- package/fesm2022/cmat-pipes-keys.mjs +3 -3
- package/fesm2022/cmat-pipes-keys.mjs.map +1 -1
- package/fesm2022/cmat-pipes-secure.mjs +3 -3
- package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
- package/fesm2022/cmat-pipes-uppercase.mjs +3 -3
- package/fesm2022/cmat-pipes-uppercase.mjs.map +1 -1
- package/fesm2022/cmat-services-alert.mjs +3 -3
- package/fesm2022/cmat-services-alert.mjs.map +1 -1
- package/fesm2022/cmat-services-config.mjs +6 -6
- package/fesm2022/cmat-services-config.mjs.map +1 -1
- package/fesm2022/cmat-services-confirmation.mjs +7 -7
- package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
- package/fesm2022/cmat-services-data.mjs +5 -5
- package/fesm2022/cmat-services-data.mjs.map +1 -1
- package/fesm2022/cmat-services-export-as.mjs +211 -0
- package/fesm2022/cmat-services-export-as.mjs.map +1 -0
- package/fesm2022/cmat-services-loading.mjs +6 -6
- package/fesm2022/cmat-services-loading.mjs.map +1 -1
- package/fesm2022/cmat-services-local-storage.mjs +3 -3
- package/fesm2022/cmat-services-local-storage.mjs.map +1 -1
- package/fesm2022/cmat-services-media-watcher.mjs +3 -3
- package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
- package/fesm2022/cmat-services-platform.mjs +3 -3
- package/fesm2022/cmat-services-platform.mjs.map +1 -1
- package/fesm2022/cmat-services-splash-screen.mjs +3 -3
- package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
- package/fesm2022/cmat-services-title.mjs +3 -3
- package/fesm2022/cmat-services-title.mjs.map +1 -1
- package/fesm2022/cmat-services-translation.mjs +3 -3
- package/fesm2022/cmat-services-translation.mjs.map +1 -1
- package/fesm2022/cmat-services-utils.mjs +35 -3
- package/fesm2022/cmat-services-utils.mjs.map +1 -1
- package/fesm2022/cmat-validators.mjs.map +1 -1
- package/fesm2022/cmat-version.mjs.map +1 -1
- package/icons/arrow-cursor.svg +1 -1
- package/package.json +81 -147
- package/services/data/data.service.d.ts +1 -1
- package/services/export-as/export-as-config.model.d.ts +8 -0
- package/services/export-as/export-as.service.d.ts +43 -0
- package/services/export-as/index.d.ts +5 -0
- package/services/export-as/public-api.d.ts +2 -0
- package/services/utils/utils.service.d.ts +4 -0
- package/styles/overrides/angular-material.scss +95 -13
- package/esm2022/animations/cmat-animations.mjs +0 -5
- package/esm2022/animations/defaults.mjs +0 -12
- package/esm2022/animations/dropdown.mjs +0 -26
- package/esm2022/animations/expand-collapse.mjs +0 -17
- package/esm2022/animations/fade.mjs +0 -170
- package/esm2022/animations/public-api.mjs +0 -19
- package/esm2022/animations/shake.mjs +0 -59
- package/esm2022/animations/slide.mjs +0 -124
- package/esm2022/animations/transform.mjs +0 -16
- package/esm2022/animations/zoom.mjs +0 -38
- package/esm2022/cmat.mjs +0 -5
- package/esm2022/components/adapter/cmat-components-adapter.mjs +0 -5
- package/esm2022/components/adapter/datetime-adapter.mjs +0 -127
- package/esm2022/components/adapter/datetime-formats.mjs +0 -3
- package/esm2022/components/adapter/dayjs-date-adapter.mjs +0 -198
- package/esm2022/components/adapter/dayjs-date-formats.mjs +0 -12
- package/esm2022/components/adapter/dayjs-datetime-adapter.mjs +0 -100
- package/esm2022/components/adapter/dayjs-datetime-formats.mjs +0 -21
- package/esm2022/components/adapter/native-datetime-adapter.mjs +0 -130
- package/esm2022/components/adapter/native-datetime-formats.mjs +0 -15
- package/esm2022/components/adapter/public-api.mjs +0 -9
- package/esm2022/components/breadcrumb/breadcrumb-item.directive.mjs +0 -19
- package/esm2022/components/breadcrumb/breadcrumb.component.mjs +0 -94
- package/esm2022/components/breadcrumb/breadcrumb.service.mjs +0 -333
- package/esm2022/components/breadcrumb/cmat-components-breadcrumb.mjs +0 -5
- package/esm2022/components/breadcrumb/public-api.mjs +0 -6
- package/esm2022/components/breadcrumb/types/breadcrumb.config.mjs +0 -2
- package/esm2022/components/breadcrumb/types/breadcrumb.mjs +0 -2
- package/esm2022/components/card/card.component.mjs +0 -49
- package/esm2022/components/card/card.types.mjs +0 -2
- package/esm2022/components/card/cmat-components-card.mjs +0 -5
- package/esm2022/components/card/public-api.mjs +0 -3
- package/esm2022/components/cascade/cascade-bottom-sheet/cascade-bottom-sheet.component.mjs +0 -49
- package/esm2022/components/cascade/cascade-list/cascade-list.component.mjs +0 -384
- package/esm2022/components/cascade/cascade-menu/cascade-menu.component.mjs +0 -22
- package/esm2022/components/cascade/cmat-components-cascade.mjs +0 -5
- package/esm2022/components/cascade/options.interface.mjs +0 -2
- package/esm2022/components/cascade/public-api.mjs +0 -4
- package/esm2022/components/chip-input/chip-input.component.mjs +0 -251
- package/esm2022/components/chip-input/cmat-components-chip-input.mjs +0 -5
- package/esm2022/components/chip-input/public-api.mjs +0 -2
- package/esm2022/components/custom-formly/cmat-components-custom-formly.mjs +0 -5
- package/esm2022/components/custom-formly/extension/addons.extension.mjs +0 -13
- package/esm2022/components/custom-formly/public-api.mjs +0 -29
- package/esm2022/components/custom-formly/types/button/button.component.mjs +0 -81
- package/esm2022/components/custom-formly/types/cascade/cascade.component.mjs +0 -71
- package/esm2022/components/custom-formly/types/checklist/checklist.component.mjs +0 -161
- package/esm2022/components/custom-formly/types/chips/chips.component.mjs +0 -55
- package/esm2022/components/custom-formly/types/color-picker/color-picker.component.mjs +0 -15
- package/esm2022/components/custom-formly/types/date-range/date-range.component.mjs +0 -25
- package/esm2022/components/custom-formly/types/datepicker/datepicker.component.mjs +0 -51
- package/esm2022/components/custom-formly/types/multicheckbox/multicheckbox.component.mjs +0 -88
- package/esm2022/components/custom-formly/types/number/number.component.mjs +0 -27
- package/esm2022/components/custom-formly/types/quill/quill.component.mjs +0 -171
- package/esm2022/components/custom-formly/types/radio/radio.component.mjs +0 -87
- package/esm2022/components/custom-formly/types/rating/rating.component.mjs +0 -27
- package/esm2022/components/custom-formly/types/repeat/repeat.component.mjs +0 -25
- package/esm2022/components/custom-formly/types/select/select.component.mjs +0 -167
- package/esm2022/components/custom-formly/types/select-tree/select-tree.component.mjs +0 -66
- package/esm2022/components/custom-formly/types/stepper/horizontal/stepper.component.mjs +0 -28
- package/esm2022/components/custom-formly/types/stepper/stepper.type.mjs +0 -2
- package/esm2022/components/custom-formly/types/stepper/vertical/stepper.component.mjs +0 -28
- package/esm2022/components/custom-formly/types/table/table.component.mjs +0 -127
- package/esm2022/components/custom-formly/types/tabs/tab.component.mjs +0 -16
- package/esm2022/components/custom-formly/types/tags/tags.component.mjs +0 -146
- package/esm2022/components/custom-formly/types/textarea/textarea.component.mjs +0 -25
- package/esm2022/components/custom-formly/types/upload/upload.component.mjs +0 -58
- package/esm2022/components/custom-formly/wrappers/addons/addons.component.mjs +0 -92
- package/esm2022/components/custom-formly/wrappers/card/card.component.mjs +0 -14
- package/esm2022/components/custom-formly/wrappers/expansion/expansion.component.mjs +0 -14
- package/esm2022/components/custom-formly/wrappers/form-field/form-field.component.mjs +0 -47
- package/esm2022/components/custom-formly/wrappers/panel/panel.component.mjs +0 -12
- package/esm2022/components/date-range/cmat-components-date-range.mjs +0 -5
- package/esm2022/components/date-range/date-range.component.mjs +0 -558
- package/esm2022/components/date-range/public-api.mjs +0 -2
- package/esm2022/components/drawer/cmat-components-drawer.mjs +0 -5
- package/esm2022/components/drawer/drawer.component.mjs +0 -301
- package/esm2022/components/drawer/drawer.service.mjs +0 -41
- package/esm2022/components/drawer/drawer.types.mjs +0 -2
- package/esm2022/components/drawer/public-api.mjs +0 -4
- package/esm2022/components/fullscreen/cmat-components-fullscreen.mjs +0 -5
- package/esm2022/components/fullscreen/fullscreen.component.mjs +0 -44
- package/esm2022/components/fullscreen/public-api.mjs +0 -2
- package/esm2022/components/highlight/cmat-components-highlight.mjs +0 -5
- package/esm2022/components/highlight/highlight.component.mjs +0 -80
- package/esm2022/components/highlight/highlight.service.mjs +0 -47
- package/esm2022/components/highlight/public-api.mjs +0 -3
- package/esm2022/components/json-editor/cmat-components-json-editor.mjs +0 -5
- package/esm2022/components/json-editor/json-editor.component.mjs +0 -176
- package/esm2022/components/json-editor/public-api.mjs +0 -2
- package/esm2022/components/masonry/cmat-components-masonry.mjs +0 -5
- package/esm2022/components/masonry/masonry.component.mjs +0 -54
- package/esm2022/components/masonry/public-api.mjs +0 -2
- package/esm2022/components/material-color-picker/base-color.mjs +0 -13
- package/esm2022/components/material-color-picker/cmat-components-material-color-picker.mjs +0 -5
- package/esm2022/components/material-color-picker/material-color-picker.component.mjs +0 -147
- package/esm2022/components/material-color-picker/public-api.mjs +0 -3
- package/esm2022/components/material-color-picker/selected-color.mjs +0 -3
- package/esm2022/components/material-datetimepicker/calendar-body.mjs +0 -76
- package/esm2022/components/material-datetimepicker/calendar.mjs +0 -670
- package/esm2022/components/material-datetimepicker/clock.mjs +0 -290
- package/esm2022/components/material-datetimepicker/cmat-components-material-datetimepicker.mjs +0 -5
- package/esm2022/components/material-datetimepicker/datetimepicker-animations.mjs +0 -34
- package/esm2022/components/material-datetimepicker/datetimepicker-errors.mjs +0 -6
- package/esm2022/components/material-datetimepicker/datetimepicker-filtertype.mjs +0 -8
- package/esm2022/components/material-datetimepicker/datetimepicker-input.mjs +0 -341
- package/esm2022/components/material-datetimepicker/datetimepicker-intl.mjs +0 -63
- package/esm2022/components/material-datetimepicker/datetimepicker-toggle.mjs +0 -87
- package/esm2022/components/material-datetimepicker/datetimepicker-types.mjs +0 -2
- package/esm2022/components/material-datetimepicker/datetimepicker.mjs +0 -531
- package/esm2022/components/material-datetimepicker/month-view.mjs +0 -141
- package/esm2022/components/material-datetimepicker/multi-year-view.mjs +0 -197
- package/esm2022/components/material-datetimepicker/public-api.mjs +0 -11
- package/esm2022/components/material-datetimepicker/time.mjs +0 -455
- package/esm2022/components/material-datetimepicker/year-view.mjs +0 -124
- package/esm2022/components/navigation/cmat-components-navigation.mjs +0 -5
- package/esm2022/components/navigation/horizontal/components/basic/basic.component.mjs +0 -70
- package/esm2022/components/navigation/horizontal/components/branch/branch.component.mjs +0 -82
- package/esm2022/components/navigation/horizontal/components/divider/divider.component.mjs +0 -47
- package/esm2022/components/navigation/horizontal/components/spacer/spacer.component.mjs +0 -47
- package/esm2022/components/navigation/horizontal/horizontal.component.mjs +0 -87
- package/esm2022/components/navigation/navigation.service.mjs +0 -140
- package/esm2022/components/navigation/navigation.types.mjs +0 -3
- package/esm2022/components/navigation/public-api.mjs +0 -5
- package/esm2022/components/navigation/vertical/components/aside/aside.component.mjs +0 -162
- package/esm2022/components/navigation/vertical/components/basic/basic.component.mjs +0 -60
- package/esm2022/components/navigation/vertical/components/collapsable/collapsable.component.mjs +0 -277
- package/esm2022/components/navigation/vertical/components/divider/divider.component.mjs +0 -56
- package/esm2022/components/navigation/vertical/components/group/group.component.mjs +0 -78
- package/esm2022/components/navigation/vertical/components/spacer/spacer.component.mjs +0 -56
- package/esm2022/components/navigation/vertical/vertical.component.mjs +0 -584
- package/esm2022/components/pagination/cmat-components-pagination.mjs +0 -5
- package/esm2022/components/pagination/pagination.component.mjs +0 -67
- package/esm2022/components/pagination/pagination.directive.mjs +0 -197
- package/esm2022/components/pagination/pagination.instance.mjs +0 -2
- package/esm2022/components/pagination/pagination.pipe.mjs +0 -100
- package/esm2022/components/pagination/pagination.service.mjs +0 -90
- package/esm2022/components/pagination/public-api.mjs +0 -6
- package/esm2022/components/password-strength/animations/index.mjs +0 -48
- package/esm2022/components/password-strength/cmat-components-password-strength.mjs +0 -5
- package/esm2022/components/password-strength/enum.mjs +0 -17
- package/esm2022/components/password-strength/mat-pass-toggle-visibility/mat-pass-toggle-visibility.component.mjs +0 -27
- package/esm2022/components/password-strength/mat-password-strength/mat-password-strength.component.mjs +0 -206
- package/esm2022/components/password-strength/mat-password-strength-info/mat-password-strength-info.component.mjs +0 -150
- package/esm2022/components/password-strength/mat-password-strength-validator.mjs +0 -36
- package/esm2022/components/password-strength/public-api.mjs +0 -4
- package/esm2022/components/password-strength/regexp.class.mjs +0 -8
- package/esm2022/components/popover/cmat-components-popover.mjs +0 -5
- package/esm2022/components/popover/popover-trigger.mjs +0 -442
- package/esm2022/components/popover/popover.component.mjs +0 -348
- package/esm2022/components/popover/popover.errors.mjs +0 -27
- package/esm2022/components/popover/popover.interfaces.mjs +0 -2
- package/esm2022/components/popover/popover.target.mjs +0 -18
- package/esm2022/components/popover/popover.type.mjs +0 -2
- package/esm2022/components/popover/public-api.mjs +0 -5
- package/esm2022/components/progress-bar/cmat-components-progress-bar.mjs +0 -5
- package/esm2022/components/progress-bar/progress-bar.component.mjs +0 -58
- package/esm2022/components/progress-bar/public-api.mjs +0 -2
- package/esm2022/components/rating/cmat-components-rating.mjs +0 -5
- package/esm2022/components/rating/public-api.mjs +0 -2
- package/esm2022/components/rating/rating.component.mjs +0 -202
- package/esm2022/components/select-search/cmat-components-select-search.mjs +0 -5
- package/esm2022/components/select-search/default-options.mjs +0 -16
- package/esm2022/components/select-search/public-api.mjs +0 -3
- package/esm2022/components/select-search/select-no-entries-found.directive.mjs +0 -14
- package/esm2022/components/select-search/select-search-clear.directive.mjs +0 -14
- package/esm2022/components/select-search/select-search.component.mjs +0 -485
- package/esm2022/components/select-tree/cmat-components-select-tree.mjs +0 -5
- package/esm2022/components/select-tree/public-api.mjs +0 -4
- package/esm2022/components/select-tree/select-tree.component.mjs +0 -565
- package/esm2022/components/select-tree/select-tree.flatnode.mjs +0 -3
- package/esm2022/components/select-tree/select-tree.node.mjs +0 -3
- package/esm2022/components/timeline/cmat-components-timeline.mjs +0 -5
- package/esm2022/components/timeline/public-api.mjs +0 -3
- package/esm2022/components/timeline/timeline-item/timeline-item.component.mjs +0 -70
- package/esm2022/components/timeline/timeline.component.mjs +0 -107
- package/esm2022/components/toast/cmat-components-toast.mjs +0 -5
- package/esm2022/components/toast/models/global-config.model.mjs +0 -2
- package/esm2022/components/toast/models/toast.model.mjs +0 -2
- package/esm2022/components/toast/models/type.model.mjs +0 -2
- package/esm2022/components/toast/public-api.mjs +0 -7
- package/esm2022/components/toast/toast-modal.component.mjs +0 -53
- package/esm2022/components/toast/toast.component.mjs +0 -30
- package/esm2022/components/toast/toast.service.mjs +0 -122
- package/esm2022/components/transfer-picker/cmat-components-transfer-picker.mjs +0 -5
- package/esm2022/components/transfer-picker/filter/filter.component.mjs +0 -91
- package/esm2022/components/transfer-picker/interface.mjs +0 -17
- package/esm2022/components/transfer-picker/public-api.mjs +0 -8
- package/esm2022/components/transfer-picker/search/search.component.mjs +0 -38
- package/esm2022/components/transfer-picker/transfer-picker-source/transfer-picker-source.component.mjs +0 -201
- package/esm2022/components/transfer-picker/transfer-picker-target/transfer-picker-target.component.mjs +0 -32
- package/esm2022/components/transfer-picker/transfer-picker.component.mjs +0 -84
- package/esm2022/components/transfer-picker/transfer-picker.service.mjs +0 -137
- package/esm2022/components/upload/cmat-components-upload.mjs +0 -5
- package/esm2022/components/upload/files.type.mjs +0 -2
- package/esm2022/components/upload/files.util.service.mjs +0 -89
- package/esm2022/components/upload/public-api.mjs +0 -5
- package/esm2022/components/upload/upload-queue/upload-queue.component.mjs +0 -155
- package/esm2022/components/upload/upload.component.mjs +0 -118
- package/esm2022/directives/animate-on-scroll/animate-on-scroll.directive.mjs +0 -126
- package/esm2022/directives/animate-on-scroll/cmat-directives-animate-on-scroll.mjs +0 -5
- package/esm2022/directives/animate-on-scroll/public-api.mjs +0 -2
- package/esm2022/directives/animate-on-scroll/scroll.service.mjs +0 -38
- package/esm2022/directives/autofocus/autofocus.directive.mjs +0 -20
- package/esm2022/directives/autofocus/cmat-directives-autofocus.mjs +0 -5
- package/esm2022/directives/autofocus/public-api.mjs +0 -2
- package/esm2022/directives/debounce/abstract-debounce.directive.mjs +0 -34
- package/esm2022/directives/debounce/cmat-directives-debounce.mjs +0 -5
- package/esm2022/directives/debounce/debounce-click.directive.mjs +0 -25
- package/esm2022/directives/debounce/debounce-keyup.directive.mjs +0 -25
- package/esm2022/directives/debounce/public-api.mjs +0 -3
- package/esm2022/directives/digit-only/cmat-directives-digit-only.mjs +0 -5
- package/esm2022/directives/digit-only/digit-only.directive.mjs +0 -298
- package/esm2022/directives/digit-only/mask.directive.mjs +0 -84
- package/esm2022/directives/digit-only/public-api.mjs +0 -3
- package/esm2022/directives/equal-validator/cmat-directives-equal-validator.mjs +0 -5
- package/esm2022/directives/equal-validator/equal-validator.directive.mjs +0 -54
- package/esm2022/directives/equal-validator/public-api.mjs +0 -2
- package/esm2022/lib/mock-api/cmat-lib-mock-api.mjs +0 -5
- package/esm2022/lib/mock-api/mock-api.constants.mjs +0 -3
- package/esm2022/lib/mock-api/mock-api.interceptor.mjs +0 -73
- package/esm2022/lib/mock-api/mock-api.request-handler.mjs +0 -48
- package/esm2022/lib/mock-api/mock-api.service.mjs +0 -93
- package/esm2022/lib/mock-api/mock-api.types.mjs +0 -2
- package/esm2022/lib/mock-api/mock-api.utils.mjs +0 -16
- package/esm2022/lib/mock-api/public-api.mjs +0 -6
- package/esm2022/pipes/bytes/bytes.pipe.mjs +0 -25
- package/esm2022/pipes/bytes/cmat-pipes-bytes.mjs +0 -5
- package/esm2022/pipes/bytes/public-api.mjs +0 -2
- package/esm2022/pipes/date-format/cmat-pipes-date-format.mjs +0 -5
- package/esm2022/pipes/date-format/date-format.pipe.mjs +0 -20
- package/esm2022/pipes/date-format/public-api.mjs +0 -2
- package/esm2022/pipes/find-by-key/cmat-pipes-find-by-key.mjs +0 -5
- package/esm2022/pipes/find-by-key/find-by-key.pipe.mjs +0 -23
- package/esm2022/pipes/find-by-key/public-api.mjs +0 -2
- package/esm2022/pipes/group-by/cmat-pipes-group-by.mjs +0 -5
- package/esm2022/pipes/group-by/group-by.pipe.mjs +0 -29
- package/esm2022/pipes/group-by/public-api.mjs +0 -2
- package/esm2022/pipes/keys/cmat-pipes-keys.mjs +0 -5
- package/esm2022/pipes/keys/keys.pipe.mjs +0 -26
- package/esm2022/pipes/keys/public-api.mjs +0 -2
- package/esm2022/pipes/secure/cmat-pipes-secure.mjs +0 -5
- package/esm2022/pipes/secure/public-api.mjs +0 -2
- package/esm2022/pipes/secure/secure-pipe.mjs +0 -46
- package/esm2022/pipes/uppercase/cmat-pipes-uppercase.mjs +0 -5
- package/esm2022/pipes/uppercase/public-api.mjs +0 -2
- package/esm2022/pipes/uppercase/uppercase.pipe.mjs +0 -17
- package/esm2022/public-api.mjs +0 -2
- package/esm2022/services/alert/alert.dialog.mjs +0 -12
- package/esm2022/services/alert/alert.message.mjs +0 -9
- package/esm2022/services/alert/alert.service.mjs +0 -166
- package/esm2022/services/alert/cmat-services-alert.mjs +0 -5
- package/esm2022/services/alert/enum.mjs +0 -15
- package/esm2022/services/alert/public-api.mjs +0 -5
- package/esm2022/services/config/cmat-services-config.mjs +0 -5
- package/esm2022/services/config/config.constants.mjs +0 -3
- package/esm2022/services/config/config.service.mjs +0 -35
- package/esm2022/services/config/public-api.mjs +0 -4
- package/esm2022/services/config/urlStateConfig.service.mjs +0 -30
- package/esm2022/services/confirmation/cmat-services-confirmation.mjs +0 -5
- package/esm2022/services/confirmation/confirmation.service.mjs +0 -51
- package/esm2022/services/confirmation/confirmation.types.mjs +0 -2
- package/esm2022/services/confirmation/dialog/dialog.component.mjs +0 -25
- package/esm2022/services/confirmation/public-api.mjs +0 -3
- package/esm2022/services/data/cmat-services-data.mjs +0 -5
- package/esm2022/services/data/data.service.mjs +0 -169
- package/esm2022/services/data/public-api.mjs +0 -2
- package/esm2022/services/loading/cmat-services-loading.mjs +0 -5
- package/esm2022/services/loading/loading.interceptor.mjs +0 -29
- package/esm2022/services/loading/loading.service.mjs +0 -72
- package/esm2022/services/loading/public-api.mjs +0 -3
- package/esm2022/services/local-storage/cmat-services-local-storage.mjs +0 -5
- package/esm2022/services/local-storage/local-storage.service.mjs +0 -22
- package/esm2022/services/local-storage/public-api.mjs +0 -2
- package/esm2022/services/media-watcher/cmat-services-media-watcher.mjs +0 -5
- package/esm2022/services/media-watcher/media-watcher.service.mjs +0 -55
- package/esm2022/services/media-watcher/public-api.mjs +0 -2
- package/esm2022/services/platform/cmat-services-platform.mjs +0 -5
- package/esm2022/services/platform/platform.service.mjs +0 -46
- package/esm2022/services/platform/public-api.mjs +0 -2
- package/esm2022/services/splash-screen/cmat-services-splash-screen.mjs +0 -5
- package/esm2022/services/splash-screen/public-api.mjs +0 -2
- package/esm2022/services/splash-screen/splash-screen.service.mjs +0 -42
- package/esm2022/services/title/cmat-services-title.mjs +0 -5
- package/esm2022/services/title/public-api.mjs +0 -2
- package/esm2022/services/title/title.service.mjs +0 -46
- package/esm2022/services/translation/cmat-services-translation.mjs +0 -5
- package/esm2022/services/translation/public-api.mjs +0 -2
- package/esm2022/services/translation/translation.service.mjs +0 -62
- package/esm2022/services/utils/cmat-services-utils.mjs +0 -5
- package/esm2022/services/utils/public-api.mjs +0 -2
- package/esm2022/services/utils/utils.service.mjs +0 -435
- package/esm2022/validators/cmat-validators.mjs +0 -5
- package/esm2022/validators/public-api.mjs +0 -2
- package/esm2022/validators/validators.mjs +0 -33
- package/esm2022/version/cmat-version.mjs +0 -5
- package/esm2022/version/public-api.mjs +0 -2
- package/esm2022/version/version.mjs +0 -11
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { DOCUMENT } from '@angular/common';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { EventEmitter, Directive, Inject, Input, Output, HostListener } from '@angular/core';
|
|
4
|
+
import { Subject, takeUntil } from 'rxjs';
|
|
5
|
+
import * as i1 from 'cmat/services/media-watcher';
|
|
6
|
+
|
|
7
|
+
class CmatArrowCursorDirective {
|
|
8
|
+
constructor(_document, _cmatMediaWatcherService) {
|
|
9
|
+
this._document = _document;
|
|
10
|
+
this._cmatMediaWatcherService = _cmatMediaWatcherService;
|
|
11
|
+
this.animationDuration = 0.3;
|
|
12
|
+
this.orientation = 'horizontal';
|
|
13
|
+
this.enabled = false;
|
|
14
|
+
this.selector = '.carousel-arrow-cursor';
|
|
15
|
+
this.clickEvent = new EventEmitter();
|
|
16
|
+
this.arrowCursor = null;
|
|
17
|
+
this._unsubscribeAll = new Subject();
|
|
18
|
+
}
|
|
19
|
+
onMouseEnter(event) {
|
|
20
|
+
if (!this.isPhone && this.enabled) {
|
|
21
|
+
if (this.arrowCursor == null) {
|
|
22
|
+
this.arrowCursor = this._document.querySelector(this.selector);
|
|
23
|
+
this.cursorIcon = this.arrowCursor?.querySelector('.arrow-cursor-icon') ?? null;
|
|
24
|
+
this.cursorSide = null;
|
|
25
|
+
if (this.cursorIcon) {
|
|
26
|
+
this.cursorIcon.style.transform = 'rotate3d(0,0,1,-135deg) scale3d(0.5,0.5,1)';
|
|
27
|
+
this.cursorIcon.style.opacity = '0';
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
this.cursorAnimationFrame = requestAnimationFrame(this.moveCursor.bind(this));
|
|
31
|
+
this.cursorClientX = event.clientX;
|
|
32
|
+
this.cursorClientY = event.clientY;
|
|
33
|
+
let t = 0;
|
|
34
|
+
if (this.orientation === 'horizontal') {
|
|
35
|
+
this.cursorSide = this.cursorClientX > window.innerWidth / 2 ? 'right' : 'left';
|
|
36
|
+
t = (this.cursorClientY < (event.target.getBoundingClientRect().top + event.target.getBoundingClientRect().height / 2))
|
|
37
|
+
? -135
|
|
38
|
+
: (this.cursorSide === 'right' ? 135 : -315);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
this.cursorSide = this.cursorClientY > window.innerHeight / 2 ? 'down' : 'up';
|
|
42
|
+
t = (this.cursorClientX < (event.target.getBoundingClientRect().left + event.target.getBoundingClientRect().width / 2))
|
|
43
|
+
? 135
|
|
44
|
+
: (this.cursorSide === 'down' ? -135 : 45);
|
|
45
|
+
}
|
|
46
|
+
if (this.cursorIcon) {
|
|
47
|
+
this.cursorIcon.style.transform = 'rotate3d(0,0,1,' + t + 'deg)';
|
|
48
|
+
this.cursorIcon.style.transition = this.animationDuration + 's';
|
|
49
|
+
switch (this.cursorSide) {
|
|
50
|
+
case 'left':
|
|
51
|
+
this.cursorIcon.style.transform = 'rotate3d(0,0,1,-180deg)';
|
|
52
|
+
break;
|
|
53
|
+
case 'up':
|
|
54
|
+
this.cursorIcon.style.transform = 'rotate3d(0,0,1,-90deg)';
|
|
55
|
+
break;
|
|
56
|
+
case 'right':
|
|
57
|
+
this.cursorIcon.style.transform = 'rotate3d(0,0,1,0deg)';
|
|
58
|
+
break;
|
|
59
|
+
case 'down':
|
|
60
|
+
this.cursorIcon.style.transform = 'rotate3d(0,0,1,90deg)';
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
this.cursorIcon.style.opacity = '1';
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
onMouseLeave(event) {
|
|
68
|
+
if (!this.isPhone && this.enabled) {
|
|
69
|
+
let t = 0;
|
|
70
|
+
if (this.orientation === 'horizontal') {
|
|
71
|
+
t = (this.cursorClientY < (event.target.getBoundingClientRect().top + event.target.getBoundingClientRect().height / 2))
|
|
72
|
+
? (('right' === this.cursorSide) ? -135 : -45)
|
|
73
|
+
: (('right' === this.cursorSide) ? 135 : -315);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
t = (this.cursorClientX < (event.target.getBoundingClientRect().left + event.target.getBoundingClientRect().width / 2))
|
|
77
|
+
? (('down' === this.cursorSide) ? 225 : -225)
|
|
78
|
+
: (('down' === this.cursorSide) ? -45 : 45);
|
|
79
|
+
}
|
|
80
|
+
if (this.cursorIcon) {
|
|
81
|
+
this.cursorIcon.style.transition = this.animationDuration + 's';
|
|
82
|
+
this.cursorIcon.style.transform = 'rotate3d(0,0,1,' + t + 'deg) scale3d(0.3,0.3,1)';
|
|
83
|
+
this.cursorIcon.style.opacity = '0';
|
|
84
|
+
}
|
|
85
|
+
window.cancelAnimationFrame(this.cursorAnimationFrame);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
onMouseOver(event) {
|
|
89
|
+
if (!this.isPhone && this.cursorIcon && this.enabled) {
|
|
90
|
+
this.cursorClientX = event.clientX;
|
|
91
|
+
this.cursorClientY = event.clientY;
|
|
92
|
+
if (this.orientation === 'horizontal') {
|
|
93
|
+
this.cursorSide = this.cursorClientX > window.innerWidth / 2 ? 'right' : 'left';
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
this.cursorSide = this.cursorClientY > window.innerHeight / 2 ? 'down' : 'up';
|
|
97
|
+
}
|
|
98
|
+
if (this.oldCursorSide !== this.cursorSide) {
|
|
99
|
+
this.cursorIcon.style.transition = this.animationDuration + 's';
|
|
100
|
+
switch (this.cursorSide) {
|
|
101
|
+
case 'left':
|
|
102
|
+
this.cursorIcon.style.transform = 'rotate3d(0,0,1,-180deg)';
|
|
103
|
+
break;
|
|
104
|
+
case 'up':
|
|
105
|
+
this.cursorIcon.style.transform = 'rotate3d(0,0,1,-90deg)';
|
|
106
|
+
break;
|
|
107
|
+
case 'right':
|
|
108
|
+
this.cursorIcon.style.transform = 'rotate3d(0,0,1,0deg)';
|
|
109
|
+
break;
|
|
110
|
+
case 'down':
|
|
111
|
+
this.cursorIcon.style.transform = 'rotate3d(0,0,1,90deg)';
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
this.oldCursorSide = this.cursorSide;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
onClick(event) {
|
|
119
|
+
if (!this.isPhone && this.cursorIcon && this.enabled) {
|
|
120
|
+
this.clickEvent.emit(this.cursorSide);
|
|
121
|
+
event.stopPropagation();
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
ngAfterViewInit() {
|
|
125
|
+
this._cmatMediaWatcherService.onMediaChange$
|
|
126
|
+
.pipe(takeUntil(this._unsubscribeAll))
|
|
127
|
+
.subscribe(({ matchingAliases }) => {
|
|
128
|
+
this.isPhone = !matchingAliases.includes('lg');
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
ngOnDestroy() {
|
|
132
|
+
if (this.cursorAnimationFrame) {
|
|
133
|
+
window.cancelAnimationFrame(this.cursorAnimationFrame);
|
|
134
|
+
}
|
|
135
|
+
this._unsubscribeAll.next(void 0);
|
|
136
|
+
this._unsubscribeAll.complete();
|
|
137
|
+
}
|
|
138
|
+
moveCursor() {
|
|
139
|
+
if (!this.isPhone && this.arrowCursor && this.enabled) {
|
|
140
|
+
this.arrowCursor.style.transform = 'translate3d(' + this.cursorClientX + 'px,' + this.cursorClientY + 'px,0px)';
|
|
141
|
+
this.cursorAnimationFrame = requestAnimationFrame(this.moveCursor.bind(this));
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CmatArrowCursorDirective, deps: [{ token: DOCUMENT }, { token: i1.CmatMediaWatcherService }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
145
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.5", type: CmatArrowCursorDirective, isStandalone: true, selector: "[cmatArrowCursor]", inputs: { animationDuration: "animationDuration", orientation: "orientation", enabled: "enabled", selector: "selector" }, outputs: { clickEvent: "clickEvent" }, host: { listeners: { "mouseenter": "onMouseEnter($event)", "mouseleave": "onMouseLeave($event)", "mousemove": "onMouseOver($event)", "click": "onClick($event)" } }, ngImport: i0 }); }
|
|
146
|
+
}
|
|
147
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CmatArrowCursorDirective, decorators: [{
|
|
148
|
+
type: Directive,
|
|
149
|
+
args: [{
|
|
150
|
+
selector: '[cmatArrowCursor]'
|
|
151
|
+
}]
|
|
152
|
+
}], ctorParameters: () => [{ type: Document, decorators: [{
|
|
153
|
+
type: Inject,
|
|
154
|
+
args: [DOCUMENT]
|
|
155
|
+
}] }, { type: i1.CmatMediaWatcherService }], propDecorators: { animationDuration: [{
|
|
156
|
+
type: Input
|
|
157
|
+
}], orientation: [{
|
|
158
|
+
type: Input
|
|
159
|
+
}], enabled: [{
|
|
160
|
+
type: Input
|
|
161
|
+
}], selector: [{
|
|
162
|
+
type: Input
|
|
163
|
+
}], clickEvent: [{
|
|
164
|
+
type: Output
|
|
165
|
+
}], onMouseEnter: [{
|
|
166
|
+
type: HostListener,
|
|
167
|
+
args: ['mouseenter', ['$event']]
|
|
168
|
+
}], onMouseLeave: [{
|
|
169
|
+
type: HostListener,
|
|
170
|
+
args: ['mouseleave', ['$event']]
|
|
171
|
+
}], onMouseOver: [{
|
|
172
|
+
type: HostListener,
|
|
173
|
+
args: ['mousemove', ['$event']]
|
|
174
|
+
}], onClick: [{
|
|
175
|
+
type: HostListener,
|
|
176
|
+
args: ['click', ['$event']]
|
|
177
|
+
}] } });
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Generated bundle index. Do not edit.
|
|
181
|
+
*/
|
|
182
|
+
|
|
183
|
+
export { CmatArrowCursorDirective };
|
|
184
|
+
//# sourceMappingURL=cmat-directives-arrow-cursor.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cmat-directives-arrow-cursor.mjs","sources":["../../../projects/cmat/directives/arrow-cursor/arrow-cursor.directive.ts","../../../projects/cmat/directives/arrow-cursor/cmat-directives-arrow-cursor.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\r\nimport { Directive, AfterViewInit, OnDestroy, Input, HostListener, Inject, Output, EventEmitter } from '@angular/core';\r\nimport { Subject, takeUntil } from 'rxjs';\r\nimport { CmatMediaWatcherService } from 'cmat/services/media-watcher';\r\n\r\n@Directive({\r\n selector: '[cmatArrowCursor]'\r\n})\r\nexport class CmatArrowCursorDirective implements AfterViewInit, OnDestroy {\r\n @Input() animationDuration: number = 0.3;\r\n @Input() orientation: 'horizontal' | 'vertical' = 'horizontal';\r\n @Input() enabled: boolean = false;\r\n @Input() selector: string = '.carousel-arrow-cursor';\r\n @Output() clickEvent: EventEmitter<string | null> = new EventEmitter<string | null>();\r\n\r\n cursorAnimationFrame: any;\r\n isPhone: boolean;\r\n arrowCursor: HTMLDivElement | null = null;\r\n cursorClientX: number;\r\n cursorClientY: number;\r\n cursorIcon: SVGElement | null;\r\n cursorSide: string | null;\r\n oldCursorSide: string | null;\r\n\r\n private _unsubscribeAll: Subject<any> = new Subject<any>();\r\n constructor(@Inject(DOCUMENT) private _document: Document, private _cmatMediaWatcherService: CmatMediaWatcherService) {\r\n\r\n }\r\n\r\n @HostListener('mouseenter', ['$event'])\r\n public onMouseEnter(event: any): void {\r\n if (!this.isPhone && this.enabled) {\r\n if (this.arrowCursor == null) {\r\n this.arrowCursor = this._document.querySelector(this.selector);\r\n this.cursorIcon = this.arrowCursor?.querySelector('.arrow-cursor-icon') ?? null;\r\n this.cursorSide = null;\r\n if (this.cursorIcon) {\r\n this.cursorIcon.style.transform = 'rotate3d(0,0,1,-135deg) scale3d(0.5,0.5,1)';\r\n this.cursorIcon.style.opacity = '0';\r\n }\r\n }\r\n this.cursorAnimationFrame = requestAnimationFrame(this.moveCursor.bind(this));\r\n this.cursorClientX = event.clientX;\r\n this.cursorClientY = event.clientY;\r\n\r\n let t = 0;\r\n\r\n if (this.orientation === 'horizontal') {\r\n this.cursorSide = this.cursorClientX > window.innerWidth / 2 ? 'right' : 'left';\r\n\r\n t = (this.cursorClientY < (event.target.getBoundingClientRect().top + event.target.getBoundingClientRect().height / 2))\r\n ? -135\r\n : (this.cursorSide === 'right' ? 135 : -315);\r\n } else {\r\n this.cursorSide = this.cursorClientY > window.innerHeight / 2 ? 'down' : 'up';\r\n\r\n t = (this.cursorClientX < (event.target.getBoundingClientRect().left + event.target.getBoundingClientRect().width / 2))\r\n ? 135\r\n : (this.cursorSide === 'down' ? -135 : 45);\r\n }\r\n\r\n if (this.cursorIcon) {\r\n this.cursorIcon.style.transform = 'rotate3d(0,0,1,' + t + 'deg)';\r\n\r\n this.cursorIcon.style.transition = this.animationDuration + 's';\r\n\r\n switch (this.cursorSide) {\r\n case 'left':\r\n this.cursorIcon.style.transform = 'rotate3d(0,0,1,-180deg)';\r\n break;\r\n case 'up':\r\n this.cursorIcon.style.transform = 'rotate3d(0,0,1,-90deg)';\r\n break;\r\n case 'right':\r\n this.cursorIcon.style.transform = 'rotate3d(0,0,1,0deg)';\r\n break;\r\n case 'down':\r\n this.cursorIcon.style.transform = 'rotate3d(0,0,1,90deg)';\r\n break;\r\n }\r\n\r\n this.cursorIcon.style.opacity = '1';\r\n }\r\n }\r\n }\r\n\r\n @HostListener('mouseleave', ['$event'])\r\n public onMouseLeave(event: any): void {\r\n if (!this.isPhone && this.enabled) {\r\n let t = 0;\r\n\r\n if (this.orientation === 'horizontal') {\r\n t = (this.cursorClientY < (event.target.getBoundingClientRect().top + event.target.getBoundingClientRect().height / 2))\r\n ? (('right' === this.cursorSide) ? -135 : -45)\r\n : (('right' === this.cursorSide) ? 135 : -315);\r\n } else {\r\n t = (this.cursorClientX < (event.target.getBoundingClientRect().left + event.target.getBoundingClientRect().width / 2))\r\n ? (('down' === this.cursorSide) ? 225 : -225)\r\n : (('down' === this.cursorSide) ? -45 : 45);\r\n }\r\n\r\n if (this.cursorIcon) {\r\n this.cursorIcon.style.transition = this.animationDuration + 's';\r\n this.cursorIcon.style.transform = 'rotate3d(0,0,1,' + t + 'deg) scale3d(0.3,0.3,1)';\r\n this.cursorIcon.style.opacity = '0';\r\n }\r\n\r\n window.cancelAnimationFrame(this.cursorAnimationFrame);\r\n }\r\n }\r\n\r\n @HostListener('mousemove', ['$event'])\r\n public onMouseOver(event: any): void {\r\n if (!this.isPhone && this.cursorIcon && this.enabled) {\r\n this.cursorClientX = event.clientX;\r\n this.cursorClientY = event.clientY;\r\n\r\n if (this.orientation === 'horizontal') {\r\n this.cursorSide = this.cursorClientX > window.innerWidth / 2 ? 'right' : 'left';\r\n } else {\r\n this.cursorSide = this.cursorClientY > window.innerHeight / 2 ? 'down' : 'up';\r\n }\r\n\r\n if (this.oldCursorSide !== this.cursorSide) {\r\n this.cursorIcon.style.transition = this.animationDuration + 's';\r\n switch (this.cursorSide) {\r\n case 'left':\r\n this.cursorIcon.style.transform = 'rotate3d(0,0,1,-180deg)';\r\n break;\r\n case 'up':\r\n this.cursorIcon.style.transform = 'rotate3d(0,0,1,-90deg)';\r\n break;\r\n case 'right':\r\n this.cursorIcon.style.transform = 'rotate3d(0,0,1,0deg)';\r\n break;\r\n case 'down':\r\n this.cursorIcon.style.transform = 'rotate3d(0,0,1,90deg)';\r\n break;\r\n }\r\n this.oldCursorSide = this.cursorSide;\r\n }\r\n }\r\n }\r\n\r\n @HostListener('click', ['$event'])\r\n onClick(event: Event): void {\r\n if (!this.isPhone && this.cursorIcon && this.enabled) {\r\n this.clickEvent.emit(this.cursorSide);\r\n\r\n event.stopPropagation();\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this._cmatMediaWatcherService.onMediaChange$\r\n .pipe(takeUntil(this._unsubscribeAll))\r\n .subscribe(({ matchingAliases }) => {\r\n this.isPhone = !matchingAliases.includes('lg');\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n if (this.cursorAnimationFrame) {\r\n window.cancelAnimationFrame(this.cursorAnimationFrame);\r\n }\r\n this._unsubscribeAll.next(void 0);\r\n this._unsubscribeAll.complete();\r\n }\r\n\r\n moveCursor(): void {\r\n if (!this.isPhone && this.arrowCursor && this.enabled) {\r\n this.arrowCursor.style.transform = 'translate3d(' + this.cursorClientX + 'px,' + this.cursorClientY + 'px,0px)';\r\n\r\n this.cursorAnimationFrame = requestAnimationFrame(this.moveCursor.bind(this));\r\n }\r\n }\r\n\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAQa,wBAAwB,CAAA;IAiBjC,WAAsC,CAAA,SAAmB,EAAU,wBAAiD,EAAA;QAA9E,IAAS,CAAA,SAAA,GAAT,SAAS;QAAoB,IAAwB,CAAA,wBAAA,GAAxB,wBAAwB;QAhBlF,IAAiB,CAAA,iBAAA,GAAW,GAAG;QAC/B,IAAW,CAAA,WAAA,GAA8B,YAAY;QACrD,IAAO,CAAA,OAAA,GAAY,KAAK;QACxB,IAAQ,CAAA,QAAA,GAAW,wBAAwB;AAC1C,QAAA,IAAA,CAAA,UAAU,GAAgC,IAAI,YAAY,EAAiB;QAIrF,IAAW,CAAA,WAAA,GAA0B,IAAI;AAOjC,QAAA,IAAA,CAAA,eAAe,GAAiB,IAAI,OAAO,EAAO;;AAMnD,IAAA,YAAY,CAAC,KAAU,EAAA;QAC1B,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,EAAE;AAC/B,YAAA,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,EAAE;AAC1B,gBAAA,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC;AAC9D,gBAAA,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC,oBAAoB,CAAC,IAAI,IAAI;AA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EAAA,OAAA,EAAA,iBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAHpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE;AACb,iBAAA;;0BAkBgB,MAAM;2BAAC,QAAQ;+EAhBnB,iBAAiB,EAAA,CAAA;sBAAzB;gBACQ,WAAW,EAAA,CAAA;sBAAnB;gBACQ,OAAO,EAAA,CAAA;sBAAf;gBACQ,QAAQ,EAAA,CAAA;sBAAhB;gBACS,UAAU,EAAA,CAAA;sBAAnB;gBAiBM,YAAY,EAAA,CAAA;sBADlB,YAAY;uBAAC,YAAY,EAAE,CAAC,QAAQ,CAAC;gBA0D/B,YAAY,EAAA,CAAA;sBADlB,YAAY;uBAAC,YAAY,EAAE,CAAC,QAAQ,CAAC;gBA0B/B,WAAW,EAAA,CAAA;sBADjB,YAAY;uBAAC,WAAW,EAAE,CAAC,QAAQ,CAAC;gBAkCrC,OAAO,EAAA,CAAA;sBADN,YAAY;uBAAC,OAAO,EAAE,CAAC,QAAQ,CAAC;;;AChJrC;;AAEG;;;;"}
|
|
@@ -8,10 +8,10 @@ class CmatAutofocusDirective {
|
|
|
8
8
|
this.element.nativeElement.focus();
|
|
9
9
|
}, 0);
|
|
10
10
|
}
|
|
11
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
12
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
11
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CmatAutofocusDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
12
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.5", type: CmatAutofocusDirective, isStandalone: true, selector: "[cmatAutofocus]", ngImport: i0 }); }
|
|
13
13
|
}
|
|
14
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CmatAutofocusDirective, decorators: [{
|
|
15
15
|
type: Directive,
|
|
16
16
|
args: [{
|
|
17
17
|
selector: '[cmatAutofocus]',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmat-directives-autofocus.mjs","sources":["../../../projects/cmat/directives/autofocus/autofocus.directive.ts","../../../projects/cmat/directives/autofocus/cmat-directives-autofocus.ts"],"sourcesContent":["import { Directive, ElementRef } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[cmatAutofocus]',\r\n standalone: true\r\n})\r\nexport class CmatAutofocusDirective {\r\n constructor(public element: ElementRef) {\r\n setTimeout(() => {\r\n this.element.nativeElement.focus();\r\n }, 0);\r\n\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAMa,sBAAsB,CAAA;AACjC,IAAA,WAAA,CAAmB,OAAmB,EAAA;QAAnB,IAAO,CAAA,OAAA,GAAP,OAAO
|
|
1
|
+
{"version":3,"file":"cmat-directives-autofocus.mjs","sources":["../../../projects/cmat/directives/autofocus/autofocus.directive.ts","../../../projects/cmat/directives/autofocus/cmat-directives-autofocus.ts"],"sourcesContent":["import { Directive, ElementRef } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[cmatAutofocus]',\r\n standalone: true\r\n})\r\nexport class CmatAutofocusDirective {\r\n constructor(public element: ElementRef) {\r\n setTimeout(() => {\r\n this.element.nativeElement.focus();\r\n }, 0);\r\n\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAMa,sBAAsB,CAAA;AACjC,IAAA,WAAA,CAAmB,OAAmB,EAAA;QAAnB,IAAO,CAAA,OAAA,GAAP,OAAO;QACxB,UAAU,CAAC,MAAK;AACd,YAAA,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,EAAE;SACnC,EAAE,CAAC,CAAC;;8GAJI,sBAAsB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAJlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACLD;;AAEG;;;;"}
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, Directive, Input } from '@angular/core';
|
|
3
|
+
import * as FileSaver from 'file-saver-es';
|
|
4
|
+
|
|
5
|
+
var ExportType;
|
|
6
|
+
(function (ExportType) {
|
|
7
|
+
ExportType["XLS"] = "xls";
|
|
8
|
+
ExportType["XLSX"] = "xlsx";
|
|
9
|
+
ExportType["CSV"] = "csv";
|
|
10
|
+
ExportType["TXT"] = "txt";
|
|
11
|
+
ExportType["JSON"] = "json";
|
|
12
|
+
})(ExportType || (ExportType = {}));
|
|
13
|
+
|
|
14
|
+
class Mime {
|
|
15
|
+
constructor(extension, contentTypeHeader) {
|
|
16
|
+
this.extension = extension;
|
|
17
|
+
this.contentTypeHeader = contentTypeHeader;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const TYPE_ARRAY = 'array';
|
|
22
|
+
const CHAR_SET_UTF = ';charset=utf-';
|
|
23
|
+
const CHAR_SET_UTF_8 = CHAR_SET_UTF + '8';
|
|
24
|
+
const CONTENT_TYPE_TEXT = ExportType.TXT + '/';
|
|
25
|
+
const CONTENT_TYPE_APPLICATION = 'application/';
|
|
26
|
+
const CONTENT_TYPE_EXCEL = CONTENT_TYPE_APPLICATION + 'octet-stream';
|
|
27
|
+
const CONTENT_TYPE_JSON = CONTENT_TYPE_APPLICATION + 'json';
|
|
28
|
+
const DOT = '.';
|
|
29
|
+
const COMMA = ',';
|
|
30
|
+
const EXTENSION_XLS = DOT + ExportType.XLS;
|
|
31
|
+
const EXTENSION_XLSX = DOT + ExportType.XLSX;
|
|
32
|
+
const EXTENSION_CSV = DOT + ExportType.CSV;
|
|
33
|
+
const EXTENSION_JSON = DOT + ExportType.JSON;
|
|
34
|
+
const EXTENSION_TEXT = DOT + ExportType.TXT;
|
|
35
|
+
const MIME_EXCEL_XLS = new Mime(EXTENSION_XLS, CONTENT_TYPE_EXCEL + CHAR_SET_UTF_8);
|
|
36
|
+
const MIME_EXCEL_XLSX = new Mime(EXTENSION_XLSX, CONTENT_TYPE_EXCEL + CHAR_SET_UTF_8);
|
|
37
|
+
const MIME_JSON = new Mime(EXTENSION_JSON, CONTENT_TYPE_JSON + CHAR_SET_UTF_8);
|
|
38
|
+
const MIME_TXT = new Mime(EXTENSION_TEXT, CONTENT_TYPE_TEXT + ExportType.TXT + CHAR_SET_UTF_8);
|
|
39
|
+
const MIME_CSV = new Mime(EXTENSION_CSV, CONTENT_TYPE_TEXT + ExportType.CSV + CHAR_SET_UTF_8);
|
|
40
|
+
const REF = '!ref';
|
|
41
|
+
const XLS_REGEX = DOT + '*.' + ExportType.XLS + '$';
|
|
42
|
+
const RETURN = '\n';
|
|
43
|
+
const TAB = '\t';
|
|
44
|
+
const XLSX_COLS = '!cols';
|
|
45
|
+
const BOM = '\uFEFF';
|
|
46
|
+
|
|
47
|
+
class FileUtil {
|
|
48
|
+
static save(content, mime, options) {
|
|
49
|
+
const blob = new Blob([content], { type: mime.contentTypeHeader });
|
|
50
|
+
let fileName = '附件';
|
|
51
|
+
if (options?.fileName) {
|
|
52
|
+
fileName = options.fileName;
|
|
53
|
+
}
|
|
54
|
+
FileSaver.saveAs(blob, fileName + mime.extension);
|
|
55
|
+
}
|
|
56
|
+
static isXls(fileName) {
|
|
57
|
+
return fileName.toLowerCase().match(XLS_REGEX) != null;
|
|
58
|
+
}
|
|
59
|
+
static identifyExportType(fileName) {
|
|
60
|
+
if (fileName && FileUtil.isXls(fileName)) {
|
|
61
|
+
return ExportType.XLS;
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
return ExportType.XLSX;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
static removeExtension(options) {
|
|
68
|
+
if (options)
|
|
69
|
+
options.fileName = options.fileName?.split(DOT)[0];
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
class FileExporter {
|
|
74
|
+
export(rows, options) {
|
|
75
|
+
if (!rows) {
|
|
76
|
+
throw new Error('Empty json array is provided, rows parameter is mandatory!');
|
|
77
|
+
}
|
|
78
|
+
const mimeType = this.getMimeType();
|
|
79
|
+
void this.createContent(rows, options).then((content) => {
|
|
80
|
+
FileUtil.save(content, mimeType, options);
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
class WorksheetExporter extends FileExporter {
|
|
86
|
+
constructor() {
|
|
87
|
+
super();
|
|
88
|
+
}
|
|
89
|
+
async createContent(rows, options) {
|
|
90
|
+
const workSheet = (await import('xlsx')).utils.json_to_sheet(rows, {
|
|
91
|
+
skipHeader: true // we don't want to see object properties as our headers
|
|
92
|
+
});
|
|
93
|
+
return await this.workSheetToContent(workSheet, options);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
class CsvExporterService extends WorksheetExporter {
|
|
98
|
+
constructor() {
|
|
99
|
+
super();
|
|
100
|
+
}
|
|
101
|
+
async workSheetToContent(worksheet, options) {
|
|
102
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
103
|
+
const content = (await import('xlsx')).utils.sheet_to_csv(worksheet, { FS: options?.delimiter ?? COMMA });
|
|
104
|
+
return BOM + content;
|
|
105
|
+
}
|
|
106
|
+
getMimeType() {
|
|
107
|
+
return MIME_CSV;
|
|
108
|
+
}
|
|
109
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CsvExporterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
110
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CsvExporterService, providedIn: 'root' }); }
|
|
111
|
+
}
|
|
112
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CsvExporterService, decorators: [{
|
|
113
|
+
type: Injectable,
|
|
114
|
+
args: [{
|
|
115
|
+
providedIn: 'root'
|
|
116
|
+
}]
|
|
117
|
+
}], ctorParameters: () => [] });
|
|
118
|
+
|
|
119
|
+
class JsonExporterService extends FileExporter {
|
|
120
|
+
constructor() {
|
|
121
|
+
super();
|
|
122
|
+
}
|
|
123
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
124
|
+
async createContent(rows, options) {
|
|
125
|
+
return await new Promise((resolve) => {
|
|
126
|
+
resolve(JSON.stringify(rows));
|
|
127
|
+
});
|
|
128
|
+
;
|
|
129
|
+
}
|
|
130
|
+
getMimeType() {
|
|
131
|
+
return MIME_JSON;
|
|
132
|
+
}
|
|
133
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: JsonExporterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
134
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: JsonExporterService, providedIn: 'root' }); }
|
|
135
|
+
}
|
|
136
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: JsonExporterService, decorators: [{
|
|
137
|
+
type: Injectable,
|
|
138
|
+
args: [{
|
|
139
|
+
providedIn: 'root'
|
|
140
|
+
}]
|
|
141
|
+
}], ctorParameters: () => [] });
|
|
142
|
+
|
|
143
|
+
class TxtExporterService extends FileExporter {
|
|
144
|
+
constructor() {
|
|
145
|
+
super();
|
|
146
|
+
}
|
|
147
|
+
async createContent(rows, options) {
|
|
148
|
+
return await new Promise((resolve) => {
|
|
149
|
+
let content = '';
|
|
150
|
+
rows.forEach((element) => {
|
|
151
|
+
content += Object.values(element).join(this._getDelimiter(options)) + RETURN;
|
|
152
|
+
});
|
|
153
|
+
resolve(JSON.stringify(content));
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
getMimeType() {
|
|
157
|
+
return MIME_TXT;
|
|
158
|
+
}
|
|
159
|
+
_getDelimiter(options) {
|
|
160
|
+
if (options?.delimiter) {
|
|
161
|
+
return options.delimiter;
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
return TAB;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TxtExporterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
168
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TxtExporterService, providedIn: 'root' }); }
|
|
169
|
+
}
|
|
170
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TxtExporterService, decorators: [{
|
|
171
|
+
type: Injectable,
|
|
172
|
+
args: [{
|
|
173
|
+
providedIn: 'root'
|
|
174
|
+
}]
|
|
175
|
+
}], ctorParameters: () => [] });
|
|
176
|
+
|
|
177
|
+
class XlsExporterService extends WorksheetExporter {
|
|
178
|
+
constructor() {
|
|
179
|
+
super();
|
|
180
|
+
}
|
|
181
|
+
async workSheetToContent(worksheet, options = {}) {
|
|
182
|
+
const { utils, write } = await import('xlsx');
|
|
183
|
+
const workBook = utils.book_new();
|
|
184
|
+
this._correctTypes(options);
|
|
185
|
+
utils.book_append_sheet(workBook, worksheet, options.sheet);
|
|
186
|
+
if (options.columnWidths) {
|
|
187
|
+
worksheet[XLSX_COLS] = this._convertToWch(options.columnWidths);
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
const jsonTable = utils.sheet_to_json(worksheet, {
|
|
191
|
+
header: 1,
|
|
192
|
+
raw: true,
|
|
193
|
+
rawNumbers: true,
|
|
194
|
+
});
|
|
195
|
+
const maxRowSize = Math.max(...jsonTable.map(row => row.length));
|
|
196
|
+
const wchArray = Array.from({ length: maxRowSize }).map((_, rowIndex) => {
|
|
197
|
+
const row = Array.from({ length: jsonTable.length }).map((_, i) => String(jsonTable[i][rowIndex] ?? '').length);
|
|
198
|
+
return { wch: Math.max(...row) * 3 > 40 ? 40 : Math.max(...row) * 3 };
|
|
199
|
+
});
|
|
200
|
+
worksheet[XLSX_COLS] = wchArray;
|
|
201
|
+
}
|
|
202
|
+
return write(workBook, options);
|
|
203
|
+
}
|
|
204
|
+
getMimeType() {
|
|
205
|
+
return MIME_EXCEL_XLS;
|
|
206
|
+
}
|
|
207
|
+
_correctTypes(options) {
|
|
208
|
+
if (!options.type) {
|
|
209
|
+
options.type = TYPE_ARRAY;
|
|
210
|
+
}
|
|
211
|
+
options.bookType = this.getMimeType().extension.replace('.', ''); // sheetjs requires bookingType for excel format
|
|
212
|
+
}
|
|
213
|
+
_convertToWch(columnWidths) {
|
|
214
|
+
return columnWidths.map(width => ({ wch: width }));
|
|
215
|
+
}
|
|
216
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: XlsExporterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
217
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: XlsExporterService, providedIn: 'root' }); }
|
|
218
|
+
}
|
|
219
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: XlsExporterService, decorators: [{
|
|
220
|
+
type: Injectable,
|
|
221
|
+
args: [{
|
|
222
|
+
providedIn: 'root'
|
|
223
|
+
}]
|
|
224
|
+
}], ctorParameters: () => [] });
|
|
225
|
+
|
|
226
|
+
class XlsxExporterService extends XlsExporterService {
|
|
227
|
+
constructor() {
|
|
228
|
+
super();
|
|
229
|
+
}
|
|
230
|
+
getMimeType() {
|
|
231
|
+
return MIME_EXCEL_XLSX;
|
|
232
|
+
}
|
|
233
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: XlsxExporterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
234
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: XlsxExporterService, providedIn: 'root' }); }
|
|
235
|
+
}
|
|
236
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: XlsxExporterService, decorators: [{
|
|
237
|
+
type: Injectable,
|
|
238
|
+
args: [{
|
|
239
|
+
providedIn: 'root'
|
|
240
|
+
}]
|
|
241
|
+
}], ctorParameters: () => [] });
|
|
242
|
+
|
|
243
|
+
class ServiceLocatorService {
|
|
244
|
+
constructor(_injector) {
|
|
245
|
+
this._injector = _injector;
|
|
246
|
+
}
|
|
247
|
+
getService(exportType) {
|
|
248
|
+
switch (exportType) {
|
|
249
|
+
case 'xls':
|
|
250
|
+
case ExportType.XLS:
|
|
251
|
+
return this._injector.get(XlsExporterService);
|
|
252
|
+
case 'xlsx':
|
|
253
|
+
case ExportType.XLSX:
|
|
254
|
+
return this._injector.get(XlsxExporterService);
|
|
255
|
+
case 'json':
|
|
256
|
+
case ExportType.JSON:
|
|
257
|
+
return this._injector.get(JsonExporterService);
|
|
258
|
+
case 'txt':
|
|
259
|
+
case ExportType.TXT:
|
|
260
|
+
return this._injector.get(TxtExporterService);
|
|
261
|
+
case 'csv':
|
|
262
|
+
case ExportType.CSV:
|
|
263
|
+
return this._injector.get(CsvExporterService);
|
|
264
|
+
default:
|
|
265
|
+
return this._injector.get(XlsxExporterService);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ServiceLocatorService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
269
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ServiceLocatorService, providedIn: 'root' }); }
|
|
270
|
+
}
|
|
271
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ServiceLocatorService, decorators: [{
|
|
272
|
+
type: Injectable,
|
|
273
|
+
args: [{
|
|
274
|
+
providedIn: 'root'
|
|
275
|
+
}]
|
|
276
|
+
}], ctorParameters: () => [{ type: i0.Injector }] });
|
|
277
|
+
|
|
278
|
+
class CmatDataExporterDirective {
|
|
279
|
+
constructor(_serviceLocator) {
|
|
280
|
+
this._serviceLocator = _serviceLocator;
|
|
281
|
+
}
|
|
282
|
+
ngOnChanges(changes) {
|
|
283
|
+
if (changes.dataSource) {
|
|
284
|
+
if (this.dataSource?.length > 0) {
|
|
285
|
+
this._data = [];
|
|
286
|
+
this._loadExporter(this.exportType);
|
|
287
|
+
this._data = [
|
|
288
|
+
// 首先添加一个包含列标题的对象
|
|
289
|
+
this.exportColumns.map(column => ({ [column.code]: column.label }))
|
|
290
|
+
.reduce((acc, curr) => ({ ...acc, ...curr }), {}),
|
|
291
|
+
// 然后添加用户数据对象,根据列配置提取相应的属性
|
|
292
|
+
...this.dataSource.map(user => this.exportColumns.reduce((acc, column) => ({ ...acc, [column.code]: user[column.code] }), {}))
|
|
293
|
+
];
|
|
294
|
+
this._exporterService.export(this._data, this.options);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
_loadExporter(exportType) {
|
|
299
|
+
this._exporterService = this._serviceLocator.getService(exportType);
|
|
300
|
+
}
|
|
301
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CmatDataExporterDirective, deps: [{ token: ServiceLocatorService }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
302
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.5", type: CmatDataExporterDirective, isStandalone: true, selector: "button[cmatDataExporter]", inputs: { dataSource: "dataSource", exportColumns: "exportColumns", options: "options", exportType: "exportType" }, usesOnChanges: true, ngImport: i0 }); }
|
|
303
|
+
}
|
|
304
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: CmatDataExporterDirective, decorators: [{
|
|
305
|
+
type: Directive,
|
|
306
|
+
args: [{
|
|
307
|
+
selector: 'button[cmatDataExporter]'
|
|
308
|
+
}]
|
|
309
|
+
}], ctorParameters: () => [{ type: ServiceLocatorService }], propDecorators: { dataSource: [{
|
|
310
|
+
type: Input
|
|
311
|
+
}], exportColumns: [{
|
|
312
|
+
type: Input
|
|
313
|
+
}], options: [{
|
|
314
|
+
type: Input
|
|
315
|
+
}], exportType: [{
|
|
316
|
+
type: Input
|
|
317
|
+
}] } });
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Generated bundle index. Do not edit.
|
|
321
|
+
*/
|
|
322
|
+
|
|
323
|
+
export { CmatDataExporterDirective, ExportType };
|
|
324
|
+
//# sourceMappingURL=cmat-directives-data-exporter.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cmat-directives-data-exporter.mjs","sources":["../../../projects/cmat/directives/data-exporter/options.ts","../../../projects/cmat/directives/data-exporter/mime.ts","../../../projects/cmat/directives/data-exporter/constants.ts","../../../projects/cmat/directives/data-exporter/services/file-util.ts","../../../projects/cmat/directives/data-exporter/services/exporters/file-exporter.ts","../../../projects/cmat/directives/data-exporter/services/exporters/worksheet-exporter.ts","../../../projects/cmat/directives/data-exporter/services/exporters/csv-exporter.service.ts","../../../projects/cmat/directives/data-exporter/services/exporters/json-exporter.service.ts","../../../projects/cmat/directives/data-exporter/services/exporters/txt-exporter.service.ts","../../../projects/cmat/directives/data-exporter/services/exporters/xls-exporter.service.ts","../../../projects/cmat/directives/data-exporter/services/exporters/xlsx-exporter.service.ts","../../../projects/cmat/directives/data-exporter/services/service-locator.service.ts","../../../projects/cmat/directives/data-exporter/data-exporter.directive.ts","../../../projects/cmat/directives/data-exporter/cmat-directives-data-exporter.ts"],"sourcesContent":["import { WritingOptions } from 'xlsx';\r\n\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\nexport interface ExporterListInfo {\r\n code: string;\r\n label: string;\r\n}\r\n\r\nexport enum ExportType {\r\n XLS = 'xls',\r\n XLSX = 'xlsx',\r\n CSV = 'csv',\r\n TXT = 'txt',\r\n JSON = 'json'\r\n}\r\n\r\nexport interface Options {\r\n fileName?: string;\r\n}\r\n\r\nexport interface TxtOptions extends Options {\r\n delimiter?: string;\r\n}\r\n\r\nexport interface ExcelOptions extends Options, Omit<WritingOptions, 'bookType'> {\r\n columnWidths: number[];\r\n}\r\n","export class Mime {\r\n extension: string;\r\n contentTypeHeader: string;\r\n\r\n constructor(extension: string, contentTypeHeader: string) {\r\n this.extension = extension;\r\n this.contentTypeHeader = contentTypeHeader;\r\n }\r\n}\r\n","import { Mime } from './mime';\r\nimport { ExportType } from './options';\r\n\r\nexport const TYPE_ARRAY = 'array';\r\nexport const CHAR_SET_UTF = ';charset=utf-';\r\nexport const CHAR_SET_UTF_8 = CHAR_SET_UTF + '8';\r\nexport const CONTENT_TYPE_TEXT = ExportType.TXT + '/';\r\nexport const CONTENT_TYPE_APPLICATION = 'application/';\r\nexport const CONTENT_TYPE_EXCEL = CONTENT_TYPE_APPLICATION + 'octet-stream';\r\nexport const CONTENT_TYPE_JSON = CONTENT_TYPE_APPLICATION + 'json';\r\nexport const DOT = '.';\r\nexport const COMMA = ',';\r\nexport const EXTENSION_XLS = DOT + ExportType.XLS;\r\nexport const EXTENSION_XLSX = DOT + ExportType.XLSX;\r\nexport const EXTENSION_CSV = DOT + ExportType.CSV;\r\nexport const EXTENSION_JSON = DOT + ExportType.JSON;\r\nexport const EXTENSION_TEXT = DOT + ExportType.TXT;\r\nexport const MIME_EXCEL_XLS = new Mime(EXTENSION_XLS, CONTENT_TYPE_EXCEL + CHAR_SET_UTF_8);\r\nexport const MIME_EXCEL_XLSX = new Mime(EXTENSION_XLSX, CONTENT_TYPE_EXCEL + CHAR_SET_UTF_8);\r\nexport const MIME_JSON = new Mime(EXTENSION_JSON, CONTENT_TYPE_JSON + CHAR_SET_UTF_8);\r\nexport const MIME_TXT = new Mime(EXTENSION_TEXT, CONTENT_TYPE_TEXT + ExportType.TXT + CHAR_SET_UTF_8);\r\nexport const MIME_CSV = new Mime(EXTENSION_CSV, CONTENT_TYPE_TEXT + ExportType.CSV + CHAR_SET_UTF_8);\r\nexport const REF = '!ref';\r\nexport const XLS_REGEX = DOT + '*.' + ExportType.XLS + '$';\r\nexport const RETURN = '\\n';\r\nexport const TAB = '\\t';\r\nexport const XLSX_COLS = '!cols';\r\nexport const BOM = '\\uFEFF';\r\n","import * as FileSaver from 'file-saver-es';\r\nimport { DOT, XLS_REGEX } from '../constants';\r\nimport { Mime } from '../mime';\r\nimport { ExportType, Options } from '../options';\r\n\r\nexport class FileUtil {\r\n public static save(content: string, mime: Mime, options?: Options):void {\r\n const blob = new Blob([content], {type: mime.contentTypeHeader});\r\n let fileName = '附件';\r\n if (options?.fileName) {\r\n fileName = options.fileName;\r\n }\r\n FileSaver.saveAs(blob, fileName + mime.extension);\r\n }\r\n\r\n\r\n public static isXls(fileName: string): boolean {\r\n return fileName.toLowerCase().match(XLS_REGEX) != null;\r\n }\r\n\r\n public static identifyExportType(fileName?: string): ExportType {\r\n if (fileName && FileUtil.isXls(fileName)) {\r\n return ExportType.XLS;\r\n } else {\r\n return ExportType.XLSX;\r\n }\r\n }\r\n\r\n public static removeExtension(options?: Options):void {\r\n if (options)\r\n options.fileName = options.fileName?.split(DOT)[0];\r\n }\r\n}\r\n","import { Exporter } from './exporter';\r\nimport { Mime } from '../../mime';\r\nimport { Options } from '../../options';\r\nimport { FileUtil } from '../file-util';\r\n\r\nexport abstract class FileExporter<T extends Options> implements Exporter<T> {\r\n public export(rows: any[], options?: T): void {\r\n if (!rows) {\r\n throw new Error('Empty json array is provided, rows parameter is mandatory!');\r\n }\r\n const mimeType = this.getMimeType();\r\n void this.createContent(rows, options).then((content) => {\r\n FileUtil.save(content, mimeType, options);\r\n });\r\n }\r\n\r\n public abstract createContent(rows: any[], options?: T): Promise<any>;\r\n public abstract getMimeType(): Mime;\r\n}\r\n","import { WorkSheet } from 'xlsx';\r\nimport { FileExporter } from './file-exporter';\r\nimport { Mime } from '../../mime';\r\nimport { Options } from '../../options';\r\n\r\nexport abstract class WorksheetExporter<T extends Options> extends FileExporter<T> {\r\n constructor() {\r\n super();\r\n }\r\n\r\n public async createContent(rows: any[], options?: T): Promise<any> {\r\n const workSheet: WorkSheet = (await import('xlsx')).utils.json_to_sheet(rows, {\r\n skipHeader: true // we don't want to see object properties as our headers\r\n });\r\n return await this.workSheetToContent(workSheet, options);\r\n }\r\n public abstract workSheetToContent(workSheet: WorkSheet, options?: T): Promise<any>;\r\n public abstract override getMimeType(): Mime;\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { WorkSheet } from 'xlsx';\r\nimport { WorksheetExporter } from './worksheet-exporter';\r\nimport { BOM, COMMA, MIME_CSV } from '../../constants';\r\nimport { Mime } from '../../mime';\r\nimport { TxtOptions } from '../../options';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CsvExporterService extends WorksheetExporter<TxtOptions> {\r\n\r\n constructor() {\r\n super();\r\n }\r\n\r\n public async workSheetToContent(worksheet: WorkSheet, options?: TxtOptions): Promise<any> {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n const content = (await import('xlsx')).utils.sheet_to_csv(worksheet, { FS: options?.delimiter ?? COMMA });\r\n return BOM + content;\r\n }\r\n\r\n public getMimeType(): Mime {\r\n return MIME_CSV;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { FileExporter } from './file-exporter';\r\nimport { MIME_JSON } from '../../constants';\r\nimport { Mime } from '../../mime';\r\nimport { Options } from '../../options';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class JsonExporterService extends FileExporter<Options> {\r\n\r\n constructor() {\r\n super();\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public async createContent(rows: any[], options?: Options): Promise<any> {\r\n return await new Promise((resolve) => {\r\n resolve(JSON.stringify(rows));\r\n });;\r\n }\r\n public getMimeType(): Mime {\r\n return MIME_JSON;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { FileExporter } from './file-exporter';\r\nimport { MIME_TXT, RETURN, TAB } from '../../constants';\r\nimport { Mime } from '../../mime';\r\nimport { TxtOptions } from '../../options';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class TxtExporterService extends FileExporter<TxtOptions> {\r\n\r\n constructor() {\r\n super();\r\n }\r\n\r\n public async createContent(rows: any[], options?: TxtOptions): Promise<any> {\r\n return await new Promise((resolve) => {\r\n let content = '';\r\n rows.forEach((element) => {\r\n content += Object.values(element).join(this._getDelimiter(options)) + RETURN;\r\n });\r\n\r\n resolve(JSON.stringify(content));\r\n });\r\n }\r\n\r\n public getMimeType(): Mime {\r\n return MIME_TXT;\r\n }\r\n\r\n private _getDelimiter(options?: TxtOptions): string {\r\n if (options?.delimiter) {\r\n return options.delimiter;\r\n } else {\r\n return TAB;\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { WorkSheet } from 'xlsx';\r\nimport { WorksheetExporter } from './worksheet-exporter';\r\nimport { MIME_EXCEL_XLS, TYPE_ARRAY, XLSX_COLS } from '../../constants';\r\nimport { Mime } from '../../mime';\r\nimport { ExcelOptions } from '../../options';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class XlsExporterService extends WorksheetExporter<ExcelOptions> {\r\n constructor() {\r\n super();\r\n }\r\n\r\n public async workSheetToContent(worksheet: WorkSheet, options: ExcelOptions = {} as ExcelOptions): Promise<any> {\r\n const { utils, write } = await import('xlsx');\r\n const workBook = utils.book_new();\r\n\r\n this._correctTypes(options);\r\n utils.book_append_sheet(workBook, worksheet, options.sheet);\r\n\r\n if (options.columnWidths) {\r\n worksheet[XLSX_COLS] = this._convertToWch(options.columnWidths);\r\n } else {\r\n const jsonTable = utils.sheet_to_json<string | number[]>(worksheet, {\r\n header: 1,\r\n raw: true,\r\n rawNumbers: true,\r\n });\r\n const maxRowSize = Math.max(...jsonTable.map(row => row.length));\r\n\r\n const wchArray = Array.from({ length: maxRowSize }).map((_, rowIndex) => {\r\n const row = Array.from({ length: jsonTable.length }).map(\r\n (_, i) => String(jsonTable[i][rowIndex] ?? '').length\r\n );\r\n\r\n return { wch: Math.max(...row)*3 > 40 ? 40 : Math.max(...row)*3 };\r\n });\r\n worksheet[XLSX_COLS] = wchArray;\r\n }\r\n\r\n return write(workBook, options);\r\n }\r\n\r\n public getMimeType(): Mime {\r\n return MIME_EXCEL_XLS;\r\n }\r\n\r\n private _correctTypes(options: ExcelOptions): void {\r\n if (!options.type) {\r\n options.type = TYPE_ARRAY;\r\n }\r\n (options as any).bookType = this.getMimeType().extension.replace('.', ''); // sheetjs requires bookingType for excel format\r\n }\r\n\r\n private _convertToWch(columnWidths: number[]): { wch: number }[] {\r\n return columnWidths.map(width => ({ wch: width }));\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { XlsExporterService } from './xls-exporter.service';\r\nimport { MIME_EXCEL_XLSX } from '../../constants';\r\nimport { Mime } from '../../mime';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class XlsxExporterService extends XlsExporterService {\r\n\r\n constructor() {\r\n super();\r\n }\r\n\r\n public override getMimeType(): Mime {\r\n return MIME_EXCEL_XLSX;\r\n }\r\n}\r\n","import { Injectable, Injector } from '@angular/core';\r\nimport { ExportType, Options } from '../options';\r\nimport { CsvExporterService } from './exporters/csv-exporter.service';\r\nimport { Exporter } from './exporters/exporter';\r\nimport { JsonExporterService } from './exporters/json-exporter.service';\r\nimport { TxtExporterService } from './exporters/txt-exporter.service';\r\nimport { XlsExporterService } from './exporters/xls-exporter.service';\r\nimport { XlsxExporterService } from './exporters/xlsx-exporter.service';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ServiceLocatorService {\r\n\r\n constructor(private _injector: Injector) { }\r\n\r\n public getService(exportType: ExportType | 'xls' | 'xlsx' | 'csv' | 'txt' | 'json'): Exporter<Options> {\r\n switch (exportType) {\r\n case 'xls':\r\n case ExportType.XLS:\r\n return this._injector.get<XlsExporterService>(XlsExporterService);\r\n case 'xlsx':\r\n case ExportType.XLSX:\r\n return this._injector.get<XlsxExporterService>(XlsxExporterService);\r\n case 'json':\r\n case ExportType.JSON:\r\n return this._injector.get<JsonExporterService>(JsonExporterService);\r\n case 'txt':\r\n case ExportType.TXT:\r\n return this._injector.get<TxtExporterService>(TxtExporterService);\r\n case 'csv':\r\n case ExportType.CSV:\r\n return this._injector.get<CsvExporterService>(CsvExporterService);\r\n default:\r\n return this._injector.get<XlsxExporterService>(XlsxExporterService);\r\n }\r\n }\r\n}\r\n","import { Directive, Input, OnChanges, SimpleChanges } from '@angular/core';\r\nimport { ExcelOptions, ExporterListInfo, ExportType, Options, TxtOptions } from './options';\r\nimport { Exporter } from './services/exporters/exporter';\r\nimport { ServiceLocatorService } from './services/service-locator.service';\r\n\r\n@Directive({\r\n selector: 'button[cmatDataExporter]'\r\n})\r\nexport class CmatDataExporterDirective implements OnChanges {\r\n @Input() dataSource: any[];\r\n @Input() exportColumns: ExporterListInfo[];\r\n @Input() options?: Options | ExcelOptions | TxtOptions;\r\n @Input() exportType: ExportType | 'xls' | 'xlsx' | 'csv' | 'txt' | 'json';\r\n\r\n private _data: any[];\r\n private _exporterService: Exporter<Options>;\r\n constructor(\r\n private _serviceLocator: ServiceLocatorService,\r\n ) {\r\n\r\n\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes.dataSource) {\r\n if (this.dataSource?.length > 0) {\r\n this._data=[];\r\n this._loadExporter(this.exportType);\r\n this._data = [\r\n // 首先添加一个包含列标题的对象\r\n this.exportColumns.map(column => ({ [column.code]: column.label }))\r\n .reduce((acc, curr) => ({ ...acc, ...curr }), {}) as Record<string, string>,\r\n // 然后添加用户数据对象,根据列配置提取相应的属性\r\n ...this.dataSource.map(user =>\r\n this.exportColumns.reduce((acc, column) => ({ ...acc, [column.code]: user[column.code] }), {})\r\n )\r\n ] as (Record<string, string>)[];\r\n\r\n this._exporterService.export(this._data, this.options); \r\n }\r\n }\r\n }\r\n\r\n private _loadExporter(exportType: ExportType | 'xls' | 'xlsx' | 'csv' | 'txt' | 'json'): void {\r\n this._exporterService = this._serviceLocator.getService(exportType);\r\n }\r\n\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.ServiceLocatorService"],"mappings":";;;;IAQY;AAAZ,CAAA,UAAY,UAAU,EAAA;AAClB,IAAA,UAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACX,IAAA,UAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,UAAA,CAAA,KAAA,CAAA,GAAA,KA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