@sd-angular/core 19.0.43 → 19.0.45

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 (67) hide show
  1. package/README.md +4 -0
  2. package/assets/scss/core/form.scss +21 -40
  3. package/assets/scss/core/view.scss +24 -0
  4. package/assets/scss/sd-core.scss +1 -0
  5. package/assets/scss/themes/_material-tokens.scss +71 -0
  6. package/assets/scss/themes/default.scss +10 -0
  7. package/components/form-generic/src/components/form-builder/components/expression-builder/expression-builder.component.d.ts +1 -0
  8. package/components/form-generic/src/models/form-generic-expression.model.d.ts +10 -4
  9. package/components/form-generic/src/pipes/component-viewed.pipe.d.ts +1 -0
  10. package/components/import-excel/src/pipes/column-transform.pipe.d.ts +1 -0
  11. package/components/inform/src/inform.component.d.ts +12 -3
  12. package/components/table/src/services/table-export/table-export.service.d.ts +1 -1
  13. package/components/table/src/services/table-filter/table-filter.model.d.ts +7 -0
  14. package/components/table/src/services/table-local/table-local-sort.util.d.ts +8 -2
  15. package/components/table/src/services/table-local/table-local.util.d.ts +6 -1
  16. package/components/table/src/services/table-selection/selection-action.util.d.ts +20 -0
  17. package/components/table/src/table.component.d.ts +1 -1
  18. package/components/timeline/pipes/view-date.pipe.d.ts +1 -0
  19. package/configurations/src/sd-core.configuration.d.ts +7 -0
  20. package/fesm2022/sd-angular-core-components-form-generic.mjs +44 -31
  21. package/fesm2022/sd-angular-core-components-form-generic.mjs.map +1 -1
  22. package/fesm2022/sd-angular-core-components-import-excel.mjs +19 -5
  23. package/fesm2022/sd-angular-core-components-import-excel.mjs.map +1 -1
  24. package/fesm2022/sd-angular-core-components-inform.mjs +16 -2
  25. package/fesm2022/sd-angular-core-components-inform.mjs.map +1 -1
  26. package/fesm2022/sd-angular-core-components-section.mjs +2 -2
  27. package/fesm2022/sd-angular-core-components-section.mjs.map +1 -1
  28. package/fesm2022/sd-angular-core-components-table.mjs +249 -135
  29. package/fesm2022/sd-angular-core-components-table.mjs.map +1 -1
  30. package/fesm2022/sd-angular-core-components-timeline.mjs +4 -1
  31. package/fesm2022/sd-angular-core-components-timeline.mjs.map +1 -1
  32. package/fesm2022/sd-angular-core-components-view.mjs +2 -2
  33. package/fesm2022/sd-angular-core-components-view.mjs.map +1 -1
  34. package/fesm2022/sd-angular-core-configurations.mjs.map +1 -1
  35. package/fesm2022/sd-angular-core-forms-checkbox.mjs +2 -2
  36. package/fesm2022/sd-angular-core-forms-checkbox.mjs.map +1 -1
  37. package/fesm2022/sd-angular-core-forms-date-range.mjs +15 -2
  38. package/fesm2022/sd-angular-core-forms-date-range.mjs.map +1 -1
  39. package/fesm2022/sd-angular-core-forms-date.mjs +11 -1
  40. package/fesm2022/sd-angular-core-forms-date.mjs.map +1 -1
  41. package/fesm2022/sd-angular-core-forms-datetime.mjs +43 -9
  42. package/fesm2022/sd-angular-core-forms-datetime.mjs.map +1 -1
  43. package/fesm2022/sd-angular-core-forms-models.mjs +6 -0
  44. package/fesm2022/sd-angular-core-forms-models.mjs.map +1 -1
  45. package/fesm2022/sd-angular-core-forms-radio.mjs +2 -2
  46. package/fesm2022/sd-angular-core-forms-radio.mjs.map +1 -1
  47. package/fesm2022/sd-angular-core-forms-switch.mjs +2 -2
  48. package/fesm2022/sd-angular-core-forms-switch.mjs.map +1 -1
  49. package/fesm2022/sd-angular-core-forms-textarea.mjs +2 -2
  50. package/fesm2022/sd-angular-core-forms-textarea.mjs.map +1 -1
  51. package/fesm2022/sd-angular-core-pipes.mjs +26 -10
  52. package/fesm2022/sd-angular-core-pipes.mjs.map +1 -1
  53. package/fesm2022/sd-angular-core-services-date-time.mjs +143 -0
  54. package/fesm2022/sd-angular-core-services-date-time.mjs.map +1 -0
  55. package/fesm2022/sd-angular-core-services.mjs +1 -0
  56. package/fesm2022/sd-angular-core-services.mjs.map +1 -1
  57. package/fesm2022/sd-angular-core-utilities-models.mjs.map +1 -1
  58. package/forms/datetime/src/datetime-time-zone.adapter.d.ts +15 -0
  59. package/forms/models/src/sd-strict-date-adapter.d.ts +3 -0
  60. package/package.json +10 -6
  61. package/pipes/src/time-different.pipe.d.ts +1 -0
  62. package/services/date-time/index.d.ts +1 -0
  63. package/services/date-time/src/date-time.service.d.ts +54 -0
  64. package/services/date-time/src/public-api.d.ts +1 -0
  65. package/services/index.d.ts +1 -0
  66. package/utilities/extensions/src/string.extension.d.ts +1 -0
  67. package/utilities/models/src/icon.model.d.ts +2 -0
@@ -16,7 +16,8 @@ import { MatIconModule } from '@angular/material/icon';
16
16
  import * as i9 from '@angular/material/menu';
17
17
  import { MatMenuModule } from '@angular/material/menu';
18
18
  import { SdModal } from '@sd-angular/core/components/modal';
19
- import { DateUtilities, NumberUtilities } from '@sd-angular/core/utilities';
19
+ import { ɵSD_LOCAL_DATE_TIME as _SD_LOCAL_DATE_TIME, ɵsdInjectDateTime as _sdInjectDateTime, SdDateTimeService } from '@sd-angular/core/services/date-time';
20
+ import { NumberUtilities, DateUtilities } from '@sd-angular/core/utilities';
20
21
  import * as i1 from '@angular/platform-browser';
21
22
  import { MatProgressSpinner } from '@angular/material/progress-spinner';
22
23
  import { SdBadge } from '@sd-angular/core/components/badge';
@@ -60,6 +61,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
60
61
 
61
62
  class ColumnTransformPipe {
62
63
  sanitizer;
64
+ // why: `new ColumnTransformPipe(sanitizer)` outside an injection context keeps the local behavior (no zone).
65
+ #dateTime = _sdInjectDateTime() ?? _SD_LOCAL_DATE_TIME;
63
66
  constructor(sanitizer) {
64
67
  this.sanitizer = sanitizer;
65
68
  }
@@ -89,9 +92,9 @@ class ColumnTransformPipe {
89
92
  }
90
93
  return '';
91
94
  case 'date':
92
- return DateUtilities.toFormat(value, column.format || 'dd/MM/yyyy') ?? '';
95
+ return this.#dateTime.toFormat(value, column.format || 'dd/MM/yyyy') ?? '';
93
96
  case 'datetime':
94
- return DateUtilities.toFormat(value, column.format || 'dd/MM/yyyy HH:mm') ?? '';
97
+ return this.#dateTime.toFormat(value, column.format || 'dd/MM/yyyy HH:mm') ?? '';
95
98
  default:
96
99
  return value ?? '';
97
100
  }
@@ -166,6 +169,8 @@ class SdImportExcel {
166
169
  isDownloadTemplate = false;
167
170
  sdClosed = new EventEmitter();
168
171
  #i18n = inject(I18nService);
172
+ // why: date cells are wall clock in ISdCoreConfiguration.timeZone, not in the browser zone.
173
+ #dateTime = inject(SdDateTimeService);
169
174
  constructor(ref, excelService, notifyService, columnHiddenPipe, loadingService) {
170
175
  this.ref = ref;
171
176
  this.excelService = excelService;
@@ -384,7 +389,7 @@ class SdImportExcel {
384
389
  const { type, format } = column;
385
390
  const val = item[column.field];
386
391
  if (val instanceof Date) {
387
- item[column.field] = val.toISOString();
392
+ item[column.field] = this.#excelDateCell(val);
388
393
  continue;
389
394
  }
390
395
  if (format && item[column.field]) {
@@ -420,7 +425,7 @@ class SdImportExcel {
420
425
  errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);
421
426
  continue;
422
427
  }
423
- item[column.field] = DateUtilities.parseFrom(val, format);
428
+ item[column.field] = this.#dateTime.parseFrom(val, format);
424
429
  }
425
430
  if (item[column.field] && !DateUtilities.isDate(item[column.field])) {
426
431
  error[column.field] = this.#i18n.t('core.component.import-excel.invalid-date-format', {
@@ -585,6 +590,15 @@ class SdImportExcel {
585
590
  const regex = /^(0[0-9]|1[0-9]|2[0-3])(\:)(0[0-9]|[0-5][0-9])$/;
586
591
  return regex.test(time);
587
592
  };
593
+ /** exceljs gives a date cell as a Date whose UTC fields are the Excel wall clock; read it in the zone. */
594
+ #excelDateCell(value) {
595
+ if (this.#dateTime.timeZone === 'local')
596
+ return value.toISOString();
597
+ const carrier = new Date(0);
598
+ carrier.setFullYear(value.getUTCFullYear(), value.getUTCMonth(), value.getUTCDate());
599
+ carrier.setHours(value.getUTCHours(), value.getUTCMinutes(), value.getUTCSeconds(), value.getUTCMilliseconds());
600
+ return this.#dateTime.fromWallClock(carrier).toISOString();
601
+ }
588
602
  onClosed = () => {
589
603
  this.sdClosed.emit();
590
604
  };
@@ -1 +1 @@
1
- {"version":3,"file":"sd-angular-core-components-import-excel.mjs","sources":["../../../projects/sd-angular/components/import-excel/src/import-excel.model.ts","../../../projects/sd-angular/components/import-excel/src/pipes/columm-hidden.pipe.ts","../../../projects/sd-angular/components/import-excel/src/pipes/column-transform.pipe.ts","../../../projects/sd-angular/components/import-excel/src/import-excel.component.ts","../../../projects/sd-angular/components/import-excel/src/import-excel.component.html","../../../projects/sd-angular/components/import-excel/sd-angular-core-components-import-excel.ts"],"sourcesContent":["export interface SdImportExcelValidation {\n idx: number;\n errorMessage?: string;\n warningMessage?: string;\n}\nexport interface SdImportExcelSheet<T = any> {\n name: string; // Tên của sheet\n items: T[] | (() => Promise<T[]>);\n headers: {\n value: Extract<keyof T, string>; // Trường muốn hiển thị\n display: string; // Label hiển thị\n }[];\n}\n\nexport interface SdImportExcelOption<T = any> {\n columns: SdUploadExcelColumn<T>[];\n accept: (items: T[], args: { file: File }) => SdImportExcelValidation[] | Promise<SdImportExcelValidation[]>;\n title?: string;\n fileName?: string;\n limit?: number;\n sheets?: SdImportExcelSheet[];\n transform?: (items: SdImportExcelItem<T>[]) => SdImportExcelItem<T>[] | Promise<SdImportExcelItem<T>[]>;\n validateItem?: (item: T, idx: number, items: T[]) => SdImportExcelValidation | Promise<SdImportExcelValidation>;\n validateItems?: (items: T[]) => SdImportExcelValidation[] | Promise<SdImportExcelValidation[]>;\n}\n\nexport type SdUploadExcelColumn<T = any> =\n | SdUploadExcelColumnString<T>\n | SdUploadExcelColumnNumber<T>\n | SdUploadExcelColumnBool<T>\n | SdUploadExcelColumnDate<T>\n | SdUploadExcelColumnTime<T>\n | SdUploadExcelColumnDateTime<T>\n | SdUploadExcelColumnValues<T>\n | SdUploadExcelColumnStringArray<T>;\n\nexport interface SdUploadExcelBaseColumn<T = any> {\n field: string;\n title: string;\n required?: boolean;\n width?: string;\n description?: string;\n hidden?: boolean | (() => boolean);\n fontColor?: string;\n fill?: string;\n transform?: (value: any, rowData: T) => string | Promise<string>;\n}\n\nexport interface SdUploadExcelColumnString<T = any> extends SdUploadExcelBaseColumn<T> {\n type: 'string';\n defaultValue?: string;\n pattern?: string;\n minlength?: number;\n maxlength?: number;\n}\n\nexport interface SdUploadExcelColumnNumber<T = any> extends SdUploadExcelBaseColumn<T> {\n type: 'number';\n defaultValue?: number;\n min?: number;\n max?: number;\n}\n\nexport interface SdUploadExcelColumnBool<T = any> extends SdUploadExcelBaseColumn<T> {\n type: 'bool';\n defaultValue?: boolean;\n parseToBool?: boolean;\n}\n\nexport interface SdUploadExcelColumnDate<T = any> extends SdUploadExcelBaseColumn<T> {\n type: 'date';\n format?: 'dd/MM/yyyy';\n defaultValue?: Date;\n minDate?: Date;\n maxDate?: Date;\n}\n\nexport interface SdUploadExcelColumnTime<T = any> extends SdUploadExcelBaseColumn<T> {\n type: 'time';\n format?: 'HH:mm' | 'HH:mm:ss';\n defaultValue?: Date;\n minDate?: Date;\n maxDate?: Date;\n}\n\nexport interface SdUploadExcelColumnDateTime<T = any> extends SdUploadExcelBaseColumn<T> {\n type: 'datetime';\n format?: 'dd/MM/yyyy HH:mm' | 'dd/MM/yyyy';\n defaultValue?: Date;\n minDate?: Date;\n maxDate?: Date;\n}\n\nexport interface SdUploadExcelColumnValues<T = any> extends SdUploadExcelBaseColumn<T> {\n type: 'values' | 'radio';\n defaultValue?: string | number;\n values: (string | number)[];\n checkValueInArray?: boolean;\n}\n\nexport interface SdUploadExcelColumnStringArray<T = any> extends SdUploadExcelBaseColumn<T> {\n type: 'array';\n divideString: string | ';';\n unitString: string | 'items';\n defaultValue?: string;\n minlength?: number;\n maxlength?: number;\n}\n\nexport type SdImportExcelItem<T = any> = {\n data: T;\n meta: {\n excelIndex: number;\n origin: T;\n error: Record<string, string>;\n errorMessages: string[];\n warning: Record<string, string>;\n warningMessages: string[];\n };\n};\n\n// export type ExcelItem<T> = {\n// origin?: T;\n// excelIndex?: number;\n// validation: SdUploadExcelValidation;\n// } & T;\n","import { Injectable, Pipe, PipeTransform } from '@angular/core';\nimport { SdUploadExcelColumn } from '../import-excel.model';\n@Pipe({\n name: 'columnHidden'\n})\n@Injectable()\nexport class ColumnHiddenPipe implements PipeTransform {\n constructor() { }\n transform(column: SdUploadExcelColumn): boolean {\n if (column.hidden === undefined) {\n return true;\n }\n if (typeof (column.hidden) === 'boolean') {\n return !column.hidden;\n }\n if (typeof (column.hidden) === 'function') {\n return !column.hidden();\n }\n return false;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { DateUtilities, NumberUtilities } from '@sd-angular/core/utilities';\nimport { SdImportExcelItem, SdUploadExcelColumn } from '../import-excel.model';\n\n@Pipe({\n name: 'columnTransform',\n standalone: true,\n})\nexport class ColumnTransformPipe implements PipeTransform {\n constructor(private sanitizer: DomSanitizer) {}\n\n // Chuyển thành async để hỗ trợ Promise từ bên ngoài\n async transform(item: SdImportExcelItem, column: SdUploadExcelColumn): Promise<string | SafeHtml> {\n const { type, transform, field } = column;\n const value = item.data[field];\n\n // 1. Ưu tiên hiển thị dữ liệu gốc nếu có lỗi\n if (item.meta.error[field]) {\n return item.meta.origin[field] ?? value ?? '';\n }\n\n // 2. Custom Transform (Hỗ trợ cả Sync và Async)\n if (transform) {\n // await sẽ hoạt động đúng dù transform trả về value thường hay Promise\n const result = await transform(item.data, value);\n return result ?? '';\n }\n\n // 3. Xử lý logic hiển thị\n switch (type) {\n case 'number':\n return NumberUtilities.toVN(value) ?? '';\n\n case 'bool':\n if (typeof value === 'boolean') {\n const html = `<div class=\"text-center\"><input type=\"checkbox\" ${value ? 'checked' : ''} disabled></div>`;\n // Bắt buộc bypass security để hiển thị được input checkbox\n return this.sanitizer.bypassSecurityTrustHtml(html);\n }\n return '';\n\n case 'date':\n return DateUtilities.toFormat(value, column.format || 'dd/MM/yyyy') ?? '';\n\n case 'datetime':\n return DateUtilities.toFormat(value, column.format || 'dd/MM/yyyy HH:mm') ?? '';\n\n default:\n return value ?? '';\n }\n }\n}","import { SdDataState } from '@sd-angular/core/components/data-state';\nimport { ChangeDetectorRef, Component, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild, inject } from '@angular/core';\n\nimport { MatPaginator, MatPaginatorModule } from '@angular/material/paginator';\nimport { Subscription } from 'rxjs';\nimport { ColumnHiddenPipe } from './pipes/columm-hidden.pipe';\nimport { SdImportExcelItem, SdImportExcelOption, SdImportExcelSheet, SdImportExcelValidation } from './import-excel.model';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { SdButton } from '@sd-angular/core/components/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { SdModal } from '@sd-angular/core/components/modal';\nimport { SdInput } from '@sd-angular/core/forms/input';\nimport { SdExcelService, SdExcelSheet, SdExcelTemplate, SdExcelTemplateColumn } from '@sd-angular/core/services/excel';\nimport { SdNotifyService } from '@sd-angular/core/services/notify';\nimport { DateUtilities, NumberUtilities } from '@sd-angular/core/utilities';\nimport { SdLoadingService } from '@sd-angular/core/services/loading';\nimport { ColumnTransformPipe } from './pipes/column-transform.pipe';\nimport { MatProgressSpinner } from '@angular/material/progress-spinner';\nimport { SdBadge } from '@sd-angular/core/components/badge';\nimport { I18nService, TranslatePipe } from '@sd-angular/core/i18n';\n\n@Component({\n selector: 'sd-import-excel',\n templateUrl: './import-excel.component.html',\n styleUrl: './import-excel.component.scss',\n imports: [\n SdDataState,\n CommonModule,\n FormsModule,\n MatSlideToggleModule,\n MatTooltipModule,\n MatPaginatorModule,\n MatSlideToggleModule,\n SdButton,\n SdModal,\n ColumnTransformPipe,\n ColumnHiddenPipe,\n MatIconModule,\n MatMenuModule,\n MatProgressSpinner,\n SdBadge,\n TranslatePipe,\n ],\n providers: [ColumnHiddenPipe],\n})\nexport class SdImportExcel implements OnInit, OnDestroy {\n @Input({ required: true }) option!: SdImportExcelOption;\n @ViewChild(SdModal) modal!: SdModal;\n excelItems: SdImportExcelItem[] = [];\n // originItems: SdExcelItem[] = [];\n hasDescription = false;\n\n showing: 'ALL' | 'SUCCESS' | 'WARNING' | 'ERROR' = 'ALL';\n readonly filters = [\n { value: 'ALL', label: 'core.component.import-excel.filter-all', icon: 'list_alt' },\n { value: 'SUCCESS', label: 'core.component.import-excel.filter-success', icon: 'check_circle_outline' },\n { value: 'WARNING', label: 'core.component.import-excel.filter-warning', icon: 'warning_amber' },\n { value: 'ERROR', label: 'core.component.import-excel.filter-error', icon: 'error_outline' },\n ] as const;\n\n filterCount = (value: 'ALL' | 'SUCCESS' | 'WARNING' | 'ERROR'): number => {\n if (value === 'SUCCESS') return this.numberOfSuccess;\n if (value === 'WARNING') return this.numberOfWarning;\n if (value === 'ERROR') return this.numberOfError;\n return this.excelItems.length;\n };\n\n // why: callback có thể trả cùng thông báo nhiều lần; chỉ gộp phần hiển thị, giữ nguyên kết quả validation.\n protected validationMessages = (item: SdImportExcelItem) => ({\n errors: [...new Set(item.meta.errorMessages)],\n warnings: [...new Set(item.meta.warningMessages)],\n });\n\n filteredItems: SdImportExcelItem[] = [];\n viewItems: SdImportExcelItem[] = [];\n numberOfSuccess = 0;\n numberOfError = 0;\n numberOfWarning = 0;\n file?: File;\n #paginator?: MatPaginator;\n #paginatorSub?: Subscription;\n @ViewChild(MatPaginator) set paginator(paginator: MatPaginator | undefined) {\n if (!paginator) {\n this.#paginatorSub?.unsubscribe();\n this.#paginator = undefined;\n return;\n }\n if (paginator && this.#paginator !== paginator) {\n this.#paginator = paginator;\n this.#paginatorSub?.unsubscribe(); // Clear cũ\n this.#paginatorSub = paginator.page.subscribe(this.#reload);\n this.#subscription.add(this.#paginatorSub);\n }\n }\n #subscription = new Subscription();\n uploading = false;\n isUploaded = false;\n isDownloadTemplate = false;\n @Output() sdClosed = new EventEmitter();\n readonly #i18n = inject(I18nService);\n constructor(\n private ref: ChangeDetectorRef,\n private excelService: SdExcelService,\n private notifyService: SdNotifyService,\n private columnHiddenPipe: ColumnHiddenPipe,\n private loadingService: SdLoadingService\n ) {}\n\n ngOnInit() {\n this.isUploaded = false;\n }\n\n ngOnDestroy() {\n this.#subscription.unsubscribe();\n }\n\n open = () => {\n this.#reset();\n this.modal.open();\n };\n\n close = () => {\n this.modal.close();\n };\n\n #reset = () => {\n this.excelItems = [];\n this.filteredItems = [];\n this.viewItems = [];\n this.numberOfSuccess = 0;\n this.numberOfError = 0;\n this.numberOfWarning = 0;\n this.showing = 'ALL';\n this.file = undefined;\n this.isUploaded = false;\n };\n\n #reload = () => {\n const pageIndex = this.#paginator?.pageIndex ?? 0;\n // why: lần đọc tệp đầu tiên chưa render paginator; dùng cùng pageSize của preview.\n const pageSize = this.#paginator?.pageSize || 10;\n this.filteredItems = this.excelItems.filter(item => {\n const { errorMessages, warningMessages } = item.meta;\n if (this.showing === 'SUCCESS') {\n return !errorMessages.length && !warningMessages.length;\n } else if (this.showing === 'WARNING') {\n return !!warningMessages.length && !errorMessages.length;\n } else if (this.showing === 'ERROR') {\n return !!errorMessages.length;\n }\n return true;\n });\n this.viewItems = this.filteredItems.filter((item, index) => index >= pageIndex * pageSize && index < (pageIndex + 1) * pageSize);\n\n this.numberOfSuccess = this.excelItems.filter(this.#filterSuccess).length;\n this.numberOfError = this.excelItems.filter(this.#filterError).length;\n this.numberOfWarning = this.excelItems.filter(this.#filterWarning).length;\n };\n\n #filterError = (item: SdImportExcelItem) => !!item.meta.errorMessages.length;\n #filterWarning = (item: SdImportExcelItem) => item.meta.warningMessages.length && !item.meta.errorMessages.length;\n #filterSuccess = (item: SdImportExcelItem) => !item.meta.errorMessages.length && !item.meta.warningMessages.length;\n\n upload = async () => {\n try {\n const { transform, validateItem, validateItems } = this.option;\n const { items, file } = await this.excelService.upload();\n this.hasDescription = this.option.columns.some(e => !!e.description);\n const offset = this.hasDescription ? 2 : 1;\n items.splice(0, offset);\n if (items.length === 0) {\n this.notifyService.warning(this.#i18n.t('core.component.import-excel.no-data-in-file'));\n return;\n }\n const limit = this.option.limit || 1000;\n if (items.length > limit) {\n this.notifyService.warning(this.#i18n.t('core.component.import-excel.row-limit', { limit }));\n return;\n }\n this.#reset();\n this.excelItems = items.map<SdImportExcelItem>((data, idx) => ({\n data,\n meta: {\n excelIndex: idx + (this.hasDescription ? 4 : 3),\n origin: { ...data },\n error: {},\n warning: {},\n errorMessages: [],\n warningMessages: [],\n },\n }));\n\n if (transform) {\n const mappedItems = transform(this.excelItems);\n if (mappedItems instanceof Promise) {\n this.uploading = true;\n this.excelItems = await mappedItems.finally(() => (this.uploading = false));\n } else {\n this.excelItems = mappedItems || this.excelItems;\n }\n }\n this.file = file!;\n this.loadingService.start();\n const validatePromises = this.excelItems.map((item, idx) => this.#validate(item, idx));\n await Promise.all(validatePromises);\n\n // Nếu không có error thì tiếp tục validate từ option validate truyền vào\n\n if (!this.excelItems.some(this.#filterError) && validateItems) {\n const results = await validateItems(this.excelItems.map(e => e.data));\n results\n .filter(result => result.idx >= 0)\n .forEach(result => {\n if (result?.errorMessage) {\n this.excelItems[result.idx].meta.errorMessages.push(result.errorMessage);\n }\n if (result?.warningMessage) {\n this.excelItems[result.idx].meta.warningMessages.push(result.warningMessage);\n }\n });\n }\n\n if (this.#paginator) this.#paginator.pageIndex = 0;\n this.#reload();\n this.ref.detectChanges();\n\n this.isUploaded = false;\n } catch (err: any) {\n this.notifyService.error(err);\n } finally {\n this.loadingService.stop();\n }\n };\n\n #validate = async (excelItem: SdImportExcelItem, idx: number) => {\n const {\n data: item,\n meta: { error, errorMessages },\n } = excelItem;\n const { validateItem } = this.option;\n for (const column of this.option.columns) {\n if (!this.columnHiddenPipe.transform(column)) {\n continue;\n }\n try {\n if (column.defaultValue !== undefined) {\n item[column.field] = item[column.field] ?? column.defaultValue;\n } else if (column.required && !item[column.field] && item[column.field] !== 0) {\n error[column.field] = this.#i18n.t('core.component.import-excel.required');\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n continue;\n }\n if (column.type === 'string') {\n const value = (item[column.field] || '').toString();\n if (column.minlength !== undefined && value.length < column.minlength) {\n error[column.field] = this.#i18n.t('core.component.import-excel.min-length', { min: column.minlength });\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n continue;\n }\n if (column.maxlength !== undefined && value.length > column.maxlength) {\n error[column.field] = this.#i18n.t('core.component.import-excel.max-length', { max: column.maxlength });\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n continue;\n }\n item[column.field] = value;\n } else if (column.type === 'number') {\n if (item[column.field]) {\n const value = +item[column.field];\n if (!NumberUtilities.isNumber(item[column.field])) {\n error[column.field] = this.#i18n.t('core.component.import-excel.not-a-number', { value: item[column.field] });\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n continue;\n }\n item[column.field] = value;\n }\n if (!item[column.field] && item[column.field] !== 0) {\n item[column.field] = undefined;\n }\n if (column.min !== undefined && item[column.field] < column.min) {\n error[column.field] = this.#i18n.t('core.component.import-excel.below-min', { value: item[column.field], min: column.min });\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n continue;\n }\n if (column.max !== undefined && item[column.field] > column.max) {\n error[column.field] = this.#i18n.t('core.component.import-excel.above-max', { value: item[column.field], max: column.max });\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n continue;\n }\n } else if (column.type === 'bool') {\n if (\n item[column.field] === 0 ||\n item[column.field] === '0' ||\n item[column.field] === false ||\n item[column.field]?.toString()?.toLowerCase()?.trim() === 'false'\n ) {\n item[column.field] = false;\n } else if (\n item[column.field] === 1 ||\n item[column.field] === '1' ||\n item[column.field] === true ||\n item[column.field]?.toString()?.toLowerCase()?.trim() === 'true'\n ) {\n item[column.field] = true;\n } else if (item[column.field] === '') item[column.field] = undefined;\n\n if (typeof item[column.field] !== 'boolean' && item[column.field] !== undefined && item[column.field] !== null) {\n error[column.field] = this.#i18n.t('core.component.import-excel.invalid-bool');\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n }\n } else if (column.type === 'values') {\n if (item[column.field] && typeof item[column.field] !== 'number' && typeof item[column.field] !== 'string') {\n error[column.field] = this.#i18n.t('core.component.import-excel.invalid-value', { value: item[column.field] });\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n continue;\n }\n if (column.checkValueInArray && item[column.field] && !column.values.some(e => e.toString() === item[column.field].toString())) {\n error[column.field] = this.#i18n.t('core.component.import-excel.value-not-in-list', {\n value: item[column.field],\n list: column.values.join(),\n });\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n continue;\n }\n } else if (column.type === 'date' || column.type === 'datetime' || column.type === 'time') {\n const { type, format } = column;\n const val = item[column.field];\n if (val instanceof Date) {\n item[column.field] = val.toISOString();\n continue;\n }\n if (format && item[column.field]) {\n if (typeof val !== 'string') {\n error[column.field] = this.#i18n.t('core.component.import-excel.invalid-date-format', {\n value: val ?? '',\n format: column.format ?? '',\n });\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n continue;\n }\n if (type === 'date' && !this.#isValidDate(format, val)) {\n error[column.field] = this.#i18n.t('core.component.import-excel.invalid-date-format', {\n value: val ?? '',\n format: column.format ?? '',\n });\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n continue;\n }\n if (type === 'time' && !this.#isValidTime(format, val)) {\n error[column.field] = this.#i18n.t('core.component.import-excel.invalid-date-format', {\n value: val ?? '',\n format: column.format ?? '',\n });\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n continue;\n }\n if (type === 'datetime' && !this.#isValidDateTime(format, val)) {\n error[column.field] = this.#i18n.t('core.component.import-excel.invalid-date-format', {\n value: val ?? '',\n format: column.format ?? '',\n });\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n continue;\n }\n item[column.field] = DateUtilities.parseFrom(val, format);\n }\n if (item[column.field] && !DateUtilities.isDate(item[column.field])) {\n error[column.field] = this.#i18n.t('core.component.import-excel.invalid-date-format', {\n value: val ?? '',\n format: column.format ?? '',\n });\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n continue;\n }\n }\n\n // Nếu pass validation từng column, kiểm tra validation theo hàm validateItem\n if (!errorMessages.length && validateItem) {\n const validation = await validateItem(\n item,\n idx,\n this.excelItems.map(e => e.data)\n );\n if (validation.errorMessage) excelItem.meta.errorMessages.push(validation.errorMessage);\n if (validation.warningMessage) excelItem.meta.warningMessages.push(validation.warningMessage);\n }\n } catch (ex: any) {\n error[column.field] = `${ex?.message || ex?.error || ex || this.#i18n.t('core.component.import-excel.generic-error')}`;\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n }\n }\n };\n\n #mapItem = (item: SdImportExcelItem) => {\n const { data } = item;\n return data;\n };\n\n accept = () => {\n this.option!.accept(\n this.excelItems.map(e => e.data),\n { file: this.file! }\n );\n this.isUploaded = true;\n };\n\n setValidation = (validations: SdImportExcelValidation[]) => {\n this.excelItems.forEach(e => {\n e.meta.errorMessages = [];\n e.meta.warningMessages = [];\n });\n if (Array.isArray(validations)) {\n validations.forEach(validation => {\n if (validation.errorMessage) {\n this.excelItems[validation.idx].meta.errorMessages = [validation.errorMessage];\n }\n if (validation.warningMessage) {\n this.excelItems[validation.idx].meta.warningMessages = [validation.warningMessage];\n }\n });\n }\n this.#reload();\n this.ref.detectChanges();\n };\n\n view = (showing: 'ALL' | 'SUCCESS' | 'WARNING' | 'ERROR' = 'ALL') => {\n this.showing = showing;\n if (this.#paginator) this.#paginator.pageIndex = 0;\n this.#reload();\n };\n\n downloadTemplate = async () => {\n const sheets: SdExcelSheet[] = [];\n if (Array.isArray(this.option?.sheets)) {\n for (const sheet of this.option.sheets) {\n if (sheet.name && sheet.items && sheet.headers) {\n if (Array.isArray(sheet.items)) {\n sheets.push({\n name: sheet.name,\n items: sheet.items,\n headers: sheet.headers,\n });\n } else {\n sheets.push({\n name: sheet.name,\n items: await sheet.items(),\n headers: sheet.headers,\n });\n }\n }\n }\n }\n const columnNotHiddens = this.option.columns.filter(column => this.columnHiddenPipe.transform(column));\n const excelTemplate: SdExcelTemplate = {\n fileName: this.option.fileName || 'Template',\n columns: columnNotHiddens.map(column => {\n return {\n field: column.field,\n title: column.title,\n width: column.width,\n required: column.required,\n description: column.description,\n fontColor: column.fontColor,\n fill: column.fill,\n };\n }),\n sheets,\n };\n this.isDownloadTemplate = true;\n await this.excelService.generateTemplate(excelTemplate).finally(() => {\n this.isDownloadTemplate = false;\n });\n };\n\n export = async () => {\n this.loadingService.start();\n const columns: SdExcelTemplateColumn[] = [\n {\n field: 'sdMessage',\n title: this.#i18n.t('core.component.import-excel.message-column'),\n width: '250px',\n required: false,\n },\n ...this.option.columns.filter(column => this.columnHiddenPipe.transform(column)),\n ];\n await this.excelService\n .export({\n columns,\n items: this.filteredItems.map(e => {\n let result = {};\n for (const column of columns) {\n result = {\n ...result,\n [column.field]: e.meta.origin?.[column.field],\n };\n }\n return {\n ...result,\n sdMessage: (\n e.meta.errorMessages.join(', ') ||\n e.meta.warningMessages.join(', ') ||\n this.#i18n.t('core.component.import-excel.success')\n )\n ?.replace(/<strong>/g, '')\n .replace(/<\\/strong>/g, '')\n .replace(/<br>/g, '\\n'),\n };\n }),\n })\n .finally(this.loadingService.stop);\n };\n\n #isValidDate = (format: string, value: string) => {\n if (value?.length !== format?.length) {\n return false;\n }\n const regex =\n /^(?:(?:31(\\/|-|\\.)(?:0?[13578]|1[02]))\\1|(?:(?:29|30)(\\/|-|\\.)(?:0?[13-9]|1[0-2])\\2))(?:(?:1[6-9]|[2-9]\\d)?\\d{2})$|^(?:29(\\/|-|\\.)0?2\\3(?:(?:(?:1[6-9]|[2-9]\\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\\d|2[0-8])(\\/|-|\\.)(?:(?:0?[1-9])|(?:1[0-2]))\\4(?:(?:1[6-9]|[2-9]\\d)?\\d{2})$/;\n return regex.test(value);\n };\n\n #isValidTime = (format: string, value: string) => {\n if (value?.length !== format?.length) {\n return false;\n }\n return true;\n };\n\n #isValidDateTime = (format: string, value: string) => {\n if (value?.length !== format?.length) {\n return false;\n }\n const dates = value?.split(' ');\n if (dates.length !== 2) {\n return false;\n }\n const date = dates[0];\n if (!this.#isValidDate('dd/MM/yyyy', date)) {\n return false;\n }\n const time = dates[1];\n const regex = /^(0[0-9]|1[0-9]|2[0-3])(\\:)(0[0-9]|[0-5][0-9])$/;\n return regex.test(time);\n };\n onClosed = () => {\n this.sdClosed.emit();\n };\n}\n","@if (option) {\n <sd-modal\n [title]=\"option.title || ('core.component.import-excel.title' | translate)\"\n width=\"min(1120px, calc(100vw - 32px))\"\n (sdClosed)=\"onClosed()\"\n #modal>\n <div class=\"sd-import-workspace\" [attr.aria-busy]=\"uploading\">\n @if (uploading) {\n <sd-data-state state=\"loading\" [title]=\"'core.component.import-excel.loading' | translate\" message=\"\" />\n } @else if (!excelItems.length) {\n <div class=\"sd-import-entry\">\n <sd-data-state\n state=\"empty\"\n icon=\"upload_file\"\n [title]=\"'core.component.import-excel.title' | translate\"\n [message]=\"'core.component.import-excel.choose-hint' | translate: { limit: option.limit || 1000 }\" />\n <div class=\"sd-import-entry-actions\">\n <sd-button\n data-import-action=\"choose\"\n (click)=\"upload()\"\n prefixIcon=\"upload_file\"\n [title]=\"'core.component.import-excel.choose-file' | translate\"\n color=\"primary\"\n type=\"fill\"\n size=\"sm\" />\n <sd-button\n data-import-action=\"template\"\n (click)=\"downloadTemplate()\"\n prefixIcon=\"download\"\n [title]=\"'core.component.import-excel.template' | translate\"\n color=\"secondary\"\n type=\"link\"\n size=\"sm\"\n [loading]=\"isDownloadTemplate\" />\n </div>\n </div>\n } @else {\n <div class=\"sd-import-file\">\n <span class=\"sd-import-file-icon\" aria-hidden=\"true\"><mat-icon>description</mat-icon></span>\n <div class=\"sd-import-file-info\">\n <strong>{{ file?.name || option.fileName || ('core.component.import-excel.title' | translate) }}</strong>\n <span>{{ 'core.component.import-excel.row-count' | translate: { count: excelItems.length } }}</span>\n </div>\n <sd-button\n (click)=\"upload()\"\n prefixIcon=\"upload_file\"\n [title]=\"'core.component.import-excel.replace-file' | translate\"\n color=\"secondary\"\n type=\"link\"\n size=\"sm\" />\n </div>\n\n <div class=\"sd-import-filters\" role=\"group\" [attr.aria-label]=\"'core.component.import-excel.status' | translate\">\n @for (filter of filters; track filter.value) {\n <button\n type=\"button\"\n class=\"sd-import-filter\"\n [class]=\"'sd-import-filter sd-import-filter--' + filter.value.toLowerCase()\"\n [attr.data-import-filter]=\"filter.value\"\n [attr.aria-pressed]=\"showing === filter.value\"\n (click)=\"view(filter.value)\">\n <mat-icon aria-hidden=\"true\">{{ filter.icon }}</mat-icon>\n <span>{{ filter.label | translate }}</span\n ><span class=\"sd-import-filter-count\">{{ filterCount(filter.value) }}</span>\n </button>\n }\n </div>\n\n @if (viewItems.length) {\n <div class=\"table-responsive\" tabindex=\"0\" role=\"region\" [attr.aria-label]=\"'core.component.import-excel.preview' | translate\">\n <table class=\"sd-table\">\n <thead>\n <tr>\n <th class=\"text-center c-sticky-left\" style=\"width: 50px\">#</th>\n <th class=\"sd-import-status\">{{ 'core.component.import-excel.status' | translate }}</th>\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\">{{ column.title }}</span>\n </th>\n }\n }\n </tr>\n </thead>\n <tbody>\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 <td class=\"sd-import-status\">\n @let messages = validationMessages(item);\n @let issueCount = messages.errors.length + messages.warnings.length;\n @if (issueCount) {\n <details class=\"sd-import-issues\">\n <summary>\n <span [innerHTML]=\"item.meta.errorMessages[0] || item.meta.warningMessages[0]\"></span>\n <span class=\"sd-import-issue-count\">{{\n 'core.component.import-excel.issue-count' | translate: { count: issueCount }\n }}</span>\n </summary>\n <ul>\n @for (message of messages.errors; track $index) {\n <li class=\"sd-import-error\">\n <span class=\"sd-import-issue-label\">{{ 'core.component.import-excel.filter-error' | translate }}:</span>\n <span [innerHTML]=\"message\"></span>\n </li>\n }\n @for (message of messages.warnings; track $index) {\n <li class=\"sd-import-warning\">\n <span class=\"sd-import-issue-label\">{{ 'core.component.import-excel.filter-warning' | translate }}:</span>\n <span [innerHTML]=\"message\"></span>\n </li>\n }\n </ul>\n </details>\n } @else {\n <span class=\"sd-import-valid\">{{ 'core.component.import-excel.valid-data' | translate }}</span>\n }\n </td>\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 } @else {\n @let arrayItems = item.data[column.field]?.split(column.divideString);\n <div class=\"d-flex align-items-center justify-content-between\">\n <span>{{ arrayItems?.length || 0 }} {{ column.unitString }}</span>\n @if (arrayItems?.length) {\n <button\n mat-icon-button\n [matMenuTriggerFor]=\"menu\"\n class=\"c-mat-menu\"\n [attr.aria-label]=\"column.title\"\n style=\"width: 24px; height: 24px; line-height: 24px\">\n <mat-icon style=\"font-size: 18px\">open_in_new</mat-icon>\n </button>\n <mat-menu #menu=\"matMenu\">\n <div\n class=\"px-3 py-2 text-wrap\"\n role=\"group\"\n style=\"max-width: 300px; max-height: 250px; overflow: auto\"\n (click)=\"$event.stopPropagation()\"\n (keydown.enter)=\"$event.stopPropagation()\">\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 </tbody>\n </table>\n </div>\n } @else {\n <sd-data-state\n class=\"sd-import-no-results\"\n state=\"empty\"\n compact\n [title]=\"'core.component.import-excel.no-filter-results' | translate\"\n [message]=\"'core.component.import-excel.no-filter-results-hint' | translate\"\n [actionLabel]=\"'core.component.import-excel.see-all' | translate\"\n (sdAction)=\"view('ALL')\" />\n }\n <mat-paginator\n class=\"sd-import-paginator\"\n [hidden]=\"!filteredItems.length\"\n [length]=\"filteredItems.length\"\n [pageSize]=\"10\"\n hidePageSize />\n\n <div class=\"sd-import-footer\">\n @if (numberOfError) {\n <p class=\"sd-import-blocked\" role=\"status\">\n {{ 'core.component.import-excel.blocked-errors' | translate: { count: numberOfError } }}\n </p>\n } @else if (isUploaded) {\n <p class=\"sd-import-submitted\" role=\"status\">{{ 'core.component.import-excel.submitted' | translate }}</p>\n }\n <div class=\"sd-import-footer-actions\">\n <sd-button\n (click)=\"export()\"\n prefixIcon=\"download\"\n [disabled]=\"!filteredItems.length\"\n [title]=\"'core.component.import-excel.download' | translate\"\n size=\"sm\"\n color=\"secondary\"\n type=\"link\" />\n <sd-button\n data-import-action=\"accept\"\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 </div>\n </div>\n }\n </div>\n </sd-modal>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i3.ColumnHiddenPipe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAyHA;AACA;AACA;AACA;AACA;;MCvHa,gBAAgB,CAAA;AAC3B,IAAA,WAAA,GAAA,EAAgB;AAChB,IAAA,SAAS,CAAC,MAA2B,EAAA;AACnC,QAAA,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS,EAAE;AAC/B,YAAA,OAAO,IAAI;QACb;QACA,IAAI,QAAQ,MAAM,CAAC,MAAM,CAAC,KAAK,SAAS,EAAE;AACxC,YAAA,OAAO,CAAC,MAAM,CAAC,MAAM;QACvB;QACA,IAAI,QAAQ,MAAM,CAAC,MAAM,CAAC,KAAK,UAAU,EAAE;AACzC,YAAA,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE;QACzB;AACA,QAAA,OAAO,KAAK;IACd;wGAbW,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;4GAAhB,gBAAgB,EAAA,CAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE;AACP,iBAAA;;kBACA;;;MCIY,mBAAmB,CAAA;AACV,IAAA,SAAA;AAApB,IAAA,WAAA,CAAoB,SAAuB,EAAA;QAAvB,IAAA,CAAA,SAAS,GAAT,SAAS;IAAiB;;AAG9C,IAAA,MAAM,SAAS,CAAC,IAAuB,EAAE,MAA2B,EAAA;QAClE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,MAAM;QACzC,MAAM,KAAK,GA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AA,CAAA;sBAArC,SAAS;uBAAC,YAAY;gBAiBb,QAAQ,EAAA,CAAA;sBAAjB;;;AEtGH;;AAEG;;;;"}
1
+ {"version":3,"file":"sd-angular-core-components-import-excel.mjs","sources":["../../../projects/sd-angular/components/import-excel/src/import-excel.model.ts","../../../projects/sd-angular/components/import-excel/src/pipes/columm-hidden.pipe.ts","../../../projects/sd-angular/components/import-excel/src/pipes/column-transform.pipe.ts","../../../projects/sd-angular/components/import-excel/src/import-excel.component.ts","../../../projects/sd-angular/components/import-excel/src/import-excel.component.html","../../../projects/sd-angular/components/import-excel/sd-angular-core-components-import-excel.ts"],"sourcesContent":["export interface SdImportExcelValidation {\n idx: number;\n errorMessage?: string;\n warningMessage?: string;\n}\nexport interface SdImportExcelSheet<T = any> {\n name: string; // Tên của sheet\n items: T[] | (() => Promise<T[]>);\n headers: {\n value: Extract<keyof T, string>; // Trường muốn hiển thị\n display: string; // Label hiển thị\n }[];\n}\n\nexport interface SdImportExcelOption<T = any> {\n columns: SdUploadExcelColumn<T>[];\n accept: (items: T[], args: { file: File }) => SdImportExcelValidation[] | Promise<SdImportExcelValidation[]>;\n title?: string;\n fileName?: string;\n limit?: number;\n sheets?: SdImportExcelSheet[];\n transform?: (items: SdImportExcelItem<T>[]) => SdImportExcelItem<T>[] | Promise<SdImportExcelItem<T>[]>;\n validateItem?: (item: T, idx: number, items: T[]) => SdImportExcelValidation | Promise<SdImportExcelValidation>;\n validateItems?: (items: T[]) => SdImportExcelValidation[] | Promise<SdImportExcelValidation[]>;\n}\n\nexport type SdUploadExcelColumn<T = any> =\n | SdUploadExcelColumnString<T>\n | SdUploadExcelColumnNumber<T>\n | SdUploadExcelColumnBool<T>\n | SdUploadExcelColumnDate<T>\n | SdUploadExcelColumnTime<T>\n | SdUploadExcelColumnDateTime<T>\n | SdUploadExcelColumnValues<T>\n | SdUploadExcelColumnStringArray<T>;\n\nexport interface SdUploadExcelBaseColumn<T = any> {\n field: string;\n title: string;\n required?: boolean;\n width?: string;\n description?: string;\n hidden?: boolean | (() => boolean);\n fontColor?: string;\n fill?: string;\n transform?: (value: any, rowData: T) => string | Promise<string>;\n}\n\nexport interface SdUploadExcelColumnString<T = any> extends SdUploadExcelBaseColumn<T> {\n type: 'string';\n defaultValue?: string;\n pattern?: string;\n minlength?: number;\n maxlength?: number;\n}\n\nexport interface SdUploadExcelColumnNumber<T = any> extends SdUploadExcelBaseColumn<T> {\n type: 'number';\n defaultValue?: number;\n min?: number;\n max?: number;\n}\n\nexport interface SdUploadExcelColumnBool<T = any> extends SdUploadExcelBaseColumn<T> {\n type: 'bool';\n defaultValue?: boolean;\n parseToBool?: boolean;\n}\n\nexport interface SdUploadExcelColumnDate<T = any> extends SdUploadExcelBaseColumn<T> {\n type: 'date';\n format?: 'dd/MM/yyyy';\n defaultValue?: Date;\n minDate?: Date;\n maxDate?: Date;\n}\n\nexport interface SdUploadExcelColumnTime<T = any> extends SdUploadExcelBaseColumn<T> {\n type: 'time';\n format?: 'HH:mm' | 'HH:mm:ss';\n defaultValue?: Date;\n minDate?: Date;\n maxDate?: Date;\n}\n\nexport interface SdUploadExcelColumnDateTime<T = any> extends SdUploadExcelBaseColumn<T> {\n type: 'datetime';\n format?: 'dd/MM/yyyy HH:mm' | 'dd/MM/yyyy';\n defaultValue?: Date;\n minDate?: Date;\n maxDate?: Date;\n}\n\nexport interface SdUploadExcelColumnValues<T = any> extends SdUploadExcelBaseColumn<T> {\n type: 'values' | 'radio';\n defaultValue?: string | number;\n values: (string | number)[];\n checkValueInArray?: boolean;\n}\n\nexport interface SdUploadExcelColumnStringArray<T = any> extends SdUploadExcelBaseColumn<T> {\n type: 'array';\n divideString: string | ';';\n unitString: string | 'items';\n defaultValue?: string;\n minlength?: number;\n maxlength?: number;\n}\n\nexport type SdImportExcelItem<T = any> = {\n data: T;\n meta: {\n excelIndex: number;\n origin: T;\n error: Record<string, string>;\n errorMessages: string[];\n warning: Record<string, string>;\n warningMessages: string[];\n };\n};\n\n// export type ExcelItem<T> = {\n// origin?: T;\n// excelIndex?: number;\n// validation: SdUploadExcelValidation;\n// } & T;\n","import { Injectable, Pipe, PipeTransform } from '@angular/core';\nimport { SdUploadExcelColumn } from '../import-excel.model';\n@Pipe({\n name: 'columnHidden'\n})\n@Injectable()\nexport class ColumnHiddenPipe implements PipeTransform {\n constructor() { }\n transform(column: SdUploadExcelColumn): boolean {\n if (column.hidden === undefined) {\n return true;\n }\n if (typeof (column.hidden) === 'boolean') {\n return !column.hidden;\n }\n if (typeof (column.hidden) === 'function') {\n return !column.hidden();\n }\n return false;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { ɵSD_LOCAL_DATE_TIME, ɵsdInjectDateTime } from '@sd-angular/core/services/date-time';\nimport { NumberUtilities } from '@sd-angular/core/utilities';\nimport { SdImportExcelItem, SdUploadExcelColumn } from '../import-excel.model';\n\n@Pipe({\n name: 'columnTransform',\n standalone: true,\n})\nexport class ColumnTransformPipe implements PipeTransform {\n // why: `new ColumnTransformPipe(sanitizer)` outside an injection context keeps the local behavior (no zone).\n readonly #dateTime = ɵsdInjectDateTime() ?? ɵSD_LOCAL_DATE_TIME;\n\n constructor(private sanitizer: DomSanitizer) {}\n\n // Chuyển thành async để hỗ trợ Promise từ bên ngoài\n async transform(item: SdImportExcelItem, column: SdUploadExcelColumn): Promise<string | SafeHtml> {\n const { type, transform, field } = column;\n const value = item.data[field];\n\n // 1. Ưu tiên hiển thị dữ liệu gốc nếu có lỗi\n if (item.meta.error[field]) {\n return item.meta.origin[field] ?? value ?? '';\n }\n\n // 2. Custom Transform (Hỗ trợ cả Sync và Async)\n if (transform) {\n // await sẽ hoạt động đúng dù transform trả về value thường hay Promise\n const result = await transform(item.data, value);\n return result ?? '';\n }\n\n // 3. Xử lý logic hiển thị\n switch (type) {\n case 'number':\n return NumberUtilities.toVN(value) ?? '';\n\n case 'bool':\n if (typeof value === 'boolean') {\n const html = `<div class=\"text-center\"><input type=\"checkbox\" ${value ? 'checked' : ''} disabled></div>`;\n // Bắt buộc bypass security để hiển thị được input checkbox\n return this.sanitizer.bypassSecurityTrustHtml(html);\n }\n return '';\n\n case 'date':\n return this.#dateTime.toFormat(value, column.format || 'dd/MM/yyyy') ?? '';\n\n case 'datetime':\n return this.#dateTime.toFormat(value, column.format || 'dd/MM/yyyy HH:mm') ?? '';\n\n default:\n return value ?? '';\n }\n }\n}","import { SdDataState } from '@sd-angular/core/components/data-state';\nimport { ChangeDetectorRef, Component, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild, inject } from '@angular/core';\n\nimport { MatPaginator, MatPaginatorModule } from '@angular/material/paginator';\nimport { Subscription } from 'rxjs';\nimport { ColumnHiddenPipe } from './pipes/columm-hidden.pipe';\nimport { SdImportExcelItem, SdImportExcelOption, SdImportExcelSheet, SdImportExcelValidation } from './import-excel.model';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { SdButton } from '@sd-angular/core/components/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { SdModal } from '@sd-angular/core/components/modal';\nimport { SdInput } from '@sd-angular/core/forms/input';\nimport { SdExcelService, SdExcelSheet, SdExcelTemplate, SdExcelTemplateColumn } from '@sd-angular/core/services/excel';\nimport { SdNotifyService } from '@sd-angular/core/services/notify';\nimport { SdDateTimeService } from '@sd-angular/core/services/date-time';\nimport { DateUtilities, NumberUtilities } from '@sd-angular/core/utilities';\nimport { SdLoadingService } from '@sd-angular/core/services/loading';\nimport { ColumnTransformPipe } from './pipes/column-transform.pipe';\nimport { MatProgressSpinner } from '@angular/material/progress-spinner';\nimport { SdBadge } from '@sd-angular/core/components/badge';\nimport { I18nService, TranslatePipe } from '@sd-angular/core/i18n';\n\n@Component({\n selector: 'sd-import-excel',\n templateUrl: './import-excel.component.html',\n styleUrl: './import-excel.component.scss',\n imports: [\n SdDataState,\n CommonModule,\n FormsModule,\n MatSlideToggleModule,\n MatTooltipModule,\n MatPaginatorModule,\n MatSlideToggleModule,\n SdButton,\n SdModal,\n ColumnTransformPipe,\n ColumnHiddenPipe,\n MatIconModule,\n MatMenuModule,\n MatProgressSpinner,\n SdBadge,\n TranslatePipe,\n ],\n providers: [ColumnHiddenPipe],\n})\nexport class SdImportExcel implements OnInit, OnDestroy {\n @Input({ required: true }) option!: SdImportExcelOption;\n @ViewChild(SdModal) modal!: SdModal;\n excelItems: SdImportExcelItem[] = [];\n // originItems: SdExcelItem[] = [];\n hasDescription = false;\n\n showing: 'ALL' | 'SUCCESS' | 'WARNING' | 'ERROR' = 'ALL';\n readonly filters = [\n { value: 'ALL', label: 'core.component.import-excel.filter-all', icon: 'list_alt' },\n { value: 'SUCCESS', label: 'core.component.import-excel.filter-success', icon: 'check_circle_outline' },\n { value: 'WARNING', label: 'core.component.import-excel.filter-warning', icon: 'warning_amber' },\n { value: 'ERROR', label: 'core.component.import-excel.filter-error', icon: 'error_outline' },\n ] as const;\n\n filterCount = (value: 'ALL' | 'SUCCESS' | 'WARNING' | 'ERROR'): number => {\n if (value === 'SUCCESS') return this.numberOfSuccess;\n if (value === 'WARNING') return this.numberOfWarning;\n if (value === 'ERROR') return this.numberOfError;\n return this.excelItems.length;\n };\n\n // why: callback có thể trả cùng thông báo nhiều lần; chỉ gộp phần hiển thị, giữ nguyên kết quả validation.\n protected validationMessages = (item: SdImportExcelItem) => ({\n errors: [...new Set(item.meta.errorMessages)],\n warnings: [...new Set(item.meta.warningMessages)],\n });\n\n filteredItems: SdImportExcelItem[] = [];\n viewItems: SdImportExcelItem[] = [];\n numberOfSuccess = 0;\n numberOfError = 0;\n numberOfWarning = 0;\n file?: File;\n #paginator?: MatPaginator;\n #paginatorSub?: Subscription;\n @ViewChild(MatPaginator) set paginator(paginator: MatPaginator | undefined) {\n if (!paginator) {\n this.#paginatorSub?.unsubscribe();\n this.#paginator = undefined;\n return;\n }\n if (paginator && this.#paginator !== paginator) {\n this.#paginator = paginator;\n this.#paginatorSub?.unsubscribe(); // Clear cũ\n this.#paginatorSub = paginator.page.subscribe(this.#reload);\n this.#subscription.add(this.#paginatorSub);\n }\n }\n #subscription = new Subscription();\n uploading = false;\n isUploaded = false;\n isDownloadTemplate = false;\n @Output() sdClosed = new EventEmitter();\n readonly #i18n = inject(I18nService);\n // why: date cells are wall clock in ISdCoreConfiguration.timeZone, not in the browser zone.\n readonly #dateTime = inject(SdDateTimeService);\n constructor(\n private ref: ChangeDetectorRef,\n private excelService: SdExcelService,\n private notifyService: SdNotifyService,\n private columnHiddenPipe: ColumnHiddenPipe,\n private loadingService: SdLoadingService\n ) {}\n\n ngOnInit() {\n this.isUploaded = false;\n }\n\n ngOnDestroy() {\n this.#subscription.unsubscribe();\n }\n\n open = () => {\n this.#reset();\n this.modal.open();\n };\n\n close = () => {\n this.modal.close();\n };\n\n #reset = () => {\n this.excelItems = [];\n this.filteredItems = [];\n this.viewItems = [];\n this.numberOfSuccess = 0;\n this.numberOfError = 0;\n this.numberOfWarning = 0;\n this.showing = 'ALL';\n this.file = undefined;\n this.isUploaded = false;\n };\n\n #reload = () => {\n const pageIndex = this.#paginator?.pageIndex ?? 0;\n // why: lần đọc tệp đầu tiên chưa render paginator; dùng cùng pageSize của preview.\n const pageSize = this.#paginator?.pageSize || 10;\n this.filteredItems = this.excelItems.filter(item => {\n const { errorMessages, warningMessages } = item.meta;\n if (this.showing === 'SUCCESS') {\n return !errorMessages.length && !warningMessages.length;\n } else if (this.showing === 'WARNING') {\n return !!warningMessages.length && !errorMessages.length;\n } else if (this.showing === 'ERROR') {\n return !!errorMessages.length;\n }\n return true;\n });\n this.viewItems = this.filteredItems.filter((item, index) => index >= pageIndex * pageSize && index < (pageIndex + 1) * pageSize);\n\n this.numberOfSuccess = this.excelItems.filter(this.#filterSuccess).length;\n this.numberOfError = this.excelItems.filter(this.#filterError).length;\n this.numberOfWarning = this.excelItems.filter(this.#filterWarning).length;\n };\n\n #filterError = (item: SdImportExcelItem) => !!item.meta.errorMessages.length;\n #filterWarning = (item: SdImportExcelItem) => item.meta.warningMessages.length && !item.meta.errorMessages.length;\n #filterSuccess = (item: SdImportExcelItem) => !item.meta.errorMessages.length && !item.meta.warningMessages.length;\n\n upload = async () => {\n try {\n const { transform, validateItem, validateItems } = this.option;\n const { items, file } = await this.excelService.upload();\n this.hasDescription = this.option.columns.some(e => !!e.description);\n const offset = this.hasDescription ? 2 : 1;\n items.splice(0, offset);\n if (items.length === 0) {\n this.notifyService.warning(this.#i18n.t('core.component.import-excel.no-data-in-file'));\n return;\n }\n const limit = this.option.limit || 1000;\n if (items.length > limit) {\n this.notifyService.warning(this.#i18n.t('core.component.import-excel.row-limit', { limit }));\n return;\n }\n this.#reset();\n this.excelItems = items.map<SdImportExcelItem>((data, idx) => ({\n data,\n meta: {\n excelIndex: idx + (this.hasDescription ? 4 : 3),\n origin: { ...data },\n error: {},\n warning: {},\n errorMessages: [],\n warningMessages: [],\n },\n }));\n\n if (transform) {\n const mappedItems = transform(this.excelItems);\n if (mappedItems instanceof Promise) {\n this.uploading = true;\n this.excelItems = await mappedItems.finally(() => (this.uploading = false));\n } else {\n this.excelItems = mappedItems || this.excelItems;\n }\n }\n this.file = file!;\n this.loadingService.start();\n const validatePromises = this.excelItems.map((item, idx) => this.#validate(item, idx));\n await Promise.all(validatePromises);\n\n // Nếu không có error thì tiếp tục validate từ option validate truyền vào\n\n if (!this.excelItems.some(this.#filterError) && validateItems) {\n const results = await validateItems(this.excelItems.map(e => e.data));\n results\n .filter(result => result.idx >= 0)\n .forEach(result => {\n if (result?.errorMessage) {\n this.excelItems[result.idx].meta.errorMessages.push(result.errorMessage);\n }\n if (result?.warningMessage) {\n this.excelItems[result.idx].meta.warningMessages.push(result.warningMessage);\n }\n });\n }\n\n if (this.#paginator) this.#paginator.pageIndex = 0;\n this.#reload();\n this.ref.detectChanges();\n\n this.isUploaded = false;\n } catch (err: any) {\n this.notifyService.error(err);\n } finally {\n this.loadingService.stop();\n }\n };\n\n #validate = async (excelItem: SdImportExcelItem, idx: number) => {\n const {\n data: item,\n meta: { error, errorMessages },\n } = excelItem;\n const { validateItem } = this.option;\n for (const column of this.option.columns) {\n if (!this.columnHiddenPipe.transform(column)) {\n continue;\n }\n try {\n if (column.defaultValue !== undefined) {\n item[column.field] = item[column.field] ?? column.defaultValue;\n } else if (column.required && !item[column.field] && item[column.field] !== 0) {\n error[column.field] = this.#i18n.t('core.component.import-excel.required');\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n continue;\n }\n if (column.type === 'string') {\n const value = (item[column.field] || '').toString();\n if (column.minlength !== undefined && value.length < column.minlength) {\n error[column.field] = this.#i18n.t('core.component.import-excel.min-length', { min: column.minlength });\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n continue;\n }\n if (column.maxlength !== undefined && value.length > column.maxlength) {\n error[column.field] = this.#i18n.t('core.component.import-excel.max-length', { max: column.maxlength });\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n continue;\n }\n item[column.field] = value;\n } else if (column.type === 'number') {\n if (item[column.field]) {\n const value = +item[column.field];\n if (!NumberUtilities.isNumber(item[column.field])) {\n error[column.field] = this.#i18n.t('core.component.import-excel.not-a-number', { value: item[column.field] });\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n continue;\n }\n item[column.field] = value;\n }\n if (!item[column.field] && item[column.field] !== 0) {\n item[column.field] = undefined;\n }\n if (column.min !== undefined && item[column.field] < column.min) {\n error[column.field] = this.#i18n.t('core.component.import-excel.below-min', { value: item[column.field], min: column.min });\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n continue;\n }\n if (column.max !== undefined && item[column.field] > column.max) {\n error[column.field] = this.#i18n.t('core.component.import-excel.above-max', { value: item[column.field], max: column.max });\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n continue;\n }\n } else if (column.type === 'bool') {\n if (\n item[column.field] === 0 ||\n item[column.field] === '0' ||\n item[column.field] === false ||\n item[column.field]?.toString()?.toLowerCase()?.trim() === 'false'\n ) {\n item[column.field] = false;\n } else if (\n item[column.field] === 1 ||\n item[column.field] === '1' ||\n item[column.field] === true ||\n item[column.field]?.toString()?.toLowerCase()?.trim() === 'true'\n ) {\n item[column.field] = true;\n } else if (item[column.field] === '') item[column.field] = undefined;\n\n if (typeof item[column.field] !== 'boolean' && item[column.field] !== undefined && item[column.field] !== null) {\n error[column.field] = this.#i18n.t('core.component.import-excel.invalid-bool');\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n }\n } else if (column.type === 'values') {\n if (item[column.field] && typeof item[column.field] !== 'number' && typeof item[column.field] !== 'string') {\n error[column.field] = this.#i18n.t('core.component.import-excel.invalid-value', { value: item[column.field] });\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n continue;\n }\n if (column.checkValueInArray && item[column.field] && !column.values.some(e => e.toString() === item[column.field].toString())) {\n error[column.field] = this.#i18n.t('core.component.import-excel.value-not-in-list', {\n value: item[column.field],\n list: column.values.join(),\n });\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n continue;\n }\n } else if (column.type === 'date' || column.type === 'datetime' || column.type === 'time') {\n const { type, format } = column;\n const val = item[column.field];\n if (val instanceof Date) {\n item[column.field] = this.#excelDateCell(val);\n continue;\n }\n if (format && item[column.field]) {\n if (typeof val !== 'string') {\n error[column.field] = this.#i18n.t('core.component.import-excel.invalid-date-format', {\n value: val ?? '',\n format: column.format ?? '',\n });\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n continue;\n }\n if (type === 'date' && !this.#isValidDate(format, val)) {\n error[column.field] = this.#i18n.t('core.component.import-excel.invalid-date-format', {\n value: val ?? '',\n format: column.format ?? '',\n });\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n continue;\n }\n if (type === 'time' && !this.#isValidTime(format, val)) {\n error[column.field] = this.#i18n.t('core.component.import-excel.invalid-date-format', {\n value: val ?? '',\n format: column.format ?? '',\n });\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n continue;\n }\n if (type === 'datetime' && !this.#isValidDateTime(format, val)) {\n error[column.field] = this.#i18n.t('core.component.import-excel.invalid-date-format', {\n value: val ?? '',\n format: column.format ?? '',\n });\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n continue;\n }\n item[column.field] = this.#dateTime.parseFrom(val, format);\n }\n if (item[column.field] && !DateUtilities.isDate(item[column.field])) {\n error[column.field] = this.#i18n.t('core.component.import-excel.invalid-date-format', {\n value: val ?? '',\n format: column.format ?? '',\n });\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n continue;\n }\n }\n\n // Nếu pass validation từng column, kiểm tra validation theo hàm validateItem\n if (!errorMessages.length && validateItem) {\n const validation = await validateItem(\n item,\n idx,\n this.excelItems.map(e => e.data)\n );\n if (validation.errorMessage) excelItem.meta.errorMessages.push(validation.errorMessage);\n if (validation.warningMessage) excelItem.meta.warningMessages.push(validation.warningMessage);\n }\n } catch (ex: any) {\n error[column.field] = `${ex?.message || ex?.error || ex || this.#i18n.t('core.component.import-excel.generic-error')}`;\n errorMessages.push(`<strong>[${column.title || column.field}]</strong> ${error[column.field]}`);\n }\n }\n };\n\n #mapItem = (item: SdImportExcelItem) => {\n const { data } = item;\n return data;\n };\n\n accept = () => {\n this.option!.accept(\n this.excelItems.map(e => e.data),\n { file: this.file! }\n );\n this.isUploaded = true;\n };\n\n setValidation = (validations: SdImportExcelValidation[]) => {\n this.excelItems.forEach(e => {\n e.meta.errorMessages = [];\n e.meta.warningMessages = [];\n });\n if (Array.isArray(validations)) {\n validations.forEach(validation => {\n if (validation.errorMessage) {\n this.excelItems[validation.idx].meta.errorMessages = [validation.errorMessage];\n }\n if (validation.warningMessage) {\n this.excelItems[validation.idx].meta.warningMessages = [validation.warningMessage];\n }\n });\n }\n this.#reload();\n this.ref.detectChanges();\n };\n\n view = (showing: 'ALL' | 'SUCCESS' | 'WARNING' | 'ERROR' = 'ALL') => {\n this.showing = showing;\n if (this.#paginator) this.#paginator.pageIndex = 0;\n this.#reload();\n };\n\n downloadTemplate = async () => {\n const sheets: SdExcelSheet[] = [];\n if (Array.isArray(this.option?.sheets)) {\n for (const sheet of this.option.sheets) {\n if (sheet.name && sheet.items && sheet.headers) {\n if (Array.isArray(sheet.items)) {\n sheets.push({\n name: sheet.name,\n items: sheet.items,\n headers: sheet.headers,\n });\n } else {\n sheets.push({\n name: sheet.name,\n items: await sheet.items(),\n headers: sheet.headers,\n });\n }\n }\n }\n }\n const columnNotHiddens = this.option.columns.filter(column => this.columnHiddenPipe.transform(column));\n const excelTemplate: SdExcelTemplate = {\n fileName: this.option.fileName || 'Template',\n columns: columnNotHiddens.map(column => {\n return {\n field: column.field,\n title: column.title,\n width: column.width,\n required: column.required,\n description: column.description,\n fontColor: column.fontColor,\n fill: column.fill,\n };\n }),\n sheets,\n };\n this.isDownloadTemplate = true;\n await this.excelService.generateTemplate(excelTemplate).finally(() => {\n this.isDownloadTemplate = false;\n });\n };\n\n export = async () => {\n this.loadingService.start();\n const columns: SdExcelTemplateColumn[] = [\n {\n field: 'sdMessage',\n title: this.#i18n.t('core.component.import-excel.message-column'),\n width: '250px',\n required: false,\n },\n ...this.option.columns.filter(column => this.columnHiddenPipe.transform(column)),\n ];\n await this.excelService\n .export({\n columns,\n items: this.filteredItems.map(e => {\n let result = {};\n for (const column of columns) {\n result = {\n ...result,\n [column.field]: e.meta.origin?.[column.field],\n };\n }\n return {\n ...result,\n sdMessage: (\n e.meta.errorMessages.join(', ') ||\n e.meta.warningMessages.join(', ') ||\n this.#i18n.t('core.component.import-excel.success')\n )\n ?.replace(/<strong>/g, '')\n .replace(/<\\/strong>/g, '')\n .replace(/<br>/g, '\\n'),\n };\n }),\n })\n .finally(this.loadingService.stop);\n };\n\n #isValidDate = (format: string, value: string) => {\n if (value?.length !== format?.length) {\n return false;\n }\n const regex =\n /^(?:(?:31(\\/|-|\\.)(?:0?[13578]|1[02]))\\1|(?:(?:29|30)(\\/|-|\\.)(?:0?[13-9]|1[0-2])\\2))(?:(?:1[6-9]|[2-9]\\d)?\\d{2})$|^(?:29(\\/|-|\\.)0?2\\3(?:(?:(?:1[6-9]|[2-9]\\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\\d|2[0-8])(\\/|-|\\.)(?:(?:0?[1-9])|(?:1[0-2]))\\4(?:(?:1[6-9]|[2-9]\\d)?\\d{2})$/;\n return regex.test(value);\n };\n\n #isValidTime = (format: string, value: string) => {\n if (value?.length !== format?.length) {\n return false;\n }\n return true;\n };\n\n #isValidDateTime = (format: string, value: string) => {\n if (value?.length !== format?.length) {\n return false;\n }\n const dates = value?.split(' ');\n if (dates.length !== 2) {\n return false;\n }\n const date = dates[0];\n if (!this.#isValidDate('dd/MM/yyyy', date)) {\n return false;\n }\n const time = dates[1];\n const regex = /^(0[0-9]|1[0-9]|2[0-3])(\\:)(0[0-9]|[0-5][0-9])$/;\n return regex.test(time);\n };\n\n /** exceljs gives a date cell as a Date whose UTC fields are the Excel wall clock; read it in the zone. */\n #excelDateCell(value: Date): string {\n if (this.#dateTime.timeZone === 'local') return value.toISOString();\n const carrier = new Date(0);\n carrier.setFullYear(value.getUTCFullYear(), value.getUTCMonth(), value.getUTCDate());\n carrier.setHours(value.getUTCHours(), value.getUTCMinutes(), value.getUTCSeconds(), value.getUTCMilliseconds());\n return this.#dateTime.fromWallClock(carrier).toISOString();\n }\n\n onClosed = () => {\n this.sdClosed.emit();\n };\n}\n","@if (option) {\n <sd-modal\n [title]=\"option.title || ('core.component.import-excel.title' | translate)\"\n width=\"min(1120px, calc(100vw - 32px))\"\n (sdClosed)=\"onClosed()\"\n #modal>\n <div class=\"sd-import-workspace\" [attr.aria-busy]=\"uploading\">\n @if (uploading) {\n <sd-data-state state=\"loading\" [title]=\"'core.component.import-excel.loading' | translate\" message=\"\" />\n } @else if (!excelItems.length) {\n <div class=\"sd-import-entry\">\n <sd-data-state\n state=\"empty\"\n icon=\"upload_file\"\n [title]=\"'core.component.import-excel.title' | translate\"\n [message]=\"'core.component.import-excel.choose-hint' | translate: { limit: option.limit || 1000 }\" />\n <div class=\"sd-import-entry-actions\">\n <sd-button\n data-import-action=\"choose\"\n (click)=\"upload()\"\n prefixIcon=\"upload_file\"\n [title]=\"'core.component.import-excel.choose-file' | translate\"\n color=\"primary\"\n type=\"fill\"\n size=\"sm\" />\n <sd-button\n data-import-action=\"template\"\n (click)=\"downloadTemplate()\"\n prefixIcon=\"download\"\n [title]=\"'core.component.import-excel.template' | translate\"\n color=\"secondary\"\n type=\"link\"\n size=\"sm\"\n [loading]=\"isDownloadTemplate\" />\n </div>\n </div>\n } @else {\n <div class=\"sd-import-file\">\n <span class=\"sd-import-file-icon\" aria-hidden=\"true\"><mat-icon>description</mat-icon></span>\n <div class=\"sd-import-file-info\">\n <strong>{{ file?.name || option.fileName || ('core.component.import-excel.title' | translate) }}</strong>\n <span>{{ 'core.component.import-excel.row-count' | translate: { count: excelItems.length } }}</span>\n </div>\n <sd-button\n (click)=\"upload()\"\n prefixIcon=\"upload_file\"\n [title]=\"'core.component.import-excel.replace-file' | translate\"\n color=\"secondary\"\n type=\"link\"\n size=\"sm\" />\n </div>\n\n <div class=\"sd-import-filters\" role=\"group\" [attr.aria-label]=\"'core.component.import-excel.status' | translate\">\n @for (filter of filters; track filter.value) {\n <button\n type=\"button\"\n class=\"sd-import-filter\"\n [class]=\"'sd-import-filter sd-import-filter--' + filter.value.toLowerCase()\"\n [attr.data-import-filter]=\"filter.value\"\n [attr.aria-pressed]=\"showing === filter.value\"\n (click)=\"view(filter.value)\">\n <mat-icon aria-hidden=\"true\">{{ filter.icon }}</mat-icon>\n <span>{{ filter.label | translate }}</span\n ><span class=\"sd-import-filter-count\">{{ filterCount(filter.value) }}</span>\n </button>\n }\n </div>\n\n @if (viewItems.length) {\n <div class=\"table-responsive\" tabindex=\"0\" role=\"region\" [attr.aria-label]=\"'core.component.import-excel.preview' | translate\">\n <table class=\"sd-table\">\n <thead>\n <tr>\n <th class=\"text-center c-sticky-left\" style=\"width: 50px\">#</th>\n <th class=\"sd-import-status\">{{ 'core.component.import-excel.status' | translate }}</th>\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\">{{ column.title }}</span>\n </th>\n }\n }\n </tr>\n </thead>\n <tbody>\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 <td class=\"sd-import-status\">\n @let messages = validationMessages(item);\n @let issueCount = messages.errors.length + messages.warnings.length;\n @if (issueCount) {\n <details class=\"sd-import-issues\">\n <summary>\n <span [innerHTML]=\"item.meta.errorMessages[0] || item.meta.warningMessages[0]\"></span>\n <span class=\"sd-import-issue-count\">{{\n 'core.component.import-excel.issue-count' | translate: { count: issueCount }\n }}</span>\n </summary>\n <ul>\n @for (message of messages.errors; track $index) {\n <li class=\"sd-import-error\">\n <span class=\"sd-import-issue-label\">{{ 'core.component.import-excel.filter-error' | translate }}:</span>\n <span [innerHTML]=\"message\"></span>\n </li>\n }\n @for (message of messages.warnings; track $index) {\n <li class=\"sd-import-warning\">\n <span class=\"sd-import-issue-label\">{{ 'core.component.import-excel.filter-warning' | translate }}:</span>\n <span [innerHTML]=\"message\"></span>\n </li>\n }\n </ul>\n </details>\n } @else {\n <span class=\"sd-import-valid\">{{ 'core.component.import-excel.valid-data' | translate }}</span>\n }\n </td>\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 } @else {\n @let arrayItems = item.data[column.field]?.split(column.divideString);\n <div class=\"d-flex align-items-center justify-content-between\">\n <span>{{ arrayItems?.length || 0 }} {{ column.unitString }}</span>\n @if (arrayItems?.length) {\n <button\n mat-icon-button\n [matMenuTriggerFor]=\"menu\"\n class=\"c-mat-menu\"\n [attr.aria-label]=\"column.title\"\n style=\"width: 24px; height: 24px; line-height: 24px\">\n <mat-icon style=\"font-size: 18px\">open_in_new</mat-icon>\n </button>\n <mat-menu #menu=\"matMenu\">\n <div\n class=\"px-3 py-2 text-wrap\"\n role=\"group\"\n style=\"max-width: 300px; max-height: 250px; overflow: auto\"\n (click)=\"$event.stopPropagation()\"\n (keydown.enter)=\"$event.stopPropagation()\">\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 </tbody>\n </table>\n </div>\n } @else {\n <sd-data-state\n class=\"sd-import-no-results\"\n state=\"empty\"\n compact\n [title]=\"'core.component.import-excel.no-filter-results' | translate\"\n [message]=\"'core.component.import-excel.no-filter-results-hint' | translate\"\n [actionLabel]=\"'core.component.import-excel.see-all' | translate\"\n (sdAction)=\"view('ALL')\" />\n }\n <mat-paginator\n class=\"sd-import-paginator\"\n [hidden]=\"!filteredItems.length\"\n [length]=\"filteredItems.length\"\n [pageSize]=\"10\"\n hidePageSize />\n\n <div class=\"sd-import-footer\">\n @if (numberOfError) {\n <p class=\"sd-import-blocked\" role=\"status\">\n {{ 'core.component.import-excel.blocked-errors' | translate: { count: numberOfError } }}\n </p>\n } @else if (isUploaded) {\n <p class=\"sd-import-submitted\" role=\"status\">{{ 'core.component.import-excel.submitted' | translate }}</p>\n }\n <div class=\"sd-import-footer-actions\">\n <sd-button\n (click)=\"export()\"\n prefixIcon=\"download\"\n [disabled]=\"!filteredItems.length\"\n [title]=\"'core.component.import-excel.download' | translate\"\n size=\"sm\"\n color=\"secondary\"\n type=\"link\" />\n <sd-button\n data-import-action=\"accept\"\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 </div>\n </div>\n }\n </div>\n </sd-modal>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ɵsdInjectDateTime","ɵSD_LOCAL_DATE_TIME","i1","i3.ColumnHiddenPipe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyHA;AACA;AACA;AACA;AACA;;MCvHa,gBAAgB,CAAA;AAC3B,IAAA,WAAA,GAAA,EAAgB;AAChB,IAAA,SAAS,CAAC,MAA2B,EAAA;AACnC,QAAA,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS,EAAE;AAC/B,YAAA,OAAO,IAAI;QACb;QACA,IAAI,QAAQ,MAAM,CAAC,MAAM,CAAC,KAAK,SAAS,EAAE;AACxC,YAAA,OAAO,CAAC,MAAM,CAAC,MAAM;QACvB;QACA,IAAI,QAAQ,MAAM,CAAC,MAAM,CAAC,KAAK,UAAU,EAAE;AACzC,YAAA,OAAO,CAAC,MAAM,CAAC,MAAM,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A,EAAA;8MAGF,MAAM,EAAA,CAAA;sBAAhC,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;gBACL,KAAK,EAAA,CAAA;sBAAxB,SAAS;uBAAC,OAAO;gBAkCW,SAAS,EAAA,CAAA;sBAArC,SAAS;uBAAC,YAAY;gBAiBb,QAAQ,EAAA,CAAA;sBAAjB;;;AEvGH;;AAEG;;;;"}
@@ -34,6 +34,10 @@ const SD_INFORM_DEFAULT_ICON = {
34
34
  };
35
35
  class SdInform {
36
36
  // 1. INPUTS
37
+ /** Banner thường hoặc gợi ý gọn (`tip`); null/undefined quay về `default`. */
38
+ type = input('default', {
39
+ transform: value => value ?? 'default',
40
+ });
37
41
  color = input('primary', {
38
42
  transform: value => value || 'primary',
39
43
  });
@@ -47,6 +51,13 @@ class SdInform {
47
51
  description = input();
48
52
  icon = input();
49
53
  hideIcon = input(false, { transform: booleanAttribute });
54
+ /**
55
+ * Nền ô icon: `'none'` (mặc định, không nền, giữ kích thước ô), `'square'` (bo 8px) hoặc `'circle'`.
56
+ * Null/undefined quay về `none`. Variant `tip` luôn phẳng, không nền.
57
+ */
58
+ iconShape = input('none', {
59
+ transform: value => value ?? 'none',
60
+ });
50
61
  fontSet = input('material-icons-outlined', {
51
62
  transform: value => value || 'material-icons-outlined',
52
63
  });
@@ -119,7 +130,10 @@ class SdInform {
119
130
  return this.overflowing() || this.expanded();
120
131
  });
121
132
  // why: error/warning là cảnh báo → assertive 'alert'; các màu còn lại là thông tin → polite 'status'.
133
+ // Tip là gợi ý tĩnh cạnh form/bảng → 'note' cho mọi màu, không đọc lại như live region.
122
134
  liveRole = computed(() => {
135
+ if (this.type() === 'tip')
136
+ return 'note';
123
137
  const c = this.effectiveColor();
124
138
  return c === 'error' || c === 'warning' ? 'alert' : 'status';
125
139
  });
@@ -175,11 +189,11 @@ class SdInform {
175
189
  this.sdAction.emit(event);
176
190
  }
177
191
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdInform, deps: [], target: i0.ɵɵFactoryTarget.Component });
178
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", 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 <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 ><mat-icon class=\"c-inform-icon c-material-icon\" aria-hidden=\"true\" [ngClass]=\"fontSetClasses()\">{{\n _effectiveIcon\n }}</mat-icon></span\n >\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') | translate }}\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' | translate\" (click)=\"onClose($event)\">\n <mat-icon class=\"material-icons\" aria-hidden=\"true\">close</mat-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-black500);overflow-wrap:anywhere}.c-inform-body{font-size:14px;line-height:21px;color:var(--sd-black500);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-black400);cursor:pointer}.c-inform-close:hover{background:var(--sd-black100, #f3f4f6);color:var(--sd-black500)}.c-inform-close mat-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: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
192
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdInform, isStandalone: true, selector: "sd-inform", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, 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 }, iconShape: { classPropertyName: "iconShape", publicName: "iconShape", 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 _description = description();\n @let _isTip = type() === 'tip';\n <div\n class=\"c-inform\"\n [class.c-inform-tip]=\"_isTip\"\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\" [attr.data-icon-shape]=\"iconShape()\"\n ><mat-icon class=\"c-inform-icon c-material-icon\" aria-hidden=\"true\" [ngClass]=\"fontSetClasses()\">{{\n _effectiveIcon\n }}</mat-icon></span\n >\n }\n\n @let _actionLabel = actionLabel();\n <!-- why: n\u1ED9i dung chi\u1EBFu v\u00E0o (vd ch\u1EEF gi\u00E0u c\u1EE7a tip) thay c\u1EA3 v\u00F9ng title/description/action; kh\u00F4ng chi\u1EBFu g\u00EC th\u00EC\n render nh\u01B0 tr\u01B0\u1EDBc, v\u00E0 [sdInformAction] v\u1EABn thay ri\u00EAng ph\u1EA7n action. -->\n <div class=\"c-inform-content\" [class.c-inform-content-without-description]=\"!_description\">\n <ng-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') | translate }}\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 </ng-content>\n </div>\n\n @if (closable()) {\n <button type=\"button\" class=\"c-inform-close\" [attr.aria-label]=\"'core.common.close' | translate\" (click)=\"onClose($event)\">\n <mat-icon class=\"material-icons\" aria-hidden=\"true\">close</mat-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:12px 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-tile[data-icon-shape=circle]{border-radius:50%}.c-inform-icon-tile[data-icon-shape=none]{background:transparent}.c-inform-icon{width:20px;height:20px;font-size:20px;line-height:20px}.c-inform-content{min-height:32px;justify-content:center;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-black500);overflow-wrap:anywhere}.c-inform-content-without-description .c-inform-title{min-height:32px;display:flex;align-items:center}.c-inform-body{font-size:14px;line-height:21px;color:var(--sd-black500);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-black400);cursor:pointer}.c-inform-close:hover{background:var(--sd-black100, #f3f4f6);color:var(--sd-black500)}.c-inform-close mat-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}}.c-inform.c-inform-tip{padding:8px 12px;gap:8px;border:0;border-inline-start:3px solid var(--inform-tone);border-radius:4px;color:var(--sd-black500);font-size:13px;line-height:20px}.c-inform.c-inform-tip .c-inform-icon-tile{flex-basis:16px;width:16px;height:16px;margin-top:2px;border-radius:0;background:transparent}.c-inform.c-inform-tip .c-inform-icon{width:16px;height:16px;font-size:16px;line-height:16px}.c-inform.c-inform-tip .c-inform-content{display:block;min-height:20px;font-size:inherit;line-height:inherit;overflow-wrap:anywhere}.c-inform.c-inform-tip .c-inform-title,.c-inform.c-inform-tip .c-inform-body{min-height:0;font-size:inherit;line-height:inherit}.c-inform.c-inform-tip .c-inform-title{display:block}.c-inform.c-inform-tip .c-inform-action{display:block;margin-top:4px}.c-inform.c-inform-tip .c-inform-close{margin-block:-6px;margin-inline-end:-6px}@media(max-width:600px){.c-inform.c-inform-tip .c-inform-close{margin-block:-8px}}:host ::ng-deep .c-inform-tip .c-inform-content strong,:host ::ng-deep .c-inform-tip .c-inform-content b{font-weight:600}:host ::ng-deep .c-inform-tip .c-inform-content code{padding:1px 4px;border-radius:3px;background:var(--inform-soft);color:inherit;font-size:.92em;white-space:normal;overflow-wrap:anywhere}:host ::ng-deep .c-inform-tip .c-inform-content a{color:var(--inform-ink);text-decoration:underline;text-underline-offset:2px}:host ::ng-deep .c-inform-tip .c-inform-content a:focus-visible{outline:2px solid var(--inform-tone, var(--sd-primary));outline-offset:2px}\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: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
179
193
  }
180
194
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdInform, decorators: [{
181
195
  type: Component,
182
- args: [{ selector: 'sd-inform', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [SdButton, CommonModule, MatIconModule, TranslatePipe], template: "@if (!dismissed()) {\n @let _effectiveIcon = effectiveIcon();\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 ><mat-icon class=\"c-inform-icon c-material-icon\" aria-hidden=\"true\" [ngClass]=\"fontSetClasses()\">{{\n _effectiveIcon\n }}</mat-icon></span\n >\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') | translate }}\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' | translate\" (click)=\"onClose($event)\">\n <mat-icon class=\"material-icons\" aria-hidden=\"true\">close</mat-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-black500);overflow-wrap:anywhere}.c-inform-body{font-size:14px;line-height:21px;color:var(--sd-black500);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-black400);cursor:pointer}.c-inform-close:hover{background:var(--sd-black100, #f3f4f6);color:var(--sd-black500)}.c-inform-close mat-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"] }]
196
+ args: [{ selector: 'sd-inform', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [SdButton, CommonModule, MatIconModule, TranslatePipe], template: "@if (!dismissed()) {\n @let _effectiveIcon = effectiveIcon();\n @let _description = description();\n @let _isTip = type() === 'tip';\n <div\n class=\"c-inform\"\n [class.c-inform-tip]=\"_isTip\"\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\" [attr.data-icon-shape]=\"iconShape()\"\n ><mat-icon class=\"c-inform-icon c-material-icon\" aria-hidden=\"true\" [ngClass]=\"fontSetClasses()\">{{\n _effectiveIcon\n }}</mat-icon></span\n >\n }\n\n @let _actionLabel = actionLabel();\n <!-- why: n\u1ED9i dung chi\u1EBFu v\u00E0o (vd ch\u1EEF gi\u00E0u c\u1EE7a tip) thay c\u1EA3 v\u00F9ng title/description/action; kh\u00F4ng chi\u1EBFu g\u00EC th\u00EC\n render nh\u01B0 tr\u01B0\u1EDBc, v\u00E0 [sdInformAction] v\u1EABn thay ri\u00EAng ph\u1EA7n action. -->\n <div class=\"c-inform-content\" [class.c-inform-content-without-description]=\"!_description\">\n <ng-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') | translate }}\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 </ng-content>\n </div>\n\n @if (closable()) {\n <button type=\"button\" class=\"c-inform-close\" [attr.aria-label]=\"'core.common.close' | translate\" (click)=\"onClose($event)\">\n <mat-icon class=\"material-icons\" aria-hidden=\"true\">close</mat-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:12px 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-tile[data-icon-shape=circle]{border-radius:50%}.c-inform-icon-tile[data-icon-shape=none]{background:transparent}.c-inform-icon{width:20px;height:20px;font-size:20px;line-height:20px}.c-inform-content{min-height:32px;justify-content:center;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-black500);overflow-wrap:anywhere}.c-inform-content-without-description .c-inform-title{min-height:32px;display:flex;align-items:center}.c-inform-body{font-size:14px;line-height:21px;color:var(--sd-black500);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-black400);cursor:pointer}.c-inform-close:hover{background:var(--sd-black100, #f3f4f6);color:var(--sd-black500)}.c-inform-close mat-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}}.c-inform.c-inform-tip{padding:8px 12px;gap:8px;border:0;border-inline-start:3px solid var(--inform-tone);border-radius:4px;color:var(--sd-black500);font-size:13px;line-height:20px}.c-inform.c-inform-tip .c-inform-icon-tile{flex-basis:16px;width:16px;height:16px;margin-top:2px;border-radius:0;background:transparent}.c-inform.c-inform-tip .c-inform-icon{width:16px;height:16px;font-size:16px;line-height:16px}.c-inform.c-inform-tip .c-inform-content{display:block;min-height:20px;font-size:inherit;line-height:inherit;overflow-wrap:anywhere}.c-inform.c-inform-tip .c-inform-title,.c-inform.c-inform-tip .c-inform-body{min-height:0;font-size:inherit;line-height:inherit}.c-inform.c-inform-tip .c-inform-title{display:block}.c-inform.c-inform-tip .c-inform-action{display:block;margin-top:4px}.c-inform.c-inform-tip .c-inform-close{margin-block:-6px;margin-inline-end:-6px}@media(max-width:600px){.c-inform.c-inform-tip .c-inform-close{margin-block:-8px}}:host ::ng-deep .c-inform-tip .c-inform-content strong,:host ::ng-deep .c-inform-tip .c-inform-content b{font-weight:600}:host ::ng-deep .c-inform-tip .c-inform-content code{padding:1px 4px;border-radius:3px;background:var(--inform-soft);color:inherit;font-size:.92em;white-space:normal;overflow-wrap:anywhere}:host ::ng-deep .c-inform-tip .c-inform-content a{color:var(--inform-ink);text-decoration:underline;text-underline-offset:2px}:host ::ng-deep .c-inform-tip .c-inform-content a:focus-visible{outline:2px solid var(--inform-tone, var(--sd-primary));outline-offset:2px}\n"] }]
183
197
  }], ctorParameters: () => [] });
184
198
 
185
199
  /**