@koobiq/components 18.2.0 → 18.2.1
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/core/option/action.d.ts +1 -1
- package/core/pop-up/pop-up-trigger.d.ts +3 -3
- package/esm2022/core/option/action.mjs +5 -8
- package/esm2022/core/pop-up/pop-up-trigger.mjs +12 -12
- package/esm2022/core/version.mjs +2 -2
- package/esm2022/form-field/form-field.mjs +7 -8
- package/esm2022/list/list-selection.component.mjs +8 -12
- package/esm2022/navbar/navbar-item.component.mjs +6 -9
- package/esm2022/navbar/navbar.component.mjs +12 -13
- package/esm2022/popover/popover-confirm.component.mjs +3 -3
- package/esm2022/select/select.component.mjs +15 -14
- package/esm2022/tabs/paginated-tab-header.mjs +10 -12
- package/esm2022/tags/tag-list.component.mjs +9 -11
- package/esm2022/toast/toast.component.mjs +5 -6
- package/esm2022/tree/padding.directive.mjs +3 -9
- package/esm2022/tree/tree-base.mjs +5 -8
- package/esm2022/tree/tree-selection.component.mjs +10 -13
- package/esm2022/tree-select/tree-select.component.mjs +13 -13
- package/fesm2022/koobiq-components-core.mjs +14 -15
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +6 -7
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +7 -11
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +13 -18
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +3 -3
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +15 -14
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +9 -11
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +7 -9
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +4 -5
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +12 -12
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +13 -24
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/form-field/form-field.d.ts +1 -1
- package/list/list-selection.component.d.ts +2 -4
- package/navbar/navbar-item.component.d.ts +2 -3
- package/navbar/navbar.component.d.ts +7 -5
- package/package.json +5 -5
- package/schematics/ng-add/index.js +4 -4
- package/select/select.component.d.ts +1 -2
- package/tabs/paginated-tab-header.d.ts +1 -3
- package/tags/tag-list.component.d.ts +1 -2
- package/toast/toast.component.d.ts +0 -1
- package/tree/padding.directive.d.ts +2 -4
- package/tree/tree-base.d.ts +2 -3
- package/tree/tree-selection.component.d.ts +2 -4
- package/tree-select/tree-select.component.d.ts +1 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { trigger, state, style, transition, animate, group } from '@angular/animations';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { InjectionToken, isDevMode, NgModule, Optional, Inject, inject, LOCALE_ID, Injectable, Pipe, Directive, ContentChildren, Component, ViewEncapsulation, ChangeDetectionStrategy, ContentChild, Input, EventEmitter, ViewChild, Output, Renderer2, ChangeDetectorRef, TemplateRef, ElementRef, NgZone, ViewContainerRef, Version } from '@angular/core';
|
|
3
|
+
import { InjectionToken, isDevMode, NgModule, Optional, Inject, inject, LOCALE_ID, Injectable, Pipe, Directive, ContentChildren, DestroyRef, Component, ViewEncapsulation, ChangeDetectionStrategy, ContentChild, Input, EventEmitter, ViewChild, Output, Renderer2, ChangeDetectorRef, TemplateRef, ElementRef, NgZone, ViewContainerRef, Version } from '@angular/core';
|
|
4
4
|
import { BidiModule, Directionality } from '@angular/cdk/bidi';
|
|
5
5
|
import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
|
|
6
6
|
import * as i1 from '@koobiq/date-adapter';
|
|
@@ -9,10 +9,11 @@ import { DateFormatter as DateFormatter$1 } from '@koobiq/date-formatter';
|
|
|
9
9
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
10
10
|
import { BehaviorSubject, Subject, Subscription, pairwise } from 'rxjs';
|
|
11
11
|
import * as i1$1 from '@angular/cdk/a11y';
|
|
12
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
12
13
|
import { SPACE, ENTER, TAB, ESCAPE, HOME, END } from '@koobiq/cdk/keycodes';
|
|
13
|
-
import { takeUntil, distinctUntilChanged, delay } from 'rxjs/operators';
|
|
14
14
|
import { Overlay, ScrollDispatcher } from '@angular/cdk/overlay';
|
|
15
15
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
16
|
+
import { distinctUntilChanged, delay } from 'rxjs/operators';
|
|
16
17
|
|
|
17
18
|
var AnimationCurves;
|
|
18
19
|
(function (AnimationCurves) {
|
|
@@ -1638,7 +1639,7 @@ class KbqOptionActionComponent extends KbqOptionActionMixinBase {
|
|
|
1638
1639
|
this.focusMonitor = focusMonitor;
|
|
1639
1640
|
this.option = option;
|
|
1640
1641
|
this.hasFocus = false;
|
|
1641
|
-
this.
|
|
1642
|
+
this.destroyRef = inject(DestroyRef);
|
|
1642
1643
|
this.focusMonitor.monitor(this.elementRef.nativeElement);
|
|
1643
1644
|
}
|
|
1644
1645
|
ngAfterViewInit() {
|
|
@@ -1646,15 +1647,13 @@ class KbqOptionActionComponent extends KbqOptionActionMixinBase {
|
|
|
1646
1647
|
return;
|
|
1647
1648
|
}
|
|
1648
1649
|
this.option.dropdownTrigger.restoreFocus = false;
|
|
1649
|
-
this.option.dropdownTrigger.dropdownClosed.pipe(
|
|
1650
|
+
this.option.dropdownTrigger.dropdownClosed.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
|
|
1650
1651
|
this.preventShowingTooltip();
|
|
1651
1652
|
const destroyReason = this.option.dropdownTrigger.lastDestroyReason === 'keydown' ? 'keyboard' : 'program';
|
|
1652
1653
|
this.focus(destroyReason);
|
|
1653
1654
|
});
|
|
1654
1655
|
}
|
|
1655
1656
|
ngOnDestroy() {
|
|
1656
|
-
this.destroy.next();
|
|
1657
|
-
this.destroy.complete();
|
|
1658
1657
|
this.focusMonitor.stopMonitoring(this.elementRef.nativeElement);
|
|
1659
1658
|
}
|
|
1660
1659
|
focus(origin, options) {
|
|
@@ -2554,6 +2553,7 @@ class KbqPopUpTrigger {
|
|
|
2554
2553
|
this.scrollDispatcher = inject(ScrollDispatcher);
|
|
2555
2554
|
this.hostView = inject(ViewContainerRef);
|
|
2556
2555
|
this.direction = inject(Directionality, { optional: true });
|
|
2556
|
+
this.destroyRef = inject(DestroyRef);
|
|
2557
2557
|
this.isOpen = false;
|
|
2558
2558
|
this.enterDelay = 0;
|
|
2559
2559
|
this.leaveDelay = 0;
|
|
@@ -2562,7 +2562,6 @@ class KbqPopUpTrigger {
|
|
|
2562
2562
|
this.visible = false;
|
|
2563
2563
|
this.listeners = new Map();
|
|
2564
2564
|
this.availablePositions = POSITION_MAP;
|
|
2565
|
-
this.destroyed = new Subject();
|
|
2566
2565
|
this.detach = () => {
|
|
2567
2566
|
if (this.overlayRef?.hasAttached()) {
|
|
2568
2567
|
this.overlayRef.detach();
|
|
@@ -2603,8 +2602,6 @@ class KbqPopUpTrigger {
|
|
|
2603
2602
|
this.overlayRef?.dispose();
|
|
2604
2603
|
this.listeners.forEach(this.removeEventListener);
|
|
2605
2604
|
this.listeners.clear();
|
|
2606
|
-
this.destroyed.next();
|
|
2607
|
-
this.destroyed.complete();
|
|
2608
2605
|
}
|
|
2609
2606
|
updatePlacement(value) {
|
|
2610
2607
|
if (POSITION_TO_CSS_MAP[value]) {
|
|
@@ -2656,10 +2653,12 @@ class KbqPopUpTrigger {
|
|
|
2656
2653
|
this.detach();
|
|
2657
2654
|
this.portal = this.portal || new ComponentPortal(this.getOverlayHandleComponentType(), this.hostView);
|
|
2658
2655
|
this.instance = this.overlayRef.attach(this.portal).instance;
|
|
2659
|
-
this.instance.afterHidden().pipe(
|
|
2656
|
+
this.instance.afterHidden().pipe(takeUntilDestroyed(this.destroyRef)).subscribe(this.detach);
|
|
2660
2657
|
this.updateClassMap();
|
|
2661
2658
|
this.updateData();
|
|
2662
|
-
this.instance.visibleChange
|
|
2659
|
+
this.instance.visibleChange
|
|
2660
|
+
.pipe(distinctUntilChanged(), takeUntilDestroyed(this.destroyRef))
|
|
2661
|
+
.subscribe((value) => {
|
|
2663
2662
|
this.visible = value;
|
|
2664
2663
|
this.visibleChange.emit(value);
|
|
2665
2664
|
this.isOpen = value;
|
|
@@ -2686,7 +2685,7 @@ class KbqPopUpTrigger {
|
|
|
2686
2685
|
.withPositions([...EXTENDED_OVERLAY_POSITIONS])
|
|
2687
2686
|
.withLockedPosition()
|
|
2688
2687
|
.withScrollableContainers(this.scrollDispatcher.getAncestorScrollContainers(this.elementRef));
|
|
2689
|
-
this.strategy.positionChanges.pipe(
|
|
2688
|
+
this.strategy.positionChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(this.onPositionChange);
|
|
2690
2689
|
this.overlayRef = this.overlay.create({
|
|
2691
2690
|
...this.overlayConfig,
|
|
2692
2691
|
direction: this.direction || undefined,
|
|
@@ -2694,7 +2693,7 @@ class KbqPopUpTrigger {
|
|
|
2694
2693
|
scrollStrategy: this.scrollStrategy()
|
|
2695
2694
|
});
|
|
2696
2695
|
this.subscribeOnClosingActions();
|
|
2697
|
-
this.overlayRef.detachments().pipe(
|
|
2696
|
+
this.overlayRef.detachments().pipe(takeUntilDestroyed(this.destroyRef)).subscribe(this.detach);
|
|
2698
2697
|
return this.overlayRef;
|
|
2699
2698
|
}
|
|
2700
2699
|
resetOrigin() {
|
|
@@ -2778,7 +2777,7 @@ class KbqPopUpTrigger {
|
|
|
2778
2777
|
subscribeOnClosingActions() {
|
|
2779
2778
|
this.closingActionsSubscription?.unsubscribe();
|
|
2780
2779
|
this.closingActionsSubscription = this.closingActions()
|
|
2781
|
-
.pipe(
|
|
2780
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
2782
2781
|
.pipe(delay(0))
|
|
2783
2782
|
.subscribe((event) => {
|
|
2784
2783
|
if (event?.type === 'click' && event.kbqPopoverPreventHide) {
|
|
@@ -3185,7 +3184,7 @@ const KBQ_VALIDATION = new InjectionToken('KbqUseValidation', {
|
|
|
3185
3184
|
factory: () => ({ useValidation: true })
|
|
3186
3185
|
});
|
|
3187
3186
|
|
|
3188
|
-
const VERSION = new Version('18.1
|
|
3187
|
+
const VERSION = new Version('18.2.1+sha-782536d');
|
|
3189
3188
|
|
|
3190
3189
|
/**
|
|
3191
3190
|
* Generated bundle index. Do not edit.
|