@sdcorejs/angular 20.0.9 → 20.0.11

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 (174) hide show
  1. package/README.md +270 -140
  2. package/assets/STYLE-GUIDE.md +2 -2
  3. package/assets/scss/core/_inline-edit.scss +1 -1
  4. package/assets/scss/core/form.scss +1 -1
  5. package/assets/scss/core/utilities/_grid.scss +25 -19
  6. package/assets/scss/themes/default.scss +2 -2
  7. package/components/badge/index.d.ts +3 -14
  8. package/components/button/index.d.ts +6 -4
  9. package/components/document-builder/index.d.ts +2 -2
  10. package/components/form-generic/index.d.ts +45 -23
  11. package/components/import-excel/index.d.ts +2 -2
  12. package/components/inform/index.d.ts +2 -8
  13. package/components/mini-editor/index.d.ts +4 -4
  14. package/components/modal/index.d.ts +1 -1
  15. package/components/query-builder/index.d.ts +7 -7
  16. package/components/tab-router/index.d.ts +3 -3
  17. package/components/table/index.d.ts +12 -10
  18. package/components/tree/index.d.ts +3 -2
  19. package/components/view/index.d.ts +1 -1
  20. package/fesm2022/sdcorejs-angular-components-anchor.mjs +20 -24
  21. package/fesm2022/sdcorejs-angular-components-anchor.mjs.map +1 -1
  22. package/fesm2022/sdcorejs-angular-components-autoid-inspector.mjs +4 -5
  23. package/fesm2022/sdcorejs-angular-components-autoid-inspector.mjs.map +1 -1
  24. package/fesm2022/sdcorejs-angular-components-avatar.mjs.map +1 -1
  25. package/fesm2022/sdcorejs-angular-components-badge.mjs +14 -13
  26. package/fesm2022/sdcorejs-angular-components-badge.mjs.map +1 -1
  27. package/fesm2022/sdcorejs-angular-components-button.mjs +19 -21
  28. package/fesm2022/sdcorejs-angular-components-button.mjs.map +1 -1
  29. package/fesm2022/sdcorejs-angular-components-chart.mjs.map +1 -1
  30. package/fesm2022/sdcorejs-angular-components-ckeditor-styles.mjs.map +1 -1
  31. package/fesm2022/sdcorejs-angular-components-code-editor.mjs +5 -6
  32. package/fesm2022/sdcorejs-angular-components-code-editor.mjs.map +1 -1
  33. package/fesm2022/sdcorejs-angular-components-document-builder.mjs +17 -26
  34. package/fesm2022/sdcorejs-angular-components-document-builder.mjs.map +1 -1
  35. package/fesm2022/sdcorejs-angular-components-editor.mjs +11 -7
  36. package/fesm2022/sdcorejs-angular-components-editor.mjs.map +1 -1
  37. package/fesm2022/sdcorejs-angular-components-form-generic.mjs +716 -437
  38. package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
  39. package/fesm2022/sdcorejs-angular-components-history.mjs +2 -2
  40. package/fesm2022/sdcorejs-angular-components-history.mjs.map +1 -1
  41. package/fesm2022/sdcorejs-angular-components-import-excel.mjs +38 -23
  42. package/fesm2022/sdcorejs-angular-components-import-excel.mjs.map +1 -1
  43. package/fesm2022/sdcorejs-angular-components-inform.mjs +5 -16
  44. package/fesm2022/sdcorejs-angular-components-inform.mjs.map +1 -1
  45. package/fesm2022/sdcorejs-angular-components-mini-editor.mjs.map +1 -1
  46. package/fesm2022/sdcorejs-angular-components-modal-resizable.mjs +5 -6
  47. package/fesm2022/sdcorejs-angular-components-modal-resizable.mjs.map +1 -1
  48. package/fesm2022/sdcorejs-angular-components-modal.mjs +28 -18
  49. package/fesm2022/sdcorejs-angular-components-modal.mjs.map +1 -1
  50. package/fesm2022/sdcorejs-angular-components-operator.mjs +1 -1
  51. package/fesm2022/sdcorejs-angular-components-operator.mjs.map +1 -1
  52. package/fesm2022/sdcorejs-angular-components-org-chart.mjs +4 -5
  53. package/fesm2022/sdcorejs-angular-components-org-chart.mjs.map +1 -1
  54. package/fesm2022/sdcorejs-angular-components-preview.mjs +40 -37
  55. package/fesm2022/sdcorejs-angular-components-preview.mjs.map +1 -1
  56. package/fesm2022/sdcorejs-angular-components-query-bar.mjs +38 -55
  57. package/fesm2022/sdcorejs-angular-components-query-bar.mjs.map +1 -1
  58. package/fesm2022/sdcorejs-angular-components-query-builder.mjs +5 -7
  59. package/fesm2022/sdcorejs-angular-components-query-builder.mjs.map +1 -1
  60. package/fesm2022/sdcorejs-angular-components-quick-action.mjs.map +1 -1
  61. package/fesm2022/sdcorejs-angular-components-section.mjs +3 -5
  62. package/fesm2022/sdcorejs-angular-components-section.mjs.map +1 -1
  63. package/fesm2022/sdcorejs-angular-components-side-drawer.mjs +6 -7
  64. package/fesm2022/sdcorejs-angular-components-side-drawer.mjs.map +1 -1
  65. package/fesm2022/sdcorejs-angular-components-splitter.mjs +5 -5
  66. package/fesm2022/sdcorejs-angular-components-splitter.mjs.map +1 -1
  67. package/fesm2022/sdcorejs-angular-components-stepper.mjs +3 -4
  68. package/fesm2022/sdcorejs-angular-components-stepper.mjs.map +1 -1
  69. package/fesm2022/sdcorejs-angular-components-tab-router.mjs +36 -37
  70. package/fesm2022/sdcorejs-angular-components-tab-router.mjs.map +1 -1
  71. package/fesm2022/sdcorejs-angular-components-tab.mjs +3 -4
  72. package/fesm2022/sdcorejs-angular-components-tab.mjs.map +1 -1
  73. package/fesm2022/sdcorejs-angular-components-table.mjs +80 -102
  74. package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
  75. package/fesm2022/sdcorejs-angular-components-tree.mjs +6 -8
  76. package/fesm2022/sdcorejs-angular-components-tree.mjs.map +1 -1
  77. package/fesm2022/sdcorejs-angular-components-upload-file.mjs +14 -15
  78. package/fesm2022/sdcorejs-angular-components-upload-file.mjs.map +1 -1
  79. package/fesm2022/sdcorejs-angular-components-view.mjs +3 -9
  80. package/fesm2022/sdcorejs-angular-components-view.mjs.map +1 -1
  81. package/fesm2022/sdcorejs-angular-configurations.mjs.map +1 -1
  82. package/fesm2022/sdcorejs-angular-directives.mjs +2 -7
  83. package/fesm2022/sdcorejs-angular-directives.mjs.map +1 -1
  84. package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs +5 -10
  85. package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs.map +1 -1
  86. package/fesm2022/sdcorejs-angular-forms-checkbox.mjs.map +1 -1
  87. package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs +9 -11
  88. package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs.map +1 -1
  89. package/fesm2022/sdcorejs-angular-forms-chip.mjs +7 -9
  90. package/fesm2022/sdcorejs-angular-forms-chip.mjs.map +1 -1
  91. package/fesm2022/sdcorejs-angular-forms-date-range.mjs +8 -12
  92. package/fesm2022/sdcorejs-angular-forms-date-range.mjs.map +1 -1
  93. package/fesm2022/sdcorejs-angular-forms-date.mjs +9 -13
  94. package/fesm2022/sdcorejs-angular-forms-date.mjs.map +1 -1
  95. package/fesm2022/sdcorejs-angular-forms-datetime.mjs +8 -14
  96. package/fesm2022/sdcorejs-angular-forms-datetime.mjs.map +1 -1
  97. package/fesm2022/sdcorejs-angular-forms-inline-text.mjs +4 -5
  98. package/fesm2022/sdcorejs-angular-forms-inline-text.mjs.map +1 -1
  99. package/fesm2022/sdcorejs-angular-forms-input-color.mjs +4 -4
  100. package/fesm2022/sdcorejs-angular-forms-input-color.mjs.map +1 -1
  101. package/fesm2022/sdcorejs-angular-forms-input-number.mjs +6 -8
  102. package/fesm2022/sdcorejs-angular-forms-input-number.mjs.map +1 -1
  103. package/fesm2022/sdcorejs-angular-forms-input.mjs +5 -7
  104. package/fesm2022/sdcorejs-angular-forms-input.mjs.map +1 -1
  105. package/fesm2022/sdcorejs-angular-forms-label.mjs +4 -6
  106. package/fesm2022/sdcorejs-angular-forms-label.mjs.map +1 -1
  107. package/fesm2022/sdcorejs-angular-forms-models.mjs.map +1 -1
  108. package/fesm2022/sdcorejs-angular-forms-radio.mjs +12 -4
  109. package/fesm2022/sdcorejs-angular-forms-radio.mjs.map +1 -1
  110. package/fesm2022/sdcorejs-angular-forms-select.mjs +51 -22
  111. package/fesm2022/sdcorejs-angular-forms-select.mjs.map +1 -1
  112. package/fesm2022/sdcorejs-angular-forms-switch.mjs.map +1 -1
  113. package/fesm2022/sdcorejs-angular-forms-textarea.mjs +8 -10
  114. package/fesm2022/sdcorejs-angular-forms-textarea.mjs.map +1 -1
  115. package/fesm2022/sdcorejs-angular-handlers.mjs +3 -6
  116. package/fesm2022/sdcorejs-angular-handlers.mjs.map +1 -1
  117. package/fesm2022/sdcorejs-angular-i18n.mjs +11 -7
  118. package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
  119. package/fesm2022/sdcorejs-angular-interceptors.mjs +0 -2
  120. package/fesm2022/sdcorejs-angular-interceptors.mjs.map +1 -1
  121. package/fesm2022/sdcorejs-angular-modules-auth.mjs +14 -38
  122. package/fesm2022/sdcorejs-angular-modules-auth.mjs.map +1 -1
  123. package/fesm2022/sdcorejs-angular-modules-authom.mjs +14 -14
  124. package/fesm2022/sdcorejs-angular-modules-authom.mjs.map +1 -1
  125. package/fesm2022/sdcorejs-angular-modules-icon.mjs +523 -0
  126. package/fesm2022/sdcorejs-angular-modules-icon.mjs.map +1 -0
  127. package/fesm2022/sdcorejs-angular-modules-keycloak.mjs +22 -11
  128. package/fesm2022/sdcorejs-angular-modules-keycloak.mjs.map +1 -1
  129. package/fesm2022/sdcorejs-angular-modules-layout.mjs +53 -52
  130. package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
  131. package/fesm2022/sdcorejs-angular-modules-permission.mjs +5 -12
  132. package/fesm2022/sdcorejs-angular-modules-permission.mjs.map +1 -1
  133. package/fesm2022/sdcorejs-angular-modules.mjs +1 -0
  134. package/fesm2022/sdcorejs-angular-modules.mjs.map +1 -1
  135. package/fesm2022/sdcorejs-angular-pipes.mjs +71 -17
  136. package/fesm2022/sdcorejs-angular-pipes.mjs.map +1 -1
  137. package/fesm2022/sdcorejs-angular-services-api.mjs +0 -2
  138. package/fesm2022/sdcorejs-angular-services-api.mjs.map +1 -1
  139. package/fesm2022/sdcorejs-angular-services-cache.mjs +5 -11
  140. package/fesm2022/sdcorejs-angular-services-cache.mjs.map +1 -1
  141. package/fesm2022/sdcorejs-angular-services-confirm.mjs +19 -25
  142. package/fesm2022/sdcorejs-angular-services-confirm.mjs.map +1 -1
  143. package/fesm2022/sdcorejs-angular-services-docx.mjs +2 -8
  144. package/fesm2022/sdcorejs-angular-services-docx.mjs.map +1 -1
  145. package/fesm2022/sdcorejs-angular-services-excel.mjs +24 -16
  146. package/fesm2022/sdcorejs-angular-services-excel.mjs.map +1 -1
  147. package/fesm2022/sdcorejs-angular-services-license.mjs +5 -12
  148. package/fesm2022/sdcorejs-angular-services-license.mjs.map +1 -1
  149. package/fesm2022/sdcorejs-angular-services-notify.mjs +70 -87
  150. package/fesm2022/sdcorejs-angular-services-notify.mjs.map +1 -1
  151. package/fesm2022/sdcorejs-angular-services-storage.mjs +6 -15
  152. package/fesm2022/sdcorejs-angular-services-storage.mjs.map +1 -1
  153. package/fesm2022/sdcorejs-angular-utilities-data-state.mjs.map +1 -1
  154. package/fesm2022/sdcorejs-angular-utilities-extensions.mjs +47 -5
  155. package/fesm2022/sdcorejs-angular-utilities-extensions.mjs.map +1 -1
  156. package/fesm2022/sdcorejs-angular-utilities-models.mjs +21 -5
  157. package/fesm2022/sdcorejs-angular-utilities-models.mjs.map +1 -1
  158. package/fesm2022/sdcorejs-angular.mjs.map +1 -1
  159. package/forms/chip/index.d.ts +2 -2
  160. package/forms/chip-calendar/index.d.ts +2 -2
  161. package/forms/input-color/index.d.ts +2 -1
  162. package/forms/select/index.d.ts +10 -2
  163. package/modules/auth/index.d.ts +7 -9
  164. package/modules/icon/index.d.ts +191 -0
  165. package/modules/index.d.ts +1 -0
  166. package/modules/permission/index.d.ts +5 -6
  167. package/package.json +7 -2
  168. package/pipes/index.d.ts +22 -4
  169. package/services/confirm/index.d.ts +3 -3
  170. package/services/license/index.d.ts +2 -3
  171. package/services/notify/index.d.ts +4 -5
  172. package/services/storage/index.d.ts +2 -3
  173. package/utilities/extensions/index.d.ts +9 -1
  174. package/utilities/models/index.d.ts +6 -4
@@ -34,11 +34,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
34
34
  class SdHistoryItem {
35
35
  items = [];
36
36
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdHistoryItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
37
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdHistoryItem, isStandalone: true, selector: "sd-history", inputs: { items: "items" }, ngImport: i0, template: "<div class=\"sd-history\">\n <div class=\"history-container\">\n <div class=\"history-line\"></div>\n <div *ngFor=\"let item of items; let i = index\" class=\"history-item\">\n <div class=\"dot\"></div>\n <div class=\"card\">\n <div class=\"header\">\n <div class=\"title-wrapper\">\n <span class=\"title\">{{ item.title }}</span>\n <span class=\"status\">\n @if (item?.status) {\n <sd-badge\n [icon]=\"item.status?.icon\"\n [title]=\"item.status?.title\"\n [color]=\"item.status?.color\"></sd-badge>\n }\n </span>\n </div>\n <span class=\"date\">{{ item?.date | viewDateTime }}</span>\n </div>\n <div class=\"meta\">\n @if (item?.actor) {\n <span>{{ 'core.component.history.by' | translate }} <strong>&#64;{{ item.actor }}</strong></span>\n }\n @if (item?.source) {\n <span> &#183; {{ item.source }}</span>\n }\n </div>\n <div class=\"description\">\n {{ item?.description }}\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: [".sd-history{padding:16px}.history-container{position:relative;padding-left:20px;font-size:14px;line-height:20px;min-width:470px;max-width:100%}.history-line{position:absolute;left:8px;top:0;bottom:0;width:2px;background-color:#94b0ff}.history-item{position:relative;margin-bottom:16px;padding-left:10px}.history-item .dot{position:absolute;left:-16px;top:12px;width:12px;height:12px;background-color:#94b0ff;border-radius:50%}.history-item .card{background:#fff;border-radius:6px;box-shadow:0 2px 4px #0000001a;padding:8px 8px 8px 16px}.history-item .card .header{display:flex;justify-content:space-between;align-items:center}.history-item .card .header .title-wrapper{display:flex;align-items:flex-start;padding-right:8px}.history-item .card .header .title{margin-right:8px;color:#757575}.history-item .card .header .status{display:flex;align-items:center}.history-item .card .header .status mat-icon{margin-right:4px}.history-item .card .header .date{color:#757575;font-size:12px;line-height:16px}.history-item .card .meta{color:#757575;margin-top:4px}.history-item .card .meta strong{color:#000}.history-item .card .description{margin-top:4px;color:#000;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: SdBadge, selector: "sd-badge", inputs: ["type", "color", "primary", "secondary", "success", "info", "warning", "error", "fontSet", "title", "description", "tooltip", "icon", "size"], outputs: ["click"] }, { kind: "pipe", type: ViewDateTimePipe, name: "viewDateTime" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
37
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdHistoryItem, isStandalone: true, selector: "sd-history", inputs: { items: "items" }, ngImport: i0, template: "<div class=\"sd-history\">\n <div class=\"history-container\">\n <div class=\"history-line\"></div>\n <div *ngFor=\"let item of items; let i = index\" class=\"history-item\">\n <div class=\"dot\"></div>\n <div class=\"card\">\n <div class=\"header\">\n <div class=\"title-wrapper\">\n <span class=\"title\">{{ item.title }}</span>\n <span class=\"status\">\n @if (item?.status) {\n <sd-badge\n [icon]=\"item.status?.icon\"\n [title]=\"item.status?.title\"\n [color]=\"item.status?.color\"></sd-badge>\n }\n </span>\n </div>\n <span class=\"date\">{{ item?.date | viewDateTime }}</span>\n </div>\n <div class=\"meta\">\n @if (item?.actor) {\n <span>{{ 'core.component.history.by' | translate }} <strong>&#64;{{ item.actor }}</strong></span>\n }\n @if (item?.source) {\n <span> &#183; {{ item.source }}</span>\n }\n </div>\n <div class=\"description\">\n {{ item?.description }}\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: [".sd-history{padding:16px}.history-container{position:relative;padding-left:20px;font-size:14px;line-height:20px;min-width:470px;max-width:100%}.history-line{position:absolute;left:8px;top:0;bottom:0;width:2px;background-color:#94b0ff}.history-item{position:relative;margin-bottom:16px;padding-left:10px}.history-item .dot{position:absolute;left:-16px;top:12px;width:12px;height:12px;background-color:#94b0ff;border-radius:50%}.history-item .card{background:#fff;border-radius:6px;box-shadow:0 2px 4px #0000001a;padding:8px 8px 8px 16px}.history-item .card .header{display:flex;justify-content:space-between;align-items:center}.history-item .card .header .title-wrapper{display:flex;align-items:flex-start;padding-right:8px}.history-item .card .header .title{margin-right:8px;color:#757575}.history-item .card .header .status{display:flex;align-items:center}.history-item .card .header .status sd-icon{margin-right:4px}.history-item .card .header .date{color:#757575;font-size:12px;line-height:16px}.history-item .card .meta{color:#757575;margin-top:4px}.history-item .card .meta strong{color:#000}.history-item .card .description{margin-top:4px;color:#000;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: SdBadge, selector: "sd-badge", inputs: ["type", "color", "primary", "secondary", "success", "info", "warning", "error", "fontSet", "title", "description", "tooltip", "icon", "size"], outputs: ["click"] }, { kind: "pipe", type: ViewDateTimePipe, name: "viewDateTime" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
38
38
  }
39
39
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdHistoryItem, decorators: [{
40
40
  type: Component,
41
- args: [{ selector: 'sd-history', imports: [CommonModule, SdBadge, ViewDateTimePipe, TranslatePipe], template: "<div class=\"sd-history\">\n <div class=\"history-container\">\n <div class=\"history-line\"></div>\n <div *ngFor=\"let item of items; let i = index\" class=\"history-item\">\n <div class=\"dot\"></div>\n <div class=\"card\">\n <div class=\"header\">\n <div class=\"title-wrapper\">\n <span class=\"title\">{{ item.title }}</span>\n <span class=\"status\">\n @if (item?.status) {\n <sd-badge\n [icon]=\"item.status?.icon\"\n [title]=\"item.status?.title\"\n [color]=\"item.status?.color\"></sd-badge>\n }\n </span>\n </div>\n <span class=\"date\">{{ item?.date | viewDateTime }}</span>\n </div>\n <div class=\"meta\">\n @if (item?.actor) {\n <span>{{ 'core.component.history.by' | translate }} <strong>&#64;{{ item.actor }}</strong></span>\n }\n @if (item?.source) {\n <span> &#183; {{ item.source }}</span>\n }\n </div>\n <div class=\"description\">\n {{ item?.description }}\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: [".sd-history{padding:16px}.history-container{position:relative;padding-left:20px;font-size:14px;line-height:20px;min-width:470px;max-width:100%}.history-line{position:absolute;left:8px;top:0;bottom:0;width:2px;background-color:#94b0ff}.history-item{position:relative;margin-bottom:16px;padding-left:10px}.history-item .dot{position:absolute;left:-16px;top:12px;width:12px;height:12px;background-color:#94b0ff;border-radius:50%}.history-item .card{background:#fff;border-radius:6px;box-shadow:0 2px 4px #0000001a;padding:8px 8px 8px 16px}.history-item .card .header{display:flex;justify-content:space-between;align-items:center}.history-item .card .header .title-wrapper{display:flex;align-items:flex-start;padding-right:8px}.history-item .card .header .title{margin-right:8px;color:#757575}.history-item .card .header .status{display:flex;align-items:center}.history-item .card .header .status mat-icon{margin-right:4px}.history-item .card .header .date{color:#757575;font-size:12px;line-height:16px}.history-item .card .meta{color:#757575;margin-top:4px}.history-item .card .meta strong{color:#000}.history-item .card .description{margin-top:4px;color:#000;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}\n"] }]
41
+ args: [{ selector: 'sd-history', imports: [CommonModule, SdBadge, ViewDateTimePipe, TranslatePipe], template: "<div class=\"sd-history\">\n <div class=\"history-container\">\n <div class=\"history-line\"></div>\n <div *ngFor=\"let item of items; let i = index\" class=\"history-item\">\n <div class=\"dot\"></div>\n <div class=\"card\">\n <div class=\"header\">\n <div class=\"title-wrapper\">\n <span class=\"title\">{{ item.title }}</span>\n <span class=\"status\">\n @if (item?.status) {\n <sd-badge\n [icon]=\"item.status?.icon\"\n [title]=\"item.status?.title\"\n [color]=\"item.status?.color\"></sd-badge>\n }\n </span>\n </div>\n <span class=\"date\">{{ item?.date | viewDateTime }}</span>\n </div>\n <div class=\"meta\">\n @if (item?.actor) {\n <span>{{ 'core.component.history.by' | translate }} <strong>&#64;{{ item.actor }}</strong></span>\n }\n @if (item?.source) {\n <span> &#183; {{ item.source }}</span>\n }\n </div>\n <div class=\"description\">\n {{ item?.description }}\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: [".sd-history{padding:16px}.history-container{position:relative;padding-left:20px;font-size:14px;line-height:20px;min-width:470px;max-width:100%}.history-line{position:absolute;left:8px;top:0;bottom:0;width:2px;background-color:#94b0ff}.history-item{position:relative;margin-bottom:16px;padding-left:10px}.history-item .dot{position:absolute;left:-16px;top:12px;width:12px;height:12px;background-color:#94b0ff;border-radius:50%}.history-item .card{background:#fff;border-radius:6px;box-shadow:0 2px 4px #0000001a;padding:8px 8px 8px 16px}.history-item .card .header{display:flex;justify-content:space-between;align-items:center}.history-item .card .header .title-wrapper{display:flex;align-items:flex-start;padding-right:8px}.history-item .card .header .title{margin-right:8px;color:#757575}.history-item .card .header .status{display:flex;align-items:center}.history-item .card .header .status sd-icon{margin-right:4px}.history-item .card .header .date{color:#757575;font-size:12px;line-height:16px}.history-item .card .meta{color:#757575;margin-top:4px}.history-item .card .meta strong{color:#000}.history-item .card .description{margin-top:4px;color:#000;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}\n"] }]
42
42
  }], propDecorators: { items: [{
43
43
  type: Input
44
44
  }] } });
@@ -1 +1 @@
1
- {"version":3,"file":"sdcorejs-angular-components-history.mjs","sources":["../../../projects/sdcorejs-angular/components/history/pipes/view-date.pipe.ts","../../../projects/sdcorejs-angular/components/history/src/history.component.ts","../../../projects/sdcorejs-angular/components/history/src/history.component.html","../../../projects/sdcorejs-angular/components/history/sdcorejs-angular-components-history.ts"],"sourcesContent":["import { Injectable, Pipe, PipeTransform } from '@angular/core';\nimport { DateUtilities } from '@sdcorejs/angular/utilities';\nimport { EMPTY_STR } from '@sdcorejs/utils/constants';\n\n@Pipe({\n name: 'viewDateTime',\n standalone: true,\n})\n@Injectable({\n providedIn: 'root',\n})\nexport class ViewDateTimePipe implements PipeTransform {\n transform(value: any): string {\n if (!value || !DateUtilities.isDate(value)) {\n return EMPTY_STR;\n }\n return DateUtilities.toFormat(value, 'HH:mm dd/MM/yyyy');\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { SdBadge } from '@sdcorejs/angular/components/badge';\nimport { SdHistoryItemType } from '../models/history.model';\nimport { ViewDateTimePipe } from '../pipes/view-date.pipe';\nimport { TranslatePipe } from '@sdcorejs/angular/i18n';\n\n@Component({\n selector: 'sd-history',\n imports: [CommonModule, SdBadge, ViewDateTimePipe, TranslatePipe],\n templateUrl: './history.component.html',\n styleUrl: './history.component.scss',\n})\nexport class SdHistoryItem {\n @Input() items: SdHistoryItemType[] = [];\n}\n","<div class=\"sd-history\">\n <div class=\"history-container\">\n <div class=\"history-line\"></div>\n <div *ngFor=\"let item of items; let i = index\" class=\"history-item\">\n <div class=\"dot\"></div>\n <div class=\"card\">\n <div class=\"header\">\n <div class=\"title-wrapper\">\n <span class=\"title\">{{ item.title }}</span>\n <span class=\"status\">\n @if (item?.status) {\n <sd-badge\n [icon]=\"item.status?.icon\"\n [title]=\"item.status?.title\"\n [color]=\"item.status?.color\"></sd-badge>\n }\n </span>\n </div>\n <span class=\"date\">{{ item?.date | viewDateTime }}</span>\n </div>\n <div class=\"meta\">\n @if (item?.actor) {\n <span>{{ 'core.component.history.by' | translate }} <strong>&#64;{{ item.actor }}</strong></span>\n }\n @if (item?.source) {\n <span> &#183; {{ item.source }}</span>\n }\n </div>\n <div class=\"description\">\n {{ item?.description }}\n </div>\n </div>\n </div>\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAWa,gBAAgB,CAAA;AAC3B,IAAA,SAAS,CAAC,KAAU,EAAA;QAClB,IAAI,CAAC,KAAK,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;AAC1C,YAAA,OAAO,SAAS;QAClB;QACA,OAAO,aAAa,CAAC,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAC;IAC1D;wGANW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA;sGAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA;AAAhB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cAFf,MAAM,EAAA,CAAA;;4FAEP,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAP5B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,cAAc;AACpB,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;kBACA,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;MCGY,aAAa,CAAA;IACf,KAAK,GAAwB,EAAE;wGAD7B,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAb,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,OAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECb1B,msCAmCA,EAAA,MAAA,EAAA,CAAA,qvCAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,ED1BY,YAAY,4JAAE,OAAO,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,OAAA,EAAA,SAAA,EAAA,WAAA,EAAA,SAAA,EAAA,MAAA,EAAA,SAAA,EAAA,OAAA,EAAA,SAAA,EAAA,OAAA,EAAA,aAAA,EAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA,EAAA,OAAA,EAAA,CAAA,OAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAE,gBAAgB,EAAA,IAAA,EAAA,cAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAE,aAAa,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA;;4FAIrD,aAAa,EAAA,UAAA,EAAA,CAAA;kBANzB,SAAS;+BACE,YAAY,EAAA,OAAA,EACb,CAAC,YAAY,EAAE,OAAO,EAAE,gBAAgB,EAAE,aAAa,CAAC,EAAA,QAAA,EAAA,msCAAA,EAAA,MAAA,EAAA,CAAA,qvCAAA,CAAA,EAAA;;sBAKhE;;;AEdH;;AAEG;;;;"}
1
+ {"version":3,"file":"sdcorejs-angular-components-history.mjs","sources":["../../../projects/sdcorejs-angular/components/history/pipes/view-date.pipe.ts","../../../projects/sdcorejs-angular/components/history/src/history.component.ts","../../../projects/sdcorejs-angular/components/history/src/history.component.html","../../../projects/sdcorejs-angular/components/history/sdcorejs-angular-components-history.ts"],"sourcesContent":["import { Injectable, Pipe, PipeTransform } from '@angular/core';\nimport { DateUtilities } from '@sdcorejs/angular/utilities';\nimport { EMPTY_STR } from '@sdcorejs/utils/constants';\n\n@Pipe({\n name: 'viewDateTime',\n standalone: true,\n})\n@Injectable({\n providedIn: 'root',\n})\nexport class ViewDateTimePipe implements PipeTransform {\n transform(value: any): string {\n if (!value || !DateUtilities.isDate(value)) {\n return EMPTY_STR;\n }\n return DateUtilities.toFormat(value, 'HH:mm dd/MM/yyyy');\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { SdBadge } from '@sdcorejs/angular/components/badge';\nimport { SdHistoryItemType } from '../models/history.model';\nimport { ViewDateTimePipe } from '../pipes/view-date.pipe';\nimport { TranslatePipe } from '@sdcorejs/angular/i18n';\n\n@Component({\n selector: 'sd-history',\n imports: [CommonModule, SdBadge, ViewDateTimePipe, TranslatePipe],\n templateUrl: './history.component.html',\n styleUrl: './history.component.scss',\n})\nexport class SdHistoryItem {\n @Input() items: SdHistoryItemType[] = [];\n}\n","<div class=\"sd-history\">\n <div class=\"history-container\">\n <div class=\"history-line\"></div>\n <div *ngFor=\"let item of items; let i = index\" class=\"history-item\">\n <div class=\"dot\"></div>\n <div class=\"card\">\n <div class=\"header\">\n <div class=\"title-wrapper\">\n <span class=\"title\">{{ item.title }}</span>\n <span class=\"status\">\n @if (item?.status) {\n <sd-badge\n [icon]=\"item.status?.icon\"\n [title]=\"item.status?.title\"\n [color]=\"item.status?.color\"></sd-badge>\n }\n </span>\n </div>\n <span class=\"date\">{{ item?.date | viewDateTime }}</span>\n </div>\n <div class=\"meta\">\n @if (item?.actor) {\n <span>{{ 'core.component.history.by' | translate }} <strong>&#64;{{ item.actor }}</strong></span>\n }\n @if (item?.source) {\n <span> &#183; {{ item.source }}</span>\n }\n </div>\n <div class=\"description\">\n {{ item?.description }}\n </div>\n </div>\n </div>\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAWa,gBAAgB,CAAA;AAC3B,IAAA,SAAS,CAAC,KAAU,EAAA;QAClB,IAAI,CAAC,KAAK,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;AAC1C,YAAA,OAAO,SAAS;QAClB;QACA,OAAO,aAAa,CAAC,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAC;IAC1D;wGANW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA;sGAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA;AAAhB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cAFf,MAAM,EAAA,CAAA;;4FAEP,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAP5B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,cAAc;AACpB,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;kBACA,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;MCGY,aAAa,CAAA;IACf,KAAK,GAAwB,EAAE;wGAD7B,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAb,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,OAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECb1B,msCAmCA,EAAA,MAAA,EAAA,CAAA,ovCAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,ED1BY,YAAY,4JAAE,OAAO,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,OAAA,EAAA,SAAA,EAAA,WAAA,EAAA,SAAA,EAAA,MAAA,EAAA,SAAA,EAAA,OAAA,EAAA,SAAA,EAAA,OAAA,EAAA,aAAA,EAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA,EAAA,OAAA,EAAA,CAAA,OAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAE,gBAAgB,EAAA,IAAA,EAAA,cAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAE,aAAa,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA;;4FAIrD,aAAa,EAAA,UAAA,EAAA,CAAA;kBANzB,SAAS;+BACE,YAAY,EAAA,OAAA,EACb,CAAC,YAAY,EAAE,OAAO,EAAE,gBAAgB,EAAE,aAAa,CAAC,EAAA,QAAA,EAAA,msCAAA,EAAA,MAAA,EAAA,CAAA,ovCAAA,CAAA,EAAA;;sBAKhE;;;AEdH;;AAEG;;;;"}
@@ -10,9 +10,7 @@ import * as i5 from '@angular/common';
10
10
  import { CommonModule } from '@angular/common';
11
11
  import { FormsModule } from '@angular/forms';
12
12
  import { SdButton } from '@sdcorejs/angular/components/button';
13
- import * as i8 from '@angular/material/icon';
14
- import { MatIconModule } from '@angular/material/icon';
15
- import * as i9 from '@angular/material/menu';
13
+ import * as i8 from '@angular/material/menu';
16
14
  import { MatMenuModule } from '@angular/material/menu';
17
15
  import { SdModal } from '@sdcorejs/angular/components/modal';
18
16
  import { DateUtilities, NumberUtilities } from '@sdcorejs/angular/utilities';
@@ -20,6 +18,7 @@ import * as i1 from '@angular/platform-browser';
20
18
  import { MatProgressSpinner } from '@angular/material/progress-spinner';
21
19
  import { SdBadge } from '@sdcorejs/angular/components/badge';
22
20
  import { I18nService, TranslatePipe } from '@sdcorejs/angular/i18n';
21
+ import { SdIcon } from '@sdcorejs/angular/modules/icon';
23
22
  import * as i1$1 from '@sdcorejs/angular/services/excel';
24
23
  import * as i2 from '@sdcorejs/angular/services/notify';
25
24
  import * as i4 from '@sdcorejs/angular/services/loading';
@@ -36,10 +35,10 @@ class ColumnHiddenPipe {
36
35
  if (column.hidden === undefined) {
37
36
  return true;
38
37
  }
39
- if (typeof (column.hidden) === 'boolean') {
38
+ if (typeof column.hidden === 'boolean') {
40
39
  return !column.hidden;
41
40
  }
42
- if (typeof (column.hidden) === 'function') {
41
+ if (typeof column.hidden === 'function') {
43
42
  return !column.hidden();
44
43
  }
45
44
  return false;
@@ -51,7 +50,7 @@ class ColumnHiddenPipe {
51
50
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ColumnHiddenPipe, decorators: [{
52
51
  type: Pipe,
53
52
  args: [{
54
- name: 'columnHidden'
53
+ name: 'columnHidden',
55
54
  }]
56
55
  }, {
57
56
  type: Injectable
@@ -342,7 +341,10 @@ class SdImportExcel {
342
341
  continue;
343
342
  }
344
343
  if (column.checkValueInArray && item[column.field] && !column.values.some(e => e.toString() === item[column.field].toString())) {
345
- error[column.field] = this.#i18n.t('core.component.import-excel.value-not-in-list', { value: item[column.field], list: column.values.join() });
344
+ error[column.field] = this.#i18n.t('core.component.import-excel.value-not-in-list', {
345
+ value: item[column.field],
346
+ list: column.values.join(),
347
+ });
346
348
  errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);
347
349
  continue;
348
350
  }
@@ -356,29 +358,44 @@ class SdImportExcel {
356
358
  }
357
359
  if (format && item[column.field]) {
358
360
  if (typeof val !== 'string') {
359
- error[column.field] = this.#i18n.t('core.component.import-excel.invalid-date-format', { value: val ?? '', format: column.format ?? '' });
361
+ error[column.field] = this.#i18n.t('core.component.import-excel.invalid-date-format', {
362
+ value: val ?? '',
363
+ format: column.format ?? '',
364
+ });
360
365
  errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);
361
366
  continue;
362
367
  }
363
368
  if (type === 'date' && !this.#isValidDate(format, val)) {
364
- error[column.field] = this.#i18n.t('core.component.import-excel.invalid-date-format', { value: val ?? '', format: column.format ?? '' });
369
+ error[column.field] = this.#i18n.t('core.component.import-excel.invalid-date-format', {
370
+ value: val ?? '',
371
+ format: column.format ?? '',
372
+ });
365
373
  errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);
366
374
  continue;
367
375
  }
368
376
  if (type === 'time' && !this.#isValidTime(format, val)) {
369
- error[column.field] = this.#i18n.t('core.component.import-excel.invalid-date-format', { value: val ?? '', format: column.format ?? '' });
377
+ error[column.field] = this.#i18n.t('core.component.import-excel.invalid-date-format', {
378
+ value: val ?? '',
379
+ format: column.format ?? '',
380
+ });
370
381
  errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);
371
382
  continue;
372
383
  }
373
384
  if (type === 'datetime' && !this.#isValidDateTime(format, val)) {
374
- error[column.field] = this.#i18n.t('core.component.import-excel.invalid-date-format', { value: val ?? '', format: column.format ?? '' });
385
+ error[column.field] = this.#i18n.t('core.component.import-excel.invalid-date-format', {
386
+ value: val ?? '',
387
+ format: column.format ?? '',
388
+ });
375
389
  errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);
376
390
  continue;
377
391
  }
378
392
  item[column.field] = DateUtilities.parseFrom(val, format);
379
393
  }
380
394
  if (item[column.field] && !DateUtilities.isDate(item[column.field])) {
381
- error[column.field] = this.#i18n.t('core.component.import-excel.invalid-date-format', { value: val ?? '', format: column.format ?? '' });
395
+ error[column.field] = this.#i18n.t('core.component.import-excel.invalid-date-format', {
396
+ value: val ?? '',
397
+ format: column.format ?? '',
398
+ });
382
399
  errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);
383
400
  continue;
384
401
  }
@@ -496,7 +513,9 @@ class SdImportExcel {
496
513
  }
497
514
  return {
498
515
  ...result,
499
- sdMessage: (e.meta.errorMessages.join(', ') || e.meta.warningMessages.join(', ') || this.#i18n.t('core.component.import-excel.success'))
516
+ sdMessage: (e.meta.errorMessages.join(', ') ||
517
+ e.meta.warningMessages.join(', ') ||
518
+ this.#i18n.t('core.component.import-excel.success'))
500
519
  ?.replace(/<strong>/g, '')
501
520
  .replace(/<\/strong>/g, '')
502
521
  .replace(/<br>/g, '\n'),
@@ -531,20 +550,18 @@ class SdImportExcel {
531
550
  return false;
532
551
  }
533
552
  const time = dates[1];
534
- const regex = /^(0[0-9]|1[0-9]|2[0-3])(\:)(0[0-9]|[0-5][0-9])$/;
553
+ const regex = /^(0[0-9]|1[0-9]|2[0-3]):(0[0-9]|[0-5][0-9])$/;
535
554
  return regex.test(time);
536
555
  };
537
556
  onClosed = () => {
538
557
  this.sdClosed.emit();
539
558
  };
540
559
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdImportExcel, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.SdExcelService }, { token: i2.SdNotifyService }, { token: ColumnHiddenPipe }, { token: i4.SdLoadingService }], target: i0.ɵɵFactoryTarget.Component });
541
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdImportExcel, isStandalone: true, selector: "sd-import-excel", inputs: { option: "option" }, outputs: { sdClosed: "sdClosed" }, providers: [
542
- ColumnHiddenPipe
543
- ], viewQueries: [{ propertyName: "modal", first: true, predicate: SdModal, descendants: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }], ngImport: i0, template: "@if (option) {\n <sd-modal [title]=\"option.title || ('core.component.import-excel.title' | translate)\" (sdClosed)=\"onClosed()\" #modal>\n <div class=\"d-flex align-items-center mb-12\" style=\"min-height: 32px\">\n @if (excelItems.length) {\n <div class=\"d-flex\">\n <sd-button class=\"mr-2\" (click)=\"view('ALL')\" icon=\"cached\" [title]=\"'core.component.import-excel.see-all' | translate\" size=\"sm\" type=\"outline\"></sd-button>\n\n <sd-button\n class=\"mr-2\"\n (click)=\"view('SUCCESS')\"\n icon=\"done\"\n title=\"{{ numberOfSuccess }}\"\n [tooltip]=\"'core.component.import-excel.valid-rows' | translate\"\n size=\"sm\"\n color=\"success\">\n </sd-button>\n\n <sd-button\n class=\"mr-2\"\n (click)=\"view('WARNING')\"\n icon=\"warning\"\n title=\"{{ numberOfWarning }}\"\n [tooltip]=\"'core.component.import-excel.error-rows' | translate\"\n size=\"sm\"\n color=\"warning\">\n </sd-button>\n\n <sd-button\n (click)=\"view('ERROR')\"\n icon=\"error\"\n title=\"{{ numberOfError }}\"\n color=\"error\"\n [tooltip]=\"'core.component.import-excel.warning-rows' | translate\"\n size=\"sm\">\n </sd-button>\n </div>\n }\n </div>\n\n <div class=\"sd-box border rounded\">\n <div class=\"sd-box-body p-0\">\n <div class=\"table-responsive\">\n <table class=\"sd-table\">\n <thead>\n <tr>\n <th class=\"text-center c-sticky-left\" style=\"width: 50px\">#</th>\n @if (filteredItems.length) {\n <th class=\"text-center\" style=\"min-width: 250px; width: 250px\">{{ 'core.component.import-excel.status' | translate }}</th>\n }\n @for (column of option.columns; track column.field) {\n @if (column | columnHidden) {\n <th [ngStyle]=\"{ 'min-width': column.width || '300px', width: column.width || '300px' }\" [matTooltip]=\"column.title\">\n <span class=\"c-ellipsis\">\n {{ column.title }}\n </span>\n </th>\n }\n }\n </tr>\n </thead>\n\n <tbody>\n @if (viewItems.length) {\n @for (item of viewItems; track item.meta.excelIndex) {\n <tr>\n <td class=\"text-center c-sticky-left px-4\">\n <sd-badge\n type=\"tag\"\n [title]=\"item.meta.excelIndex\"\n [success]=\"!item.meta.warningMessages.length && !item.meta.errorMessages.length\"\n [warning]=\"!!item.meta.warningMessages.length && !item.meta.errorMessages.length\"\n [error]=\"!!item.meta.errorMessages.length\" />\n </td>\n\n <td style=\"min-width: 250px; width: 250px\">\n <div\n class=\"text-wrap\"\n [innerHTML]=\"\n item.meta.errorMessages[0] || item.meta.warningMessages[0] || ('<span class=\\'text-success\\'>' + ('core.component.import-excel.valid-data' | translate) + '</span>')\n \"></div>\n </td>\n\n @for (column of option.columns; track column.field) {\n @if (column | columnHidden) {\n <td\n class=\"align-middle\"\n [ngClass]=\"{\n 'bg-warning-light': item.meta.warning[column.field] && !item.meta.error[column.field],\n 'bg-error-light': item.meta.error[column.field]\n }\"\n [matTooltip]=\"item.meta.error[column.field] || item.meta.warning[column.field]\"\n [ngStyle]=\"{ 'min-width': column.width || '300px' }\"\n matTooltipPosition=\"above\">\n <div class=\"c-ellipsis\">\n @if (column.type !== 'array') {\n <span [innerHTML]=\"item | columnTransform: column | async\"></span>\n }\n\n @if (column.type === 'array') {\n @let arrayItems = item.data[column.field]?.split(column.divideString);\n\n <div class=\"d-flex align-items-center justify-content-between\">\n <span>{{ arrayItems?.length || 0 }} {{ column.unitString }}</span>\n\n @if (arrayItems?.length) {\n <button\n mat-icon-button\n [matMenuTriggerFor]=\"menu\"\n class=\"c-mat-menu\"\n style=\"width: 24px; height: 24px; line-height: 24px\">\n <mat-icon style=\"font-size: 18px\">open_in_new</mat-icon>\n </button>\n\n <mat-menu #menu=\"matMenu\">\n <div\n class=\"px-3 py-2\"\n style=\"max-width: 300px; max-height: 250px; overflow: auto\"\n (click)=\"$event.stopPropagation()\"\n aria-hidden=\"true\">\n @for (val of arrayItems; track $index) {\n <div class=\"border-bottom py-2 text-wrap\" [innerHTML]=\"val\"></div>\n }\n </div>\n </mat-menu>\n }\n </div>\n }\n </div>\n </td>\n }\n }\n </tr>\n }\n } @else {\n <tr>\n <td [attr.colspan]=\"option.columns.length + 2\" class=\"p-0 border-0 bg-white\">\n <div\n class=\"empty-state-wrapper\"\n (click)=\"downloadTemplate()\"\n [matTooltip]=\"'core.component.import-excel.download-template-tooltip' | translate\"\n aria-hidden=\"true\">\n <mat-icon class=\"empty-icon\">cloud_download</mat-icon>\n\n <h4>{{ 'core.component.import-excel.no-data-upload' | translate }}</h4>\n <span class=\"text-small text-link\"> {{ 'core.component.import-excel.click-here-template' | translate }} </span>\n\n @if (isDownloadTemplate) {\n <div class=\"mt-3\">\n <mat-spinner diameter=\"24\" mode=\"indeterminate\"></mat-spinner>\n </div>\n }\n </div>\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n </div>\n\n <div class=\"sd-box-footer border-top\">\n <div class=\"d-flex align-items-center justify-content-end\">\n <mat-paginator [length]=\"filteredItems.length || 0\" hidePageSize showFirstLastButtons></mat-paginator>\n </div>\n </div>\n </div>\n <sd-button sdFooterLeft (click)=\"upload()\" prefixIcon=\"file_upload\" [title]=\"'core.component.import-excel.upload' | translate\" size=\"sm\" color=\"info\" [loading]=\"uploading\">\n </sd-button>\n <div class=\"d-flex align-items-center\" sdFooter>\n @if (filteredItems.length) {\n <sd-button class=\"mr-4\" (click)=\"export()\" prefixIcon=\"get_app\" [title]=\"'core.component.import-excel.download' | translate\" size=\"sm\" color=\"success\" type=\"outline\">\n </sd-button>\n }\n <sd-button\n (click)=\"accept()\"\n [title]=\"'core.component.import-excel.confirm-save' | translate\"\n [disabled]=\"(numberOfSuccess === 0 && numberOfWarning === 0) || numberOfError > 0 || isUploaded\"\n color=\"primary\"\n type=\"fill\"\n size=\"sm\">\n </sd-button>\n </div>\n </sd-modal>\n}\n", styles: [".table-responsive{position:relative;min-height:50vh;height:50vh;overflow:auto;border:1px solid #dee2e6}.sd-table{width:100%;border-collapse:collapse;margin-bottom:0;font-size:14px}.sd-table thead th{position:sticky;top:0;background-color:#f8f9fa;border-bottom:2px solid #dee2e6;border-top:1px solid #dee2e6;padding:8px 6px;white-space:nowrap;z-index:10;font-weight:600}.sd-table thead th.c-sticky-left{z-index:20}.sd-table tbody td{vertical-align:middle;padding:6px;border-top:1px solid #dee2e6}.sd-table tbody tr:nth-of-type(odd){background-color:#0000000a}.sd-table tbody tr:nth-of-type(2n){background-color:#fff}.sd-table tbody tr:hover,.sd-table tbody tr:hover .c-sticky-left{background-color:#ececec}.sd-table tbody tr:nth-of-type(odd) .c-sticky-left{background-color:#f2f2f2}.sd-table tbody tr:nth-of-type(2n) .c-sticky-left{background-color:#fff}.c-sticky-left{position:sticky;left:0;border-right:1px solid #dee2e6!important;border-left:none!important;z-index:5}.empty-state-wrapper{height:100%;min-height:40vh;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;background-color:#f8f9fa;border:2px dashed #cbd5e0;border-radius:8px;margin:16px;transition:all .2s ease-in-out;color:#6c757d}.empty-state-wrapper:hover{background-color:#e3f2fd;border-color:#2196f3;color:#1976d2}.empty-state-wrapper:hover .empty-icon{transform:scale(1.1);color:#1976d2}.empty-state-wrapper:hover .text-link{text-decoration:underline}.empty-state-wrapper .empty-icon{font-size:64px;height:64px;width:64px;margin-bottom:16px;color:#a0aec0;transition:transform .2s}.empty-state-wrapper h4{font-weight:500;margin-bottom:4px}.c-ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;padding:0 4px}.c-mat-menu{border:none;min-width:unset;padding:0 8px}.c-mat-menu mat-icon{font-size:18px;width:18px;height:18px;line-height:18px;vertical-align:middle}.cursor-pointer{cursor:pointer}:host ::ng-deep .mat-paginator-container{min-height:36px;height:36px;padding:0 8px}:host ::ng-deep .mat-paginator-range-label{margin:0 10px}:host ::ng-deep .mat-icon-button{width:32px;height:32px;line-height:32px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i7.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { 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: SdModal, selector: "sd-modal", inputs: ["autoId", "title", "color", "width", "height", "view", "modalClass", "lazyLoadContent", "hideClose", "disableBackdropClose"], outputs: ["sdClosed"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i9.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i9.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: SdBadge, selector: "sd-badge", inputs: ["type", "color", "primary", "secondary", "success", "info", "warning", "error", "fontSet", "title", "description", "tooltip", "icon", "size"], outputs: ["click"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: ColumnTransformPipe, name: "columnTransform" }, { kind: "pipe", type: ColumnHiddenPipe, name: "columnHidden" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
560
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdImportExcel, isStandalone: true, selector: "sd-import-excel", inputs: { option: "option" }, outputs: { sdClosed: "sdClosed" }, providers: [ColumnHiddenPipe], viewQueries: [{ propertyName: "modal", first: true, predicate: SdModal, descendants: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }], ngImport: i0, template: "@if (option) {\n <sd-modal [title]=\"option.title || ('core.component.import-excel.title' | translate)\" (sdClosed)=\"onClosed()\" #modal>\n <div class=\"d-flex align-items-center mb-12\" style=\"min-height: 32px\">\n @if (excelItems.length) {\n <div class=\"d-flex\">\n <sd-button class=\"mr-2\" (click)=\"view('ALL')\" icon=\"cached\" [title]=\"'core.component.import-excel.see-all' | translate\" size=\"sm\" type=\"outline\"></sd-button>\n\n <sd-button\n class=\"mr-2\"\n (click)=\"view('SUCCESS')\"\n icon=\"done\"\n title=\"{{ numberOfSuccess }}\"\n [tooltip]=\"'core.component.import-excel.valid-rows' | translate\"\n size=\"sm\"\n color=\"success\">\n </sd-button>\n\n <sd-button\n class=\"mr-2\"\n (click)=\"view('WARNING')\"\n icon=\"warning\"\n title=\"{{ numberOfWarning }}\"\n [tooltip]=\"'core.component.import-excel.error-rows' | translate\"\n size=\"sm\"\n color=\"warning\">\n </sd-button>\n\n <sd-button\n (click)=\"view('ERROR')\"\n icon=\"error\"\n title=\"{{ numberOfError }}\"\n color=\"error\"\n [tooltip]=\"'core.component.import-excel.warning-rows' | translate\"\n size=\"sm\">\n </sd-button>\n </div>\n }\n </div>\n\n <div class=\"sd-box border rounded\">\n <div class=\"sd-box-body p-0\">\n <div class=\"table-responsive\">\n <table class=\"sd-table\">\n <thead>\n <tr>\n <th class=\"text-center c-sticky-left\" style=\"width: 50px\">#</th>\n @if (filteredItems.length) {\n <th class=\"text-center\" style=\"min-width: 250px; width: 250px\">{{ 'core.component.import-excel.status' | translate }}</th>\n }\n @for (column of option.columns; track column.field) {\n @if (column | columnHidden) {\n <th [ngStyle]=\"{ 'min-width': column.width || '300px', width: column.width || '300px' }\" [matTooltip]=\"column.title\">\n <span class=\"c-ellipsis\">\n {{ column.title }}\n </span>\n </th>\n }\n }\n </tr>\n </thead>\n\n <tbody>\n @if (viewItems.length) {\n @for (item of viewItems; track item.meta.excelIndex) {\n <tr>\n <td class=\"text-center c-sticky-left px-4\">\n <sd-badge\n type=\"tag\"\n [title]=\"item.meta.excelIndex\"\n [success]=\"!item.meta.warningMessages.length && !item.meta.errorMessages.length\"\n [warning]=\"!!item.meta.warningMessages.length && !item.meta.errorMessages.length\"\n [error]=\"!!item.meta.errorMessages.length\" />\n </td>\n\n <td style=\"min-width: 250px; width: 250px\">\n <div\n class=\"text-wrap\"\n [innerHTML]=\"\n item.meta.errorMessages[0] || item.meta.warningMessages[0] || ('<span class=\\'text-success\\'>' + ('core.component.import-excel.valid-data' | translate) + '</span>')\n \"></div>\n </td>\n\n @for (column of option.columns; track column.field) {\n @if (column | columnHidden) {\n <td\n class=\"align-middle\"\n [ngClass]=\"{\n 'bg-warning-light': item.meta.warning[column.field] && !item.meta.error[column.field],\n 'bg-error-light': item.meta.error[column.field]\n }\"\n [matTooltip]=\"item.meta.error[column.field] || item.meta.warning[column.field]\"\n [ngStyle]=\"{ 'min-width': column.width || '300px' }\"\n matTooltipPosition=\"above\">\n <div class=\"c-ellipsis\">\n @if (column.type !== 'array') {\n <span [innerHTML]=\"item | columnTransform: column | async\"></span>\n }\n\n @if (column.type === 'array') {\n @let arrayItems = item.data[column.field]?.split(column.divideString);\n\n <div class=\"d-flex align-items-center justify-content-between\">\n <span>{{ arrayItems?.length || 0 }} {{ column.unitString }}</span>\n\n @if (arrayItems?.length) {\n <button\n mat-icon-button\n [matMenuTriggerFor]=\"menu\"\n class=\"c-mat-menu\"\n style=\"width: 24px; height: 24px; line-height: 24px\">\n <sd-icon style=\"font-size: 18px\" name=\"open_in_new\"></sd-icon>\n </button>\n\n <mat-menu #menu=\"matMenu\">\n <div\n class=\"px-3 py-2\"\n style=\"max-width: 300px; max-height: 250px; overflow: auto\"\n (click)=\"$event.stopPropagation()\"\n aria-hidden=\"true\">\n @for (val of arrayItems; track $index) {\n <div class=\"border-bottom py-2 text-wrap\" [innerHTML]=\"val\"></div>\n }\n </div>\n </mat-menu>\n }\n </div>\n }\n </div>\n </td>\n }\n }\n </tr>\n }\n } @else {\n <tr>\n <td [attr.colspan]=\"option.columns.length + 2\" class=\"p-0 border-0 bg-white\">\n <div\n class=\"empty-state-wrapper\"\n (click)=\"downloadTemplate()\"\n [matTooltip]=\"'core.component.import-excel.download-template-tooltip' | translate\"\n aria-hidden=\"true\">\n <sd-icon class=\"empty-icon\" name=\"cloud_download\"></sd-icon>\n\n <h4>{{ 'core.component.import-excel.no-data-upload' | translate }}</h4>\n <span class=\"text-small text-link\"> {{ 'core.component.import-excel.click-here-template' | translate }} </span>\n\n @if (isDownloadTemplate) {\n <div class=\"mt-3\">\n <mat-spinner diameter=\"24\" mode=\"indeterminate\"></mat-spinner>\n </div>\n }\n </div>\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n </div>\n\n <div class=\"sd-box-footer border-top\">\n <div class=\"d-flex align-items-center justify-content-end\">\n <mat-paginator [length]=\"filteredItems.length || 0\" hidePageSize showFirstLastButtons></mat-paginator>\n </div>\n </div>\n </div>\n <sd-button sdFooterLeft (click)=\"upload()\" prefixIcon=\"file_upload\" [title]=\"'core.component.import-excel.upload' | translate\" size=\"sm\" color=\"info\" [loading]=\"uploading\">\n </sd-button>\n <div class=\"d-flex align-items-center\" sdFooter>\n @if (filteredItems.length) {\n <sd-button class=\"mr-4\" (click)=\"export()\" prefixIcon=\"get_app\" [title]=\"'core.component.import-excel.download' | translate\" size=\"sm\" color=\"success\" type=\"outline\">\n </sd-button>\n }\n <sd-button\n (click)=\"accept()\"\n [title]=\"'core.component.import-excel.confirm-save' | translate\"\n [disabled]=\"(numberOfSuccess === 0 && numberOfWarning === 0) || numberOfError > 0 || isUploaded\"\n color=\"primary\"\n type=\"fill\"\n size=\"sm\">\n </sd-button>\n </div>\n </sd-modal>\n}\n", styles: [".table-responsive{position:relative;min-height:50vh;height:50vh;overflow:auto;border:1px solid #dee2e6}.sd-table{width:100%;border-collapse:collapse;margin-bottom:0;font-size:14px}.sd-table thead th{position:sticky;top:0;background-color:#f8f9fa;border-bottom:2px solid #dee2e6;border-top:1px solid #dee2e6;padding:8px 6px;white-space:nowrap;z-index:10;font-weight:600}.sd-table thead th.c-sticky-left{z-index:20}.sd-table tbody td{vertical-align:middle;padding:6px;border-top:1px solid #dee2e6}.sd-table tbody tr:nth-of-type(odd){background-color:#0000000a}.sd-table tbody tr:nth-of-type(2n){background-color:#fff}.sd-table tbody tr:hover,.sd-table tbody tr:hover .c-sticky-left{background-color:#ececec}.sd-table tbody tr:nth-of-type(odd) .c-sticky-left{background-color:#f2f2f2}.sd-table tbody tr:nth-of-type(2n) .c-sticky-left{background-color:#fff}.c-sticky-left{position:sticky;left:0;border-right:1px solid #dee2e6!important;border-left:none!important;z-index:5}.empty-state-wrapper{height:100%;min-height:40vh;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;background-color:#f8f9fa;border:2px dashed #cbd5e0;border-radius:8px;margin:16px;transition:all .2s ease-in-out;color:#6c757d}.empty-state-wrapper:hover{background-color:#e3f2fd;border-color:#2196f3;color:#1976d2}.empty-state-wrapper:hover .empty-icon{transform:scale(1.1);color:#1976d2}.empty-state-wrapper:hover .text-link{text-decoration:underline}.empty-state-wrapper .empty-icon{font-size:64px;height:64px;width:64px;margin-bottom:16px;color:#a0aec0;transition:transform .2s}.empty-state-wrapper h4{font-weight:500;margin-bottom:4px}.c-ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;padding:0 4px}.c-mat-menu{border:none;min-width:unset;padding:0 8px}.c-mat-menu sd-icon{font-size:18px;width:18px;height:18px;line-height:18px;vertical-align:middle}.cursor-pointer{cursor:pointer}:host ::ng-deep .mat-paginator-container{min-height:36px;height:36px;padding:0 8px}:host ::ng-deep .mat-paginator-range-label{margin:0 10px}:host ::ng-deep .mat-icon-button{width:32px;height:32px;line-height:32px}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i7.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { 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: SdModal, selector: "sd-modal", inputs: ["autoId", "title", "color", "width", "height", "view", "modalClass", "lazyLoadContent", "hideClose", "disableBackdropClose"], outputs: ["sdClosed"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i8.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i8.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: SdBadge, selector: "sd-badge", inputs: ["type", "color", "primary", "secondary", "success", "info", "warning", "error", "fontSet", "title", "description", "tooltip", "icon", "size"], outputs: ["click"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: ColumnTransformPipe, name: "columnTransform" }, { kind: "pipe", type: ColumnHiddenPipe, name: "columnHidden" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
544
561
  }
545
562
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdImportExcel, decorators: [{
546
563
  type: Component,
547
- args: [{ selector: 'sd-import-excel', imports: [
564
+ args: [{ selector: 'sd-import-excel', imports: [SdIcon,
548
565
  CommonModule,
549
566
  FormsModule,
550
567
  MatSlideToggleModule,
@@ -555,13 +572,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
555
572
  SdModal,
556
573
  ColumnTransformPipe,
557
574
  ColumnHiddenPipe,
558
- MatIconModule,
559
575
  MatMenuModule,
560
576
  MatProgressSpinner,
561
- SdBadge, TranslatePipe
562
- ], providers: [
563
- ColumnHiddenPipe
564
- ], template: "@if (option) {\n <sd-modal [title]=\"option.title || ('core.component.import-excel.title' | translate)\" (sdClosed)=\"onClosed()\" #modal>\n <div class=\"d-flex align-items-center mb-12\" style=\"min-height: 32px\">\n @if (excelItems.length) {\n <div class=\"d-flex\">\n <sd-button class=\"mr-2\" (click)=\"view('ALL')\" icon=\"cached\" [title]=\"'core.component.import-excel.see-all' | translate\" size=\"sm\" type=\"outline\"></sd-button>\n\n <sd-button\n class=\"mr-2\"\n (click)=\"view('SUCCESS')\"\n icon=\"done\"\n title=\"{{ numberOfSuccess }}\"\n [tooltip]=\"'core.component.import-excel.valid-rows' | translate\"\n size=\"sm\"\n color=\"success\">\n </sd-button>\n\n <sd-button\n class=\"mr-2\"\n (click)=\"view('WARNING')\"\n icon=\"warning\"\n title=\"{{ numberOfWarning }}\"\n [tooltip]=\"'core.component.import-excel.error-rows' | translate\"\n size=\"sm\"\n color=\"warning\">\n </sd-button>\n\n <sd-button\n (click)=\"view('ERROR')\"\n icon=\"error\"\n title=\"{{ numberOfError }}\"\n color=\"error\"\n [tooltip]=\"'core.component.import-excel.warning-rows' | translate\"\n size=\"sm\">\n </sd-button>\n </div>\n }\n </div>\n\n <div class=\"sd-box border rounded\">\n <div class=\"sd-box-body p-0\">\n <div class=\"table-responsive\">\n <table class=\"sd-table\">\n <thead>\n <tr>\n <th class=\"text-center c-sticky-left\" style=\"width: 50px\">#</th>\n @if (filteredItems.length) {\n <th class=\"text-center\" style=\"min-width: 250px; width: 250px\">{{ 'core.component.import-excel.status' | translate }}</th>\n }\n @for (column of option.columns; track column.field) {\n @if (column | columnHidden) {\n <th [ngStyle]=\"{ 'min-width': column.width || '300px', width: column.width || '300px' }\" [matTooltip]=\"column.title\">\n <span class=\"c-ellipsis\">\n {{ column.title }}\n </span>\n </th>\n }\n }\n </tr>\n </thead>\n\n <tbody>\n @if (viewItems.length) {\n @for (item of viewItems; track item.meta.excelIndex) {\n <tr>\n <td class=\"text-center c-sticky-left px-4\">\n <sd-badge\n type=\"tag\"\n [title]=\"item.meta.excelIndex\"\n [success]=\"!item.meta.warningMessages.length && !item.meta.errorMessages.length\"\n [warning]=\"!!item.meta.warningMessages.length && !item.meta.errorMessages.length\"\n [error]=\"!!item.meta.errorMessages.length\" />\n </td>\n\n <td style=\"min-width: 250px; width: 250px\">\n <div\n class=\"text-wrap\"\n [innerHTML]=\"\n item.meta.errorMessages[0] || item.meta.warningMessages[0] || ('<span class=\\'text-success\\'>' + ('core.component.import-excel.valid-data' | translate) + '</span>')\n \"></div>\n </td>\n\n @for (column of option.columns; track column.field) {\n @if (column | columnHidden) {\n <td\n class=\"align-middle\"\n [ngClass]=\"{\n 'bg-warning-light': item.meta.warning[column.field] && !item.meta.error[column.field],\n 'bg-error-light': item.meta.error[column.field]\n }\"\n [matTooltip]=\"item.meta.error[column.field] || item.meta.warning[column.field]\"\n [ngStyle]=\"{ 'min-width': column.width || '300px' }\"\n matTooltipPosition=\"above\">\n <div class=\"c-ellipsis\">\n @if (column.type !== 'array') {\n <span [innerHTML]=\"item | columnTransform: column | async\"></span>\n }\n\n @if (column.type === 'array') {\n @let arrayItems = item.data[column.field]?.split(column.divideString);\n\n <div class=\"d-flex align-items-center justify-content-between\">\n <span>{{ arrayItems?.length || 0 }} {{ column.unitString }}</span>\n\n @if (arrayItems?.length) {\n <button\n mat-icon-button\n [matMenuTriggerFor]=\"menu\"\n class=\"c-mat-menu\"\n style=\"width: 24px; height: 24px; line-height: 24px\">\n <mat-icon style=\"font-size: 18px\">open_in_new</mat-icon>\n </button>\n\n <mat-menu #menu=\"matMenu\">\n <div\n class=\"px-3 py-2\"\n style=\"max-width: 300px; max-height: 250px; overflow: auto\"\n (click)=\"$event.stopPropagation()\"\n aria-hidden=\"true\">\n @for (val of arrayItems; track $index) {\n <div class=\"border-bottom py-2 text-wrap\" [innerHTML]=\"val\"></div>\n }\n </div>\n </mat-menu>\n }\n </div>\n }\n </div>\n </td>\n }\n }\n </tr>\n }\n } @else {\n <tr>\n <td [attr.colspan]=\"option.columns.length + 2\" class=\"p-0 border-0 bg-white\">\n <div\n class=\"empty-state-wrapper\"\n (click)=\"downloadTemplate()\"\n [matTooltip]=\"'core.component.import-excel.download-template-tooltip' | translate\"\n aria-hidden=\"true\">\n <mat-icon class=\"empty-icon\">cloud_download</mat-icon>\n\n <h4>{{ 'core.component.import-excel.no-data-upload' | translate }}</h4>\n <span class=\"text-small text-link\"> {{ 'core.component.import-excel.click-here-template' | translate }} </span>\n\n @if (isDownloadTemplate) {\n <div class=\"mt-3\">\n <mat-spinner diameter=\"24\" mode=\"indeterminate\"></mat-spinner>\n </div>\n }\n </div>\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n </div>\n\n <div class=\"sd-box-footer border-top\">\n <div class=\"d-flex align-items-center justify-content-end\">\n <mat-paginator [length]=\"filteredItems.length || 0\" hidePageSize showFirstLastButtons></mat-paginator>\n </div>\n </div>\n </div>\n <sd-button sdFooterLeft (click)=\"upload()\" prefixIcon=\"file_upload\" [title]=\"'core.component.import-excel.upload' | translate\" size=\"sm\" color=\"info\" [loading]=\"uploading\">\n </sd-button>\n <div class=\"d-flex align-items-center\" sdFooter>\n @if (filteredItems.length) {\n <sd-button class=\"mr-4\" (click)=\"export()\" prefixIcon=\"get_app\" [title]=\"'core.component.import-excel.download' | translate\" size=\"sm\" color=\"success\" type=\"outline\">\n </sd-button>\n }\n <sd-button\n (click)=\"accept()\"\n [title]=\"'core.component.import-excel.confirm-save' | translate\"\n [disabled]=\"(numberOfSuccess === 0 && numberOfWarning === 0) || numberOfError > 0 || isUploaded\"\n color=\"primary\"\n type=\"fill\"\n size=\"sm\">\n </sd-button>\n </div>\n </sd-modal>\n}\n", styles: [".table-responsive{position:relative;min-height:50vh;height:50vh;overflow:auto;border:1px solid #dee2e6}.sd-table{width:100%;border-collapse:collapse;margin-bottom:0;font-size:14px}.sd-table thead th{position:sticky;top:0;background-color:#f8f9fa;border-bottom:2px solid #dee2e6;border-top:1px solid #dee2e6;padding:8px 6px;white-space:nowrap;z-index:10;font-weight:600}.sd-table thead th.c-sticky-left{z-index:20}.sd-table tbody td{vertical-align:middle;padding:6px;border-top:1px solid #dee2e6}.sd-table tbody tr:nth-of-type(odd){background-color:#0000000a}.sd-table tbody tr:nth-of-type(2n){background-color:#fff}.sd-table tbody tr:hover,.sd-table tbody tr:hover .c-sticky-left{background-color:#ececec}.sd-table tbody tr:nth-of-type(odd) .c-sticky-left{background-color:#f2f2f2}.sd-table tbody tr:nth-of-type(2n) .c-sticky-left{background-color:#fff}.c-sticky-left{position:sticky;left:0;border-right:1px solid #dee2e6!important;border-left:none!important;z-index:5}.empty-state-wrapper{height:100%;min-height:40vh;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;background-color:#f8f9fa;border:2px dashed #cbd5e0;border-radius:8px;margin:16px;transition:all .2s ease-in-out;color:#6c757d}.empty-state-wrapper:hover{background-color:#e3f2fd;border-color:#2196f3;color:#1976d2}.empty-state-wrapper:hover .empty-icon{transform:scale(1.1);color:#1976d2}.empty-state-wrapper:hover .text-link{text-decoration:underline}.empty-state-wrapper .empty-icon{font-size:64px;height:64px;width:64px;margin-bottom:16px;color:#a0aec0;transition:transform .2s}.empty-state-wrapper h4{font-weight:500;margin-bottom:4px}.c-ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;padding:0 4px}.c-mat-menu{border:none;min-width:unset;padding:0 8px}.c-mat-menu mat-icon{font-size:18px;width:18px;height:18px;line-height:18px;vertical-align:middle}.cursor-pointer{cursor:pointer}:host ::ng-deep .mat-paginator-container{min-height:36px;height:36px;padding:0 8px}:host ::ng-deep .mat-paginator-range-label{margin:0 10px}:host ::ng-deep .mat-icon-button{width:32px;height:32px;line-height:32px}\n"] }]
577
+ SdBadge,
578
+ TranslatePipe,
579
+ ], providers: [ColumnHiddenPipe], template: "@if (option) {\n <sd-modal [title]=\"option.title || ('core.component.import-excel.title' | translate)\" (sdClosed)=\"onClosed()\" #modal>\n <div class=\"d-flex align-items-center mb-12\" style=\"min-height: 32px\">\n @if (excelItems.length) {\n <div class=\"d-flex\">\n <sd-button class=\"mr-2\" (click)=\"view('ALL')\" icon=\"cached\" [title]=\"'core.component.import-excel.see-all' | translate\" size=\"sm\" type=\"outline\"></sd-button>\n\n <sd-button\n class=\"mr-2\"\n (click)=\"view('SUCCESS')\"\n icon=\"done\"\n title=\"{{ numberOfSuccess }}\"\n [tooltip]=\"'core.component.import-excel.valid-rows' | translate\"\n size=\"sm\"\n color=\"success\">\n </sd-button>\n\n <sd-button\n class=\"mr-2\"\n (click)=\"view('WARNING')\"\n icon=\"warning\"\n title=\"{{ numberOfWarning }}\"\n [tooltip]=\"'core.component.import-excel.error-rows' | translate\"\n size=\"sm\"\n color=\"warning\">\n </sd-button>\n\n <sd-button\n (click)=\"view('ERROR')\"\n icon=\"error\"\n title=\"{{ numberOfError }}\"\n color=\"error\"\n [tooltip]=\"'core.component.import-excel.warning-rows' | translate\"\n size=\"sm\">\n </sd-button>\n </div>\n }\n </div>\n\n <div class=\"sd-box border rounded\">\n <div class=\"sd-box-body p-0\">\n <div class=\"table-responsive\">\n <table class=\"sd-table\">\n <thead>\n <tr>\n <th class=\"text-center c-sticky-left\" style=\"width: 50px\">#</th>\n @if (filteredItems.length) {\n <th class=\"text-center\" style=\"min-width: 250px; width: 250px\">{{ 'core.component.import-excel.status' | translate }}</th>\n }\n @for (column of option.columns; track column.field) {\n @if (column | columnHidden) {\n <th [ngStyle]=\"{ 'min-width': column.width || '300px', width: column.width || '300px' }\" [matTooltip]=\"column.title\">\n <span class=\"c-ellipsis\">\n {{ column.title }}\n </span>\n </th>\n }\n }\n </tr>\n </thead>\n\n <tbody>\n @if (viewItems.length) {\n @for (item of viewItems; track item.meta.excelIndex) {\n <tr>\n <td class=\"text-center c-sticky-left px-4\">\n <sd-badge\n type=\"tag\"\n [title]=\"item.meta.excelIndex\"\n [success]=\"!item.meta.warningMessages.length && !item.meta.errorMessages.length\"\n [warning]=\"!!item.meta.warningMessages.length && !item.meta.errorMessages.length\"\n [error]=\"!!item.meta.errorMessages.length\" />\n </td>\n\n <td style=\"min-width: 250px; width: 250px\">\n <div\n class=\"text-wrap\"\n [innerHTML]=\"\n item.meta.errorMessages[0] || item.meta.warningMessages[0] || ('<span class=\\'text-success\\'>' + ('core.component.import-excel.valid-data' | translate) + '</span>')\n \"></div>\n </td>\n\n @for (column of option.columns; track column.field) {\n @if (column | columnHidden) {\n <td\n class=\"align-middle\"\n [ngClass]=\"{\n 'bg-warning-light': item.meta.warning[column.field] && !item.meta.error[column.field],\n 'bg-error-light': item.meta.error[column.field]\n }\"\n [matTooltip]=\"item.meta.error[column.field] || item.meta.warning[column.field]\"\n [ngStyle]=\"{ 'min-width': column.width || '300px' }\"\n matTooltipPosition=\"above\">\n <div class=\"c-ellipsis\">\n @if (column.type !== 'array') {\n <span [innerHTML]=\"item | columnTransform: column | async\"></span>\n }\n\n @if (column.type === 'array') {\n @let arrayItems = item.data[column.field]?.split(column.divideString);\n\n <div class=\"d-flex align-items-center justify-content-between\">\n <span>{{ arrayItems?.length || 0 }} {{ column.unitString }}</span>\n\n @if (arrayItems?.length) {\n <button\n mat-icon-button\n [matMenuTriggerFor]=\"menu\"\n class=\"c-mat-menu\"\n style=\"width: 24px; height: 24px; line-height: 24px\">\n <sd-icon style=\"font-size: 18px\" name=\"open_in_new\"></sd-icon>\n </button>\n\n <mat-menu #menu=\"matMenu\">\n <div\n class=\"px-3 py-2\"\n style=\"max-width: 300px; max-height: 250px; overflow: auto\"\n (click)=\"$event.stopPropagation()\"\n aria-hidden=\"true\">\n @for (val of arrayItems; track $index) {\n <div class=\"border-bottom py-2 text-wrap\" [innerHTML]=\"val\"></div>\n }\n </div>\n </mat-menu>\n }\n </div>\n }\n </div>\n </td>\n }\n }\n </tr>\n }\n } @else {\n <tr>\n <td [attr.colspan]=\"option.columns.length + 2\" class=\"p-0 border-0 bg-white\">\n <div\n class=\"empty-state-wrapper\"\n (click)=\"downloadTemplate()\"\n [matTooltip]=\"'core.component.import-excel.download-template-tooltip' | translate\"\n aria-hidden=\"true\">\n <sd-icon class=\"empty-icon\" name=\"cloud_download\"></sd-icon>\n\n <h4>{{ 'core.component.import-excel.no-data-upload' | translate }}</h4>\n <span class=\"text-small text-link\"> {{ 'core.component.import-excel.click-here-template' | translate }} </span>\n\n @if (isDownloadTemplate) {\n <div class=\"mt-3\">\n <mat-spinner diameter=\"24\" mode=\"indeterminate\"></mat-spinner>\n </div>\n }\n </div>\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n </div>\n\n <div class=\"sd-box-footer border-top\">\n <div class=\"d-flex align-items-center justify-content-end\">\n <mat-paginator [length]=\"filteredItems.length || 0\" hidePageSize showFirstLastButtons></mat-paginator>\n </div>\n </div>\n </div>\n <sd-button sdFooterLeft (click)=\"upload()\" prefixIcon=\"file_upload\" [title]=\"'core.component.import-excel.upload' | translate\" size=\"sm\" color=\"info\" [loading]=\"uploading\">\n </sd-button>\n <div class=\"d-flex align-items-center\" sdFooter>\n @if (filteredItems.length) {\n <sd-button class=\"mr-4\" (click)=\"export()\" prefixIcon=\"get_app\" [title]=\"'core.component.import-excel.download' | translate\" size=\"sm\" color=\"success\" type=\"outline\">\n </sd-button>\n }\n <sd-button\n (click)=\"accept()\"\n [title]=\"'core.component.import-excel.confirm-save' | translate\"\n [disabled]=\"(numberOfSuccess === 0 && numberOfWarning === 0) || numberOfError > 0 || isUploaded\"\n color=\"primary\"\n type=\"fill\"\n size=\"sm\">\n </sd-button>\n </div>\n </sd-modal>\n}\n", styles: [".table-responsive{position:relative;min-height:50vh;height:50vh;overflow:auto;border:1px solid #dee2e6}.sd-table{width:100%;border-collapse:collapse;margin-bottom:0;font-size:14px}.sd-table thead th{position:sticky;top:0;background-color:#f8f9fa;border-bottom:2px solid #dee2e6;border-top:1px solid #dee2e6;padding:8px 6px;white-space:nowrap;z-index:10;font-weight:600}.sd-table thead th.c-sticky-left{z-index:20}.sd-table tbody td{vertical-align:middle;padding:6px;border-top:1px solid #dee2e6}.sd-table tbody tr:nth-of-type(odd){background-color:#0000000a}.sd-table tbody tr:nth-of-type(2n){background-color:#fff}.sd-table tbody tr:hover,.sd-table tbody tr:hover .c-sticky-left{background-color:#ececec}.sd-table tbody tr:nth-of-type(odd) .c-sticky-left{background-color:#f2f2f2}.sd-table tbody tr:nth-of-type(2n) .c-sticky-left{background-color:#fff}.c-sticky-left{position:sticky;left:0;border-right:1px solid #dee2e6!important;border-left:none!important;z-index:5}.empty-state-wrapper{height:100%;min-height:40vh;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;background-color:#f8f9fa;border:2px dashed #cbd5e0;border-radius:8px;margin:16px;transition:all .2s ease-in-out;color:#6c757d}.empty-state-wrapper:hover{background-color:#e3f2fd;border-color:#2196f3;color:#1976d2}.empty-state-wrapper:hover .empty-icon{transform:scale(1.1);color:#1976d2}.empty-state-wrapper:hover .text-link{text-decoration:underline}.empty-state-wrapper .empty-icon{font-size:64px;height:64px;width:64px;margin-bottom:16px;color:#a0aec0;transition:transform .2s}.empty-state-wrapper h4{font-weight:500;margin-bottom:4px}.c-ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;padding:0 4px}.c-mat-menu{border:none;min-width:unset;padding:0 8px}.c-mat-menu sd-icon{font-size:18px;width:18px;height:18px;line-height:18px;vertical-align:middle}.cursor-pointer{cursor:pointer}:host ::ng-deep .mat-paginator-container{min-height:36px;height:36px;padding:0 8px}:host ::ng-deep .mat-paginator-range-label{margin:0 10px}:host ::ng-deep .mat-icon-button{width:32px;height:32px;line-height:32px}\n"] }]
565
580
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$1.SdExcelService }, { type: i2.SdNotifyService }, { type: ColumnHiddenPipe }, { type: i4.SdLoadingService }], propDecorators: { option: [{
566
581
  type: Input,
567
582
  args: [{ required: true }]