@sdcorejs/angular 19.1.2 → 19.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 (101) hide show
  1. package/README.md +124 -807
  2. package/components/anchor/src/index.d.ts +1 -1
  3. package/components/anchor/src/models/index.d.ts +1 -1
  4. package/components/document-builder/index.d.ts +2 -2
  5. package/components/document-builder/src/plugins/index.d.ts +1 -1
  6. package/components/editor/index.d.ts +1 -1
  7. package/components/editor/src/models/index.d.ts +2 -2
  8. package/components/form-generic/src/components/form-builder/form-builder.component.d.ts +25 -2
  9. package/components/form-generic/src/configurations/index.d.ts +1 -1
  10. package/components/form-generic/src/models/form-render/index.d.ts +2 -2
  11. package/components/form-generic/src/models/index.d.ts +6 -6
  12. package/components/import-excel/index.d.ts +1 -1
  13. package/components/mini-editor/index.d.ts +1 -1
  14. package/components/org-chart/index.d.ts +1 -1
  15. package/components/preview/index.d.ts +2 -2
  16. package/components/table/index.d.ts +1 -1
  17. package/components/table/src/models/index.d.ts +4 -4
  18. package/components/tree/index.d.ts +1 -1
  19. package/fesm2022/sdcorejs-angular-components-form-generic.mjs +149 -59
  20. package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
  21. package/fesm2022/sdcorejs-angular-components-import-excel.mjs +2 -7
  22. package/fesm2022/sdcorejs-angular-components-import-excel.mjs.map +1 -1
  23. package/fesm2022/sdcorejs-angular-components-query-bar.mjs +7 -15
  24. package/fesm2022/sdcorejs-angular-components-query-bar.mjs.map +1 -1
  25. package/fesm2022/sdcorejs-angular-components-query-builder.mjs +1 -1
  26. package/fesm2022/sdcorejs-angular-components-query-builder.mjs.map +1 -1
  27. package/fesm2022/sdcorejs-angular-components-tab-router.mjs +60 -30
  28. package/fesm2022/sdcorejs-angular-components-tab-router.mjs.map +1 -1
  29. package/fesm2022/sdcorejs-angular-components-table.mjs +32 -31
  30. package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
  31. package/fesm2022/sdcorejs-angular-components-tree.mjs +2 -1
  32. package/fesm2022/sdcorejs-angular-components-tree.mjs.map +1 -1
  33. package/fesm2022/sdcorejs-angular-components-upload-file.mjs +2 -1
  34. package/fesm2022/sdcorejs-angular-components-upload-file.mjs.map +1 -1
  35. package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs +2 -1
  36. package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs.map +1 -1
  37. package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs +2 -1
  38. package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs.map +1 -1
  39. package/fesm2022/sdcorejs-angular-forms-chip.mjs +2 -1
  40. package/fesm2022/sdcorejs-angular-forms-chip.mjs.map +1 -1
  41. package/fesm2022/sdcorejs-angular-forms-date-range.mjs +2 -1
  42. package/fesm2022/sdcorejs-angular-forms-date-range.mjs.map +1 -1
  43. package/fesm2022/sdcorejs-angular-forms-date.mjs +6 -5
  44. package/fesm2022/sdcorejs-angular-forms-date.mjs.map +1 -1
  45. package/fesm2022/sdcorejs-angular-forms-datetime.mjs +15 -466
  46. package/fesm2022/sdcorejs-angular-forms-datetime.mjs.map +1 -1
  47. package/fesm2022/sdcorejs-angular-forms-input-color.mjs +4 -2
  48. package/fesm2022/sdcorejs-angular-forms-input-color.mjs.map +1 -1
  49. package/fesm2022/sdcorejs-angular-forms-input-number.mjs +8 -5
  50. package/fesm2022/sdcorejs-angular-forms-input-number.mjs.map +1 -1
  51. package/fesm2022/sdcorejs-angular-forms-input.mjs +9 -5
  52. package/fesm2022/sdcorejs-angular-forms-input.mjs.map +1 -1
  53. package/fesm2022/sdcorejs-angular-forms-select.mjs +2 -1
  54. package/fesm2022/sdcorejs-angular-forms-select.mjs.map +1 -1
  55. package/fesm2022/sdcorejs-angular-forms-textarea.mjs +2 -1
  56. package/fesm2022/sdcorejs-angular-forms-textarea.mjs.map +1 -1
  57. package/fesm2022/sdcorejs-angular-modules-icon.mjs.map +1 -1
  58. package/fesm2022/sdcorejs-angular-modules-layout.mjs +1 -1
  59. package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
  60. package/fesm2022/sdcorejs-angular-modules.mjs +0 -1
  61. package/fesm2022/sdcorejs-angular-modules.mjs.map +1 -1
  62. package/fesm2022/sdcorejs-angular-pipes.mjs.map +1 -1
  63. package/fesm2022/sdcorejs-angular-services-loading.mjs +23 -14
  64. package/fesm2022/sdcorejs-angular-services-loading.mjs.map +1 -1
  65. package/forms/date/src/date.component.d.ts +1 -1
  66. package/forms/datetime/src/datetime.component.d.ts +1 -1
  67. package/forms/input/src/input.component.d.ts +3 -1
  68. package/forms/input-color/src/input-color.component.d.ts +3 -1
  69. package/forms/input-number/src/input-number.component.d.ts +3 -1
  70. package/forms/models/index.d.ts +2 -2
  71. package/modules/auth/services/index.d.ts +1 -1
  72. package/modules/icon/src/icon.model.d.ts +1 -2
  73. package/modules/icon/src/icon.provider.d.ts +1 -1
  74. package/modules/index.d.ts +0 -1
  75. package/modules/layout/services/index.d.ts +1 -1
  76. package/package.json +2 -5
  77. package/services/excel/src/public-api.d.ts +1 -1
  78. package/services/loading/src/loading.service.d.ts +1 -1
  79. package/utilities/models/index.d.ts +7 -7
  80. package/fesm2022/sdcorejs-angular-modules-authom.mjs +0 -360
  81. package/fesm2022/sdcorejs-angular-modules-authom.mjs.map +0 -1
  82. package/forms/datetime/src/material-datetime/index.d.ts +0 -14
  83. package/forms/datetime/src/material-datetime/lib/core/date-adapter.d.ts +0 -10
  84. package/forms/datetime/src/material-datetime/lib/core/date-formats.d.ts +0 -18
  85. package/forms/datetime/src/material-datetime/lib/core/default-options.d.ts +0 -13
  86. package/forms/datetime/src/material-datetime/lib/datetime-picker/datetime-picker-actions.component.d.ts +0 -5
  87. package/forms/datetime/src/material-datetime/lib/datetime-picker/datetime-picker-apply.directive.d.ts +0 -7
  88. package/forms/datetime/src/material-datetime/lib/datetime-picker/datetime-picker-cancel.directive.d.ts +0 -7
  89. package/forms/datetime/src/material-datetime/lib/datetime-picker/datetime-picker-input.directive.d.ts +0 -24
  90. package/forms/datetime/src/material-datetime/lib/datetime-picker/datetime-picker-now.directive.d.ts +0 -7
  91. package/forms/datetime/src/material-datetime/lib/datetime-picker/datetime-picker-toggle.directive.d.ts +0 -8
  92. package/forms/datetime/src/material-datetime/lib/datetime-picker/datetime-picker.component.d.ts +0 -39
  93. package/forms/datetime/src/material-datetime/lib/native/native-date-adapter.d.ts +0 -15
  94. package/forms/datetime/src/material-datetime/lib/native/native-date-formats.d.ts +0 -2
  95. package/forms/datetime/src/material-datetime/lib/native/provide-native.d.ts +0 -3
  96. package/forms/datetime/src/material-datetime/lib/time-spinner/time-spinner.component.d.ts +0 -31
  97. package/modules/authom/authom.configuration.d.ts +0 -17
  98. package/modules/authom/authom.interceptor.d.ts +0 -3
  99. package/modules/authom/authom.module.d.ts +0 -16
  100. package/modules/authom/authom.service.d.ts +0 -32
  101. package/modules/authom/index.d.ts +0 -35
@@ -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,U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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;;;;"}
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}`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Service {
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 };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corejs-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,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;;;QAG3B,QAAQ,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,GAAG,IAAG;YAC/C,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;AAC7B,gBAAA,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,EAAE;AAC5C,gBAAA,GAAG,CAAC,WAAW,CAAC,cAAc,CAAC;gBAC/B,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,cAAc,CAAC;YAC1C;AACF,QAAA,CAAC,CAAC;AACJ,IAAA,CAAC;AAED,IAAA,SAAS,GAAG,CAAC,OAAO,GAAG,MAAM,KAAI;QAC/B,MAAM,KAAK,GAAG,QAAQ,CAAC,gBAAgB,CAAC,OAAO,CAAC;QAChD,IAAI,CAAC,KAAK,CAAC,MAAM;AAAE,YAAA,OAAO,IAAI;QAC9B,KAAK,MAAM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AAA,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;;;;"}
@@ -36,7 +36,7 @@ export declare class SdDate implements OnDestroy, OnInit {
36
36
  disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
37
37
  /** Display mode: `false` edit · `true` static view · `'inline'` view + click-to-edit (calendar). */
38
38
  viewed: import("@angular/core").InputSignalWithTransform<SdViewed, SdViewedInput>;
39
- /** In `viewed='inline'`, show a hover clear on the text face. Set `false` when the host owns removal (chips). */
39
+ /** Whether to show the value-gated clear button in edit and inline modes. */
40
40
  clearable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
41
41
  /** `true` when `viewed === 'inline'`. */
42
42
  readonly isInline: import("@angular/core").Signal<boolean>;
@@ -37,7 +37,7 @@ export declare class SdDatetime implements OnDestroy, OnInit {
37
37
  viewed: import("@angular/core").InputSignalWithTransform<SdViewed, SdViewedInput>;
38
38
  /** Hiển thị thêm cột giây trong picker. Mặc định: chỉ HH:MM. */
39
39
  showSeconds: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
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: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
42
42
  /** `true` when `viewed === 'inline'`. */
43
43
  readonly isInline: import("@angular/core").Signal<boolean>;
@@ -39,6 +39,8 @@ export declare class SdInput implements OnDestroy, OnInit, AfterViewInit {
39
39
  type: import("@angular/core").InputSignal<"number" | "text" | "password" | "email">;
40
40
  hideInlineError: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
41
41
  blurOnEnter: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
42
+ /** Whether to show the value-gated clear button in edit and inline modes. */
43
+ clearable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
42
44
  required: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
43
45
  readonly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
44
46
  disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
@@ -92,5 +94,5 @@ export declare class SdInput implements OnDestroy, OnInit, AfterViewInit {
92
94
  blur: () => void;
93
95
  focus: () => void;
94
96
  static ɵfac: i0.ɵɵFactoryDeclaration<SdInput, never>;
95
- static ɵcmp: i0.ɵɵ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>;
97
+ static ɵcmp: i0.ɵɵ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>;
96
98
  }
@@ -18,6 +18,8 @@ export declare class SdInputColor {
18
18
  readonly required: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
19
19
  readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
20
20
  readonly readonly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
21
+ /** Whether the inner `<sd-input>` should render its clear button. */
22
+ readonly clearable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
21
23
  readonly hideInlineError: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
22
24
  /** Display mode — forwarded to the inner `<sd-input>`. `'inline'` = borderless inline-edit; disabled `'inline'` → static. */
23
25
  readonly viewed: import("@angular/core").InputSignalWithTransform<SdViewed, SdViewedInput>;
@@ -31,5 +33,5 @@ export declare class SdInputColor {
31
33
  onPickerChange: (ev: Event) => void;
32
34
  clear: (ev?: Event) => void;
33
35
  static ɵfac: i0.ɵɵFactoryDeclaration<SdInputColor, never>;
34
- static ɵcmp: i0.ɵɵ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>;
36
+ static ɵcmp: i0.ɵɵ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>;
35
37
  }
@@ -41,6 +41,8 @@ export declare class SdInputNumber implements OnDestroy, OnInit, AfterViewInit {
41
41
  placeholder: import("@angular/core").InputSignal<string | undefined>;
42
42
  hideInlineError: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
43
43
  blurOnEnter: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
44
+ /** Whether to show the value-gated clear button in edit and inline modes. */
45
+ clearable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
44
46
  required: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
45
47
  readonly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
46
48
  disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
@@ -101,6 +103,6 @@ export declare class SdInputNumber implements OnDestroy, OnInit, AfterViewInit {
101
103
  blur: () => void;
102
104
  focus: () => void;
103
105
  static ɵfac: i0.ɵɵFactoryDeclaration<SdInputNumber, never>;
104
- static ɵcmp: i0.ɵɵ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>;
106
+ static ɵcmp: i0.ɵɵ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>;
105
107
  }
106
108
  export {};
@@ -1,7 +1,7 @@
1
1
  export * from './src/sd-form.configuration';
2
2
  export * from './src/sd-form-control.model';
3
3
  export * from './src/sd-custom-validator.model';
4
- export * from './src/sd-selection-data.model';
5
- export * from './src/sd-search.model';
4
+ export type * from './src/sd-selection-data.model';
5
+ export type * from './src/sd-search.model';
6
6
  export * from './src/form-control-state';
7
7
  export * from './src/sd-viewed';
@@ -1,2 +1,2 @@
1
- export * from './auth.model';
1
+ export type * from './auth.model';
2
2
  export * from './auth.service';
@@ -37,8 +37,7 @@ export interface ISdIconConfiguration {
37
37
  /**
38
38
  * Cấu hình đã resolve đầy đủ để component không phải tự xử lý fallback nhiều lần.
39
39
  */
40
- export interface ISdIconResolvedConfiguration extends Required<Omit<ISdIconConfiguration, 'lucideIcons'>> {
41
- }
40
+ export type ISdIconResolvedConfiguration = Required<Omit<ISdIconConfiguration, 'lucideIcons'>>;
42
41
  /**
43
42
  * Quy đổi token `Size` chung của SDCoreJS sang pixel cho icon.
44
43
  */
@@ -5,7 +5,7 @@ import { type ISdIconConfiguration, type ISdIconResolvedConfiguration, type SdLu
5
5
  *
6
6
  * Token có factory mặc định để `SdIcon` vẫn chạy khi app chưa gọi `provideSdIcon`.
7
7
  */
8
- export declare const SD_ICON_CONFIGURATION: InjectionToken<ISdIconResolvedConfiguration>;
8
+ export declare const SD_ICON_CONFIGURATION: InjectionToken<Required<Omit<ISdIconConfiguration, "lucideIcons">>>;
9
9
  /**
10
10
  * Đăng ký cấu hình icon Core UI ở app-level.
11
11
  *
@@ -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';
@@ -1,3 +1,3 @@
1
- export * from './menu/menu.model';
1
+ export type * from './menu/menu.model';
2
2
  export * from './storage/storage.service';
3
3
  export * from './layout.service';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdcorejs/angular",
3
- "version": "19.1.2",
3
+ "version": "19.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",
@@ -294,10 +295,6 @@
294
295
  "types": "./modules/auth/index.d.ts",
295
296
  "default": "./fesm2022/sdcorejs-angular-modules-auth.mjs"
296
297
  },
297
- "./modules/authom": {
298
- "types": "./modules/authom/index.d.ts",
299
- "default": "./fesm2022/sdcorejs-angular-modules-authom.mjs"
300
- },
301
298
  "./modules/icon": {
302
299
  "types": "./modules/icon/index.d.ts",
303
300
  "default": "./fesm2022/sdcorejs-angular-modules-icon.mjs"
@@ -1,2 +1,2 @@
1
- export * from './lib/excel.model';
1
+ export type * from './lib/excel.model';
2
2
  export * from './lib/excel.service';
@@ -7,7 +7,7 @@ export declare class SdLoadingService {
7
7
  private loadingMap;
8
8
  constructor(rendererFactory: RendererFactory2);
9
9
  start: (element?: string) => void;
10
- isLoading: (element?: string) => boolean | null;
10
+ isLoading: (element?: string) => false | Element | null;
11
11
  stop: (element?: string) => void;
12
12
  static ɵfac: i0.ɵɵFactoryDeclaration<SdLoadingService, never>;
13
13
  static ɵprov: i0.ɵɵInjectableDeclaration<SdLoadingService>;
@@ -1,12 +1,12 @@
1
- export * from './src/color.model';
2
- export * from './src/size.model';
1
+ export type * from './src/color.model';
2
+ export type * from './src/size.model';
3
3
  export * from './src/icon.model';
4
4
  export * from './src/pattern.model';
5
5
  export * from './src/empty.model';
6
6
  export * from './src/maybe-async.model';
7
- export * from './src/nested-key-of.model';
8
- export * from './src/unwrap-signal.model';
7
+ export type * from './src/nested-key-of.model';
8
+ export type * from './src/unwrap-signal.model';
9
9
  export * from './src/operator.model';
10
- export * from './src/filter.model';
11
- export * from './src/order.model';
12
- export * from './src/paging.model';
10
+ export type * from './src/filter.model';
11
+ export type * from './src/order.model';
12
+ export type * from './src/paging.model';