cmat 0.0.118 → 0.0.119
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 +9 -9
- package/fesm2022/cmat-components-breadcrumb.mjs +10 -9
- package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/cmat-components-card.mjs +6 -6
- package/fesm2022/cmat-components-card.mjs.map +1 -1
- package/fesm2022/cmat-components-carousel.mjs +16 -16
- package/fesm2022/cmat-components-carousel.mjs.map +1 -1
- package/fesm2022/cmat-components-cascade.mjs +1 -863
- package/fesm2022/cmat-components-chip-input.mjs +11 -11
- package/fesm2022/cmat-components-code-editor.mjs +3 -3
- package/fesm2022/cmat-components-color-picker.mjs +45 -45
- package/fesm2022/cmat-components-color-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-custom-formly.mjs +214 -214
- package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
- package/fesm2022/cmat-components-data-picker.mjs +38 -38
- package/fesm2022/cmat-components-data-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-date-range.mjs +15 -16
- package/fesm2022/cmat-components-date-range.mjs.map +1 -1
- package/fesm2022/cmat-components-date-time-display.mjs +4 -4
- package/fesm2022/cmat-components-drawer.mjs +9 -9
- package/fesm2022/cmat-components-drawer.mjs.map +1 -1
- package/fesm2022/cmat-components-empty-state.mjs +4 -4
- package/fesm2022/cmat-components-file-preview.mjs +4 -4
- package/fesm2022/cmat-components-filter-toolbar.mjs +12 -13
- package/fesm2022/cmat-components-filter-toolbar.mjs.map +1 -1
- package/fesm2022/cmat-components-form-actions.mjs +6 -6
- package/fesm2022/cmat-components-fullscreen.mjs +4 -4
- package/fesm2022/cmat-components-highlight.mjs +7 -7
- package/fesm2022/cmat-components-image-viewer.mjs +7 -7
- package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
- package/fesm2022/cmat-components-inline-loading.mjs +3 -3
- package/fesm2022/cmat-components-json-editor.mjs +7 -7
- package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
- package/fesm2022/cmat-components-knob-input.mjs +6 -6
- package/fesm2022/cmat-components-loading-overlay.mjs +5 -5
- package/fesm2022/cmat-components-loading-overlay.mjs.map +1 -1
- package/fesm2022/cmat-components-masonry.mjs +4 -4
- package/fesm2022/cmat-components-material-color-picker.mjs +1 -337
- package/fesm2022/cmat-components-material-datetimepicker.mjs +1 -4312
- package/fesm2022/cmat-components-navigation.mjs +1 -3081
- package/fesm2022/cmat-components-opt-input.mjs +1 -542
- package/fesm2022/cmat-components-org-chart.mjs +1 -529
- package/fesm2022/cmat-components-page-header.mjs +4 -4
- package/fesm2022/cmat-components-pagination.mjs +21 -21
- package/fesm2022/cmat-components-pagination.mjs.map +1 -1
- package/fesm2022/cmat-components-password-strength.mjs +1 -880
- package/fesm2022/cmat-components-popover.mjs +1 -1022
- package/fesm2022/cmat-components-progress-bar.mjs +4 -4
- package/fesm2022/cmat-components-qrcode.mjs +3 -3
- package/fesm2022/cmat-components-rating.mjs +8 -8
- package/fesm2022/cmat-components-rich-text-editor.mjs +3 -3
- package/fesm2022/cmat-components-select-search.mjs +1 -930
- package/fesm2022/cmat-components-select-table.mjs +39 -39
- package/fesm2022/cmat-components-select-table.mjs.map +1 -1
- package/fesm2022/cmat-components-select-tree.mjs +28 -27
- package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
- package/fesm2022/cmat-components-skeleton.mjs +5 -5
- package/fesm2022/cmat-components-skeleton.mjs.map +1 -1
- package/fesm2022/cmat-components-speed-dial.mjs +12 -12
- package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
- package/fesm2022/cmat-components-status-tag.mjs +6 -6
- package/fesm2022/cmat-components-status-tag.mjs.map +1 -1
- package/fesm2022/cmat-components-table-toolbar.mjs +4 -4
- package/fesm2022/cmat-components-timeline.mjs +19 -19
- package/fesm2022/cmat-components-timeline.mjs.map +1 -1
- package/fesm2022/cmat-components-toast.mjs +14 -14
- package/fesm2022/cmat-components-toast.mjs.map +1 -1
- package/fesm2022/cmat-components-transfer-picker.mjs +48 -49
- package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
- package/fesm2022/cmat-components-treetable.mjs +8 -8
- package/fesm2022/cmat-components-upload.mjs +17 -17
- package/fesm2022/cmat-components-x6-angular-shape.mjs +1 -1
- package/fesm2022/cmat-directives-animate-on-scroll.mjs +1 -221
- package/fesm2022/cmat-directives-arrow-cursor.mjs +3 -3
- package/fesm2022/cmat-directives-autofocus.mjs +3 -3
- package/fesm2022/cmat-directives-data-exporter.mjs +1 -544
- package/fesm2022/cmat-directives-debounce.mjs +1 -163
- package/fesm2022/cmat-directives-digit-only.mjs +6 -6
- package/fesm2022/cmat-directives-equal-validator.mjs +3 -3
- package/fesm2022/cmat-directives-seamless-auto-scroll.mjs +3 -3
- package/fesm2022/cmat-lib-mock-api.mjs +8 -8
- package/fesm2022/cmat-pipes-bytes.mjs +3 -3
- package/fesm2022/cmat-pipes-date-format.mjs +3 -3
- package/fesm2022/cmat-pipes-find-by-key.mjs +3 -3
- package/fesm2022/cmat-pipes-group-by.mjs +3 -3
- package/fesm2022/cmat-pipes-keys.mjs +3 -3
- package/fesm2022/cmat-pipes-secure.mjs +6 -6
- package/fesm2022/cmat-pipes-uppercase.mjs +3 -3
- package/fesm2022/cmat-reports.mjs +86 -80
- package/fesm2022/cmat-reports.mjs.map +1 -1
- package/fesm2022/cmat-services-alert.mjs +4 -4
- package/fesm2022/cmat-services-config.mjs +6 -6
- package/fesm2022/cmat-services-confirmation.mjs +1 -185
- package/fesm2022/cmat-services-data.mjs +5 -5
- package/fesm2022/cmat-services-export-as.mjs +4 -4
- package/fesm2022/cmat-services-loading.mjs +6 -6
- package/fesm2022/cmat-services-local-storage.mjs +3 -3
- package/fesm2022/cmat-services-media-watcher.mjs +4 -4
- package/fesm2022/cmat-services-platform.mjs +4 -4
- package/fesm2022/cmat-services-print.mjs +3 -3
- package/fesm2022/cmat-services-splash-screen.mjs +4 -4
- package/fesm2022/cmat-services-title.mjs +6 -6
- package/fesm2022/cmat-services-translation.mjs +4 -4
- package/fesm2022/cmat-services-utils.mjs +7 -7
- package/fesm2022/cmat.mjs +77 -39582
- package/fesm2022/public-api-BE83BHd7.mjs +930 -0
- package/fesm2022/public-api-BE83BHd7.mjs.map +1 -0
- package/fesm2022/public-api-BcmOSkgf.mjs +542 -0
- package/fesm2022/public-api-BcmOSkgf.mjs.map +1 -0
- package/fesm2022/public-api-BmMqKDzm.mjs +4312 -0
- package/fesm2022/public-api-BmMqKDzm.mjs.map +1 -0
- package/fesm2022/public-api-BnRFazGR.mjs +221 -0
- package/fesm2022/public-api-BnRFazGR.mjs.map +1 -0
- package/fesm2022/public-api-C9N9rKkB.mjs +185 -0
- package/fesm2022/public-api-C9N9rKkB.mjs.map +1 -0
- package/fesm2022/public-api-CXmCX9ZQ.mjs +863 -0
- package/fesm2022/public-api-CXmCX9ZQ.mjs.map +1 -0
- package/fesm2022/public-api-CfILyvuV.mjs +880 -0
- package/fesm2022/public-api-CfILyvuV.mjs.map +1 -0
- package/fesm2022/public-api-CgtBw-7O.mjs +163 -0
- package/fesm2022/public-api-CgtBw-7O.mjs.map +1 -0
- package/fesm2022/public-api-DEtzrfqy.mjs +544 -0
- package/fesm2022/public-api-DEtzrfqy.mjs.map +1 -0
- package/fesm2022/public-api-EK51WC1y.mjs +1022 -0
- package/fesm2022/public-api-EK51WC1y.mjs.map +1 -0
- package/fesm2022/public-api-IpTsAgZ4.mjs +3081 -0
- package/fesm2022/public-api-IpTsAgZ4.mjs.map +1 -0
- package/fesm2022/public-api-iRaKIVmd.mjs +338 -0
- package/fesm2022/public-api-iRaKIVmd.mjs.map +1 -0
- package/fesm2022/public-api-nzzDLiDj.mjs +529 -0
- package/fesm2022/public-api-nzzDLiDj.mjs.map +1 -0
- package/fesm2022/{cmat-quill-docx-exporter-D9Eo73Wq.mjs → quill-docx-exporter-D9Eo73Wq.mjs} +1 -1
- package/fesm2022/quill-docx-exporter-D9Eo73Wq.mjs.map +1 -0
- package/package.json +23 -22
- package/types/cmat-components-adapter.d.ts +0 -3
- package/types/cmat-components-breadcrumb.d.ts +1 -4
- package/types/cmat-components-card.d.ts +0 -3
- package/types/cmat-components-carousel.d.ts +0 -3
- package/types/cmat-components-cascade.d.ts +0 -3
- package/types/cmat-components-chip-input.d.ts +3 -6
- package/types/cmat-components-code-editor.d.ts +0 -3
- package/types/cmat-components-color-picker.d.ts +0 -3
- package/types/cmat-components-custom-formly.d.ts +2 -861
- package/types/cmat-components-data-picker.d.ts +6 -9
- package/types/cmat-components-date-range.d.ts +1 -4
- package/types/cmat-components-date-time-display.d.ts +0 -3
- package/types/cmat-components-drawer.d.ts +1 -4
- package/types/cmat-components-empty-state.d.ts +0 -3
- package/types/cmat-components-file-preview.d.ts +0 -3
- package/types/cmat-components-filter-toolbar.d.ts +0 -3
- package/types/cmat-components-form-actions.d.ts +1 -4
- package/types/cmat-components-fullscreen.d.ts +0 -3
- package/types/cmat-components-highlight.d.ts +0 -3
- package/types/cmat-components-image-viewer.d.ts +0 -3
- package/types/cmat-components-inline-loading.d.ts +0 -3
- package/types/cmat-components-json-editor.d.ts +0 -3
- package/types/cmat-components-knob-input.d.ts +1 -4
- package/types/cmat-components-loading-overlay.d.ts +0 -3
- package/types/cmat-components-masonry.d.ts +0 -3
- package/types/cmat-components-material-color-picker.d.ts +1 -4
- package/types/cmat-components-material-datetimepicker.d.ts +2 -840
- package/types/cmat-components-navigation.d.ts +1 -4
- package/types/cmat-components-opt-input.d.ts +2 -117
- package/types/cmat-components-org-chart.d.ts +1 -4
- package/types/cmat-components-page-header.d.ts +1 -4
- package/types/cmat-components-pagination.d.ts +0 -3
- package/types/cmat-components-password-strength.d.ts +2 -205
- package/types/cmat-components-popover.d.ts +2 -274
- package/types/cmat-components-progress-bar.d.ts +0 -3
- package/types/cmat-components-qrcode.d.ts +2 -117
- package/types/cmat-components-rating.d.ts +1 -4
- package/types/cmat-components-rich-text-editor.d.ts +1 -4
- package/types/cmat-components-select-search.d.ts +2 -204
- package/types/cmat-components-select-table.d.ts +3 -6
- package/types/cmat-components-select-tree.d.ts +4 -7
- package/types/cmat-components-skeleton.d.ts +0 -3
- package/types/cmat-components-speed-dial.d.ts +0 -3
- package/types/cmat-components-status-tag.d.ts +2 -5
- package/types/cmat-components-table-toolbar.d.ts +0 -3
- package/types/cmat-components-timeline.d.ts +0 -3
- package/types/cmat-components-toast.d.ts +0 -3
- package/types/cmat-components-transfer-picker.d.ts +2 -5
- package/types/cmat-components-treetable.d.ts +0 -3
- package/types/cmat-components-upload.d.ts +1 -4
- package/types/cmat-components-x6-angular-shape.d.ts +1 -4
- package/types/cmat-directives-animate-on-scroll.d.ts +0 -3
- package/types/cmat-directives-arrow-cursor.d.ts +0 -3
- package/types/cmat-directives-autofocus.d.ts +0 -3
- package/types/cmat-directives-data-exporter.d.ts +1 -4
- package/types/cmat-directives-debounce.d.ts +2 -38
- package/types/cmat-directives-digit-only.d.ts +0 -3
- package/types/cmat-directives-equal-validator.d.ts +1 -4
- package/types/cmat-directives-seamless-auto-scroll.d.ts +1 -4
- package/types/cmat-lib-mock-api.d.ts +1 -4
- package/types/cmat-pipes-bytes.d.ts +0 -3
- package/types/cmat-pipes-date-format.d.ts +0 -3
- package/types/cmat-pipes-find-by-key.d.ts +0 -3
- package/types/cmat-pipes-group-by.d.ts +0 -3
- package/types/cmat-pipes-keys.d.ts +0 -3
- package/types/cmat-pipes-secure.d.ts +1 -4
- package/types/cmat-pipes-uppercase.d.ts +0 -3
- package/types/cmat-reports.d.ts +6 -9
- package/types/cmat-services-alert.d.ts +1 -4
- package/types/cmat-services-config.d.ts +0 -3
- package/types/cmat-services-confirmation.d.ts +2 -40
- package/types/cmat-services-data.d.ts +1 -4
- package/types/cmat-services-export-as.d.ts +1 -4
- package/types/cmat-services-loading.d.ts +1 -4
- package/types/cmat-services-local-storage.d.ts +0 -3
- package/types/cmat-services-media-watcher.d.ts +0 -3
- package/types/cmat-services-platform.d.ts +0 -3
- package/types/cmat-services-print.d.ts +0 -3
- package/types/cmat-services-splash-screen.d.ts +0 -3
- package/types/cmat-services-title.d.ts +0 -3
- package/types/cmat-services-translation.d.ts +1 -4
- package/types/cmat-services-utils.d.ts +2 -5
- package/types/cmat-validators.d.ts +0 -3
- package/types/cmat-version.d.ts +0 -3
- package/types/cmat.d.ts +78 -7686
- package/types/public-api-BFGGDRK3.d.ts +201 -0
- package/types/public-api-BXS379ev.d.ts +202 -0
- package/types/public-api-C4CvABGO.d.ts +114 -0
- package/types/public-api-CSYz4G5Z.d.ts +271 -0
- package/types/public-api-NSrmlKKH.d.ts +114 -0
- package/types/public-api-PfNpHSSm.d.ts +837 -0
- package/types/public-api-f3WtygQS.d.ts +35 -0
- package/types/public-api-nBuSXSMJ.d.ts +858 -0
- package/types/public-api-yYeZrUAV.d.ts +37 -0
- package/fesm2022/cmat-components-cascade.mjs.map +0 -1
- package/fesm2022/cmat-components-custom-formly-quill-docx-exporter-BwwGX2Ie.mjs +0 -294
- package/fesm2022/cmat-components-custom-formly-quill-docx-exporter-BwwGX2Ie.mjs.map +0 -1
- package/fesm2022/cmat-components-material-color-picker.mjs.map +0 -1
- package/fesm2022/cmat-components-material-datetimepicker.mjs.map +0 -1
- package/fesm2022/cmat-components-navigation.mjs.map +0 -1
- package/fesm2022/cmat-components-opt-input.mjs.map +0 -1
- package/fesm2022/cmat-components-org-chart.mjs.map +0 -1
- package/fesm2022/cmat-components-password-strength.mjs.map +0 -1
- package/fesm2022/cmat-components-popover.mjs.map +0 -1
- package/fesm2022/cmat-components-select-search.mjs.map +0 -1
- package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +0 -1
- package/fesm2022/cmat-directives-data-exporter.mjs.map +0 -1
- package/fesm2022/cmat-directives-debounce.mjs.map +0 -1
- package/fesm2022/cmat-quill-docx-exporter-D9Eo73Wq.mjs.map +0 -1
- package/fesm2022/cmat-services-confirmation.mjs.map +0 -1
- package/fesm2022/cmat.mjs.map +0 -1
|
@@ -1,544 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { Directive, Injectable, Injector, inject, input } from "@angular/core";
|
|
3
|
-
import dayjs from "dayjs";
|
|
4
|
-
import * as FileSaver from "file-saver-es";
|
|
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
|
-
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;
|
|
28
|
-
const MIME_EXCEL_XLS = new Mime(EXTENSION_XLS, CONTENT_TYPE_EXCEL + CHAR_SET_UTF_8);
|
|
29
|
-
const MIME_EXCEL_XLSX = new Mime(EXTENSION_XLSX, CONTENT_TYPE_EXCEL + CHAR_SET_UTF_8);
|
|
30
|
-
const MIME_JSON = new Mime(EXTENSION_JSON, "application/json;charset=utf-8");
|
|
31
|
-
const MIME_TXT = new Mime(EXTENSION_TEXT, CONTENT_TYPE_TEXT + ExportType.TXT + CHAR_SET_UTF_8);
|
|
32
|
-
const MIME_CSV = new Mime(EXTENSION_CSV, CONTENT_TYPE_TEXT + ExportType.CSV + CHAR_SET_UTF_8);
|
|
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.6",
|
|
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.6",
|
|
95
|
-
ngImport: i0,
|
|
96
|
-
type: CsvExporterService,
|
|
97
|
-
providedIn: "root"
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
102
|
-
minVersion: "12.0.0",
|
|
103
|
-
version: "22.2.6",
|
|
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.6",
|
|
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.6",
|
|
138
|
-
ngImport: i0,
|
|
139
|
-
type: JsonExporterService,
|
|
140
|
-
providedIn: "root"
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
145
|
-
minVersion: "12.0.0",
|
|
146
|
-
version: "22.2.6",
|
|
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.6",
|
|
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.6",
|
|
189
|
-
ngImport: i0,
|
|
190
|
-
type: TxtExporterService,
|
|
191
|
-
providedIn: "root"
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
196
|
-
minVersion: "12.0.0",
|
|
197
|
-
version: "22.2.6",
|
|
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.6",
|
|
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.6",
|
|
255
|
-
ngImport: i0,
|
|
256
|
-
type: XlsExporterService,
|
|
257
|
-
providedIn: "root"
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
};
|
|
261
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
262
|
-
minVersion: "12.0.0",
|
|
263
|
-
version: "22.2.6",
|
|
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.6",
|
|
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.6",
|
|
293
|
-
ngImport: i0,
|
|
294
|
-
type: XlsxExporterService,
|
|
295
|
-
providedIn: "root"
|
|
296
|
-
});
|
|
297
|
-
}
|
|
298
|
-
};
|
|
299
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
300
|
-
minVersion: "12.0.0",
|
|
301
|
-
version: "22.2.6",
|
|
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.6",
|
|
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.6",
|
|
343
|
-
ngImport: i0,
|
|
344
|
-
type: ServiceLocatorService,
|
|
345
|
-
providedIn: "root"
|
|
346
|
-
});
|
|
347
|
-
}
|
|
348
|
-
};
|
|
349
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
350
|
-
minVersion: "12.0.0",
|
|
351
|
-
version: "22.2.6",
|
|
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.6",
|
|
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.6",
|
|
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.6",
|
|
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
|
-
});
|
|
542
|
-
export { CmatDataExporterDirective, ExportType };
|
|
543
|
-
|
|
544
|
-
//# sourceMappingURL=cmat-directives-data-exporter.mjs.map
|
|
1
|
+
export { t as CmatDataExporterDirective, n as ExportType } from "./public-api-DEtzrfqy.mjs";
|
|
@@ -1,163 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { DestroyRef, Directive, HostListener, inject, input, output } from "@angular/core";
|
|
3
|
-
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
4
|
-
import { Subject } from "rxjs";
|
|
5
|
-
import { debounceTime, distinctUntilChanged, tap } from "rxjs/operators";
|
|
6
|
-
var AbstractDebounceDirective = class AbstractDebounceDirective {
|
|
7
|
-
constructor() {
|
|
8
|
-
this.emitChanged = output();
|
|
9
|
-
this.debounceTime = input(500, ...ngDevMode ? [{ debugName: "debounceTime" }] : /* istanbul ignore next */ []);
|
|
10
|
-
this._destroyRef = inject(DestroyRef);
|
|
11
|
-
this.emitEvent$ = new Subject();
|
|
12
|
-
}
|
|
13
|
-
ngOnInit() {
|
|
14
|
-
this.emitEvent$.pipe(takeUntilDestroyed(this._destroyRef), debounceTime(this.debounceTime()), distinctUntilChanged(), tap((value) => this.emitChange(value))).subscribe();
|
|
15
|
-
}
|
|
16
|
-
emitChange(value) {
|
|
17
|
-
this.emitChanged.emit(value);
|
|
18
|
-
}
|
|
19
|
-
static {
|
|
20
|
-
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
21
|
-
minVersion: "12.0.0",
|
|
22
|
-
version: "22.2.6",
|
|
23
|
-
ngImport: i0,
|
|
24
|
-
type: AbstractDebounceDirective,
|
|
25
|
-
deps: [],
|
|
26
|
-
target: i0.ɵɵFactoryTarget.Directive
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
static {
|
|
30
|
-
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
31
|
-
minVersion: "17.1.0",
|
|
32
|
-
version: "22.2.6",
|
|
33
|
-
type: AbstractDebounceDirective,
|
|
34
|
-
isStandalone: true,
|
|
35
|
-
inputs: { debounceTime: {
|
|
36
|
-
classPropertyName: "debounceTime",
|
|
37
|
-
publicName: "debounceTime",
|
|
38
|
-
isSignal: true,
|
|
39
|
-
isRequired: false,
|
|
40
|
-
transformFunction: null
|
|
41
|
-
} },
|
|
42
|
-
outputs: { emitChanged: "emitChanged" },
|
|
43
|
-
ngImport: i0
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
48
|
-
minVersion: "12.0.0",
|
|
49
|
-
version: "22.2.6",
|
|
50
|
-
ngImport: i0,
|
|
51
|
-
type: AbstractDebounceDirective,
|
|
52
|
-
decorators: [{ type: Directive }],
|
|
53
|
-
ctorParameters: () => [],
|
|
54
|
-
propDecorators: {
|
|
55
|
-
emitChanged: [{
|
|
56
|
-
type: i0.Output,
|
|
57
|
-
args: ["emitChanged"]
|
|
58
|
-
}],
|
|
59
|
-
debounceTime: [{
|
|
60
|
-
type: i0.Input,
|
|
61
|
-
args: [{
|
|
62
|
-
isSignal: true,
|
|
63
|
-
alias: "debounceTime",
|
|
64
|
-
required: false
|
|
65
|
-
}]
|
|
66
|
-
}]
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
var CmatDebounceClickDirective = class CmatDebounceClickDirective extends AbstractDebounceDirective {
|
|
70
|
-
constructor() {
|
|
71
|
-
super();
|
|
72
|
-
}
|
|
73
|
-
onKeyUp(event) {
|
|
74
|
-
event.preventDefault();
|
|
75
|
-
this.emitEvent$.next(event);
|
|
76
|
-
}
|
|
77
|
-
static {
|
|
78
|
-
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
79
|
-
minVersion: "12.0.0",
|
|
80
|
-
version: "22.2.6",
|
|
81
|
-
ngImport: i0,
|
|
82
|
-
type: CmatDebounceClickDirective,
|
|
83
|
-
deps: [],
|
|
84
|
-
target: i0.ɵɵFactoryTarget.Directive
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
static {
|
|
88
|
-
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
89
|
-
minVersion: "14.0.0",
|
|
90
|
-
version: "22.2.6",
|
|
91
|
-
type: CmatDebounceClickDirective,
|
|
92
|
-
isStandalone: true,
|
|
93
|
-
selector: "[cmatDebounceClick]",
|
|
94
|
-
host: { listeners: { "click": "onKeyUp($event)" } },
|
|
95
|
-
usesInheritance: true,
|
|
96
|
-
ngImport: i0
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
101
|
-
minVersion: "12.0.0",
|
|
102
|
-
version: "22.2.6",
|
|
103
|
-
ngImport: i0,
|
|
104
|
-
type: CmatDebounceClickDirective,
|
|
105
|
-
decorators: [{
|
|
106
|
-
type: Directive,
|
|
107
|
-
args: [{ selector: "[cmatDebounceClick]" }]
|
|
108
|
-
}],
|
|
109
|
-
ctorParameters: () => [],
|
|
110
|
-
propDecorators: { onKeyUp: [{
|
|
111
|
-
type: HostListener,
|
|
112
|
-
args: ["click", ["$event"]]
|
|
113
|
-
}] }
|
|
114
|
-
});
|
|
115
|
-
var CmatDebounceKeyupDirective = class CmatDebounceKeyupDirective extends AbstractDebounceDirective {
|
|
116
|
-
constructor() {
|
|
117
|
-
super();
|
|
118
|
-
}
|
|
119
|
-
onKeyUp(event) {
|
|
120
|
-
event.preventDefault();
|
|
121
|
-
this.emitEvent$.next(event);
|
|
122
|
-
}
|
|
123
|
-
static {
|
|
124
|
-
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
125
|
-
minVersion: "12.0.0",
|
|
126
|
-
version: "22.2.6",
|
|
127
|
-
ngImport: i0,
|
|
128
|
-
type: CmatDebounceKeyupDirective,
|
|
129
|
-
deps: [],
|
|
130
|
-
target: i0.ɵɵFactoryTarget.Directive
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
static {
|
|
134
|
-
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
135
|
-
minVersion: "14.0.0",
|
|
136
|
-
version: "22.2.6",
|
|
137
|
-
type: CmatDebounceKeyupDirective,
|
|
138
|
-
isStandalone: true,
|
|
139
|
-
selector: "input,textarea[cmatDebounceKeyup]",
|
|
140
|
-
host: { listeners: { "keyup": "onKeyUp($event)" } },
|
|
141
|
-
usesInheritance: true,
|
|
142
|
-
ngImport: i0
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
147
|
-
minVersion: "12.0.0",
|
|
148
|
-
version: "22.2.6",
|
|
149
|
-
ngImport: i0,
|
|
150
|
-
type: CmatDebounceKeyupDirective,
|
|
151
|
-
decorators: [{
|
|
152
|
-
type: Directive,
|
|
153
|
-
args: [{ selector: "input,textarea[cmatDebounceKeyup]" }]
|
|
154
|
-
}],
|
|
155
|
-
ctorParameters: () => [],
|
|
156
|
-
propDecorators: { onKeyUp: [{
|
|
157
|
-
type: HostListener,
|
|
158
|
-
args: ["keyup", ["$event"]]
|
|
159
|
-
}] }
|
|
160
|
-
});
|
|
161
|
-
export { CmatDebounceClickDirective, CmatDebounceKeyupDirective };
|
|
162
|
-
|
|
163
|
-
//# sourceMappingURL=cmat-directives-debounce.mjs.map
|
|
1
|
+
export { n as CmatDebounceClickDirective, t as CmatDebounceKeyupDirective } from "./public-api-CgtBw-7O.mjs";
|