cmat 0.0.111 → 0.0.113
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/fesm2022/cmat-components-adapter.mjs +531 -536
- package/fesm2022/cmat-components-adapter.mjs.map +1 -1
- package/fesm2022/cmat-components-breadcrumb.mjs +521 -356
- package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/cmat-components-card.mjs +150 -42
- package/fesm2022/cmat-components-card.mjs.map +1 -1
- package/fesm2022/cmat-components-carousel.mjs +1120 -629
- package/fesm2022/cmat-components-carousel.mjs.map +1 -1
- package/fesm2022/cmat-components-cascade.mjs +861 -441
- package/fesm2022/cmat-components-cascade.mjs.map +1 -1
- package/fesm2022/cmat-components-chip-input.mjs +580 -335
- package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
- package/fesm2022/cmat-components-code-editor.mjs +197 -105
- package/fesm2022/cmat-components-code-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-color-picker.mjs +1762 -825
- package/fesm2022/cmat-components-color-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-custom-formly.mjs +5196 -2531
- package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
- package/fesm2022/cmat-components-data-picker.mjs +1901 -1073
- package/fesm2022/cmat-components-data-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-date-range.mjs +701 -456
- package/fesm2022/cmat-components-date-range.mjs.map +1 -1
- package/fesm2022/cmat-components-date-time-display.mjs +137 -30
- package/fesm2022/cmat-components-date-time-display.mjs.map +1 -1
- package/fesm2022/cmat-components-drawer.mjs +410 -258
- package/fesm2022/cmat-components-drawer.mjs.map +1 -1
- package/fesm2022/cmat-components-empty-state.mjs +201 -41
- package/fesm2022/cmat-components-empty-state.mjs.map +1 -1
- package/fesm2022/cmat-components-file-preview.mjs +198 -35
- package/fesm2022/cmat-components-file-preview.mjs.map +1 -1
- package/fesm2022/cmat-components-filter-toolbar.mjs +320 -72
- package/fesm2022/cmat-components-filter-toolbar.mjs.map +1 -1
- package/fesm2022/cmat-components-form-actions.mjs +102 -26
- package/fesm2022/cmat-components-form-actions.mjs.map +1 -1
- package/fesm2022/cmat-components-fullscreen.mjs +167 -47
- package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
- package/fesm2022/cmat-components-highlight.mjs +203 -112
- package/fesm2022/cmat-components-highlight.mjs.map +1 -1
- package/fesm2022/cmat-components-image-viewer.mjs +489 -215
- package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
- package/fesm2022/cmat-components-inline-loading.mjs +117 -27
- package/fesm2022/cmat-components-inline-loading.mjs.map +1 -1
- package/fesm2022/cmat-components-json-editor.mjs +276 -230
- package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-knob-input.mjs +615 -420
- package/fesm2022/cmat-components-knob-input.mjs.map +1 -1
- package/fesm2022/cmat-components-loading-overlay.mjs +53 -25
- package/fesm2022/cmat-components-loading-overlay.mjs.map +1 -1
- package/fesm2022/cmat-components-masonry.mjs +120 -40
- package/fesm2022/cmat-components-masonry.mjs.map +1 -1
- package/fesm2022/cmat-components-material-color-picker.mjs +332 -155
- package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-material-datetimepicker.mjs +4283 -2504
- package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
- package/fesm2022/cmat-components-navigation.mjs +3080 -1404
- package/fesm2022/cmat-components-navigation.mjs.map +1 -1
- package/fesm2022/cmat-components-opt-input.mjs +540 -466
- package/fesm2022/cmat-components-opt-input.mjs.map +1 -1
- package/fesm2022/cmat-components-org-chart.mjs +528 -125
- package/fesm2022/cmat-components-org-chart.mjs.map +1 -1
- package/fesm2022/cmat-components-page-header.mjs +141 -32
- package/fesm2022/cmat-components-page-header.mjs.map +1 -1
- package/fesm2022/cmat-components-pagination.mjs +866 -534
- package/fesm2022/cmat-components-pagination.mjs.map +1 -1
- package/fesm2022/cmat-components-password-strength.mjs +873 -434
- package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
- package/fesm2022/cmat-components-popover.mjs +1012 -731
- package/fesm2022/cmat-components-popover.mjs.map +1 -1
- package/fesm2022/cmat-components-progress-bar.mjs +98 -35
- package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
- package/fesm2022/cmat-components-qrcode.mjs +463 -287
- package/fesm2022/cmat-components-qrcode.mjs.map +1 -1
- package/fesm2022/cmat-components-rating.mjs +377 -203
- package/fesm2022/cmat-components-rating.mjs.map +1 -1
- package/fesm2022/cmat-components-rich-text-editor.mjs +153 -39
- package/fesm2022/cmat-components-rich-text-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-select-search.mjs +926 -496
- package/fesm2022/cmat-components-select-search.mjs.map +1 -1
- package/fesm2022/cmat-components-select-table.mjs +1280 -842
- package/fesm2022/cmat-components-select-table.mjs.map +1 -1
- package/fesm2022/cmat-components-select-tree.mjs +998 -690
- package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
- package/fesm2022/cmat-components-skeleton.mjs +143 -57
- package/fesm2022/cmat-components-skeleton.mjs.map +1 -1
- package/fesm2022/cmat-components-speed-dial.mjs +457 -303
- package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
- package/fesm2022/cmat-components-status-tag.mjs +136 -44
- package/fesm2022/cmat-components-status-tag.mjs.map +1 -1
- package/fesm2022/cmat-components-table-toolbar.mjs +120 -28
- package/fesm2022/cmat-components-table-toolbar.mjs.map +1 -1
- package/fesm2022/cmat-components-timeline.mjs +464 -168
- package/fesm2022/cmat-components-timeline.mjs.map +1 -1
- package/fesm2022/cmat-components-toast.mjs +346 -262
- package/fesm2022/cmat-components-toast.mjs.map +1 -1
- package/fesm2022/cmat-components-transfer-picker.mjs +1427 -593
- package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-treetable.mjs +372 -112
- package/fesm2022/cmat-components-treetable.mjs.map +1 -1
- package/fesm2022/cmat-components-upload.mjs +904 -410
- package/fesm2022/cmat-components-upload.mjs.map +1 -1
- package/fesm2022/cmat-components-x6-angular-shape.mjs +153 -170
- package/fesm2022/cmat-components-x6-angular-shape.mjs.map +1 -1
- package/fesm2022/cmat-directives-animate-on-scroll.mjs +220 -138
- package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
- package/fesm2022/cmat-directives-arrow-cursor.mjs +246 -193
- package/fesm2022/cmat-directives-arrow-cursor.mjs.map +1 -1
- package/fesm2022/cmat-directives-autofocus.mjs +43 -25
- package/fesm2022/cmat-directives-autofocus.mjs.map +1 -1
- package/fesm2022/cmat-directives-data-exporter.mjs +537 -338
- package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -1
- package/fesm2022/cmat-directives-debounce.mjs +162 -76
- package/fesm2022/cmat-directives-debounce.mjs.map +1 -1
- package/fesm2022/cmat-directives-digit-only.mjs +457 -356
- package/fesm2022/cmat-directives-digit-only.mjs.map +1 -1
- package/fesm2022/cmat-directives-equal-validator.mjs +70 -53
- package/fesm2022/cmat-directives-equal-validator.mjs.map +1 -1
- package/fesm2022/cmat-directives-seamless-auto-scroll.mjs +180 -132
- package/fesm2022/cmat-directives-seamless-auto-scroll.mjs.map +1 -1
- package/fesm2022/cmat-lib-mock-api.mjs +207 -195
- package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
- package/fesm2022/cmat-pipes-bytes.mjs +50 -30
- package/fesm2022/cmat-pipes-bytes.mjs.map +1 -1
- package/fesm2022/cmat-pipes-date-format.mjs +41 -25
- package/fesm2022/cmat-pipes-date-format.mjs.map +1 -1
- package/fesm2022/cmat-pipes-find-by-key.mjs +44 -26
- package/fesm2022/cmat-pipes-find-by-key.mjs.map +1 -1
- package/fesm2022/cmat-pipes-group-by.mjs +50 -38
- package/fesm2022/cmat-pipes-group-by.mjs.map +1 -1
- package/fesm2022/cmat-pipes-keys.mjs +44 -31
- package/fesm2022/cmat-pipes-keys.mjs.map +1 -1
- package/fesm2022/cmat-pipes-secure.mjs +60 -49
- package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
- package/fesm2022/cmat-pipes-uppercase.mjs +39 -22
- package/fesm2022/cmat-pipes-uppercase.mjs.map +1 -1
- package/fesm2022/cmat-reports.mjs +2761 -0
- package/fesm2022/cmat-reports.mjs.map +1 -0
- package/fesm2022/cmat-services-alert.mjs +249 -277
- package/fesm2022/cmat-services-alert.mjs.map +1 -1
- package/fesm2022/cmat-services-config.mjs +110 -81
- package/fesm2022/cmat-services-config.mjs.map +1 -1
- package/fesm2022/cmat-services-confirmation.mjs +184 -73
- package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
- package/fesm2022/cmat-services-data.mjs +136 -125
- package/fesm2022/cmat-services-data.mjs.map +1 -1
- package/fesm2022/cmat-services-export-as.mjs +165 -183
- package/fesm2022/cmat-services-export-as.mjs.map +1 -1
- package/fesm2022/cmat-services-loading.mjs +116 -95
- package/fesm2022/cmat-services-loading.mjs.map +1 -1
- package/fesm2022/cmat-services-local-storage.mjs +75 -66
- package/fesm2022/cmat-services-local-storage.mjs.map +1 -1
- package/fesm2022/cmat-services-media-watcher.mjs +69 -64
- package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
- package/fesm2022/cmat-services-platform.mjs +48 -45
- package/fesm2022/cmat-services-platform.mjs.map +1 -1
- package/fesm2022/cmat-services-print.mjs +984 -1109
- package/fesm2022/cmat-services-print.mjs.map +1 -1
- package/fesm2022/cmat-services-splash-screen.mjs +53 -38
- package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
- package/fesm2022/cmat-services-title.mjs +57 -47
- package/fesm2022/cmat-services-title.mjs.map +1 -1
- package/fesm2022/cmat-services-translation.mjs +79 -68
- package/fesm2022/cmat-services-translation.mjs.map +1 -1
- package/fesm2022/cmat-services-utils.mjs +424 -517
- package/fesm2022/cmat-services-utils.mjs.map +1 -1
- package/fesm2022/cmat-validators.mjs +23 -33
- package/fesm2022/cmat-validators.mjs.map +1 -1
- package/fesm2022/cmat-version.mjs +12 -16
- package/fesm2022/cmat-version.mjs.map +1 -1
- package/fesm2022/cmat.mjs +39805 -22511
- package/fesm2022/cmat.mjs.map +1 -1
- package/package.json +5 -1
- package/types/cmat-components-adapter.d.ts +145 -156
- package/types/cmat-components-breadcrumb.d.ts +108 -86
- package/types/cmat-components-card.d.ts +34 -18
- package/types/cmat-components-carousel.d.ts +251 -134
- package/types/cmat-components-cascade.d.ts +158 -117
- package/types/cmat-components-chip-input.d.ts +105 -71
- package/types/cmat-components-code-editor.d.ts +59 -34
- package/types/cmat-components-color-picker.d.ts +378 -236
- package/types/cmat-components-custom-formly.d.ts +776 -814
- package/types/cmat-components-data-picker.d.ts +502 -360
- package/types/cmat-components-date-range.d.ts +106 -77
- package/types/cmat-components-date-time-display.d.ts +36 -13
- package/types/cmat-components-drawer.d.ts +91 -61
- package/types/cmat-components-empty-state.d.ts +47 -17
- package/types/cmat-components-file-preview.d.ts +42 -14
- package/types/cmat-components-filter-toolbar.d.ts +57 -25
- package/types/cmat-components-form-actions.d.ts +18 -10
- package/types/cmat-components-fullscreen.d.ts +21 -13
- package/types/cmat-components-highlight.d.ts +33 -26
- package/types/cmat-components-image-viewer.d.ts +119 -58
- package/types/cmat-components-inline-loading.d.ts +24 -11
- package/types/cmat-components-json-editor.d.ts +39 -28
- package/types/cmat-components-knob-input.d.ts +172 -101
- package/types/cmat-components-loading-overlay.d.ts +8 -11
- package/types/cmat-components-masonry.d.ts +27 -14
- package/types/cmat-components-material-color-picker.d.ts +56 -42
- package/types/cmat-components-material-datetimepicker.d.ts +817 -454
- package/types/cmat-components-navigation.d.ts +295 -221
- package/types/cmat-components-opt-input.d.ts +111 -90
- package/types/cmat-components-org-chart.d.ts +53 -35
- package/types/cmat-components-page-header.d.ts +37 -14
- package/types/cmat-components-pagination.d.ts +144 -107
- package/types/cmat-components-password-strength.d.ts +197 -86
- package/types/cmat-components-popover.d.ts +264 -166
- package/types/cmat-components-progress-bar.d.ts +17 -14
- package/types/cmat-components-qrcode.d.ts +111 -42
- package/types/cmat-components-rating.d.ts +105 -59
- package/types/cmat-components-rich-text-editor.d.ts +39 -16
- package/types/cmat-components-select-search.d.ts +195 -99
- package/types/cmat-components-select-table.d.ts +241 -142
- package/types/cmat-components-select-tree.d.ts +185 -118
- package/types/cmat-components-skeleton.d.ts +55 -32
- package/types/cmat-components-speed-dial.d.ts +86 -61
- package/types/cmat-components-status-tag.d.ts +42 -24
- package/types/cmat-components-table-toolbar.d.ts +30 -12
- package/types/cmat-components-timeline.d.ts +83 -51
- package/types/cmat-components-toast.d.ts +84 -85
- package/types/cmat-components-transfer-picker.d.ts +228 -181
- package/types/cmat-components-treetable.d.ts +63 -39
- package/types/cmat-components-upload.d.ts +205 -106
- package/types/cmat-components-x6-angular-shape.d.ts +29 -37
- package/types/cmat-directives-animate-on-scroll.d.ts +48 -30
- package/types/cmat-directives-arrow-cursor.d.ts +55 -35
- package/types/cmat-directives-autofocus.d.ts +8 -11
- package/types/cmat-directives-data-exporter.d.ts +71 -40
- package/types/cmat-directives-debounce.d.ts +31 -28
- package/types/cmat-directives-digit-only.d.ts +90 -53
- package/types/cmat-directives-equal-validator.d.ts +11 -14
- package/types/cmat-directives-seamless-auto-scroll.d.ts +42 -29
- package/types/cmat-lib-mock-api.d.ts +46 -55
- package/types/cmat-pipes-bytes.d.ts +7 -10
- package/types/cmat-pipes-date-format.d.ts +7 -10
- package/types/cmat-pipes-find-by-key.d.ts +8 -12
- package/types/cmat-pipes-group-by.d.ts +11 -15
- package/types/cmat-pipes-keys.d.ts +10 -13
- package/types/cmat-pipes-secure.d.ts +14 -17
- package/types/cmat-pipes-uppercase.d.ts +7 -10
- package/types/cmat-reports.d.ts +1138 -0
- package/types/cmat-services-alert.d.ts +80 -87
- package/types/cmat-services-config.d.ts +37 -43
- package/types/cmat-services-confirmation.d.ts +31 -37
- package/types/cmat-services-data.d.ts +18 -21
- package/types/cmat-services-export-as.d.ts +28 -33
- package/types/cmat-services-loading.d.ts +27 -31
- package/types/cmat-services-local-storage.d.ts +17 -21
- package/types/cmat-services-media-watcher.d.ts +14 -18
- package/types/cmat-services-platform.d.ts +8 -11
- package/types/cmat-services-print.d.ts +97 -102
- package/types/cmat-services-splash-screen.d.ts +11 -14
- package/types/cmat-services-title.d.ts +9 -12
- package/types/cmat-services-translation.d.ts +19 -22
- package/types/cmat-services-utils.d.ts +76 -80
- package/types/cmat-validators.d.ts +5 -8
- package/types/cmat-version.d.ts +8 -10
- package/types/cmat.d.ts +7551 -5204
|
@@ -1,345 +1,544 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import dayjs from
|
|
4
|
-
import * as FileSaver from
|
|
5
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Directive, Injectable, Injector, inject, input } from "@angular/core";
|
|
3
|
+
import dayjs from "dayjs";
|
|
4
|
+
import * as FileSaver from "file-saver-es";
|
|
6
5
|
var ExportType;
|
|
7
|
-
(function
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
(function(ExportType) {
|
|
7
|
+
ExportType["XLS"] = "xls";
|
|
8
|
+
ExportType["XLSX"] = "xlsx";
|
|
9
|
+
ExportType["CSV"] = "csv";
|
|
10
|
+
ExportType["TXT"] = "txt";
|
|
11
|
+
ExportType["JSON"] = "json";
|
|
13
12
|
})(ExportType || (ExportType = {}));
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const DOT = '.';
|
|
30
|
-
const COMMA = ',';
|
|
31
|
-
const EXTENSION_XLS = DOT + ExportType.XLS;
|
|
32
|
-
const EXTENSION_XLSX = DOT + ExportType.XLSX;
|
|
33
|
-
const EXTENSION_CSV = DOT + ExportType.CSV;
|
|
34
|
-
const EXTENSION_JSON = DOT + ExportType.JSON;
|
|
35
|
-
const EXTENSION_TEXT = DOT + ExportType.TXT;
|
|
13
|
+
var Mime = class {
|
|
14
|
+
constructor(extension, contentTypeHeader) {
|
|
15
|
+
this.extension = extension;
|
|
16
|
+
this.contentTypeHeader = contentTypeHeader;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
const TYPE_ARRAY = "array";
|
|
20
|
+
const CHAR_SET_UTF_8 = ";charset=utf-8";
|
|
21
|
+
const CONTENT_TYPE_TEXT = ExportType.TXT + "/";
|
|
22
|
+
const CONTENT_TYPE_EXCEL = "application/octet-stream";
|
|
23
|
+
const EXTENSION_XLS = "." + ExportType.XLS;
|
|
24
|
+
const EXTENSION_XLSX = "." + ExportType.XLSX;
|
|
25
|
+
const EXTENSION_CSV = "." + ExportType.CSV;
|
|
26
|
+
const EXTENSION_JSON = "." + ExportType.JSON;
|
|
27
|
+
const EXTENSION_TEXT = "." + ExportType.TXT;
|
|
36
28
|
const MIME_EXCEL_XLS = new Mime(EXTENSION_XLS, CONTENT_TYPE_EXCEL + CHAR_SET_UTF_8);
|
|
37
29
|
const MIME_EXCEL_XLSX = new Mime(EXTENSION_XLSX, CONTENT_TYPE_EXCEL + CHAR_SET_UTF_8);
|
|
38
|
-
const MIME_JSON = new Mime(EXTENSION_JSON,
|
|
30
|
+
const MIME_JSON = new Mime(EXTENSION_JSON, "application/json;charset=utf-8");
|
|
39
31
|
const MIME_TXT = new Mime(EXTENSION_TEXT, CONTENT_TYPE_TEXT + ExportType.TXT + CHAR_SET_UTF_8);
|
|
40
32
|
const MIME_CSV = new Mime(EXTENSION_CSV, CONTENT_TYPE_TEXT + ExportType.CSV + CHAR_SET_UTF_8);
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
class JsonExporterService extends FileExporter {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
33
|
+
const XLS_REGEX = ".*." + ExportType.XLS + "$";
|
|
34
|
+
const XLSX_COLS = "!cols";
|
|
35
|
+
var FileUtil = class FileUtil {
|
|
36
|
+
static save(content, mime, options) {
|
|
37
|
+
const blob = new Blob([content], { type: mime.contentTypeHeader });
|
|
38
|
+
let fileName = "附件";
|
|
39
|
+
if (options?.fileName) fileName = options.fileName;
|
|
40
|
+
FileSaver.saveAs(blob, fileName + mime.extension);
|
|
41
|
+
}
|
|
42
|
+
static isXls(fileName) {
|
|
43
|
+
return fileName.toLowerCase().match(XLS_REGEX) != null;
|
|
44
|
+
}
|
|
45
|
+
static identifyExportType(fileName) {
|
|
46
|
+
if (fileName && FileUtil.isXls(fileName)) return ExportType.XLS;
|
|
47
|
+
else return ExportType.XLSX;
|
|
48
|
+
}
|
|
49
|
+
static removeExtension(options) {
|
|
50
|
+
if (options) options.fileName = options.fileName?.split(".")[0];
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
var FileExporter = class {
|
|
54
|
+
export(rows, options) {
|
|
55
|
+
if (!rows) throw new Error("Empty json array is provided, rows parameter is mandatory!");
|
|
56
|
+
const mimeType = this.getMimeType();
|
|
57
|
+
this.createContent(rows, options).then((content) => {
|
|
58
|
+
FileUtil.save(content, mimeType, options);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
var WorksheetExporter = class extends FileExporter {
|
|
63
|
+
constructor() {
|
|
64
|
+
super();
|
|
65
|
+
}
|
|
66
|
+
async createContent(rows, options) {
|
|
67
|
+
const workSheet = (await import("xlsx")).utils.json_to_sheet(rows, { skipHeader: true });
|
|
68
|
+
return await this.workSheetToContent(workSheet, options);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
var CsvExporterService = class CsvExporterService extends WorksheetExporter {
|
|
72
|
+
constructor() {
|
|
73
|
+
super();
|
|
74
|
+
}
|
|
75
|
+
async workSheetToContent(worksheet, options) {
|
|
76
|
+
return "" + (await import("xlsx")).utils.sheet_to_csv(worksheet, { FS: options?.delimiter ?? "," });
|
|
77
|
+
}
|
|
78
|
+
getMimeType() {
|
|
79
|
+
return MIME_CSV;
|
|
80
|
+
}
|
|
81
|
+
static {
|
|
82
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
83
|
+
minVersion: "12.0.0",
|
|
84
|
+
version: "22.2.3",
|
|
85
|
+
ngImport: i0,
|
|
86
|
+
type: CsvExporterService,
|
|
87
|
+
deps: [],
|
|
88
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
static {
|
|
92
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
93
|
+
minVersion: "12.0.0",
|
|
94
|
+
version: "22.2.3",
|
|
95
|
+
ngImport: i0,
|
|
96
|
+
type: CsvExporterService,
|
|
97
|
+
providedIn: "root"
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
102
|
+
minVersion: "12.0.0",
|
|
103
|
+
version: "22.2.3",
|
|
104
|
+
ngImport: i0,
|
|
105
|
+
type: CsvExporterService,
|
|
106
|
+
decorators: [{
|
|
107
|
+
type: Injectable,
|
|
108
|
+
args: [{ providedIn: "root" }]
|
|
109
|
+
}],
|
|
110
|
+
ctorParameters: () => []
|
|
111
|
+
});
|
|
112
|
+
var JsonExporterService = class JsonExporterService extends FileExporter {
|
|
113
|
+
constructor() {
|
|
114
|
+
super();
|
|
115
|
+
}
|
|
116
|
+
async createContent(rows, options) {
|
|
117
|
+
return await new Promise((resolve) => {
|
|
118
|
+
resolve(JSON.stringify(rows));
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
getMimeType() {
|
|
122
|
+
return MIME_JSON;
|
|
123
|
+
}
|
|
124
|
+
static {
|
|
125
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
126
|
+
minVersion: "12.0.0",
|
|
127
|
+
version: "22.2.3",
|
|
128
|
+
ngImport: i0,
|
|
129
|
+
type: JsonExporterService,
|
|
130
|
+
deps: [],
|
|
131
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
static {
|
|
135
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
136
|
+
minVersion: "12.0.0",
|
|
137
|
+
version: "22.2.3",
|
|
138
|
+
ngImport: i0,
|
|
139
|
+
type: JsonExporterService,
|
|
140
|
+
providedIn: "root"
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
145
|
+
minVersion: "12.0.0",
|
|
146
|
+
version: "22.2.3",
|
|
147
|
+
ngImport: i0,
|
|
148
|
+
type: JsonExporterService,
|
|
149
|
+
decorators: [{
|
|
150
|
+
type: Injectable,
|
|
151
|
+
args: [{ providedIn: "root" }]
|
|
152
|
+
}],
|
|
153
|
+
ctorParameters: () => []
|
|
154
|
+
});
|
|
155
|
+
var TxtExporterService = class TxtExporterService extends FileExporter {
|
|
156
|
+
constructor() {
|
|
157
|
+
super();
|
|
158
|
+
}
|
|
159
|
+
async createContent(rows, options) {
|
|
160
|
+
return await new Promise((resolve) => {
|
|
161
|
+
let content = "";
|
|
162
|
+
rows.forEach((element) => {
|
|
163
|
+
content += Object.values(element).join(this._getDelimiter(options)) + "\n";
|
|
164
|
+
});
|
|
165
|
+
resolve(JSON.stringify(content));
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
getMimeType() {
|
|
169
|
+
return MIME_TXT;
|
|
170
|
+
}
|
|
171
|
+
_getDelimiter(options) {
|
|
172
|
+
if (options?.delimiter) return options.delimiter;
|
|
173
|
+
else return " ";
|
|
174
|
+
}
|
|
175
|
+
static {
|
|
176
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
177
|
+
minVersion: "12.0.0",
|
|
178
|
+
version: "22.2.3",
|
|
179
|
+
ngImport: i0,
|
|
180
|
+
type: TxtExporterService,
|
|
181
|
+
deps: [],
|
|
182
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
static {
|
|
186
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
187
|
+
minVersion: "12.0.0",
|
|
188
|
+
version: "22.2.3",
|
|
189
|
+
ngImport: i0,
|
|
190
|
+
type: TxtExporterService,
|
|
191
|
+
providedIn: "root"
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
196
|
+
minVersion: "12.0.0",
|
|
197
|
+
version: "22.2.3",
|
|
198
|
+
ngImport: i0,
|
|
199
|
+
type: TxtExporterService,
|
|
200
|
+
decorators: [{
|
|
201
|
+
type: Injectable,
|
|
202
|
+
args: [{ providedIn: "root" }]
|
|
203
|
+
}],
|
|
204
|
+
ctorParameters: () => []
|
|
205
|
+
});
|
|
206
|
+
var XlsExporterService = class XlsExporterService extends WorksheetExporter {
|
|
207
|
+
constructor() {
|
|
208
|
+
super();
|
|
209
|
+
}
|
|
210
|
+
async workSheetToContent(worksheet, options = {}) {
|
|
211
|
+
const { utils, write } = await import("xlsx");
|
|
212
|
+
const workBook = utils.book_new();
|
|
213
|
+
this._correctTypes(options);
|
|
214
|
+
utils.book_append_sheet(workBook, worksheet, options.sheet);
|
|
215
|
+
if (options.columnWidths) worksheet[XLSX_COLS] = this._convertToWch(options.columnWidths);
|
|
216
|
+
else {
|
|
217
|
+
const jsonTable = utils.sheet_to_json(worksheet, {
|
|
218
|
+
header: 1,
|
|
219
|
+
raw: true,
|
|
220
|
+
rawNumbers: true
|
|
221
|
+
});
|
|
222
|
+
const maxRowSize = Math.max(...jsonTable.map((row) => row.length));
|
|
223
|
+
const wchArray = Array.from({ length: maxRowSize }).map((_, rowIndex) => {
|
|
224
|
+
const row = Array.from({ length: jsonTable.length }).map((_, i) => String(jsonTable[i][rowIndex] ?? "").length);
|
|
225
|
+
return { wch: Math.max(...row) * 3 > 40 ? 40 : Math.max(...row) * 3 };
|
|
226
|
+
});
|
|
227
|
+
worksheet[XLSX_COLS] = wchArray;
|
|
228
|
+
}
|
|
229
|
+
return write(workBook, options);
|
|
230
|
+
}
|
|
231
|
+
getMimeType() {
|
|
232
|
+
return MIME_EXCEL_XLS;
|
|
233
|
+
}
|
|
234
|
+
_correctTypes(options) {
|
|
235
|
+
options.type ??= TYPE_ARRAY;
|
|
236
|
+
options.bookType = this.getMimeType().extension.replace(".", "");
|
|
237
|
+
}
|
|
238
|
+
_convertToWch(columnWidths) {
|
|
239
|
+
return columnWidths.map((width) => ({ wch: width }));
|
|
240
|
+
}
|
|
241
|
+
static {
|
|
242
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
243
|
+
minVersion: "12.0.0",
|
|
244
|
+
version: "22.2.3",
|
|
245
|
+
ngImport: i0,
|
|
246
|
+
type: XlsExporterService,
|
|
247
|
+
deps: [],
|
|
248
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
static {
|
|
252
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
253
|
+
minVersion: "12.0.0",
|
|
254
|
+
version: "22.2.3",
|
|
255
|
+
ngImport: i0,
|
|
256
|
+
type: XlsExporterService,
|
|
257
|
+
providedIn: "root"
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
262
|
+
minVersion: "12.0.0",
|
|
263
|
+
version: "22.2.3",
|
|
264
|
+
ngImport: i0,
|
|
265
|
+
type: XlsExporterService,
|
|
266
|
+
decorators: [{
|
|
267
|
+
type: Injectable,
|
|
268
|
+
args: [{ providedIn: "root" }]
|
|
269
|
+
}],
|
|
270
|
+
ctorParameters: () => []
|
|
271
|
+
});
|
|
272
|
+
var XlsxExporterService = class XlsxExporterService extends XlsExporterService {
|
|
273
|
+
constructor() {
|
|
274
|
+
super();
|
|
275
|
+
}
|
|
276
|
+
getMimeType() {
|
|
277
|
+
return MIME_EXCEL_XLSX;
|
|
278
|
+
}
|
|
279
|
+
static {
|
|
280
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
281
|
+
minVersion: "12.0.0",
|
|
282
|
+
version: "22.2.3",
|
|
283
|
+
ngImport: i0,
|
|
284
|
+
type: XlsxExporterService,
|
|
285
|
+
deps: [],
|
|
286
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
static {
|
|
290
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
291
|
+
minVersion: "12.0.0",
|
|
292
|
+
version: "22.2.3",
|
|
293
|
+
ngImport: i0,
|
|
294
|
+
type: XlsxExporterService,
|
|
295
|
+
providedIn: "root"
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
};
|
|
299
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
300
|
+
minVersion: "12.0.0",
|
|
301
|
+
version: "22.2.3",
|
|
302
|
+
ngImport: i0,
|
|
303
|
+
type: XlsxExporterService,
|
|
304
|
+
decorators: [{
|
|
305
|
+
type: Injectable,
|
|
306
|
+
args: [{ providedIn: "root" }]
|
|
307
|
+
}],
|
|
308
|
+
ctorParameters: () => []
|
|
309
|
+
});
|
|
310
|
+
var ServiceLocatorService = class ServiceLocatorService {
|
|
311
|
+
constructor() {
|
|
312
|
+
this._injector = inject(Injector);
|
|
313
|
+
}
|
|
314
|
+
getService(exportType) {
|
|
315
|
+
switch (exportType) {
|
|
316
|
+
case "xls":
|
|
317
|
+
case ExportType.XLS: return this._injector.get(XlsExporterService);
|
|
318
|
+
case "xlsx":
|
|
319
|
+
case ExportType.XLSX: return this._injector.get(XlsxExporterService);
|
|
320
|
+
case "json":
|
|
321
|
+
case ExportType.JSON: return this._injector.get(JsonExporterService);
|
|
322
|
+
case "txt":
|
|
323
|
+
case ExportType.TXT: return this._injector.get(TxtExporterService);
|
|
324
|
+
case "csv":
|
|
325
|
+
case ExportType.CSV: return this._injector.get(CsvExporterService);
|
|
326
|
+
default: return this._injector.get(XlsxExporterService);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
static {
|
|
330
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
331
|
+
minVersion: "12.0.0",
|
|
332
|
+
version: "22.2.3",
|
|
333
|
+
ngImport: i0,
|
|
334
|
+
type: ServiceLocatorService,
|
|
335
|
+
deps: [],
|
|
336
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
static {
|
|
340
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
341
|
+
minVersion: "12.0.0",
|
|
342
|
+
version: "22.2.3",
|
|
343
|
+
ngImport: i0,
|
|
344
|
+
type: ServiceLocatorService,
|
|
345
|
+
providedIn: "root"
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
350
|
+
minVersion: "12.0.0",
|
|
351
|
+
version: "22.2.3",
|
|
352
|
+
ngImport: i0,
|
|
353
|
+
type: ServiceLocatorService,
|
|
354
|
+
decorators: [{
|
|
355
|
+
type: Injectable,
|
|
356
|
+
args: [{ providedIn: "root" }]
|
|
357
|
+
}]
|
|
358
|
+
});
|
|
359
|
+
var CmatDataExporterDirective = class CmatDataExporterDirective {
|
|
360
|
+
constructor() {
|
|
361
|
+
this.dataSource = input([], ...ngDevMode ? [{ debugName: "dataSource" }] : /* istanbul ignore next */ []);
|
|
362
|
+
this.exportColumns = input([], ...ngDevMode ? [{ debugName: "exportColumns" }] : /* istanbul ignore next */ []);
|
|
363
|
+
this.options = input(...ngDevMode ? [void 0, { debugName: "options" }] : /* istanbul ignore next */ []);
|
|
364
|
+
this.exportType = input("xlsx", ...ngDevMode ? [{ debugName: "exportType" }] : /* istanbul ignore next */ []);
|
|
365
|
+
this.transformBoolean = input(true, ...ngDevMode ? [{ debugName: "transformBoolean" }] : /* istanbul ignore next */ []);
|
|
366
|
+
this.transformDate = input(true, ...ngDevMode ? [{ debugName: "transformDate" }] : /* istanbul ignore next */ []);
|
|
367
|
+
this.dateFormat = input("YYYY-MM-DD", ...ngDevMode ? [{ debugName: "dateFormat" }] : /* istanbul ignore next */ []);
|
|
368
|
+
this._serviceLocator = inject(ServiceLocatorService);
|
|
369
|
+
}
|
|
370
|
+
ngOnChanges(changes) {
|
|
371
|
+
if (changes.dataSource) {
|
|
372
|
+
if (this.dataSource()?.length > 0) {
|
|
373
|
+
this._data = [];
|
|
374
|
+
this._loadExporter(this.exportType());
|
|
375
|
+
this._data = [this.exportColumns().map((column) => ({ [column.code]: column.label })).reduce((acc, curr) => ({
|
|
376
|
+
...acc,
|
|
377
|
+
...curr
|
|
378
|
+
}), {}), ...this.dataSource().map((user) => this.exportColumns().reduce((acc, column) => {
|
|
379
|
+
let value = user[column.code];
|
|
380
|
+
if (this.transformBoolean() && typeof value === "boolean") value = value ? "是" : "否";
|
|
381
|
+
else if (this.transformDate() && (value instanceof Date || typeof value === "string")) {
|
|
382
|
+
if (typeof value === "string" && !/^\d{4}[-/]\d{1,2}[-/]\d{1,2}/.test(value)) return {
|
|
383
|
+
...acc,
|
|
384
|
+
[column.code]: value
|
|
385
|
+
};
|
|
386
|
+
const dateValue = dayjs(value);
|
|
387
|
+
if (dateValue.isValid()) value = dateValue.format(this.dateFormat());
|
|
388
|
+
}
|
|
389
|
+
return {
|
|
390
|
+
...acc,
|
|
391
|
+
[column.code]: value
|
|
392
|
+
};
|
|
393
|
+
}, {}))];
|
|
394
|
+
this._exporterService.export(this._data, this.options());
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
_loadExporter(exportType) {
|
|
399
|
+
this._exporterService = this._serviceLocator.getService(exportType);
|
|
400
|
+
}
|
|
401
|
+
static {
|
|
402
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
403
|
+
minVersion: "12.0.0",
|
|
404
|
+
version: "22.2.3",
|
|
405
|
+
ngImport: i0,
|
|
406
|
+
type: CmatDataExporterDirective,
|
|
407
|
+
deps: [],
|
|
408
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
static {
|
|
412
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
413
|
+
minVersion: "17.1.0",
|
|
414
|
+
version: "22.2.3",
|
|
415
|
+
type: CmatDataExporterDirective,
|
|
416
|
+
isStandalone: true,
|
|
417
|
+
selector: "button[cmatDataExporter]",
|
|
418
|
+
inputs: {
|
|
419
|
+
dataSource: {
|
|
420
|
+
classPropertyName: "dataSource",
|
|
421
|
+
publicName: "dataSource",
|
|
422
|
+
isSignal: true,
|
|
423
|
+
isRequired: false,
|
|
424
|
+
transformFunction: null
|
|
425
|
+
},
|
|
426
|
+
exportColumns: {
|
|
427
|
+
classPropertyName: "exportColumns",
|
|
428
|
+
publicName: "exportColumns",
|
|
429
|
+
isSignal: true,
|
|
430
|
+
isRequired: false,
|
|
431
|
+
transformFunction: null
|
|
432
|
+
},
|
|
433
|
+
options: {
|
|
434
|
+
classPropertyName: "options",
|
|
435
|
+
publicName: "options",
|
|
436
|
+
isSignal: true,
|
|
437
|
+
isRequired: false,
|
|
438
|
+
transformFunction: null
|
|
439
|
+
},
|
|
440
|
+
exportType: {
|
|
441
|
+
classPropertyName: "exportType",
|
|
442
|
+
publicName: "exportType",
|
|
443
|
+
isSignal: true,
|
|
444
|
+
isRequired: false,
|
|
445
|
+
transformFunction: null
|
|
446
|
+
},
|
|
447
|
+
transformBoolean: {
|
|
448
|
+
classPropertyName: "transformBoolean",
|
|
449
|
+
publicName: "transformBoolean",
|
|
450
|
+
isSignal: true,
|
|
451
|
+
isRequired: false,
|
|
452
|
+
transformFunction: null
|
|
453
|
+
},
|
|
454
|
+
transformDate: {
|
|
455
|
+
classPropertyName: "transformDate",
|
|
456
|
+
publicName: "transformDate",
|
|
457
|
+
isSignal: true,
|
|
458
|
+
isRequired: false,
|
|
459
|
+
transformFunction: null
|
|
460
|
+
},
|
|
461
|
+
dateFormat: {
|
|
462
|
+
classPropertyName: "dateFormat",
|
|
463
|
+
publicName: "dateFormat",
|
|
464
|
+
isSignal: true,
|
|
465
|
+
isRequired: false,
|
|
466
|
+
transformFunction: null
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
usesOnChanges: true,
|
|
470
|
+
ngImport: i0
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
};
|
|
474
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
475
|
+
minVersion: "12.0.0",
|
|
476
|
+
version: "22.2.3",
|
|
477
|
+
ngImport: i0,
|
|
478
|
+
type: CmatDataExporterDirective,
|
|
479
|
+
decorators: [{
|
|
480
|
+
type: Directive,
|
|
481
|
+
args: [{ selector: "button[cmatDataExporter]" }]
|
|
482
|
+
}],
|
|
483
|
+
propDecorators: {
|
|
484
|
+
dataSource: [{
|
|
485
|
+
type: i0.Input,
|
|
486
|
+
args: [{
|
|
487
|
+
isSignal: true,
|
|
488
|
+
alias: "dataSource",
|
|
489
|
+
required: false
|
|
490
|
+
}]
|
|
491
|
+
}],
|
|
492
|
+
exportColumns: [{
|
|
493
|
+
type: i0.Input,
|
|
494
|
+
args: [{
|
|
495
|
+
isSignal: true,
|
|
496
|
+
alias: "exportColumns",
|
|
497
|
+
required: false
|
|
498
|
+
}]
|
|
499
|
+
}],
|
|
500
|
+
options: [{
|
|
501
|
+
type: i0.Input,
|
|
502
|
+
args: [{
|
|
503
|
+
isSignal: true,
|
|
504
|
+
alias: "options",
|
|
505
|
+
required: false
|
|
506
|
+
}]
|
|
507
|
+
}],
|
|
508
|
+
exportType: [{
|
|
509
|
+
type: i0.Input,
|
|
510
|
+
args: [{
|
|
511
|
+
isSignal: true,
|
|
512
|
+
alias: "exportType",
|
|
513
|
+
required: false
|
|
514
|
+
}]
|
|
515
|
+
}],
|
|
516
|
+
transformBoolean: [{
|
|
517
|
+
type: i0.Input,
|
|
518
|
+
args: [{
|
|
519
|
+
isSignal: true,
|
|
520
|
+
alias: "transformBoolean",
|
|
521
|
+
required: false
|
|
522
|
+
}]
|
|
523
|
+
}],
|
|
524
|
+
transformDate: [{
|
|
525
|
+
type: i0.Input,
|
|
526
|
+
args: [{
|
|
527
|
+
isSignal: true,
|
|
528
|
+
alias: "transformDate",
|
|
529
|
+
required: false
|
|
530
|
+
}]
|
|
531
|
+
}],
|
|
532
|
+
dateFormat: [{
|
|
533
|
+
type: i0.Input,
|
|
534
|
+
args: [{
|
|
535
|
+
isSignal: true,
|
|
536
|
+
alias: "dateFormat",
|
|
537
|
+
required: false
|
|
538
|
+
}]
|
|
539
|
+
}]
|
|
540
|
+
}
|
|
541
|
+
});
|
|
344
542
|
export { CmatDataExporterDirective, ExportType };
|
|
345
|
-
|
|
543
|
+
|
|
544
|
+
//# sourceMappingURL=cmat-directives-data-exporter.mjs.map
|