cmat 0.0.21 → 0.0.23

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.
Files changed (95) hide show
  1. package/components/material-color-picker/base-color.d.ts +1 -0
  2. package/components/select-tree/select-tree.component.d.ts +1 -1
  3. package/fesm2022/cmat-components-adapter.mjs +9 -9
  4. package/fesm2022/cmat-components-breadcrumb.mjs +9 -9
  5. package/fesm2022/cmat-components-card.mjs +4 -4
  6. package/fesm2022/cmat-components-card.mjs.map +1 -1
  7. package/fesm2022/cmat-components-carousel.mjs +12 -12
  8. package/fesm2022/cmat-components-cascade.mjs +9 -9
  9. package/fesm2022/cmat-components-chip-input.mjs +3 -3
  10. package/fesm2022/cmat-components-custom-formly.mjs +94 -94
  11. package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
  12. package/fesm2022/cmat-components-date-range.mjs +3 -3
  13. package/fesm2022/cmat-components-drawer.mjs +6 -6
  14. package/fesm2022/cmat-components-fullscreen.mjs +3 -3
  15. package/fesm2022/cmat-components-highlight.mjs +6 -6
  16. package/fesm2022/cmat-components-image-viewer.mjs +3 -3
  17. package/fesm2022/cmat-components-json-editor.mjs +3 -3
  18. package/fesm2022/cmat-components-knob-input.mjs +3 -3
  19. package/fesm2022/cmat-components-masonry.mjs +3 -3
  20. package/fesm2022/cmat-components-material-color-picker.mjs +16 -4
  21. package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
  22. package/fesm2022/cmat-components-material-datetimepicker.mjs +43 -43
  23. package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
  24. package/fesm2022/cmat-components-navigation.mjs +40 -40
  25. package/fesm2022/cmat-components-navigation.mjs.map +1 -1
  26. package/fesm2022/cmat-components-opt-input.mjs +3 -3
  27. package/fesm2022/cmat-components-org-chart.mjs +9 -9
  28. package/fesm2022/cmat-components-pagination.mjs +15 -13
  29. package/fesm2022/cmat-components-pagination.mjs.map +1 -1
  30. package/fesm2022/cmat-components-password-strength.mjs +9 -9
  31. package/fesm2022/cmat-components-popover.mjs +9 -9
  32. package/fesm2022/cmat-components-progress-bar.mjs +4 -4
  33. package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
  34. package/fesm2022/cmat-components-rating.mjs +3 -3
  35. package/fesm2022/cmat-components-select-search.mjs +9 -9
  36. package/fesm2022/cmat-components-select-table.mjs +4 -4
  37. package/fesm2022/cmat-components-select-table.mjs.map +1 -1
  38. package/fesm2022/cmat-components-select-tree.mjs +6 -6
  39. package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
  40. package/fesm2022/cmat-components-speed-dial.mjs +9 -9
  41. package/fesm2022/cmat-components-timeline.mjs +13 -13
  42. package/fesm2022/cmat-components-timeline.mjs.map +1 -1
  43. package/fesm2022/cmat-components-toast.mjs +9 -9
  44. package/fesm2022/cmat-components-transfer-picker.mjs +19 -19
  45. package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
  46. package/fesm2022/cmat-components-treetable.mjs +6 -6
  47. package/fesm2022/cmat-components-upload.mjs +11 -11
  48. package/fesm2022/cmat-components-upload.mjs.map +1 -1
  49. package/fesm2022/cmat-directives-animate-on-scroll.mjs +9 -11
  50. package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
  51. package/fesm2022/cmat-directives-arrow-cursor.mjs +3 -3
  52. package/fesm2022/cmat-directives-autofocus.mjs +3 -3
  53. package/fesm2022/cmat-directives-data-exporter.mjs +21 -21
  54. package/fesm2022/cmat-directives-debounce.mjs +9 -9
  55. package/fesm2022/cmat-directives-digit-only.mjs +6 -6
  56. package/fesm2022/cmat-directives-equal-validator.mjs +3 -3
  57. package/fesm2022/cmat-lib-mock-api.mjs +6 -6
  58. package/fesm2022/cmat-pipes-bytes.mjs +3 -3
  59. package/fesm2022/cmat-pipes-date-format.mjs +3 -3
  60. package/fesm2022/cmat-pipes-find-by-key.mjs +3 -3
  61. package/fesm2022/cmat-pipes-group-by.mjs +3 -3
  62. package/fesm2022/cmat-pipes-keys.mjs +3 -3
  63. package/fesm2022/cmat-pipes-secure.mjs +3 -3
  64. package/fesm2022/cmat-pipes-uppercase.mjs +3 -3
  65. package/fesm2022/cmat-services-alert.mjs +3 -3
  66. package/fesm2022/cmat-services-config.mjs +6 -6
  67. package/fesm2022/cmat-services-confirmation.mjs +7 -7
  68. package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
  69. package/fesm2022/cmat-services-data.mjs +3 -3
  70. package/fesm2022/cmat-services-export-as.mjs +7 -7
  71. package/fesm2022/cmat-services-export-as.mjs.map +1 -1
  72. package/fesm2022/cmat-services-loading.mjs +6 -6
  73. package/fesm2022/cmat-services-local-storage.mjs +3 -3
  74. package/fesm2022/cmat-services-media-watcher.mjs +3 -3
  75. package/fesm2022/cmat-services-platform.mjs +3 -3
  76. package/fesm2022/cmat-services-splash-screen.mjs +3 -3
  77. package/fesm2022/cmat-services-title.mjs +3 -3
  78. package/fesm2022/cmat-services-translation.mjs +3 -3
  79. package/fesm2022/cmat-services-utils.mjs +3 -3
  80. package/package.json +56 -56
  81. package/styles/components/bundle.scss +23 -25
  82. package/styles/components/input.scss +2 -0
  83. package/styles/overrides/angular-material.scss +75 -59
  84. package/styles/overrides/fullcalendar.scss +3 -1
  85. package/styles/overrides/quill.scss +8 -6
  86. package/styles/tailwind.scss +99 -15
  87. package/styles/user-themes.scss +1 -1
  88. package/tailwind/plugins/helpers.js +16 -0
  89. package/tailwind/plugins/scrollbar/index.js +31 -0
  90. package/tailwind/plugins/scrollbar/typedefs.js +9 -0
  91. package/tailwind/plugins/scrollbar/utilities.js +201 -0
  92. package/tailwind/plugins/scrollbar/variants.js +30 -0
  93. package/tailwind/plugins/theming.js +257 -256
  94. package/tailwind/plugins/utilities.js +12 -25
  95. package/tailwind/utils/json-to-sass-map.js +28 -36
@@ -17,10 +17,10 @@ class CmatGroupByPipe {
17
17
  }, {});
18
18
  return Object.keys(groupedObj).map(key => ({ key, value: groupedObj[key] }));
19
19
  }
20
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatGroupByPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
21
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.1.1", ngImport: i0, type: CmatGroupByPipe, isStandalone: true, name: "cmatGroupBy" }); }
20
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatGroupByPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
21
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.1.7", ngImport: i0, type: CmatGroupByPipe, isStandalone: true, name: "cmatGroupBy" }); }
22
22
  }
23
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatGroupByPipe, decorators: [{
23
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatGroupByPipe, decorators: [{
24
24
  type: Pipe,
25
25
  args: [{
26
26
  name: 'cmatGroupBy',
@@ -14,10 +14,10 @@ class CmatKeysPipe {
14
14
  }
15
15
  return keys;
16
16
  }
17
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatKeysPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
18
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.1.1", ngImport: i0, type: CmatKeysPipe, isStandalone: true, name: "cmatKeys" }); }
17
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatKeysPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
18
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.1.7", ngImport: i0, type: CmatKeysPipe, isStandalone: true, name: "cmatKeys" }); }
19
19
  }
20
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatKeysPipe, decorators: [{
20
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatKeysPipe, decorators: [{
21
21
  type: Pipe,
22
22
  args: [{
23
23
  name: 'cmatKeys',
@@ -34,10 +34,10 @@ class CmatSecurePipe {
34
34
  })
35
35
  .pipe(map((val) => this._sanitizer.bypassSecurityTrustUrl(URL.createObjectURL(val))));
36
36
  }
37
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatSecurePipe, deps: [{ token: i1.HttpClient }, { token: i2.DomSanitizer }, { token: i3.CmatUrlStateConfigService }], target: i0.ɵɵFactoryTarget.Pipe }); }
38
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.1.1", ngImport: i0, type: CmatSecurePipe, isStandalone: true, name: "cmatSecure" }); }
37
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatSecurePipe, deps: [{ token: i1.HttpClient }, { token: i2.DomSanitizer }, { token: i3.CmatUrlStateConfigService }], target: i0.ɵɵFactoryTarget.Pipe }); }
38
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.1.7", ngImport: i0, type: CmatSecurePipe, isStandalone: true, name: "cmatSecure" }); }
39
39
  }
40
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatSecurePipe, decorators: [{
40
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatSecurePipe, decorators: [{
41
41
  type: Pipe,
42
42
  args: [{
43
43
  name: 'cmatSecure',
@@ -5,10 +5,10 @@ class CmatUppercasePipe {
5
5
  transform(value) {
6
6
  return value.toUpperCase();
7
7
  }
8
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatUppercasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
9
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.1.1", ngImport: i0, type: CmatUppercasePipe, isStandalone: true, name: "cmatUppercase" }); }
8
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatUppercasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
9
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.1.7", ngImport: i0, type: CmatUppercasePipe, isStandalone: true, name: "cmatUppercase" }); }
10
10
  }
11
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatUppercasePipe, decorators: [{
11
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatUppercasePipe, decorators: [{
12
12
  type: Pipe,
13
13
  args: [{
14
14
  name: 'cmatUppercase',
@@ -190,10 +190,10 @@ class CmatAlertService {
190
190
  this._messages.next({ severity: severity, summary: summary, detail: detail, isPostionBottom: isPostionBottom });
191
191
  }
192
192
  }
193
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatAlertService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
194
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatAlertService, providedIn: 'root' }); }
193
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatAlertService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
194
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatAlertService, providedIn: 'root' }); }
195
195
  }
196
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatAlertService, decorators: [{
196
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatAlertService, decorators: [{
197
197
  type: Injectable,
198
198
  args: [{
199
199
  providedIn: 'root'
@@ -22,10 +22,10 @@ class CmatConfigService {
22
22
  // Set the config
23
23
  this._config.next(this.config);
24
24
  }
25
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatConfigService, deps: [{ token: CMAT_APP_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable }); }
26
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatConfigService, providedIn: 'root' }); }
25
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatConfigService, deps: [{ token: CMAT_APP_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable }); }
26
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatConfigService, providedIn: 'root' }); }
27
27
  }
28
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatConfigService, decorators: [{
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatConfigService, decorators: [{
29
29
  type: Injectable,
30
30
  args: [{
31
31
  providedIn: 'root'
@@ -51,10 +51,10 @@ class CmatUrlStateConfigService {
51
51
  // Execute the observable
52
52
  this._config.next(config);
53
53
  }
54
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatUrlStateConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
55
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatUrlStateConfigService, providedIn: 'root' }); }
54
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatUrlStateConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
55
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatUrlStateConfigService, providedIn: 'root' }); }
56
56
  }
57
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatUrlStateConfigService, decorators: [{
57
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatUrlStateConfigService, decorators: [{
58
58
  type: Injectable,
59
59
  args: [{
60
60
  providedIn: 'root'
@@ -14,12 +14,12 @@ class CmatConfirmationDialogComponent {
14
14
  this.data = data;
15
15
  this.matDialogRef = matDialogRef;
16
16
  }
17
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatConfirmationDialogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component }); }
18
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.1", type: CmatConfirmationDialogComponent, isStandalone: true, selector: "cmat-confirmation-dialog", ngImport: i0, template: "<div class=\"relative flex flex-col w-full h-full\">\r\n\r\n <!-- Dismiss button -->\r\n @if (data.dismissible) {\r\n <div class=\"absolute top-0 right-0 pt-4 pr-4\">\r\n <button type=\"button\" mat-icon-button [matDialogClose]=\"undefined\">\r\n <mat-icon class=\"text-secondary\" [svgIcon]=\"'heroicons_outline:x-mark'\"></mat-icon>\r\n </button>\r\n </div>\r\n }\r\n\r\n <!-- Content -->\r\n <div class=\"flex flex-col sm:flex-row items-center sm:items-start p-8 pb-6 sm:pb-8\">\r\n\r\n <!-- Icon -->\r\n @if (data.icon?.show) {\r\n <div class=\"flex flex-0 items-center justify-center w-10 h-10 sm:mr-4 rounded-full\" [ngClass]=\"{'text-primary-600 bg-primary-100 dark:text-primary-50 dark:bg-primary-600': data.icon?.color === 'primary',\r\n 'text-accent-600 bg-accent-100 dark:text-accent-50 dark:bg-accent-600': data.icon?.color === 'accent',\r\n 'text-warn-600 bg-warn-100 dark:text-warn-50 dark:bg-warn-600': data.icon?.color === 'warn',\r\n 'text-slate-600 bg-slate-100 dark:text-slate-50 dark:bg-slate-600': data.icon?.color === 'basic',\r\n 'text-blue-600 bg-blue-100 dark:text-blue-50 dark:bg-blue-600': data.icon?.color === 'info',\r\n 'text-emerald-500 bg-emerald-100 dark:text-emerald-50 dark:bg-emerald-500': data.icon?.color === 'success',\r\n 'text-amber-500 bg-amber-100 dark:text-amber-50 dark:bg-amber-500': data.icon?.color === 'warning',\r\n 'text-red-600 bg-red-100 dark:text-red-50 dark:bg-red-600': data.icon?.color === 'error'\r\n }\">\r\n @if (data.icon?.name) {\r\n <mat-icon class=\"text-current\" [svgIcon]=\"data.icon?.name||''\"></mat-icon>\r\n }\r\n </div>\r\n }\r\n\r\n @if (data.title || data.message) {\r\n <div\r\n class=\"flex flex-col items-center sm:items-start mt-4 sm:mt-0 sm:pr-8 space-y-1 text-center sm:text-left\">\r\n <!-- Title -->\r\n @if (data.title) {\r\n <div class=\"text-xl leading-6 font-medium\" [innerHTML]=\"data.title\"></div>\r\n }\r\n <!-- Message -->\r\n @if (data.message) {\r\n <div class=\"text-secondary\" [innerHTML]=\"data.message\"></div>\r\n }\r\n </div>\r\n }\r\n\r\n </div>\r\n\r\n <!-- Actions -->\r\n @if (data.actions?.confirm?.show || data.actions?.cancel?.show) {\r\n <div\r\n class=\"flex items-center justify-center sm:justify-end px-6 py-4 space-x-3 bg-slate-50 dark:bg-black dark:bg-opacity-10\">\r\n <!-- Confirm -->\r\n @if (data.actions?.confirm?.show) {\r\n <button type=\"button\" mat-flat-button [color]=\"data.actions?.confirm?.color\"\r\n [matDialogClose]=\"'confirmed'\">\r\n {{data.actions?.confirm?.label}}\r\n </button>\r\n }\r\n <!-- Cancel -->\r\n @if (data.actions?.cancel?.show) {\r\n <button type=\"button\" mat-stroked-button [matDialogClose]=\"'cancelled'\">\r\n {{data.actions?.cancel?.label}}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n</div>", styles: [".cmat-confirmation-dialog-panel .mat-mdc-dialog-container{padding:0!important}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], encapsulation: i0.ViewEncapsulation.None }); }
17
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatConfirmationDialogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component }); }
18
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: CmatConfirmationDialogComponent, isStandalone: true, selector: "cmat-confirmation-dialog", ngImport: i0, template: "<div class=\"relative flex flex-col w-full h-full\">\r\n\r\n <!-- Dismiss button -->\r\n @if (data.dismissible) {\r\n <div class=\"absolute top-0 right-0 pt-4 pr-4\">\r\n <button type=\"button\" mat-icon-button [matDialogClose]=\"undefined\">\r\n <mat-icon class=\"text-secondary\" [svgIcon]=\"'heroicons_outline:x-mark'\"></mat-icon>\r\n </button>\r\n </div>\r\n }\r\n\r\n <!-- Content -->\r\n <div class=\"flex flex-col sm:flex-row items-center sm:items-start p-8 pb-6 sm:pb-8\">\r\n\r\n <!-- Icon -->\r\n @if (data.icon?.show) {\r\n <div class=\"flex flex-0 items-center justify-center w-10 h-10 sm:mr-4 rounded-full\" [ngClass]=\"{'text-primary-600 bg-primary-100 dark:text-primary-50 dark:bg-primary-600': data.icon?.color === 'primary',\r\n 'text-accent-600 bg-accent-100 dark:text-accent-50 dark:bg-accent-600': data.icon?.color === 'accent',\r\n 'text-warn-600 bg-warn-100 dark:text-warn-50 dark:bg-warn-600': data.icon?.color === 'warn',\r\n 'text-slate-600 bg-slate-100 dark:text-slate-50 dark:bg-slate-600': data.icon?.color === 'basic',\r\n 'text-blue-600 bg-blue-100 dark:text-blue-50 dark:bg-blue-600': data.icon?.color === 'info',\r\n 'text-emerald-500 bg-emerald-100 dark:text-emerald-50 dark:bg-emerald-500': data.icon?.color === 'success',\r\n 'text-amber-500 bg-amber-100 dark:text-amber-50 dark:bg-amber-500': data.icon?.color === 'warning',\r\n 'text-red-600 bg-red-100 dark:text-red-50 dark:bg-red-600': data.icon?.color === 'error'\r\n }\">\r\n @if (data.icon?.name) {\r\n <mat-icon class=\"text-current\" [svgIcon]=\"data.icon?.name||''\"></mat-icon>\r\n }\r\n </div>\r\n }\r\n\r\n @if (data.title || data.message) {\r\n <div\r\n class=\"flex flex-col items-center sm:items-start mt-4 sm:mt-0 sm:pr-8 gap-1 text-center sm:text-left\">\r\n <!-- Title -->\r\n @if (data.title) {\r\n <div class=\"text-xl leading-6 font-medium\" [innerHTML]=\"data.title\"></div>\r\n }\r\n <!-- Message -->\r\n @if (data.message) {\r\n <div class=\"text-secondary\" [innerHTML]=\"data.message\"></div>\r\n }\r\n </div>\r\n }\r\n\r\n </div>\r\n\r\n <!-- Actions -->\r\n @if (data.actions?.confirm?.show || data.actions?.cancel?.show) {\r\n <div\r\n class=\"flex items-center justify-center sm:justify-end px-6 py-4 flex-row gap-3 bg-slate-50 dark:bg-black/10\">\r\n <!-- Confirm -->\r\n @if (data.actions?.confirm?.show) {\r\n <button type=\"button\" mat-flat-button [color]=\"data.actions?.confirm?.color\"\r\n [matDialogClose]=\"'confirmed'\">\r\n {{data.actions?.confirm?.label}}\r\n </button>\r\n }\r\n <!-- Cancel -->\r\n @if (data.actions?.cancel?.show) {\r\n <button type=\"button\" mat-stroked-button [matDialogClose]=\"'cancelled'\">\r\n {{data.actions?.cancel?.label}}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n</div>", styles: [".cmat-confirmation-dialog-panel .mat-mdc-dialog-container{padding:0!important}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], encapsulation: i0.ViewEncapsulation.None }); }
19
19
  }
20
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatConfirmationDialogComponent, decorators: [{
20
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatConfirmationDialogComponent, decorators: [{
21
21
  type: Component,
22
- args: [{ selector: 'cmat-confirmation-dialog', encapsulation: ViewEncapsulation.None, imports: [MatButtonModule, MatDialogModule, MatIconModule, NgClass], template: "<div class=\"relative flex flex-col w-full h-full\">\r\n\r\n <!-- Dismiss button -->\r\n @if (data.dismissible) {\r\n <div class=\"absolute top-0 right-0 pt-4 pr-4\">\r\n <button type=\"button\" mat-icon-button [matDialogClose]=\"undefined\">\r\n <mat-icon class=\"text-secondary\" [svgIcon]=\"'heroicons_outline:x-mark'\"></mat-icon>\r\n </button>\r\n </div>\r\n }\r\n\r\n <!-- Content -->\r\n <div class=\"flex flex-col sm:flex-row items-center sm:items-start p-8 pb-6 sm:pb-8\">\r\n\r\n <!-- Icon -->\r\n @if (data.icon?.show) {\r\n <div class=\"flex flex-0 items-center justify-center w-10 h-10 sm:mr-4 rounded-full\" [ngClass]=\"{'text-primary-600 bg-primary-100 dark:text-primary-50 dark:bg-primary-600': data.icon?.color === 'primary',\r\n 'text-accent-600 bg-accent-100 dark:text-accent-50 dark:bg-accent-600': data.icon?.color === 'accent',\r\n 'text-warn-600 bg-warn-100 dark:text-warn-50 dark:bg-warn-600': data.icon?.color === 'warn',\r\n 'text-slate-600 bg-slate-100 dark:text-slate-50 dark:bg-slate-600': data.icon?.color === 'basic',\r\n 'text-blue-600 bg-blue-100 dark:text-blue-50 dark:bg-blue-600': data.icon?.color === 'info',\r\n 'text-emerald-500 bg-emerald-100 dark:text-emerald-50 dark:bg-emerald-500': data.icon?.color === 'success',\r\n 'text-amber-500 bg-amber-100 dark:text-amber-50 dark:bg-amber-500': data.icon?.color === 'warning',\r\n 'text-red-600 bg-red-100 dark:text-red-50 dark:bg-red-600': data.icon?.color === 'error'\r\n }\">\r\n @if (data.icon?.name) {\r\n <mat-icon class=\"text-current\" [svgIcon]=\"data.icon?.name||''\"></mat-icon>\r\n }\r\n </div>\r\n }\r\n\r\n @if (data.title || data.message) {\r\n <div\r\n class=\"flex flex-col items-center sm:items-start mt-4 sm:mt-0 sm:pr-8 space-y-1 text-center sm:text-left\">\r\n <!-- Title -->\r\n @if (data.title) {\r\n <div class=\"text-xl leading-6 font-medium\" [innerHTML]=\"data.title\"></div>\r\n }\r\n <!-- Message -->\r\n @if (data.message) {\r\n <div class=\"text-secondary\" [innerHTML]=\"data.message\"></div>\r\n }\r\n </div>\r\n }\r\n\r\n </div>\r\n\r\n <!-- Actions -->\r\n @if (data.actions?.confirm?.show || data.actions?.cancel?.show) {\r\n <div\r\n class=\"flex items-center justify-center sm:justify-end px-6 py-4 space-x-3 bg-slate-50 dark:bg-black dark:bg-opacity-10\">\r\n <!-- Confirm -->\r\n @if (data.actions?.confirm?.show) {\r\n <button type=\"button\" mat-flat-button [color]=\"data.actions?.confirm?.color\"\r\n [matDialogClose]=\"'confirmed'\">\r\n {{data.actions?.confirm?.label}}\r\n </button>\r\n }\r\n <!-- Cancel -->\r\n @if (data.actions?.cancel?.show) {\r\n <button type=\"button\" mat-stroked-button [matDialogClose]=\"'cancelled'\">\r\n {{data.actions?.cancel?.label}}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n</div>", styles: [".cmat-confirmation-dialog-panel .mat-mdc-dialog-container{padding:0!important}\n"] }]
22
+ args: [{ selector: 'cmat-confirmation-dialog', encapsulation: ViewEncapsulation.None, imports: [MatButtonModule, MatDialogModule, MatIconModule, NgClass], template: "<div class=\"relative flex flex-col w-full h-full\">\r\n\r\n <!-- Dismiss button -->\r\n @if (data.dismissible) {\r\n <div class=\"absolute top-0 right-0 pt-4 pr-4\">\r\n <button type=\"button\" mat-icon-button [matDialogClose]=\"undefined\">\r\n <mat-icon class=\"text-secondary\" [svgIcon]=\"'heroicons_outline:x-mark'\"></mat-icon>\r\n </button>\r\n </div>\r\n }\r\n\r\n <!-- Content -->\r\n <div class=\"flex flex-col sm:flex-row items-center sm:items-start p-8 pb-6 sm:pb-8\">\r\n\r\n <!-- Icon -->\r\n @if (data.icon?.show) {\r\n <div class=\"flex flex-0 items-center justify-center w-10 h-10 sm:mr-4 rounded-full\" [ngClass]=\"{'text-primary-600 bg-primary-100 dark:text-primary-50 dark:bg-primary-600': data.icon?.color === 'primary',\r\n 'text-accent-600 bg-accent-100 dark:text-accent-50 dark:bg-accent-600': data.icon?.color === 'accent',\r\n 'text-warn-600 bg-warn-100 dark:text-warn-50 dark:bg-warn-600': data.icon?.color === 'warn',\r\n 'text-slate-600 bg-slate-100 dark:text-slate-50 dark:bg-slate-600': data.icon?.color === 'basic',\r\n 'text-blue-600 bg-blue-100 dark:text-blue-50 dark:bg-blue-600': data.icon?.color === 'info',\r\n 'text-emerald-500 bg-emerald-100 dark:text-emerald-50 dark:bg-emerald-500': data.icon?.color === 'success',\r\n 'text-amber-500 bg-amber-100 dark:text-amber-50 dark:bg-amber-500': data.icon?.color === 'warning',\r\n 'text-red-600 bg-red-100 dark:text-red-50 dark:bg-red-600': data.icon?.color === 'error'\r\n }\">\r\n @if (data.icon?.name) {\r\n <mat-icon class=\"text-current\" [svgIcon]=\"data.icon?.name||''\"></mat-icon>\r\n }\r\n </div>\r\n }\r\n\r\n @if (data.title || data.message) {\r\n <div\r\n class=\"flex flex-col items-center sm:items-start mt-4 sm:mt-0 sm:pr-8 gap-1 text-center sm:text-left\">\r\n <!-- Title -->\r\n @if (data.title) {\r\n <div class=\"text-xl leading-6 font-medium\" [innerHTML]=\"data.title\"></div>\r\n }\r\n <!-- Message -->\r\n @if (data.message) {\r\n <div class=\"text-secondary\" [innerHTML]=\"data.message\"></div>\r\n }\r\n </div>\r\n }\r\n\r\n </div>\r\n\r\n <!-- Actions -->\r\n @if (data.actions?.confirm?.show || data.actions?.cancel?.show) {\r\n <div\r\n class=\"flex items-center justify-center sm:justify-end px-6 py-4 flex-row gap-3 bg-slate-50 dark:bg-black/10\">\r\n <!-- Confirm -->\r\n @if (data.actions?.confirm?.show) {\r\n <button type=\"button\" mat-flat-button [color]=\"data.actions?.confirm?.color\"\r\n [matDialogClose]=\"'confirmed'\">\r\n {{data.actions?.confirm?.label}}\r\n </button>\r\n }\r\n <!-- Cancel -->\r\n @if (data.actions?.cancel?.show) {\r\n <button type=\"button\" mat-stroked-button [matDialogClose]=\"'cancelled'\">\r\n {{data.actions?.cancel?.label}}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n</div>", styles: [".cmat-confirmation-dialog-panel .mat-mdc-dialog-container{padding:0!important}\n"] }]
23
23
  }], ctorParameters: () => [{ type: undefined, decorators: [{
24
24
  type: Inject,
25
25
  args: [MAT_DIALOG_DATA]
@@ -61,10 +61,10 @@ class CmatConfirmationService {
61
61
  panelClass: 'cmat-confirmation-dialog-panel'
62
62
  });
63
63
  }
64
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatConfirmationService, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable }); }
65
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatConfirmationService, providedIn: 'root' }); }
64
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatConfirmationService, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable }); }
65
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatConfirmationService, providedIn: 'root' }); }
66
66
  }
67
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatConfirmationService, decorators: [{
67
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatConfirmationService, decorators: [{
68
68
  type: Injectable,
69
69
  args: [{
70
70
  providedIn: 'root'
@@ -1 +1 @@
1
- {"version":3,"file":"cmat-services-confirmation.mjs","sources":["../../../projects/cmat/services/confirmation/dialog/dialog.component.ts","../../../projects/cmat/services/confirmation/dialog/dialog.component.html","../../../projects/cmat/services/confirmation/confirmation.service.ts","../../../projects/cmat/services/confirmation/cmat-services-confirmation.ts"],"sourcesContent":["import { NgClass } from '@angular/common';\r\nimport { Component, Inject, ViewEncapsulation } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MAT_DIALOG_DATA, MatDialogRef, MatDialogModule } from '@angular/material/dialog';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { CmatConfirmationConfig } from '../confirmation.types';\r\n\r\n@Component({\r\n selector: 'cmat-confirmation-dialog',\r\n templateUrl: './dialog.component.html',\r\n styles: [\r\n /* language=SCSS */\r\n `\r\n .cmat-confirmation-dialog-panel {\r\n .mat-mdc-dialog-container {\r\n padding: 0 !important;\r\n }\r\n }\r\n `\r\n ],\r\n encapsulation: ViewEncapsulation.None,\r\n imports: [MatButtonModule, MatDialogModule, MatIconModule, NgClass]\r\n})\r\nexport class CmatConfirmationDialogComponent {\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public data: CmatConfirmationConfig,\r\n public matDialogRef: MatDialogRef<CmatConfirmationDialogComponent>\r\n ) {\r\n }\r\n}\r\n","<div class=\"relative flex flex-col w-full h-full\">\r\n\r\n <!-- Dismiss button -->\r\n @if (data.dismissible) {\r\n <div class=\"absolute top-0 right-0 pt-4 pr-4\">\r\n <button type=\"button\" mat-icon-button [matDialogClose]=\"undefined\">\r\n <mat-icon class=\"text-secondary\" [svgIcon]=\"'heroicons_outline:x-mark'\"></mat-icon>\r\n </button>\r\n </div>\r\n }\r\n\r\n <!-- Content -->\r\n <div class=\"flex flex-col sm:flex-row items-center sm:items-start p-8 pb-6 sm:pb-8\">\r\n\r\n <!-- Icon -->\r\n @if (data.icon?.show) {\r\n <div class=\"flex flex-0 items-center justify-center w-10 h-10 sm:mr-4 rounded-full\" [ngClass]=\"{'text-primary-600 bg-primary-100 dark:text-primary-50 dark:bg-primary-600': data.icon?.color === 'primary',\r\n 'text-accent-600 bg-accent-100 dark:text-accent-50 dark:bg-accent-600': data.icon?.color === 'accent',\r\n 'text-warn-600 bg-warn-100 dark:text-warn-50 dark:bg-warn-600': data.icon?.color === 'warn',\r\n 'text-slate-600 bg-slate-100 dark:text-slate-50 dark:bg-slate-600': data.icon?.color === 'basic',\r\n 'text-blue-600 bg-blue-100 dark:text-blue-50 dark:bg-blue-600': data.icon?.color === 'info',\r\n 'text-emerald-500 bg-emerald-100 dark:text-emerald-50 dark:bg-emerald-500': data.icon?.color === 'success',\r\n 'text-amber-500 bg-amber-100 dark:text-amber-50 dark:bg-amber-500': data.icon?.color === 'warning',\r\n 'text-red-600 bg-red-100 dark:text-red-50 dark:bg-red-600': data.icon?.color === 'error'\r\n }\">\r\n @if (data.icon?.name) {\r\n <mat-icon class=\"text-current\" [svgIcon]=\"data.icon?.name||''\"></mat-icon>\r\n }\r\n </div>\r\n }\r\n\r\n @if (data.title || data.message) {\r\n <div\r\n class=\"flex flex-col items-center sm:items-start mt-4 sm:mt-0 sm:pr-8 space-y-1 text-center sm:text-left\">\r\n <!-- Title -->\r\n @if (data.title) {\r\n <div class=\"text-xl leading-6 font-medium\" [innerHTML]=\"data.title\"></div>\r\n }\r\n <!-- Message -->\r\n @if (data.message) {\r\n <div class=\"text-secondary\" [innerHTML]=\"data.message\"></div>\r\n }\r\n </div>\r\n }\r\n\r\n </div>\r\n\r\n <!-- Actions -->\r\n @if (data.actions?.confirm?.show || data.actions?.cancel?.show) {\r\n <div\r\n class=\"flex items-center justify-center sm:justify-end px-6 py-4 space-x-3 bg-slate-50 dark:bg-black dark:bg-opacity-10\">\r\n <!-- Confirm -->\r\n @if (data.actions?.confirm?.show) {\r\n <button type=\"button\" mat-flat-button [color]=\"data.actions?.confirm?.color\"\r\n [matDialogClose]=\"'confirmed'\">\r\n {{data.actions?.confirm?.label}}\r\n </button>\r\n }\r\n <!-- Cancel -->\r\n @if (data.actions?.cancel?.show) {\r\n <button type=\"button\" mat-stroked-button [matDialogClose]=\"'cancelled'\">\r\n {{data.actions?.cancel?.label}}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n</div>","import { Injectable } from '@angular/core';\r\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\r\nimport { merge } from 'lodash-es';\r\nimport { CmatConfirmationConfig } from './confirmation.types';\r\nimport { CmatConfirmationDialogComponent } from './dialog/dialog.component';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatConfirmationService {\r\n private _defaultConfig: CmatConfirmationConfig = {\r\n title: '确认动作',\r\n message: '确认此动作吗?',\r\n icon: {\r\n show: true,\r\n name: 'heroicons_outline:exclamation-triangle',\r\n color: 'warn'\r\n },\r\n actions: {\r\n confirm: {\r\n show: true,\r\n label: '确认',\r\n color: 'warn'\r\n },\r\n cancel: {\r\n show: true,\r\n label: '取消'\r\n }\r\n },\r\n dismissible: false\r\n };\r\n\r\n constructor(private _matDialog: MatDialog) {\r\n\r\n }\r\n\r\n open(config: CmatConfirmationConfig = {}): MatDialogRef<CmatConfirmationDialogComponent> {\r\n // Merge the user config with the default config\r\n const userConfig = merge({}, this._defaultConfig, config);\r\n\r\n // Open the dialog\r\n return this._matDialog.open(CmatConfirmationDialogComponent, {\r\n autoFocus: false,\r\n disableClose: !userConfig.dismissible,\r\n data: userConfig,\r\n panelClass: 'cmat-confirmation-dialog-panel'\r\n });\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MAuBa,+BAA+B,CAAA;IAExC,WACoC,CAAA,IAA4B,EACrD,YAA2D,EAAA;QADlC,IAAI,CAAA,IAAA,GAAJ,IAAI;QAC7B,IAAY,CAAA,YAAA,GAAZ,YAAY;;AAJd,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CA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,uBAAuB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,SAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAvB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,cAFpB,MAAM,EAAA,CAAA,CAAA;;2FAET,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAHnC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE;AACf,iBAAA;;;ACRD;;AAEG;;;;"}
1
+ {"version":3,"file":"cmat-services-confirmation.mjs","sources":["../../../projects/cmat/services/confirmation/dialog/dialog.component.ts","../../../projects/cmat/services/confirmation/dialog/dialog.component.html","../../../projects/cmat/services/confirmation/confirmation.service.ts","../../../projects/cmat/services/confirmation/cmat-services-confirmation.ts"],"sourcesContent":["import { NgClass } from '@angular/common';\r\nimport { Component, Inject, ViewEncapsulation } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MAT_DIALOG_DATA, MatDialogRef, MatDialogModule } from '@angular/material/dialog';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { CmatConfirmationConfig } from '../confirmation.types';\r\n\r\n@Component({\r\n selector: 'cmat-confirmation-dialog',\r\n templateUrl: './dialog.component.html',\r\n styles: [\r\n /* language=SCSS */\r\n `\r\n .cmat-confirmation-dialog-panel {\r\n .mat-mdc-dialog-container {\r\n padding: 0 !important;\r\n }\r\n }\r\n `\r\n ],\r\n encapsulation: ViewEncapsulation.None,\r\n imports: [MatButtonModule, MatDialogModule, MatIconModule, NgClass]\r\n})\r\nexport class CmatConfirmationDialogComponent {\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public data: CmatConfirmationConfig,\r\n public matDialogRef: MatDialogRef<CmatConfirmationDialogComponent>\r\n ) {\r\n }\r\n}\r\n","<div class=\"relative flex flex-col w-full h-full\">\r\n\r\n <!-- Dismiss button -->\r\n @if (data.dismissible) {\r\n <div class=\"absolute top-0 right-0 pt-4 pr-4\">\r\n <button type=\"button\" mat-icon-button [matDialogClose]=\"undefined\">\r\n <mat-icon class=\"text-secondary\" [svgIcon]=\"'heroicons_outline:x-mark'\"></mat-icon>\r\n </button>\r\n </div>\r\n }\r\n\r\n <!-- Content -->\r\n <div class=\"flex flex-col sm:flex-row items-center sm:items-start p-8 pb-6 sm:pb-8\">\r\n\r\n <!-- Icon -->\r\n @if (data.icon?.show) {\r\n <div class=\"flex flex-0 items-center justify-center w-10 h-10 sm:mr-4 rounded-full\" [ngClass]=\"{'text-primary-600 bg-primary-100 dark:text-primary-50 dark:bg-primary-600': data.icon?.color === 'primary',\r\n 'text-accent-600 bg-accent-100 dark:text-accent-50 dark:bg-accent-600': data.icon?.color === 'accent',\r\n 'text-warn-600 bg-warn-100 dark:text-warn-50 dark:bg-warn-600': data.icon?.color === 'warn',\r\n 'text-slate-600 bg-slate-100 dark:text-slate-50 dark:bg-slate-600': data.icon?.color === 'basic',\r\n 'text-blue-600 bg-blue-100 dark:text-blue-50 dark:bg-blue-600': data.icon?.color === 'info',\r\n 'text-emerald-500 bg-emerald-100 dark:text-emerald-50 dark:bg-emerald-500': data.icon?.color === 'success',\r\n 'text-amber-500 bg-amber-100 dark:text-amber-50 dark:bg-amber-500': data.icon?.color === 'warning',\r\n 'text-red-600 bg-red-100 dark:text-red-50 dark:bg-red-600': data.icon?.color === 'error'\r\n }\">\r\n @if (data.icon?.name) {\r\n <mat-icon class=\"text-current\" [svgIcon]=\"data.icon?.name||''\"></mat-icon>\r\n }\r\n </div>\r\n }\r\n\r\n @if (data.title || data.message) {\r\n <div\r\n class=\"flex flex-col items-center sm:items-start mt-4 sm:mt-0 sm:pr-8 gap-1 text-center sm:text-left\">\r\n <!-- Title -->\r\n @if (data.title) {\r\n <div class=\"text-xl leading-6 font-medium\" [innerHTML]=\"data.title\"></div>\r\n }\r\n <!-- Message -->\r\n @if (data.message) {\r\n <div class=\"text-secondary\" [innerHTML]=\"data.message\"></div>\r\n }\r\n </div>\r\n }\r\n\r\n </div>\r\n\r\n <!-- Actions -->\r\n @if (data.actions?.confirm?.show || data.actions?.cancel?.show) {\r\n <div\r\n class=\"flex items-center justify-center sm:justify-end px-6 py-4 flex-row gap-3 bg-slate-50 dark:bg-black/10\">\r\n <!-- Confirm -->\r\n @if (data.actions?.confirm?.show) {\r\n <button type=\"button\" mat-flat-button [color]=\"data.actions?.confirm?.color\"\r\n [matDialogClose]=\"'confirmed'\">\r\n {{data.actions?.confirm?.label}}\r\n </button>\r\n }\r\n <!-- Cancel -->\r\n @if (data.actions?.cancel?.show) {\r\n <button type=\"button\" mat-stroked-button [matDialogClose]=\"'cancelled'\">\r\n {{data.actions?.cancel?.label}}\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n</div>","import { Injectable } from '@angular/core';\r\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\r\nimport { merge } from 'lodash-es';\r\nimport { CmatConfirmationConfig } from './confirmation.types';\r\nimport { CmatConfirmationDialogComponent } from './dialog/dialog.component';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatConfirmationService {\r\n private _defaultConfig: CmatConfirmationConfig = {\r\n title: '确认动作',\r\n message: '确认此动作吗?',\r\n icon: {\r\n show: true,\r\n name: 'heroicons_outline:exclamation-triangle',\r\n color: 'warn'\r\n },\r\n actions: {\r\n confirm: {\r\n show: true,\r\n label: '确认',\r\n color: 'warn'\r\n },\r\n cancel: {\r\n show: true,\r\n label: '取消'\r\n }\r\n },\r\n dismissible: false\r\n };\r\n\r\n constructor(private _matDialog: MatDialog) {\r\n\r\n }\r\n\r\n open(config: CmatConfirmationConfig = {}): MatDialogRef<CmatConfirmationDialogComponent> {\r\n // Merge the user config with the default config\r\n const userConfig = merge({}, this._defaultConfig, config);\r\n\r\n // Open the dialog\r\n return this._matDialog.open(CmatConfirmationDialogComponent, {\r\n autoFocus: false,\r\n disableClose: !userConfig.dismissible,\r\n data: userConfig,\r\n panelClass: 'cmat-confirmation-dialog-panel'\r\n });\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MAuBa,+BAA+B,CAAA;IAExC,WACoC,CAAA,IAA4B,EACrD,YAA2D,EAAA;QADlC,IAAI,CAAA,IAAA,GAAJ,IAAI;QAC7B,IAAY,CAAA,YAAA,GAAZ,YAAY;;AAJd,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,+BAA+B,kBAG5B,eAAe,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,YAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAHlB,+BAA+B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECvB5C,yoGAmEM,ED9CQ,MAAA,EAAA,CAAA,kFAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,eAAe,wUAAE,eAAe,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,cAAA,EAAA,QAAA,EAAA,sCAAA,EAAA,MAAA,EAAA,CAAA,YAAA,EAAA,MAAA,EAAA,kBAAA,EAAA,gBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,aAA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AAA,MAAM,EAAE;AACJ,oBAAA,IAAI,EAAE,IAAI;AACV,oBAAA,KAAK,EAAE;AACV;AACJ,aAAA;AACD,YAAA,WAAW,EAAE;SAChB;;IAMD,IAAI,CAAC,SAAiC,EAAE,EAAA;;AAEpC,QAAA,MAAM,UAAU,GAAG,KAAK,CAAC,EAAE,EAAE,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC;;AAGzD,QAAA,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,+BAA+B,EAAE;AACzD,YAAA,SAAS,EAAE,KAAK;AAChB,YAAA,YAAY,EAAE,CAAC,UAAU,CAAC,WAAW;AACrC,YAAA,IAAI,EAAE,UAAU;AAChB,YAAA,UAAU,EAAE;AACf,SAAA,CAAC;;8GArCG,uBAAuB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,SAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAvB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,cAFpB,MAAM,EAAA,CAAA,CAAA;;2FAET,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAHnC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE;AACf,iBAAA;;;ACRD;;AAEG;;;;"}
@@ -158,10 +158,10 @@ class CmatDataService {
158
158
  .pipe(tap((res) => res), catchError((err) => CmatUtilsService.handleError(err)));
159
159
  }
160
160
  }
161
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatDataService, deps: [{ token: i1.HttpClient }, { token: i2.CmatUrlStateConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
162
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatDataService, providedIn: 'root' }); }
161
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatDataService, deps: [{ token: i1.HttpClient }, { token: i2.CmatUrlStateConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
162
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatDataService, providedIn: 'root' }); }
163
163
  }
164
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatDataService, decorators: [{
164
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatDataService, decorators: [{
165
165
  type: Injectable,
166
166
  args: [{
167
167
  providedIn: 'root'
@@ -99,7 +99,7 @@ class CmatExportAsService {
99
99
  const csvContent = 'data:text/csv;base64,' + this._btoa(csv.join('\n'));
100
100
  if (config.download) {
101
101
  this.downloadFromDataURL(config.fileName, csvContent);
102
- observer.next();
102
+ observer.next(null);
103
103
  }
104
104
  else {
105
105
  observer.next(csvContent);
@@ -122,7 +122,7 @@ class CmatExportAsService {
122
122
  const xlsContent = 'data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,' + out;
123
123
  if (config.download) {
124
124
  this.downloadFromDataURL(config.fileName, xlsContent);
125
- observer.next();
125
+ observer.next(null);
126
126
  }
127
127
  else {
128
128
  observer.next(xlsContent);
@@ -155,7 +155,7 @@ class CmatExportAsService {
155
155
  const dataStr = 'data:text/json;base64,' + jsonBase64;
156
156
  if (config.download) {
157
157
  this.downloadFromDataURL(config.fileName, dataStr);
158
- observer.next();
158
+ observer.next(null);
159
159
  }
160
160
  else {
161
161
  observer.next(data);
@@ -182,7 +182,7 @@ class CmatExportAsService {
182
182
  const base64 = 'data:text/xml;base64,' + this._btoa(xml);
183
183
  if (config.download) {
184
184
  this.downloadFromDataURL(config.fileName, base64);
185
- observer.next();
185
+ observer.next(null);
186
186
  }
187
187
  else {
188
188
  observer.next(base64);
@@ -193,10 +193,10 @@ class CmatExportAsService {
193
193
  _btoa(content) {
194
194
  return Buffer.from(content.toString(), 'utf-8').toString('base64');
195
195
  }
196
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatExportAsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
197
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatExportAsService, providedIn: 'root' }); }
196
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatExportAsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
197
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatExportAsService, providedIn: 'root' }); }
198
198
  }
199
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatExportAsService, decorators: [{
199
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatExportAsService, decorators: [{
200
200
  type: Injectable,
201
201
  args: [{
202
202
  providedIn: 'root'
@@ -1 +1 @@
1
- {"version":3,"file":"cmat-services-export-as.mjs","sources":["../../../projects/cmat/services/export-as/export-as.service.ts","../../../projects/cmat/services/export-as/cmat-services-export-as.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\nimport * as FileSaver from 'file-saver-es';\r\nimport { Observable } from 'rxjs';\r\nimport * as XLSX from 'xlsx';\r\nimport { ExportAsConfig } from './export-as-config.model';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatExportAsService {\r\n /**\r\n * Main base64 get method, it will return the file as base64 string\r\n * @param config your config\r\n */\r\n get(config: ExportAsConfig): Observable<any> {\r\n switch (config.type.toUpperCase()) {\r\n case 'CSV':\r\n return this._getCSV(config);\r\n case 'TXT':\r\n return this._getTXT(config);\r\n case 'XLS':\r\n return this._getXLS(config);\r\n case 'XLSX':\r\n return this._getXLSX(config);\r\n case 'JSON':\r\n return this._getJSON(config);\r\n case 'XML':\r\n return this._getXML(config);\r\n default:\r\n return new Observable((observer) => { observer.error('导出格式不支持.'); });\r\n }\r\n }\r\n\r\n /**\r\n * Save exported file in old javascript way\r\n * @param config your custom config\r\n * @param fileName Name of the file to be saved as\r\n */\r\n save(config: ExportAsConfig, fileName: string): Observable<string | null> {\r\n // set download\r\n config.download = true;\r\n // get file name with type\r\n config.fileName = fileName + '.' + config.type;\r\n return this.get(config);\r\n }\r\n\r\n /**\r\n * Converts content string to blob object\r\n * @param content string to be converted\r\n */\r\n contentToBlob(content: string): Observable<Blob> {\r\n return new Observable((observer) => {\r\n // get content string and extract mime type\r\n const arr = content.split(','), mime = (/:(.*?);/.exec(arr[0]))?.[1],\r\n bstr = atob(arr[1]);\r\n let n = bstr.length;\r\n const u8arr = new Uint8Array(n);\r\n while (n--) {\r\n u8arr[n] = bstr.charCodeAt(n);\r\n }\r\n observer.next(new Blob([u8arr], { type: mime }));\r\n observer.complete();\r\n });\r\n }\r\n\r\n /**\r\n * Removes base64 file type from a string like \"data:text/csv;base64,\"\r\n * @param fileContent the base64 string to remove the type from\r\n */\r\n removeFileTypeFromBase64(fileContent: string): string {\r\n const re = /^data:[^]*;base64,/g;\r\n const newContent: string = re[Symbol.replace](fileContent, '');\r\n return newContent;\r\n }\r\n\r\n /**\r\n * Structure the base64 file content with the file type string\r\n * @param fileContent file content\r\n * @param fileMime file mime type \"text/csv\"\r\n */\r\n addFileTypeToBase64(fileContent: string, fileMime: string): string {\r\n return `data:${fileMime};base64,${fileContent}`;\r\n }\r\n\r\n downloadFromDataURL(fileName: string, dataURL: string): void {\r\n // create blob\r\n this.contentToBlob(dataURL).subscribe((blob) => {\r\n // download the blob\r\n this.downloadFromBlob(blob, fileName);\r\n });\r\n }\r\n\r\n downloadFromBlob(blob: Blob, fileName: string): void {\r\n FileSaver.saveAs(blob, fileName);\r\n }\r\n\r\n private _getCSV(config: ExportAsConfig): Observable<string | null> {\r\n return new Observable((observer) => {\r\n const element: HTMLElement | null = document.getElementById(config.elementIdOrContent);\r\n let csv: string[] = [];\r\n const rows: any = element?.querySelectorAll('table tr');\r\n rows.forEach((rowElement: { querySelectorAll: (arg0: string) => any; }) => {\r\n let row: string[] = [];\r\n const cols = rowElement.querySelectorAll('td, th');\r\n\r\n cols.array.forEach((col: { innerText: string; }) => {\r\n row.push('\"' + col.innerText + '\"');\r\n });\r\n csv.push(row.join(','));\r\n });\r\n\r\n const csvContent = 'data:text/csv;base64,' + this._btoa(csv.join('\\n'));\r\n if (config.download) {\r\n this.downloadFromDataURL(config.fileName, csvContent);\r\n observer.next();\r\n } else {\r\n observer.next(csvContent);\r\n }\r\n observer.complete();\r\n });\r\n }\r\n\r\n private _getTXT(config: ExportAsConfig): Observable<string | null> {\r\n const nameFrags = config.fileName?.split('.');\r\n config.fileName = `${nameFrags?.[0]}.txt`;\r\n return this._getCSV(config);\r\n }\r\n\r\n private _getXLS(config: ExportAsConfig): Observable<string | null> {\r\n return new Observable((observer) => {\r\n const element: HTMLElement | null = document.getElementById(config.elementIdOrContent);\r\n const ws3 = XLSX.utils.table_to_sheet(element, config.options);\r\n const wb = XLSX.utils.book_new();\r\n XLSX.utils.book_append_sheet(wb, ws3, config.fileName);\r\n const out = XLSX.write(wb, { type: 'base64' });\r\n const xlsContent = 'data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,' + out;\r\n if (config.download) {\r\n this.downloadFromDataURL(config.fileName, xlsContent);\r\n observer.next();\r\n } else {\r\n observer.next(xlsContent);\r\n }\r\n observer.complete();\r\n });\r\n }\r\n\r\n private _getXLSX(config: ExportAsConfig): Observable<string | null> {\r\n return this._getXLS(config);\r\n }\r\n\r\n\r\n private _getJSON(config: ExportAsConfig): Observable<any[] | null> {\r\n return new Observable((observer) => {\r\n const data = []; // first row needs fto be headers\r\n const headers = [];\r\n const table = document.getElementById(config.elementIdOrContent) as HTMLTableElement;\r\n for (let index = 0; index < table.rows[0].cells.length; index++) {\r\n headers[index] = table.rows[0].cells[index].innerHTML.toLowerCase().replace(/ /gi, '');\r\n }\r\n // go through cells\r\n for (let i = 1; i < table.rows.length; i++) {\r\n const tableRow = table.rows[i];\r\n let rowData: Record<string, string> = {};\r\n for (let j = 0; j < tableRow.cells.length; j++) {\r\n rowData[headers[j]] = tableRow.cells[j].innerHTML;\r\n }\r\n data.push(rowData);\r\n }\r\n const jsonString = JSON.stringify(data);\r\n const jsonBase64 = this._btoa(jsonString);\r\n const dataStr = 'data:text/json;base64,' + jsonBase64;\r\n if (config.download) {\r\n this.downloadFromDataURL(config.fileName, dataStr);\r\n observer.next();\r\n } else {\r\n observer.next(data);\r\n }\r\n observer.complete();\r\n });\r\n }\r\n\r\n private _getXML(config: ExportAsConfig): Observable<string | null> {\r\n return new Observable((observer) => {\r\n let xml = '<?xml version=\"1.0\" encoding=\"UTF-8\"?><Root><Classes>';\r\n const tritem = document.getElementById(config.elementIdOrContent)?.getElementsByTagName('tr');\r\n\r\n if (tritem) {\r\n Array.from(tritem).forEach((celldata) => {\r\n if (celldata.cells.length > 0) {\r\n xml += '<Class name=\"' + celldata.cells[0].textContent + '\">\\n';\r\n for (let m = 1; m < celldata.cells.length; ++m) {\r\n xml += '\\t<data>' + celldata.cells[m].textContent + '</data>\\n';\r\n }\r\n xml += '</Class>\\n';\r\n }\r\n });\r\n\r\n }\r\n\r\n xml += '</Classes></Root>';\r\n const base64 = 'data:text/xml;base64,' + this._btoa(xml);\r\n if (config.download) {\r\n this.downloadFromDataURL(config.fileName, base64);\r\n observer.next();\r\n } else {\r\n observer.next(base64);\r\n }\r\n observer.complete();\r\n });\r\n }\r\n\r\n private _btoa(content: string): string {\r\n return Buffer.from(content.toString(), 'utf-8').toString('base64')\r\n }\r\n\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MASa,mBAAmB,CAAA;AAC5B;;;AAGG;AACH,IAAA,GAAG,CAAC,MAAsB,EAAA;AACtB,QAAA,QAAQ,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE;AAC7B,YAAA,KAAK,KAAK;AACN,gBAAA,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;AAC/B,YAAA,KAAK,KAAK;AACN,gBAAA,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;AAC/B,YAAA,KAAK,KAAK;AACN,gBAAA,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;AAC/B,YAAA,KAAK,MAAM;AACP,gBAAA,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;AAChC,YAAA,KAAK,MAAM;AACP,gBAAA,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;AAChC,YAAA,KAAK,KAAK;AACN,gBAAA,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;AAC/B,YAAA;AACI,gBAAA,OAAO,IAAI,UAAU,CAAC,CAAC,QAAQ,KAAO,EAAA,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC;;;AAIhF;;;;AAIG;IACH,IAAI,CAAC,MAAsB,EAAE,QAAgB,EAAA;;AAEzC,QAAA,MAAM,CAAC,QAAQ,GAAG,IAAI;;QAEtB,MAAM,CAAC,QAAQ,GAAG,QAAQ,GAAG,GAAG,GAAG,MAAM,CAAC,IAAI;AAC9C,QAAA,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC;;AAG3B;;;AAGG;AACH,IAAA,aAAa,CAAC,OAAe,EAAA;AACzB,QAAA,OAAO,IAAI,UAAU,CAAC,CAAC,QAAQ,KAAI;;AAE/B,YAAA,MAAM,G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,QAAA,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;;8GA3M7D,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAnB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,cAFhB,MAAM,EAAA,CAAA,CAAA;;2FAET,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAH/B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE;AACf,iBAAA;;;ACRD;;AAEG;;;;"}
1
+ {"version":3,"file":"cmat-services-export-as.mjs","sources":["../../../projects/cmat/services/export-as/export-as.service.ts","../../../projects/cmat/services/export-as/cmat-services-export-as.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\nimport * as FileSaver from 'file-saver-es';\r\nimport { Observable } from 'rxjs';\r\nimport * as XLSX from 'xlsx';\r\nimport { ExportAsConfig } from './export-as-config.model';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatExportAsService {\r\n /**\r\n * Main base64 get method, it will return the file as base64 string\r\n * @param config your config\r\n */\r\n get(config: ExportAsConfig): Observable<any> {\r\n switch (config.type.toUpperCase()) {\r\n case 'CSV':\r\n return this._getCSV(config);\r\n case 'TXT':\r\n return this._getTXT(config);\r\n case 'XLS':\r\n return this._getXLS(config);\r\n case 'XLSX':\r\n return this._getXLSX(config);\r\n case 'JSON':\r\n return this._getJSON(config);\r\n case 'XML':\r\n return this._getXML(config);\r\n default:\r\n return new Observable((observer) => { observer.error('导出格式不支持.'); });\r\n }\r\n }\r\n\r\n /**\r\n * Save exported file in old javascript way\r\n * @param config your custom config\r\n * @param fileName Name of the file to be saved as\r\n */\r\n save(config: ExportAsConfig, fileName: string): Observable<string | null> {\r\n // set download\r\n config.download = true;\r\n // get file name with type\r\n config.fileName = fileName + '.' + config.type;\r\n return this.get(config);\r\n }\r\n\r\n /**\r\n * Converts content string to blob object\r\n * @param content string to be converted\r\n */\r\n contentToBlob(content: string): Observable<Blob> {\r\n return new Observable((observer) => {\r\n // get content string and extract mime type\r\n const arr = content.split(','), mime = (/:(.*?);/.exec(arr[0]))?.[1],\r\n bstr = atob(arr[1]);\r\n let n = bstr.length;\r\n const u8arr = new Uint8Array(n);\r\n while (n--) {\r\n u8arr[n] = bstr.charCodeAt(n);\r\n }\r\n observer.next(new Blob([u8arr], { type: mime }));\r\n observer.complete();\r\n });\r\n }\r\n\r\n /**\r\n * Removes base64 file type from a string like \"data:text/csv;base64,\"\r\n * @param fileContent the base64 string to remove the type from\r\n */\r\n removeFileTypeFromBase64(fileContent: string): string {\r\n const re = /^data:[^]*;base64,/g;\r\n const newContent: string = re[Symbol.replace](fileContent, '');\r\n return newContent;\r\n }\r\n\r\n /**\r\n * Structure the base64 file content with the file type string\r\n * @param fileContent file content\r\n * @param fileMime file mime type \"text/csv\"\r\n */\r\n addFileTypeToBase64(fileContent: string, fileMime: string): string {\r\n return `data:${fileMime};base64,${fileContent}`;\r\n }\r\n\r\n downloadFromDataURL(fileName: string, dataURL: string): void {\r\n // create blob\r\n this.contentToBlob(dataURL).subscribe((blob) => {\r\n // download the blob\r\n this.downloadFromBlob(blob, fileName);\r\n });\r\n }\r\n\r\n downloadFromBlob(blob: Blob, fileName: string): void {\r\n FileSaver.saveAs(blob, fileName);\r\n }\r\n\r\n private _getCSV(config: ExportAsConfig): Observable<string | null> {\r\n return new Observable((observer) => {\r\n const element: HTMLElement | null = document.getElementById(config.elementIdOrContent);\r\n let csv: string[] = [];\r\n const rows: any = element?.querySelectorAll('table tr');\r\n rows.forEach((rowElement: { querySelectorAll: (arg0: string) => any; }) => {\r\n let row: string[] = [];\r\n const cols = rowElement.querySelectorAll('td, th');\r\n\r\n cols.array.forEach((col: { innerText: string; }) => {\r\n row.push('\"' + col.innerText + '\"');\r\n });\r\n csv.push(row.join(','));\r\n });\r\n\r\n const csvContent = 'data:text/csv;base64,' + this._btoa(csv.join('\\n'));\r\n if (config.download) {\r\n this.downloadFromDataURL(config.fileName, csvContent);\r\n observer.next(null);\r\n } else {\r\n observer.next(csvContent);\r\n }\r\n observer.complete();\r\n });\r\n }\r\n\r\n private _getTXT(config: ExportAsConfig): Observable<string | null> {\r\n const nameFrags = config.fileName?.split('.');\r\n config.fileName = `${nameFrags?.[0]}.txt`;\r\n return this._getCSV(config);\r\n }\r\n\r\n private _getXLS(config: ExportAsConfig): Observable<string | null> {\r\n return new Observable((observer) => {\r\n const element: HTMLElement | null = document.getElementById(config.elementIdOrContent);\r\n const ws3 = XLSX.utils.table_to_sheet(element, config.options);\r\n const wb = XLSX.utils.book_new();\r\n XLSX.utils.book_append_sheet(wb, ws3, config.fileName);\r\n const out = XLSX.write(wb, { type: 'base64' });\r\n const xlsContent = 'data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,' + out;\r\n if (config.download) {\r\n this.downloadFromDataURL(config.fileName, xlsContent);\r\n observer.next(null);\r\n } else {\r\n observer.next(xlsContent);\r\n }\r\n observer.complete();\r\n });\r\n }\r\n\r\n private _getXLSX(config: ExportAsConfig): Observable<string | null> {\r\n return this._getXLS(config);\r\n }\r\n\r\n\r\n private _getJSON(config: ExportAsConfig): Observable<any[] | null> {\r\n return new Observable((observer) => {\r\n const data = []; // first row needs fto be headers\r\n const headers = [];\r\n const table = document.getElementById(config.elementIdOrContent) as HTMLTableElement;\r\n for (let index = 0; index < table.rows[0].cells.length; index++) {\r\n headers[index] = table.rows[0].cells[index].innerHTML.toLowerCase().replace(/ /gi, '');\r\n }\r\n // go through cells\r\n for (let i = 1; i < table.rows.length; i++) {\r\n const tableRow = table.rows[i];\r\n let rowData: Record<string, string> = {};\r\n for (let j = 0; j < tableRow.cells.length; j++) {\r\n rowData[headers[j]] = tableRow.cells[j].innerHTML;\r\n }\r\n data.push(rowData);\r\n }\r\n const jsonString = JSON.stringify(data);\r\n const jsonBase64 = this._btoa(jsonString);\r\n const dataStr = 'data:text/json;base64,' + jsonBase64;\r\n if (config.download) {\r\n this.downloadFromDataURL(config.fileName, dataStr);\r\n observer.next(null);\r\n } else {\r\n observer.next(data);\r\n }\r\n observer.complete();\r\n });\r\n }\r\n\r\n private _getXML(config: ExportAsConfig): Observable<string | null> {\r\n return new Observable((observer) => {\r\n let xml = '<?xml version=\"1.0\" encoding=\"UTF-8\"?><Root><Classes>';\r\n const tritem = document.getElementById(config.elementIdOrContent)?.getElementsByTagName('tr');\r\n\r\n if (tritem) {\r\n Array.from(tritem).forEach((celldata) => {\r\n if (celldata.cells.length > 0) {\r\n xml += '<Class name=\"' + celldata.cells[0].textContent + '\">\\n';\r\n for (let m = 1; m < celldata.cells.length; ++m) {\r\n xml += '\\t<data>' + celldata.cells[m].textContent + '</data>\\n';\r\n }\r\n xml += '</Class>\\n';\r\n }\r\n });\r\n\r\n }\r\n\r\n xml += '</Classes></Root>';\r\n const base64 = 'data:text/xml;base64,' + this._btoa(xml);\r\n if (config.download) {\r\n this.downloadFromDataURL(config.fileName, base64);\r\n observer.next(null);\r\n } else {\r\n observer.next(base64);\r\n }\r\n observer.complete();\r\n });\r\n }\r\n\r\n private _btoa(content: string): string {\r\n return Buffer.from(content.toString(), 'utf-8').toString('base64')\r\n }\r\n\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MASa,mBAAmB,CAAA;AAC5B;;;AAGG;AACH,IAAA,GAAG,CAAC,MAAsB,EAAA;AACtB,QAAA,QAAQ,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE;AAC7B,YAAA,KAAK,KAAK;AACN,gBAAA,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM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AA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,cAFhB,MAAM,EAAA,CAAA,CAAA;;2FAET,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAH/B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE;AACf,iBAAA;;;ACRD;;AAEG;;;;"}
@@ -61,10 +61,10 @@ class CmatLoadingService {
61
61
  this._show$.next(false);
62
62
  }
63
63
  }
64
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatLoadingService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
65
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatLoadingService, providedIn: 'root' }); }
64
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatLoadingService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
65
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatLoadingService, providedIn: 'root' }); }
66
66
  }
67
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatLoadingService, decorators: [{
67
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatLoadingService, decorators: [{
68
68
  type: Injectable,
69
69
  args: [{
70
70
  providedIn: 'root'
@@ -89,10 +89,10 @@ class CmatLoadingInterceptor {
89
89
  this._cmatLoadingService.setLoadingStatus(false, req.url);
90
90
  }));
91
91
  }
92
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatLoadingInterceptor, deps: [{ token: CmatLoadingService }], target: i0.ɵɵFactoryTarget.Injectable }); }
93
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatLoadingInterceptor }); }
92
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatLoadingInterceptor, deps: [{ token: CmatLoadingService }], target: i0.ɵɵFactoryTarget.Injectable }); }
93
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatLoadingInterceptor }); }
94
94
  }
95
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatLoadingInterceptor, decorators: [{
95
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatLoadingInterceptor, decorators: [{
96
96
  type: Injectable
97
97
  }], ctorParameters: () => [{ type: CmatLoadingService }] });
98
98
 
@@ -11,10 +11,10 @@ class CmatLocalStorageService {
11
11
  removeItem(key) {
12
12
  localStorage.removeItem(key);
13
13
  }
14
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatLocalStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
15
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatLocalStorageService, providedIn: 'root' }); }
14
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatLocalStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
15
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatLocalStorageService, providedIn: 'root' }); }
16
16
  }
17
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatLocalStorageService, decorators: [{
17
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatLocalStorageService, decorators: [{
18
18
  type: Injectable,
19
19
  args: [{
20
20
  providedIn: 'root'
@@ -44,10 +44,10 @@ class CmatMediaWatcherService {
44
44
  onMediaQueryChange$(query) {
45
45
  return this._breakpointObserver.observe(query);
46
46
  }
47
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatMediaWatcherService, deps: [{ token: i1.BreakpointObserver }, { token: i2.CmatConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
48
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatMediaWatcherService, providedIn: 'root' }); }
47
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatMediaWatcherService, deps: [{ token: i1.BreakpointObserver }, { token: i2.CmatConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
48
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatMediaWatcherService, providedIn: 'root' }); }
49
49
  }
50
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatMediaWatcherService, decorators: [{
50
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatMediaWatcherService, decorators: [{
51
51
  type: Injectable,
52
52
  args: [{
53
53
  providedIn: 'root'
@@ -35,10 +35,10 @@ class CmatPlatformService {
35
35
  this.osName = 'os-android';
36
36
  }
37
37
  }
38
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatPlatformService, deps: [{ token: i1.Platform }], target: i0.ɵɵFactoryTarget.Injectable }); }
39
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatPlatformService, providedIn: 'root' }); }
38
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatPlatformService, deps: [{ token: i1.Platform }], target: i0.ɵɵFactoryTarget.Injectable }); }
39
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatPlatformService, providedIn: 'root' }); }
40
40
  }
41
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatPlatformService, decorators: [{
41
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatPlatformService, decorators: [{
42
42
  type: Injectable,
43
43
  args: [{
44
44
  providedIn: 'root'
@@ -28,10 +28,10 @@ class CmatSplashScreenService {
28
28
  hide() {
29
29
  this._document.body.classList.add('cmat-splash-screen-hidden');
30
30
  }
31
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatSplashScreenService, deps: [{ token: DOCUMENT }, { token: i1.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
32
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatSplashScreenService, providedIn: 'root' }); }
31
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatSplashScreenService, deps: [{ token: DOCUMENT }, { token: i1.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
32
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatSplashScreenService, providedIn: 'root' }); }
33
33
  }
34
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatSplashScreenService, decorators: [{
34
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatSplashScreenService, decorators: [{
35
35
  type: Injectable,
36
36
  args: [{
37
37
  providedIn: 'root'
@@ -35,10 +35,10 @@ class CmatTitleService {
35
35
  }
36
36
  });
37
37
  }
38
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatTitleService, deps: [{ token: i1.Title }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
39
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatTitleService, providedIn: 'root' }); }
38
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatTitleService, deps: [{ token: i1.Title }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
39
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatTitleService, providedIn: 'root' }); }
40
40
  }
41
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatTitleService, decorators: [{
41
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatTitleService, decorators: [{
42
42
  type: Injectable,
43
43
  args: [{
44
44
  providedIn: 'root'
@@ -51,10 +51,10 @@ class CmatTranslationService {
51
51
  getTranslationAsync(key, interpolateParams) {
52
52
  return this._translate.get(key, interpolateParams);
53
53
  }
54
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatTranslationService, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable }); }
55
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatTranslationService, providedIn: 'root' }); }
54
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatTranslationService, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable }); }
55
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatTranslationService, providedIn: 'root' }); }
56
56
  }
57
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatTranslationService, decorators: [{
57
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatTranslationService, decorators: [{
58
58
  type: Injectable,
59
59
  args: [{
60
60
  providedIn: 'root'
@@ -456,10 +456,10 @@ class CmatUtilsService {
456
456
  }
457
457
  return id;
458
458
  }
459
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatUtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
460
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatUtilsService, providedIn: 'root' }); }
459
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatUtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
460
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatUtilsService, providedIn: 'root' }); }
461
461
  }
462
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: CmatUtilsService, decorators: [{
462
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: CmatUtilsService, decorators: [{
463
463
  type: Injectable,
464
464
  args: [{
465
465
  providedIn: 'root'