@sd-angular/core 19.0.0-beta.100 → 19.0.0-beta.102

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 (125) hide show
  1. package/assets/images/coming-soon.svg +23 -0
  2. package/assets/images/data-empty.svg +21 -0
  3. package/assets/images/expired.svg +22 -0
  4. package/assets/images/file-error.svg +28 -0
  5. package/assets/images/filter-empty.svg +20 -0
  6. package/assets/images/filter-required.svg +21 -0
  7. package/assets/images/forbidden.svg +15 -0
  8. package/assets/images/image-error.svg +27 -0
  9. package/assets/images/maintenance.svg +23 -0
  10. package/assets/images/not-found.svg +20 -0
  11. package/assets/images/offline.svg +20 -0
  12. package/assets/images/submitted.svg +18 -0
  13. package/assets/images/success.svg +18 -0
  14. package/assets/images/unauthorized.svg +22 -0
  15. package/assets/images/unknown-error.svg +18 -0
  16. package/assets/scss/core/image.scss +35 -0
  17. package/assets/scss/sd-core.scss +1 -0
  18. package/components/index.d.ts +1 -0
  19. package/components/operator/index.d.ts +1 -0
  20. package/components/operator/src/operator.component.d.ts +34 -0
  21. package/components/query-bar/index.d.ts +2 -0
  22. package/components/query-bar/src/actions-bar.component.d.ts +31 -0
  23. package/components/query-bar/src/build-chip.component.d.ts +67 -0
  24. package/components/query-bar/src/chip-popover.component.d.ts +73 -0
  25. package/components/query-bar/src/field-picker.component.d.ts +37 -0
  26. package/components/query-bar/src/inline-chip.component.d.ts +82 -0
  27. package/components/query-bar/src/inline-value-chip.component.d.ts +71 -0
  28. package/components/query-bar/src/popover-chip.component.d.ts +35 -0
  29. package/components/query-bar/src/query-bar.component.d.ts +137 -0
  30. package/components/query-bar/src/query-bar.model.d.ts +136 -0
  31. package/components/query-bar/src/saved-filters-menu.component.d.ts +39 -0
  32. package/components/table/src/components/column-title/column-title.component.d.ts +1 -1
  33. package/components/table/src/components/desktop-cell/desktop-cell.component.d.ts +3 -3
  34. package/components/table/src/components/filter/column-filter/column-filter.component.d.ts +3 -7
  35. package/components/table/src/directives/sd-table-cell-def.directive.d.ts +12 -4
  36. package/components/table/src/directives/sd-table-column-filter-def.directive.d.ts +12 -4
  37. package/components/table/src/directives/sd-table-expand-def.directive.d.ts +10 -4
  38. package/components/table/src/directives/sd-table-filter-def.directive.d.ts +3 -3
  39. package/components/table/src/directives/sd-table-footer-def.directive.d.ts +12 -4
  40. package/components/table/src/directives/sd-table-title-def.directive.d.ts +10 -4
  41. package/components/table/src/table.component.d.ts +7 -7
  42. package/components/view/src/view.component.d.ts +2 -1
  43. package/directives/src/sd-desktop.directive.d.ts +2 -4
  44. package/directives/src/sd-mobile.directive.d.ts +2 -4
  45. package/fesm2022/sd-angular-core-components-anchor.mjs +73 -47
  46. package/fesm2022/sd-angular-core-components-anchor.mjs.map +1 -1
  47. package/fesm2022/sd-angular-core-components-badge.mjs +2 -2
  48. package/fesm2022/sd-angular-core-components-badge.mjs.map +1 -1
  49. package/fesm2022/sd-angular-core-components-form-generic.mjs +16 -16
  50. package/fesm2022/sd-angular-core-components-form-generic.mjs.map +1 -1
  51. package/fesm2022/sd-angular-core-components-operator.mjs +75 -0
  52. package/fesm2022/sd-angular-core-components-operator.mjs.map +1 -0
  53. package/fesm2022/sd-angular-core-components-query-bar.mjs +1425 -0
  54. package/fesm2022/sd-angular-core-components-query-bar.mjs.map +1 -0
  55. package/fesm2022/sd-angular-core-components-quick-action.mjs +2 -2
  56. package/fesm2022/sd-angular-core-components-quick-action.mjs.map +1 -1
  57. package/fesm2022/sd-angular-core-components-table.mjs +60 -27
  58. package/fesm2022/sd-angular-core-components-table.mjs.map +1 -1
  59. package/fesm2022/sd-angular-core-components-upload-file.mjs +4 -4
  60. package/fesm2022/sd-angular-core-components-upload-file.mjs.map +1 -1
  61. package/fesm2022/sd-angular-core-components-view.mjs +5 -2
  62. package/fesm2022/sd-angular-core-components-view.mjs.map +1 -1
  63. package/fesm2022/sd-angular-core-components.mjs +1 -0
  64. package/fesm2022/sd-angular-core-components.mjs.map +1 -1
  65. package/fesm2022/sd-angular-core-directives.mjs +15 -17
  66. package/fesm2022/sd-angular-core-directives.mjs.map +1 -1
  67. package/fesm2022/sd-angular-core-forms-autocomplete.mjs +5 -8
  68. package/fesm2022/sd-angular-core-forms-autocomplete.mjs.map +1 -1
  69. package/fesm2022/sd-angular-core-forms-checkbox.mjs +83 -87
  70. package/fesm2022/sd-angular-core-forms-checkbox.mjs.map +1 -1
  71. package/fesm2022/sd-angular-core-forms-chip-calendar.mjs +76 -57
  72. package/fesm2022/sd-angular-core-forms-chip-calendar.mjs.map +1 -1
  73. package/fesm2022/sd-angular-core-forms-chip.mjs +73 -48
  74. package/fesm2022/sd-angular-core-forms-chip.mjs.map +1 -1
  75. package/fesm2022/sd-angular-core-forms-date-range.mjs +41 -4
  76. package/fesm2022/sd-angular-core-forms-date-range.mjs.map +1 -1
  77. package/fesm2022/sd-angular-core-forms-date.mjs +14 -9
  78. package/fesm2022/sd-angular-core-forms-date.mjs.map +1 -1
  79. package/fesm2022/sd-angular-core-forms-datetime.mjs +8 -9
  80. package/fesm2022/sd-angular-core-forms-datetime.mjs.map +1 -1
  81. package/fesm2022/sd-angular-core-forms-directives.mjs +18 -24
  82. package/fesm2022/sd-angular-core-forms-directives.mjs.map +1 -1
  83. package/fesm2022/sd-angular-core-forms-input-number.mjs +5 -8
  84. package/fesm2022/sd-angular-core-forms-input-number.mjs.map +1 -1
  85. package/fesm2022/sd-angular-core-forms-input.mjs +5 -9
  86. package/fesm2022/sd-angular-core-forms-input.mjs.map +1 -1
  87. package/fesm2022/sd-angular-core-forms-models.mjs +13 -1
  88. package/fesm2022/sd-angular-core-forms-models.mjs.map +1 -1
  89. package/fesm2022/sd-angular-core-forms-radio.mjs +116 -176
  90. package/fesm2022/sd-angular-core-forms-radio.mjs.map +1 -1
  91. package/fesm2022/sd-angular-core-forms-select.mjs +23 -10
  92. package/fesm2022/sd-angular-core-forms-select.mjs.map +1 -1
  93. package/fesm2022/sd-angular-core-forms-switch.mjs +80 -99
  94. package/fesm2022/sd-angular-core-forms-switch.mjs.map +1 -1
  95. package/fesm2022/sd-angular-core-forms-textarea.mjs +5 -8
  96. package/fesm2022/sd-angular-core-forms-textarea.mjs.map +1 -1
  97. package/fesm2022/sd-angular-core-i18n.mjs +35 -0
  98. package/fesm2022/sd-angular-core-i18n.mjs.map +1 -1
  99. package/fesm2022/sd-angular-core-modules-layout.mjs +10 -10
  100. package/fesm2022/sd-angular-core-modules-layout.mjs.map +1 -1
  101. package/fesm2022/sd-angular-core-modules-permission.mjs.map +1 -1
  102. package/fesm2022/sd-angular-core-services-confirm.mjs +1 -1
  103. package/fesm2022/sd-angular-core-services-confirm.mjs.map +1 -1
  104. package/forms/autocomplete/src/autocomplete.component.d.ts +3 -4
  105. package/forms/checkbox/src/checkbox.component.d.ts +17 -20
  106. package/forms/chip/src/chip.component.d.ts +17 -17
  107. package/forms/chip-calendar/src/chip-calendar.component.d.ts +19 -19
  108. package/forms/date/src/date.component.d.ts +7 -4
  109. package/forms/date-range/src/date-range.component.d.ts +16 -2
  110. package/forms/datetime/src/datetime.component.d.ts +5 -4
  111. package/forms/directives/src/item-def.directive.d.ts +10 -5
  112. package/forms/directives/src/label-def.directive.d.ts +3 -2
  113. package/forms/directives/src/suffix-def.directive.d.ts +3 -2
  114. package/forms/directives/src/view-def.directive.d.ts +9 -9
  115. package/forms/input/src/input.component.d.ts +3 -5
  116. package/forms/input-number/src/input-number.component.d.ts +2 -3
  117. package/forms/models/src/sd-custom-validator.model.d.ts +13 -1
  118. package/forms/radio/src/radio.component.d.ts +32 -37
  119. package/forms/select/src/select.component.d.ts +8 -5
  120. package/forms/switch/src/switch.component.d.ts +17 -22
  121. package/forms/textarea/src/textarea.component.d.ts +2 -3
  122. package/i18n/src/en.d.ts +5 -0
  123. package/package.json +65 -57
  124. package/sd-angular-core-19.0.0-beta.102.tgz +0 -0
  125. package/sd-angular-core-19.0.0-beta.100.tgz +0 -0
@@ -1,4 +1,4 @@
1
- import { ElementRef } from '@angular/core';
1
+ import { ElementRef, TemplateRef } from '@angular/core';
2
2
  import { SdTableCellDefDirective } from '../../directives/sd-table-cell-def.directive';
3
3
  import { SdTableColumn } from '../../models/table-column.model';
4
4
  import { SdTableItem } from '../../models/table-item.model';
@@ -8,13 +8,13 @@ export declare class DesktopCellComponent {
8
8
  contentContainer: import("@angular/core").Signal<ElementRef<HTMLElement> | undefined>;
9
9
  column: import("@angular/core").InputSignal<SdTableColumn>;
10
10
  item: import("@angular/core").InputSignal<SdTableItem<any>>;
11
- cellDef: import("@angular/core").InputSignal<Record<string, SdTableCellDefDirective>>;
11
+ cellDef: import("@angular/core").InputSignal<Record<string, SdTableCellDefDirective<any>>>;
12
12
  value: import("@angular/core").Signal<any>;
13
13
  key: import("@angular/core").Signal<any>;
14
14
  autoId: import("@angular/core").Signal<string>;
15
15
  truncateEnable: import("@angular/core").Signal<boolean | undefined>;
16
16
  truncateWidth: import("@angular/core").Signal<string | undefined>;
17
- templateRef: import("@angular/core").Signal<import("@angular/core").TemplateRef<any>>;
17
+ templateRef: import("@angular/core").Signal<TemplateRef<any> | undefined>;
18
18
  isCollapsed: import("@angular/core").WritableSignal<boolean>;
19
19
  isOverflowing: import("@angular/core").WritableSignal<boolean>;
20
20
  constructor();
@@ -18,19 +18,15 @@ export declare class ColumnFilterComponent {
18
18
  label: Signal<string | undefined>;
19
19
  operators: Signal<{
20
20
  value: Operator;
21
- symbol?: string;
21
+ icon: string;
22
22
  display: string;
23
23
  }[]>;
24
- inlineSymbol: Signal<string>;
24
+ operatorValues: Signal<Operator[]>;
25
+ operatorWrapperClass: Signal<"mb-4 mr-2" | "mr-2">;
25
26
  items: Signal<any[] | SdSearch | Signal<any[]>>;
26
27
  constructor();
27
28
  onFilterChange: () => void;
28
29
  onFilterCommit: () => void;
29
- onChangeOperator: (operator: {
30
- value: Operator;
31
- symbol?: string;
32
- display: string;
33
- } | undefined) => void;
34
30
  static ɵfac: i0.ɵɵFactoryDeclaration<ColumnFilterComponent, never>;
35
31
  static ɵcmp: i0.ɵɵComponentDeclaration<ColumnFilterComponent, "column-filter", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "column": { "alias": "column"; "required": true; "isSignal": true; }; "columnFilter": { "alias": "columnFilter"; "required": false; "isSignal": true; }; "cacheValues": { "alias": "cacheValues"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "operator": { "alias": "operator"; "required": false; "isSignal": true; }; "isMobile": { "alias": "isMobile"; "required": false; "isSignal": true; }; }, { "operator": "operatorChange"; "filterChange": "filterChange"; "filterCommit": "filterCommit"; }, never, never, true, never>;
36
32
  }
@@ -1,8 +1,16 @@
1
1
  import { TemplateRef } from '@angular/core';
2
+ import { SdTableColumn } from '../models/table-column.model';
2
3
  import * as i0 from "@angular/core";
3
- export declare class SdTableCellDefDirective {
4
+ interface Context<T = any> {
5
+ item: T;
6
+ column: SdTableColumn<T>;
7
+ autoId: string;
8
+ }
9
+ export declare class SdTableCellDefDirective<T = any> {
10
+ static ngTemplateContextGuard<T>(_dir: SdTableCellDefDirective<T>, _ctx: unknown): _ctx is Context<T>;
4
11
  sdTableCellDef: import("@angular/core").InputSignal<string>;
5
- templateRef: TemplateRef<any>;
6
- static ɵfac: i0.ɵɵFactoryDeclaration<SdTableCellDefDirective, never>;
7
- static ɵdir: i0.ɵɵDirectiveDeclaration<SdTableCellDefDirective, "[sdTableCellDef]", never, { "sdTableCellDef": { "alias": "sdTableCellDef"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
12
+ templateRef: TemplateRef<Context<T>>;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<SdTableCellDefDirective<any>, never>;
14
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SdTableCellDefDirective<any>, "[sdTableCellDef]", never, { "sdTableCellDef": { "alias": "sdTableCellDef"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
8
15
  }
16
+ export {};
@@ -1,8 +1,16 @@
1
1
  import { TemplateRef } from '@angular/core';
2
+ import { SdTableColumn } from '../models/table-column.model';
2
3
  import * as i0 from "@angular/core";
3
- export declare class SdTableColumnFilterDefDirective {
4
+ interface Context<T = any> {
5
+ column: SdTableColumn<T>;
6
+ field: string;
7
+ disabled?: boolean;
8
+ }
9
+ export declare class SdTableColumnFilterDefDirective<T = any> {
10
+ static ngTemplateContextGuard<T>(_dir: SdTableColumnFilterDefDirective<T>, _ctx: unknown): _ctx is Context<T>;
4
11
  sdTableColumnFilterDef: import("@angular/core").InputSignal<string>;
5
- templateRef: TemplateRef<any>;
6
- static ɵfac: i0.ɵɵFactoryDeclaration<SdTableColumnFilterDefDirective, never>;
7
- static ɵdir: i0.ɵɵDirectiveDeclaration<SdTableColumnFilterDefDirective, "[sdTableColumnFilterDef]", never, { "sdTableColumnFilterDef": { "alias": "sdTableColumnFilterDef"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
12
+ templateRef: TemplateRef<Context<T>>;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<SdTableColumnFilterDefDirective<any>, never>;
14
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SdTableColumnFilterDefDirective<any>, "[sdTableColumnFilterDef]", never, { "sdTableColumnFilterDef": { "alias": "sdTableColumnFilterDef"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
8
15
  }
16
+ export {};
@@ -1,7 +1,13 @@
1
1
  import { TemplateRef } from '@angular/core';
2
+ import { SdTableItem } from '../models/table-item.model';
2
3
  import * as i0 from "@angular/core";
3
- export declare class SdTableExpandDefDirective {
4
- templateRef: TemplateRef<any>;
5
- static ɵfac: i0.ɵɵFactoryDeclaration<SdTableExpandDefDirective, never>;
6
- static ɵdir: i0.ɵɵDirectiveDeclaration<SdTableExpandDefDirective, "[sdTableExpandDef]", never, {}, {}, never, never, true, never>;
4
+ interface Context<T = any> {
5
+ item: SdTableItem<T>;
7
6
  }
7
+ export declare class SdTableExpandDefDirective<T = any> {
8
+ static ngTemplateContextGuard<T>(_dir: SdTableExpandDefDirective<T>, _ctx: unknown): _ctx is Context<T>;
9
+ templateRef: TemplateRef<Context<T>>;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<SdTableExpandDefDirective<any>, never>;
11
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SdTableExpandDefDirective<any>, "[sdTableExpandDef]", never, {}, {}, never, never, true, never>;
12
+ }
13
+ export {};
@@ -1,13 +1,13 @@
1
1
  import { TemplateRef } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
3
  interface Context {
4
- externalFilter?: Record<string, any>;
4
+ externalFilter?: Record<string, unknown>;
5
5
  }
6
6
  export declare class SdTableFilterDefDirective {
7
- static ngTemplateContextGuard(dir: Context, ctx: unknown): ctx is Context;
7
+ static ngTemplateContextGuard(_dir: SdTableFilterDefDirective, _ctx: unknown): _ctx is Context;
8
8
  sdTableFilterDef: import("@angular/core").InputSignal<string>;
9
9
  defaultShowing: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
10
- templateRef: TemplateRef<any> | null;
10
+ templateRef: TemplateRef<Context> | null;
11
11
  static ɵfac: i0.ɵɵFactoryDeclaration<SdTableFilterDefDirective, never>;
12
12
  static ɵdir: i0.ɵɵDirectiveDeclaration<SdTableFilterDefDirective, "[sdTableFilterDef]", never, { "sdTableFilterDef": { "alias": "sdTableFilterDef"; "required": true; "isSignal": true; }; "defaultShowing": { "alias": "defaultShowing"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
13
13
  }
@@ -1,8 +1,16 @@
1
1
  import { TemplateRef } from '@angular/core';
2
+ import { SdTableColumn } from '../models/table-column.model';
3
+ import { SdTableItem } from '../models/table-item.model';
2
4
  import * as i0 from "@angular/core";
3
- export declare class SdMaterialFooterDefDirective {
5
+ interface Context<T = any> {
6
+ items: SdTableItem<T>[];
7
+ column: SdTableColumn<T>;
8
+ }
9
+ export declare class SdMaterialFooterDefDirective<T = any> {
10
+ static ngTemplateContextGuard<T>(_dir: SdMaterialFooterDefDirective<T>, _ctx: unknown): _ctx is Context<T>;
4
11
  sdTableFooterDef: import("@angular/core").InputSignal<string>;
5
- templateRef: TemplateRef<any>;
6
- static ɵfac: i0.ɵɵFactoryDeclaration<SdMaterialFooterDefDirective, never>;
7
- static ɵdir: i0.ɵɵDirectiveDeclaration<SdMaterialFooterDefDirective, "[sdTableFooterDef]", never, { "sdTableFooterDef": { "alias": "sdTableFooterDef"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
12
+ templateRef: TemplateRef<Context<T>>;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<SdMaterialFooterDefDirective<any>, never>;
14
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SdMaterialFooterDefDirective<any>, "[sdTableFooterDef]", never, { "sdTableFooterDef": { "alias": "sdTableFooterDef"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
8
15
  }
16
+ export {};
@@ -1,8 +1,14 @@
1
1
  import { TemplateRef } from '@angular/core';
2
+ import { SdTableColumn } from '../models/table-column.model';
2
3
  import * as i0 from "@angular/core";
3
- export declare class SdTableTitleDefDirective {
4
+ interface Context<T = any> {
5
+ column: SdTableColumn<T>;
6
+ }
7
+ export declare class SdTableTitleDefDirective<T = any> {
8
+ static ngTemplateContextGuard<T>(_dir: SdTableTitleDefDirective<T>, _ctx: unknown): _ctx is Context<T>;
4
9
  sdTableTitleDef: import("@angular/core").InputSignal<string>;
5
- templateRef: TemplateRef<any>;
6
- static ɵfac: i0.ɵɵFactoryDeclaration<SdTableTitleDefDirective, never>;
7
- static ɵdir: i0.ɵɵDirectiveDeclaration<SdTableTitleDefDirective, "[sdTableTitleDef]", never, { "sdTableTitleDef": { "alias": "sdTableTitleDef"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
10
+ templateRef: TemplateRef<Context<T>>;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<SdTableTitleDefDirective<any>, never>;
12
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SdTableTitleDefDirective<any>, "[sdTableTitleDef]", never, { "sdTableTitleDef": { "alias": "sdTableTitleDef"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
8
13
  }
14
+ export {};
@@ -48,15 +48,15 @@ export declare class SdTable<T = unknown> extends SdBaseSecureComponent implemen
48
48
  mobileFilter: import("@angular/core").Signal<MobileFilterComponent | undefined>;
49
49
  paginator: import("@angular/core").Signal<MatPaginator | undefined>;
50
50
  sort: import("@angular/core").Signal<MatSort | undefined>;
51
- sdSubInformation: import("@angular/core").Signal<SdTableExpandDefDirective | undefined>;
52
- sdCellDefs: import("@angular/core").Signal<readonly SdTableCellDefDirective[]>;
53
- sdFooterDefs: import("@angular/core").Signal<readonly SdMaterialFooterDefDirective[]>;
51
+ sdSubInformation: import("@angular/core").Signal<SdTableExpandDefDirective<any> | undefined>;
52
+ sdCellDefs: import("@angular/core").Signal<readonly SdTableCellDefDirective<any>[]>;
53
+ sdFooterDefs: import("@angular/core").Signal<readonly SdMaterialFooterDefDirective<any>[]>;
54
54
  sdFilterDefs: import("@angular/core").Signal<readonly SdTableFilterDefDirective[]>;
55
- sdTitleDefs: import("@angular/core").Signal<readonly SdTableTitleDefDirective[]>;
56
- cellDef: import("@angular/core").Signal<Record<string, SdTableCellDefDirective>>;
57
- footerDef: import("@angular/core").Signal<Record<string, SdMaterialFooterDefDirective>>;
55
+ sdTitleDefs: import("@angular/core").Signal<readonly SdTableTitleDefDirective<any>[]>;
56
+ cellDef: import("@angular/core").Signal<Record<string, SdTableCellDefDirective<any>>>;
57
+ footerDef: import("@angular/core").Signal<Record<string, SdMaterialFooterDefDirective<any>>>;
58
58
  hasFooter: import("@angular/core").Signal<boolean>;
59
- titleDef: import("@angular/core").Signal<Record<string, SdTableTitleDefDirective>>;
59
+ titleDef: import("@angular/core").Signal<Record<string, SdTableTitleDefDirective<any>>>;
60
60
  tableOption: import("@angular/core").WritableSignal<SdTableOption<T> | undefined>;
61
61
  configuration: import("@angular/core").WritableSignal<ConfiguredTableResult | undefined>;
62
62
  items: import("@angular/core").WritableSignal<SdTableItem<T>[]>;
@@ -7,10 +7,11 @@ export declare class SdView {
7
7
  hyperlink: import("@angular/core").InputSignal<string | null | undefined>;
8
8
  labelTemplate: import("@angular/core").InputSignal<TemplateRef<any> | undefined>;
9
9
  valueTemplate: import("@angular/core").InputSignal<TemplateRef<any> | undefined>;
10
+ selectedItems: import("@angular/core").InputSignal<any[] | undefined>;
10
11
  contentLabelTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
11
12
  contentValueTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
12
13
  activeLabelTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
13
14
  activeValueTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
14
15
  static ɵfac: i0.ɵɵFactoryDeclaration<SdView, never>;
15
- static ɵcmp: i0.ɵɵComponentDeclaration<SdView, "sd-view", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "display": { "alias": "display"; "required": true; "isSignal": true; }; "hyperlink": { "alias": "hyperlink"; "required": false; "isSignal": true; }; "labelTemplate": { "alias": "labelTemplate"; "required": false; "isSignal": true; }; "valueTemplate": { "alias": "valueTemplate"; "required": false; "isSignal": true; }; }, {}, ["contentLabelTemplate", "contentValueTemplate"], never, true, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<SdView, "sd-view", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "display": { "alias": "display"; "required": true; "isSignal": true; }; "hyperlink": { "alias": "hyperlink"; "required": false; "isSignal": true; }; "labelTemplate": { "alias": "labelTemplate"; "required": false; "isSignal": true; }; "valueTemplate": { "alias": "valueTemplate"; "required": false; "isSignal": true; }; "selectedItems": { "alias": "selectedItems"; "required": false; "isSignal": true; }; }, {}, ["contentLabelTemplate", "contentValueTemplate"], never, true, never>;
16
17
  }
@@ -1,9 +1,7 @@
1
- import { ViewContainerRef, TemplateRef } from '@angular/core';
2
1
  import * as i0 from "@angular/core";
3
2
  export declare class SdDesktopDirective {
4
- private templateRef;
5
- private viewContainerRef;
6
- constructor(templateRef: TemplateRef<any>, viewContainerRef: ViewContainerRef);
3
+ #private;
4
+ constructor();
7
5
  static ɵfac: i0.ɵɵFactoryDeclaration<SdDesktopDirective, never>;
8
6
  static ɵdir: i0.ɵɵDirectiveDeclaration<SdDesktopDirective, "[sdDesktop]", never, {}, {}, never, never, true, never>;
9
7
  }
@@ -1,9 +1,7 @@
1
- import { TemplateRef, ViewContainerRef } from '@angular/core';
2
1
  import * as i0 from "@angular/core";
3
2
  export declare class SdMobileDirective {
4
- private templateRef;
5
- private viewContainerRef;
6
- constructor(templateRef: TemplateRef<any>, viewContainerRef: ViewContainerRef);
3
+ #private;
4
+ constructor();
7
5
  static ɵfac: i0.ɵɵFactoryDeclaration<SdMobileDirective, never>;
8
6
  static ɵdir: i0.ɵɵDirectiveDeclaration<SdMobileDirective, "[sdMobile]", never, {}, {}, never, never, true, never>;
9
7
  }
@@ -1,10 +1,10 @@
1
1
  import * as i1$1 from '@angular/common';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { input, inject, ElementRef, effect, Component, computed, output, ChangeDetectionStrategy, viewChild, contentChildren, booleanAttribute, signal, afterNextRender } from '@angular/core';
4
+ import { input, inject, ElementRef, effect, Component, computed, output, ChangeDetectionStrategy, viewChild, contentChildren, booleanAttribute, signal, afterNextRender, untracked } from '@angular/core';
5
5
  import { v4 } from 'uuid';
6
6
  import { BrowserUtilities } from '@sdcorejs/utils/fns';
7
- import { Subject, Subscription, debounceTime, fromEvent, auditTime, map, filter, take } from 'rxjs';
7
+ import { Subject, Subscription, debounceTime, fromEvent, take } from 'rxjs';
8
8
  import * as i1 from '@angular/material/icon';
9
9
  import { MatIconModule } from '@angular/material/icon';
10
10
 
@@ -84,76 +84,102 @@ class SdAnchor {
84
84
  // Màu highlight active nav (text + icon + vertical bar). Default 'primary'.
85
85
  color = input('primary');
86
86
  activeSectionId = signal('');
87
- #scrollSubscription = new Subscription();
88
- #clickScrollSubscription = new Subscription();
89
- #delay = 100;
90
- #currentScrollTop = 0;
87
+ #initialized = false;
88
+ #isClickScrolling = false;
89
+ #clickScrollSubscription = null;
90
+ #intersectionObserver = null;
91
+ #visibleSections = new Set();
91
92
  #timeoutId = null;
93
+ #timeoutScrollFallback = 200;
92
94
  constructor() {
93
95
  afterNextRender(() => {
96
+ this.#initialized = true;
94
97
  if (!this.hideNav()) {
95
- this.activeSectionId.set(this.sections()[0]?.id ?? '');
96
- this.#registerScrollSubscription();
98
+ this.#registerIntersectionObserver();
99
+ }
100
+ });
101
+ // Lắng nghe thay đổi sections để đăng ký lại observe section
102
+ effect(() => {
103
+ this.sections();
104
+ if (!this.hideNav() && this.#initialized) {
105
+ untracked(() => this.#registerIntersectionObserver());
97
106
  }
98
107
  });
99
108
  }
100
- #registerScrollSubscription = () => {
101
- this.#disposeResources();
109
+ #registerIntersectionObserver() {
110
+ this.#cleanIntersectionObserver();
102
111
  const wrapperEl = this.wrapper().nativeElement;
103
- this.#scrollSubscription = fromEvent(wrapperEl, 'scroll')
104
- .pipe(auditTime(50))
105
- .subscribe((event) => {
106
- const el = event.target;
107
- this.#currentScrollTop = this.#updateCurrentScroll(el);
112
+ // Brower API IntersectionObserver sẽ hỗ trợ khi nào 1 section được hiện ra trong wrapperEl
113
+ this.#intersectionObserver = new IntersectionObserver(entries => {
114
+ for (const entry of entries) {
115
+ if (entry.isIntersecting) {
116
+ // Nếu section mới đi vào vùng nhìn thấy -> add vào set
117
+ this.#visibleSections.add(entry.target);
118
+ }
119
+ else {
120
+ // Nếu section đã đi ra khỏi vùng nhìn thấy -> xóa khỏi Set
121
+ this.#visibleSections.delete(entry.target);
122
+ }
123
+ }
124
+ // Nếu đang scroll bởi click section thì return luôn, k phải quét qua tìm vùng section được active
125
+ if (this.#isClickScrolling) {
126
+ return;
127
+ }
108
128
  for (const section of this.sections()) {
109
- const rect = section.elementRef.nativeElement;
110
- const rectTop = rect.offsetTop;
111
- const rectBottom = rectTop + rect.offsetHeight;
112
- if (this.#currentScrollTop >= rectTop && this.#currentScrollTop < rectBottom) {
113
- this.activeSectionId.set(section.id);
129
+ // Kiểm tra xem DOM của section nào đang nằm trong danh sách đang nhìn thấy để active chính xác
130
+ if (this.#visibleSections.has(section.elementRef.nativeElement)) {
131
+ if (this.activeSectionId() !== section.id) {
132
+ this.activeSectionId.set(section.id);
133
+ }
114
134
  break;
115
135
  }
116
136
  }
117
- });
118
- };
137
+ }, { root: wrapperEl, threshold: 0 });
138
+ // Đăng ký theo dõi từng section có trong anchor
139
+ for (const section of this.sections()) {
140
+ this.#intersectionObserver.observe(section.elementRef.nativeElement);
141
+ }
142
+ }
119
143
  scrollSectionByClick(idSectionTarget) {
120
144
  this.activeSectionId.set(idSectionTarget);
121
145
  const targetSection = this.sections().find(s => s.id === idSectionTarget)?.elementRef;
122
- if (!targetSection)
146
+ if (!targetSection) {
123
147
  return;
124
- this.#disposeResources();
148
+ }
149
+ this.#cleanScrollSectionByClickObserver();
150
+ this.#isClickScrolling = true;
125
151
  const wrapperEl = this.wrapper().nativeElement;
126
152
  const targetElement = targetSection.nativeElement;
127
- const prevScrollTop = this.#currentScrollTop;
128
- this.#clickScrollSubscription = fromEvent(wrapperEl, 'scroll')
129
- .pipe(auditTime(this.#delay), map((event) => {
130
- const el = event.target;
131
- this.#currentScrollTop = this.#updateCurrentScroll(el);
132
- const wrapperTop = wrapperEl.getBoundingClientRect().top;
133
- const targetRect = targetElement.getBoundingClientRect();
134
- const isVisible = targetRect.top >= 0 && targetRect.bottom <= window.innerHeight;
135
- return Math.abs(targetRect.top - wrapperTop) < 1 || isVisible;
136
- }), filter(Boolean), debounceTime(this.#delay + 100), take(1))
137
- .subscribe(() => this.#registerScrollSubscription());
153
+ const prevScrollTop = wrapperEl.scrollTop; // Lưu lại vị trí cuộn hiện tại của container
154
+ const scrollTop = prevScrollTop + targetElement.getBoundingClientRect().top - wrapperEl.getBoundingClientRect().top; // Vị trí section cần scroll tới
155
+ // Đăng sự kiện nếu đã được scroll xong
156
+ this.#clickScrollSubscription = fromEvent(wrapperEl, 'scrollend')
157
+ .pipe(take(1))
158
+ .subscribe(() => {
159
+ this.#isClickScrolling = false;
160
+ });
161
+ // Nếu sectionTarget đã ở đúng vị trí (click nhưng không scroll) thì sau #timeoutScrollFallback kích hoạt lại IntersectionObserver
138
162
  this.#timeoutId = setTimeout(() => {
139
- if (prevScrollTop === this.#currentScrollTop) {
140
- this.#registerScrollSubscription();
163
+ if (wrapperEl.scrollTop === prevScrollTop) {
164
+ this.#isClickScrolling = false;
165
+ this.#clickScrollSubscription?.unsubscribe();
141
166
  }
142
- }, this.#delay + 100);
143
- wrapperEl.scrollTo({ top: targetElement.offsetTop, behavior: 'smooth' });
144
- }
145
- #updateCurrentScroll(el) {
146
- const style = getComputedStyle(el);
147
- return el.scrollTop + parseFloat(style.paddingTop) + parseFloat(style.borderTopWidth);
167
+ }, this.#timeoutScrollFallback);
168
+ wrapperEl.scrollTo({ top: scrollTop, behavior: 'smooth' });
148
169
  }
149
- #disposeResources = () => {
150
- if (this.#timeoutId)
170
+ #cleanScrollSectionByClickObserver = () => {
171
+ if (this.#timeoutId) {
151
172
  clearTimeout(this.#timeoutId);
152
- this.#scrollSubscription?.unsubscribe();
173
+ }
153
174
  this.#clickScrollSubscription?.unsubscribe();
154
175
  };
176
+ #cleanIntersectionObserver = () => {
177
+ this.#intersectionObserver?.disconnect();
178
+ this.#visibleSections.clear();
179
+ };
155
180
  ngOnDestroy() {
156
- this.#disposeResources();
181
+ this.#cleanScrollSectionByClickObserver();
182
+ this.#cleanIntersectionObserver();
157
183
  }
158
184
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdAnchor, deps: [], target: i0.ɵɵFactoryTarget.Component });
159
185
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdAnchor, isStandalone: true, selector: "sd-anchor", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, sidebarWidth: { classPropertyName: "sidebarWidth", publicName: "sidebarWidth", isSignal: true, isRequired: false, transformFunction: null }, ellipsis: { classPropertyName: "ellipsis", publicName: "ellipsis", isSignal: true, isRequired: false, transformFunction: null }, overScroll: { classPropertyName: "overScroll", publicName: "overScroll", isSignal: true, isRequired: false, transformFunction: null }, hideNav: { classPropertyName: "hideNav", publicName: "hideNav", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "sections", predicate: SdAnchorItem, isSignal: true }], viewQueries: [{ propertyName: "wrapper", first: true, predicate: ["wrapper"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"c-anchor-vertical\" [ngClass]=\"{ 'c-stop-scroll-propagation': !overScroll() }\" #wrapper>\r\n <div class=\"c-anchor-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n @if (!hideNav()) {\r\n <div class=\"c-anchor-list\" [style.flex-basis]=\"sidebarWidth()\">\r\n <anchor-nav\r\n [sections]=\"sections()\"\r\n [ellipsis]=\"ellipsis()\"\r\n [sidebarWidth]=\"sidebarWidth()\"\r\n [activeSectionId]=\"activeSectionId()\"\r\n [parentAutoId]=\"autoId()\"\r\n [color]=\"color()\"\r\n (clickSection)=\"scrollSectionByClick($event)\">\r\n </anchor-nav>\r\n </div>\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.c-anchor-vertical{position:relative;display:flex;height:100%;width:100%;gap:16px;overflow-y:auto}.c-anchor-vertical.c-stop-scroll-propagation{overscroll-behavior:contain}.c-anchor-vertical .c-anchor-content{flex:1 1 auto;min-width:0}.c-anchor-vertical .c-anchor-list{flex:0 0 auto;position:sticky;top:0;right:6px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: AnchorNav, selector: "anchor-nav", inputs: ["sections", "activeSectionId", "ellipsis", "sidebarWidth", "parentAutoId", "color"], outputs: ["clickSection"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
@@ -1 +1 @@
1
- {"version":3,"file":"sd-angular-core-components-anchor.mjs","sources":["../../../projects/sd-angular/components/anchor/src/components/anchor-item/anchor-item.component.ts","../../../projects/sd-angular/components/anchor/src/components/anchor-item/anchor-item.component.html","../../../projects/sd-angular/components/anchor/src/components/anchor-nav/anchor-nav.component.ts","../../../projects/sd-angular/components/anchor/src/components/anchor-nav/anchor-nav.component.html","../../../projects/sd-angular/components/anchor/src/components/anchor/anchor.component.ts","../../../projects/sd-angular/components/anchor/src/components/anchor/anchor.component.html","../../../projects/sd-angular/components/anchor/sd-angular-core-components-anchor.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\r\nimport { Component, ElementRef, effect, inject, input } from '@angular/core';\r\nimport { v4 as uuidv4 } from 'uuid';\r\nimport { IAnchorItem } from '../../models';\r\n\r\n@Component({\r\n selector: 'sd-anchor-item',\r\n templateUrl: './anchor-item.component.html',\r\n styleUrls: ['./anchor-item.component.scss'],\r\n imports: [CommonModule],\r\n standalone: true,\r\n})\r\nexport class SdAnchorItem implements IAnchorItem {\r\n title = input.required<string>();\r\n icon = input<string | undefined>();\r\n // Stable key dùng cho data-autoId. Nếu không truyền thì fallback về uuid (không stable giữa các lần render).\r\n key = input<string | undefined>(undefined);\r\n id: string = uuidv4();\r\n elementRef = inject(ElementRef);\r\n\r\n constructor() {\r\n effect(() => {\r\n if (this.title()) {\r\n this.elementRef.nativeElement.removeAttribute('title');\r\n }\r\n });\r\n }\r\n}\r\n","<section>\r\n <ng-content></ng-content>\r\n</section>\r\n","import { ChangeDetectionStrategy, Component, OnDestroy, computed, input, output } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatIconModule } from '@angular/material/icon';\nimport { Color } from '@sdcorejs/utils/models';\nimport { Subject, Subscription, debounceTime } from 'rxjs';\n\nimport { SdAnchorItem } from '../anchor-item/anchor-item.component';\n\n@Component({\n selector: 'anchor-nav',\n templateUrl: './anchor-nav.component.html',\n styleUrl: './anchor-nav.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CommonModule, MatIconModule],\n standalone: true,\n})\n// eslint-disable-next-line @angular-eslint/component-class-suffix\nexport class AnchorNav implements OnDestroy {\n sections = input.required<readonly SdAnchorItem[]>();\n activeSectionId = input<string>('');\n ellipsis = input<boolean>(false);\n sidebarWidth = input<string>('');\n // autoId được forward từ <sd-anchor>. Derive per-item autoId theo `key` của item (nếu có).\n parentAutoId = input<string | undefined | null>(undefined);\n color = input<Color>('primary');\n\n // CSS var binding cho active state — map SdColor → global token `--sd-{color}`.\n // SCSS đọc qua `var(--anchor-active-color)` cho border + text + icon.\n cssActiveVar = computed(() => `var(--sd-${this.color()})`);\n\n itemAutoId(section: SdAnchorItem): string | undefined {\n const parent = this.parentAutoId();\n const key = section.key();\n return parent && key ? `${parent}-${key}` : undefined;\n }\n\n clickSection = output<string>();\n\n #delay = 200;\n #clickSectionSubject = new Subject<string>();\n #subscription = new Subscription();\n\n constructor() {\n this.#subscription.add(\n this.#clickSectionSubject\n .pipe(debounceTime(this.#delay))\n .subscribe((id: string) => this.clickSection.emit(id))\n );\n }\n\n onClickSection = (id: string): void => {\n this.#clickSectionSubject.next(id);\n };\n\n ngOnDestroy(): void {\n this.#subscription.unsubscribe();\n }\n}\n","<div\r\n class=\"c-anchor-list\"\r\n [style.width]=\"sidebarWidth()\"\r\n [style.--anchor-active-color]=\"cssActiveVar()\">\r\n @for (section of sections(); track section.id) {\r\n <div\r\n class=\"c-anchor-list-item\"\r\n [class.active]=\"section.id === activeSectionId()\"\r\n (click)=\"onClickSection(section.id)\"\r\n (keydown.enter)=\"onClickSection(section.id)\"\r\n [attr.data-autoId]=\"itemAutoId(section)\"\r\n tabindex=\"0\">\r\n @if (section.icon()) {\r\n <mat-icon class=\"c-anchor-list-item-icon\">{{ section.icon() }}</mat-icon>\r\n }\r\n <div class=\"c-anchor-list-item-text\" [class.ellipsis]=\"ellipsis()\">\r\n {{ section.title() }}\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n OnDestroy,\r\n afterNextRender,\r\n booleanAttribute,\r\n computed,\r\n contentChildren,\r\n input,\r\n signal,\r\n viewChild,\r\n} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { BrowserUtilities } from '@sdcorejs/utils/fns';\r\nimport { Color } from '@sdcorejs/utils/models';\r\nimport { Subscription, auditTime, debounceTime, filter, fromEvent, map, take } from 'rxjs';\r\n\r\nimport { AnchorNav } from '../anchor-nav/anchor-nav.component';\r\nimport { SdAnchorItem } from '../anchor-item/anchor-item.component';\r\n\r\n@Component({\r\n selector: 'sd-anchor',\r\n templateUrl: './anchor.component.html',\r\n styleUrls: ['./anchor.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [CommonModule, AnchorNav],\r\n standalone: true,\r\n})\r\nexport class SdAnchor implements OnDestroy {\r\n wrapper = viewChild.required<ElementRef>('wrapper');\r\n sections = contentChildren(SdAnchorItem);\r\n\r\n readonly autoIdInput = input<string | undefined | null>(undefined, { alias: 'autoId' });\r\n readonly autoId = computed(() => (this.autoIdInput() ? `components-anchor-${this.autoIdInput()}` : undefined));\r\n\r\n sidebarWidth = input<string>('200px');\r\n ellipsis = input(false, { transform: booleanAttribute });\r\n overScroll = input(false, { transform: booleanAttribute });\r\n // Mobile: default ẩn nav (sidebar TOC chiếm chỗ trên màn hình hẹp).\r\n // Consumer truyền `[hideNav]=\"false\"` để force hiện trên mobile.\r\n hideNav = input(BrowserUtilities.isMobile(), { transform: booleanAttribute });\r\n // Màu highlight active nav (text + icon + vertical bar). Default 'primary'.\r\n color = input<Color>('primary');\r\n\r\n activeSectionId = signal<string>('');\r\n\r\n #scrollSubscription = new Subscription();\r\n #clickScrollSubscription = new Subscription();\r\n #delay = 100;\r\n #currentScrollTop = 0;\r\n #timeoutId: ReturnType<typeof setTimeout> | null = null;\r\n\r\n constructor() {\r\n afterNextRender(() => {\r\n if (!this.hideNav()) {\r\n this.activeSectionId.set(this.sections()[0]?.id ?? '');\r\n this.#registerScrollSubscription();\r\n }\r\n });\r\n }\r\n\r\n #registerScrollSubscription = (): void => {\r\n this.#disposeResources();\r\n const wrapperEl = this.wrapper().nativeElement;\r\n this.#scrollSubscription = fromEvent<UIEvent>(wrapperEl, 'scroll')\r\n .pipe(auditTime(50))\r\n .subscribe((event: UIEvent) => {\r\n const el = event.target as HTMLElement;\r\n this.#currentScrollTop = this.#updateCurrentScroll(el);\r\n for (const section of this.sections()) {\r\n const rect = section.elementRef.nativeElement;\r\n const rectTop = rect.offsetTop;\r\n const rectBottom = rectTop + rect.offsetHeight;\r\n if (this.#currentScrollTop >= rectTop && this.#currentScrollTop < rectBottom) {\r\n this.activeSectionId.set(section.id);\r\n break;\r\n }\r\n }\r\n });\r\n };\r\n\r\n scrollSectionByClick(idSectionTarget: string): void {\r\n this.activeSectionId.set(idSectionTarget);\r\n const targetSection = this.sections().find(s => s.id === idSectionTarget)?.elementRef;\r\n if (!targetSection) return;\r\n\r\n this.#disposeResources();\r\n const wrapperEl = this.wrapper().nativeElement;\r\n const targetElement = targetSection.nativeElement;\r\n const prevScrollTop = this.#currentScrollTop;\r\n\r\n this.#clickScrollSubscription = fromEvent<UIEvent>(wrapperEl, 'scroll')\r\n .pipe(\r\n auditTime(this.#delay),\r\n map((event: UIEvent) => {\r\n const el = event.target as HTMLElement;\r\n this.#currentScrollTop = this.#updateCurrentScroll(el);\r\n const wrapperTop = wrapperEl.getBoundingClientRect().top;\r\n const targetRect = targetElement.getBoundingClientRect();\r\n const isVisible = targetRect.top >= 0 && targetRect.bottom <= window.innerHeight;\r\n return Math.abs(targetRect.top - wrapperTop) < 1 || isVisible;\r\n }),\r\n filter(Boolean),\r\n debounceTime(this.#delay + 100),\r\n take(1)\r\n )\r\n .subscribe(() => this.#registerScrollSubscription());\r\n\r\n this.#timeoutId = setTimeout(() => {\r\n if (prevScrollTop === this.#currentScrollTop) {\r\n this.#registerScrollSubscription();\r\n }\r\n }, this.#delay + 100);\r\n\r\n wrapperEl.scrollTo({ top: targetElement.offsetTop, behavior: 'smooth' });\r\n }\r\n\r\n #updateCurrentScroll(el: HTMLElement): number {\r\n const style = getComputedStyle(el);\r\n return el.scrollTop + parseFloat(style.paddingTop) + parseFloat(style.borderTopWidth);\r\n }\r\n\r\n #disposeResources = (): void => {\r\n if (this.#timeoutId) clearTimeout(this.#timeoutId);\r\n this.#scrollSubscription?.unsubscribe();\r\n this.#clickScrollSubscription?.unsubscribe();\r\n };\r\n\r\n ngOnDestroy(): void {\r\n this.#disposeResources();\r\n }\r\n}\r\n","<div class=\"c-anchor-vertical\" [ngClass]=\"{ 'c-stop-scroll-propagation': !overScroll() }\" #wrapper>\r\n <div class=\"c-anchor-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n @if (!hideNav()) {\r\n <div class=\"c-anchor-list\" [style.flex-basis]=\"sidebarWidth()\">\r\n <anchor-nav\r\n [sections]=\"sections()\"\r\n [ellipsis]=\"ellipsis()\"\r\n [sidebarWidth]=\"sidebarWidth()\"\r\n [activeSectionId]=\"activeSectionId()\"\r\n [parentAutoId]=\"autoId()\"\r\n [color]=\"color()\"\r\n (clickSection)=\"scrollSectionByClick($event)\">\r\n </anchor-nav>\r\n </div>\r\n }\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["uuidv4"],"mappings":";;;;;;;;;;MAYa,YAAY,CAAA;AACvB,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAU;IAChC,IAAI,GAAG,KAAK,EAAsB;;AAElC,IAAA,GAAG,GAAG,KAAK,CAAqB,SAAS,CAAC;IAC1C,EAAE,GAAW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../../projects/sd-angular/components/anchor/src/components/anchor-item/anchor-item.component.ts","../../../projects/sd-angular/components/anchor/src/components/anchor-item/anchor-item.component.html","../../../projects/sd-angular/components/anchor/src/components/anchor-nav/anchor-nav.component.ts","../../../projects/sd-angular/components/anchor/src/components/anchor-nav/anchor-nav.component.html","../../../projects/sd-angular/components/anchor/src/components/anchor/anchor.component.ts","../../../projects/sd-angular/components/anchor/src/components/anchor/anchor.component.html","../../../projects/sd-angular/components/anchor/sd-angular-core-components-anchor.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\r\nimport { Component, ElementRef, effect, inject, input } from '@angular/core';\r\nimport { v4 as uuidv4 } from 'uuid';\r\nimport { IAnchorItem } from '../../models';\r\n\r\n@Component({\r\n selector: 'sd-anchor-item',\r\n templateUrl: './anchor-item.component.html',\r\n styleUrls: ['./anchor-item.component.scss'],\r\n imports: [CommonModule],\r\n standalone: true,\r\n})\r\nexport class SdAnchorItem implements IAnchorItem {\r\n title = input.required<string>();\r\n icon = input<string | undefined>();\r\n // Stable key dùng cho data-autoId. Nếu không truyền thì fallback về uuid (không stable giữa các lần render).\r\n key = input<string | undefined>(undefined);\r\n id: string = uuidv4();\r\n elementRef = inject(ElementRef);\r\n\r\n constructor() {\r\n effect(() => {\r\n if (this.title()) {\r\n this.elementRef.nativeElement.removeAttribute('title');\r\n }\r\n });\r\n }\r\n}\r\n","<section>\r\n <ng-content></ng-content>\r\n</section>\r\n","import { ChangeDetectionStrategy, Component, OnDestroy, computed, input, output } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatIconModule } from '@angular/material/icon';\nimport { Color } from '@sdcorejs/utils/models';\nimport { Subject, Subscription, debounceTime } from 'rxjs';\n\nimport { SdAnchorItem } from '../anchor-item/anchor-item.component';\n\n@Component({\n selector: 'anchor-nav',\n templateUrl: './anchor-nav.component.html',\n styleUrl: './anchor-nav.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CommonModule, MatIconModule],\n standalone: true,\n})\n// eslint-disable-next-line @angular-eslint/component-class-suffix\nexport class AnchorNav implements OnDestroy {\n sections = input.required<readonly SdAnchorItem[]>();\n activeSectionId = input<string>('');\n ellipsis = input<boolean>(false);\n sidebarWidth = input<string>('');\n // autoId được forward từ <sd-anchor>. Derive per-item autoId theo `key` của item (nếu có).\n parentAutoId = input<string | undefined | null>(undefined);\n color = input<Color>('primary');\n\n // CSS var binding cho active state — map SdColor → global token `--sd-{color}`.\n // SCSS đọc qua `var(--anchor-active-color)` cho border + text + icon.\n cssActiveVar = computed(() => `var(--sd-${this.color()})`);\n\n itemAutoId(section: SdAnchorItem): string | undefined {\n const parent = this.parentAutoId();\n const key = section.key();\n return parent && key ? `${parent}-${key}` : undefined;\n }\n\n clickSection = output<string>();\n\n #delay = 200;\n #clickSectionSubject = new Subject<string>();\n #subscription = new Subscription();\n\n constructor() {\n this.#subscription.add(\n this.#clickSectionSubject\n .pipe(debounceTime(this.#delay))\n .subscribe((id: string) => this.clickSection.emit(id))\n );\n }\n\n onClickSection = (id: string): void => {\n this.#clickSectionSubject.next(id);\n };\n\n ngOnDestroy(): void {\n this.#subscription.unsubscribe();\n }\n}\n","<div\r\n class=\"c-anchor-list\"\r\n [style.width]=\"sidebarWidth()\"\r\n [style.--anchor-active-color]=\"cssActiveVar()\">\r\n @for (section of sections(); track section.id) {\r\n <div\r\n class=\"c-anchor-list-item\"\r\n [class.active]=\"section.id === activeSectionId()\"\r\n (click)=\"onClickSection(section.id)\"\r\n (keydown.enter)=\"onClickSection(section.id)\"\r\n [attr.data-autoId]=\"itemAutoId(section)\"\r\n tabindex=\"0\">\r\n @if (section.icon()) {\r\n <mat-icon class=\"c-anchor-list-item-icon\">{{ section.icon() }}</mat-icon>\r\n }\r\n <div class=\"c-anchor-list-item-text\" [class.ellipsis]=\"ellipsis()\">\r\n {{ section.title() }}\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n OnDestroy,\r\n afterNextRender,\r\n booleanAttribute,\r\n computed,\r\n contentChildren,\r\n effect,\r\n input,\r\n signal,\r\n untracked,\r\n viewChild,\r\n} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { BrowserUtilities } from '@sdcorejs/utils/fns';\r\nimport { Color } from '@sdcorejs/utils/models';\r\nimport { Subscription, fromEvent, take } from 'rxjs';\r\nimport { AnchorNav } from '../anchor-nav/anchor-nav.component';\r\nimport { SdAnchorItem } from '../anchor-item/anchor-item.component';\r\n\r\n@Component({\r\n selector: 'sd-anchor',\r\n templateUrl: './anchor.component.html',\r\n styleUrls: ['./anchor.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [CommonModule, AnchorNav],\r\n standalone: true,\r\n})\r\nexport class SdAnchor implements OnDestroy {\r\n wrapper = viewChild.required<ElementRef>('wrapper');\r\n sections = contentChildren(SdAnchorItem);\r\n\r\n readonly autoIdInput = input<string | undefined | null>(undefined, { alias: 'autoId' });\r\n readonly autoId = computed(() => (this.autoIdInput() ? `components-anchor-${this.autoIdInput()}` : undefined));\r\n\r\n sidebarWidth = input<string>('200px');\r\n ellipsis = input(false, { transform: booleanAttribute });\r\n overScroll = input(false, { transform: booleanAttribute });\r\n // Mobile: default ẩn nav (sidebar TOC chiếm chỗ trên màn hình hẹp).\r\n // Consumer truyền `[hideNav]=\"false\"` để force hiện trên mobile.\r\n hideNav = input(BrowserUtilities.isMobile(), { transform: booleanAttribute });\r\n // Màu highlight active nav (text + icon + vertical bar). Default 'primary'.\r\n color = input<Color>('primary');\r\n\r\n activeSectionId = signal<string>('');\r\n\r\n #initialized = false;\r\n #isClickScrolling = false;\r\n #clickScrollSubscription: Subscription | null = null;\r\n #intersectionObserver: IntersectionObserver | null = null;\r\n #visibleSections = new Set<Element>();\r\n #timeoutId: ReturnType<typeof setTimeout> | null = null;\r\n\r\n #timeoutScrollFallback = 200;\r\n\r\n constructor() {\r\n afterNextRender(() => {\r\n this.#initialized = true;\r\n if (!this.hideNav()) {\r\n this.#registerIntersectionObserver();\r\n }\r\n });\r\n\r\n // Lắng nghe thay đổi sections để đăng ký lại observe section\r\n effect(() => {\r\n this.sections();\r\n if (!this.hideNav() && this.#initialized) {\r\n untracked(() => this.#registerIntersectionObserver());\r\n }\r\n });\r\n }\r\n\r\n #registerIntersectionObserver(): void {\r\n this.#cleanIntersectionObserver();\r\n const wrapperEl = this.wrapper().nativeElement;\r\n\r\n // Brower API IntersectionObserver sẽ hỗ trợ khi nào 1 section được hiện ra trong wrapperEl\r\n this.#intersectionObserver = new IntersectionObserver(\r\n entries => {\r\n for (const entry of entries) {\r\n if (entry.isIntersecting) {\r\n // Nếu section mới đi vào vùng nhìn thấy -> add vào set\r\n this.#visibleSections.add(entry.target);\r\n } else {\r\n // Nếu section đã đi ra khỏi vùng nhìn thấy -> xóa khỏi Set\r\n this.#visibleSections.delete(entry.target);\r\n }\r\n }\r\n\r\n // Nếu đang scroll bởi click section thì return luôn, k phải quét qua tìm vùng section được active\r\n if (this.#isClickScrolling) {\r\n return;\r\n }\r\n\r\n for (const section of this.sections()) {\r\n // Kiểm tra xem DOM của section nào đang nằm trong danh sách đang nhìn thấy để active chính xác\r\n if (this.#visibleSections.has(section.elementRef.nativeElement)) {\r\n if (this.activeSectionId() !== section.id) {\r\n this.activeSectionId.set(section.id);\r\n }\r\n break;\r\n }\r\n }\r\n },\r\n { root: wrapperEl, threshold: 0 }\r\n );\r\n\r\n // Đăng ký theo dõi từng section có trong anchor\r\n for (const section of this.sections()) {\r\n this.#intersectionObserver.observe(section.elementRef.nativeElement);\r\n }\r\n }\r\n\r\n scrollSectionByClick(idSectionTarget: string): void {\r\n this.activeSectionId.set(idSectionTarget);\r\n const targetSection = this.sections().find(s => s.id === idSectionTarget)?.elementRef;\r\n if (!targetSection) {\r\n return;\r\n }\r\n this.#cleanScrollSectionByClickObserver();\r\n this.#isClickScrolling = true;\r\n\r\n const wrapperEl = this.wrapper().nativeElement;\r\n const targetElement = targetSection.nativeElement;\r\n\r\n const prevScrollTop = wrapperEl.scrollTop; // Lưu lại vị trí cuộn hiện tại của container\r\n const scrollTop = prevScrollTop + targetElement.getBoundingClientRect().top - wrapperEl.getBoundingClientRect().top; // Vị trí section cần scroll tới\r\n\r\n // Đăng ký sự kiện nếu đã được scroll xong\r\n this.#clickScrollSubscription = fromEvent(wrapperEl, 'scrollend')\r\n .pipe(take(1))\r\n .subscribe(() => {\r\n this.#isClickScrolling = false;\r\n });\r\n\r\n // Nếu sectionTarget đã ở đúng vị trí (click nhưng không scroll) thì sau #timeoutScrollFallback kích hoạt lại IntersectionObserver\r\n this.#timeoutId = setTimeout(() => {\r\n if (wrapperEl.scrollTop === prevScrollTop) {\r\n this.#isClickScrolling = false;\r\n this.#clickScrollSubscription?.unsubscribe();\r\n }\r\n }, this.#timeoutScrollFallback);\r\n\r\n wrapperEl.scrollTo({ top: scrollTop, behavior: 'smooth' });\r\n }\r\n\r\n #cleanScrollSectionByClickObserver = (): void => {\r\n if (this.#timeoutId) {\r\n clearTimeout(this.#timeoutId);\r\n }\r\n this.#clickScrollSubscription?.unsubscribe();\r\n };\r\n\r\n #cleanIntersectionObserver = (): void => {\r\n this.#intersectionObserver?.disconnect();\r\n this.#visibleSections.clear();\r\n };\r\n\r\n ngOnDestroy(): void {\r\n this.#cleanScrollSectionByClickObserver();\r\n this.#cleanIntersectionObserver();\r\n }\r\n}\r\n","<div class=\"c-anchor-vertical\" [ngClass]=\"{ 'c-stop-scroll-propagation': !overScroll() }\" #wrapper>\r\n <div class=\"c-anchor-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n @if (!hideNav()) {\r\n <div class=\"c-anchor-list\" [style.flex-basis]=\"sidebarWidth()\">\r\n <anchor-nav\r\n [sections]=\"sections()\"\r\n [ellipsis]=\"ellipsis()\"\r\n [sidebarWidth]=\"sidebarWidth()\"\r\n [activeSectionId]=\"activeSectionId()\"\r\n [parentAutoId]=\"autoId()\"\r\n [color]=\"color()\"\r\n (clickSection)=\"scrollSectionByClick($event)\">\r\n </anchor-nav>\r\n </div>\r\n }\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["uuidv4"],"mappings":";;;;;;;;;;MAYa,YAAY,CAAA;AACvB,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAU;IAChC,IAAI,GAAG,KAAK,EAAsB;;AAElC,IAAA,GAAG,GAAG,KAAK,CAAqB,SAAS,CAAC;IAC1C,EAAE,GAAWA,EAAM,EAAE;AACrB,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAE/B,IAAA,WAAA,GAAA;QACE,MAAM,CAAC,MAAK;AACV,YAAA,IAAI,IAAI,CAAC,KAAK,EAAE,EAAE;gBAChB,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,eAAe,CAAC,OAAO,CAAC;YACxD;AACF,QAAA,CAAC,CAAC;IACJ;wGAdW,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,GAAA,EAAA,EAAA,iBAAA,EAAA,KAAA,EAAA,UAAA,EAAA,KAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,Q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