@sd-angular/core 19.0.0-beta.54 → 19.0.0-beta.56

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 (70) hide show
  1. package/assets/scss/core/form.scss +4 -1
  2. package/components/button/src/button.component.d.ts +5 -1
  3. package/components/document-builder/src/document-builder.component.d.ts +3 -14
  4. package/components/document-builder/src/document-builder.model.d.ts +4 -1
  5. package/components/document-builder/src/plugins/ck-comment/ck-comment.plugin.model.d.ts +1 -0
  6. package/components/document-builder/src/plugins/variable/variable.plugin.d.ts +39 -0
  7. package/components/section/src/section.component.d.ts +10 -11
  8. package/components/table/src/components/desktop-cell/desktop-cell.component.d.ts +12 -2
  9. package/components/table/src/components/desktop-cell-view/desktop-cell-view.component.d.ts +12 -2
  10. package/components/table/src/components/selector-action/selector-action.component.d.ts +5 -3
  11. package/components/table/src/models/table-column.model.d.ts +1 -0
  12. package/components/table/src/models/table-option-config.model.d.ts +5 -0
  13. package/fesm2022/sd-angular-core-components-badge.mjs +11 -11
  14. package/fesm2022/sd-angular-core-components-badge.mjs.map +1 -1
  15. package/fesm2022/sd-angular-core-components-button.mjs +8 -2
  16. package/fesm2022/sd-angular-core-components-button.mjs.map +1 -1
  17. package/fesm2022/sd-angular-core-components-document-builder.mjs +458 -186
  18. package/fesm2022/sd-angular-core-components-document-builder.mjs.map +1 -1
  19. package/fesm2022/sd-angular-core-components-import-excel.mjs +1 -1
  20. package/fesm2022/sd-angular-core-components-import-excel.mjs.map +1 -1
  21. package/fesm2022/sd-angular-core-components-preview.mjs +1 -1
  22. package/fesm2022/sd-angular-core-components-preview.mjs.map +1 -1
  23. package/fesm2022/sd-angular-core-components-section.mjs +24 -42
  24. package/fesm2022/sd-angular-core-components-section.mjs.map +1 -1
  25. package/fesm2022/sd-angular-core-components-table.mjs +88 -26
  26. package/fesm2022/sd-angular-core-components-table.mjs.map +1 -1
  27. package/fesm2022/sd-angular-core-components-upload-file.mjs +1 -1
  28. package/fesm2022/sd-angular-core-components-upload-file.mjs.map +1 -1
  29. package/fesm2022/sd-angular-core-components-workflow.mjs +36 -36
  30. package/fesm2022/sd-angular-core-components-workflow.mjs.map +1 -1
  31. package/fesm2022/sd-angular-core-forms-chip-calendar.mjs +5 -2
  32. package/fesm2022/sd-angular-core-forms-chip-calendar.mjs.map +1 -1
  33. package/fesm2022/sd-angular-core-forms-chip.mjs +5 -2
  34. package/fesm2022/sd-angular-core-forms-chip.mjs.map +1 -1
  35. package/fesm2022/sd-angular-core-forms-date-range.mjs +4 -3
  36. package/fesm2022/sd-angular-core-forms-date-range.mjs.map +1 -1
  37. package/fesm2022/sd-angular-core-forms-date.mjs +4 -3
  38. package/fesm2022/sd-angular-core-forms-date.mjs.map +1 -1
  39. package/fesm2022/sd-angular-core-forms-datetime.mjs +4 -3
  40. package/fesm2022/sd-angular-core-forms-datetime.mjs.map +1 -1
  41. package/fesm2022/sd-angular-core-forms-input-number.mjs +3 -2
  42. package/fesm2022/sd-angular-core-forms-input-number.mjs.map +1 -1
  43. package/fesm2022/sd-angular-core-forms-input.mjs +6 -4
  44. package/fesm2022/sd-angular-core-forms-input.mjs.map +1 -1
  45. package/fesm2022/sd-angular-core-forms-select.mjs +3 -2
  46. package/fesm2022/sd-angular-core-forms-select.mjs.map +1 -1
  47. package/fesm2022/sd-angular-core-forms-textarea.mjs +3 -2
  48. package/fesm2022/sd-angular-core-forms-textarea.mjs.map +1 -1
  49. package/fesm2022/sd-angular-core-modules-layout.mjs +23 -31
  50. package/fesm2022/sd-angular-core-modules-layout.mjs.map +1 -1
  51. package/fesm2022/sd-angular-core-services-confirm.mjs +1 -1
  52. package/fesm2022/sd-angular-core-services-confirm.mjs.map +1 -1
  53. package/fesm2022/sd-angular-core-services-notify.mjs.map +1 -1
  54. package/forms/chip/src/chip.component.d.ts +3 -2
  55. package/forms/chip-calendar/src/chip-calendar.component.d.ts +3 -2
  56. package/forms/date/src/date.component.d.ts +3 -2
  57. package/forms/date-range/src/date-range.component.d.ts +3 -2
  58. package/forms/datetime/src/datetime.component.d.ts +3 -2
  59. package/forms/input/src/input.component.d.ts +3 -2
  60. package/forms/input-number/src/input-number.component.d.ts +3 -2
  61. package/forms/select/src/select.component.d.ts +4 -3
  62. package/forms/textarea/src/textarea.component.d.ts +3 -2
  63. package/modules/layout/components/page/page.component.d.ts +5 -7
  64. package/modules/layout/pipes/high-light-search.pipe.d.ts +1 -1
  65. package/package.json +42 -42
  66. package/sd-angular-core-19.0.0-beta.56.tgz +0 -0
  67. package/services/notify/index.d.ts +1 -0
  68. package/services/notify/src/notify.model.d.ts +1 -1
  69. package/services/notify/src/notify.service.d.ts +5 -5
  70. package/sd-angular-core-19.0.0-beta.54.tgz +0 -0
@@ -1,62 +1,44 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Input, Component } from '@angular/core';
2
+ import { inject, ElementRef, input, model, booleanAttribute, effect, Component } from '@angular/core';
3
3
  import * as i1 from '@angular/material/icon';
4
4
  import { MatIconModule } from '@angular/material/icon';
5
5
  import { SdBaseSecureComponent } from '@sd-angular/core/components/base';
6
6
 
7
7
  /* eslint-disable @angular-eslint/no-input-rename */
8
8
  class SdSection extends SdBaseSecureComponent {
9
- title; // Tiêu đề của section
10
- subTitle; // sub Tiêu đề của section
11
- icon;
12
- iconColor = 'primary'; // Màu sắc của icon, mặc định 'primary'
13
- collapsed = false;
14
- set _collapsed(val) {
15
- this.collapsed = val === '' || !!val;
16
- }
17
- collapsable = false;
18
- set _collapsable(val) {
19
- this.collapsable = val === '' || !!val;
20
- }
21
- hideHeader = false;
22
- set _hideHeader(val) {
23
- this.hideHeader = val === '' || !!val;
9
+ el = inject(ElementRef);
10
+ title = input('', { alias: 'title' });
11
+ subTitle = input('', { alias: 'subTitle' });
12
+ icon = input(null, { alias: 'icon' });
13
+ iconColor = input('primary', { alias: 'iconColor' });
14
+ collapsed = model(false, { alias: 'collapsed' });
15
+ collapsable = input(false, { transform: booleanAttribute, alias: 'collapsable' });
16
+ hideHeader = input(false, { transform: booleanAttribute, alias: 'hideHeader' });
17
+ constructor() {
18
+ super();
19
+ effect(() => {
20
+ if (this.title()) {
21
+ this.el.nativeElement.removeAttribute('title');
22
+ }
23
+ });
24
24
  }
25
25
  toggleCollapse = () => {
26
- if (this.collapsable) {
27
- this.collapsed = !this.collapsed;
26
+ if (this.collapsable()) {
27
+ this.collapsed.set(!this.collapsed());
28
28
  }
29
29
  else {
30
- if (this.collapsed) {
31
- this.collapsed = false;
30
+ if (this.collapsed()) {
31
+ this.collapsed.set(false);
32
32
  }
33
33
  }
34
34
  };
35
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdSection, deps: null, target: i0.ɵɵFactoryTarget.Component });
36
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: SdSection, isStandalone: true, selector: "sd-section", inputs: { title: "title", subTitle: "subTitle", icon: "icon", iconColor: "iconColor", _collapsed: ["collapsed", "_collapsed"], _collapsable: ["collapsable", "_collapsable"], _hideHeader: ["hideHeader", "_hideHeader"] }, usesInheritance: true, ngImport: i0, template: "<div class=\"rounded-8 bg-white\" [class]=\"{ 'c-shadow-section': !collapsed }\">\r\n @if (!hideHeader) {\r\n <div\r\n class=\"d-flex align-items-center justify-content-between w-full px-16 py-8 cursor-pointer\"\r\n (click)=\"toggleCollapse()\"\r\n aria-hidden=\"true\">\r\n <div class=\"d-flex align-items-center\">\r\n @if (icon) {\r\n <span\r\n class=\"mr-8 material-icons-outlined\"\r\n [class.text-primary]=\"iconColor === 'primary'\"\r\n [class.text-secondary]=\"iconColor === 'secondary'\"\r\n [class.text-error]=\"iconColor === 'error'\"\r\n [class.text-warning]=\"iconColor === 'warning'\"\r\n [class.text-success]=\"iconColor === 'success'\">\r\n {{ icon }}\r\n </span>\r\n }\r\n <div>\r\n @if (title) {\r\n <div class=\"T16M\">{{ title }}</div>\r\n }\r\n @if (subTitle) {\r\n <div class=\"T12R text-secondary\">{{ subTitle }}</div>\r\n }\r\n </div>\r\n </div>\r\n <div class=\"d-flex\">\r\n <ng-content select=\"[sdHeaderRight]\"></ng-content>\r\n @if (collapsable) {\r\n <div class=\"d-flex align-items-center\">\r\n @if (collapsed) {\r\n <mat-icon>expand_more</mat-icon>\r\n } @else {\r\n <mat-icon>expand_less</mat-icon>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n @if (!collapsed || hideHeader) {\r\n <!-- N\u1EBFu header b\u1ECB \u1EA9n th\u00EC kh\u00F4ng c\u1EA7n border top -->\r\n <div class=\"p-16 no-padding\" [style.border-top]=\"hideHeader ? 'none' : '1px solid #e6e6e6'\">\r\n <ng-content></ng-content>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{width:100%;display:block}.c-shadow-section{box-shadow:-1px 0 #f2f2f2 inset,1px 0 #f2f2f2 inset,0 1px #f2f2f2 inset,0 -1px #f2f2f2 inset,0 1px 2px #2f31361a}.cursor-pointer{cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
35
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdSection, deps: [], target: i0.ɵɵFactoryTarget.Component });
36
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: SdSection, isStandalone: true, selector: "sd-section", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, subTitle: { classPropertyName: "subTitle", publicName: "subTitle", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconColor: { classPropertyName: "iconColor", publicName: "iconColor", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, collapsable: { classPropertyName: "collapsable", publicName: "collapsable", isSignal: true, isRequired: false, transformFunction: null }, hideHeader: { classPropertyName: "hideHeader", publicName: "hideHeader", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsed: "collapsedChange" }, usesInheritance: true, ngImport: i0, template: "<div class=\"rounded-8 bg-white\" [class]=\"{ 'c-shadow-section': !collapsed() }\">\r\n @if (!hideHeader()) {\r\n <div\r\n class=\"d-flex align-items-center justify-content-between w-full px-16 py-8 cursor-pointer\"\r\n (click)=\"toggleCollapse()\"\r\n aria-hidden=\"true\">\r\n <div class=\"d-flex align-items-center\">\r\n <ng-content select=\"[sdHeaderLeft]\">\r\n @if (icon()) {\r\n <span\r\n class=\"mr-8 material-icons-outlined\"\r\n [class.text-primary]=\"iconColor() === 'primary'\"\r\n [class.text-secondary]=\"iconColor() === 'secondary'\"\r\n [class.text-error]=\"iconColor() === 'error'\"\r\n [class.text-warning]=\"iconColor() === 'warning'\"\r\n [class.text-success]=\"iconColor() === 'success'\">\r\n {{ icon() }}\r\n </span>\r\n }\r\n <div>\r\n @if (title()) {\r\n <div class=\"T16M\">{{ title() }}</div>\r\n }\r\n @if (subTitle()) {\r\n <div class=\"T12R text-secondary\">{{ subTitle() }}</div>\r\n }\r\n </div>\r\n </ng-content>\r\n </div>\r\n <div class=\"d-flex\">\r\n <ng-content select=\"[sdHeaderRight]\"></ng-content>\r\n @if (collapsable()) {\r\n <div class=\"d-flex align-items-center\">\r\n @if (collapsed()) {\r\n <mat-icon>expand_more</mat-icon>\r\n } @else {\r\n <mat-icon>expand_less</mat-icon>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n @if (!collapsed() || hideHeader()) {\r\n <!-- N\u1EBFu header b\u1ECB \u1EA9n th\u00EC kh\u00F4ng c\u1EA7n border top -->\r\n <div class=\"p-16 no-padding\" [style.border-top]=\"hideHeader() ? 'none' : '1px solid #e6e6e6'\">\r\n <ng-content></ng-content>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{width:100%;display:block}.c-shadow-section{box-shadow:-1px 0 #f2f2f2 inset,1px 0 #f2f2f2 inset,0 1px #f2f2f2 inset,0 -1px #f2f2f2 inset,0 1px 2px #2f31361a}.cursor-pointer{cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
37
37
  }
38
38
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdSection, decorators: [{
39
39
  type: Component,
40
- args: [{ selector: 'sd-section', imports: [MatIconModule], template: "<div class=\"rounded-8 bg-white\" [class]=\"{ 'c-shadow-section': !collapsed }\">\r\n @if (!hideHeader) {\r\n <div\r\n class=\"d-flex align-items-center justify-content-between w-full px-16 py-8 cursor-pointer\"\r\n (click)=\"toggleCollapse()\"\r\n aria-hidden=\"true\">\r\n <div class=\"d-flex align-items-center\">\r\n @if (icon) {\r\n <span\r\n class=\"mr-8 material-icons-outlined\"\r\n [class.text-primary]=\"iconColor === 'primary'\"\r\n [class.text-secondary]=\"iconColor === 'secondary'\"\r\n [class.text-error]=\"iconColor === 'error'\"\r\n [class.text-warning]=\"iconColor === 'warning'\"\r\n [class.text-success]=\"iconColor === 'success'\">\r\n {{ icon }}\r\n </span>\r\n }\r\n <div>\r\n @if (title) {\r\n <div class=\"T16M\">{{ title }}</div>\r\n }\r\n @if (subTitle) {\r\n <div class=\"T12R text-secondary\">{{ subTitle }}</div>\r\n }\r\n </div>\r\n </div>\r\n <div class=\"d-flex\">\r\n <ng-content select=\"[sdHeaderRight]\"></ng-content>\r\n @if (collapsable) {\r\n <div class=\"d-flex align-items-center\">\r\n @if (collapsed) {\r\n <mat-icon>expand_more</mat-icon>\r\n } @else {\r\n <mat-icon>expand_less</mat-icon>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n @if (!collapsed || hideHeader) {\r\n <!-- N\u1EBFu header b\u1ECB \u1EA9n th\u00EC kh\u00F4ng c\u1EA7n border top -->\r\n <div class=\"p-16 no-padding\" [style.border-top]=\"hideHeader ? 'none' : '1px solid #e6e6e6'\">\r\n <ng-content></ng-content>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{width:100%;display:block}.c-shadow-section{box-shadow:-1px 0 #f2f2f2 inset,1px 0 #f2f2f2 inset,0 1px #f2f2f2 inset,0 -1px #f2f2f2 inset,0 1px 2px #2f31361a}.cursor-pointer{cursor:pointer}\n"] }]
41
- }], propDecorators: { title: [{
42
- type: Input,
43
- args: [{ required: true }]
44
- }], subTitle: [{
45
- type: Input
46
- }], icon: [{
47
- type: Input
48
- }], iconColor: [{
49
- type: Input
50
- }], _collapsed: [{
51
- type: Input,
52
- args: ['collapsed']
53
- }], _collapsable: [{
54
- type: Input,
55
- args: ['collapsable']
56
- }], _hideHeader: [{
57
- type: Input,
58
- args: ['hideHeader']
59
- }] } });
40
+ args: [{ selector: 'sd-section', imports: [MatIconModule], template: "<div class=\"rounded-8 bg-white\" [class]=\"{ 'c-shadow-section': !collapsed() }\">\r\n @if (!hideHeader()) {\r\n <div\r\n class=\"d-flex align-items-center justify-content-between w-full px-16 py-8 cursor-pointer\"\r\n (click)=\"toggleCollapse()\"\r\n aria-hidden=\"true\">\r\n <div class=\"d-flex align-items-center\">\r\n <ng-content select=\"[sdHeaderLeft]\">\r\n @if (icon()) {\r\n <span\r\n class=\"mr-8 material-icons-outlined\"\r\n [class.text-primary]=\"iconColor() === 'primary'\"\r\n [class.text-secondary]=\"iconColor() === 'secondary'\"\r\n [class.text-error]=\"iconColor() === 'error'\"\r\n [class.text-warning]=\"iconColor() === 'warning'\"\r\n [class.text-success]=\"iconColor() === 'success'\">\r\n {{ icon() }}\r\n </span>\r\n }\r\n <div>\r\n @if (title()) {\r\n <div class=\"T16M\">{{ title() }}</div>\r\n }\r\n @if (subTitle()) {\r\n <div class=\"T12R text-secondary\">{{ subTitle() }}</div>\r\n }\r\n </div>\r\n </ng-content>\r\n </div>\r\n <div class=\"d-flex\">\r\n <ng-content select=\"[sdHeaderRight]\"></ng-content>\r\n @if (collapsable()) {\r\n <div class=\"d-flex align-items-center\">\r\n @if (collapsed()) {\r\n <mat-icon>expand_more</mat-icon>\r\n } @else {\r\n <mat-icon>expand_less</mat-icon>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n @if (!collapsed() || hideHeader()) {\r\n <!-- N\u1EBFu header b\u1ECB \u1EA9n th\u00EC kh\u00F4ng c\u1EA7n border top -->\r\n <div class=\"p-16 no-padding\" [style.border-top]=\"hideHeader() ? 'none' : '1px solid #e6e6e6'\">\r\n <ng-content></ng-content>\r\n </div>\r\n }\r\n</div>\r\n", styles: [":host{width:100%;display:block}.c-shadow-section{box-shadow:-1px 0 #f2f2f2 inset,1px 0 #f2f2f2 inset,0 1px #f2f2f2 inset,0 -1px #f2f2f2 inset,0 1px 2px #2f31361a}.cursor-pointer{cursor:pointer}\n"] }]
41
+ }], ctorParameters: () => [] });
60
42
 
61
43
  /**
62
44
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"sd-angular-core-components-section.mjs","sources":["../../../projects/sd-angular/components/section/src/section.component.ts","../../../projects/sd-angular/components/section/src/section.component.html","../../../projects/sd-angular/components/section/sd-angular-core-components-section.ts"],"sourcesContent":["/* eslint-disable @angular-eslint/no-input-rename */\r\nimport { Component, Input } from '@angular/core';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { SdBaseSecureComponent } from '@sd-angular/core/components/base';\r\nimport { SdColor } from '@sd-angular/core/utilities';\r\n\r\n@Component({\r\n selector: 'sd-section',\r\n templateUrl: './section.component.html',\r\n styleUrls: ['./section.component.scss'],\r\n imports: [MatIconModule],\r\n})\r\nexport class SdSection extends SdBaseSecureComponent {\r\n @Input({ required: true }) title?: string | null; // Tiêu đề của section\r\n @Input() subTitle?: string; // sub Tiêu đề của section\r\n\r\n @Input() icon?: string | null;\r\n @Input() iconColor?: SdColor = 'primary'; // Màu sắc của icon, mặc định là 'primary'\r\n collapsed = false;\r\n @Input('collapsed') set _collapsed(val: boolean | '' | undefined | null) {\r\n this.collapsed = val === '' || !!val;\r\n }\r\n collapsable = false;\r\n @Input('collapsable') set _collapsable(val: boolean | '' | undefined | null) {\r\n this.collapsable = val === '' || !!val;\r\n }\r\n\r\n hideHeader = false;\r\n @Input('hideHeader') set _hideHeader(val: boolean | '' | undefined | null) {\r\n this.hideHeader = val === '' || !!val;\r\n }\r\n toggleCollapse = () => {\r\n if (this.collapsable) {\r\n this.collapsed = !this.collapsed;\r\n } else {\r\n if (this.collapsed) {\r\n this.collapsed = false;\r\n }\r\n }\r\n };\r\n}\r\n","<div class=\"rounded-8 bg-white\" [class]=\"{ 'c-shadow-section': !collapsed }\">\r\n @if (!hideHeader) {\r\n <div\r\n class=\"d-flex align-items-center justify-content-between w-full px-16 py-8 cursor-pointer\"\r\n (click)=\"toggleCollapse()\"\r\n aria-hidden=\"true\">\r\n <div class=\"d-flex align-items-center\">\r\n @if (icon) {\r\n <span\r\n class=\"mr-8 material-icons-outlined\"\r\n [class.text-primary]=\"iconColor === 'primary'\"\r\n [class.text-secondary]=\"iconColor === 'secondary'\"\r\n [class.text-error]=\"iconColor === 'error'\"\r\n [class.text-warning]=\"iconColor === 'warning'\"\r\n [class.text-success]=\"iconColor === 'success'\">\r\n {{ icon }}\r\n </span>\r\n }\r\n <div>\r\n @if (title) {\r\n <div class=\"T16M\">{{ title }}</div>\r\n }\r\n @if (subTitle) {\r\n <div class=\"T12R text-secondary\">{{ subTitle }}</div>\r\n }\r\n </div>\r\n </div>\r\n <div class=\"d-flex\">\r\n <ng-content select=\"[sdHeaderRight]\"></ng-content>\r\n @if (collapsable) {\r\n <div class=\"d-flex align-items-center\">\r\n @if (collapsed) {\r\n <mat-icon>expand_more</mat-icon>\r\n } @else {\r\n <mat-icon>expand_less</mat-icon>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n @if (!collapsed || hideHeader) {\r\n <!-- Nếu header bị ẩn thì không cần border top -->\r\n <div class=\"p-16 no-padding\" [style.border-top]=\"hideHeader ? 'none' : '1px solid #e6e6e6'\">\r\n <ng-content></ng-content>\r\n </div>\r\n }\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;AAYM,MAAO,SAAU,SAAQ,qBAAqB,CAAA;IACvB,KAAK,CAAiB;IACxC,QAAQ,CAAU;AAElB,IAAA,IAAI;AACJ,IAAA,SAAS,GAAa,SAAS,CAAC;IACzC,SAAS,GAAG,KAAK;IACjB,IAAwB,UAAU,CAAC,GAAoC,EAAA;QACrE,IAAI,CAAC,SAAS,GAAG,GAAG,KAAK,EAAE,IAAI,CAAC,CAAC,GAAG;IACtC;IACA,WAAW,GAAG,KAAK;IACnB,IAA0B,YAAY,CAAC,GAAoC,EAAA;QACzE,IAAI,CAAC,WAAW,GAAG,GAAG,KAAK,EAAE,IAAI,CAAC,CAAC,GAAG;IACxC;IAEA,UAAU,GAAG,KAAK;IAClB,IAAyB,WAAW,CAAC,GAAoC,EAAA;QACvE,IAAI,CAAC,UAAU,GAAG,GAAG,KAAK,EAAE,IAAI,CAAC,CAAC,GAAG;IACvC;IACA,cAAc,GAAG,MAAK;AACpB,QAAA,IAAI,IAAI,CAAC,WAAW,EAAE;AACpB,YAAA,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,SAAS;QAClC;aAAO;AACL,YAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAClB,gBAAA,IAAI,CAAC,SAAS,GAAG,KAAK;YACxB;QACF;AACF,IAAA,CAAC;wGA3BU,SAAS,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAT,SAAS,EAAA,YAAA,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AC,YAAY;;;AE5BrB;;AAEG;;;;"}
1
+ {"version":3,"file":"sd-angular-core-components-section.mjs","sources":["../../../projects/sd-angular/components/section/src/section.component.ts","../../../projects/sd-angular/components/section/src/section.component.html","../../../projects/sd-angular/components/section/sd-angular-core-components-section.ts"],"sourcesContent":["/* eslint-disable @angular-eslint/no-input-rename */\r\nimport { booleanAttribute, Component, effect, ElementRef, inject, input, model } from '@angular/core';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { SdBaseSecureComponent } from '@sd-angular/core/components/base';\r\nimport { SdColor } from '@sd-angular/core/utilities';\r\n\r\n@Component({\r\n selector: 'sd-section',\r\n templateUrl: './section.component.html',\r\n styleUrls: ['./section.component.scss'],\r\n imports: [MatIconModule],\r\n})\r\nexport class SdSection extends SdBaseSecureComponent {\r\n private el = inject(ElementRef);\r\n\r\n title = input<string | null>('', { alias: 'title' });\r\n subTitle = input<string>('', { alias: 'subTitle' });\r\n icon = input<string | null>(null, { alias: 'icon' });\r\n iconColor = input<SdColor>('primary', { alias: 'iconColor' });\r\n\r\n collapsed = model<boolean>(false, { alias: 'collapsed' });\r\n collapsable = input(false, { transform: booleanAttribute, alias: 'collapsable' });\r\n hideHeader = input(false, { transform: booleanAttribute, alias: 'hideHeader' });\r\n\r\n constructor() {\r\n super();\r\n effect(() => {\r\n if (this.title()) {\r\n this.el.nativeElement.removeAttribute('title');\r\n }\r\n });\r\n }\r\n\r\n toggleCollapse = () => {\r\n if (this.collapsable()) {\r\n this.collapsed.set(!this.collapsed());\r\n } else {\r\n if (this.collapsed()) {\r\n this.collapsed.set(false);\r\n }\r\n }\r\n };\r\n}\r\n","<div class=\"rounded-8 bg-white\" [class]=\"{ 'c-shadow-section': !collapsed() }\">\r\n @if (!hideHeader()) {\r\n <div\r\n class=\"d-flex align-items-center justify-content-between w-full px-16 py-8 cursor-pointer\"\r\n (click)=\"toggleCollapse()\"\r\n aria-hidden=\"true\">\r\n <div class=\"d-flex align-items-center\">\r\n <ng-content select=\"[sdHeaderLeft]\">\r\n @if (icon()) {\r\n <span\r\n class=\"mr-8 material-icons-outlined\"\r\n [class.text-primary]=\"iconColor() === 'primary'\"\r\n [class.text-secondary]=\"iconColor() === 'secondary'\"\r\n [class.text-error]=\"iconColor() === 'error'\"\r\n [class.text-warning]=\"iconColor() === 'warning'\"\r\n [class.text-success]=\"iconColor() === 'success'\">\r\n {{ icon() }}\r\n </span>\r\n }\r\n <div>\r\n @if (title()) {\r\n <div class=\"T16M\">{{ title() }}</div>\r\n }\r\n @if (subTitle()) {\r\n <div class=\"T12R text-secondary\">{{ subTitle() }}</div>\r\n }\r\n </div>\r\n </ng-content>\r\n </div>\r\n <div class=\"d-flex\">\r\n <ng-content select=\"[sdHeaderRight]\"></ng-content>\r\n @if (collapsable()) {\r\n <div class=\"d-flex align-items-center\">\r\n @if (collapsed()) {\r\n <mat-icon>expand_more</mat-icon>\r\n } @else {\r\n <mat-icon>expand_less</mat-icon>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n @if (!collapsed() || hideHeader()) {\r\n <!-- Nếu header bị ẩn thì không cần border top -->\r\n <div class=\"p-16 no-padding\" [style.border-top]=\"hideHeader() ? 'none' : '1px solid #e6e6e6'\">\r\n <ng-content></ng-content>\r\n </div>\r\n }\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;AAYM,MAAO,SAAU,SAAQ,qBAAqB,CAAA;AAC1C,IAAA,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC;IAE/B,KAAK,GAAG,KAAK,CAAgB,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;IACpD,QAAQ,GAAG,KAAK,CAAS,EAAE,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;IACnD,IAAI,GAAG,KAAK,CAAgB,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IACpD,SAAS,GAAG,KAAK,C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