@ascentgl/ads-ui 21.43.0 → 21.44.0
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.
|
@@ -6893,6 +6893,9 @@ class AdsExpansionPanelComponent {
|
|
|
6893
6893
|
constructor(registry, elementRef) {
|
|
6894
6894
|
this.registry = registry;
|
|
6895
6895
|
this.elementRef = elementRef;
|
|
6896
|
+
this.panelHeader = null;
|
|
6897
|
+
this.panelContent = null;
|
|
6898
|
+
this.panelElement = null;
|
|
6896
6899
|
/** The unique id of the chip */
|
|
6897
6900
|
this.id = input('', ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
6898
6901
|
/** The header text */
|
|
@@ -6919,23 +6922,42 @@ class AdsExpansionPanelComponent {
|
|
|
6919
6922
|
this.noBorder = input(false, ...(ngDevMode ? [{ debugName: "noBorder" }] : []));
|
|
6920
6923
|
this.expandedChange = output();
|
|
6921
6924
|
this.registry.register([adsIconChevronDown, adsIconChevronUp]);
|
|
6925
|
+
effect(() => {
|
|
6926
|
+
const headerPadding = this.headerPadding();
|
|
6927
|
+
if (this.panelHeader) {
|
|
6928
|
+
this.panelHeader.style.padding = headerPadding || '';
|
|
6929
|
+
}
|
|
6930
|
+
});
|
|
6931
|
+
effect(() => {
|
|
6932
|
+
const contentPadding = this.contentPadding();
|
|
6933
|
+
if (this.panelContent) {
|
|
6934
|
+
this.panelContent.style.padding = contentPadding || '';
|
|
6935
|
+
}
|
|
6936
|
+
});
|
|
6937
|
+
effect(() => {
|
|
6938
|
+
const noBorder = this.noBorder();
|
|
6939
|
+
if (this.panelElement) {
|
|
6940
|
+
this.panelElement.style.border = noBorder ? 'none' : '';
|
|
6941
|
+
}
|
|
6942
|
+
});
|
|
6922
6943
|
}
|
|
6923
6944
|
get expanded() {
|
|
6924
6945
|
return this.panel.expanded;
|
|
6925
6946
|
}
|
|
6926
6947
|
ngAfterContentInit() {
|
|
6927
6948
|
// Scope the query to this component instance instead of the entire document
|
|
6928
|
-
|
|
6929
|
-
|
|
6930
|
-
|
|
6931
|
-
|
|
6932
|
-
|
|
6933
|
-
|
|
6934
|
-
|
|
6935
|
-
|
|
6936
|
-
|
|
6937
|
-
|
|
6938
|
-
|
|
6949
|
+
this.panelHeader = this.elementRef.nativeElement.querySelector('.mat-expansion-panel-header');
|
|
6950
|
+
this.panelContent = this.elementRef.nativeElement.querySelector('.mat-expansion-panel-body');
|
|
6951
|
+
this.panelElement = this.elementRef.nativeElement.querySelector('.mat-expansion-panel');
|
|
6952
|
+
// Apply initial values
|
|
6953
|
+
if (this.panelHeader && this.headerPadding()) {
|
|
6954
|
+
this.panelHeader.style.padding = this.headerPadding();
|
|
6955
|
+
}
|
|
6956
|
+
if (this.panelContent && this.contentPadding()) {
|
|
6957
|
+
this.panelContent.style.padding = this.contentPadding();
|
|
6958
|
+
}
|
|
6959
|
+
if (this.panelElement && this.noBorder()) {
|
|
6960
|
+
this.panelElement.style.border = 'none';
|
|
6939
6961
|
}
|
|
6940
6962
|
this.panel.expandedChange.subscribe(value => this.expandedChange.emit(value));
|
|
6941
6963
|
}
|