@sdcorejs/angular 21.2.6 → 22.2.6

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 (187) hide show
  1. package/assets/fonts/fonts.scss +2 -2
  2. package/assets/images/coming-soon.svg +6 -6
  3. package/assets/images/data-empty.svg +2 -2
  4. package/assets/images/expired.svg +6 -6
  5. package/assets/images/file-error.svg +6 -6
  6. package/assets/images/filter-empty.svg +2 -2
  7. package/assets/images/filter-required.svg +2 -2
  8. package/assets/images/forbidden.svg +2 -2
  9. package/assets/images/image-error.svg +8 -8
  10. package/assets/images/maintenance.svg +3 -3
  11. package/assets/images/not-found.svg +2 -2
  12. package/assets/images/offline.svg +5 -5
  13. package/assets/images/submitted.svg +5 -5
  14. package/assets/images/success.svg +3 -3
  15. package/assets/images/unauthorized.svg +2 -2
  16. package/assets/images/unknown-error.svg +2 -2
  17. package/fesm2022/sdcorejs-angular-components-anchor.mjs +46 -29
  18. package/fesm2022/sdcorejs-angular-components-anchor.mjs.map +1 -1
  19. package/fesm2022/sdcorejs-angular-components-api-contract-builder.mjs +167 -94
  20. package/fesm2022/sdcorejs-angular-components-api-contract-builder.mjs.map +1 -1
  21. package/fesm2022/sdcorejs-angular-components-audit-diff.mjs +20 -13
  22. package/fesm2022/sdcorejs-angular-components-audit-diff.mjs.map +1 -1
  23. package/fesm2022/sdcorejs-angular-components-autoid-inspector.mjs +65 -40
  24. package/fesm2022/sdcorejs-angular-components-autoid-inspector.mjs.map +1 -1
  25. package/fesm2022/sdcorejs-angular-components-avatar.mjs +15 -9
  26. package/fesm2022/sdcorejs-angular-components-avatar.mjs.map +1 -1
  27. package/fesm2022/sdcorejs-angular-components-badge.mjs +31 -17
  28. package/fesm2022/sdcorejs-angular-components-badge.mjs.map +1 -1
  29. package/fesm2022/sdcorejs-angular-components-breadcrumb.mjs +17 -10
  30. package/fesm2022/sdcorejs-angular-components-breadcrumb.mjs.map +1 -1
  31. package/fesm2022/sdcorejs-angular-components-button.mjs +17 -10
  32. package/fesm2022/sdcorejs-angular-components-button.mjs.map +1 -1
  33. package/fesm2022/sdcorejs-angular-components-card.mjs +28 -17
  34. package/fesm2022/sdcorejs-angular-components-card.mjs.map +1 -1
  35. package/fesm2022/sdcorejs-angular-components-chart.mjs +52 -32
  36. package/fesm2022/sdcorejs-angular-components-chart.mjs.map +1 -1
  37. package/fesm2022/sdcorejs-angular-components-ckeditor-styles.mjs +3 -3
  38. package/fesm2022/sdcorejs-angular-components-ckeditor-styles.mjs.map +1 -1
  39. package/fesm2022/sdcorejs-angular-components-code-editor.mjs +15 -9
  40. package/fesm2022/sdcorejs-angular-components-code-editor.mjs.map +1 -1
  41. package/fesm2022/sdcorejs-angular-components-data-state.mjs +32 -19
  42. package/fesm2022/sdcorejs-angular-components-data-state.mjs.map +1 -1
  43. package/fesm2022/sdcorejs-angular-components-editor.mjs +38 -21
  44. package/fesm2022/sdcorejs-angular-components-editor.mjs.map +1 -1
  45. package/fesm2022/sdcorejs-angular-components-form-generic.mjs +396 -306
  46. package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
  47. package/fesm2022/sdcorejs-angular-components-history.mjs +10 -10
  48. package/fesm2022/sdcorejs-angular-components-history.mjs.map +1 -1
  49. package/fesm2022/sdcorejs-angular-components-import-excel.mjs +13 -13
  50. package/fesm2022/sdcorejs-angular-components-import-excel.mjs.map +1 -1
  51. package/fesm2022/sdcorejs-angular-components-inform.mjs +42 -24
  52. package/fesm2022/sdcorejs-angular-components-inform.mjs.map +1 -1
  53. package/fesm2022/sdcorejs-angular-components-job-progress.mjs +39 -21
  54. package/fesm2022/sdcorejs-angular-components-job-progress.mjs.map +1 -1
  55. package/fesm2022/sdcorejs-angular-components-mini-editor.mjs +9 -8
  56. package/fesm2022/sdcorejs-angular-components-mini-editor.mjs.map +1 -1
  57. package/fesm2022/sdcorejs-angular-components-modal-resizable.mjs +22 -14
  58. package/fesm2022/sdcorejs-angular-components-modal-resizable.mjs.map +1 -1
  59. package/fesm2022/sdcorejs-angular-components-modal.mjs +21 -12
  60. package/fesm2022/sdcorejs-angular-components-modal.mjs.map +1 -1
  61. package/fesm2022/sdcorejs-angular-components-operator.mjs +17 -10
  62. package/fesm2022/sdcorejs-angular-components-operator.mjs.map +1 -1
  63. package/fesm2022/sdcorejs-angular-components-org-chart.mjs +26 -16
  64. package/fesm2022/sdcorejs-angular-components-org-chart.mjs.map +1 -1
  65. package/fesm2022/sdcorejs-angular-components-preview.mjs +288 -147
  66. package/fesm2022/sdcorejs-angular-components-preview.mjs.map +1 -1
  67. package/fesm2022/sdcorejs-angular-components-query-bar.mjs +279 -153
  68. package/fesm2022/sdcorejs-angular-components-query-bar.mjs.map +1 -1
  69. package/fesm2022/sdcorejs-angular-components-query-builder.mjs +69 -36
  70. package/fesm2022/sdcorejs-angular-components-query-builder.mjs.map +1 -1
  71. package/fesm2022/sdcorejs-angular-components-quick-action.mjs +3 -3
  72. package/fesm2022/sdcorejs-angular-components-quick-action.mjs.map +1 -1
  73. package/fesm2022/sdcorejs-angular-components-section.mjs +17 -13
  74. package/fesm2022/sdcorejs-angular-components-section.mjs.map +1 -1
  75. package/fesm2022/sdcorejs-angular-components-side-drawer.mjs +26 -16
  76. package/fesm2022/sdcorejs-angular-components-side-drawer.mjs.map +1 -1
  77. package/fesm2022/sdcorejs-angular-components-splitter.mjs +58 -37
  78. package/fesm2022/sdcorejs-angular-components-splitter.mjs.map +1 -1
  79. package/fesm2022/sdcorejs-angular-components-stepper.mjs +36 -21
  80. package/fesm2022/sdcorejs-angular-components-stepper.mjs.map +1 -1
  81. package/fesm2022/sdcorejs-angular-components-tab-router.mjs +27 -23
  82. package/fesm2022/sdcorejs-angular-components-tab-router.mjs.map +1 -1
  83. package/fesm2022/sdcorejs-angular-components-tab.mjs +34 -20
  84. package/fesm2022/sdcorejs-angular-components-tab.mjs.map +1 -1
  85. package/fesm2022/sdcorejs-angular-components-table.mjs +442 -277
  86. package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
  87. package/fesm2022/sdcorejs-angular-components-tree.mjs +86 -46
  88. package/fesm2022/sdcorejs-angular-components-tree.mjs.map +1 -1
  89. package/fesm2022/sdcorejs-angular-components-upload-file.mjs +67 -41
  90. package/fesm2022/sdcorejs-angular-components-upload-file.mjs.map +1 -1
  91. package/fesm2022/sdcorejs-angular-components-view.mjs +25 -14
  92. package/fesm2022/sdcorejs-angular-components-view.mjs.map +1 -1
  93. package/fesm2022/sdcorejs-angular-configurations.mjs.map +1 -1
  94. package/fesm2022/sdcorejs-angular-directives.mjs +42 -33
  95. package/fesm2022/sdcorejs-angular-directives.mjs.map +1 -1
  96. package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs +85 -44
  97. package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs.map +1 -1
  98. package/fesm2022/sdcorejs-angular-forms-checkbox.mjs +15 -9
  99. package/fesm2022/sdcorejs-angular-forms-checkbox.mjs.map +1 -1
  100. package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs +41 -24
  101. package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs.map +1 -1
  102. package/fesm2022/sdcorejs-angular-forms-chip.mjs +37 -22
  103. package/fesm2022/sdcorejs-angular-forms-chip.mjs.map +1 -1
  104. package/fesm2022/sdcorejs-angular-forms-date-range.mjs +55 -30
  105. package/fesm2022/sdcorejs-angular-forms-date-range.mjs.map +1 -1
  106. package/fesm2022/sdcorejs-angular-forms-date.mjs +63 -34
  107. package/fesm2022/sdcorejs-angular-forms-date.mjs.map +1 -1
  108. package/fesm2022/sdcorejs-angular-forms-datetime.mjs +65 -35
  109. package/fesm2022/sdcorejs-angular-forms-datetime.mjs.map +1 -1
  110. package/fesm2022/sdcorejs-angular-forms-directives.mjs +12 -12
  111. package/fesm2022/sdcorejs-angular-forms-directives.mjs.map +1 -1
  112. package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs +94 -53
  113. package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs.map +1 -1
  114. package/fesm2022/sdcorejs-angular-forms-inline-text.mjs +33 -18
  115. package/fesm2022/sdcorejs-angular-forms-inline-text.mjs.map +1 -1
  116. package/fesm2022/sdcorejs-angular-forms-input-color.mjs +25 -14
  117. package/fesm2022/sdcorejs-angular-forms-input-color.mjs.map +1 -1
  118. package/fesm2022/sdcorejs-angular-forms-input-number.mjs +66 -35
  119. package/fesm2022/sdcorejs-angular-forms-input-number.mjs.map +1 -1
  120. package/fesm2022/sdcorejs-angular-forms-input.mjs +94 -49
  121. package/fesm2022/sdcorejs-angular-forms-input.mjs.map +1 -1
  122. package/fesm2022/sdcorejs-angular-forms-label.mjs +3 -3
  123. package/fesm2022/sdcorejs-angular-forms-label.mjs.map +1 -1
  124. package/fesm2022/sdcorejs-angular-forms-models.mjs +13 -8
  125. package/fesm2022/sdcorejs-angular-forms-models.mjs.map +1 -1
  126. package/fesm2022/sdcorejs-angular-forms-radio.mjs +41 -22
  127. package/fesm2022/sdcorejs-angular-forms-radio.mjs.map +1 -1
  128. package/fesm2022/sdcorejs-angular-forms-select.mjs +116 -61
  129. package/fesm2022/sdcorejs-angular-forms-select.mjs.map +1 -1
  130. package/fesm2022/sdcorejs-angular-forms-switch.mjs +21 -12
  131. package/fesm2022/sdcorejs-angular-forms-switch.mjs.map +1 -1
  132. package/fesm2022/sdcorejs-angular-forms-textarea.mjs +48 -26
  133. package/fesm2022/sdcorejs-angular-forms-textarea.mjs.map +1 -1
  134. package/fesm2022/sdcorejs-angular-forms-time-range.mjs +83 -43
  135. package/fesm2022/sdcorejs-angular-forms-time-range.mjs.map +1 -1
  136. package/fesm2022/sdcorejs-angular-forms-time.mjs +72 -38
  137. package/fesm2022/sdcorejs-angular-forms-time.mjs.map +1 -1
  138. package/fesm2022/sdcorejs-angular-forms-tree-select.mjs +76 -41
  139. package/fesm2022/sdcorejs-angular-forms-tree-select.mjs.map +1 -1
  140. package/fesm2022/sdcorejs-angular-forms.mjs +4 -4
  141. package/fesm2022/sdcorejs-angular-forms.mjs.map +1 -1
  142. package/fesm2022/sdcorejs-angular-handlers.mjs +3 -3
  143. package/fesm2022/sdcorejs-angular-handlers.mjs.map +1 -1
  144. package/fesm2022/sdcorejs-angular-i18n.mjs +12 -9
  145. package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
  146. package/fesm2022/sdcorejs-angular-interceptors.mjs +6 -6
  147. package/fesm2022/sdcorejs-angular-interceptors.mjs.map +1 -1
  148. package/fesm2022/sdcorejs-angular-modules-auth.mjs +11 -10
  149. package/fesm2022/sdcorejs-angular-modules-auth.mjs.map +1 -1
  150. package/fesm2022/sdcorejs-angular-modules-icon.mjs +19 -11
  151. package/fesm2022/sdcorejs-angular-modules-icon.mjs.map +1 -1
  152. package/fesm2022/sdcorejs-angular-modules-keycloak.mjs +7 -7
  153. package/fesm2022/sdcorejs-angular-modules-keycloak.mjs.map +1 -1
  154. package/fesm2022/sdcorejs-angular-modules-layout.mjs +387 -247
  155. package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
  156. package/fesm2022/sdcorejs-angular-modules-permission.mjs +13 -11
  157. package/fesm2022/sdcorejs-angular-modules-permission.mjs.map +1 -1
  158. package/fesm2022/sdcorejs-angular-pipes.mjs +25 -25
  159. package/fesm2022/sdcorejs-angular-pipes.mjs.map +1 -1
  160. package/fesm2022/sdcorejs-angular-services-api.mjs +10 -10
  161. package/fesm2022/sdcorejs-angular-services-api.mjs.map +1 -1
  162. package/fesm2022/sdcorejs-angular-services-cache.mjs +3 -3
  163. package/fesm2022/sdcorejs-angular-services-cache.mjs.map +1 -1
  164. package/fesm2022/sdcorejs-angular-services-confirm.mjs +6 -6
  165. package/fesm2022/sdcorejs-angular-services-confirm.mjs.map +1 -1
  166. package/fesm2022/sdcorejs-angular-services-excel.mjs +3 -3
  167. package/fesm2022/sdcorejs-angular-services-excel.mjs.map +1 -1
  168. package/fesm2022/sdcorejs-angular-services-loading.mjs +3 -3
  169. package/fesm2022/sdcorejs-angular-services-loading.mjs.map +1 -1
  170. package/fesm2022/sdcorejs-angular-services-notify.mjs +21 -16
  171. package/fesm2022/sdcorejs-angular-services-notify.mjs.map +1 -1
  172. package/fesm2022/sdcorejs-angular-services-persistence.mjs +3 -3
  173. package/fesm2022/sdcorejs-angular-services-persistence.mjs.map +1 -1
  174. package/fesm2022/sdcorejs-angular-services-storage.mjs +3 -3
  175. package/fesm2022/sdcorejs-angular-services-storage.mjs.map +1 -1
  176. package/fesm2022/sdcorejs-angular-services-task.mjs +19 -11
  177. package/fesm2022/sdcorejs-angular-services-task.mjs.map +1 -1
  178. package/fesm2022/sdcorejs-angular-services-unsaved-changes.mjs +17 -10
  179. package/fesm2022/sdcorejs-angular-services-unsaved-changes.mjs.map +1 -1
  180. package/fesm2022/sdcorejs-angular-services-viewport.mjs +15 -9
  181. package/fesm2022/sdcorejs-angular-services-viewport.mjs.map +1 -1
  182. package/fesm2022/sdcorejs-angular-utilities-data-state.mjs.map +1 -1
  183. package/fesm2022/sdcorejs-angular-utilities-extensions.mjs.map +1 -1
  184. package/fesm2022/sdcorejs-angular-utilities-models.mjs.map +1 -1
  185. package/fesm2022/sdcorejs-angular-utilities-read-state.mjs +2 -1
  186. package/fesm2022/sdcorejs-angular-utilities-read-state.mjs.map +1 -1
  187. package/package.json +11 -11
@@ -11,10 +11,10 @@ import { SdIcon } from '@sdcorejs/angular/modules/icon';
11
11
  * Khi có phần tử mang [sdInformAction], component ẩn link `actionLabel` mặc định.
12
12
  */
13
13
  class SdInformActionDirective {
14
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SdInformActionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
15
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.17", type: SdInformActionDirective, isStandalone: true, selector: "[sdInformAction]", ngImport: i0 });
14
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdInformActionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
15
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.5", type: SdInformActionDirective, isStandalone: true, selector: "[sdInformAction]", ngImport: i0 });
16
16
  }
17
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SdInformActionDirective, decorators: [{
17
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdInformActionDirective, decorators: [{
18
18
  type: Directive,
19
19
  args: [{
20
20
  selector: '[sdInformAction]',
@@ -40,24 +40,35 @@ class SdInform {
40
40
  success = input(false, { ...(ngDevMode ? { debugName: "success" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
41
41
  warning = input(false, { ...(ngDevMode ? { debugName: "warning" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
42
42
  error = input(false, { ...(ngDevMode ? { debugName: "error" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
43
- title = input(...(ngDevMode ? [undefined, { debugName: "title" }] : /* istanbul ignore next */ []));
44
- description = input(...(ngDevMode ? [undefined, { debugName: "description" }] : /* istanbul ignore next */ []));
45
- icon = input(...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
43
+ title = input(/* @ts-ignore */
44
+ ...(ngDevMode ? [undefined, { debugName: "title" }] : /* istanbul ignore next */ []));
45
+ description = input(/* @ts-ignore */
46
+ ...(ngDevMode ? [undefined, { debugName: "description" }] : /* istanbul ignore next */ []));
47
+ icon = input(/* @ts-ignore */
48
+ ...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
46
49
  hideIcon = input(false, { ...(ngDevMode ? { debugName: "hideIcon" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
47
50
  fontSet = input(undefined, { ...(ngDevMode ? { debugName: "fontSet" } : /* istanbul ignore next */ {}), transform: value => value ?? undefined });
48
51
  closable = input(false, { ...(ngDevMode ? { debugName: "closable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
49
- actionLabel = input(...(ngDevMode ? [undefined, { debugName: "actionLabel" }] : /* istanbul ignore next */ []));
50
- lineClamp = input(...(ngDevMode ? [undefined, { debugName: "lineClamp" }] : /* istanbul ignore next */ []));
51
- autoId = input(...(ngDevMode ? [undefined, { debugName: "autoId" }] : /* istanbul ignore next */ []));
52
+ actionLabel = input(/* @ts-ignore */
53
+ ...(ngDevMode ? [undefined, { debugName: "actionLabel" }] : /* istanbul ignore next */ []));
54
+ lineClamp = input(/* @ts-ignore */
55
+ ...(ngDevMode ? [undefined, { debugName: "lineClamp" }] : /* istanbul ignore next */ []));
56
+ autoId = input(/* @ts-ignore */
57
+ ...(ngDevMode ? [undefined, { debugName: "autoId" }] : /* istanbul ignore next */ []));
52
58
  // 2. OUTPUTS
53
59
  sdClosed = output();
54
60
  sdAction = output();
55
61
  // 3. STATE
56
- dismissed = signal(false, ...(ngDevMode ? [{ debugName: "dismissed" }] : /* istanbul ignore next */ []));
57
- expanded = signal(false, ...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
58
- overflowing = signal(false, ...(ngDevMode ? [{ debugName: "overflowing" }] : /* istanbul ignore next */ []));
59
- bodyRef = viewChild('body', ...(ngDevMode ? [{ debugName: "bodyRef" }] : /* istanbul ignore next */ []));
60
- actionSlot = contentChild(SdInformActionDirective, ...(ngDevMode ? [{ debugName: "actionSlot" }] : /* istanbul ignore next */ []));
62
+ dismissed = signal(false, /* @ts-ignore */
63
+ ...(ngDevMode ? [{ debugName: "dismissed" }] : /* istanbul ignore next */ []));
64
+ expanded = signal(false, /* @ts-ignore */
65
+ ...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
66
+ overflowing = signal(false, /* @ts-ignore */
67
+ ...(ngDevMode ? [{ debugName: "overflowing" }] : /* istanbul ignore next */ []));
68
+ bodyRef = viewChild('body', /* @ts-ignore */
69
+ ...(ngDevMode ? [{ debugName: "bodyRef" }] : /* istanbul ignore next */ []));
70
+ actionSlot = contentChild(SdInformActionDirective, /* @ts-ignore */
71
+ ...(ngDevMode ? [{ debugName: "actionSlot" }] : /* istanbul ignore next */ []));
61
72
  // 4. COMPUTED
62
73
  effectiveColor = computed(() => {
63
74
  if (this.primary())
@@ -73,7 +84,8 @@ class SdInform {
73
84
  if (this.error())
74
85
  return 'error';
75
86
  return this.color();
76
- }, ...(ngDevMode ? [{ debugName: "effectiveColor" }] : /* istanbul ignore next */ []));
87
+ }, /* @ts-ignore */
88
+ ...(ngDevMode ? [{ debugName: "effectiveColor" }] : /* istanbul ignore next */ []));
77
89
  colorClasses = computed(() => {
78
90
  const c = this.effectiveColor();
79
91
  return {
@@ -84,31 +96,37 @@ class SdInform {
84
96
  'c-warning': c === 'warning',
85
97
  'c-error': c === 'error',
86
98
  };
87
- }, ...(ngDevMode ? [{ debugName: "colorClasses" }] : /* istanbul ignore next */ []));
99
+ }, /* @ts-ignore */
100
+ ...(ngDevMode ? [{ debugName: "colorClasses" }] : /* istanbul ignore next */ []));
88
101
  effectiveIcon = computed(() => {
89
102
  if (this.hideIcon())
90
103
  return null;
91
104
  return this.icon()?.trim() || SD_INFORM_DEFAULT_ICON[this.effectiveColor()];
92
- }, ...(ngDevMode ? [{ debugName: "effectiveIcon" }] : /* istanbul ignore next */ []));
93
- hasActionSlot = computed(() => !!this.actionSlot(), ...(ngDevMode ? [{ debugName: "hasActionSlot" }] : /* istanbul ignore next */ []));
105
+ }, /* @ts-ignore */
106
+ ...(ngDevMode ? [{ debugName: "effectiveIcon" }] : /* istanbul ignore next */ []));
107
+ hasActionSlot = computed(() => !!this.actionSlot(), /* @ts-ignore */
108
+ ...(ngDevMode ? [{ debugName: "hasActionSlot" }] : /* istanbul ignore next */ []));
94
109
  // clamp dòng: null = không clamp (đầy đủ); số = số dòng tối đa.
95
110
  clampLines = computed(() => {
96
111
  const n = this.lineClamp();
97
112
  if (!n || n <= 0)
98
113
  return null;
99
114
  return this.expanded() ? null : n;
100
- }, ...(ngDevMode ? [{ debugName: "clampLines" }] : /* istanbul ignore next */ []));
115
+ }, /* @ts-ignore */
116
+ ...(ngDevMode ? [{ debugName: "clampLines" }] : /* istanbul ignore next */ []));
101
117
  // toggle hiện khi đang clamp và đã từng tràn, hoặc đang mở rộng (để còn thu gọn lại).
102
118
  showToggle = computed(() => {
103
119
  if (!this.lineClamp())
104
120
  return false;
105
121
  return this.overflowing() || this.expanded();
106
- }, ...(ngDevMode ? [{ debugName: "showToggle" }] : /* istanbul ignore next */ []));
122
+ }, /* @ts-ignore */
123
+ ...(ngDevMode ? [{ debugName: "showToggle" }] : /* istanbul ignore next */ []));
107
124
  // why: error/warning là cảnh báo → assertive 'alert'; các màu còn lại là thông tin → polite 'status'.
108
125
  liveRole = computed(() => {
109
126
  const c = this.effectiveColor();
110
127
  return c === 'error' || c === 'warning' ? 'alert' : 'status';
111
- }, ...(ngDevMode ? [{ debugName: "liveRole" }] : /* istanbul ignore next */ []));
128
+ }, /* @ts-ignore */
129
+ ...(ngDevMode ? [{ debugName: "liveRole" }] : /* istanbul ignore next */ []));
112
130
  // 5. OVERFLOW MEASUREMENT
113
131
  #measureScheduled = false;
114
132
  constructor() {
@@ -160,10 +178,10 @@ class SdInform {
160
178
  event.stopPropagation();
161
179
  this.sdAction.emit(event);
162
180
  }
163
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SdInform, deps: [], target: i0.ɵɵFactoryTarget.Component });
164
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: SdInform, isStandalone: true, selector: "sd-inform", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, primary: { classPropertyName: "primary", publicName: "primary", isSignal: true, isRequired: false, transformFunction: null }, secondary: { classPropertyName: "secondary", publicName: "secondary", isSignal: true, isRequired: false, transformFunction: null }, info: { classPropertyName: "info", publicName: "info", isSignal: true, isRequired: false, transformFunction: null }, success: { classPropertyName: "success", publicName: "success", isSignal: true, isRequired: false, transformFunction: null }, warning: { classPropertyName: "warning", publicName: "warning", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, hideIcon: { classPropertyName: "hideIcon", publicName: "hideIcon", isSignal: true, isRequired: false, transformFunction: null }, fontSet: { classPropertyName: "fontSet", publicName: "fontSet", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, actionLabel: { classPropertyName: "actionLabel", publicName: "actionLabel", isSignal: true, isRequired: false, transformFunction: null }, lineClamp: { classPropertyName: "lineClamp", publicName: "lineClamp", isSignal: true, isRequired: false, transformFunction: null }, autoId: { classPropertyName: "autoId", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sdClosed: "sdClosed", sdAction: "sdAction" }, queries: [{ propertyName: "actionSlot", first: true, predicate: SdInformActionDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "bodyRef", first: true, predicate: ["body"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (!dismissed()) {\n @let _effectiveIcon = effectiveIcon();\n @let _fontSet = fontSet();\n <div\n class=\"c-inform\"\n [attr.role]=\"liveRole()\"\n [ngClass]=\"colorClasses()\"\n [attr.data-autoId]=\"autoId() || null\"\n [attr.data-autoid]=\"autoId() || null\">\n @if (_effectiveIcon) {\n <span class=\"c-inform-icon-tile\" aria-hidden=\"true\"\n ><sd-icon\n class=\"c-inform-icon c-material-icon\"\n size=\"20px\"\n aria-hidden=\"true\"\n [fontSet]=\"_fontSet\"\n [name]=\"_effectiveIcon\"></sd-icon\n ></span>\n }\n\n @let _actionLabel = actionLabel();\n <div class=\"c-inform-content\">\n @if (title(); as t) {\n <div class=\"c-inform-title\">{{ t }}</div>\n }\n @if (description(); as d) {\n <div #body class=\"c-inform-body\" [class.is-clamped]=\"clampLines() !== null\" [style.-webkit-line-clamp]=\"clampLines()\">\n {{ d }}\n </div>\n }\n @if (showToggle()) {\n <button type=\"button\" class=\"c-inform-toggle\" (click)=\"toggleExpanded()\">\n {{ (expanded() ? 'core.component.inform.show-less' : 'core.component.inform.show-more') | sdTranslate }}\n </button>\n }\n\n @if (hasActionSlot()) {\n <div class=\"c-inform-action\">\n <ng-content select=\"[sdInformAction]\"></ng-content>\n </div>\n } @else if (_actionLabel) {\n <sd-button\n class=\"c-inform-action c-inform-action-link\"\n size=\"sm\"\n type=\"light\"\n color=\"primary\"\n htmlType=\"button\"\n [title]=\"_actionLabel\"\n (click)=\"onAction($event)\"></sd-button>\n }\n </div>\n\n @if (closable()) {\n <button type=\"button\" class=\"c-inform-close\" [attr.aria-label]=\"'core.common.close' | sdTranslate\" (click)=\"onClose($event)\">\n <sd-icon aria-hidden=\"true\" name=\"close\"></sd-icon>\n </button>\n }\n </div>\n}\n", styles: [":host{display:block;min-width:0}.c-inform{--inform-tone: var(--sd-primary);--inform-soft: var(--sd-primary-light);--inform-ink: var(--sd-primary-dark);display:flex;align-items:flex-start;gap:12px;padding:16px;border-radius:8px;border:1px solid color-mix(in srgb,var(--inform-tone) 22%,var(--sd-surface, #fff));background:color-mix(in srgb,var(--inform-soft) 28%,var(--sd-surface, #fff))}.c-inform.c-primary{--inform-tone: var(--sd-primary);--inform-soft: var(--sd-primary-light);--inform-ink: var(--sd-primary-dark, var(--sd-primary))}.c-inform.c-secondary{--inform-tone: var(--sd-secondary);--inform-soft: var(--sd-secondary-light);--inform-ink: var(--sd-secondary-dark, var(--sd-secondary))}.c-inform.c-info{--inform-tone: var(--sd-info);--inform-soft: var(--sd-info-light);--inform-ink: var(--sd-info-dark, var(--sd-info))}.c-inform.c-success{--inform-tone: var(--sd-success);--inform-soft: var(--sd-success-light);--inform-ink: var(--sd-success-dark, var(--sd-success))}.c-inform.c-warning{--inform-tone: var(--sd-warning);--inform-soft: var(--sd-warning-light);--inform-ink: var(--sd-warning-dark, var(--sd-warning))}.c-inform.c-error{--inform-tone: var(--sd-error);--inform-soft: var(--sd-error-light);--inform-ink: var(--sd-error-dark, var(--sd-error))}.c-inform-icon-tile{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:8px;background:var(--inform-soft);color:var(--inform-ink)}.c-inform-icon{width:20px;height:20px;font-size:20px;line-height:20px}.c-inform-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.c-inform-title{font-size:14px;line-height:20px;font-weight:600;color:var(--sd-text);overflow-wrap:anywhere}.c-inform-body{font-size:14px;line-height:21px;color:var(--sd-text);overflow-wrap:anywhere}.c-inform-body.is-clamped{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}.c-inform-action{margin-top:8px;align-self:flex-start}.c-inform-toggle{align-self:flex-start;margin-top:4px;padding:4px 0;border:0;background:transparent;font:inherit;font-size:14px;color:var(--sd-primary-dark);cursor:pointer}.c-inform-toggle:hover{text-decoration:underline}.c-inform-close{display:inline-flex;align-items:center;justify-content:center;flex:0 0 32px;width:32px;height:32px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--sd-text-secondary);cursor:pointer}.c-inform-close:hover{background:var(--sd-black100, #f3f4f6);color:var(--sd-text)}.c-inform-close sd-icon{width:18px;height:18px;font-size:18px;line-height:18px}button:focus-visible{outline:2px solid var(--sd-primary);outline-offset:2px}@media(max-width:600px){.c-inform{padding:12px;gap:10px}.c-inform-close{flex-basis:44px;width:44px;height:44px;margin-top:-6px;margin-right:-6px}.c-inform-toggle{min-height:44px}:host ::ng-deep .c-inform-action button{min-height:44px}}\n"], dependencies: [{ kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
181
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdInform, deps: [], target: i0.ɵɵFactoryTarget.Component });
182
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: SdInform, isStandalone: true, selector: "sd-inform", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, primary: { classPropertyName: "primary", publicName: "primary", isSignal: true, isRequired: false, transformFunction: null }, secondary: { classPropertyName: "secondary", publicName: "secondary", isSignal: true, isRequired: false, transformFunction: null }, info: { classPropertyName: "info", publicName: "info", isSignal: true, isRequired: false, transformFunction: null }, success: { classPropertyName: "success", publicName: "success", isSignal: true, isRequired: false, transformFunction: null }, warning: { classPropertyName: "warning", publicName: "warning", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, hideIcon: { classPropertyName: "hideIcon", publicName: "hideIcon", isSignal: true, isRequired: false, transformFunction: null }, fontSet: { classPropertyName: "fontSet", publicName: "fontSet", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, actionLabel: { classPropertyName: "actionLabel", publicName: "actionLabel", isSignal: true, isRequired: false, transformFunction: null }, lineClamp: { classPropertyName: "lineClamp", publicName: "lineClamp", isSignal: true, isRequired: false, transformFunction: null }, autoId: { classPropertyName: "autoId", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sdClosed: "sdClosed", sdAction: "sdAction" }, queries: [{ propertyName: "actionSlot", first: true, predicate: SdInformActionDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "bodyRef", first: true, predicate: ["body"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (!dismissed()) {\n @let _effectiveIcon = effectiveIcon();\n @let _fontSet = fontSet();\n <div\n class=\"c-inform\"\n [attr.role]=\"liveRole()\"\n [ngClass]=\"colorClasses()\"\n [attr.data-autoId]=\"autoId() || null\"\n [attr.data-autoid]=\"autoId() || null\">\n @if (_effectiveIcon) {\n <span class=\"c-inform-icon-tile\" aria-hidden=\"true\"\n ><sd-icon\n class=\"c-inform-icon c-material-icon\"\n size=\"20px\"\n aria-hidden=\"true\"\n [fontSet]=\"_fontSet\"\n [name]=\"_effectiveIcon\"></sd-icon\n ></span>\n }\n\n @let _actionLabel = actionLabel();\n <div class=\"c-inform-content\">\n @if (title(); as t) {\n <div class=\"c-inform-title\">{{ t }}</div>\n }\n @if (description(); as d) {\n <div #body class=\"c-inform-body\" [class.is-clamped]=\"clampLines() !== null\" [style.-webkit-line-clamp]=\"clampLines()\">\n {{ d }}\n </div>\n }\n @if (showToggle()) {\n <button type=\"button\" class=\"c-inform-toggle\" (click)=\"toggleExpanded()\">\n {{ (expanded() ? 'core.component.inform.show-less' : 'core.component.inform.show-more') | sdTranslate }}\n </button>\n }\n\n @if (hasActionSlot()) {\n <div class=\"c-inform-action\">\n <ng-content select=\"[sdInformAction]\"></ng-content>\n </div>\n } @else if (_actionLabel) {\n <sd-button\n class=\"c-inform-action c-inform-action-link\"\n size=\"sm\"\n type=\"light\"\n color=\"primary\"\n htmlType=\"button\"\n [title]=\"_actionLabel\"\n (click)=\"onAction($event)\"></sd-button>\n }\n </div>\n\n @if (closable()) {\n <button type=\"button\" class=\"c-inform-close\" [attr.aria-label]=\"'core.common.close' | sdTranslate\" (click)=\"onClose($event)\">\n <sd-icon aria-hidden=\"true\" name=\"close\"></sd-icon>\n </button>\n }\n </div>\n}\n", styles: [":host{display:block;min-width:0}.c-inform{--inform-tone: var(--sd-primary);--inform-soft: var(--sd-primary-light);--inform-ink: var(--sd-primary-dark);display:flex;align-items:flex-start;gap:12px;padding:16px;border-radius:8px;border:1px solid color-mix(in srgb,var(--inform-tone) 22%,var(--sd-surface, #fff));background:color-mix(in srgb,var(--inform-soft) 28%,var(--sd-surface, #fff))}.c-inform.c-primary{--inform-tone: var(--sd-primary);--inform-soft: var(--sd-primary-light);--inform-ink: var(--sd-primary-dark, var(--sd-primary))}.c-inform.c-secondary{--inform-tone: var(--sd-secondary);--inform-soft: var(--sd-secondary-light);--inform-ink: var(--sd-secondary-dark, var(--sd-secondary))}.c-inform.c-info{--inform-tone: var(--sd-info);--inform-soft: var(--sd-info-light);--inform-ink: var(--sd-info-dark, var(--sd-info))}.c-inform.c-success{--inform-tone: var(--sd-success);--inform-soft: var(--sd-success-light);--inform-ink: var(--sd-success-dark, var(--sd-success))}.c-inform.c-warning{--inform-tone: var(--sd-warning);--inform-soft: var(--sd-warning-light);--inform-ink: var(--sd-warning-dark, var(--sd-warning))}.c-inform.c-error{--inform-tone: var(--sd-error);--inform-soft: var(--sd-error-light);--inform-ink: var(--sd-error-dark, var(--sd-error))}.c-inform-icon-tile{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:8px;background:var(--inform-soft);color:var(--inform-ink)}.c-inform-icon{width:20px;height:20px;font-size:20px;line-height:20px}.c-inform-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.c-inform-title{font-size:14px;line-height:20px;font-weight:600;color:var(--sd-text);overflow-wrap:anywhere}.c-inform-body{font-size:14px;line-height:21px;color:var(--sd-text);overflow-wrap:anywhere}.c-inform-body.is-clamped{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}.c-inform-action{margin-top:8px;align-self:flex-start}.c-inform-toggle{align-self:flex-start;margin-top:4px;padding:4px 0;border:0;background:transparent;font:inherit;font-size:14px;color:var(--sd-primary-dark);cursor:pointer}.c-inform-toggle:hover{text-decoration:underline}.c-inform-close{display:inline-flex;align-items:center;justify-content:center;flex:0 0 32px;width:32px;height:32px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--sd-text-secondary);cursor:pointer}.c-inform-close:hover{background:var(--sd-black100, #f3f4f6);color:var(--sd-text)}.c-inform-close sd-icon{width:18px;height:18px;font-size:18px;line-height:18px}button:focus-visible{outline:2px solid var(--sd-primary);outline-offset:2px}@media(max-width:600px){.c-inform{padding:12px;gap:10px}.c-inform-close{flex-basis:44px;width:44px;height:44px;margin-top:-6px;margin-right:-6px}.c-inform-toggle{min-height:44px}:host ::ng-deep .c-inform-action button{min-height:44px}}\n"], dependencies: [{ kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "loading", "block", "htmlType"], outputs: ["click"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
165
183
  }
166
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SdInform, decorators: [{
184
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdInform, decorators: [{
167
185
  type: Component,
168
186
  args: [{ selector: 'sd-inform', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [SdButton, SdIcon, CommonModule, SdTranslatePipe], template: "@if (!dismissed()) {\n @let _effectiveIcon = effectiveIcon();\n @let _fontSet = fontSet();\n <div\n class=\"c-inform\"\n [attr.role]=\"liveRole()\"\n [ngClass]=\"colorClasses()\"\n [attr.data-autoId]=\"autoId() || null\"\n [attr.data-autoid]=\"autoId() || null\">\n @if (_effectiveIcon) {\n <span class=\"c-inform-icon-tile\" aria-hidden=\"true\"\n ><sd-icon\n class=\"c-inform-icon c-material-icon\"\n size=\"20px\"\n aria-hidden=\"true\"\n [fontSet]=\"_fontSet\"\n [name]=\"_effectiveIcon\"></sd-icon\n ></span>\n }\n\n @let _actionLabel = actionLabel();\n <div class=\"c-inform-content\">\n @if (title(); as t) {\n <div class=\"c-inform-title\">{{ t }}</div>\n }\n @if (description(); as d) {\n <div #body class=\"c-inform-body\" [class.is-clamped]=\"clampLines() !== null\" [style.-webkit-line-clamp]=\"clampLines()\">\n {{ d }}\n </div>\n }\n @if (showToggle()) {\n <button type=\"button\" class=\"c-inform-toggle\" (click)=\"toggleExpanded()\">\n {{ (expanded() ? 'core.component.inform.show-less' : 'core.component.inform.show-more') | sdTranslate }}\n </button>\n }\n\n @if (hasActionSlot()) {\n <div class=\"c-inform-action\">\n <ng-content select=\"[sdInformAction]\"></ng-content>\n </div>\n } @else if (_actionLabel) {\n <sd-button\n class=\"c-inform-action c-inform-action-link\"\n size=\"sm\"\n type=\"light\"\n color=\"primary\"\n htmlType=\"button\"\n [title]=\"_actionLabel\"\n (click)=\"onAction($event)\"></sd-button>\n }\n </div>\n\n @if (closable()) {\n <button type=\"button\" class=\"c-inform-close\" [attr.aria-label]=\"'core.common.close' | sdTranslate\" (click)=\"onClose($event)\">\n <sd-icon aria-hidden=\"true\" name=\"close\"></sd-icon>\n </button>\n }\n </div>\n}\n", styles: [":host{display:block;min-width:0}.c-inform{--inform-tone: var(--sd-primary);--inform-soft: var(--sd-primary-light);--inform-ink: var(--sd-primary-dark);display:flex;align-items:flex-start;gap:12px;padding:16px;border-radius:8px;border:1px solid color-mix(in srgb,var(--inform-tone) 22%,var(--sd-surface, #fff));background:color-mix(in srgb,var(--inform-soft) 28%,var(--sd-surface, #fff))}.c-inform.c-primary{--inform-tone: var(--sd-primary);--inform-soft: var(--sd-primary-light);--inform-ink: var(--sd-primary-dark, var(--sd-primary))}.c-inform.c-secondary{--inform-tone: var(--sd-secondary);--inform-soft: var(--sd-secondary-light);--inform-ink: var(--sd-secondary-dark, var(--sd-secondary))}.c-inform.c-info{--inform-tone: var(--sd-info);--inform-soft: var(--sd-info-light);--inform-ink: var(--sd-info-dark, var(--sd-info))}.c-inform.c-success{--inform-tone: var(--sd-success);--inform-soft: var(--sd-success-light);--inform-ink: var(--sd-success-dark, var(--sd-success))}.c-inform.c-warning{--inform-tone: var(--sd-warning);--inform-soft: var(--sd-warning-light);--inform-ink: var(--sd-warning-dark, var(--sd-warning))}.c-inform.c-error{--inform-tone: var(--sd-error);--inform-soft: var(--sd-error-light);--inform-ink: var(--sd-error-dark, var(--sd-error))}.c-inform-icon-tile{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:8px;background:var(--inform-soft);color:var(--inform-ink)}.c-inform-icon{width:20px;height:20px;font-size:20px;line-height:20px}.c-inform-content{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.c-inform-title{font-size:14px;line-height:20px;font-weight:600;color:var(--sd-text);overflow-wrap:anywhere}.c-inform-body{font-size:14px;line-height:21px;color:var(--sd-text);overflow-wrap:anywhere}.c-inform-body.is-clamped{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}.c-inform-action{margin-top:8px;align-self:flex-start}.c-inform-toggle{align-self:flex-start;margin-top:4px;padding:4px 0;border:0;background:transparent;font:inherit;font-size:14px;color:var(--sd-primary-dark);cursor:pointer}.c-inform-toggle:hover{text-decoration:underline}.c-inform-close{display:inline-flex;align-items:center;justify-content:center;flex:0 0 32px;width:32px;height:32px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--sd-text-secondary);cursor:pointer}.c-inform-close:hover{background:var(--sd-black100, #f3f4f6);color:var(--sd-text)}.c-inform-close sd-icon{width:18px;height:18px;font-size:18px;line-height:18px}button:focus-visible{outline:2px solid var(--sd-primary);outline-offset:2px}@media(max-width:600px){.c-inform{padding:12px;gap:10px}.c-inform-close{flex-basis:44px;width:44px;height:44px;margin-top:-6px;margin-right:-6px}.c-inform-toggle{min-height:44px}:host ::ng-deep .c-inform-action button{min-height:44px}}\n"] }]
169
187
  }], ctorParameters: () => [], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], primary: [{ type: i0.Input, args: [{ isSignal: true, alias: "primary", required: false }] }], secondary: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondary", required: false }] }], info: [{ type: i0.Input, args: [{ isSignal: true, alias: "info", required: false }] }], success: [{ type: i0.Input, args: [{ isSignal: true, alias: "success", required: false }] }], warning: [{ type: i0.Input, args: [{ isSignal: true, alias: "warning", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], hideIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideIcon", required: false }] }], fontSet: [{ type: i0.Input, args: [{ isSignal: true, alias: "fontSet", required: false }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], actionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionLabel", required: false }] }], lineClamp: [{ type: i0.Input, args: [{ isSignal: true, alias: "lineClamp", required: false }] }], autoId: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoId", required: false }] }], sdClosed: [{ type: i0.Output, args: ["sdClosed"] }], sdAction: [{ type: i0.Output, args: ["sdAction"] }], bodyRef: [{ type: i0.ViewChild, args: ['body', { isSignal: true }] }], actionSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SdInformActionDirective), { isSignal: true }] }] } });
@@ -1 +1 @@
1
- {"version":3,"file":"sdcorejs-angular-components-inform.mjs","sources":["../../../projects/sdcorejs-angular/components/inform/src/inform-action.directive.ts","../../../projects/sdcorejs-angular/components/inform/src/inform.component.ts","../../../projects/sdcorejs-angular/components/inform/src/inform.component.html","../../../projects/sdcorejs-angular/components/inform/sdcorejs-angular-components-inform.ts"],"sourcesContent":["import { Directive } from '@angular/core';\n\n/**\n * Marker cho vùng action custom chiếu vào <sd-inform>.\n * Khi có phần tử mang [sdInformAction], component ẩn link `actionLabel` mặc định.\n */\n@Directive({\n selector: '[sdInformAction]',\n standalone: true,\n})\nexport class SdInformActionDirective {}\n","import { SdButton } from '@sdcorejs/angular/components/button';\nimport { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n afterNextRender,\n booleanAttribute,\n computed,\n contentChild,\n effect,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { Color } from '@sdcorejs/utils/models';\nimport { SdTranslatePipe } from '@sdcorejs/angular/i18n';\nimport { SdInformActionDirective } from './inform-action.directive';\nimport { SdIcon, type SdIconSet } from '@sdcorejs/angular/modules/icon';\n\n// why: mỗi color có icon trạng thái mặc định khi consumer không truyền [icon].\nconst SD_INFORM_DEFAULT_ICON: Record<Color, string> = {\n primary: 'info',\n secondary: 'info',\n info: 'info',\n success: 'check_circle',\n warning: 'warning',\n error: 'error',\n};\n\n@Component({\n selector: 'sd-inform',\n templateUrl: './inform.component.html',\n styleUrl: './inform.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [SdButton, SdIcon, CommonModule, SdTranslatePipe],\n})\nexport class SdInform {\n // 1. INPUTS\n color = input<Color, Color | undefined | null>('primary', {\n transform: value => value || 'primary',\n });\n\n primary = input(false, { transform: booleanAttribute });\n secondary = input(false, { transform: booleanAttribute });\n info = input(false, { transform: booleanAttribute });\n success = input(false, { transform: booleanAttribute });\n warning = input(false, { transform: booleanAttribute });\n error = input(false, { transform: booleanAttribute });\n\n title = input<string | undefined>();\n description = input<string | undefined>();\n icon = input<string | undefined>();\n hideIcon = input(false, { transform: booleanAttribute });\n\n fontSet = input<SdIconSet | undefined, SdIconSet | undefined | null>(undefined, {\n transform: value => value ?? undefined,\n });\n\n closable = input(false, { transform: booleanAttribute });\n actionLabel = input<string | undefined>();\n lineClamp = input<number | undefined>();\n autoId = input<string | undefined>();\n\n // 2. OUTPUTS\n sdClosed = output<Event>();\n sdAction = output<Event>();\n\n // 3. STATE\n readonly dismissed = signal(false);\n readonly expanded = signal(false);\n readonly overflowing = signal(false);\n\n protected readonly bodyRef = viewChild<ElementRef<HTMLElement>>('body');\n protected readonly actionSlot = contentChild(SdInformActionDirective);\n\n // 4. COMPUTED\n effectiveColor = computed<Color>(() => {\n if (this.primary()) return 'primary';\n if (this.secondary()) return 'secondary';\n if (this.info()) return 'info';\n if (this.success()) return 'success';\n if (this.warning()) return 'warning';\n if (this.error()) return 'error';\n return this.color();\n });\n\n colorClasses = computed(() => {\n const c = this.effectiveColor();\n return {\n 'c-primary': c === 'primary',\n 'c-secondary': c === 'secondary',\n 'c-info': c === 'info',\n 'c-success': c === 'success',\n 'c-warning': c === 'warning',\n 'c-error': c === 'error',\n };\n });\n\n effectiveIcon = computed<string | null>(() => {\n if (this.hideIcon()) return null;\n return this.icon()?.trim() || SD_INFORM_DEFAULT_ICON[this.effectiveColor()];\n });\n\n hasActionSlot = computed(() => !!this.actionSlot());\n\n // clamp dòng: null = không clamp (đầy đủ); số = số dòng tối đa.\n clampLines = computed<number | null>(() => {\n const n = this.lineClamp();\n if (!n || n <= 0) return null;\n return this.expanded() ? null : n;\n });\n\n // toggle hiện khi đang clamp và đã từng tràn, hoặc đang mở rộng (để còn thu gọn lại).\n showToggle = computed(() => {\n if (!this.lineClamp()) return false;\n return this.overflowing() || this.expanded();\n });\n\n // why: error/warning là cảnh báo → assertive 'alert'; các màu còn lại là thông tin → polite 'status'.\n liveRole = computed<'alert' | 'status'>(() => {\n const c = this.effectiveColor();\n return c === 'error' || c === 'warning' ? 'alert' : 'status';\n });\n\n // 5. OVERFLOW MEASUREMENT\n #measureScheduled = false;\n\n constructor() {\n // đo lần đầu sau render\n afterNextRender(() => this.measureOverflow());\n // why: re-đo khi nội dung/clamp/expanded đổi; đồng thời gắn ResizeObserver để bắt thay đổi kích thước container (responsive).\n effect(onCleanup => {\n this.description();\n this.lineClamp();\n this.expanded();\n const el = this.bodyRef()?.nativeElement;\n this.#scheduleMeasure();\n // why: guard instanceof Element để test stub (plain object) không làm ResizeObserver.observe ném lỗi.\n if (el instanceof Element && typeof ResizeObserver !== 'undefined') {\n const ro = new ResizeObserver(() => this.measureOverflow());\n ro.observe(el);\n onCleanup(() => ro.disconnect());\n }\n });\n }\n\n #scheduleMeasure(): void {\n if (this.#measureScheduled) return;\n this.#measureScheduled = true;\n // gom nhiều thay đổi vào 1 lần đo sau khi DOM cập nhật xong\n queueMicrotask(() => {\n this.#measureScheduled = false;\n this.measureOverflow();\n });\n }\n\n /** Đo tràn dòng của body; chỉ có ý nghĩa khi đang clamp. */\n measureOverflow(): void {\n const el = this.bodyRef()?.nativeElement;\n if (!el || this.expanded() || !this.lineClamp()) return;\n // +1 chống sai số làm tròn sub-pixel\n this.overflowing.set(el.scrollHeight > el.clientHeight + 1);\n }\n\n // 6. HANDLERS\n toggleExpanded(): void {\n this.expanded.update(v => !v);\n }\n\n onClose(event: Event): void {\n event.stopPropagation();\n this.dismissed.set(true);\n this.sdClosed.emit(event);\n }\n\n onAction(event: Event): void {\n event.stopPropagation();\n this.sdAction.emit(event);\n }\n}\n","@if (!dismissed()) {\n @let _effectiveIcon = effectiveIcon();\n @let _fontSet = fontSet();\n <div\n class=\"c-inform\"\n [attr.role]=\"liveRole()\"\n [ngClass]=\"colorClasses()\"\n [attr.data-autoId]=\"autoId() || null\"\n [attr.data-autoid]=\"autoId() || null\">\n @if (_effectiveIcon) {\n <span class=\"c-inform-icon-tile\" aria-hidden=\"true\"\n ><sd-icon\n class=\"c-inform-icon c-material-icon\"\n size=\"20px\"\n aria-hidden=\"true\"\n [fontSet]=\"_fontSet\"\n [name]=\"_effectiveIcon\"></sd-icon\n ></span>\n }\n\n @let _actionLabel = actionLabel();\n <div class=\"c-inform-content\">\n @if (title(); as t) {\n <div class=\"c-inform-title\">{{ t }}</div>\n }\n @if (description(); as d) {\n <div #body class=\"c-inform-body\" [class.is-clamped]=\"clampLines() !== null\" [style.-webkit-line-clamp]=\"clampLines()\">\n {{ d }}\n </div>\n }\n @if (showToggle()) {\n <button type=\"button\" class=\"c-inform-toggle\" (click)=\"toggleExpanded()\">\n {{ (expanded() ? 'core.component.inform.show-less' : 'core.component.inform.show-more') | sdTranslate }}\n </button>\n }\n\n @if (hasActionSlot()) {\n <div class=\"c-inform-action\">\n <ng-content select=\"[sdInformAction]\"></ng-content>\n </div>\n } @else if (_actionLabel) {\n <sd-button\n class=\"c-inform-action c-inform-action-link\"\n size=\"sm\"\n type=\"light\"\n color=\"primary\"\n htmlType=\"button\"\n [title]=\"_actionLabel\"\n (click)=\"onAction($event)\"></sd-button>\n }\n </div>\n\n @if (closable()) {\n <button type=\"button\" class=\"c-inform-close\" [attr.aria-label]=\"'core.common.close' | sdTranslate\" (click)=\"onClose($event)\">\n <sd-icon aria-hidden=\"true\" name=\"close\"></sd-icon>\n </button>\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAEA;;;AAGG;MAKU,uBAAuB,CAAA;wGAAvB,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,Q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,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,aAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,WAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,QAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,UAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,UAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,MAAM,2FACzB,uBAAuB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE5EtE;;AAEG;;;;"}
1
+ {"version":3,"file":"sdcorejs-angular-components-inform.mjs","sources":["../../../projects/sdcorejs-angular/components/inform/src/inform-action.directive.ts","../../../projects/sdcorejs-angular/components/inform/src/inform.component.ts","../../../projects/sdcorejs-angular/components/inform/src/inform.component.html","../../../projects/sdcorejs-angular/components/inform/sdcorejs-angular-components-inform.ts"],"sourcesContent":["import { Directive } from '@angular/core';\n\n/**\n * Marker cho vùng action custom chiếu vào <sd-inform>.\n * Khi có phần tử mang [sdInformAction], component ẩn link `actionLabel` mặc định.\n */\n@Directive({\n selector: '[sdInformAction]',\n standalone: true,\n})\nexport class SdInformActionDirective {}\n","import { SdButton } from '@sdcorejs/angular/components/button';\nimport { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n afterNextRender,\n booleanAttribute,\n computed,\n contentChild,\n effect,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { Color } from '@sdcorejs/utils/models';\nimport { SdTranslatePipe } from '@sdcorejs/angular/i18n';\nimport { SdInformActionDirective } from './inform-action.directive';\nimport { SdIcon, type SdIconSet } from '@sdcorejs/angular/modules/icon';\n\n// why: mỗi color có icon trạng thái mặc định khi consumer không truyền [icon].\nconst SD_INFORM_DEFAULT_ICON: Record<Color, string> = {\n primary: 'info',\n secondary: 'info',\n info: 'info',\n success: 'check_circle',\n warning: 'warning',\n error: 'error',\n};\n\n@Component({\n selector: 'sd-inform',\n templateUrl: './inform.component.html',\n styleUrl: './inform.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [SdButton, SdIcon, CommonModule, SdTranslatePipe],\n})\nexport class SdInform {\n // 1. INPUTS\n color = input<Color, Color | undefined | null>('primary', {\n transform: value => value || 'primary',\n });\n\n primary = input(false, { transform: booleanAttribute });\n secondary = input(false, { transform: booleanAttribute });\n info = input(false, { transform: booleanAttribute });\n success = input(false, { transform: booleanAttribute });\n warning = input(false, { transform: booleanAttribute });\n error = input(false, { transform: booleanAttribute });\n\n title = input<string | undefined>();\n description = input<string | undefined>();\n icon = input<string | undefined>();\n hideIcon = input(false, { transform: booleanAttribute });\n\n fontSet = input<SdIconSet | undefined, SdIconSet | undefined | null>(undefined, {\n transform: value => value ?? undefined,\n });\n\n closable = input(false, { transform: booleanAttribute });\n actionLabel = input<string | undefined>();\n lineClamp = input<number | undefined>();\n autoId = input<string | undefined>();\n\n // 2. OUTPUTS\n sdClosed = output<Event>();\n sdAction = output<Event>();\n\n // 3. STATE\n readonly dismissed = signal(false);\n readonly expanded = signal(false);\n readonly overflowing = signal(false);\n\n protected readonly bodyRef = viewChild<ElementRef<HTMLElement>>('body');\n protected readonly actionSlot = contentChild(SdInformActionDirective);\n\n // 4. COMPUTED\n effectiveColor = computed<Color>(() => {\n if (this.primary()) return 'primary';\n if (this.secondary()) return 'secondary';\n if (this.info()) return 'info';\n if (this.success()) return 'success';\n if (this.warning()) return 'warning';\n if (this.error()) return 'error';\n return this.color();\n });\n\n colorClasses = computed(() => {\n const c = this.effectiveColor();\n return {\n 'c-primary': c === 'primary',\n 'c-secondary': c === 'secondary',\n 'c-info': c === 'info',\n 'c-success': c === 'success',\n 'c-warning': c === 'warning',\n 'c-error': c === 'error',\n };\n });\n\n effectiveIcon = computed<string | null>(() => {\n if (this.hideIcon()) return null;\n return this.icon()?.trim() || SD_INFORM_DEFAULT_ICON[this.effectiveColor()];\n });\n\n hasActionSlot = computed(() => !!this.actionSlot());\n\n // clamp dòng: null = không clamp (đầy đủ); số = số dòng tối đa.\n clampLines = computed<number | null>(() => {\n const n = this.lineClamp();\n if (!n || n <= 0) return null;\n return this.expanded() ? null : n;\n });\n\n // toggle hiện khi đang clamp và đã từng tràn, hoặc đang mở rộng (để còn thu gọn lại).\n showToggle = computed(() => {\n if (!this.lineClamp()) return false;\n return this.overflowing() || this.expanded();\n });\n\n // why: error/warning là cảnh báo → assertive 'alert'; các màu còn lại là thông tin → polite 'status'.\n liveRole = computed<'alert' | 'status'>(() => {\n const c = this.effectiveColor();\n return c === 'error' || c === 'warning' ? 'alert' : 'status';\n });\n\n // 5. OVERFLOW MEASUREMENT\n #measureScheduled = false;\n\n constructor() {\n // đo lần đầu sau render\n afterNextRender(() => this.measureOverflow());\n // why: re-đo khi nội dung/clamp/expanded đổi; đồng thời gắn ResizeObserver để bắt thay đổi kích thước container (responsive).\n effect(onCleanup => {\n this.description();\n this.lineClamp();\n this.expanded();\n const el = this.bodyRef()?.nativeElement;\n this.#scheduleMeasure();\n // why: guard instanceof Element để test stub (plain object) không làm ResizeObserver.observe ném lỗi.\n if (el instanceof Element && typeof ResizeObserver !== 'undefined') {\n const ro = new ResizeObserver(() => this.measureOverflow());\n ro.observe(el);\n onCleanup(() => ro.disconnect());\n }\n });\n }\n\n #scheduleMeasure(): void {\n if (this.#measureScheduled) return;\n this.#measureScheduled = true;\n // gom nhiều thay đổi vào 1 lần đo sau khi DOM cập nhật xong\n queueMicrotask(() => {\n this.#measureScheduled = false;\n this.measureOverflow();\n });\n }\n\n /** Đo tràn dòng của body; chỉ có ý nghĩa khi đang clamp. */\n measureOverflow(): void {\n const el = this.bodyRef()?.nativeElement;\n if (!el || this.expanded() || !this.lineClamp()) return;\n // +1 chống sai số làm tròn sub-pixel\n this.overflowing.set(el.scrollHeight > el.clientHeight + 1);\n }\n\n // 6. HANDLERS\n toggleExpanded(): void {\n this.expanded.update(v => !v);\n }\n\n onClose(event: Event): void {\n event.stopPropagation();\n this.dismissed.set(true);\n this.sdClosed.emit(event);\n }\n\n onAction(event: Event): void {\n event.stopPropagation();\n this.sdAction.emit(event);\n }\n}\n","@if (!dismissed()) {\n @let _effectiveIcon = effectiveIcon();\n @let _fontSet = fontSet();\n <div\n class=\"c-inform\"\n [attr.role]=\"liveRole()\"\n [ngClass]=\"colorClasses()\"\n [attr.data-autoId]=\"autoId() || null\"\n [attr.data-autoid]=\"autoId() || null\">\n @if (_effectiveIcon) {\n <span class=\"c-inform-icon-tile\" aria-hidden=\"true\"\n ><sd-icon\n class=\"c-inform-icon c-material-icon\"\n size=\"20px\"\n aria-hidden=\"true\"\n [fontSet]=\"_fontSet\"\n [name]=\"_effectiveIcon\"></sd-icon\n ></span>\n }\n\n @let _actionLabel = actionLabel();\n <div class=\"c-inform-content\">\n @if (title(); as t) {\n <div class=\"c-inform-title\">{{ t }}</div>\n }\n @if (description(); as d) {\n <div #body class=\"c-inform-body\" [class.is-clamped]=\"clampLines() !== null\" [style.-webkit-line-clamp]=\"clampLines()\">\n {{ d }}\n </div>\n }\n @if (showToggle()) {\n <button type=\"button\" class=\"c-inform-toggle\" (click)=\"toggleExpanded()\">\n {{ (expanded() ? 'core.component.inform.show-less' : 'core.component.inform.show-more') | sdTranslate }}\n </button>\n }\n\n @if (hasActionSlot()) {\n <div class=\"c-inform-action\">\n <ng-content select=\"[sdInformAction]\"></ng-content>\n </div>\n } @else if (_actionLabel) {\n <sd-button\n class=\"c-inform-action c-inform-action-link\"\n size=\"sm\"\n type=\"light\"\n color=\"primary\"\n htmlType=\"button\"\n [title]=\"_actionLabel\"\n (click)=\"onAction($event)\"></sd-button>\n }\n </div>\n\n @if (closable()) {\n <button type=\"button\" class=\"c-inform-close\" [attr.aria-label]=\"'core.common.close' | sdTranslate\" (click)=\"onClose($event)\">\n <sd-icon aria-hidden=\"true\" name=\"close\"></sd-icon>\n </button>\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAEA;;;AAGG;MAKU,uBAAuB,CAAA;uGAAvB,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAJnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;ACYD;AACA,MAAM,sBAAsB,GAA0B;AACpD,IAAA,OAAO,EAAE,MAAM;AACf,IA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AAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,MAAM,2FACzB,uBAAuB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE5EtE;;AAEG;;"}
@@ -4,11 +4,16 @@ import { I18nService } from '@sdcorejs/angular/i18n';
4
4
  import { SdTaskService } from '@sdcorejs/angular/services/task';
5
5
 
6
6
  class SdJobProgress {
7
- taskId = input(undefined, ...(ngDevMode ? [{ debugName: "taskId" }] : /* istanbul ignore next */ []));
8
- state = input(undefined, ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
9
- mode = input('bar', ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
10
- title = input(undefined, ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
11
- message = input(undefined, ...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
7
+ taskId = input(undefined, /* @ts-ignore */
8
+ ...(ngDevMode ? [{ debugName: "taskId" }] : /* istanbul ignore next */ []));
9
+ state = input(undefined, /* @ts-ignore */
10
+ ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
11
+ mode = input('bar', /* @ts-ignore */
12
+ ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
13
+ title = input(undefined, /* @ts-ignore */
14
+ ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
15
+ message = input(undefined, /* @ts-ignore */
16
+ ...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
12
17
  showActions = input(true, { ...(ngDevMode ? { debugName: "showActions" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
13
18
  sdCancel = output();
14
19
  sdRetry = output();
@@ -19,33 +24,46 @@ class SdJobProgress {
19
24
  return undefined;
20
25
  const id = this.taskId();
21
26
  return id ? this.#tasks.get(id) : undefined;
22
- }, ...(ngDevMode ? [{ debugName: "task" }] : /* istanbul ignore next */ []));
23
- resolvedState = computed(() => this.state() ?? this.task()?.state(), ...(ngDevMode ? [{ debugName: "resolvedState" }] : /* istanbul ignore next */ []));
27
+ }, /* @ts-ignore */
28
+ ...(ngDevMode ? [{ debugName: "task" }] : /* istanbul ignore next */ []));
29
+ resolvedState = computed(() => this.state() ?? this.task()?.state(), /* @ts-ignore */
30
+ ...(ngDevMode ? [{ debugName: "resolvedState" }] : /* istanbul ignore next */ []));
24
31
  progress = computed(() => {
25
32
  const value = this.resolvedState()?.progress;
26
33
  return value === undefined || !Number.isFinite(value) ? undefined : Math.max(0, Math.min(100, value));
27
- }, ...(ngDevMode ? [{ debugName: "progress" }] : /* istanbul ignore next */ []));
28
- effectiveTitle = computed(() => this.title() ?? this.resolvedState()?.title, ...(ngDevMode ? [{ debugName: "effectiveTitle" }] : /* istanbul ignore next */ []));
29
- effectiveMessage = computed(() => this.message() ?? this.resolvedState()?.message, ...(ngDevMode ? [{ debugName: "effectiveMessage" }] : /* istanbul ignore next */ []));
30
- statusLabel = computed(() => this.#i18n.t(`core.component.job-progress.status.${this.resolvedState()?.status ?? 'idle'}`), ...(ngDevMode ? [{ debugName: "statusLabel" }] : /* istanbul ignore next */ []));
34
+ }, /* @ts-ignore */
35
+ ...(ngDevMode ? [{ debugName: "progress" }] : /* istanbul ignore next */ []));
36
+ effectiveTitle = computed(() => this.title() ?? this.resolvedState()?.title, /* @ts-ignore */
37
+ ...(ngDevMode ? [{ debugName: "effectiveTitle" }] : /* istanbul ignore next */ []));
38
+ effectiveMessage = computed(() => this.message() ?? this.resolvedState()?.message, /* @ts-ignore */
39
+ ...(ngDevMode ? [{ debugName: "effectiveMessage" }] : /* istanbul ignore next */ []));
40
+ statusLabel = computed(() => this.#i18n.t(`core.component.job-progress.status.${this.resolvedState()?.status ?? 'idle'}`), /* @ts-ignore */
41
+ ...(ngDevMode ? [{ debugName: "statusLabel" }] : /* istanbul ignore next */ []));
31
42
  progressLabel = computed(() => {
32
43
  const title = this.effectiveTitle();
33
44
  return title ? `${title}: ${this.statusLabel()}` : this.statusLabel();
34
- }, ...(ngDevMode ? [{ debugName: "progressLabel" }] : /* istanbul ignore next */ []));
35
- cancelLabel = computed(() => this.#i18n.t('core.component.job-progress.cancel'), ...(ngDevMode ? [{ debugName: "cancelLabel" }] : /* istanbul ignore next */ []));
36
- retryLabel = computed(() => this.#i18n.t('core.component.job-progress.retry'), ...(ngDevMode ? [{ debugName: "retryLabel" }] : /* istanbul ignore next */ []));
37
- displayedError = computed(() => formatError(this.resolvedState()?.error ?? this.task()?.error()), ...(ngDevMode ? [{ debugName: "displayedError" }] : /* istanbul ignore next */ []));
45
+ }, /* @ts-ignore */
46
+ ...(ngDevMode ? [{ debugName: "progressLabel" }] : /* istanbul ignore next */ []));
47
+ cancelLabel = computed(() => this.#i18n.t('core.component.job-progress.cancel'), /* @ts-ignore */
48
+ ...(ngDevMode ? [{ debugName: "cancelLabel" }] : /* istanbul ignore next */ []));
49
+ retryLabel = computed(() => this.#i18n.t('core.component.job-progress.retry'), /* @ts-ignore */
50
+ ...(ngDevMode ? [{ debugName: "retryLabel" }] : /* istanbul ignore next */ []));
51
+ displayedError = computed(() => formatError(this.resolvedState()?.error ?? this.task()?.error()), /* @ts-ignore */
52
+ ...(ngDevMode ? [{ debugName: "displayedError" }] : /* istanbul ignore next */ []));
38
53
  active = computed(() => {
39
54
  const status = this.resolvedState()?.status;
40
55
  return status === 'queued' || status === 'running';
41
- }, ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
42
- canCancel = computed(() => this.showActions() && this.active() && (this.task()?.canCancel() ?? true), ...(ngDevMode ? [{ debugName: "canCancel" }] : /* istanbul ignore next */ []));
56
+ }, /* @ts-ignore */
57
+ ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
58
+ canCancel = computed(() => this.showActions() && this.active() && (this.task()?.canCancel() ?? true), /* @ts-ignore */
59
+ ...(ngDevMode ? [{ debugName: "canCancel" }] : /* istanbul ignore next */ []));
43
60
  canRetry = computed(() => {
44
61
  if (!this.showActions())
45
62
  return false;
46
63
  const status = this.resolvedState()?.status;
47
64
  return this.task()?.canRetry() ?? (status === 'failed' || status === 'cancelled');
48
- }, ...(ngDevMode ? [{ debugName: "canRetry" }] : /* istanbul ignore next */ []));
65
+ }, /* @ts-ignore */
66
+ ...(ngDevMode ? [{ debugName: "canRetry" }] : /* istanbul ignore next */ []));
49
67
  get modeAttr() {
50
68
  return this.mode();
51
69
  }
@@ -65,10 +83,10 @@ class SdJobProgress {
65
83
  this.#tasks.retry(id);
66
84
  this.sdRetry.emit();
67
85
  }
68
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SdJobProgress, deps: [], target: i0.ɵɵFactoryTarget.Component });
69
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: SdJobProgress, isStandalone: true, selector: "sd-job-progress", inputs: { taskId: { classPropertyName: "taskId", publicName: "taskId", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, showActions: { classPropertyName: "showActions", publicName: "showActions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sdCancel: "sdCancel", sdRetry: "sdRetry" }, host: { properties: { "attr.data-mode": "this.modeAttr", "attr.data-status": "this.statusAttr", "attr.aria-live": "this.ariaLive" } }, ngImport: i0, template: "@if (resolvedState()) {\n <section class=\"sd-job-progress\" [attr.aria-label]=\"progressLabel()\">\n <div class=\"sd-job-progress__header\">\n <div class=\"sd-job-progress__identity\">\n @if (effectiveTitle()) {\n <strong class=\"sd-job-progress__title\">{{ effectiveTitle() }}</strong>\n }\n <span class=\"sd-job-progress__status\">{{ statusLabel() }}</span>\n </div>\n\n @if (progress() !== undefined) {\n <span class=\"sd-job-progress__percentage\">{{ progress() }}%</span>\n }\n </div>\n\n @if (active() || progress() !== undefined) {\n <div\n class=\"sd-job-progress__track\"\n role=\"progressbar\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuenow]=\"progress()\"\n [attr.aria-label]=\"progressLabel()\"\n [attr.data-indeterminate]=\"progress() === undefined ? 'true' : 'false'\">\n <span\n class=\"sd-job-progress__fill\"\n [class.sd-job-progress__fill--indeterminate]=\"progress() === undefined\"\n [style.width.%]=\"progress() ?? 30\"></span>\n </div>\n }\n\n @if (mode() === 'details' && effectiveMessage()) {\n <p class=\"sd-job-progress__message\" data-task-details>{{ effectiveMessage() }}</p>\n }\n\n @if (displayedError()) {\n <p class=\"sd-job-progress__error\" role=\"alert\">{{ displayedError() }}</p>\n }\n\n @if (canCancel() || canRetry()) {\n <div class=\"sd-job-progress__actions\">\n @if (canCancel()) {\n <button type=\"button\" data-task-cancel (click)=\"onCancel()\">\n {{ cancelLabel() }}\n </button>\n }\n @if (canRetry()) {\n <button type=\"button\" data-task-retry (click)=\"onRetry()\">\n {{ retryLabel() }}\n </button>\n }\n </div>\n }\n </section>\n}\n", styles: [":host{display:block}.sd-job-progress{display:grid;gap:8px;padding:12px;border:1px solid var(--sd-border-color, #dfe3e8);border-radius:8px;background:var(--sd-surface, #fff)}.sd-job-progress__header,.sd-job-progress__identity,.sd-job-progress__actions{display:flex;align-items:center;gap:8px}.sd-job-progress__header{justify-content:space-between}.sd-job-progress__identity{min-width:0;flex-wrap:wrap}.sd-job-progress__title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-job-progress__status,.sd-job-progress__percentage,.sd-job-progress__message{color:var(--sd-text-muted, #5f6772);font-size:.875rem}.sd-job-progress__track{position:relative;height:8px;overflow:hidden;border-radius:999px;background:var(--sd-progress-track, #e8edf3)}.sd-job-progress__fill{display:block;height:100%;border-radius:inherit;background:var(--sd-primary, #1565c0);transition:width .16s ease}.sd-job-progress__fill--indeterminate{animation:sd-job-progress-indeterminate 1.2s ease-in-out infinite}.sd-job-progress__message,.sd-job-progress__error{margin:0}.sd-job-progress__error{color:var(--sd-error, #ba1a1a)}.sd-job-progress__actions{justify-content:flex-end}.sd-job-progress__actions button{padding:6px 10px;border:1px solid currentColor;border-radius:6px;color:var(--sd-primary, #1565c0);background:transparent;cursor:pointer}:host([data-mode=compact]) .sd-job-progress{grid-template-columns:minmax(0,1fr) minmax(80px,30%);align-items:center;padding:8px 10px}:host([data-mode=compact]) .sd-job-progress__actions,:host([data-mode=compact]) .sd-job-progress__error{grid-column:1/-1}@keyframes sd-job-progress-indeterminate{0%{transform:translate(-120%)}to{transform:translate(380%)}}@media(prefers-reduced-motion:reduce){.sd-job-progress__fill{transition:none}.sd-job-progress__fill--indeterminate{animation:none}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
86
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdJobProgress, deps: [], target: i0.ɵɵFactoryTarget.Component });
87
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: SdJobProgress, isStandalone: true, selector: "sd-job-progress", inputs: { taskId: { classPropertyName: "taskId", publicName: "taskId", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, showActions: { classPropertyName: "showActions", publicName: "showActions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sdCancel: "sdCancel", sdRetry: "sdRetry" }, host: { properties: { "attr.data-mode": "this.modeAttr", "attr.data-status": "this.statusAttr", "attr.aria-live": "this.ariaLive" } }, ngImport: i0, template: "@if (resolvedState()) {\n <section class=\"sd-job-progress\" [attr.aria-label]=\"progressLabel()\">\n <div class=\"sd-job-progress__header\">\n <div class=\"sd-job-progress__identity\">\n @if (effectiveTitle()) {\n <strong class=\"sd-job-progress__title\">{{ effectiveTitle() }}</strong>\n }\n <span class=\"sd-job-progress__status\">{{ statusLabel() }}</span>\n </div>\n\n @if (progress() !== undefined) {\n <span class=\"sd-job-progress__percentage\">{{ progress() }}%</span>\n }\n </div>\n\n @if (active() || progress() !== undefined) {\n <div\n class=\"sd-job-progress__track\"\n role=\"progressbar\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuenow]=\"progress()\"\n [attr.aria-label]=\"progressLabel()\"\n [attr.data-indeterminate]=\"progress() === undefined ? 'true' : 'false'\">\n <span\n class=\"sd-job-progress__fill\"\n [class.sd-job-progress__fill--indeterminate]=\"progress() === undefined\"\n [style.width.%]=\"progress() ?? 30\"></span>\n </div>\n }\n\n @if (mode() === 'details' && effectiveMessage()) {\n <p class=\"sd-job-progress__message\" data-task-details>{{ effectiveMessage() }}</p>\n }\n\n @if (displayedError()) {\n <p class=\"sd-job-progress__error\" role=\"alert\">{{ displayedError() }}</p>\n }\n\n @if (canCancel() || canRetry()) {\n <div class=\"sd-job-progress__actions\">\n @if (canCancel()) {\n <button type=\"button\" data-task-cancel (click)=\"onCancel()\">\n {{ cancelLabel() }}\n </button>\n }\n @if (canRetry()) {\n <button type=\"button\" data-task-retry (click)=\"onRetry()\">\n {{ retryLabel() }}\n </button>\n }\n </div>\n }\n </section>\n}\n", styles: [":host{display:block}.sd-job-progress{display:grid;gap:8px;padding:12px;border:1px solid var(--sd-border-color, #dfe3e8);border-radius:8px;background:var(--sd-surface, #fff)}.sd-job-progress__header,.sd-job-progress__identity,.sd-job-progress__actions{display:flex;align-items:center;gap:8px}.sd-job-progress__header{justify-content:space-between}.sd-job-progress__identity{min-width:0;flex-wrap:wrap}.sd-job-progress__title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-job-progress__status,.sd-job-progress__percentage,.sd-job-progress__message{color:var(--sd-text-muted, #5f6772);font-size:.875rem}.sd-job-progress__track{position:relative;height:8px;overflow:hidden;border-radius:999px;background:var(--sd-progress-track, #e8edf3)}.sd-job-progress__fill{display:block;height:100%;border-radius:inherit;background:var(--sd-primary, #1565c0);transition:width .16s ease}.sd-job-progress__fill--indeterminate{animation:sd-job-progress-indeterminate 1.2s ease-in-out infinite}.sd-job-progress__message,.sd-job-progress__error{margin:0}.sd-job-progress__error{color:var(--sd-error, #ba1a1a)}.sd-job-progress__actions{justify-content:flex-end}.sd-job-progress__actions button{padding:6px 10px;border:1px solid currentColor;border-radius:6px;color:var(--sd-primary, #1565c0);background:transparent;cursor:pointer}:host([data-mode=compact]) .sd-job-progress{grid-template-columns:minmax(0,1fr) minmax(80px,30%);align-items:center;padding:8px 10px}:host([data-mode=compact]) .sd-job-progress__actions,:host([data-mode=compact]) .sd-job-progress__error{grid-column:1/-1}@keyframes sd-job-progress-indeterminate{0%{transform:translate(-120%)}to{transform:translate(380%)}}@media(prefers-reduced-motion:reduce){.sd-job-progress__fill{transition:none}.sd-job-progress__fill--indeterminate{animation:none}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
70
88
  }
71
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SdJobProgress, decorators: [{
89
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdJobProgress, decorators: [{
72
90
  type: Component,
73
91
  args: [{ selector: 'sd-job-progress', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (resolvedState()) {\n <section class=\"sd-job-progress\" [attr.aria-label]=\"progressLabel()\">\n <div class=\"sd-job-progress__header\">\n <div class=\"sd-job-progress__identity\">\n @if (effectiveTitle()) {\n <strong class=\"sd-job-progress__title\">{{ effectiveTitle() }}</strong>\n }\n <span class=\"sd-job-progress__status\">{{ statusLabel() }}</span>\n </div>\n\n @if (progress() !== undefined) {\n <span class=\"sd-job-progress__percentage\">{{ progress() }}%</span>\n }\n </div>\n\n @if (active() || progress() !== undefined) {\n <div\n class=\"sd-job-progress__track\"\n role=\"progressbar\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuenow]=\"progress()\"\n [attr.aria-label]=\"progressLabel()\"\n [attr.data-indeterminate]=\"progress() === undefined ? 'true' : 'false'\">\n <span\n class=\"sd-job-progress__fill\"\n [class.sd-job-progress__fill--indeterminate]=\"progress() === undefined\"\n [style.width.%]=\"progress() ?? 30\"></span>\n </div>\n }\n\n @if (mode() === 'details' && effectiveMessage()) {\n <p class=\"sd-job-progress__message\" data-task-details>{{ effectiveMessage() }}</p>\n }\n\n @if (displayedError()) {\n <p class=\"sd-job-progress__error\" role=\"alert\">{{ displayedError() }}</p>\n }\n\n @if (canCancel() || canRetry()) {\n <div class=\"sd-job-progress__actions\">\n @if (canCancel()) {\n <button type=\"button\" data-task-cancel (click)=\"onCancel()\">\n {{ cancelLabel() }}\n </button>\n }\n @if (canRetry()) {\n <button type=\"button\" data-task-retry (click)=\"onRetry()\">\n {{ retryLabel() }}\n </button>\n }\n </div>\n }\n </section>\n}\n", styles: [":host{display:block}.sd-job-progress{display:grid;gap:8px;padding:12px;border:1px solid var(--sd-border-color, #dfe3e8);border-radius:8px;background:var(--sd-surface, #fff)}.sd-job-progress__header,.sd-job-progress__identity,.sd-job-progress__actions{display:flex;align-items:center;gap:8px}.sd-job-progress__header{justify-content:space-between}.sd-job-progress__identity{min-width:0;flex-wrap:wrap}.sd-job-progress__title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-job-progress__status,.sd-job-progress__percentage,.sd-job-progress__message{color:var(--sd-text-muted, #5f6772);font-size:.875rem}.sd-job-progress__track{position:relative;height:8px;overflow:hidden;border-radius:999px;background:var(--sd-progress-track, #e8edf3)}.sd-job-progress__fill{display:block;height:100%;border-radius:inherit;background:var(--sd-primary, #1565c0);transition:width .16s ease}.sd-job-progress__fill--indeterminate{animation:sd-job-progress-indeterminate 1.2s ease-in-out infinite}.sd-job-progress__message,.sd-job-progress__error{margin:0}.sd-job-progress__error{color:var(--sd-error, #ba1a1a)}.sd-job-progress__actions{justify-content:flex-end}.sd-job-progress__actions button{padding:6px 10px;border:1px solid currentColor;border-radius:6px;color:var(--sd-primary, #1565c0);background:transparent;cursor:pointer}:host([data-mode=compact]) .sd-job-progress{grid-template-columns:minmax(0,1fr) minmax(80px,30%);align-items:center;padding:8px 10px}:host([data-mode=compact]) .sd-job-progress__actions,:host([data-mode=compact]) .sd-job-progress__error{grid-column:1/-1}@keyframes sd-job-progress-indeterminate{0%{transform:translate(-120%)}to{transform:translate(380%)}}@media(prefers-reduced-motion:reduce){.sd-job-progress__fill{transition:none}.sd-job-progress__fill--indeterminate{animation:none}}\n"] }]
74
92
  }], propDecorators: { taskId: [{ type: i0.Input, args: [{ isSignal: true, alias: "taskId", required: false }] }], state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], showActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "showActions", required: false }] }], sdCancel: [{ type: i0.Output, args: ["sdCancel"] }], sdRetry: [{ type: i0.Output, args: ["sdRetry"] }], modeAttr: [{
@@ -1 +1 @@
1
- {"version":3,"file":"sdcorejs-angular-components-job-progress.mjs","sources":["../../../projects/sdcorejs-angular/components/job-progress/src/job-progress.component.ts","../../../projects/sdcorejs-angular/components/job-progress/src/job-progress.component.html","../../../projects/sdcorejs-angular/components/job-progress/sdcorejs-angular-components-job-progress.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, HostBinding, booleanAttribute, computed, inject, input, output } from '@angular/core';\nimport { I18nService } from '@sdcorejs/angular/i18n';\nimport { SdTaskService, SdTaskState, SdTaskStatus, SdTaskView } from '@sdcorejs/angular/services/task';\n\nexport type SdJobProgressMode = 'bar' | 'compact' | 'details';\n\n@Component({\n selector: 'sd-job-progress',\n standalone: true,\n templateUrl: './job-progress.component.html',\n styleUrl: './job-progress.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SdJobProgress {\n readonly taskId = input<string | undefined>(undefined);\n readonly state = input<SdTaskState | undefined>(undefined);\n readonly mode = input<SdJobProgressMode>('bar');\n readonly title = input<string | undefined>(undefined);\n readonly message = input<string | undefined>(undefined);\n readonly showActions = input(true, { transform: booleanAttribute });\n\n readonly sdCancel = output<void>();\n readonly sdRetry = output<void>();\n\n readonly #tasks = inject(SdTaskService);\n readonly #i18n = inject(I18nService);\n\n readonly task = computed<SdTaskView | undefined>(() => {\n if (this.state()) return undefined;\n const id = this.taskId();\n return id ? this.#tasks.get(id) : undefined;\n });\n readonly resolvedState = computed<SdTaskState | undefined>(() => this.state() ?? this.task()?.state());\n readonly progress = computed<number | undefined>(() => {\n const value = this.resolvedState()?.progress;\n return value === undefined || !Number.isFinite(value) ? undefined : Math.max(0, Math.min(100, value));\n });\n readonly effectiveTitle = computed(() => this.title() ?? this.resolvedState()?.title);\n readonly effectiveMessage = computed(() => this.message() ?? this.resolvedState()?.message);\n readonly statusLabel = computed(() => this.#i18n.t(`core.component.job-progress.status.${this.resolvedState()?.status ?? 'idle'}`));\n readonly progressLabel = computed(() => {\n const title = this.effectiveTitle();\n return title ? `${title}: ${this.statusLabel()}` : this.statusLabel();\n });\n readonly cancelLabel = computed(() => this.#i18n.t('core.component.job-progress.cancel'));\n readonly retryLabel = computed(() => this.#i18n.t('core.component.job-progress.retry'));\n readonly displayedError = computed(() => formatError(this.resolvedState()?.error ?? this.task()?.error()));\n readonly active = computed(() => {\n const status = this.resolvedState()?.status;\n return status === 'queued' || status === 'running';\n });\n readonly canCancel = computed(() => this.showActions() && this.active() && (this.task()?.canCancel() ?? true));\n readonly canRetry = computed(() => {\n if (!this.showActions()) return false;\n const status = this.resolvedState()?.status;\n return this.task()?.canRetry() ?? (status === 'failed' || status === 'cancelled');\n });\n\n @HostBinding('attr.data-mode') get modeAttr(): SdJobProgressMode {\n return this.mode();\n }\n\n @HostBinding('attr.data-status') get statusAttr(): SdTaskStatus {\n return this.resolvedState()?.status ?? 'idle';\n }\n\n @HostBinding('attr.aria-live') readonly ariaLive = 'polite';\n\n onCancel(): void {\n const id = this.taskId();\n if (id && this.task()) void this.#tasks.cancel(id);\n this.sdCancel.emit();\n }\n\n onRetry(): void {\n const id = this.taskId();\n if (id && this.task()) this.#tasks.retry(id);\n this.sdRetry.emit();\n }\n}\n\nfunction formatError(error: unknown): string | undefined {\n if (error === null || error === undefined) return undefined;\n if (error instanceof Error) return error.message;\n return typeof error === 'string' ? error : String(error);\n}\n","@if (resolvedState()) {\n <section class=\"sd-job-progress\" [attr.aria-label]=\"progressLabel()\">\n <div class=\"sd-job-progress__header\">\n <div class=\"sd-job-progress__identity\">\n @if (effectiveTitle()) {\n <strong class=\"sd-job-progress__title\">{{ effectiveTitle() }}</strong>\n }\n <span class=\"sd-job-progress__status\">{{ statusLabel() }}</span>\n </div>\n\n @if (progress() !== undefined) {\n <span class=\"sd-job-progress__percentage\">{{ progress() }}%</span>\n }\n </div>\n\n @if (active() || progress() !== undefined) {\n <div\n class=\"sd-job-progress__track\"\n role=\"progressbar\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuenow]=\"progress()\"\n [attr.aria-label]=\"progressLabel()\"\n [attr.data-indeterminate]=\"progress() === undefined ? 'true' : 'false'\">\n <span\n class=\"sd-job-progress__fill\"\n [class.sd-job-progress__fill--indeterminate]=\"progress() === undefined\"\n [style.width.%]=\"progress() ?? 30\"></span>\n </div>\n }\n\n @if (mode() === 'details' && effectiveMessage()) {\n <p class=\"sd-job-progress__message\" data-task-details>{{ effectiveMessage() }}</p>\n }\n\n @if (displayedError()) {\n <p class=\"sd-job-progress__error\" role=\"alert\">{{ displayedError() }}</p>\n }\n\n @if (canCancel() || canRetry()) {\n <div class=\"sd-job-progress__actions\">\n @if (canCancel()) {\n <button type=\"button\" data-task-cancel (click)=\"onCancel()\">\n {{ cancelLabel() }}\n </button>\n }\n @if (canRetry()) {\n <button type=\"button\" data-task-retry (click)=\"onRetry()\">\n {{ retryLabel() }}\n </button>\n }\n </div>\n }\n </section>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAaa,aAAa,CAAA;AACf,IAAA,MAAM,GAAG,KAAK,CAAqB,SAAS,6EAAC;AAC7C,IAAA,KAAK,GAAG,KAAK,CAA0B,SAAS,4EAAC;AACjD,IAAA,IAAI,GAAG,KAAK,CAAoB,KAAK,2EAAC;AACtC,IAAA,KAAK,GAAG,KAAK,CAAqB,SAAS,4EAAC;AAC5C,IAAA,OAAO,GAAG,KAAK,CAAqB,SAAS,8EAAC;IAC9C,WAAW,GAAG,KAAK,CAAC,IAAI,mFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IAE1D,QAAQ,GAAG,MAAM,EAAQ;IACzB,OAAO,GAAG,MAAM,EAAQ;AAExB,IAAA,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC;AAC9B,IAAA,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC;AAE3B,IAAA,IAAI,GAAG,QAAQ,CAAyB,MAAK;QACpD,IAAI,IAAI,CAAC,KAAK,EAAE;AAAE,YAAA,OAAO,SAAS;AAClC,QAAA,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE;AACxB,QAAA,OAAO,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS;AAC7C,IAAA,CAAC,2EAAC;AACO,IAAA,aAAa,GAAG,QAAQ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,WAAW;uBAAC,gBAAgB;;AAe/B,SAAS,WAAW,CAAC,KAAc,EAAA;AACjC,IAAA,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;AAAE,QAAA,OAAO,SAAS;IAC3D,IAAI,KAAK,YAAY,KAAK;QAAE,OAAO,KAAK,CAAC,OAAO;AAChD,IAAA,OAAO,OAAO,KAAK,KAAK,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;AAC1D;;AErFA;;AAEG;;;;"}
1
+ {"version":3,"file":"sdcorejs-angular-components-job-progress.mjs","sources":["../../../projects/sdcorejs-angular/components/job-progress/src/job-progress.component.ts","../../../projects/sdcorejs-angular/components/job-progress/src/job-progress.component.html","../../../projects/sdcorejs-angular/components/job-progress/sdcorejs-angular-components-job-progress.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, HostBinding, booleanAttribute, computed, inject, input, output } from '@angular/core';\nimport { I18nService } from '@sdcorejs/angular/i18n';\nimport { SdTaskService, SdTaskState, SdTaskStatus, SdTaskView } from '@sdcorejs/angular/services/task';\n\nexport type SdJobProgressMode = 'bar' | 'compact' | 'details';\n\n@Component({\n selector: 'sd-job-progress',\n standalone: true,\n templateUrl: './job-progress.component.html',\n styleUrl: './job-progress.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SdJobProgress {\n readonly taskId = input<string | undefined>(undefined);\n readonly state = input<SdTaskState | undefined>(undefined);\n readonly mode = input<SdJobProgressMode>('bar');\n readonly title = input<string | undefined>(undefined);\n readonly message = input<string | undefined>(undefined);\n readonly showActions = input(true, { transform: booleanAttribute });\n\n readonly sdCancel = output<void>();\n readonly sdRetry = output<void>();\n\n readonly #tasks = inject(SdTaskService);\n readonly #i18n = inject(I18nService);\n\n readonly task = computed<SdTaskView | undefined>(() => {\n if (this.state()) return undefined;\n const id = this.taskId();\n return id ? this.#tasks.get(id) : undefined;\n });\n readonly resolvedState = computed<SdTaskState | undefined>(() => this.state() ?? this.task()?.state());\n readonly progress = computed<number | undefined>(() => {\n const value = this.resolvedState()?.progress;\n return value === undefined || !Number.isFinite(value) ? undefined : Math.max(0, Math.min(100, value));\n });\n readonly effectiveTitle = computed(() => this.title() ?? this.resolvedState()?.title);\n readonly effectiveMessage = computed(() => this.message() ?? this.resolvedState()?.message);\n readonly statusLabel = computed(() => this.#i18n.t(`core.component.job-progress.status.${this.resolvedState()?.status ?? 'idle'}`));\n readonly progressLabel = computed(() => {\n const title = this.effectiveTitle();\n return title ? `${title}: ${this.statusLabel()}` : this.statusLabel();\n });\n readonly cancelLabel = computed(() => this.#i18n.t('core.component.job-progress.cancel'));\n readonly retryLabel = computed(() => this.#i18n.t('core.component.job-progress.retry'));\n readonly displayedError = computed(() => formatError(this.resolvedState()?.error ?? this.task()?.error()));\n readonly active = computed(() => {\n const status = this.resolvedState()?.status;\n return status === 'queued' || status === 'running';\n });\n readonly canCancel = computed(() => this.showActions() && this.active() && (this.task()?.canCancel() ?? true));\n readonly canRetry = computed(() => {\n if (!this.showActions()) return false;\n const status = this.resolvedState()?.status;\n return this.task()?.canRetry() ?? (status === 'failed' || status === 'cancelled');\n });\n\n @HostBinding('attr.data-mode') get modeAttr(): SdJobProgressMode {\n return this.mode();\n }\n\n @HostBinding('attr.data-status') get statusAttr(): SdTaskStatus {\n return this.resolvedState()?.status ?? 'idle';\n }\n\n @HostBinding('attr.aria-live') readonly ariaLive = 'polite';\n\n onCancel(): void {\n const id = this.taskId();\n if (id && this.task()) void this.#tasks.cancel(id);\n this.sdCancel.emit();\n }\n\n onRetry(): void {\n const id = this.taskId();\n if (id && this.task()) this.#tasks.retry(id);\n this.sdRetry.emit();\n }\n}\n\nfunction formatError(error: unknown): string | undefined {\n if (error === null || error === undefined) return undefined;\n if (error instanceof Error) return error.message;\n return typeof error === 'string' ? error : String(error);\n}\n","@if (resolvedState()) {\n <section class=\"sd-job-progress\" [attr.aria-label]=\"progressLabel()\">\n <div class=\"sd-job-progress__header\">\n <div class=\"sd-job-progress__identity\">\n @if (effectiveTitle()) {\n <strong class=\"sd-job-progress__title\">{{ effectiveTitle() }}</strong>\n }\n <span class=\"sd-job-progress__status\">{{ statusLabel() }}</span>\n </div>\n\n @if (progress() !== undefined) {\n <span class=\"sd-job-progress__percentage\">{{ progress() }}%</span>\n }\n </div>\n\n @if (active() || progress() !== undefined) {\n <div\n class=\"sd-job-progress__track\"\n role=\"progressbar\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-valuenow]=\"progress()\"\n [attr.aria-label]=\"progressLabel()\"\n [attr.data-indeterminate]=\"progress() === undefined ? 'true' : 'false'\">\n <span\n class=\"sd-job-progress__fill\"\n [class.sd-job-progress__fill--indeterminate]=\"progress() === undefined\"\n [style.width.%]=\"progress() ?? 30\"></span>\n </div>\n }\n\n @if (mode() === 'details' && effectiveMessage()) {\n <p class=\"sd-job-progress__message\" data-task-details>{{ effectiveMessage() }}</p>\n }\n\n @if (displayedError()) {\n <p class=\"sd-job-progress__error\" role=\"alert\">{{ displayedError() }}</p>\n }\n\n @if (canCancel() || canRetry()) {\n <div class=\"sd-job-progress__actions\">\n @if (canCancel()) {\n <button type=\"button\" data-task-cancel (click)=\"onCancel()\">\n {{ cancelLabel() }}\n </button>\n }\n @if (canRetry()) {\n <button type=\"button\" data-task-retry (click)=\"onRetry()\">\n {{ retryLabel() }}\n </button>\n }\n </div>\n }\n </section>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAaa,aAAa,CAAA;IACf,MAAM,GAAG,KAAK,CAAqB,SAAS;+EAAC;IAC7C,KAAK,GAAG,KAAK,CAA0B,SAAS;8EAAC;IACjD,IAAI,GAAG,KAAK,CAAoB,KAAK;6EAAC;IACtC,KAAK,GAAG,KAAK,CAAqB,SAAS;8EAAC;IAC5C,OAAO,GAAG,KAAK,CAAqB,SAAS;gFAAC;IAC9C,WAAW,GAAG,KAAK,CAAC,IAAI,mFAAI,SAAS,EA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iBAAiB,EAAA,UAAA,EACf,IAAI,EAAA,eAAA,EAGC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,s2DAAA,EAAA,MAAA,EAAA,CAAA,sxDAAA,CAAA,EAAA;;sBA+C9C,WAAW;uBAAC,gBAAgB;;sBAI5B,WAAW;uBAAC,kBAAkB;;sBAI9B,WAAW;uBAAC,gBAAgB;;AAe/B,SAAS,WAAW,CAAC,KAAc,EAAA;AACjC,IAAA,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;AAAE,QAAA,OAAO,SAAS;IAC3D,IAAI,KAAK,YAAY,KAAK;QAAE,OAAO,KAAK,CAAC,OAAO;AAChD,IAAA,OAAO,OAAO,KAAK,KAAK,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;AAC1D;;AErFA;;AAEG;;"}
@@ -1,6 +1,6 @@
1
- import { CommonModule } from '@angular/common';
2
1
  import * as i0 from '@angular/core';
3
- import { output, input, forwardRef, Input, HostBinding, Component } from '@angular/core';
2
+ import { output, input, forwardRef, Input, HostBinding, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { CommonModule } from '@angular/common';
4
4
  import * as i1 from '@ckeditor/ckeditor5-angular';
5
5
  import { CKEditorModule } from '@ckeditor/ckeditor5-angular';
6
6
  import { SdCKEditorStyles } from '@sdcorejs/angular/components/ckeditor-styles';
@@ -40,7 +40,8 @@ class SdMiniEditor {
40
40
  /** Event emitter khi focus */
41
41
  focus = output();
42
42
  /** Disabled state */
43
- disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
43
+ disabled = input(false, /* @ts-ignore */
44
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
44
45
  Editor = ClassicEditor;
45
46
  #editor;
46
47
  #subscription = new Subscription();
@@ -287,18 +288,18 @@ class SdMiniEditor {
287
288
  /** ControlValueAccessor callbacks */
288
289
  #onChange = () => { };
289
290
  #onTouched = () => { };
290
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SdMiniEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
291
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.17", type: SdMiniEditor, isStandalone: true, selector: "sd-mini-editor", inputs: { option: { classPropertyName: "option", publicName: "option", isSignal: false, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", contentChange: "contentChange", blur: "blur", focus: "focus" }, host: { properties: { "style.--sd-mini-editor-max-height": "this.maxEditorHeight" } }, providers: [
291
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdMiniEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
292
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.5", type: SdMiniEditor, isStandalone: true, selector: "sd-mini-editor", inputs: { option: { classPropertyName: "option", publicName: "option", isSignal: false, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", contentChange: "contentChange", blur: "blur", focus: "focus" }, host: { properties: { "style.--sd-mini-editor-max-height": "this.maxEditorHeight" } }, providers: [
292
293
  {
293
294
  provide: NG_VALUE_ACCESSOR,
294
295
  useExisting: forwardRef(() => SdMiniEditor),
295
296
  multi: true,
296
297
  },
297
- ], ngImport: i0, template: "<sd-ckeditor-styles />\n<ckeditor class=\"sd-mini-editor\" [editor]=\"Editor\" [config]=\"editorConfig\" [disabled]=\"disabled()\" (ready)=\"onReady($event)\"> </ckeditor>\n", styles: [".sd-mini-editor{display:block}::ng-deep .ck-powered-by-balloon{display:none!important}::ng-deep .ck-mentions .ck-button.ck-on{background:var(--sd-primary)!important;color:#fff!important}::ng-deep .ck-mentions .ck-button.ck-on *{color:#fff!important}:host ::ng-deep .ck-editor{--ck-content-font-size: 14px;--ck-content-line-height: 1.5}:host ::ng-deep .ck-editor__editable_inline{border:var(--ck-focus-ring);border-top-left-radius:0!important;border-top-right-radius:0!important;max-height:var(--sd-mini-editor-max-height);overflow:auto}:host ::ng-deep .ck-toolbar{border-radius:0;border:0!important}:host ::ng-deep .ck-content img{max-width:100%!important;height:auto!important;object-fit:contain}:host ::ng-deep .ck-content p{margin-bottom:var(--ck-spacing-large);text-indent:0}:host ::ng-deep .ck-content ul,:host ::ng-deep .ck-content ol{padding-left:20px!important;margin-left:0!important}:host ::ng-deep .ck-custom-mention{font-weight:600;padding:0 2px;display:inline-block;pointer-events:none;-webkit-user-select:none;user-select:none;color:var(--sd-primary, #005cbb)}:host ::ng-deep .ck-custom-mention:before{content:attr(data-marker)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: CKEditorModule }, { kind: "component", type: i1.CKEditorComponent, selector: "ckeditor", inputs: ["editor", "config", "data", "tagName", "watchdog", "editorWatchdogConfig", "disableWatchdog", "disableTwoWayDataBinding", "disabled"], outputs: ["ready", "change", "blur", "focus", "error"] }, { kind: "component", type: SdCKEditorStyles, selector: "sd-ckeditor-styles" }] });
298
+ ], ngImport: i0, template: "<sd-ckeditor-styles />\n<ckeditor class=\"sd-mini-editor\" [editor]=\"Editor\" [config]=\"editorConfig\" [disabled]=\"disabled()\" (ready)=\"onReady($event)\"> </ckeditor>\n", styles: [".sd-mini-editor{display:block}::ng-deep .ck-powered-by-balloon{display:none!important}::ng-deep .ck-mentions .ck-button.ck-on{background:var(--sd-primary)!important;color:#fff!important}::ng-deep .ck-mentions .ck-button.ck-on *{color:#fff!important}:host ::ng-deep .ck-editor{--ck-content-font-size: 14px;--ck-content-line-height: 1.5}:host ::ng-deep .ck-editor__editable_inline{border:var(--ck-focus-ring);border-top-left-radius:0!important;border-top-right-radius:0!important;max-height:var(--sd-mini-editor-max-height);overflow:auto}:host ::ng-deep .ck-toolbar{border-radius:0;border:0!important}:host ::ng-deep .ck-content img{max-width:100%!important;height:auto!important;object-fit:contain}:host ::ng-deep .ck-content p{margin-bottom:var(--ck-spacing-large);text-indent:0}:host ::ng-deep .ck-content ul,:host ::ng-deep .ck-content ol{padding-left:20px!important;margin-left:0!important}:host ::ng-deep .ck-custom-mention{font-weight:600;padding:0 2px;display:inline-block;pointer-events:none;-webkit-user-select:none;user-select:none;color:var(--sd-primary, #005cbb)}:host ::ng-deep .ck-custom-mention:before{content:attr(data-marker)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: CKEditorModule }, { kind: "component", type: i1.CKEditorComponent, selector: "ckeditor", inputs: ["editor", "config", "data", "tagName", "watchdog", "editorWatchdogConfig", "disableWatchdog", "disableTwoWayDataBinding", "disabled"], outputs: ["ready", "change", "blur", "focus", "error"] }, { kind: "component", type: SdCKEditorStyles, selector: "sd-ckeditor-styles" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
298
299
  }
299
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SdMiniEditor, decorators: [{
300
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdMiniEditor, decorators: [{
300
301
  type: Component,
301
- args: [{ selector: 'sd-mini-editor', standalone: true, imports: [CommonModule, CKEditorModule, SdCKEditorStyles], providers: [
302
+ args: [{ changeDetection: ChangeDetectionStrategy.Eager, selector: 'sd-mini-editor', standalone: true, imports: [CommonModule, CKEditorModule, SdCKEditorStyles], providers: [
302
303
  {
303
304
  provide: NG_VALUE_ACCESSOR,
304
305
  useExisting: forwardRef(() => SdMiniEditor),