@sdcorejs/angular 20.1.1 → 20.1.3

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 (60) hide show
  1. package/README.md +124 -807
  2. package/components/form-generic/index.d.ts +25 -2
  3. package/fesm2022/sdcorejs-angular-components-form-generic.mjs +150 -60
  4. package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
  5. package/fesm2022/sdcorejs-angular-components-import-excel.mjs +2 -7
  6. package/fesm2022/sdcorejs-angular-components-import-excel.mjs.map +1 -1
  7. package/fesm2022/sdcorejs-angular-components-query-bar.mjs +7 -15
  8. package/fesm2022/sdcorejs-angular-components-query-bar.mjs.map +1 -1
  9. package/fesm2022/sdcorejs-angular-components-query-builder.mjs +1 -1
  10. package/fesm2022/sdcorejs-angular-components-query-builder.mjs.map +1 -1
  11. package/fesm2022/sdcorejs-angular-components-tab-router.mjs +60 -30
  12. package/fesm2022/sdcorejs-angular-components-tab-router.mjs.map +1 -1
  13. package/fesm2022/sdcorejs-angular-components-table.mjs +34 -33
  14. package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
  15. package/fesm2022/sdcorejs-angular-components-tree.mjs +2 -1
  16. package/fesm2022/sdcorejs-angular-components-tree.mjs.map +1 -1
  17. package/fesm2022/sdcorejs-angular-components-upload-file.mjs +2 -1
  18. package/fesm2022/sdcorejs-angular-components-upload-file.mjs.map +1 -1
  19. package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs +2 -1
  20. package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs.map +1 -1
  21. package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs +2 -1
  22. package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs.map +1 -1
  23. package/fesm2022/sdcorejs-angular-forms-chip.mjs +2 -1
  24. package/fesm2022/sdcorejs-angular-forms-chip.mjs.map +1 -1
  25. package/fesm2022/sdcorejs-angular-forms-date-range.mjs +2 -1
  26. package/fesm2022/sdcorejs-angular-forms-date-range.mjs.map +1 -1
  27. package/fesm2022/sdcorejs-angular-forms-date.mjs +6 -5
  28. package/fesm2022/sdcorejs-angular-forms-date.mjs.map +1 -1
  29. package/fesm2022/sdcorejs-angular-forms-datetime.mjs +14 -465
  30. package/fesm2022/sdcorejs-angular-forms-datetime.mjs.map +1 -1
  31. package/fesm2022/sdcorejs-angular-forms-input-color.mjs +5 -3
  32. package/fesm2022/sdcorejs-angular-forms-input-color.mjs.map +1 -1
  33. package/fesm2022/sdcorejs-angular-forms-input-number.mjs +9 -6
  34. package/fesm2022/sdcorejs-angular-forms-input-number.mjs.map +1 -1
  35. package/fesm2022/sdcorejs-angular-forms-input.mjs +10 -6
  36. package/fesm2022/sdcorejs-angular-forms-input.mjs.map +1 -1
  37. package/fesm2022/sdcorejs-angular-forms-select.mjs +2 -1
  38. package/fesm2022/sdcorejs-angular-forms-select.mjs.map +1 -1
  39. package/fesm2022/sdcorejs-angular-forms-textarea.mjs +2 -1
  40. package/fesm2022/sdcorejs-angular-forms-textarea.mjs.map +1 -1
  41. package/fesm2022/sdcorejs-angular-modules-icon.mjs.map +1 -1
  42. package/fesm2022/sdcorejs-angular-modules-layout.mjs +1 -1
  43. package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
  44. package/fesm2022/sdcorejs-angular-modules.mjs +0 -1
  45. package/fesm2022/sdcorejs-angular-modules.mjs.map +1 -1
  46. package/fesm2022/sdcorejs-angular-pipes.mjs.map +1 -1
  47. package/fesm2022/sdcorejs-angular-services-loading.mjs +23 -14
  48. package/fesm2022/sdcorejs-angular-services-loading.mjs.map +1 -1
  49. package/forms/date/index.d.ts +1 -1
  50. package/forms/datetime/index.d.ts +1 -1
  51. package/forms/input/index.d.ts +3 -1
  52. package/forms/input-color/index.d.ts +3 -1
  53. package/forms/input-number/index.d.ts +3 -1
  54. package/modules/icon/index.d.ts +2 -3
  55. package/modules/index.d.ts +0 -1
  56. package/package.json +2 -5
  57. package/services/loading/index.d.ts +1 -1
  58. package/fesm2022/sdcorejs-angular-modules-authom.mjs +0 -360
  59. package/fesm2022/sdcorejs-angular-modules-authom.mjs.map +0 -1
  60. package/modules/authom/index.d.ts +0 -70
@@ -2,7 +2,6 @@ export * from '@sdcorejs/angular/modules/keycloak';
2
2
  export * from '@sdcorejs/angular/modules/permission';
3
3
  export * from '@sdcorejs/angular/modules/auth';
4
4
  export * from '@sdcorejs/angular/modules/layout';
5
- export * from '@sdcorejs/angular/modules/authom';
6
5
  export * from '@sdcorejs/angular/modules/icon';
7
6
 
8
7
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"sdcorejs-angular-modules.mjs","sources":["../../../projects/sdcorejs-angular/modules/sdcorejs-angular-modules.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;;AAEG"}
1
+ {"version":3,"file":"sdcorejs-angular-modules.mjs","sources":["../../../projects/sdcorejs-angular/modules/sdcorejs-angular-modules.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;;AAEG"}
@@ -1 +1 @@
1
- {"version":3,"file":"sdcorejs-angular-pipes.mjs","sources":["../../../projects/sdcorejs-angular/pipes/src/format-date.pipe.ts","../../../projects/sdcorejs-angular/pipes/src/format-datetime.pipe.ts","../../../projects/sdcorejs-angular/pipes/src/format-number.pipe.ts","../../../projects/sdcorejs-angular/pipes/src/safe-html.pipe.ts","../../../projects/sdcorejs-angular/pipes/src/time-different.pipe.ts","../../../projects/sdcorejs-angular/pipes/src/empty.pipe.ts","../../../projects/sdcorejs-angular/pipes/src/view.pipe.ts","../../../projects/sdcorejs-angular/pipes/sdcorejs-angular-pipes.ts"],"sourcesContent":["import { Injectable, Pipe, PipeTransform } from '@angular/core';\nimport { DateUtilities } from '@sdcorejs/angular/utilities/extensions';\n\n@Pipe({\n name: 'sdFormatDate',\n standalone: true,\n})\n@Injectable({\n providedIn: 'root',\n})\nexport class SdFormatDatePipe implements PipeTransform {\n transform(value: unknown, format = 'dd/MM/yyyy'): string | null {\n return DateUtilities.toFormat(value, format) || null;\n }\n}\n","import { Injectable, Pipe, PipeTransform } from '@angular/core';\nimport { DateUtilities } from '@sdcorejs/angular/utilities/extensions';\n\n@Pipe({\n name: 'sdFormatDatetime',\n standalone: true,\n})\n@Injectable({\n providedIn: 'root',\n})\nexport class SdFormatDatetimePipe implements PipeTransform {\n transform(value: unknown, format = 'dd/MM/yyyy HH:mm:ss'): string | null {\n return DateUtilities.toFormat(value, format) || null;\n }\n}\n","import { inject, Injectable, Pipe, PipeTransform } from '@angular/core';\nimport { ISdCoreConfiguration, SD_CORE_CONFIGURATION } from '@sdcorejs/angular/configurations';\nimport { NumberUtilities } from '@sdcorejs/angular/utilities/extensions';\n@Pipe({\n name: 'sdFormatNumber',\n standalone: true,\n})\n@Injectable({\n providedIn: 'root',\n})\nexport class SdFormatNumberPipe implements PipeTransform {\n private readonly coreConfiguration: ISdCoreConfiguration | null = inject(SD_CORE_CONFIGURATION, { optional: true });\n\n\n transform(value: any, digits?: number, format?: '1,234,567.89' | '1.234.567,89') {\n const resolvedFormat = format ?? this.coreConfiguration?.format?.number;\n const fixedValue = NumberUtilities.isNumber(value) ? (+value).toFixed(digits ?? 2) : null;\n if (resolvedFormat === '1.234.567,89') {\n return NumberUtilities.toVN(fixedValue);\n }\n return NumberUtilities.toISO(fixedValue);\n }\n}\n","import { Injectable, Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\n\n@Pipe({\n name: 'sdSafeHtml',\n standalone: true,\n})\n@Injectable({\n providedIn: 'root',\n})\nexport class SdSafeHtmlPipe implements PipeTransform {\n constructor(private sanitizer: DomSanitizer) {}\n transform(html: string | number | undefined | null) {\n if (typeof html === 'number') {\n return html;\n }\n if (!html) {\n return undefined;\n }\n return this.sanitizer.bypassSecurityTrustHtml(html);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { DateUtilities } from '@sdcorejs/angular/utilities/extensions';\nimport { interval, Observable, of } from 'rxjs';\nimport { map } from 'rxjs/operators';\n@Pipe({\n name: 'sdTimeDifferent',\n standalone: true,\n})\nexport class SdTimeDifferentPipe implements PipeTransform {\n private maxSecond = 60;\n private maxMinute = this.maxSecond * 60;\n private maxHour = this.maxMinute * 24;\n private maxDay = this.maxHour * 30;\n private maxMonth = this.maxHour * 365;\n transform(value: any, format: string, different: 'second' | 'minute' | 'hour' | 'day' | 'month'): Observable<string> {\n if (!DateUtilities.isDate(value)) {\n return of('');\n }\n if (!different) {\n return of(DateUtilities.toFormat(value, format));\n }\n if (Math.round((new Date().getTime() - new Date(value).getTime()) / 1000) < 0) {\n return of(DateUtilities.toFormat(value, format));\n }\n return interval(1000).pipe(\n map(() => {\n const timeDifferent = Math.round((new Date().getTime() - new Date(value).getTime()) / 1000);\n if (different === 'month' && timeDifferent < this.maxMonth) {\n return DateUtilities.timeDifference(value);\n }\n if (different === 'day' && timeDifferent < this.maxDay) {\n return DateUtilities.timeDifference(value);\n }\n if (different === 'hour' && timeDifferent < this.maxHour) {\n return DateUtilities.timeDifference(value);\n }\n if (different === 'minute' && timeDifferent < this.maxMinute) {\n return DateUtilities.timeDifference(value);\n }\n if (different === 'second' && timeDifferent < this.maxSecond) {\n return DateUtilities.timeDifference(value);\n }\n return DateUtilities.toFormat(value, format);\n })\n );\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { EMPTY_STR } from '@sdcorejs/utils/constants';\n@Pipe({\n name: 'sdEmpty',\n standalone: true,\n})\nexport class SdEmptyPipe implements PipeTransform {\n transform(value: any): string {\n if (value === undefined || value === null || value === '') {\n return EMPTY_STR;\n }\n return value;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { EMPTY_STR } from '@sdcorejs/utils/constants';\n\n@Pipe({\n name: 'sdView',\n standalone: true,\n})\nexport class SdViewPipe implements PipeTransform {\n transform(value: unknown): string {\n if (value === null || value === undefined || value === '' || (typeof value === 'number' && Number.isNaN(value))) {\n return EMPTY_STR;\n }\n\n if (Array.isArray(value)) {\n if (!value.length) return EMPTY_STR;\n return value.map(item => this.transform(item)).join(', ');\n }\n\n return `${value}`;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAUa,gBAAgB,CAAA;AAC3B,IAAA,SAAS,CAAC,KAAc,EAAE,MAAM,GAAG,YAAY,EAAA;QAC7C,OAAO,aAAa,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,IAAI;IACtD;wGAHW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA;sGAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA;AAAhB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cAFf,MAAM,EAAA,CAAA;;4FAEP,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAP5B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,cAAc;AACpB,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;kBACA,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;MCCY,oBAAoB,CAAA;AAC/B,IAAA,SAAS,CAAC,KAAc,EAAE,MAAM,GAAG,qBAAqB,EAAA;QACtD,OAAO,aAAa,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,IAAI;IACtD;wGAHW,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,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,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,QAAQ;AACd,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;ACND;;AAEG;;;;"}
1
+ {"version":3,"file":"sdcorejs-angular-pipes.mjs","sources":["../../../projects/sdcorejs-angular/pipes/src/format-date.pipe.ts","../../../projects/sdcorejs-angular/pipes/src/format-datetime.pipe.ts","../../../projects/sdcorejs-angular/pipes/src/format-number.pipe.ts","../../../projects/sdcorejs-angular/pipes/src/safe-html.pipe.ts","../../../projects/sdcorejs-angular/pipes/src/time-different.pipe.ts","../../../projects/sdcorejs-angular/pipes/src/empty.pipe.ts","../../../projects/sdcorejs-angular/pipes/src/view.pipe.ts","../../../projects/sdcorejs-angular/pipes/sdcorejs-angular-pipes.ts"],"sourcesContent":["import { Injectable, Pipe, PipeTransform } from '@angular/core';\nimport { DateUtilities } from '@sdcorejs/angular/utilities/extensions';\n\n@Pipe({\n name: 'sdFormatDate',\n standalone: true,\n})\n@Injectable({\n providedIn: 'root',\n})\nexport class SdFormatDatePipe implements PipeTransform {\n transform(value: unknown, format = 'dd/MM/yyyy'): string | null {\n return DateUtilities.toFormat(value, format) || null;\n }\n}\n","import { Injectable, Pipe, PipeTransform } from '@angular/core';\nimport { DateUtilities } from '@sdcorejs/angular/utilities/extensions';\n\n@Pipe({\n name: 'sdFormatDatetime',\n standalone: true,\n})\n@Injectable({\n providedIn: 'root',\n})\nexport class SdFormatDatetimePipe implements PipeTransform {\n transform(value: unknown, format = 'dd/MM/yyyy HH:mm:ss'): string | null {\n return DateUtilities.toFormat(value, format) || null;\n }\n}\n","import { inject, Injectable, Pipe, PipeTransform } from '@angular/core';\nimport { ISdCoreConfiguration, SD_CORE_CONFIGURATION } from '@sdcorejs/angular/configurations';\nimport { NumberUtilities } from '@sdcorejs/angular/utilities/extensions';\n@Pipe({\n name: 'sdFormatNumber',\n standalone: true,\n})\n@Injectable({\n providedIn: 'root',\n})\nexport class SdFormatNumberPipe implements PipeTransform {\n private readonly coreConfiguration: ISdCoreConfiguration | null = inject(SD_CORE_CONFIGURATION, { optional: true });\n\n transform(value: any, digits?: number, format?: '1,234,567.89' | '1.234.567,89') {\n const resolvedFormat = format ?? this.coreConfiguration?.format?.number;\n const fixedValue = NumberUtilities.isNumber(value) ? (+value).toFixed(digits ?? 2) : null;\n if (resolvedFormat === '1.234.567,89') {\n return NumberUtilities.toVN(fixedValue);\n }\n return NumberUtilities.toISO(fixedValue);\n }\n}\n","import { Injectable, Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\n\n@Pipe({\n name: 'sdSafeHtml',\n standalone: true,\n})\n@Injectable({\n providedIn: 'root',\n})\nexport class SdSafeHtmlPipe implements PipeTransform {\n constructor(private sanitizer: DomSanitizer) {}\n transform(html: string | number | undefined | null) {\n if (typeof html === 'number') {\n return html;\n }\n if (!html) {\n return undefined;\n }\n return this.sanitizer.bypassSecurityTrustHtml(html);\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { DateUtilities } from '@sdcorejs/angular/utilities/extensions';\nimport { interval, Observable, of } from 'rxjs';\nimport { map } from 'rxjs/operators';\n@Pipe({\n name: 'sdTimeDifferent',\n standalone: true,\n})\nexport class SdTimeDifferentPipe implements PipeTransform {\n private maxSecond = 60;\n private maxMinute = this.maxSecond * 60;\n private maxHour = this.maxMinute * 24;\n private maxDay = this.maxHour * 30;\n private maxMonth = this.maxHour * 365;\n transform(value: any, format: string, different: 'second' | 'minute' | 'hour' | 'day' | 'month'): Observable<string> {\n if (!DateUtilities.isDate(value)) {\n return of('');\n }\n if (!different) {\n return of(DateUtilities.toFormat(value, format));\n }\n if (Math.round((new Date().getTime() - new Date(value).getTime()) / 1000) < 0) {\n return of(DateUtilities.toFormat(value, format));\n }\n return interval(1000).pipe(\n map(() => {\n const timeDifferent = Math.round((new Date().getTime() - new Date(value).getTime()) / 1000);\n if (different === 'month' && timeDifferent < this.maxMonth) {\n return DateUtilities.timeDifference(value);\n }\n if (different === 'day' && timeDifferent < this.maxDay) {\n return DateUtilities.timeDifference(value);\n }\n if (different === 'hour' && timeDifferent < this.maxHour) {\n return DateUtilities.timeDifference(value);\n }\n if (different === 'minute' && timeDifferent < this.maxMinute) {\n return DateUtilities.timeDifference(value);\n }\n if (different === 'second' && timeDifferent < this.maxSecond) {\n return DateUtilities.timeDifference(value);\n }\n return DateUtilities.toFormat(value, format);\n })\n );\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { EMPTY_STR } from '@sdcorejs/utils/constants';\n@Pipe({\n name: 'sdEmpty',\n standalone: true,\n})\nexport class SdEmptyPipe implements PipeTransform {\n transform(value: any): string {\n if (value === undefined || value === null || value === '') {\n return EMPTY_STR;\n }\n return value;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { EMPTY_STR } from '@sdcorejs/utils/constants';\n\n@Pipe({\n name: 'sdView',\n standalone: true,\n})\nexport class SdViewPipe implements PipeTransform {\n transform(value: unknown): string {\n if (value === null || value === undefined || value === '' || (typeof value === 'number' && Number.isNaN(value))) {\n return EMPTY_STR;\n }\n\n if (Array.isArray(value)) {\n if (!value.length) return EMPTY_STR;\n return value.map(item => this.transform(item)).join(', ');\n }\n\n return `${value}`;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAUa,gBAAgB,CAAA;AAC3B,IAAA,SAAS,CAAC,KAAc,EAAE,MAAM,GAAG,YAAY,EAAA;QAC7C,OAAO,aAAa,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,IAAI;IACtD;wGAHW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA;sGAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA;AAAhB,IAAA,OAAA,KAAA,GAAA,EAAA,CAA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AK,QAAQ,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE;AAC/G,YAAA,OAAO,SAAS;QAClB;AAEA,QAAA,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACxB,IAAI,CAAC,KAAK,CAAC,MAAM;AAAE,gBAAA,OAAO,SAAS;YACnC,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QAC3D;QAEA,OAAO,CAAA,EAAG,KAAK,CAAA,CAAE;IACnB;wGAZW,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA;sGAAV,UAAU,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,QAAA,EAAA,CAAA;;4FAAV,UAAU,EAAA,UAAA,EAAA,CAAA;kBAJtB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,QAAQ;AACd,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;ACND;;AAEG;;;;"}
@@ -9,24 +9,33 @@ class SdLoadingService {
9
9
  this.renderer = rendererFactory.createRenderer(null, null);
10
10
  }
11
11
  start = (element = 'body') => {
12
- const ele = document.querySelector(element);
13
- if (ele && !this.loadingMap.has(ele)) {
14
- const loadingElement = this.#createLoading();
15
- ele.appendChild(loadingElement);
16
- this.loadingMap.set(ele, loadingElement);
17
- }
12
+ // why: router tabs can leave multiple hosts with the same selector in the DOM;
13
+ // querySelector would only overlay the first match.
14
+ document.querySelectorAll(element).forEach(ele => {
15
+ if (!this.loadingMap.has(ele)) {
16
+ const loadingElement = this.#createLoading();
17
+ ele.appendChild(loadingElement);
18
+ this.loadingMap.set(ele, loadingElement);
19
+ }
20
+ });
18
21
  };
19
22
  isLoading = (element = 'body') => {
20
- const ele = document.querySelector(element);
21
- return ele && this.loadingMap.has(ele);
23
+ const nodes = document.querySelectorAll(element);
24
+ if (!nodes.length)
25
+ return null;
26
+ for (const ele of Array.from(nodes)) {
27
+ if (this.loadingMap.has(ele))
28
+ return ele;
29
+ }
30
+ return false;
22
31
  };
23
32
  stop = (element = 'body') => {
24
- const ele = document.querySelector(element);
25
- if (ele && this.loadingMap.has(ele)) {
26
- const loadingElement = this.loadingMap.get(ele);
27
- loadingElement?.remove();
28
- this.loadingMap.delete(ele);
29
- }
33
+ document.querySelectorAll(element).forEach(ele => {
34
+ if (this.loadingMap.has(ele)) {
35
+ this.loadingMap.get(ele)?.remove();
36
+ this.loadingMap.delete(ele);
37
+ }
38
+ });
30
39
  };
31
40
  #createLoading = () => {
32
41
  const renderer = this.renderer;
@@ -1 +1 @@
1
- {"version":3,"file":"sdcorejs-angular-services-loading.mjs","sources":["../../../projects/sdcorejs-angular/services/loading/src/loading.service.ts","../../../projects/sdcorejs-angular/services/loading/sdcorejs-angular-services-loading.ts"],"sourcesContent":["import { Injectable, Renderer2, RendererFactory2 } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SdLoadingService {\n private loadingId = 'L8d556b9b-f6dd-46e9-9710-757e65d82839';\n\n private renderer: Renderer2;\n\n private loadingMap = new WeakMap<Element, HTMLElement>();\n constructor(rendererFactory: RendererFactory2) {\n this.renderer = rendererFactory.createRenderer(null, null);\n }\n\n start = (element = 'body') => {\n const ele = document.querySelector(element);\n if (ele && !this.loadingMap.has(ele)) {\n const loadingElement = this.#createLoading();\n ele.appendChild(loadingElement);\n this.loadingMap.set(ele, loadingElement);\n }\n };\n\n isLoading = (element = 'body') => {\n const ele = document.querySelector(element);\n return ele && this.loadingMap.has(ele);\n };\n\n stop = (element = 'body') => {\n const ele = document.querySelector(element);\n if (ele && this.loadingMap.has(ele)) {\n const loadingElement = this.loadingMap.get(ele);\n loadingElement?.remove();\n this.loadingMap.delete(ele);\n }\n };\n\n #createLoading = (): HTMLElement => {\n const renderer = this.renderer;\n const container: HTMLElement = this.renderer.createElement('div');\n const spinner: HTMLElement = this.renderer.createElement('div');\n const containerStyle = {\n position: 'absolute',\n top: 0,\n left: 0,\n height: '100%',\n width: '100%',\n opacity: 0.6,\n background: '#FFFFFF',\n 'z-index': 99999,\n };\n const spinnerStyle = {\n position: 'absolute',\n top: 'calc(50% - 2.5rem)',\n left: 'calc(50% - 2.5rem)',\n width: '5rem',\n height: '5rem',\n border: '0.5rem solid var(--sd-primary)',\n 'border-top': '0.5rem solid var(--sd-border)',\n 'border-radius': '50%',\n animation: 'spin 1s linear infinite',\n };\n const keyframes = `\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n `;\n\n renderer.addClass(container, 'sd-loading');\n renderer.setAttribute(container, 'id', this.loadingId);\n\n Object.entries(containerStyle).forEach(entry => {\n renderer.setStyle(container, entry[0], entry[1]);\n });\n\n renderer.addClass(spinner, 'sd-loading-spinner');\n Object.entries(spinnerStyle).forEach(entry => {\n renderer.setStyle(spinner, entry[0], entry[1]);\n });\n\n const styleElement = this.renderer.createElement('style');\n this.renderer.appendChild(styleElement, this.renderer.createText(keyframes));\n document.head.appendChild(styleElement);\n\n container.appendChild(spinner);\n return container;\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAKa,gBAAgB,CAAA;IACnB,SAAS,GAAG,uCAAuC;AAEnD,IAAA,QAAQ;AAER,IAAA,UAAU,GAAG,IAAI,OAAO,EAAwB;AACxD,IAAA,WAAA,CAAY,eAAiC,EAAA;QAC3C,IAAI,CAAC,QAAQ,GAAG,eAAe,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC;IAC5D;AAEA,IAAA,KAAK,GAAG,CAAC,OAAO,GAAG,MAAM,KAAI;QAC3B,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC;AAC3C,QAAA,IAAI,GAAG,IAAI,CAAC,IAA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,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;AAC5E,QAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC;AAEvC,QAAA,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC;AAC9B,QAAA,OAAO,SAAS;AAClB,IAAA,CAAC;wGAnFU,gBAAgB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAhB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cAFf,MAAM,EAAA,CAAA;;4FAEP,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACJD;;AAEG;;;;"}
1
+ {"version":3,"file":"sdcorejs-angular-services-loading.mjs","sources":["../../../projects/sdcorejs-angular/services/loading/src/loading.service.ts","../../../projects/sdcorejs-angular/services/loading/sdcorejs-angular-services-loading.ts"],"sourcesContent":["import { Injectable, Renderer2, RendererFactory2 } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SdLoadingService {\n private loadingId = 'L8d556b9b-f6dd-46e9-9710-757e65d82839';\n\n private renderer: Renderer2;\n\n private loadingMap = new WeakMap<Element, HTMLElement>();\n constructor(rendererFactory: RendererFactory2) {\n this.renderer = rendererFactory.createRenderer(null, null);\n }\n\n start = (element = 'body') => {\n // why: router tabs can leave multiple hosts with the same selector in the DOM;\n // querySelector would only overlay the first match.\n document.querySelectorAll(element).forEach(ele => {\n if (!this.loadingMap.has(ele)) {\n const loadingElement = this.#createLoading();\n ele.appendChild(loadingElement);\n this.loadingMap.set(ele, loadingElement);\n }\n });\n };\n\n isLoading = (element = 'body') => {\n const nodes = document.querySelectorAll(element);\n if (!nodes.length) return null;\n for (const ele of Array.from(nodes)) {\n if (this.loadingMap.has(ele)) return ele;\n }\n return false;\n };\n\n stop = (element = 'body') => {\n document.querySelectorAll(element).forEach(ele => {\n if (this.loadingMap.has(ele)) {\n this.loadingMap.get(ele)?.remove();\n this.loadingMap.delete(ele);\n }\n });\n };\n\n #createLoading = (): HTMLElement => {\n const renderer = this.renderer;\n const container: HTMLElement = this.renderer.createElement('div');\n const spinner: HTMLElement = this.renderer.createElement('div');\n const containerStyle = {\n position: 'absolute',\n top: 0,\n left: 0,\n height: '100%',\n width: '100%',\n opacity: 0.6,\n background: '#FFFFFF',\n 'z-index': 99999,\n };\n const spinnerStyle = {\n position: 'absolute',\n top: 'calc(50% - 2.5rem)',\n left: 'calc(50% - 2.5rem)',\n width: '5rem',\n height: '5rem',\n border: '0.5rem solid var(--sd-primary)',\n 'border-top': '0.5rem solid var(--sd-border)',\n 'border-radius': '50%',\n animation: 'spin 1s linear infinite',\n };\n const keyframes = `\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n `;\n\n renderer.addClass(container, 'sd-loading');\n renderer.setAttribute(container, 'id', this.loadingId);\n\n Object.entries(containerStyle).forEach(entry => {\n renderer.setStyle(container, entry[0], entry[1]);\n });\n\n renderer.addClass(spinner, 'sd-loading-spinner');\n Object.entries(spinnerStyle).forEach(entry => {\n renderer.setStyle(spinner, entry[0], entry[1]);\n });\n\n const styleElement = this.renderer.createElement('style');\n this.renderer.appendChild(styleElement, this.renderer.createText(keyframes));\n document.head.appendChild(styleElement);\n\n container.appendChild(spinner);\n return container;\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAKa,gBAAgB,CAAA;IACnB,SAAS,GAAG,uCAAuC;AAEnD,IAAA,QAAQ;AAER,IAAA,UAAU,GAAG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OnInit {
37
37
  disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
38
38
  /** Display mode: `false` edit · `true` static view · `'inline'` view + click-to-edit (calendar). */
39
39
  viewed: _angular_core.InputSignalWithTransform<SdViewed, SdViewedInput>;
40
- /** In `viewed='inline'`, show a hover clear on the text face. Set `false` when the host owns removal (chips). */
40
+ /** Whether to show the value-gated clear button in edit and inline modes. */
41
41
  clearable: _angular_core.InputSignalWithTransform<boolean, unknown>;
42
42
  /** `true` when `viewed === 'inline'`. */
43
43
  readonly isInline: _angular_core.Signal<boolean>;
@@ -38,7 +38,7 @@ declare class SdDatetime implements OnDestroy, OnInit {
38
38
  viewed: _angular_core.InputSignalWithTransform<SdViewed, SdViewedInput>;
39
39
  /** Hiển thị thêm cột giây trong picker. Mặc định: chỉ HH:MM. */
40
40
  showSeconds: _angular_core.InputSignalWithTransform<boolean, unknown>;
41
- /** In `viewed='inline'`, show a hover clear on the text face. Set `false` when the host owns removal (chips). */
41
+ /** Whether to show the value-gated clear button in edit and inline modes. */
42
42
  clearable: _angular_core.InputSignalWithTransform<boolean, unknown>;
43
43
  /** `true` when `viewed === 'inline'`. */
44
44
  readonly isInline: _angular_core.Signal<boolean>;
@@ -40,6 +40,8 @@ declare class SdInput implements OnDestroy, OnInit, AfterViewInit {
40
40
  type: _angular_core.InputSignal<"number" | "text" | "password" | "email">;
41
41
  hideInlineError: _angular_core.InputSignalWithTransform<boolean, unknown>;
42
42
  blurOnEnter: _angular_core.InputSignalWithTransform<boolean, unknown>;
43
+ /** Whether to show the value-gated clear button in edit and inline modes. */
44
+ clearable: _angular_core.InputSignalWithTransform<boolean, unknown>;
43
45
  required: _angular_core.InputSignalWithTransform<boolean, unknown>;
44
46
  readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
45
47
  disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
@@ -93,7 +95,7 @@ declare class SdInput implements OnDestroy, OnInit, AfterViewInit {
93
95
  blur: () => void;
94
96
  focus: () => void;
95
97
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdInput, never>;
96
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdInput, "sd-input", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "appearanceInput": { "alias": "appearance"; "required": false; "isSignal": true; }; "floatLabel": { "alias": "floatLabel"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "helperText": { "alias": "helperText"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "hideInlineError": { "alias": "hideInlineError"; "required": false; "isSignal": true; }; "blurOnEnter": { "alias": "blurOnEnter"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "minlength": { "alias": "minlength"; "required": false; "isSignal": true; }; "maxlength": { "alias": "maxlength"; "required": false; "isSignal": true; }; "pattern": { "alias": "pattern"; "required": false; "isSignal": true; }; "patternErrorMessage": { "alias": "patternErrorMessage"; "required": false; "isSignal": true; }; "validator": { "alias": "validator"; "required": false; "isSignal": true; }; "inlineError": { "alias": "inlineError"; "required": false; "isSignal": true; }; "hyperlink": { "alias": "hyperlink"; "required": false; "isSignal": true; }; "valueModel": { "alias": "model"; "required": false; "isSignal": true; }; }, { "valueModel": "modelChange"; "sdChange": "sdChange"; "sdFocus": "sdFocus"; "sdBlur": "sdBlur"; "keyupEnter": "keyupEnter"; "cleared": "cleared"; "sdFocusForceBlur": "sdFocusForceBlur"; }, ["sdLabelTemplate", "sdValueTemplate", "sdSuffixDef", "sdViewDef"], ["[sdLabel]"], true, never>;
98
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdInput, "sd-input", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "appearanceInput": { "alias": "appearance"; "required": false; "isSignal": true; }; "floatLabel": { "alias": "floatLabel"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "helperText": { "alias": "helperText"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "hideInlineError": { "alias": "hideInlineError"; "required": false; "isSignal": true; }; "blurOnEnter": { "alias": "blurOnEnter"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "minlength": { "alias": "minlength"; "required": false; "isSignal": true; }; "maxlength": { "alias": "maxlength"; "required": false; "isSignal": true; }; "pattern": { "alias": "pattern"; "required": false; "isSignal": true; }; "patternErrorMessage": { "alias": "patternErrorMessage"; "required": false; "isSignal": true; }; "validator": { "alias": "validator"; "required": false; "isSignal": true; }; "inlineError": { "alias": "inlineError"; "required": false; "isSignal": true; }; "hyperlink": { "alias": "hyperlink"; "required": false; "isSignal": true; }; "valueModel": { "alias": "model"; "required": false; "isSignal": true; }; }, { "valueModel": "modelChange"; "sdChange": "sdChange"; "sdFocus": "sdFocus"; "sdBlur": "sdBlur"; "keyupEnter": "keyupEnter"; "cleared": "cleared"; "sdFocusForceBlur": "sdFocusForceBlur"; }, ["sdLabelTemplate", "sdValueTemplate", "sdSuffixDef", "sdViewDef"], ["[sdLabel]"], true, never>;
97
99
  }
98
100
 
99
101
  export { SdInput };
@@ -19,6 +19,8 @@ declare class SdInputColor {
19
19
  readonly required: _angular_core.InputSignalWithTransform<boolean, unknown>;
20
20
  readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
21
21
  readonly readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
22
+ /** Whether the inner `<sd-input>` should render its clear button. */
23
+ readonly clearable: _angular_core.InputSignalWithTransform<boolean, unknown>;
22
24
  readonly hideInlineError: _angular_core.InputSignalWithTransform<boolean, unknown>;
23
25
  /** Display mode — forwarded to the inner `<sd-input>`. `'inline'` = borderless inline-edit; disabled `'inline'` → static. */
24
26
  readonly viewed: _angular_core.InputSignalWithTransform<SdViewed, SdViewedInput>;
@@ -32,7 +34,7 @@ declare class SdInputColor {
32
34
  onPickerChange: (ev: Event) => void;
33
35
  clear: (ev?: Event) => void;
34
36
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdInputColor, never>;
35
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdInputColor, "sd-input-color", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "helperText": { "alias": "helperText"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "autoId": { "alias": "autoId"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "hideInlineError": { "alias": "hideInlineError"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "valueModel": { "alias": "model"; "required": false; "isSignal": true; }; }, { "valueModel": "modelChange"; "sdChange": "sdChange"; }, never, never, true, never>;
37
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdInputColor, "sd-input-color", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "helperText": { "alias": "helperText"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "autoId": { "alias": "autoId"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "hideInlineError": { "alias": "hideInlineError"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "valueModel": { "alias": "model"; "required": false; "isSignal": true; }; }, { "valueModel": "modelChange"; "sdChange": "sdChange"; }, never, never, true, never>;
36
38
  }
37
39
 
38
40
  export { SD_INPUT_COLOR_HEX_PATTERN, SdInputColor };
@@ -42,6 +42,8 @@ declare class SdInputNumber implements OnDestroy, OnInit, AfterViewInit {
42
42
  placeholder: _angular_core.InputSignal<string | undefined>;
43
43
  hideInlineError: _angular_core.InputSignalWithTransform<boolean, unknown>;
44
44
  blurOnEnter: _angular_core.InputSignalWithTransform<boolean, unknown>;
45
+ /** Whether to show the value-gated clear button in edit and inline modes. */
46
+ clearable: _angular_core.InputSignalWithTransform<boolean, unknown>;
45
47
  required: _angular_core.InputSignalWithTransform<boolean, unknown>;
46
48
  readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
47
49
  disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
@@ -102,7 +104,7 @@ declare class SdInputNumber implements OnDestroy, OnInit, AfterViewInit {
102
104
  blur: () => void;
103
105
  focus: () => void;
104
106
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdInputNumber, never>;
105
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdInputNumber, "sd-input-number", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "helperText": { "alias": "helperText"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "hideInlineError": { "alias": "hideInlineError"; "required": false; "isSignal": true; }; "blurOnEnter": { "alias": "blurOnEnter"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "precision": { "alias": "precision"; "required": false; "isSignal": true; }; "format": { "alias": "format"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "validator": { "alias": "validator"; "required": false; "isSignal": true; }; "inlineError": { "alias": "inlineError"; "required": false; "isSignal": true; }; "hyperlink": { "alias": "hyperlink"; "required": false; "isSignal": true; }; "appearanceInput": { "alias": "appearance"; "required": false; "isSignal": true; }; "floatLabel": { "alias": "floatLabel"; "required": false; "isSignal": true; }; "valueModel": { "alias": "model"; "required": false; "isSignal": true; }; }, { "valueModel": "modelChange"; "sdChange": "sdChange"; "sdFocus": "sdFocus"; "sdBlur": "sdBlur"; "keyupEnter": "keyupEnter"; "cleared": "cleared"; "sdFocusForceBlur": "sdFocusForceBlur"; }, ["sdLabelTemplate", "sdValueTemplate", "sdViewDef", "sdSuffixDef"], ["[sdLabel]"], true, never>;
107
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdInputNumber, "sd-input-number", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "helperText": { "alias": "helperText"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "hideInlineError": { "alias": "hideInlineError"; "required": false; "isSignal": true; }; "blurOnEnter": { "alias": "blurOnEnter"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "precision": { "alias": "precision"; "required": false; "isSignal": true; }; "format": { "alias": "format"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "validator": { "alias": "validator"; "required": false; "isSignal": true; }; "inlineError": { "alias": "inlineError"; "required": false; "isSignal": true; }; "hyperlink": { "alias": "hyperlink"; "required": false; "isSignal": true; }; "appearanceInput": { "alias": "appearance"; "required": false; "isSignal": true; }; "floatLabel": { "alias": "floatLabel"; "required": false; "isSignal": true; }; "valueModel": { "alias": "model"; "required": false; "isSignal": true; }; }, { "valueModel": "modelChange"; "sdChange": "sdChange"; "sdFocus": "sdFocus"; "sdBlur": "sdBlur"; "keyupEnter": "keyupEnter"; "cleared": "cleared"; "sdFocusForceBlur": "sdFocusForceBlur"; }, ["sdLabelTemplate", "sdValueTemplate", "sdViewDef", "sdSuffixDef"], ["[sdLabel]"], true, never>;
106
108
  }
107
109
 
108
110
  export { SdInputNumber };
@@ -35,8 +35,7 @@ interface ISdIconConfiguration {
35
35
  /**
36
36
  * Cấu hình đã resolve đầy đủ để component không phải tự xử lý fallback nhiều lần.
37
37
  */
38
- interface ISdIconResolvedConfiguration extends Required<Omit<ISdIconConfiguration, 'lucideIcons'>> {
39
- }
38
+ type ISdIconResolvedConfiguration = Required<Omit<ISdIconConfiguration, 'lucideIcons'>>;
40
39
  /**
41
40
  * Quy đổi token `Size` chung của SDCoreJS sang pixel cho icon.
42
41
  */
@@ -160,7 +159,7 @@ declare class SdIcon {
160
159
  *
161
160
  * Token có factory mặc định để `SdIcon` vẫn chạy khi app chưa gọi `provideSdIcon`.
162
161
  */
163
- declare const SD_ICON_CONFIGURATION: InjectionToken<ISdIconResolvedConfiguration>;
162
+ declare const SD_ICON_CONFIGURATION: InjectionToken<Required<Omit<ISdIconConfiguration, "lucideIcons">>>;
164
163
  /**
165
164
  * Đăng ký cấu hình icon Core UI ở app-level.
166
165
  *
@@ -2,5 +2,4 @@ export * from '@sdcorejs/angular/modules/keycloak';
2
2
  export * from '@sdcorejs/angular/modules/permission';
3
3
  export * from '@sdcorejs/angular/modules/auth';
4
4
  export * from '@sdcorejs/angular/modules/layout';
5
- export * from '@sdcorejs/angular/modules/authom';
6
5
  export * from '@sdcorejs/angular/modules/icon';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdcorejs/angular",
3
- "version": "20.1.1",
3
+ "version": "20.1.3",
4
4
  "license": "MIT",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^19.0.0 || ^20.0.0 || ^21.0.0",
@@ -9,6 +9,7 @@
9
9
  "@angular/material-date-fns-adapter": "^19.0.0 || ^20.0.0 || ^21.0.0"
10
10
  },
11
11
  "dependencies": {
12
+ "@sdcorejs/angular-material-datetime": "1.0.3",
12
13
  "@sdcorejs/utils": "1.1.4",
13
14
  "@lucide/angular": "^1.22.0",
14
15
  "@ckeditor/ckeditor5-angular": "11.1.2",
@@ -282,10 +283,6 @@
282
283
  "types": "./modules/auth/index.d.ts",
283
284
  "default": "./fesm2022/sdcorejs-angular-modules-auth.mjs"
284
285
  },
285
- "./modules/authom": {
286
- "types": "./modules/authom/index.d.ts",
287
- "default": "./fesm2022/sdcorejs-angular-modules-authom.mjs"
288
- },
289
286
  "./modules/icon": {
290
287
  "types": "./modules/icon/index.d.ts",
291
288
  "default": "./fesm2022/sdcorejs-angular-modules-icon.mjs"
@@ -8,7 +8,7 @@ declare class SdLoadingService {
8
8
  private loadingMap;
9
9
  constructor(rendererFactory: RendererFactory2);
10
10
  start: (element?: string) => void;
11
- isLoading: (element?: string) => boolean | null;
11
+ isLoading: (element?: string) => false | Element | null;
12
12
  stop: (element?: string) => void;
13
13
  static ɵfac: i0.ɵɵFactoryDeclaration<SdLoadingService, never>;
14
14
  static ɵprov: i0.ɵɵInjectableDeclaration<SdLoadingService>;