@ascentgl/ads-ui 21.111.0 → 21.113.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.
|
@@ -6302,6 +6302,8 @@ class AdsDatepickerComponent extends AdsDatetimepickerComponent {
|
|
|
6302
6302
|
this.inputModifiedByKeyHandler = false;
|
|
6303
6303
|
/** @ignore */
|
|
6304
6304
|
this.elementRef = inject(ElementRef);
|
|
6305
|
+
/** @ignore */
|
|
6306
|
+
this.overlayContainerRef = inject(OverlayContainer);
|
|
6305
6307
|
}
|
|
6306
6308
|
/** @ignore */
|
|
6307
6309
|
ngOnInit() {
|
|
@@ -6314,6 +6316,7 @@ class AdsDatepickerComponent extends AdsDatetimepickerComponent {
|
|
|
6314
6316
|
ngOnDestroy() {
|
|
6315
6317
|
super.ngOnDestroy();
|
|
6316
6318
|
this.intersectionObserver?.disconnect();
|
|
6319
|
+
this.teardownBackdropScrollPassthrough();
|
|
6317
6320
|
}
|
|
6318
6321
|
/** @ignore */
|
|
6319
6322
|
setupIntersectionObserver() {
|
|
@@ -6330,6 +6333,69 @@ class AdsDatepickerComponent extends AdsDatetimepickerComponent {
|
|
|
6330
6333
|
});
|
|
6331
6334
|
this.intersectionObserver.observe(this.elementRef.nativeElement);
|
|
6332
6335
|
}
|
|
6336
|
+
/**
|
|
6337
|
+
* @ignore
|
|
6338
|
+
* When the calendar overlay opens, the CDK backdrop (pointer-events: auto)
|
|
6339
|
+
* covers the entire viewport and intercepts wheel events, preventing scroll
|
|
6340
|
+
* on underlying containers. Forward those events to the nearest scrollable ancestor.
|
|
6341
|
+
*/
|
|
6342
|
+
onOpened() {
|
|
6343
|
+
super.onOpened();
|
|
6344
|
+
this.setupBackdropScrollPassthrough();
|
|
6345
|
+
}
|
|
6346
|
+
/** @ignore */
|
|
6347
|
+
onClosed() {
|
|
6348
|
+
this.teardownBackdropScrollPassthrough();
|
|
6349
|
+
super.onClosed();
|
|
6350
|
+
}
|
|
6351
|
+
/** @ignore */
|
|
6352
|
+
setupBackdropScrollPassthrough() {
|
|
6353
|
+
this.teardownBackdropScrollPassthrough();
|
|
6354
|
+
const container = this.overlayContainerRef.getContainerElement();
|
|
6355
|
+
const backdrop = container.querySelector('.cdk-overlay-backdrop');
|
|
6356
|
+
if (!backdrop)
|
|
6357
|
+
return;
|
|
6358
|
+
const scrollTarget = this.findScrollableAncestor(this.elementRef.nativeElement);
|
|
6359
|
+
if (!scrollTarget)
|
|
6360
|
+
return;
|
|
6361
|
+
const cleanupFns = [];
|
|
6362
|
+
// Forward wheel events from the backdrop to the scrollable ancestor
|
|
6363
|
+
// so that the page can still be scrolled while the calendar is open.
|
|
6364
|
+
const onWheel = (event) => {
|
|
6365
|
+
scrollTarget.scrollTop += event.deltaY;
|
|
6366
|
+
scrollTarget.scrollLeft += event.deltaX;
|
|
6367
|
+
};
|
|
6368
|
+
backdrop.addEventListener('wheel', onWheel, { passive: true });
|
|
6369
|
+
cleanupFns.push(() => backdrop.removeEventListener('wheel', onWheel));
|
|
6370
|
+
// Reposition the calendar overlay when the scroll container scrolls,
|
|
6371
|
+
// keeping the popup attached to the input (same behaviour as ads-dropdown).
|
|
6372
|
+
// CDK ScrollDispatcher only detects window scroll and CdkScrollable directives,
|
|
6373
|
+
// not arbitrary overflow containers, so we trigger the update manually.
|
|
6374
|
+
const onScroll = () => {
|
|
6375
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6376
|
+
this.picker?._popupRef?.updatePosition();
|
|
6377
|
+
};
|
|
6378
|
+
scrollTarget.addEventListener('scroll', onScroll, { passive: true });
|
|
6379
|
+
cleanupFns.push(() => scrollTarget.removeEventListener('scroll', onScroll));
|
|
6380
|
+
this.backdropWheelCleanup = () => cleanupFns.forEach((fn) => fn());
|
|
6381
|
+
}
|
|
6382
|
+
/** @ignore */
|
|
6383
|
+
teardownBackdropScrollPassthrough() {
|
|
6384
|
+
this.backdropWheelCleanup?.();
|
|
6385
|
+
this.backdropWheelCleanup = undefined;
|
|
6386
|
+
}
|
|
6387
|
+
/** @ignore - Walk up the DOM to find the first ancestor with overflow-y: auto|scroll */
|
|
6388
|
+
findScrollableAncestor(node) {
|
|
6389
|
+
let current = node.parentElement;
|
|
6390
|
+
while (current) {
|
|
6391
|
+
const { overflowY } = getComputedStyle(current);
|
|
6392
|
+
if (overflowY === 'auto' || overflowY === 'scroll') {
|
|
6393
|
+
return current;
|
|
6394
|
+
}
|
|
6395
|
+
current = current.parentElement;
|
|
6396
|
+
}
|
|
6397
|
+
return null;
|
|
6398
|
+
}
|
|
6333
6399
|
/** @ignore - Override to dispatch change event on blur when input was modified programmatically */
|
|
6334
6400
|
touchControls() {
|
|
6335
6401
|
// Mark controls as touched BEFORE dispatching the change event.
|
|
@@ -11727,6 +11793,8 @@ class AdsTabsComponent {
|
|
|
11727
11793
|
this.tabGroup = viewChild.required('tabGroup');
|
|
11728
11794
|
this.tabs = [];
|
|
11729
11795
|
this.selectedIndex = 0;
|
|
11796
|
+
/** When `true`, the border-bottom on inactive (non-active, non-disabled) tabs is hidden. Defaults to `false`. */
|
|
11797
|
+
this.hideInactiveBorder = false;
|
|
11730
11798
|
this.selectedIndexChange = new EventEmitter();
|
|
11731
11799
|
this.tabChange = new EventEmitter();
|
|
11732
11800
|
}
|
|
@@ -11753,11 +11821,11 @@ class AdsTabsComponent {
|
|
|
11753
11821
|
};
|
|
11754
11822
|
}
|
|
11755
11823
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AdsTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11756
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: AdsTabsComponent, isStandalone: false, selector: "ads-tabs", inputs: { tabs: "tabs", selectedIndex: "selectedIndex", tabWidth: "tabWidth", activeColor: "activeColor" }, outputs: { selectedIndexChange: "selectedIndexChange", tabChange: "tabChange" }, viewQueries: [{ propertyName: "tabGroup", first: true, predicate: ["tabGroup"], descendants: true, isSignal: true }], ngImport: i0, template: "<mat-tab-group\n [selectedIndex]=\"selectedIndex\"\n (selectedIndexChange)=\"selectedIndexChange.emit($event)\"\n [style.--ads-tab-width]=\"tabWidth || null\"\n [style.--ads-tab-active-color]=\"_activeColorVar\"\n class=\"custom-tabs\"\n #tabGroup\n [disableRipple]=\"true\"\n>\n @for(tab of tabs; track $index) {\n @if (tab.headerTemplate) {\n <mat-tab [disabled]=\"tab.disabled\">\n <ng-template mat-tab-label>\n <ng-container *ngTemplateOutlet=\"tab.headerTemplate\"></ng-container>\n </ng-template>\n @if(tab.template) {\n <ng-container *ngTemplateOutlet=\"tab.template\"></ng-container>\n }\n </mat-tab>\n } @else {\n <mat-tab [disabled]=\"tab.disabled\" [label]=\"tab.text || ''\">\n @if(tab.template) {\n <ng-container *ngTemplateOutlet=\"tab.template\"></ng-container>\n }\n </mat-tab>\n }\n }\n</mat-tab-group>\n", styles: [":host::ng-deep .mat-mdc-tab.mdc-tab{border-bottom:2px solid var(--color-medium-30);min-width:var(--ads-tab-width, auto)!important;max-width:var(--ads-tab-width, none)!important;width:var(--ads-tab-width, auto)!important;flex-basis:var(--ads-tab-width, auto)!important;flex-shrink:0}:host::ng-deep .mat-mdc-tab.mdc-tab .mdc-tab__text-label{line-height:normal;font-weight:400;color:var(--color-medium-30)!important}:host::ng-deep .mat-mdc-tab.mdc-tab.mdc-tab--active{border-bottom:2px solid var(--ads-tab-active-color, var(--color-primary-hover))}:host::ng-deep .mat-mdc-tab.mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--ads-tab-active-color, var(--color-primary-hover))!important;font-weight:500}:host::ng-deep .mat-mdc-tab-disabled{border-bottom:2px solid var(--color-medium-opacity-50)!important}:host::ng-deep .mat-mdc-tab-disabled .mdc-tab__text-label{color:var(--color-medium-opacity-50)!important}:host::ng-deep .mdc-tab-indicator{display:none}\n"], dependencies: [{ kind: "component", type: i2$3.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "component", type: i2$3.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$3.MatTabLabel, selector: "[mat-tab-label], [matTabLabel]" }] }); }
|
|
11824
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: AdsTabsComponent, isStandalone: false, selector: "ads-tabs", inputs: { tabs: "tabs", selectedIndex: "selectedIndex", tabWidth: "tabWidth", activeColor: "activeColor", hideInactiveBorder: "hideInactiveBorder" }, outputs: { selectedIndexChange: "selectedIndexChange", tabChange: "tabChange" }, viewQueries: [{ propertyName: "tabGroup", first: true, predicate: ["tabGroup"], descendants: true, isSignal: true }], ngImport: i0, template: "<mat-tab-group\n [selectedIndex]=\"selectedIndex\"\n (selectedIndexChange)=\"selectedIndexChange.emit($event)\"\n [style.--ads-tab-width]=\"tabWidth || null\"\n [style.--ads-tab-active-color]=\"_activeColorVar\"\n class=\"custom-tabs\"\n [class.hide-inactive-border]=\"hideInactiveBorder\"\n #tabGroup\n [disableRipple]=\"true\"\n>\n @for(tab of tabs; track $index) {\n @if (tab.headerTemplate) {\n <mat-tab [disabled]=\"tab.disabled\">\n <ng-template mat-tab-label>\n <ng-container *ngTemplateOutlet=\"tab.headerTemplate\"></ng-container>\n </ng-template>\n @if(tab.template) {\n <ng-container *ngTemplateOutlet=\"tab.template\"></ng-container>\n }\n </mat-tab>\n } @else {\n <mat-tab [disabled]=\"tab.disabled\" [label]=\"tab.text || ''\">\n @if(tab.template) {\n <ng-container *ngTemplateOutlet=\"tab.template\"></ng-container>\n }\n </mat-tab>\n }\n }\n</mat-tab-group>\n", styles: [":host::ng-deep .mat-mdc-tab.mdc-tab{border-bottom:2px solid var(--color-medium-30);min-width:var(--ads-tab-width, auto)!important;max-width:var(--ads-tab-width, none)!important;width:var(--ads-tab-width, auto)!important;flex-basis:var(--ads-tab-width, auto)!important;flex-shrink:0}:host::ng-deep .mat-mdc-tab.mdc-tab .mdc-tab__text-label{line-height:normal;font-weight:400;color:var(--color-medium-30)!important}:host::ng-deep .mat-mdc-tab.mdc-tab.mdc-tab--active{border-bottom:2px solid var(--ads-tab-active-color, var(--color-primary-hover))}:host::ng-deep .mat-mdc-tab.mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--ads-tab-active-color, var(--color-primary-hover))!important;font-weight:500}:host::ng-deep .mat-mdc-tab-disabled{border-bottom:2px solid var(--color-medium-opacity-50)!important}:host::ng-deep .mat-mdc-tab-disabled .mdc-tab__text-label{color:var(--color-medium-opacity-50)!important}:host::ng-deep .mdc-tab-indicator{display:none}:host::ng-deep .hide-inactive-border .mat-mdc-tab.mdc-tab:not(.mdc-tab--active):not(.mat-mdc-tab-disabled){border-bottom-color:transparent}\n"], dependencies: [{ kind: "component", type: i2$3.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "component", type: i2$3.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$3.MatTabLabel, selector: "[mat-tab-label], [matTabLabel]" }] }); }
|
|
11757
11825
|
}
|
|
11758
11826
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AdsTabsComponent, decorators: [{
|
|
11759
11827
|
type: Component,
|
|
11760
|
-
args: [{ selector: 'ads-tabs', standalone: false, template: "<mat-tab-group\n [selectedIndex]=\"selectedIndex\"\n (selectedIndexChange)=\"selectedIndexChange.emit($event)\"\n [style.--ads-tab-width]=\"tabWidth || null\"\n [style.--ads-tab-active-color]=\"_activeColorVar\"\n class=\"custom-tabs\"\n #tabGroup\n [disableRipple]=\"true\"\n>\n @for(tab of tabs; track $index) {\n @if (tab.headerTemplate) {\n <mat-tab [disabled]=\"tab.disabled\">\n <ng-template mat-tab-label>\n <ng-container *ngTemplateOutlet=\"tab.headerTemplate\"></ng-container>\n </ng-template>\n @if(tab.template) {\n <ng-container *ngTemplateOutlet=\"tab.template\"></ng-container>\n }\n </mat-tab>\n } @else {\n <mat-tab [disabled]=\"tab.disabled\" [label]=\"tab.text || ''\">\n @if(tab.template) {\n <ng-container *ngTemplateOutlet=\"tab.template\"></ng-container>\n }\n </mat-tab>\n }\n }\n</mat-tab-group>\n", styles: [":host::ng-deep .mat-mdc-tab.mdc-tab{border-bottom:2px solid var(--color-medium-30);min-width:var(--ads-tab-width, auto)!important;max-width:var(--ads-tab-width, none)!important;width:var(--ads-tab-width, auto)!important;flex-basis:var(--ads-tab-width, auto)!important;flex-shrink:0}:host::ng-deep .mat-mdc-tab.mdc-tab .mdc-tab__text-label{line-height:normal;font-weight:400;color:var(--color-medium-30)!important}:host::ng-deep .mat-mdc-tab.mdc-tab.mdc-tab--active{border-bottom:2px solid var(--ads-tab-active-color, var(--color-primary-hover))}:host::ng-deep .mat-mdc-tab.mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--ads-tab-active-color, var(--color-primary-hover))!important;font-weight:500}:host::ng-deep .mat-mdc-tab-disabled{border-bottom:2px solid var(--color-medium-opacity-50)!important}:host::ng-deep .mat-mdc-tab-disabled .mdc-tab__text-label{color:var(--color-medium-opacity-50)!important}:host::ng-deep .mdc-tab-indicator{display:none}\n"] }]
|
|
11828
|
+
args: [{ selector: 'ads-tabs', standalone: false, template: "<mat-tab-group\n [selectedIndex]=\"selectedIndex\"\n (selectedIndexChange)=\"selectedIndexChange.emit($event)\"\n [style.--ads-tab-width]=\"tabWidth || null\"\n [style.--ads-tab-active-color]=\"_activeColorVar\"\n class=\"custom-tabs\"\n [class.hide-inactive-border]=\"hideInactiveBorder\"\n #tabGroup\n [disableRipple]=\"true\"\n>\n @for(tab of tabs; track $index) {\n @if (tab.headerTemplate) {\n <mat-tab [disabled]=\"tab.disabled\">\n <ng-template mat-tab-label>\n <ng-container *ngTemplateOutlet=\"tab.headerTemplate\"></ng-container>\n </ng-template>\n @if(tab.template) {\n <ng-container *ngTemplateOutlet=\"tab.template\"></ng-container>\n }\n </mat-tab>\n } @else {\n <mat-tab [disabled]=\"tab.disabled\" [label]=\"tab.text || ''\">\n @if(tab.template) {\n <ng-container *ngTemplateOutlet=\"tab.template\"></ng-container>\n }\n </mat-tab>\n }\n }\n</mat-tab-group>\n", styles: [":host::ng-deep .mat-mdc-tab.mdc-tab{border-bottom:2px solid var(--color-medium-30);min-width:var(--ads-tab-width, auto)!important;max-width:var(--ads-tab-width, none)!important;width:var(--ads-tab-width, auto)!important;flex-basis:var(--ads-tab-width, auto)!important;flex-shrink:0}:host::ng-deep .mat-mdc-tab.mdc-tab .mdc-tab__text-label{line-height:normal;font-weight:400;color:var(--color-medium-30)!important}:host::ng-deep .mat-mdc-tab.mdc-tab.mdc-tab--active{border-bottom:2px solid var(--ads-tab-active-color, var(--color-primary-hover))}:host::ng-deep .mat-mdc-tab.mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--ads-tab-active-color, var(--color-primary-hover))!important;font-weight:500}:host::ng-deep .mat-mdc-tab-disabled{border-bottom:2px solid var(--color-medium-opacity-50)!important}:host::ng-deep .mat-mdc-tab-disabled .mdc-tab__text-label{color:var(--color-medium-opacity-50)!important}:host::ng-deep .mdc-tab-indicator{display:none}:host::ng-deep .hide-inactive-border .mat-mdc-tab.mdc-tab:not(.mdc-tab--active):not(.mat-mdc-tab-disabled){border-bottom-color:transparent}\n"] }]
|
|
11761
11829
|
}], propDecorators: { tabGroup: [{ type: i0.ViewChild, args: ['tabGroup', { isSignal: true }] }], tabs: [{
|
|
11762
11830
|
type: Input
|
|
11763
11831
|
}], selectedIndex: [{
|
|
@@ -11766,6 +11834,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
11766
11834
|
type: Input
|
|
11767
11835
|
}], activeColor: [{
|
|
11768
11836
|
type: Input
|
|
11837
|
+
}], hideInactiveBorder: [{
|
|
11838
|
+
type: Input
|
|
11769
11839
|
}], selectedIndexChange: [{
|
|
11770
11840
|
type: Output
|
|
11771
11841
|
}], tabChange: [{
|