@sd-angular/core 19.0.3 → 19.0.5
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.
- package/README.md +13 -8
- package/assets/{scss/README.md → STYLE-GUIDE.md} +3 -0
- package/components/button/src/button.component.d.ts +1 -2
- package/components/form-generic/src/components/form-builder/form-builder.component.d.ts +1 -2
- package/components/form-generic/src/components/form-render/form-render.component.d.ts +1 -2
- package/components/form-generic/src/components/sd-feel-expression/sd-feel-expression.component.d.ts +1 -2
- package/components/index.d.ts +2 -0
- package/components/org-chart/index.d.ts +3 -0
- package/components/org-chart/src/org-chart-item-def.directive.d.ts +9 -0
- package/components/org-chart/src/org-chart.component.d.ts +26 -0
- package/components/org-chart/src/org-chart.model.d.ts +32 -0
- package/components/query-bar/src/query-bar.component.d.ts +15 -2
- package/components/query-bar/src/query-bar.model.d.ts +22 -0
- package/components/query-builder/index.d.ts +2 -0
- package/components/query-builder/src/query-builder.component.d.ts +115 -22
- package/components/query-builder/src/query-builder.model.d.ts +166 -0
- package/components/query-builder/src/query-builder.serializer.d.ts +32 -0
- package/components/section/src/section.component.d.ts +5 -3
- package/components/side-drawer/src/side-drawer.component.d.ts +1 -2
- package/components/splitter/src/splitter.component.d.ts +8 -2
- package/components/splitter/src/splitter.models.d.ts +13 -0
- package/components/stepper/src/stepper.component.d.ts +1 -2
- package/components/tab/src/tab-group.component.d.ts +1 -2
- package/components/table/src/services/table-filter/table-filter.model.d.ts +2 -0
- package/components/table/src/table.component.d.ts +1 -2
- package/components/tree/index.d.ts +3 -0
- package/components/tree/src/tree-item-def.directive.d.ts +9 -0
- package/components/tree/src/tree.component.d.ts +102 -0
- package/components/tree/src/tree.model.d.ts +142 -0
- package/components/upload-file/src/upload-file.component.d.ts +2 -0
- package/fesm2022/sd-angular-core-components-button.mjs +2 -4
- package/fesm2022/sd-angular-core-components-button.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-form-generic.mjs +7 -11
- package/fesm2022/sd-angular-core-components-form-generic.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-modal-resizable.mjs +5 -5
- package/fesm2022/sd-angular-core-components-modal-resizable.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-org-chart.mjs +110 -0
- package/fesm2022/sd-angular-core-components-org-chart.mjs.map +1 -0
- package/fesm2022/sd-angular-core-components-query-bar.mjs +37 -8
- package/fesm2022/sd-angular-core-components-query-bar.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-query-builder.mjs +867 -57
- package/fesm2022/sd-angular-core-components-query-builder.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-section.mjs +8 -7
- package/fesm2022/sd-angular-core-components-section.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-side-drawer.mjs +2 -4
- package/fesm2022/sd-angular-core-components-side-drawer.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-splitter.mjs +23 -12
- package/fesm2022/sd-angular-core-components-splitter.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-stepper.mjs +2 -4
- package/fesm2022/sd-angular-core-components-stepper.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-tab.mjs +2 -4
- package/fesm2022/sd-angular-core-components-tab.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-table.mjs +8 -6
- package/fesm2022/sd-angular-core-components-table.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components-tree.mjs +526 -0
- package/fesm2022/sd-angular-core-components-tree.mjs.map +1 -0
- package/fesm2022/sd-angular-core-components-upload-file.mjs +15 -4
- package/fesm2022/sd-angular-core-components-upload-file.mjs.map +1 -1
- package/fesm2022/sd-angular-core-components.mjs +2 -0
- package/fesm2022/sd-angular-core-components.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-autocomplete.mjs +9 -4
- package/fesm2022/sd-angular-core-forms-autocomplete.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-input-number.mjs +9 -3
- package/fesm2022/sd-angular-core-forms-input-number.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-input.mjs +2 -2
- package/fesm2022/sd-angular-core-forms-input.mjs.map +1 -1
- package/fesm2022/sd-angular-core-forms-select.mjs +33 -3
- package/fesm2022/sd-angular-core-forms-select.mjs.map +1 -1
- package/fesm2022/sd-angular-core-services-notify.mjs +26 -8
- package/fesm2022/sd-angular-core-services-notify.mjs.map +1 -1
- package/forms/select/src/select.component.d.ts +9 -1
- package/package.json +81 -73
- package/sd-angular-core-19.0.5.tgz +0 -0
- package/services/notify/src/components/toast/toast.component.d.ts +12 -1
- package/services/notify/src/notify.model.d.ts +17 -0
- package/sd-angular-core-19.0.3.tgz +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { viewChild, input, booleanAttribute, output, inject,
|
|
2
|
+
import { viewChild, input, booleanAttribute, output, inject, ChangeDetectorRef, DestroyRef, signal, afterNextRender, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
import * as i3 from '@angular/cdk/portal';
|
|
4
4
|
import { CdkPortal, DomPortalOutlet, PortalModule } from '@angular/cdk/portal';
|
|
5
5
|
import { CommonModule } from '@angular/common';
|
|
@@ -18,9 +18,6 @@ class SdModalResizable {
|
|
|
18
18
|
width = input('480px');
|
|
19
19
|
editingChanged = output();
|
|
20
20
|
#embeddedViewRef;
|
|
21
|
-
#viewContainerRef = inject(ViewContainerRef);
|
|
22
|
-
#ar = inject(ApplicationRef);
|
|
23
|
-
#injector = inject(Injector);
|
|
24
21
|
#ref = inject(ChangeDetectorRef);
|
|
25
22
|
#loadingService = inject(SdLoadingService);
|
|
26
23
|
#destroyRef = inject(DestroyRef);
|
|
@@ -32,7 +29,10 @@ class SdModalResizable {
|
|
|
32
29
|
isMaximum = signal(false);
|
|
33
30
|
constructor() {
|
|
34
31
|
afterNextRender(() => {
|
|
35
|
-
|
|
32
|
+
// why: attachTemplatePortal tạo embedded view từ VCR của chính CdkPortal →
|
|
33
|
+
// KHÔNG cần appRef/injector/document. Chỉ truyền outletElement để tương thích
|
|
34
|
+
// mọi CDK (19 còn slot ComponentFactoryResolver, 20/21 đã bỏ → tránh lệch arg).
|
|
35
|
+
const outlet = new DomPortalOutlet(document.body);
|
|
36
36
|
this.#embeddedViewRef = outlet.attachTemplatePortal(this.portal());
|
|
37
37
|
this.#detectChanges();
|
|
38
38
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-angular-core-components-modal-resizable.mjs","sources":["../../../projects/sd-angular/components/modal-resizable/src/modal-resizable.component.ts","../../../projects/sd-angular/components/modal-resizable/src/modal-resizable.component.html","../../../projects/sd-angular/components/modal-resizable/sd-angular-core-components-modal-resizable.ts"],"sourcesContent":["import {\r\n ApplicationRef,\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n DestroyRef,\r\n EmbeddedViewRef,\r\n Injector,\r\n ViewContainerRef,\r\n afterNextRender,\r\n booleanAttribute,\r\n inject,\r\n input,\r\n output,\r\n signal,\r\n viewChild,\r\n} from '@angular/core';\r\nimport { CdkPortal, DomPortalOutlet, PortalModule } from '@angular/cdk/portal';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatDialogModule } from '@angular/material/dialog';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { SdLoadingService } from '@sd-angular/core/services';\r\nimport * as uuid from 'uuid';\r\n\r\n@Component({\r\n selector: 'sd-modal-resizable',\r\n templateUrl: './modal-resizable.component.html',\r\n styleUrls: ['./modal-resizable.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n standalone: true,\r\n imports: [CommonModule, MatIconModule, MatDialogModule, MatButtonModule, PortalModule],\r\n})\r\nexport class SdModalResizable {\r\n readonly id = `I${uuid.v4()}`;\r\n readonly portal = viewChild.required(CdkPortal);\r\n readonly editable = input<boolean, boolean | ''>(false, { transform: booleanAttribute });\r\n readonly width = input<string>('480px');\r\n readonly editingChanged = output<boolean>();\r\n #embeddedViewRef!: EmbeddedViewRef<any>;\r\n readonly #viewContainerRef = inject(ViewContainerRef);\r\n readonly #ar = inject(ApplicationRef);\r\n readonly #injector = inject(Injector);\r\n readonly #ref = inject(ChangeDetectorRef);\r\n readonly #loadingService = inject(SdLoadingService);\r\n readonly #destroyRef = inject(DestroyRef);\r\n readonly isEditing = signal(false);\r\n readonly isOpened = signal(false);\r\n readonly isHover = signal(false);\r\n readonly isLoading = signal(false);\r\n readonly isMinimum = signal(false);\r\n readonly isMaximum = signal(false);\r\n\r\n constructor() {\r\n afterNextRender(() => {\r\n const outlet = new DomPortalOutlet(document.body, this.#viewContainerRef, this.#ar, this.#injector);\r\n this.#embeddedViewRef = outlet.attachTemplatePortal(this.portal());\r\n this.#detectChanges();\r\n });\r\n\r\n this.#destroyRef.onDestroy(() => {\r\n this.#embeddedViewRef?.destroy();\r\n });\r\n }\r\n\r\n open = () => {\r\n this.isOpened.set(true);\r\n this.#detectChanges();\r\n\r\n const element = this.#getElement();\r\n if (element && !element.classList.contains('c-minium')) {\r\n setTimeout(() => {\r\n const maximumWidth = element.offsetWidth;\r\n if (maximumWidth > 0) {\r\n element.dataset['width'] = maximumWidth.toString();\r\n }\r\n element.classList.remove('c-closed');\r\n }, 100);\r\n }\r\n\r\n this.maximize();\r\n };\r\n\r\n close = () => {\r\n this.isOpened.set(false);\r\n this.#detectChanges();\r\n setTimeout(() => {\r\n const element = this.#getElement();\r\n element?.style.setProperty('width', '0px');\r\n element?.style.setProperty('right', '0px');\r\n element?.classList.remove('c-minium');\r\n element?.classList.add('c-closed');\r\n }, 100);\r\n this.stopLoading();\r\n\r\n this.#arrangePanels();\r\n };\r\n\r\n minimize = () => {\r\n this.isMinimum.set(true);\r\n this.#detectChanges();\r\n this.#arrangePanels();\r\n };\r\n\r\n maximize = () => {\r\n this.isMinimum.set(false);\r\n this.#detectChanges();\r\n this.#arrangePanels();\r\n };\r\n\r\n toggleMaximum = () => {\r\n this.isMaximum.update(isMaximum => !isMaximum);\r\n this.#detectChanges();\r\n this.#arrangePanels();\r\n };\r\n\r\n startLoading = () => {\r\n this.isLoading.set(true);\r\n this.#detectChanges();\r\n this.#loadingService.stop(`#${this.id}`);\r\n this.#loadingService.start(`#${this.id}`);\r\n };\r\n\r\n stopLoading = () => {\r\n this.isLoading.set(false);\r\n this.#detectChanges();\r\n this.#loadingService.stop(`#${this.id}`);\r\n };\r\n\r\n toggleEditable() {\r\n this.isEditing.update(isEditing => !isEditing);\r\n this.#detectChanges();\r\n this.editingChanged.emit(this.isEditing());\r\n }\r\n\r\n onFocus = () => {\r\n this.isHover.set(true);\r\n };\r\n\r\n onBlur = () => {\r\n this.isHover.set(false);\r\n };\r\n\r\n #arrangePanels = () => {\r\n setTimeout(() => {\r\n let totalRight = 0;\r\n const minimumWidth = 300;\r\n document.querySelectorAll<HTMLElement>('.modal-resizable').forEach(item => {\r\n if (item.classList.contains('c-minium')) {\r\n item.style.setProperty('width', `${minimumWidth}px`);\r\n item.style.setProperty('right', `${totalRight}px`);\r\n totalRight += minimumWidth + 8;\r\n return;\r\n }\r\n\r\n if (item.classList.contains('c-closed')) {\r\n return;\r\n }\r\n\r\n const expandedWidth = Number.parseInt(item.dataset['width'] || '', 10);\r\n if (Number.isNaN(expandedWidth)) {\r\n return;\r\n }\r\n\r\n if (item.classList.contains('c-fullscreen')) {\r\n item.style.setProperty('width', 'calc(100% - 16px)');\r\n item.style.setProperty('right', '8px');\r\n } else {\r\n item.style.setProperty('width', `${expandedWidth}px`);\r\n item.style.setProperty('right', `${totalRight}px`);\r\n }\r\n totalRight += expandedWidth + 8;\r\n });\r\n }, 200);\r\n };\r\n\r\n #getElement() {\r\n return document.getElementById(this.id);\r\n }\r\n\r\n #detectChanges() {\r\n this.#ref.markForCheck();\r\n this.#embeddedViewRef?.detectChanges();\r\n }\r\n}\r\n","<ng-template cdkPortal>\r\n <div\r\n [id]=\"id\"\r\n class=\"modal-resizable\"\r\n [style.width]=\"width()\"\r\n [class.modal-resizable--active]=\"isOpened()\"\r\n [class.modal-resizable--loading]=\"isLoading()\"\r\n [class.c-minium]=\"isMinimum()\"\r\n [class.c-fullscreen]=\"isMaximum()\"\r\n (mouseover)=\"onFocus()\"\r\n (focus)=\"onFocus()\"\r\n (mouseout)=\"onBlur()\"\r\n (blur)=\"onBlur()\">\r\n @if (isOpened()) {\r\n <div class=\"modal-resizable__header\">\r\n <div class=\"modal-resizable__title\">\r\n <ng-content select=\"[sdTitle]\"></ng-content>\r\n </div>\r\n <div class=\"modal-resizable__actions\">\r\n @if (!isMinimum()) {\r\n <button type=\"button\" class=\"c-action--white c-min\" (click)=\"minimize()\" mat-icon-button title=\"Thu nhỏ\">\r\n <mat-icon>remove</mat-icon>\r\n </button>\r\n }\r\n @if (isMinimum()) {\r\n <button type=\"button\" class=\"c-action--white c-max\" (click)=\"maximize()\" mat-icon-button title=\"Phóng to\">\r\n <mat-icon>remove</mat-icon>\r\n </button>\r\n }\r\n @if (!isMaximum()) {\r\n <button type=\"button\" class=\"c-action--white\" (click)=\"toggleMaximum()\" mat-icon-button title=\"Toàn màn hình\">\r\n <mat-icon>open_in_full</mat-icon>\r\n </button>\r\n }\r\n @if (isMaximum()) {\r\n <button type=\"button\" class=\"c-action--white\" (click)=\"toggleMaximum()\" mat-icon-button title=\"Thoát toàn màn hình\">\r\n <mat-icon>fullscreen_exit</mat-icon>\r\n </button>\r\n }\r\n <button type=\"button\" class=\"c-action--white\" (click)=\"close()\" mat-icon-button title=\"Đóng\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"modal-resizable__body\">\r\n <div class=\"modal-resizable__content\">\r\n <ng-content select=\"[sdBody]\"></ng-content>\r\n </div>\r\n </div>\r\n <div class=\"modal-resizable__footer\">\r\n <ng-content select=\"[sdFooter]\"></ng-content>\r\n </div>\r\n }\r\n </div>\r\n</ng-template>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings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AY,CAAC,EAAA,QAAA,EAAA,oyEAAA,EAAA,MAAA,EAAA,CAAA,k2MAAA,CAAA,EAAA;;;AE/BxF;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"sd-angular-core-components-modal-resizable.mjs","sources":["../../../projects/sd-angular/components/modal-resizable/src/modal-resizable.component.ts","../../../projects/sd-angular/components/modal-resizable/src/modal-resizable.component.html","../../../projects/sd-angular/components/modal-resizable/sd-angular-core-components-modal-resizable.ts"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n DestroyRef,\r\n EmbeddedViewRef,\r\n afterNextRender,\r\n booleanAttribute,\r\n inject,\r\n input,\r\n output,\r\n signal,\r\n viewChild,\r\n} from '@angular/core';\r\nimport { CdkPortal, DomPortalOutlet, PortalModule } from '@angular/cdk/portal';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatDialogModule } from '@angular/material/dialog';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { SdLoadingService } from '@sd-angular/core/services';\r\nimport * as uuid from 'uuid';\r\n\r\n@Component({\r\n selector: 'sd-modal-resizable',\r\n templateUrl: './modal-resizable.component.html',\r\n styleUrls: ['./modal-resizable.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n standalone: true,\r\n imports: [CommonModule, MatIconModule, MatDialogModule, MatButtonModule, PortalModule],\r\n})\r\nexport class SdModalResizable {\r\n readonly id = `I${uuid.v4()}`;\r\n readonly portal = viewChild.required(CdkPortal);\r\n readonly editable = input<boolean, boolean | ''>(false, { transform: booleanAttribute });\r\n readonly width = input<string>('480px');\r\n readonly editingChanged = output<boolean>();\r\n #embeddedViewRef!: EmbeddedViewRef<any>;\r\n readonly #ref = inject(ChangeDetectorRef);\r\n readonly #loadingService = inject(SdLoadingService);\r\n readonly #destroyRef = inject(DestroyRef);\r\n readonly isEditing = signal(false);\r\n readonly isOpened = signal(false);\r\n readonly isHover = signal(false);\r\n readonly isLoading = signal(false);\r\n readonly isMinimum = signal(false);\r\n readonly isMaximum = signal(false);\r\n\r\n constructor() {\r\n afterNextRender(() => {\r\n // why: attachTemplatePortal tạo embedded view từ VCR của chính CdkPortal →\r\n // KHÔNG cần appRef/injector/document. Chỉ truyền outletElement để tương thích\r\n // mọi CDK (19 còn slot ComponentFactoryResolver, 20/21 đã bỏ → tránh lệch arg).\r\n const outlet = new DomPortalOutlet(document.body);\r\n this.#embeddedViewRef = outlet.attachTemplatePortal(this.portal());\r\n this.#detectChanges();\r\n });\r\n\r\n this.#destroyRef.onDestroy(() => {\r\n this.#embeddedViewRef?.destroy();\r\n });\r\n }\r\n\r\n open = () => {\r\n this.isOpened.set(true);\r\n this.#detectChanges();\r\n\r\n const element = this.#getElement();\r\n if (element && !element.classList.contains('c-minium')) {\r\n setTimeout(() => {\r\n const maximumWidth = element.offsetWidth;\r\n if (maximumWidth > 0) {\r\n element.dataset['width'] = maximumWidth.toString();\r\n }\r\n element.classList.remove('c-closed');\r\n }, 100);\r\n }\r\n\r\n this.maximize();\r\n };\r\n\r\n close = () => {\r\n this.isOpened.set(false);\r\n this.#detectChanges();\r\n setTimeout(() => {\r\n const element = this.#getElement();\r\n element?.style.setProperty('width', '0px');\r\n element?.style.setProperty('right', '0px');\r\n element?.classList.remove('c-minium');\r\n element?.classList.add('c-closed');\r\n }, 100);\r\n this.stopLoading();\r\n\r\n this.#arrangePanels();\r\n };\r\n\r\n minimize = () => {\r\n this.isMinimum.set(true);\r\n this.#detectChanges();\r\n this.#arrangePanels();\r\n };\r\n\r\n maximize = () => {\r\n this.isMinimum.set(false);\r\n this.#detectChanges();\r\n this.#arrangePanels();\r\n };\r\n\r\n toggleMaximum = () => {\r\n this.isMaximum.update(isMaximum => !isMaximum);\r\n this.#detectChanges();\r\n this.#arrangePanels();\r\n };\r\n\r\n startLoading = () => {\r\n this.isLoading.set(true);\r\n this.#detectChanges();\r\n this.#loadingService.stop(`#${this.id}`);\r\n this.#loadingService.start(`#${this.id}`);\r\n };\r\n\r\n stopLoading = () => {\r\n this.isLoading.set(false);\r\n this.#detectChanges();\r\n this.#loadingService.stop(`#${this.id}`);\r\n };\r\n\r\n toggleEditable() {\r\n this.isEditing.update(isEditing => !isEditing);\r\n this.#detectChanges();\r\n this.editingChanged.emit(this.isEditing());\r\n }\r\n\r\n onFocus = () => {\r\n this.isHover.set(true);\r\n };\r\n\r\n onBlur = () => {\r\n this.isHover.set(false);\r\n };\r\n\r\n #arrangePanels = () => {\r\n setTimeout(() => {\r\n let totalRight = 0;\r\n const minimumWidth = 300;\r\n document.querySelectorAll<HTMLElement>('.modal-resizable').forEach(item => {\r\n if (item.classList.contains('c-minium')) {\r\n item.style.setProperty('width', `${minimumWidth}px`);\r\n item.style.setProperty('right', `${totalRight}px`);\r\n totalRight += minimumWidth + 8;\r\n return;\r\n }\r\n\r\n if (item.classList.contains('c-closed')) {\r\n return;\r\n }\r\n\r\n const expandedWidth = Number.parseInt(item.dataset['width'] || '', 10);\r\n if (Number.isNaN(expandedWidth)) {\r\n return;\r\n }\r\n\r\n if (item.classList.contains('c-fullscreen')) {\r\n item.style.setProperty('width', 'calc(100% - 16px)');\r\n item.style.setProperty('right', '8px');\r\n } else {\r\n item.style.setProperty('width', `${expandedWidth}px`);\r\n item.style.setProperty('right', `${totalRight}px`);\r\n }\r\n totalRight += expandedWidth + 8;\r\n });\r\n }, 200);\r\n };\r\n\r\n #getElement() {\r\n return document.getElementById(this.id);\r\n }\r\n\r\n #detectChanges() {\r\n this.#ref.markForCheck();\r\n this.#embeddedViewRef?.detectChanges();\r\n }\r\n}\r\n","<ng-template cdkPortal>\r\n <div\r\n [id]=\"id\"\r\n class=\"modal-resizable\"\r\n [style.width]=\"width()\"\r\n [class.modal-resizable--active]=\"isOpened()\"\r\n [class.modal-resizable--loading]=\"isLoading()\"\r\n [class.c-minium]=\"isMinimum()\"\r\n [class.c-fullscreen]=\"isMaximum()\"\r\n (mouseover)=\"onFocus()\"\r\n (focus)=\"onFocus()\"\r\n (mouseout)=\"onBlur()\"\r\n (blur)=\"onBlur()\">\r\n @if (isOpened()) {\r\n <div class=\"modal-resizable__header\">\r\n <div class=\"modal-resizable__title\">\r\n <ng-content select=\"[sdTitle]\"></ng-content>\r\n </div>\r\n <div class=\"modal-resizable__actions\">\r\n @if (!isMinimum()) {\r\n <button type=\"button\" class=\"c-action--white c-min\" (click)=\"minimize()\" mat-icon-button title=\"Thu nhỏ\">\r\n <mat-icon>remove</mat-icon>\r\n </button>\r\n }\r\n @if (isMinimum()) {\r\n <button type=\"button\" class=\"c-action--white c-max\" (click)=\"maximize()\" mat-icon-button title=\"Phóng to\">\r\n <mat-icon>remove</mat-icon>\r\n </button>\r\n }\r\n @if (!isMaximum()) {\r\n <button type=\"button\" class=\"c-action--white\" (click)=\"toggleMaximum()\" mat-icon-button title=\"Toàn màn hình\">\r\n <mat-icon>open_in_full</mat-icon>\r\n </button>\r\n }\r\n @if (isMaximum()) {\r\n <button type=\"button\" class=\"c-action--white\" (click)=\"toggleMaximum()\" mat-icon-button title=\"Thoát toàn màn hình\">\r\n <mat-icon>fullscreen_exit</mat-icon>\r\n </button>\r\n }\r\n <button type=\"button\" class=\"c-action--white\" (click)=\"close()\" mat-icon-button title=\"Đóng\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"modal-resizable__body\">\r\n <div class=\"modal-resizable__content\">\r\n <ng-content select=\"[sdBody]\"></ng-content>\r\n </div>\r\n </div>\r\n <div class=\"modal-resizable__footer\">\r\n <ng-content select=\"[sdFooter]\"></ng-content>\r\n </div>\r\n }\r\n </div>\r\n</ng-template>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;MA8Ba,gBAAgB,CAAA;AAClB,IAAA,EAAE,GAAG,CAAA,CAAA,EAAI,IAAI,CAAC,EAAE,EAAE,EAAE;AACpB,IAAA,MAAM,GAAG,SA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A,ED3BY,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,aAAa,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,SAAA,EAAA,SAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,eAAe,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,eAAe,2IAAE,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,QAAA,EAAA,aAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAE1E,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAR5B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oBAAoB,mBAGb,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,YAAY,CAAC,EAAA,QAAA,EAAA,oyEAAA,EAAA,MAAA,EAAA,CAAA,k2MAAA,CAAA,EAAA;;;AE5BxF;;AAEG;;;;"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import * as i1 from '@angular/common';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { inject, TemplateRef, Directive, input, computed, booleanAttribute, contentChild, signal, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
5
|
+
import * as i2 from '@angular/material/icon';
|
|
6
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
7
|
+
|
|
8
|
+
class SdOrgChartItemDefDirective {
|
|
9
|
+
static ngTemplateContextGuard(_dir, _ctx) {
|
|
10
|
+
return true;
|
|
11
|
+
}
|
|
12
|
+
templateRef = inject(TemplateRef);
|
|
13
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdOrgChartItemDefDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
14
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.21", type: SdOrgChartItemDefDirective, isStandalone: true, selector: "[sdOrgChartItemDef]", ngImport: i0 });
|
|
15
|
+
}
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdOrgChartItemDefDirective, decorators: [{
|
|
17
|
+
type: Directive,
|
|
18
|
+
args: [{
|
|
19
|
+
selector: '[sdOrgChartItemDef]',
|
|
20
|
+
}]
|
|
21
|
+
}] });
|
|
22
|
+
|
|
23
|
+
class SdOrgChart {
|
|
24
|
+
autoIdInput = input(undefined, { alias: 'autoId' });
|
|
25
|
+
option = input(undefined);
|
|
26
|
+
autoId = computed(() => {
|
|
27
|
+
const scope = this.option()?.autoId ?? this.autoIdInput();
|
|
28
|
+
return scope ? `components-org-chart-${scope}` : undefined;
|
|
29
|
+
});
|
|
30
|
+
items = input(undefined);
|
|
31
|
+
itemTemplate = input(undefined);
|
|
32
|
+
collapsible = input(true, { transform: booleanAttribute });
|
|
33
|
+
itemDef = contentChild(SdOrgChartItemDefDirective);
|
|
34
|
+
resolvedItems = computed(() => this.option()?.items ?? this.items() ?? []);
|
|
35
|
+
resolvedCollapsible = computed(() => this.option()?.collapsible ?? this.collapsible());
|
|
36
|
+
resolvedItemTemplate = computed(() => {
|
|
37
|
+
return this.itemDef()?.templateRef || this.option()?.itemTemplate || this.itemTemplate() || undefined;
|
|
38
|
+
});
|
|
39
|
+
#expandedState = signal({});
|
|
40
|
+
trackByItem = (_index, item) => item.id;
|
|
41
|
+
hasChildren = (item) => {
|
|
42
|
+
return this.childrenOf(item).length > 0;
|
|
43
|
+
};
|
|
44
|
+
childrenOf = (item) => {
|
|
45
|
+
return item.children || [];
|
|
46
|
+
};
|
|
47
|
+
isExpanded = (item) => {
|
|
48
|
+
if (!this.resolvedCollapsible()) {
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
const key = this.#itemKey(item);
|
|
52
|
+
const state = this.#expandedState();
|
|
53
|
+
return state[key] ?? item.expanded ?? true;
|
|
54
|
+
};
|
|
55
|
+
toggle = (item, event) => {
|
|
56
|
+
event?.stopPropagation();
|
|
57
|
+
if (!this.resolvedCollapsible() || !this.hasChildren(item)) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const key = this.#itemKey(item);
|
|
61
|
+
const expanded = !(this.#expandedState()[key] ?? item.expanded ?? true);
|
|
62
|
+
this.#expandedState.update(state => ({
|
|
63
|
+
...state,
|
|
64
|
+
[key]: expanded,
|
|
65
|
+
}));
|
|
66
|
+
this.option()?.onToggle?.({ item, expanded });
|
|
67
|
+
};
|
|
68
|
+
createContext = (item, depth, parent) => {
|
|
69
|
+
const hasChildren = this.hasChildren(item);
|
|
70
|
+
const expanded = this.isExpanded(item);
|
|
71
|
+
return {
|
|
72
|
+
$implicit: item,
|
|
73
|
+
item,
|
|
74
|
+
depth,
|
|
75
|
+
parent,
|
|
76
|
+
expanded,
|
|
77
|
+
hasChildren,
|
|
78
|
+
isLeaf: !hasChildren,
|
|
79
|
+
toggle: () => this.toggle(item),
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
nodeAutoId = (item, part) => {
|
|
83
|
+
const base = this.autoId();
|
|
84
|
+
if (!base) {
|
|
85
|
+
return undefined;
|
|
86
|
+
}
|
|
87
|
+
return `${base}-${part}-${this.#autoIdKey(item)}`;
|
|
88
|
+
};
|
|
89
|
+
#itemKey = (item) => {
|
|
90
|
+
return String(item.id);
|
|
91
|
+
};
|
|
92
|
+
#autoIdKey = (item) => {
|
|
93
|
+
return this.#itemKey(item).replace(/[^a-zA-Z0-9_-]/g, '-');
|
|
94
|
+
};
|
|
95
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdOrgChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
96
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdOrgChart, isStandalone: true, selector: "sd-org-chart", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, option: { classPropertyName: "option", publicName: "option", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-autoid": "autoId()" } }, queries: [{ propertyName: "itemDef", first: true, predicate: SdOrgChartItemDefDirective, descendants: true, isSignal: true }], ngImport: i0, template: "@let _items = resolvedItems();\n@let _templateRef = resolvedItemTemplate();\r\n\r\n<div class=\"sd-org-chart\" role=\"tree\">\r\n <ul class=\"sd-org-chart__tree\">\r\n @for (item of _items; track trackByItem($index, item)) {\r\n <ng-container\r\n *ngTemplateOutlet=\"nodeTemplate; context: { $implicit: item, item: item, depth: 0, parent: null, templateRef: _templateRef }\" />\r\n }\r\n </ul>\r\n</div>\r\n\r\n<ng-template #nodeTemplate let-item let-depth=\"depth\" let-parent=\"parent\" let-templateRef=\"templateRef\">\r\n @let _children = childrenOf(item);\r\n @let _hasChildren = _children.length > 0;\r\n @let _expanded = isExpanded(item);\r\n @let _context = createContext(item, depth, parent);\r\n\r\n <li\r\n class=\"sd-org-chart__node\"\r\n [class.sd-org-chart__node--expanded]=\"_hasChildren && _expanded\"\r\n [class.sd-org-chart__node--collapsed]=\"_hasChildren && !_expanded\"\r\n role=\"treeitem\"\r\n [attr.aria-expanded]=\"_hasChildren ? _expanded : null\">\r\n <div class=\"sd-org-chart__node-shell\">\r\n <div\r\n class=\"sd-org-chart__card\"\r\n [class.sd-org-chart__card--no-image]=\"!item.image\"\r\n [class.sd-org-chart__card--compact]=\"!item.image && !item.description\"\r\n [attr.data-node-id]=\"item.id\"\r\n [attr.data-autoid]=\"nodeAutoId(item, 'node')\"\r\n [attr.data-depth]=\"depth\"\r\n [style.--sd-org-node-color]=\"item.color || null\">\r\n @if (templateRef) {\r\n <ng-container *ngTemplateOutlet=\"templateRef; context: _context\" />\r\n } @else {\r\n @if (item.image) {\r\n <img class=\"sd-org-chart__image\" [src]=\"item.image\" [alt]=\"item.title\" [attr.data-autoid]=\"nodeAutoId(item, 'image')\" />\r\n }\r\n <div class=\"sd-org-chart__title\" [attr.data-autoid]=\"nodeAutoId(item, 'title')\">{{ item.title }}</div>\r\n @if (item.description) {\r\n <div class=\"sd-org-chart__description\" [attr.data-autoid]=\"nodeAutoId(item, 'description')\">{{ item.description }}</div>\r\n }\r\n }\r\n </div>\r\n\r\n @if (_hasChildren && collapsible()) {\r\n <button\r\n type=\"button\"\r\n class=\"sd-org-chart__toggle\"\r\n [attr.aria-label]=\"_expanded ? 'Collapse children' : 'Expand children'\"\r\n [attr.aria-expanded]=\"_expanded\"\r\n [attr.data-autoid]=\"nodeAutoId(item, 'toggle')\"\r\n (click)=\"toggle(item, $event)\">\r\n <mat-icon>{{ _expanded ? 'expand_more' : 'chevron_right' }}</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n\r\n @if (_hasChildren && _expanded) {\r\n <ul class=\"sd-org-chart__children\" role=\"group\">\r\n @for (child of _children; track trackByItem($index, child)) {\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n nodeTemplate;\r\n context: { $implicit: child, item: child, depth: depth + 1, parent: item, templateRef: templateRef }\r\n \" />\r\n }\r\n </ul>\r\n }\r\n </li>\r\n</ng-template>\r\n", styles: [":host{--sd-org-line: #d9e2ef;--sd-org-card-bg: #ffffff;--sd-org-text: #102047;--sd-org-text-muted: #4d5b73;--sd-org-shadow: 0 8px 20px rgba(24, 39, 75, .08);--sd-org-gap-x: 20px;--sd-org-gap-y: 32px;display:block;overflow-x:auto;overflow-y:hidden;padding:8px 0 12px}.sd-org-chart{display:inline-block;min-width:100%;padding:8px 16px 0}.sd-org-chart__tree,.sd-org-chart__children{display:flex;justify-content:center;align-items:flex-start;margin:0;padding:0;list-style:none}.sd-org-chart__node{position:relative;flex:0 0 auto;padding:var(--sd-org-gap-y) var(--sd-org-gap-x) 0;text-align:center}.sd-org-chart__tree>.sd-org-chart__node{padding-top:0}.sd-org-chart__children>.sd-org-chart__node:before,.sd-org-chart__children>.sd-org-chart__node:after{position:absolute;top:0;width:50%;height:calc(var(--sd-org-gap-y) / 2);border-top:1px solid var(--sd-org-line);content:\"\"}.sd-org-chart__children>.sd-org-chart__node:before{right:50%}.sd-org-chart__children>.sd-org-chart__node:after{left:50%}.sd-org-chart__children>.sd-org-chart__node:first-child:before,.sd-org-chart__children>.sd-org-chart__node:last-child:after{border-top:0}.sd-org-chart__children>.sd-org-chart__node:only-child{padding-top:calc(var(--sd-org-gap-y) / 2)}.sd-org-chart__children>.sd-org-chart__node:only-child:before,.sd-org-chart__children>.sd-org-chart__node:only-child:after{display:none}.sd-org-chart__node-shell{position:relative;display:flex;flex-direction:column;align-items:center}.sd-org-chart__children>.sd-org-chart__node>.sd-org-chart__node-shell:before{position:absolute;top:calc(var(--sd-org-gap-y) * -1);left:50%;width:0;height:var(--sd-org-gap-y);border-left:1px solid var(--sd-org-line);content:\"\"}.sd-org-chart__tree>.sd-org-chart__node>.sd-org-chart__node-shell:before{display:none}.sd-org-chart__card{position:relative;z-index:1;min-width:128px;min-height:110px;box-sizing:border-box;padding:16px 14px 14px;color:var(--sd-org-text);background:var(--sd-org-node-color, var(--sd-org-card-bg));border:1px solid color-mix(in srgb,var(--sd-org-node-color, var(--sd-org-line)) 36%,var(--sd-org-line));border-radius:6px;box-shadow:var(--sd-org-shadow)}.sd-org-chart__card--compact{min-width:74px;min-height:40px;padding:10px 16px}.sd-org-chart__card--no-image:not(.sd-org-chart__card--compact){min-height:78px}.sd-org-chart__image{display:block;width:44px;height:44px;margin:0 auto 10px;object-fit:cover;border-radius:50%}.sd-org-chart__title{max-width:150px;margin:0 auto;overflow-wrap:anywhere;font-size:14px;font-weight:700;line-height:1.35}.sd-org-chart__description{max-width:150px;margin:5px auto 0;overflow-wrap:anywhere;color:var(--sd-org-text-muted);font-size:13px;line-height:1.3}.sd-org-chart__toggle{position:relative;z-index:2;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;margin-top:-1px;padding:0;color:#52708f;background:#fff;border:1px solid var(--sd-org-line);border-radius:50%;cursor:pointer}.sd-org-chart__toggle:hover{background:#f4f7fb}.sd-org-chart__toggle:focus-visible{outline:2px solid var(--sd-primary, #2a66f4);outline-offset:2px}.sd-org-chart__toggle mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
97
|
+
}
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdOrgChart, decorators: [{
|
|
99
|
+
type: Component,
|
|
100
|
+
args: [{ selector: 'sd-org-chart', standalone: true, imports: [CommonModule, MatIconModule], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
101
|
+
'[attr.data-autoid]': 'autoId()',
|
|
102
|
+
}, template: "@let _items = resolvedItems();\n@let _templateRef = resolvedItemTemplate();\r\n\r\n<div class=\"sd-org-chart\" role=\"tree\">\r\n <ul class=\"sd-org-chart__tree\">\r\n @for (item of _items; track trackByItem($index, item)) {\r\n <ng-container\r\n *ngTemplateOutlet=\"nodeTemplate; context: { $implicit: item, item: item, depth: 0, parent: null, templateRef: _templateRef }\" />\r\n }\r\n </ul>\r\n</div>\r\n\r\n<ng-template #nodeTemplate let-item let-depth=\"depth\" let-parent=\"parent\" let-templateRef=\"templateRef\">\r\n @let _children = childrenOf(item);\r\n @let _hasChildren = _children.length > 0;\r\n @let _expanded = isExpanded(item);\r\n @let _context = createContext(item, depth, parent);\r\n\r\n <li\r\n class=\"sd-org-chart__node\"\r\n [class.sd-org-chart__node--expanded]=\"_hasChildren && _expanded\"\r\n [class.sd-org-chart__node--collapsed]=\"_hasChildren && !_expanded\"\r\n role=\"treeitem\"\r\n [attr.aria-expanded]=\"_hasChildren ? _expanded : null\">\r\n <div class=\"sd-org-chart__node-shell\">\r\n <div\r\n class=\"sd-org-chart__card\"\r\n [class.sd-org-chart__card--no-image]=\"!item.image\"\r\n [class.sd-org-chart__card--compact]=\"!item.image && !item.description\"\r\n [attr.data-node-id]=\"item.id\"\r\n [attr.data-autoid]=\"nodeAutoId(item, 'node')\"\r\n [attr.data-depth]=\"depth\"\r\n [style.--sd-org-node-color]=\"item.color || null\">\r\n @if (templateRef) {\r\n <ng-container *ngTemplateOutlet=\"templateRef; context: _context\" />\r\n } @else {\r\n @if (item.image) {\r\n <img class=\"sd-org-chart__image\" [src]=\"item.image\" [alt]=\"item.title\" [attr.data-autoid]=\"nodeAutoId(item, 'image')\" />\r\n }\r\n <div class=\"sd-org-chart__title\" [attr.data-autoid]=\"nodeAutoId(item, 'title')\">{{ item.title }}</div>\r\n @if (item.description) {\r\n <div class=\"sd-org-chart__description\" [attr.data-autoid]=\"nodeAutoId(item, 'description')\">{{ item.description }}</div>\r\n }\r\n }\r\n </div>\r\n\r\n @if (_hasChildren && collapsible()) {\r\n <button\r\n type=\"button\"\r\n class=\"sd-org-chart__toggle\"\r\n [attr.aria-label]=\"_expanded ? 'Collapse children' : 'Expand children'\"\r\n [attr.aria-expanded]=\"_expanded\"\r\n [attr.data-autoid]=\"nodeAutoId(item, 'toggle')\"\r\n (click)=\"toggle(item, $event)\">\r\n <mat-icon>{{ _expanded ? 'expand_more' : 'chevron_right' }}</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n\r\n @if (_hasChildren && _expanded) {\r\n <ul class=\"sd-org-chart__children\" role=\"group\">\r\n @for (child of _children; track trackByItem($index, child)) {\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n nodeTemplate;\r\n context: { $implicit: child, item: child, depth: depth + 1, parent: item, templateRef: templateRef }\r\n \" />\r\n }\r\n </ul>\r\n }\r\n </li>\r\n</ng-template>\r\n", styles: [":host{--sd-org-line: #d9e2ef;--sd-org-card-bg: #ffffff;--sd-org-text: #102047;--sd-org-text-muted: #4d5b73;--sd-org-shadow: 0 8px 20px rgba(24, 39, 75, .08);--sd-org-gap-x: 20px;--sd-org-gap-y: 32px;display:block;overflow-x:auto;overflow-y:hidden;padding:8px 0 12px}.sd-org-chart{display:inline-block;min-width:100%;padding:8px 16px 0}.sd-org-chart__tree,.sd-org-chart__children{display:flex;justify-content:center;align-items:flex-start;margin:0;padding:0;list-style:none}.sd-org-chart__node{position:relative;flex:0 0 auto;padding:var(--sd-org-gap-y) var(--sd-org-gap-x) 0;text-align:center}.sd-org-chart__tree>.sd-org-chart__node{padding-top:0}.sd-org-chart__children>.sd-org-chart__node:before,.sd-org-chart__children>.sd-org-chart__node:after{position:absolute;top:0;width:50%;height:calc(var(--sd-org-gap-y) / 2);border-top:1px solid var(--sd-org-line);content:\"\"}.sd-org-chart__children>.sd-org-chart__node:before{right:50%}.sd-org-chart__children>.sd-org-chart__node:after{left:50%}.sd-org-chart__children>.sd-org-chart__node:first-child:before,.sd-org-chart__children>.sd-org-chart__node:last-child:after{border-top:0}.sd-org-chart__children>.sd-org-chart__node:only-child{padding-top:calc(var(--sd-org-gap-y) / 2)}.sd-org-chart__children>.sd-org-chart__node:only-child:before,.sd-org-chart__children>.sd-org-chart__node:only-child:after{display:none}.sd-org-chart__node-shell{position:relative;display:flex;flex-direction:column;align-items:center}.sd-org-chart__children>.sd-org-chart__node>.sd-org-chart__node-shell:before{position:absolute;top:calc(var(--sd-org-gap-y) * -1);left:50%;width:0;height:var(--sd-org-gap-y);border-left:1px solid var(--sd-org-line);content:\"\"}.sd-org-chart__tree>.sd-org-chart__node>.sd-org-chart__node-shell:before{display:none}.sd-org-chart__card{position:relative;z-index:1;min-width:128px;min-height:110px;box-sizing:border-box;padding:16px 14px 14px;color:var(--sd-org-text);background:var(--sd-org-node-color, var(--sd-org-card-bg));border:1px solid color-mix(in srgb,var(--sd-org-node-color, var(--sd-org-line)) 36%,var(--sd-org-line));border-radius:6px;box-shadow:var(--sd-org-shadow)}.sd-org-chart__card--compact{min-width:74px;min-height:40px;padding:10px 16px}.sd-org-chart__card--no-image:not(.sd-org-chart__card--compact){min-height:78px}.sd-org-chart__image{display:block;width:44px;height:44px;margin:0 auto 10px;object-fit:cover;border-radius:50%}.sd-org-chart__title{max-width:150px;margin:0 auto;overflow-wrap:anywhere;font-size:14px;font-weight:700;line-height:1.35}.sd-org-chart__description{max-width:150px;margin:5px auto 0;overflow-wrap:anywhere;color:var(--sd-org-text-muted);font-size:13px;line-height:1.3}.sd-org-chart__toggle{position:relative;z-index:2;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;margin-top:-1px;padding:0;color:#52708f;background:#fff;border:1px solid var(--sd-org-line);border-radius:50%;cursor:pointer}.sd-org-chart__toggle:hover{background:#f4f7fb}.sd-org-chart__toggle:focus-visible{outline:2px solid var(--sd-primary, #2a66f4);outline-offset:2px}.sd-org-chart__toggle mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}\n"] }]
|
|
103
|
+
}] });
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Generated bundle index. Do not edit.
|
|
107
|
+
*/
|
|
108
|
+
|
|
109
|
+
export { SdOrgChart, SdOrgChartItemDefDirective };
|
|
110
|
+
//# sourceMappingURL=sd-angular-core-components-org-chart.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sd-angular-core-components-org-chart.mjs","sources":["../../../projects/sd-angular/components/org-chart/src/org-chart-item-def.directive.ts","../../../projects/sd-angular/components/org-chart/src/org-chart.component.ts","../../../projects/sd-angular/components/org-chart/src/org-chart.component.html","../../../projects/sd-angular/components/org-chart/sd-angular-core-components-org-chart.ts"],"sourcesContent":["import { Directive, TemplateRef, inject } from '@angular/core';\r\nimport { SdOrgChartItem, SdOrgChartItemContext } from './org-chart.model';\r\n\r\n@Directive({\r\n selector: '[sdOrgChartItemDef]',\r\n})\r\nexport class SdOrgChartItemDefDirective<T extends SdOrgChartItem = SdOrgChartItem> {\r\n static ngTemplateContextGuard<T extends SdOrgChartItem>(\r\n _dir: SdOrgChartItemDefDirective<T>,\r\n _ctx: unknown\r\n ): _ctx is SdOrgChartItemContext<T> {\r\n return true;\r\n }\r\n\r\n readonly templateRef: TemplateRef<SdOrgChartItemContext<T>> = inject(TemplateRef);\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, TemplateRef, booleanAttribute, computed, contentChild, input, signal } from '@angular/core';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { SdOrgChartItemDefDirective } from './org-chart-item-def.directive';\r\nimport { SdOrgChartItem, SdOrgChartItemContext, SdOrgChartOption } from './org-chart.model';\n\r\n@Component({\r\n selector: 'sd-org-chart',\r\n standalone: true,\r\n imports: [CommonModule, MatIconModule],\r\n templateUrl: './org-chart.component.html',\r\n styleUrls: ['./org-chart.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n '[attr.data-autoid]': 'autoId()',\r\n },\r\n})\r\nexport class SdOrgChart {\n readonly autoIdInput = input<string | undefined | null>(undefined, { alias: 'autoId' });\n readonly option = input<SdOrgChartOption | undefined>(undefined);\n readonly autoId = computed(() => {\n const scope = this.option()?.autoId ?? this.autoIdInput();\n return scope ? `components-org-chart-${scope}` : undefined;\n });\n\n readonly items = input<SdOrgChartItem[] | undefined>(undefined);\n readonly itemTemplate = input<TemplateRef<SdOrgChartItemContext> | undefined | null>(undefined);\n readonly collapsible = input(true, { transform: booleanAttribute });\n\n readonly itemDef = contentChild(SdOrgChartItemDefDirective);\n readonly resolvedItems = computed(() => this.option()?.items ?? this.items() ?? []);\n readonly resolvedCollapsible = computed(() => this.option()?.collapsible ?? this.collapsible());\n\n readonly resolvedItemTemplate = computed<TemplateRef<SdOrgChartItemContext> | undefined>(() => {\n return this.itemDef()?.templateRef || this.option()?.itemTemplate || this.itemTemplate() || undefined;\n });\n\r\n readonly #expandedState = signal<Record<string, boolean>>({});\r\n\r\n readonly trackByItem = (_index: number, item: SdOrgChartItem) => item.id;\r\n\r\n hasChildren = (item: SdOrgChartItem): boolean => {\r\n return this.childrenOf(item).length > 0;\r\n };\r\n\r\n childrenOf = (item: SdOrgChartItem): SdOrgChartItem[] => {\r\n return item.children || [];\r\n };\r\n\r\n isExpanded = (item: SdOrgChartItem): boolean => {\r\n if (!this.resolvedCollapsible()) {\n return true;\r\n }\r\n\r\n const key = this.#itemKey(item);\r\n const state = this.#expandedState();\r\n return state[key] ?? item.expanded ?? true;\r\n };\r\n\r\n toggle = (item: SdOrgChartItem, event?: Event): void => {\r\n event?.stopPropagation();\r\n\r\n if (!this.resolvedCollapsible() || !this.hasChildren(item)) {\n return;\n }\n\n const key = this.#itemKey(item);\n const expanded = !(this.#expandedState()[key] ?? item.expanded ?? true);\n this.#expandedState.update(state => ({\n ...state,\n [key]: expanded,\n }));\n this.option()?.onToggle?.({ item, expanded });\n };\n\r\n createContext = (item: SdOrgChartItem, depth: number, parent: SdOrgChartItem | null): SdOrgChartItemContext => {\r\n const hasChildren = this.hasChildren(item);\r\n const expanded = this.isExpanded(item);\r\n\r\n return {\r\n $implicit: item,\r\n item,\r\n depth,\r\n parent,\r\n expanded,\r\n hasChildren,\r\n isLeaf: !hasChildren,\r\n toggle: () => this.toggle(item),\r\n };\r\n };\r\n\r\n nodeAutoId = (item: SdOrgChartItem, part: 'node' | 'image' | 'title' | 'description' | 'toggle'): string | undefined => {\r\n const base = this.autoId();\r\n if (!base) {\r\n return undefined;\r\n }\r\n\r\n return `${base}-${part}-${this.#autoIdKey(item)}`;\r\n };\r\n\r\n #itemKey = (item: SdOrgChartItem): string => {\r\n return String(item.id);\r\n };\r\n\r\n #autoIdKey = (item: SdOrgChartItem): string => {\r\n return this.#itemKey(item).replace(/[^a-zA-Z0-9_-]/g, '-');\r\n };\r\n}\r\n","@let _items = resolvedItems();\n@let _templateRef = resolvedItemTemplate();\r\n\r\n<div class=\"sd-org-chart\" role=\"tree\">\r\n <ul class=\"sd-org-chart__tree\">\r\n @for (item of _items; track trackByItem($index, item)) {\r\n <ng-container\r\n *ngTemplateOutlet=\"nodeTemplate; context: { $implicit: item, item: item, depth: 0, parent: null, templateRef: _templateRef }\" />\r\n }\r\n </ul>\r\n</div>\r\n\r\n<ng-template #nodeTemplate let-item let-depth=\"depth\" let-parent=\"parent\" let-templateRef=\"templateRef\">\r\n @let _children = childrenOf(item);\r\n @let _hasChildren = _children.length > 0;\r\n @let _expanded = isExpanded(item);\r\n @let _context = createContext(item, depth, parent);\r\n\r\n <li\r\n class=\"sd-org-chart__node\"\r\n [class.sd-org-chart__node--expanded]=\"_hasChildren && _expanded\"\r\n [class.sd-org-chart__node--collapsed]=\"_hasChildren && !_expanded\"\r\n role=\"treeitem\"\r\n [attr.aria-expanded]=\"_hasChildren ? _expanded : null\">\r\n <div class=\"sd-org-chart__node-shell\">\r\n <div\r\n class=\"sd-org-chart__card\"\r\n [class.sd-org-chart__card--no-image]=\"!item.image\"\r\n [class.sd-org-chart__card--compact]=\"!item.image && !item.description\"\r\n [attr.data-node-id]=\"item.id\"\r\n [attr.data-autoid]=\"nodeAutoId(item, 'node')\"\r\n [attr.data-depth]=\"depth\"\r\n [style.--sd-org-node-color]=\"item.color || null\">\r\n @if (templateRef) {\r\n <ng-container *ngTemplateOutlet=\"templateRef; context: _context\" />\r\n } @else {\r\n @if (item.image) {\r\n <img class=\"sd-org-chart__image\" [src]=\"item.image\" [alt]=\"item.title\" [attr.data-autoid]=\"nodeAutoId(item, 'image')\" />\r\n }\r\n <div class=\"sd-org-chart__title\" [attr.data-autoid]=\"nodeAutoId(item, 'title')\">{{ item.title }}</div>\r\n @if (item.description) {\r\n <div class=\"sd-org-chart__description\" [attr.data-autoid]=\"nodeAutoId(item, 'description')\">{{ item.description }}</div>\r\n }\r\n }\r\n </div>\r\n\r\n @if (_hasChildren && collapsible()) {\r\n <button\r\n type=\"button\"\r\n class=\"sd-org-chart__toggle\"\r\n [attr.aria-label]=\"_expanded ? 'Collapse children' : 'Expand children'\"\r\n [attr.aria-expanded]=\"_expanded\"\r\n [attr.data-autoid]=\"nodeAutoId(item, 'toggle')\"\r\n (click)=\"toggle(item, $event)\">\r\n <mat-icon>{{ _expanded ? 'expand_more' : 'chevron_right' }}</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n\r\n @if (_hasChildren && _expanded) {\r\n <ul class=\"sd-org-chart__children\" role=\"group\">\r\n @for (child of _children; track trackByItem($index, child)) {\r\n <ng-container\r\n *ngTemplateOutlet=\"\r\n nodeTemplate;\r\n context: { $implicit: child, item: child, depth: depth + 1, parent: item, templateRef: templateRef }\r\n \" />\r\n }\r\n </ul>\r\n }\r\n </li>\r\n</ng-template>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAMa,0BAA0B,CAAA;AACrC,IAAA,OAAO,sBAAsB,CAC3B,IAAmC,EACnC,IAAa,EAAA;AAEb,QAAA,OA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