cmat 0.0.111 → 0.0.112

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 (256) hide show
  1. package/fesm2022/cmat-components-adapter.mjs +531 -536
  2. package/fesm2022/cmat-components-adapter.mjs.map +1 -1
  3. package/fesm2022/cmat-components-breadcrumb.mjs +521 -356
  4. package/fesm2022/cmat-components-breadcrumb.mjs.map +1 -1
  5. package/fesm2022/cmat-components-card.mjs +150 -42
  6. package/fesm2022/cmat-components-card.mjs.map +1 -1
  7. package/fesm2022/cmat-components-carousel.mjs +1120 -629
  8. package/fesm2022/cmat-components-carousel.mjs.map +1 -1
  9. package/fesm2022/cmat-components-cascade.mjs +861 -441
  10. package/fesm2022/cmat-components-cascade.mjs.map +1 -1
  11. package/fesm2022/cmat-components-chip-input.mjs +580 -335
  12. package/fesm2022/cmat-components-chip-input.mjs.map +1 -1
  13. package/fesm2022/cmat-components-code-editor.mjs +197 -105
  14. package/fesm2022/cmat-components-code-editor.mjs.map +1 -1
  15. package/fesm2022/cmat-components-color-picker.mjs +1762 -825
  16. package/fesm2022/cmat-components-color-picker.mjs.map +1 -1
  17. package/fesm2022/cmat-components-custom-formly.mjs +5196 -2531
  18. package/fesm2022/cmat-components-custom-formly.mjs.map +1 -1
  19. package/fesm2022/cmat-components-data-picker.mjs +1901 -1073
  20. package/fesm2022/cmat-components-data-picker.mjs.map +1 -1
  21. package/fesm2022/cmat-components-date-range.mjs +701 -456
  22. package/fesm2022/cmat-components-date-range.mjs.map +1 -1
  23. package/fesm2022/cmat-components-date-time-display.mjs +137 -30
  24. package/fesm2022/cmat-components-date-time-display.mjs.map +1 -1
  25. package/fesm2022/cmat-components-drawer.mjs +410 -258
  26. package/fesm2022/cmat-components-drawer.mjs.map +1 -1
  27. package/fesm2022/cmat-components-empty-state.mjs +201 -41
  28. package/fesm2022/cmat-components-empty-state.mjs.map +1 -1
  29. package/fesm2022/cmat-components-file-preview.mjs +198 -35
  30. package/fesm2022/cmat-components-file-preview.mjs.map +1 -1
  31. package/fesm2022/cmat-components-filter-toolbar.mjs +320 -72
  32. package/fesm2022/cmat-components-filter-toolbar.mjs.map +1 -1
  33. package/fesm2022/cmat-components-form-actions.mjs +102 -26
  34. package/fesm2022/cmat-components-form-actions.mjs.map +1 -1
  35. package/fesm2022/cmat-components-fullscreen.mjs +167 -47
  36. package/fesm2022/cmat-components-fullscreen.mjs.map +1 -1
  37. package/fesm2022/cmat-components-highlight.mjs +203 -112
  38. package/fesm2022/cmat-components-highlight.mjs.map +1 -1
  39. package/fesm2022/cmat-components-image-viewer.mjs +489 -215
  40. package/fesm2022/cmat-components-image-viewer.mjs.map +1 -1
  41. package/fesm2022/cmat-components-inline-loading.mjs +117 -27
  42. package/fesm2022/cmat-components-inline-loading.mjs.map +1 -1
  43. package/fesm2022/cmat-components-json-editor.mjs +276 -230
  44. package/fesm2022/cmat-components-json-editor.mjs.map +1 -1
  45. package/fesm2022/cmat-components-knob-input.mjs +615 -420
  46. package/fesm2022/cmat-components-knob-input.mjs.map +1 -1
  47. package/fesm2022/cmat-components-loading-overlay.mjs +53 -25
  48. package/fesm2022/cmat-components-loading-overlay.mjs.map +1 -1
  49. package/fesm2022/cmat-components-masonry.mjs +120 -40
  50. package/fesm2022/cmat-components-masonry.mjs.map +1 -1
  51. package/fesm2022/cmat-components-material-color-picker.mjs +332 -155
  52. package/fesm2022/cmat-components-material-color-picker.mjs.map +1 -1
  53. package/fesm2022/cmat-components-material-datetimepicker.mjs +4283 -2504
  54. package/fesm2022/cmat-components-material-datetimepicker.mjs.map +1 -1
  55. package/fesm2022/cmat-components-navigation.mjs +3080 -1404
  56. package/fesm2022/cmat-components-navigation.mjs.map +1 -1
  57. package/fesm2022/cmat-components-opt-input.mjs +540 -466
  58. package/fesm2022/cmat-components-opt-input.mjs.map +1 -1
  59. package/fesm2022/cmat-components-org-chart.mjs +528 -125
  60. package/fesm2022/cmat-components-org-chart.mjs.map +1 -1
  61. package/fesm2022/cmat-components-page-header.mjs +141 -32
  62. package/fesm2022/cmat-components-page-header.mjs.map +1 -1
  63. package/fesm2022/cmat-components-pagination.mjs +866 -534
  64. package/fesm2022/cmat-components-pagination.mjs.map +1 -1
  65. package/fesm2022/cmat-components-password-strength.mjs +873 -434
  66. package/fesm2022/cmat-components-password-strength.mjs.map +1 -1
  67. package/fesm2022/cmat-components-popover.mjs +1012 -731
  68. package/fesm2022/cmat-components-popover.mjs.map +1 -1
  69. package/fesm2022/cmat-components-progress-bar.mjs +98 -35
  70. package/fesm2022/cmat-components-progress-bar.mjs.map +1 -1
  71. package/fesm2022/cmat-components-qrcode.mjs +463 -287
  72. package/fesm2022/cmat-components-qrcode.mjs.map +1 -1
  73. package/fesm2022/cmat-components-rating.mjs +377 -203
  74. package/fesm2022/cmat-components-rating.mjs.map +1 -1
  75. package/fesm2022/cmat-components-rich-text-editor.mjs +153 -39
  76. package/fesm2022/cmat-components-rich-text-editor.mjs.map +1 -1
  77. package/fesm2022/cmat-components-select-search.mjs +926 -496
  78. package/fesm2022/cmat-components-select-search.mjs.map +1 -1
  79. package/fesm2022/cmat-components-select-table.mjs +1280 -842
  80. package/fesm2022/cmat-components-select-table.mjs.map +1 -1
  81. package/fesm2022/cmat-components-select-tree.mjs +998 -690
  82. package/fesm2022/cmat-components-select-tree.mjs.map +1 -1
  83. package/fesm2022/cmat-components-skeleton.mjs +143 -57
  84. package/fesm2022/cmat-components-skeleton.mjs.map +1 -1
  85. package/fesm2022/cmat-components-speed-dial.mjs +457 -303
  86. package/fesm2022/cmat-components-speed-dial.mjs.map +1 -1
  87. package/fesm2022/cmat-components-status-tag.mjs +136 -44
  88. package/fesm2022/cmat-components-status-tag.mjs.map +1 -1
  89. package/fesm2022/cmat-components-table-toolbar.mjs +120 -28
  90. package/fesm2022/cmat-components-table-toolbar.mjs.map +1 -1
  91. package/fesm2022/cmat-components-timeline.mjs +464 -168
  92. package/fesm2022/cmat-components-timeline.mjs.map +1 -1
  93. package/fesm2022/cmat-components-toast.mjs +346 -262
  94. package/fesm2022/cmat-components-toast.mjs.map +1 -1
  95. package/fesm2022/cmat-components-transfer-picker.mjs +1427 -593
  96. package/fesm2022/cmat-components-transfer-picker.mjs.map +1 -1
  97. package/fesm2022/cmat-components-treetable.mjs +372 -112
  98. package/fesm2022/cmat-components-treetable.mjs.map +1 -1
  99. package/fesm2022/cmat-components-upload.mjs +904 -410
  100. package/fesm2022/cmat-components-upload.mjs.map +1 -1
  101. package/fesm2022/cmat-components-x6-angular-shape.mjs +153 -170
  102. package/fesm2022/cmat-components-x6-angular-shape.mjs.map +1 -1
  103. package/fesm2022/cmat-directives-animate-on-scroll.mjs +220 -138
  104. package/fesm2022/cmat-directives-animate-on-scroll.mjs.map +1 -1
  105. package/fesm2022/cmat-directives-arrow-cursor.mjs +246 -193
  106. package/fesm2022/cmat-directives-arrow-cursor.mjs.map +1 -1
  107. package/fesm2022/cmat-directives-autofocus.mjs +43 -25
  108. package/fesm2022/cmat-directives-autofocus.mjs.map +1 -1
  109. package/fesm2022/cmat-directives-data-exporter.mjs +537 -338
  110. package/fesm2022/cmat-directives-data-exporter.mjs.map +1 -1
  111. package/fesm2022/cmat-directives-debounce.mjs +162 -76
  112. package/fesm2022/cmat-directives-debounce.mjs.map +1 -1
  113. package/fesm2022/cmat-directives-digit-only.mjs +457 -356
  114. package/fesm2022/cmat-directives-digit-only.mjs.map +1 -1
  115. package/fesm2022/cmat-directives-equal-validator.mjs +70 -53
  116. package/fesm2022/cmat-directives-equal-validator.mjs.map +1 -1
  117. package/fesm2022/cmat-directives-seamless-auto-scroll.mjs +180 -132
  118. package/fesm2022/cmat-directives-seamless-auto-scroll.mjs.map +1 -1
  119. package/fesm2022/cmat-lib-mock-api.mjs +207 -195
  120. package/fesm2022/cmat-lib-mock-api.mjs.map +1 -1
  121. package/fesm2022/cmat-pipes-bytes.mjs +50 -30
  122. package/fesm2022/cmat-pipes-bytes.mjs.map +1 -1
  123. package/fesm2022/cmat-pipes-date-format.mjs +41 -25
  124. package/fesm2022/cmat-pipes-date-format.mjs.map +1 -1
  125. package/fesm2022/cmat-pipes-find-by-key.mjs +44 -26
  126. package/fesm2022/cmat-pipes-find-by-key.mjs.map +1 -1
  127. package/fesm2022/cmat-pipes-group-by.mjs +50 -38
  128. package/fesm2022/cmat-pipes-group-by.mjs.map +1 -1
  129. package/fesm2022/cmat-pipes-keys.mjs +44 -31
  130. package/fesm2022/cmat-pipes-keys.mjs.map +1 -1
  131. package/fesm2022/cmat-pipes-secure.mjs +60 -49
  132. package/fesm2022/cmat-pipes-secure.mjs.map +1 -1
  133. package/fesm2022/cmat-pipes-uppercase.mjs +39 -22
  134. package/fesm2022/cmat-pipes-uppercase.mjs.map +1 -1
  135. package/fesm2022/cmat-reports.mjs +2751 -0
  136. package/fesm2022/cmat-reports.mjs.map +1 -0
  137. package/fesm2022/cmat-services-alert.mjs +249 -277
  138. package/fesm2022/cmat-services-alert.mjs.map +1 -1
  139. package/fesm2022/cmat-services-config.mjs +110 -81
  140. package/fesm2022/cmat-services-config.mjs.map +1 -1
  141. package/fesm2022/cmat-services-confirmation.mjs +184 -73
  142. package/fesm2022/cmat-services-confirmation.mjs.map +1 -1
  143. package/fesm2022/cmat-services-data.mjs +136 -125
  144. package/fesm2022/cmat-services-data.mjs.map +1 -1
  145. package/fesm2022/cmat-services-export-as.mjs +165 -183
  146. package/fesm2022/cmat-services-export-as.mjs.map +1 -1
  147. package/fesm2022/cmat-services-loading.mjs +116 -95
  148. package/fesm2022/cmat-services-loading.mjs.map +1 -1
  149. package/fesm2022/cmat-services-local-storage.mjs +75 -66
  150. package/fesm2022/cmat-services-local-storage.mjs.map +1 -1
  151. package/fesm2022/cmat-services-media-watcher.mjs +69 -64
  152. package/fesm2022/cmat-services-media-watcher.mjs.map +1 -1
  153. package/fesm2022/cmat-services-platform.mjs +48 -45
  154. package/fesm2022/cmat-services-platform.mjs.map +1 -1
  155. package/fesm2022/cmat-services-print.mjs +984 -1109
  156. package/fesm2022/cmat-services-print.mjs.map +1 -1
  157. package/fesm2022/cmat-services-splash-screen.mjs +53 -38
  158. package/fesm2022/cmat-services-splash-screen.mjs.map +1 -1
  159. package/fesm2022/cmat-services-title.mjs +57 -47
  160. package/fesm2022/cmat-services-title.mjs.map +1 -1
  161. package/fesm2022/cmat-services-translation.mjs +79 -68
  162. package/fesm2022/cmat-services-translation.mjs.map +1 -1
  163. package/fesm2022/cmat-services-utils.mjs +424 -517
  164. package/fesm2022/cmat-services-utils.mjs.map +1 -1
  165. package/fesm2022/cmat-validators.mjs +23 -33
  166. package/fesm2022/cmat-validators.mjs.map +1 -1
  167. package/fesm2022/cmat-version.mjs +12 -16
  168. package/fesm2022/cmat-version.mjs.map +1 -1
  169. package/fesm2022/cmat.mjs +39805 -22511
  170. package/fesm2022/cmat.mjs.map +1 -1
  171. package/package.json +5 -1
  172. package/types/cmat-components-adapter.d.ts +145 -156
  173. package/types/cmat-components-breadcrumb.d.ts +108 -86
  174. package/types/cmat-components-card.d.ts +34 -18
  175. package/types/cmat-components-carousel.d.ts +251 -134
  176. package/types/cmat-components-cascade.d.ts +158 -117
  177. package/types/cmat-components-chip-input.d.ts +105 -71
  178. package/types/cmat-components-code-editor.d.ts +59 -34
  179. package/types/cmat-components-color-picker.d.ts +378 -236
  180. package/types/cmat-components-custom-formly.d.ts +776 -814
  181. package/types/cmat-components-data-picker.d.ts +502 -360
  182. package/types/cmat-components-date-range.d.ts +106 -77
  183. package/types/cmat-components-date-time-display.d.ts +36 -13
  184. package/types/cmat-components-drawer.d.ts +91 -61
  185. package/types/cmat-components-empty-state.d.ts +47 -17
  186. package/types/cmat-components-file-preview.d.ts +42 -14
  187. package/types/cmat-components-filter-toolbar.d.ts +57 -25
  188. package/types/cmat-components-form-actions.d.ts +18 -10
  189. package/types/cmat-components-fullscreen.d.ts +21 -13
  190. package/types/cmat-components-highlight.d.ts +33 -26
  191. package/types/cmat-components-image-viewer.d.ts +119 -58
  192. package/types/cmat-components-inline-loading.d.ts +24 -11
  193. package/types/cmat-components-json-editor.d.ts +39 -28
  194. package/types/cmat-components-knob-input.d.ts +172 -101
  195. package/types/cmat-components-loading-overlay.d.ts +8 -11
  196. package/types/cmat-components-masonry.d.ts +27 -14
  197. package/types/cmat-components-material-color-picker.d.ts +56 -42
  198. package/types/cmat-components-material-datetimepicker.d.ts +817 -454
  199. package/types/cmat-components-navigation.d.ts +295 -221
  200. package/types/cmat-components-opt-input.d.ts +111 -90
  201. package/types/cmat-components-org-chart.d.ts +53 -35
  202. package/types/cmat-components-page-header.d.ts +37 -14
  203. package/types/cmat-components-pagination.d.ts +144 -107
  204. package/types/cmat-components-password-strength.d.ts +197 -86
  205. package/types/cmat-components-popover.d.ts +264 -166
  206. package/types/cmat-components-progress-bar.d.ts +17 -14
  207. package/types/cmat-components-qrcode.d.ts +111 -42
  208. package/types/cmat-components-rating.d.ts +105 -59
  209. package/types/cmat-components-rich-text-editor.d.ts +39 -16
  210. package/types/cmat-components-select-search.d.ts +195 -99
  211. package/types/cmat-components-select-table.d.ts +241 -142
  212. package/types/cmat-components-select-tree.d.ts +185 -118
  213. package/types/cmat-components-skeleton.d.ts +55 -32
  214. package/types/cmat-components-speed-dial.d.ts +86 -61
  215. package/types/cmat-components-status-tag.d.ts +42 -24
  216. package/types/cmat-components-table-toolbar.d.ts +30 -12
  217. package/types/cmat-components-timeline.d.ts +83 -51
  218. package/types/cmat-components-toast.d.ts +84 -85
  219. package/types/cmat-components-transfer-picker.d.ts +228 -181
  220. package/types/cmat-components-treetable.d.ts +63 -39
  221. package/types/cmat-components-upload.d.ts +205 -106
  222. package/types/cmat-components-x6-angular-shape.d.ts +29 -37
  223. package/types/cmat-directives-animate-on-scroll.d.ts +48 -30
  224. package/types/cmat-directives-arrow-cursor.d.ts +55 -35
  225. package/types/cmat-directives-autofocus.d.ts +8 -11
  226. package/types/cmat-directives-data-exporter.d.ts +71 -40
  227. package/types/cmat-directives-debounce.d.ts +31 -28
  228. package/types/cmat-directives-digit-only.d.ts +90 -53
  229. package/types/cmat-directives-equal-validator.d.ts +11 -14
  230. package/types/cmat-directives-seamless-auto-scroll.d.ts +42 -29
  231. package/types/cmat-lib-mock-api.d.ts +46 -55
  232. package/types/cmat-pipes-bytes.d.ts +7 -10
  233. package/types/cmat-pipes-date-format.d.ts +7 -10
  234. package/types/cmat-pipes-find-by-key.d.ts +8 -12
  235. package/types/cmat-pipes-group-by.d.ts +11 -15
  236. package/types/cmat-pipes-keys.d.ts +10 -13
  237. package/types/cmat-pipes-secure.d.ts +14 -17
  238. package/types/cmat-pipes-uppercase.d.ts +7 -10
  239. package/types/cmat-reports.d.ts +1131 -0
  240. package/types/cmat-services-alert.d.ts +80 -87
  241. package/types/cmat-services-config.d.ts +37 -43
  242. package/types/cmat-services-confirmation.d.ts +31 -37
  243. package/types/cmat-services-data.d.ts +18 -21
  244. package/types/cmat-services-export-as.d.ts +28 -33
  245. package/types/cmat-services-loading.d.ts +27 -31
  246. package/types/cmat-services-local-storage.d.ts +17 -21
  247. package/types/cmat-services-media-watcher.d.ts +14 -18
  248. package/types/cmat-services-platform.d.ts +8 -11
  249. package/types/cmat-services-print.d.ts +97 -102
  250. package/types/cmat-services-splash-screen.d.ts +11 -14
  251. package/types/cmat-services-title.d.ts +9 -12
  252. package/types/cmat-services-translation.d.ts +19 -22
  253. package/types/cmat-services-utils.d.ts +76 -80
  254. package/types/cmat-validators.d.ts +5 -8
  255. package/types/cmat-version.d.ts +8 -10
  256. package/types/cmat.d.ts +7551 -5204
@@ -1,284 +1,256 @@
1
- import { HttpResponseBase } from '@angular/common/http';
2
- import * as i0 from '@angular/core';
3
- import { signal, Injectable } from '@angular/core';
4
- import { CmatUtilsService } from 'cmat/services/utils';
5
-
6
- class CmatAlertDialog {
7
- constructor(message, type, okCallback, cancelCallback, defaultValue, okLabel, cancelLabel) {
8
- this.message = message;
9
- this.type = type;
10
- this.okCallback = okCallback;
11
- this.cancelCallback = cancelCallback;
12
- this.defaultValue = defaultValue;
13
- this.okLabel = okLabel;
14
- this.cancelLabel = cancelLabel;
15
- }
16
- }
17
-
18
- class CmatAlertMessage {
19
- constructor(severity, summary, detail, isPostionBottom = false) {
20
- this.severity = severity;
21
- this.summary = summary;
22
- this.detail = detail;
23
- this.isPostionBottom = isPostionBottom;
24
- }
25
- }
26
-
1
+ import { HttpResponseBase } from "@angular/common/http";
2
+ import * as i0 from "@angular/core";
3
+ import { Injectable, signal } from "@angular/core";
4
+ import { CmatUtilsService } from "cmat/services/utils";
5
+ var CmatAlertDialog = class {
6
+ constructor(message, type, okCallback, cancelCallback, defaultValue, okLabel, cancelLabel) {
7
+ this.message = message;
8
+ this.type = type;
9
+ this.okCallback = okCallback;
10
+ this.cancelCallback = cancelCallback;
11
+ this.defaultValue = defaultValue;
12
+ this.okLabel = okLabel;
13
+ this.cancelLabel = cancelLabel;
14
+ }
15
+ };
16
+ var CmatAlertMessage = class {
17
+ constructor(severity, summary, detail, isPostionBottom = false) {
18
+ this.severity = severity;
19
+ this.summary = summary;
20
+ this.detail = detail;
21
+ this.isPostionBottom = isPostionBottom;
22
+ }
23
+ };
27
24
  var CmatDialogType;
28
- (function (CmatDialogType) {
29
- CmatDialogType[CmatDialogType["alert"] = 0] = "alert";
30
- CmatDialogType[CmatDialogType["confirm"] = 1] = "confirm";
31
- CmatDialogType[CmatDialogType["prompt"] = 2] = "prompt";
25
+ (function(CmatDialogType) {
26
+ CmatDialogType[CmatDialogType["alert"] = 0] = "alert";
27
+ CmatDialogType[CmatDialogType["confirm"] = 1] = "confirm";
28
+ CmatDialogType[CmatDialogType["prompt"] = 2] = "prompt";
32
29
  })(CmatDialogType || (CmatDialogType = {}));
33
30
  var CmatMessageSeverity;
34
- (function (CmatMessageSeverity) {
35
- CmatMessageSeverity["info"] = "info";
36
- CmatMessageSeverity["success"] = "success";
37
- CmatMessageSeverity["error"] = "error";
38
- CmatMessageSeverity["warning"] = "warning";
39
- CmatMessageSeverity["wait"] = "wait";
31
+ (function(CmatMessageSeverity) {
32
+ CmatMessageSeverity["info"] = "info";
33
+ CmatMessageSeverity["success"] = "success";
34
+ CmatMessageSeverity["error"] = "error";
35
+ CmatMessageSeverity["warning"] = "warning";
36
+ CmatMessageSeverity["wait"] = "wait";
40
37
  })(CmatMessageSeverity || (CmatMessageSeverity = {}));
41
-
42
- // Delay before showing the overlay: skip display entirely if the operation finishes within this window
43
38
  const OVERLAY_SHOW_DELAY_MS = 300;
44
- // Minimum visible duration once shown: prevents the animation from being cut off abruptly
45
- const OVERLAY_MIN_VISIBLE_MS = 1000;
46
- class CmatAlertService {
47
- constructor() {
48
- this._messages = signal(null, /* @ts-ignore */
49
- ...(ngDevMode ? [{ debugName: "_messages" }] : /* istanbul ignore next */ []));
50
- this._stickyMessages = signal(undefined, /* @ts-ignore */
51
- ...(ngDevMode ? [{ debugName: "_stickyMessages" }] : /* istanbul ignore next */ []));
52
- this._bottomMessages = signal(undefined, /* @ts-ignore */
53
- ...(ngDevMode ? [{ debugName: "_bottomMessages" }] : /* istanbul ignore next */ []));
54
- this._dialogs = signal(null, /* @ts-ignore */
55
- ...(ngDevMode ? [{ debugName: "_dialogs" }] : /* istanbul ignore next */ []));
56
- this._isLoading = signal(false, /* @ts-ignore */
57
- ...(ngDevMode ? [{ debugName: "_isLoading" }] : /* istanbul ignore next */ []));
58
- this._overlayVisible = signal(false, /* @ts-ignore */
59
- ...(ngDevMode ? [{ debugName: "_overlayVisible" }] : /* istanbul ignore next */ []));
60
- this._overlayMessage = signal('', /* @ts-ignore */
61
- ...(ngDevMode ? [{ debugName: "_overlayMessage" }] : /* istanbul ignore next */ []));
62
- // eslint-disable-next-line @typescript-eslint/member-ordering
63
- this.messages = this._messages.asReadonly();
64
- // eslint-disable-next-line @typescript-eslint/member-ordering
65
- this.stickyMessages = this._stickyMessages.asReadonly();
66
- // eslint-disable-next-line @typescript-eslint/member-ordering
67
- this.bottomMessages = this._bottomMessages.asReadonly();
68
- // eslint-disable-next-line @typescript-eslint/member-ordering
69
- this.dialogs = this._dialogs.asReadonly();
70
- // eslint-disable-next-line @typescript-eslint/member-ordering
71
- this.isLoading = this._isLoading.asReadonly();
72
- // eslint-disable-next-line @typescript-eslint/member-ordering
73
- this.overlayVisible = this._overlayVisible.asReadonly();
74
- // eslint-disable-next-line @typescript-eslint/member-ordering
75
- this.overlayMessage = this._overlayMessage.asReadonly();
76
- this._loadingMessageId = null;
77
- this._overlayShowTimerId = null;
78
- this._overlayHideTimerId = null;
79
- this._overlayShownAt = 0;
80
- }
81
- showDialog(message, type, okCallback, cancelCallback, okLabel, cancelLabel, defaultValue) {
82
- type ??= CmatDialogType.alert;
83
- this._dialogs.set({
84
- message: message,
85
- type: type,
86
- okCallback: okCallback,
87
- cancelCallback: cancelCallback,
88
- okLabel: okLabel,
89
- cancelLabel: cancelLabel,
90
- defaultValue: defaultValue
91
- });
92
- }
93
- showMessage(data, separatorOrDetail, severity) {
94
- severity ??= CmatMessageSeverity.info;
95
- if (data instanceof HttpResponseBase) {
96
- data = CmatUtilsService.getHttpResponseMessage(data);
97
- separatorOrDetail = CmatUtilsService.captionAndMessageSeparator;
98
- }
99
- if (data instanceof Array) {
100
- for (const message of data) {
101
- const msgObject = CmatUtilsService.splitInTwo(message, separatorOrDetail);
102
- this._showMessageHelper(msgObject.firstPart, msgObject.secondPart ?? '', severity, false);
103
- }
104
- }
105
- else {
106
- this._showMessageHelper(data, separatorOrDetail ?? '', severity, false);
107
- }
108
- }
109
- showBottomMessage(data, separatorOrDetail, severity) {
110
- severity ??= CmatMessageSeverity.info;
111
- if (data instanceof HttpResponseBase) {
112
- data = CmatUtilsService.getHttpResponseMessage(data);
113
- separatorOrDetail = CmatUtilsService.captionAndMessageSeparator;
114
- }
115
- if (data instanceof Array) {
116
- for (const message of data) {
117
- const msgObject = CmatUtilsService.splitInTwo(message, separatorOrDetail);
118
- this._showMessageHelper(msgObject.firstPart, msgObject.secondPart ?? '', severity, true, true);
119
- }
120
- }
121
- else {
122
- this._showMessageHelper(data, separatorOrDetail ?? '', severity, true, true);
123
- }
124
- }
125
- showStickyMessage(data, separatorOrDetail, severity, error) {
126
- severity ??= CmatMessageSeverity.info;
127
- if (data instanceof HttpResponseBase) {
128
- data = CmatUtilsService.getHttpResponseMessage(data);
129
- separatorOrDetail = CmatUtilsService.captionAndMessageSeparator;
130
- }
131
- if (data instanceof Array) {
132
- for (const message of data) {
133
- const msgObject = CmatUtilsService.splitInTwo(message, separatorOrDetail);
134
- this._showMessageHelper(msgObject.firstPart, msgObject.secondPart ?? '', severity, true);
135
- }
136
- }
137
- else {
138
- if (error) {
139
- if (this.isApiResult(error)) {
140
- separatorOrDetail += error.msg;
141
- }
142
- const serializedError = CmatUtilsService.safeStringify(error);
143
- const msg = `Message.Severity: "${CmatMessageSeverity[severity]}", Message.Summary: "${data}",
39
+ const OVERLAY_MIN_VISIBLE_MS = 1e3;
40
+ var CmatAlertService = class CmatAlertService {
41
+ constructor() {
42
+ this._messages = signal(null, ...ngDevMode ? [{ debugName: "_messages" }] : /* istanbul ignore next */ []);
43
+ this._stickyMessages = signal(void 0, ...ngDevMode ? [{ debugName: "_stickyMessages" }] : /* istanbul ignore next */ []);
44
+ this._bottomMessages = signal(void 0, ...ngDevMode ? [{ debugName: "_bottomMessages" }] : /* istanbul ignore next */ []);
45
+ this._dialogs = signal(null, ...ngDevMode ? [{ debugName: "_dialogs" }] : /* istanbul ignore next */ []);
46
+ this._isLoading = signal(false, ...ngDevMode ? [{ debugName: "_isLoading" }] : /* istanbul ignore next */ []);
47
+ this._overlayVisible = signal(false, ...ngDevMode ? [{ debugName: "_overlayVisible" }] : /* istanbul ignore next */ []);
48
+ this._overlayMessage = signal("", ...ngDevMode ? [{ debugName: "_overlayMessage" }] : /* istanbul ignore next */ []);
49
+ this.messages = this._messages.asReadonly();
50
+ this.stickyMessages = this._stickyMessages.asReadonly();
51
+ this.bottomMessages = this._bottomMessages.asReadonly();
52
+ this.dialogs = this._dialogs.asReadonly();
53
+ this.isLoading = this._isLoading.asReadonly();
54
+ this.overlayVisible = this._overlayVisible.asReadonly();
55
+ this.overlayMessage = this._overlayMessage.asReadonly();
56
+ this._loadingMessageId = null;
57
+ this._overlayShowTimerId = null;
58
+ this._overlayHideTimerId = null;
59
+ this._overlayShownAt = 0;
60
+ }
61
+ showDialog(message, type, okCallback, cancelCallback, okLabel, cancelLabel, defaultValue) {
62
+ type ??= CmatDialogType.alert;
63
+ this._dialogs.set({
64
+ message,
65
+ type,
66
+ okCallback,
67
+ cancelCallback,
68
+ okLabel,
69
+ cancelLabel,
70
+ defaultValue
71
+ });
72
+ }
73
+ showMessage(data, separatorOrDetail, severity) {
74
+ severity ??= CmatMessageSeverity.info;
75
+ if (data instanceof HttpResponseBase) {
76
+ data = CmatUtilsService.getHttpResponseMessage(data);
77
+ separatorOrDetail = CmatUtilsService.captionAndMessageSeparator;
78
+ }
79
+ if (data instanceof Array) for (const message of data) {
80
+ const msgObject = CmatUtilsService.splitInTwo(message, separatorOrDetail);
81
+ this._showMessageHelper(msgObject.firstPart, msgObject.secondPart ?? "", severity, false);
82
+ }
83
+ else this._showMessageHelper(data, separatorOrDetail ?? "", severity, false);
84
+ }
85
+ showBottomMessage(data, separatorOrDetail, severity) {
86
+ severity ??= CmatMessageSeverity.info;
87
+ if (data instanceof HttpResponseBase) {
88
+ data = CmatUtilsService.getHttpResponseMessage(data);
89
+ separatorOrDetail = CmatUtilsService.captionAndMessageSeparator;
90
+ }
91
+ if (data instanceof Array) for (const message of data) {
92
+ const msgObject = CmatUtilsService.splitInTwo(message, separatorOrDetail);
93
+ this._showMessageHelper(msgObject.firstPart, msgObject.secondPart ?? "", severity, true, true);
94
+ }
95
+ else this._showMessageHelper(data, separatorOrDetail ?? "", severity, true, true);
96
+ }
97
+ showStickyMessage(data, separatorOrDetail, severity, error) {
98
+ severity ??= CmatMessageSeverity.info;
99
+ if (data instanceof HttpResponseBase) {
100
+ data = CmatUtilsService.getHttpResponseMessage(data);
101
+ separatorOrDetail = CmatUtilsService.captionAndMessageSeparator;
102
+ }
103
+ if (data instanceof Array) for (const message of data) {
104
+ const msgObject = CmatUtilsService.splitInTwo(message, separatorOrDetail);
105
+ this._showMessageHelper(msgObject.firstPart, msgObject.secondPart ?? "", severity, true);
106
+ }
107
+ else {
108
+ if (error) {
109
+ if (this.isApiResult(error)) separatorOrDetail += error.msg;
110
+ const serializedError = CmatUtilsService.safeStringify(error);
111
+ const msg = `Message.Severity: "${CmatMessageSeverity[severity]}", Message.Summary: "${data}",
144
112
  Message.Detail: "${separatorOrDetail}", Message.Error: "${serializedError}"`;
145
- switch (severity) {
146
- case CmatMessageSeverity.info:
147
- this.logInfo(msg);
148
- break;
149
- case CmatMessageSeverity.success:
150
- this.logMessage(msg);
151
- break;
152
- case CmatMessageSeverity.error:
153
- this.logError(msg);
154
- break;
155
- case CmatMessageSeverity.warning:
156
- this.logWarning(msg);
157
- break;
158
- case CmatMessageSeverity.wait:
159
- this.logTrace(msg);
160
- break;
161
- }
162
- }
163
- this._showMessageHelper(data, separatorOrDetail ?? '', severity, true);
164
- }
165
- }
166
- startLoadingMessage(message = '载入中...', caption = '') {
167
- this._isLoading.set(true);
168
- this._clearLoadingMessageTimer();
169
- this._loadingMessageId = setTimeout(() => {
170
- this.showStickyMessage(caption, message, CmatMessageSeverity.wait);
171
- }, 1000);
172
- }
173
- stopLoadingMessage() {
174
- this._isLoading.set(false);
175
- this._clearLoadingMessageTimer();
176
- this.resetStickyMessage();
177
- }
178
- showOverlay(message = '处理中...') {
179
- this._clearOverlayTimers();
180
- this._overlayMessage.set(message);
181
- // Debounce: fast operations never flash the overlay
182
- this._overlayShowTimerId = setTimeout(() => {
183
- this._overlayShowTimerId = null;
184
- this._overlayShownAt = Date.now();
185
- this._overlayVisible.set(true);
186
- }, OVERLAY_SHOW_DELAY_MS);
187
- }
188
- hideOverlay() {
189
- // Operation finished before the overlay actually appeared: cancel the display
190
- if (this._overlayShowTimerId !== null) {
191
- this._clearOverlayTimers();
192
- this._overlayMessage.set('');
193
- return;
194
- }
195
- // Enforce the minimum visible duration so the animation ends gracefully
196
- const shownFor = Date.now() - this._overlayShownAt;
197
- if (this._overlayVisible() && shownFor < OVERLAY_MIN_VISIBLE_MS) {
198
- this._overlayHideTimerId = setTimeout(() => {
199
- this._overlayHideTimerId = null;
200
- this._closeOverlay();
201
- }, OVERLAY_MIN_VISIBLE_MS - shownFor);
202
- return;
203
- }
204
- this._closeOverlay();
205
- }
206
- logDebug(msg) {
207
- console.debug(msg);
208
- }
209
- logError(msg) {
210
- console.error(msg);
211
- }
212
- logInfo(msg) {
213
- console.info(msg);
214
- }
215
- logMessage(msg) {
216
- console.log(msg);
217
- }
218
- logTrace(msg) {
219
- console.trace(msg);
220
- }
221
- logWarning(msg) {
222
- console.warn(msg);
223
- }
224
- resetStickyMessage() {
225
- this._stickyMessages.set(undefined);
226
- }
227
- resetBottomMessage() {
228
- this._bottomMessages.set(undefined);
229
- }
230
- _showMessageHelper(summary, detail, severity, isSticky, isPostionBottom = false) {
231
- const message = { severity: severity, summary: summary, detail: detail, isPostionBottom: isPostionBottom };
232
- if (isPostionBottom) {
233
- this._bottomMessages.set(message);
234
- }
235
- else if (isSticky) {
236
- this._stickyMessages.set(message);
237
- }
238
- else {
239
- this._messages.set(message);
240
- }
241
- }
242
- isApiResult(obj) {
243
- const result = obj;
244
- return typeof result === 'object' && result !== null
245
- && typeof result.success === 'boolean'
246
- && typeof result.msg === 'string'
247
- && typeof result.type === 'number';
248
- }
249
- _clearLoadingMessageTimer() {
250
- if (this._loadingMessageId !== null) {
251
- clearTimeout(this._loadingMessageId);
252
- this._loadingMessageId = null;
253
- }
254
- }
255
- _closeOverlay() {
256
- this._overlayVisible.set(false);
257
- this._overlayMessage.set('');
258
- }
259
- _clearOverlayTimers() {
260
- if (this._overlayShowTimerId !== null) {
261
- clearTimeout(this._overlayShowTimerId);
262
- }
263
- if (this._overlayHideTimerId !== null) {
264
- clearTimeout(this._overlayHideTimerId);
265
- }
266
- this._overlayShowTimerId = null;
267
- this._overlayHideTimerId = null;
268
- }
269
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: CmatAlertService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
270
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: CmatAlertService, providedIn: 'root' }); }
271
- }
272
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.0", ngImport: i0, type: CmatAlertService, decorators: [{
273
- type: Injectable,
274
- args: [{
275
- providedIn: 'root'
276
- }]
277
- }] });
278
-
279
- /**
280
- * Generated bundle index. Do not edit.
281
- */
282
-
113
+ switch (severity) {
114
+ case CmatMessageSeverity.info:
115
+ this.logInfo(msg);
116
+ break;
117
+ case CmatMessageSeverity.success:
118
+ this.logMessage(msg);
119
+ break;
120
+ case CmatMessageSeverity.error:
121
+ this.logError(msg);
122
+ break;
123
+ case CmatMessageSeverity.warning:
124
+ this.logWarning(msg);
125
+ break;
126
+ case CmatMessageSeverity.wait: this.logTrace(msg);
127
+ }
128
+ }
129
+ this._showMessageHelper(data, separatorOrDetail ?? "", severity, true);
130
+ }
131
+ }
132
+ startLoadingMessage(message = "载入中...", caption = "") {
133
+ this._isLoading.set(true);
134
+ this._clearLoadingMessageTimer();
135
+ this._loadingMessageId = setTimeout(() => {
136
+ this.showStickyMessage(caption, message, CmatMessageSeverity.wait);
137
+ }, 1e3);
138
+ }
139
+ stopLoadingMessage() {
140
+ this._isLoading.set(false);
141
+ this._clearLoadingMessageTimer();
142
+ this.resetStickyMessage();
143
+ }
144
+ showOverlay(message = "处理中...") {
145
+ this._clearOverlayTimers();
146
+ this._overlayMessage.set(message);
147
+ this._overlayShowTimerId = setTimeout(() => {
148
+ this._overlayShowTimerId = null;
149
+ this._overlayShownAt = Date.now();
150
+ this._overlayVisible.set(true);
151
+ }, OVERLAY_SHOW_DELAY_MS);
152
+ }
153
+ hideOverlay() {
154
+ if (this._overlayShowTimerId !== null) {
155
+ this._clearOverlayTimers();
156
+ this._overlayMessage.set("");
157
+ return;
158
+ }
159
+ const shownFor = Date.now() - this._overlayShownAt;
160
+ if (this._overlayVisible() && shownFor < OVERLAY_MIN_VISIBLE_MS) {
161
+ this._overlayHideTimerId = setTimeout(() => {
162
+ this._overlayHideTimerId = null;
163
+ this._closeOverlay();
164
+ }, OVERLAY_MIN_VISIBLE_MS - shownFor);
165
+ return;
166
+ }
167
+ this._closeOverlay();
168
+ }
169
+ logDebug(msg) {
170
+ console.debug(msg);
171
+ }
172
+ logError(msg) {
173
+ console.error(msg);
174
+ }
175
+ logInfo(msg) {
176
+ console.info(msg);
177
+ }
178
+ logMessage(msg) {
179
+ console.log(msg);
180
+ }
181
+ logTrace(msg) {
182
+ console.trace(msg);
183
+ }
184
+ logWarning(msg) {
185
+ console.warn(msg);
186
+ }
187
+ resetStickyMessage() {
188
+ this._stickyMessages.set(void 0);
189
+ }
190
+ resetBottomMessage() {
191
+ this._bottomMessages.set(void 0);
192
+ }
193
+ _showMessageHelper(summary, detail, severity, isSticky, isPostionBottom = false) {
194
+ const message = {
195
+ severity,
196
+ summary,
197
+ detail,
198
+ isPostionBottom
199
+ };
200
+ if (isPostionBottom) this._bottomMessages.set(message);
201
+ else if (isSticky) this._stickyMessages.set(message);
202
+ else this._messages.set(message);
203
+ }
204
+ isApiResult(obj) {
205
+ const result = obj;
206
+ return typeof result === "object" && result !== null && typeof result.success === "boolean" && typeof result.msg === "string" && typeof result.type === "number";
207
+ }
208
+ _clearLoadingMessageTimer() {
209
+ if (this._loadingMessageId !== null) {
210
+ clearTimeout(this._loadingMessageId);
211
+ this._loadingMessageId = null;
212
+ }
213
+ }
214
+ _closeOverlay() {
215
+ this._overlayVisible.set(false);
216
+ this._overlayMessage.set("");
217
+ }
218
+ _clearOverlayTimers() {
219
+ if (this._overlayShowTimerId !== null) clearTimeout(this._overlayShowTimerId);
220
+ if (this._overlayHideTimerId !== null) clearTimeout(this._overlayHideTimerId);
221
+ this._overlayShowTimerId = null;
222
+ this._overlayHideTimerId = null;
223
+ }
224
+ static {
225
+ this.ɵfac = i0.ɵɵngDeclareFactory({
226
+ minVersion: "12.0.0",
227
+ version: "22.2.3",
228
+ ngImport: i0,
229
+ type: CmatAlertService,
230
+ deps: [],
231
+ target: i0.ɵɵFactoryTarget.Injectable
232
+ });
233
+ }
234
+ static {
235
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
236
+ minVersion: "12.0.0",
237
+ version: "22.2.3",
238
+ ngImport: i0,
239
+ type: CmatAlertService,
240
+ providedIn: "root"
241
+ });
242
+ }
243
+ };
244
+ i0.ɵɵngDeclareClassMetadata({
245
+ minVersion: "12.0.0",
246
+ version: "22.2.3",
247
+ ngImport: i0,
248
+ type: CmatAlertService,
249
+ decorators: [{
250
+ type: Injectable,
251
+ args: [{ providedIn: "root" }]
252
+ }]
253
+ });
283
254
  export { CmatAlertDialog, CmatAlertMessage, CmatAlertService, CmatDialogType, CmatMessageSeverity };
284
- //# sourceMappingURL=cmat-services-alert.mjs.map
255
+
256
+ //# sourceMappingURL=cmat-services-alert.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"cmat-services-alert.mjs","sources":["../../../projects/cmat/services/alert/alert.dialog.ts","../../../projects/cmat/services/alert/alert.message.ts","../../../projects/cmat/services/alert/enum.ts","../../../projects/cmat/services/alert/alert.service.ts","../../../projects/cmat/services/alert/cmat-services-alert.ts"],"sourcesContent":["import { CmatDialogType } from './enum';\r\n\r\nexport class CmatAlertDialog {\r\n constructor(public message: string, public type: CmatDialogType, public okCallback?: (val?: unknown) => void, public cancelCallback?: () => void,\r\n public defaultValue?: string, public okLabel?: string, public cancelLabel?: string) {\r\n\r\n }\r\n}","import { CmatMessageSeverity } from './enum';\r\n\r\nexport class CmatAlertMessage {\r\n constructor(public severity: CmatMessageSeverity, public summary: string, public detail: string, public isPostionBottom: boolean = false) { }\r\n}\r\n","export enum CmatDialogType {\r\n alert,\r\n confirm,\r\n prompt\r\n}\r\n\r\nexport enum CmatMessageSeverity {\r\n info = 'info',\r\n success = 'success',\r\n error = 'error',\r\n warning = 'warning',\r\n wait = 'wait'\r\n}\r\n\r\nexport interface ApiResult {\r\n success: boolean;\r\n msg: string;\r\n type: number;\r\n data?: unknown;\r\n dataExt?: unknown;\r\n}","import { HttpResponseBase } from '@angular/common/http';\r\nimport { Injectable, signal } from '@angular/core';\r\nimport { CmatUtilsService } from 'cmat/services/utils';\r\nimport { CmatAlertDialog } from './alert.dialog';\r\nimport { CmatAlertMessage } from './alert.message';\r\nimport { ApiResult, CmatDialogType, CmatMessageSeverity } from './enum';\r\n\r\n// Delay before showing the overlay: skip display entirely if the operation finishes within this window\r\nconst OVERLAY_SHOW_DELAY_MS = 300;\r\n// Minimum visible duration once shown: prevents the animation from being cut off abruptly\r\nconst OVERLAY_MIN_VISIBLE_MS = 1000;\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatAlertService {\r\n private readonly _messages = signal<CmatAlertMessage | null>(null);\r\n private readonly _stickyMessages = signal<CmatAlertMessage | void>(undefined);\r\n private readonly _bottomMessages = signal<CmatAlertMessage | void>(undefined);\r\n private readonly _dialogs = signal<CmatAlertDialog | null>(null);\r\n private readonly _isLoading = signal<boolean>(false);\r\n private readonly _overlayVisible = signal<boolean>(false);\r\n private readonly _overlayMessage = signal<string>('');\r\n \r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n readonly messages = this._messages.asReadonly();\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n readonly stickyMessages = this._stickyMessages.asReadonly();\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n readonly bottomMessages = this._bottomMessages.asReadonly();\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n readonly dialogs = this._dialogs.asReadonly();\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n readonly isLoading = this._isLoading.asReadonly();\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n readonly overlayVisible = this._overlayVisible.asReadonly();\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n readonly overlayMessage = this._overlayMessage.asReadonly();\r\n\r\n private _loadingMessageId: ReturnType<typeof setTimeout> | null = null;\r\n\r\n private _overlayShowTimerId: ReturnType<typeof setTimeout> | null = null;\r\n private _overlayHideTimerId: ReturnType<typeof setTimeout> | null = null;\r\n private _overlayShownAt = 0;\r\n\r\n\r\n showDialog(message: string, type?: CmatDialogType, okCallback?: (val?: unknown) => void, cancelCallback?: () => void,\r\n okLabel?: string, cancelLabel?: string, defaultValue?: string): void {\r\n\r\n type ??= CmatDialogType.alert;\r\n\r\n this._dialogs.set({\r\n message: message,\r\n type: type,\r\n okCallback: okCallback,\r\n cancelCallback: cancelCallback,\r\n okLabel: okLabel,\r\n cancelLabel: cancelLabel,\r\n defaultValue: defaultValue\r\n });\r\n }\r\n\r\n showMessage(summary: string): void;\r\n showMessage(detail: string | string[] | HttpResponseBase, params: string, severity: CmatMessageSeverity): void;\r\n showMessage(data: string | string[] | HttpResponseBase, separatorOrDetail?: string, severity?: CmatMessageSeverity): void {\r\n severity ??= CmatMessageSeverity.info;\r\n\r\n if (data instanceof HttpResponseBase) {\r\n data = CmatUtilsService.getHttpResponseMessage(data);\r\n separatorOrDetail = CmatUtilsService.captionAndMessageSeparator;\r\n }\r\n\r\n if (data instanceof Array) {\r\n for (const message of data) {\r\n const msgObject = CmatUtilsService.splitInTwo(message, separatorOrDetail);\r\n\r\n this._showMessageHelper(msgObject.firstPart, msgObject.secondPart ?? '', severity, false);\r\n }\r\n } else {\r\n this._showMessageHelper(data, separatorOrDetail ?? '', severity, false);\r\n }\r\n }\r\n\r\n showBottomMessage(summary: string): void;\r\n showBottomMessage(summary: string, detail: string, severity: CmatMessageSeverity): void;\r\n showBottomMessage(data: string | string[] | HttpResponseBase, separatorOrDetail?: string, severity?: CmatMessageSeverity): void {\r\n severity ??= CmatMessageSeverity.info;\r\n\r\n if (data instanceof HttpResponseBase) {\r\n data = CmatUtilsService.getHttpResponseMessage(data);\r\n separatorOrDetail = CmatUtilsService.captionAndMessageSeparator;\r\n }\r\n\r\n if (data instanceof Array) {\r\n for (const message of data) {\r\n const msgObject = CmatUtilsService.splitInTwo(message, separatorOrDetail);\r\n\r\n this._showMessageHelper(msgObject.firstPart, msgObject.secondPart ?? '', severity, true, true);\r\n }\r\n } else {\r\n this._showMessageHelper(data, separatorOrDetail ?? '', severity, true, true);\r\n }\r\n }\r\n\r\n\r\n showStickyMessage(summary: string): void;\r\n showStickyMessage(summary: string, detail: string, severity: CmatMessageSeverity, error?: unknown): void;\r\n showStickyMessage(detail: string[] | HttpResponseBase, params: string, severity: CmatMessageSeverity): void;\r\n showStickyMessage(data: string | string[] | HttpResponseBase, separatorOrDetail?: string, severity?: CmatMessageSeverity, error?: unknown): void {\r\n\r\n severity ??= CmatMessageSeverity.info;\r\n\r\n if (data instanceof HttpResponseBase) {\r\n data = CmatUtilsService.getHttpResponseMessage(data);\r\n separatorOrDetail = CmatUtilsService.captionAndMessageSeparator;\r\n }\r\n\r\n\r\n if (data instanceof Array) {\r\n for (const message of data) {\r\n const msgObject = CmatUtilsService.splitInTwo(message, separatorOrDetail); this._showMessageHelper(msgObject.firstPart, msgObject.secondPart ?? '', severity, true);\r\n }\r\n } else {\r\n if (error) {\r\n if (this.isApiResult(error)) {\r\n separatorOrDetail += error.msg;\r\n }\r\n\r\n const serializedError = CmatUtilsService.safeStringify(error as Record<string, unknown>);\r\n const msg = `Message.Severity: \"${CmatMessageSeverity[severity]}\", Message.Summary: \"${data}\", \r\n Message.Detail: \"${separatorOrDetail}\", Message.Error: \"${serializedError}\"`;\r\n\r\n switch (severity) {\r\n case CmatMessageSeverity.info:\r\n this.logInfo(msg);\r\n break;\r\n case CmatMessageSeverity.success:\r\n this.logMessage(msg);\r\n break;\r\n case CmatMessageSeverity.error:\r\n this.logError(msg);\r\n break;\r\n case CmatMessageSeverity.warning:\r\n this.logWarning(msg);\r\n break;\r\n case CmatMessageSeverity.wait:\r\n this.logTrace(msg);\r\n break;\r\n }\r\n }\r\n\r\n this._showMessageHelper(data, separatorOrDetail ?? '', severity, true);\r\n }\r\n }\r\n\r\n startLoadingMessage(message = '载入中...', caption = ''): void {\r\n this._isLoading.set(true);\r\n this._clearLoadingMessageTimer();\r\n\r\n this._loadingMessageId = setTimeout((): void => {\r\n this.showStickyMessage(caption, message, CmatMessageSeverity.wait);\r\n }, 1000);\r\n }\r\n\r\n stopLoadingMessage(): void {\r\n this._isLoading.set(false);\r\n this._clearLoadingMessageTimer();\r\n this.resetStickyMessage();\r\n }\r\n\r\n showOverlay(message = '处理中...'): void {\r\n this._clearOverlayTimers();\r\n this._overlayMessage.set(message);\r\n\r\n // Debounce: fast operations never flash the overlay\r\n this._overlayShowTimerId = setTimeout(() => {\r\n this._overlayShowTimerId = null;\r\n this._overlayShownAt = Date.now();\r\n this._overlayVisible.set(true);\r\n }, OVERLAY_SHOW_DELAY_MS);\r\n }\r\n\r\n hideOverlay(): void {\r\n // Operation finished before the overlay actually appeared: cancel the display\r\n if (this._overlayShowTimerId !== null) {\r\n this._clearOverlayTimers();\r\n this._overlayMessage.set('');\r\n return;\r\n }\r\n\r\n // Enforce the minimum visible duration so the animation ends gracefully\r\n const shownFor = Date.now() - this._overlayShownAt;\r\n if (this._overlayVisible() && shownFor < OVERLAY_MIN_VISIBLE_MS) {\r\n this._overlayHideTimerId = setTimeout(() => {\r\n this._overlayHideTimerId = null;\r\n this._closeOverlay();\r\n }, OVERLAY_MIN_VISIBLE_MS - shownFor);\r\n return;\r\n }\r\n\r\n this._closeOverlay();\r\n }\r\n\r\n\r\n logDebug(msg: unknown): void {\r\n console.debug(msg);\r\n }\r\n\r\n logError(msg: unknown): void {\r\n console.error(msg);\r\n }\r\n\r\n logInfo(msg: unknown): void {\r\n console.info(msg);\r\n }\r\n\r\n logMessage(msg: unknown): void {\r\n console.log(msg);\r\n }\r\n\r\n logTrace(msg: unknown): void {\r\n console.trace(msg);\r\n }\r\n\r\n logWarning(msg: unknown): void {\r\n console.warn(msg);\r\n }\r\n\r\n resetStickyMessage(): void {\r\n this._stickyMessages.set(undefined);\r\n }\r\n\r\n resetBottomMessage(): void {\r\n this._bottomMessages.set(undefined);\r\n }\r\n\r\n private _showMessageHelper(summary: string, detail: string, severity: CmatMessageSeverity, isSticky: boolean, isPostionBottom: boolean = false): void {\r\n const message = { severity: severity, summary: summary, detail: detail, isPostionBottom: isPostionBottom };\r\n\r\n if (isPostionBottom) {\r\n this._bottomMessages.set(message);\r\n } else if (isSticky) {\r\n this._stickyMessages.set(message);\r\n } else {\r\n this._messages.set(message);\r\n }\r\n }\r\n\r\n private isApiResult(obj: unknown): obj is ApiResult {\r\n const result = obj as Partial<ApiResult> | null;\r\n\r\n return typeof result === 'object' && result !== null\r\n && typeof result.success === 'boolean'\r\n && typeof result.msg === 'string'\r\n && typeof result.type === 'number';\r\n }\r\n\r\n private _clearLoadingMessageTimer(): void {\r\n if (this._loadingMessageId !== null) {\r\n clearTimeout(this._loadingMessageId);\r\n this._loadingMessageId = null;\r\n }\r\n }\r\n\r\n private _closeOverlay(): void {\r\n this._overlayVisible.set(false);\r\n this._overlayMessage.set('');\r\n }\r\n\r\n private _clearOverlayTimers(): void {\r\n if (this._overlayShowTimerId !== null) {\r\n clearTimeout(this._overlayShowTimerId);\r\n }\r\n if (this._overlayHideTimerId !== null) {\r\n clearTimeout(this._overlayHideTimerId);\r\n }\r\n this._overlayShowTimerId = null;\r\n this._overlayHideTimerId = null;\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAEa,eAAe,CAAA;AACxB,IAAA,WAAA,CAAmB,OAAe,EAAS,IAAoB,EAAS,UAAoC,EAAS,cAA2B,EACrI,YAAqB,EAAS,OAAgB,EAAS,WAAoB,EAAA;QADnE,IAAA,CAAA,OAAO,GAAP,OAAO;QAAiB,IAAA,CAAA,IAAI,GAAJ,IAAI;QAAyB,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"}
1
+ {"version":3,"file":"cmat-services-alert.mjs","names":[],"sources":["../../../projects/cmat/services/alert/alert.dialog.ts","../../../projects/cmat/services/alert/alert.message.ts","../../../projects/cmat/services/alert/enum.ts","../../../projects/cmat/services/alert/alert.service.ts"],"sourcesContent":["import { CmatDialogType } from './enum';\r\n\r\nexport class CmatAlertDialog {\r\n constructor(public message: string, public type: CmatDialogType, public okCallback?: (val?: unknown) => void, public cancelCallback?: () => void,\r\n public defaultValue?: string, public okLabel?: string, public cancelLabel?: string) {\r\n\r\n }\r\n}","import { CmatMessageSeverity } from './enum';\r\n\r\nexport class CmatAlertMessage {\r\n constructor(public severity: CmatMessageSeverity, public summary: string, public detail: string, public isPostionBottom: boolean = false) { }\r\n}\r\n","export enum CmatDialogType {\r\n alert,\r\n confirm,\r\n prompt\r\n}\r\n\r\nexport enum CmatMessageSeverity {\r\n info = 'info',\r\n success = 'success',\r\n error = 'error',\r\n warning = 'warning',\r\n wait = 'wait'\r\n}\r\n\r\nexport interface ApiResult {\r\n success: boolean;\r\n msg: string;\r\n type: number;\r\n data?: unknown;\r\n dataExt?: unknown;\r\n}","import { HttpResponseBase } from '@angular/common/http';\r\nimport { Injectable, signal } from '@angular/core';\r\nimport { CmatUtilsService } from 'cmat/services/utils';\r\nimport { CmatAlertDialog } from './alert.dialog';\r\nimport { CmatAlertMessage } from './alert.message';\r\nimport { ApiResult, CmatDialogType, CmatMessageSeverity } from './enum';\r\n\r\n// Delay before showing the overlay: skip display entirely if the operation finishes within this window\r\nconst OVERLAY_SHOW_DELAY_MS = 300;\r\n// Minimum visible duration once shown: prevents the animation from being cut off abruptly\r\nconst OVERLAY_MIN_VISIBLE_MS = 1000;\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CmatAlertService {\r\n private readonly _messages = signal<CmatAlertMessage | null>(null);\r\n private readonly _stickyMessages = signal<CmatAlertMessage | void>(undefined);\r\n private readonly _bottomMessages = signal<CmatAlertMessage | void>(undefined);\r\n private readonly _dialogs = signal<CmatAlertDialog | null>(null);\r\n private readonly _isLoading = signal<boolean>(false);\r\n private readonly _overlayVisible = signal<boolean>(false);\r\n private readonly _overlayMessage = signal<string>('');\r\n \r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n readonly messages = this._messages.asReadonly();\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n readonly stickyMessages = this._stickyMessages.asReadonly();\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n readonly bottomMessages = this._bottomMessages.asReadonly();\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n readonly dialogs = this._dialogs.asReadonly();\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n readonly isLoading = this._isLoading.asReadonly();\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n readonly overlayVisible = this._overlayVisible.asReadonly();\r\n // eslint-disable-next-line @typescript-eslint/member-ordering\r\n readonly overlayMessage = this._overlayMessage.asReadonly();\r\n\r\n private _loadingMessageId: ReturnType<typeof setTimeout> | null = null;\r\n\r\n private _overlayShowTimerId: ReturnType<typeof setTimeout> | null = null;\r\n private _overlayHideTimerId: ReturnType<typeof setTimeout> | null = null;\r\n private _overlayShownAt = 0;\r\n\r\n\r\n showDialog(message: string, type?: CmatDialogType, okCallback?: (val?: unknown) => void, cancelCallback?: () => void,\r\n okLabel?: string, cancelLabel?: string, defaultValue?: string): void {\r\n\r\n type ??= CmatDialogType.alert;\r\n\r\n this._dialogs.set({\r\n message: message,\r\n type: type,\r\n okCallback: okCallback,\r\n cancelCallback: cancelCallback,\r\n okLabel: okLabel,\r\n cancelLabel: cancelLabel,\r\n defaultValue: defaultValue\r\n });\r\n }\r\n\r\n showMessage(summary: string): void;\r\n showMessage(detail: string | string[] | HttpResponseBase, params: string, severity: CmatMessageSeverity): void;\r\n showMessage(data: string | string[] | HttpResponseBase, separatorOrDetail?: string, severity?: CmatMessageSeverity): void {\r\n severity ??= CmatMessageSeverity.info;\r\n\r\n if (data instanceof HttpResponseBase) {\r\n data = CmatUtilsService.getHttpResponseMessage(data);\r\n separatorOrDetail = CmatUtilsService.captionAndMessageSeparator;\r\n }\r\n\r\n if (data instanceof Array) {\r\n for (const message of data) {\r\n const msgObject = CmatUtilsService.splitInTwo(message, separatorOrDetail);\r\n\r\n this._showMessageHelper(msgObject.firstPart, msgObject.secondPart ?? '', severity, false);\r\n }\r\n } else {\r\n this._showMessageHelper(data, separatorOrDetail ?? '', severity, false);\r\n }\r\n }\r\n\r\n showBottomMessage(summary: string): void;\r\n showBottomMessage(summary: string, detail: string, severity: CmatMessageSeverity): void;\r\n showBottomMessage(data: string | string[] | HttpResponseBase, separatorOrDetail?: string, severity?: CmatMessageSeverity): void {\r\n severity ??= CmatMessageSeverity.info;\r\n\r\n if (data instanceof HttpResponseBase) {\r\n data = CmatUtilsService.getHttpResponseMessage(data);\r\n separatorOrDetail = CmatUtilsService.captionAndMessageSeparator;\r\n }\r\n\r\n if (data instanceof Array) {\r\n for (const message of data) {\r\n const msgObject = CmatUtilsService.splitInTwo(message, separatorOrDetail);\r\n\r\n this._showMessageHelper(msgObject.firstPart, msgObject.secondPart ?? '', severity, true, true);\r\n }\r\n } else {\r\n this._showMessageHelper(data, separatorOrDetail ?? '', severity, true, true);\r\n }\r\n }\r\n\r\n\r\n showStickyMessage(summary: string): void;\r\n showStickyMessage(summary: string, detail: string, severity: CmatMessageSeverity, error?: unknown): void;\r\n showStickyMessage(detail: string[] | HttpResponseBase, params: string, severity: CmatMessageSeverity): void;\r\n showStickyMessage(data: string | string[] | HttpResponseBase, separatorOrDetail?: string, severity?: CmatMessageSeverity, error?: unknown): void {\r\n\r\n severity ??= CmatMessageSeverity.info;\r\n\r\n if (data instanceof HttpResponseBase) {\r\n data = CmatUtilsService.getHttpResponseMessage(data);\r\n separatorOrDetail = CmatUtilsService.captionAndMessageSeparator;\r\n }\r\n\r\n\r\n if (data instanceof Array) {\r\n for (const message of data) {\r\n const msgObject = CmatUtilsService.splitInTwo(message, separatorOrDetail); this._showMessageHelper(msgObject.firstPart, msgObject.secondPart ?? '', severity, true);\r\n }\r\n } else {\r\n if (error) {\r\n if (this.isApiResult(error)) {\r\n separatorOrDetail += error.msg;\r\n }\r\n\r\n const serializedError = CmatUtilsService.safeStringify(error as Record<string, unknown>);\r\n const msg = `Message.Severity: \"${CmatMessageSeverity[severity]}\", Message.Summary: \"${data}\", \r\n Message.Detail: \"${separatorOrDetail}\", Message.Error: \"${serializedError}\"`;\r\n\r\n switch (severity) {\r\n case CmatMessageSeverity.info:\r\n this.logInfo(msg);\r\n break;\r\n case CmatMessageSeverity.success:\r\n this.logMessage(msg);\r\n break;\r\n case CmatMessageSeverity.error:\r\n this.logError(msg);\r\n break;\r\n case CmatMessageSeverity.warning:\r\n this.logWarning(msg);\r\n break;\r\n case CmatMessageSeverity.wait:\r\n this.logTrace(msg);\r\n break;\r\n }\r\n }\r\n\r\n this._showMessageHelper(data, separatorOrDetail ?? '', severity, true);\r\n }\r\n }\r\n\r\n startLoadingMessage(message = '载入中...', caption = ''): void {\r\n this._isLoading.set(true);\r\n this._clearLoadingMessageTimer();\r\n\r\n this._loadingMessageId = setTimeout((): void => {\r\n this.showStickyMessage(caption, message, CmatMessageSeverity.wait);\r\n }, 1000);\r\n }\r\n\r\n stopLoadingMessage(): void {\r\n this._isLoading.set(false);\r\n this._clearLoadingMessageTimer();\r\n this.resetStickyMessage();\r\n }\r\n\r\n showOverlay(message = '处理中...'): void {\r\n this._clearOverlayTimers();\r\n this._overlayMessage.set(message);\r\n\r\n // Debounce: fast operations never flash the overlay\r\n this._overlayShowTimerId = setTimeout(() => {\r\n this._overlayShowTimerId = null;\r\n this._overlayShownAt = Date.now();\r\n this._overlayVisible.set(true);\r\n }, OVERLAY_SHOW_DELAY_MS);\r\n }\r\n\r\n hideOverlay(): void {\r\n // Operation finished before the overlay actually appeared: cancel the display\r\n if (this._overlayShowTimerId !== null) {\r\n this._clearOverlayTimers();\r\n this._overlayMessage.set('');\r\n return;\r\n }\r\n\r\n // Enforce the minimum visible duration so the animation ends gracefully\r\n const shownFor = Date.now() - this._overlayShownAt;\r\n if (this._overlayVisible() && shownFor < OVERLAY_MIN_VISIBLE_MS) {\r\n this._overlayHideTimerId = setTimeout(() => {\r\n this._overlayHideTimerId = null;\r\n this._closeOverlay();\r\n }, OVERLAY_MIN_VISIBLE_MS - shownFor);\r\n return;\r\n }\r\n\r\n this._closeOverlay();\r\n }\r\n\r\n\r\n logDebug(msg: unknown): void {\r\n console.debug(msg);\r\n }\r\n\r\n logError(msg: unknown): void {\r\n console.error(msg);\r\n }\r\n\r\n logInfo(msg: unknown): void {\r\n console.info(msg);\r\n }\r\n\r\n logMessage(msg: unknown): void {\r\n console.log(msg);\r\n }\r\n\r\n logTrace(msg: unknown): void {\r\n console.trace(msg);\r\n }\r\n\r\n logWarning(msg: unknown): void {\r\n console.warn(msg);\r\n }\r\n\r\n resetStickyMessage(): void {\r\n this._stickyMessages.set(undefined);\r\n }\r\n\r\n resetBottomMessage(): void {\r\n this._bottomMessages.set(undefined);\r\n }\r\n\r\n private _showMessageHelper(summary: string, detail: string, severity: CmatMessageSeverity, isSticky: boolean, isPostionBottom: boolean = false): void {\r\n const message = { severity: severity, summary: summary, detail: detail, isPostionBottom: isPostionBottom };\r\n\r\n if (isPostionBottom) {\r\n this._bottomMessages.set(message);\r\n } else if (isSticky) {\r\n this._stickyMessages.set(message);\r\n } else {\r\n this._messages.set(message);\r\n }\r\n }\r\n\r\n private isApiResult(obj: unknown): obj is ApiResult {\r\n const result = obj as Partial<ApiResult> | null;\r\n\r\n return typeof result === 'object' && result !== null\r\n && typeof result.success === 'boolean'\r\n && typeof result.msg === 'string'\r\n && typeof result.type === 'number';\r\n }\r\n\r\n private _clearLoadingMessageTimer(): void {\r\n if (this._loadingMessageId !== null) {\r\n clearTimeout(this._loadingMessageId);\r\n this._loadingMessageId = null;\r\n }\r\n }\r\n\r\n private _closeOverlay(): void {\r\n this._overlayVisible.set(false);\r\n this._overlayMessage.set('');\r\n }\r\n\r\n private _clearOverlayTimers(): void {\r\n if (this._overlayShowTimerId !== null) {\r\n clearTimeout(this._overlayShowTimerId);\r\n }\r\n if (this._overlayHideTimerId !== null) {\r\n clearTimeout(this._overlayHideTimerId);\r\n }\r\n this._overlayShowTimerId = null;\r\n this._overlayHideTimerId = null;\r\n }\r\n}\r\n"],"mappings":";;;;AAEA,IAAa,kBAAb,MAA4B;CACxB,YAAmB,SAAwB,MAA6B,YAA6C,gBAC1G,cAA8B,SAAyB,aAAoB;EADnE,KAAA,UAAA;EAAwB,KAAA,OAAA;EAA6B,KAAA,aAAA;EAA6C,KAAA,iBAAA;EAC1G,KAAA,eAAA;EAA8B,KAAA,UAAA;EAAyB,KAAA,cAAA;CAElE;AACH;ACLD,IAAa,mBAAb,MAA6B;CACzB,YAAmB,UAAsC,SAAwB,QAAuB,kBAA2B,OAAK;EAArH,KAAA,WAAA;EAAsC,KAAA,UAAA;EAAwB,KAAA,SAAA;EAAuB,KAAA,kBAAA;CAAoC;AAC/I;ACJD,IAAY;CAAZ,SAAY,gBAAc;CACtB,eAAA,eAAA,WAAA,KAAA;CACA,eAAA,eAAA,aAAA,KAAA;CACA,eAAA,eAAA,YAAA,KAAA;AACJ,EAAA,CAJY,mBAAA,iBAAc,CAAA,EAAA;AAM1B,IAAY;CAAZ,SAAY,qBAAmB;CAC3B,oBAAA,UAAA;CACA,oBAAA,aAAA;CACA,oBAAA,WAAA;CACA,oBAAA,aAAA;CACA,oBAAA,UAAA;AACJ,EAAA,CANY,wBAAA,sBAAmB,CAAA,EAAA;ACE/B,MAAM,wBAAwB;AAE9B,MAAM,yBAAyB;AAK/B,IAAa,mBAAb,MAAa,iBAAgB;CAH7B,cAAA;EAIqB,KAAA,YAAY,OAAgC,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;EACjD,KAAA,kBAAkB,OAAgC,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,kBAAA,CAAA,+B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