@indigina/ui-kit 1.1.221 → 1.1.223
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.
|
@@ -24,7 +24,7 @@ import * as i1$6 from 'ngx-toastr';
|
|
|
24
24
|
import { DefaultGlobalConfig, TOAST_CONFIG, ToastrModule } from 'ngx-toastr';
|
|
25
25
|
import * as i1$7 from '@angular/router';
|
|
26
26
|
import { RouterModule, NavigationEnd, RouterLink } from '@angular/router';
|
|
27
|
-
import { BehaviorSubject, filter, Subject, startWith, pairwise, takeUntil, tap, map,
|
|
27
|
+
import { BehaviorSubject, filter, Subject, startWith, pairwise, takeUntil, combineLatest, tap, map, debounceTime, distinctUntilChanged, take, switchMap, of, catchError, forkJoin } from 'rxjs';
|
|
28
28
|
import * as i1$8 from '@progress/kendo-angular-dialog';
|
|
29
29
|
import { KENDO_DIALOGS, DialogActionsComponent, DialogContentBase, DialogCloseResult, DialogRef } from '@progress/kendo-angular-dialog';
|
|
30
30
|
export { DialogAction, DialogCloseResult, DialogContentBase, DialogRef } from '@progress/kendo-angular-dialog';
|
|
@@ -6080,10 +6080,10 @@ class KitScrollNavigationComponent {
|
|
|
6080
6080
|
get currentVisibleItem() {
|
|
6081
6081
|
return this.collapsedList?.selectedItem ?? null;
|
|
6082
6082
|
}
|
|
6083
|
-
constructor() {
|
|
6083
|
+
constructor(activatedRoute) {
|
|
6084
|
+
this.activatedRoute = activatedRoute;
|
|
6084
6085
|
this.isNavigationBtnDisabled = input(false, ...(ngDevMode ? [{ debugName: "isNavigationBtnDisabled" }] : []));
|
|
6085
6086
|
this.dropdownDefaultText = input('View More', ...(ngDevMode ? [{ debugName: "dropdownDefaultText" }] : []));
|
|
6086
|
-
this.firstRenderScrollElementId = input('', ...(ngDevMode ? [{ debugName: "firstRenderScrollElementId" }] : []));
|
|
6087
6087
|
this.sections = null;
|
|
6088
6088
|
this.content = null;
|
|
6089
6089
|
this.collapsedList = null;
|
|
@@ -6098,8 +6098,9 @@ class KitScrollNavigationComponent {
|
|
|
6098
6098
|
this.collapsedListItems = signal([], ...(ngDevMode ? [{ debugName: "collapsedListItems" }] : []));
|
|
6099
6099
|
this.disableScrollUpdates = false;
|
|
6100
6100
|
this.hasScrolled = false;
|
|
6101
|
+
this.firstRenderScrollElementId = signal(this.activatedRoute.snapshot.fragment ?? '', ...(ngDevMode ? [{ debugName: "firstRenderScrollElementId" }] : []));
|
|
6101
6102
|
effect(() => {
|
|
6102
|
-
if (!this.isNavigationBtnDisabled() && !this.hasScrolled) {
|
|
6103
|
+
if (!this.isNavigationBtnDisabled() && !this.hasScrolled && this.firstRenderScrollElementId()) {
|
|
6103
6104
|
requestAnimationFrame(() => {
|
|
6104
6105
|
const section = this.sections?.toArray()
|
|
6105
6106
|
.find(section => section.id === this.firstRenderScrollElementId())?.sectionContent?.nativeElement;
|
|
@@ -6113,6 +6114,15 @@ class KitScrollNavigationComponent {
|
|
|
6113
6114
|
}
|
|
6114
6115
|
});
|
|
6115
6116
|
}
|
|
6117
|
+
ngOnInit() {
|
|
6118
|
+
combineLatest([
|
|
6119
|
+
this.activatedRoute.fragment,
|
|
6120
|
+
this.activatedRoute.params,
|
|
6121
|
+
]).subscribe(([fragment]) => {
|
|
6122
|
+
this.hasScrolled = false;
|
|
6123
|
+
this.firstRenderScrollElementId.set(fragment ?? '');
|
|
6124
|
+
});
|
|
6125
|
+
}
|
|
6116
6126
|
ngAfterViewInit() {
|
|
6117
6127
|
this.setLastSectionMinHeight();
|
|
6118
6128
|
this.updateListItems();
|
|
@@ -6123,7 +6133,6 @@ class KitScrollNavigationComponent {
|
|
|
6123
6133
|
if (!contentElement || !this.sections?.length || this.disableScrollUpdates) {
|
|
6124
6134
|
return;
|
|
6125
6135
|
}
|
|
6126
|
-
this.hasScrolled = true;
|
|
6127
6136
|
let index = 0;
|
|
6128
6137
|
const contentScrollTop = contentElement.scrollTop + (contentElement.clientHeight / 2);
|
|
6129
6138
|
const scrolledSectionIndexes = new Set();
|
|
@@ -6186,8 +6195,8 @@ class KitScrollNavigationComponent {
|
|
|
6186
6195
|
lastSection.style.minHeight = `${contentHeight}px`;
|
|
6187
6196
|
}
|
|
6188
6197
|
}
|
|
6189
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: KitScrollNavigationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6190
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: KitScrollNavigationComponent, isStandalone: true, selector: "kit-scroll-navigation", inputs: { isNavigationBtnDisabled: { classPropertyName: "isNavigationBtnDisabled", publicName: "isNavigationBtnDisabled", isSignal: true, isRequired: false, transformFunction: null }, dropdownDefaultText: { classPropertyName: "dropdownDefaultText", publicName: "dropdownDefaultText", isSignal: true, isRequired: false, transformFunction: null }
|
|
6198
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: KitScrollNavigationComponent, deps: [{ token: i1$7.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6199
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: KitScrollNavigationComponent, isStandalone: true, selector: "kit-scroll-navigation", inputs: { isNavigationBtnDisabled: { classPropertyName: "isNavigationBtnDisabled", publicName: "isNavigationBtnDisabled", isSignal: true, isRequired: false, transformFunction: null }, dropdownDefaultText: { classPropertyName: "dropdownDefaultText", publicName: "dropdownDefaultText", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "sections", predicate: KitScrollNavigationSectionComponent }], viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, static: true }, { propertyName: "collapsedList", first: true, predicate: KitCollapsedListComponent, descendants: true }], ngImport: i0, template: "<div class=\"kit-scroll-navigation\">\n <div class=\"kit-scroll-navigation-items\">\n <kit-collapsed-list [itemList]=\"collapsedListItems()\"\n [dropdownDefaultValueText]=\"dropdownDefaultText()\"\n [gap]=\"18\"\n [itemTemplate]=\"navItem\"\n [disableActions]=\"isNavigationBtnDisabled()\"\n [dropdownAlign]=\"kitCollapsedListDropdownAlign.END\"\n (onSelectItem)=\"scrollToSection($event)\" />\n </div>\n\n <div #content\n class=\"kit-scroll-navigation-content\"\n (scroll)=\"onSectionScroll()\">\n @for (item of sections?.toArray(); track item) {\n <ng-container *ngTemplateOutlet=\"item.sectionTemplate\"\n ></ng-container>\n }\n </div>\n</div>\n\n<ng-template #navItem let-item>\n <div kitBadge\n [kitBadgeVisible]=\"item.badgeCount\"\n [kitBadgeText]=\"item.badgeCount\"\n [kitBadgeTheme]=\"kitBadgeTheme.DANGER\">\n <kit-button kitTooltip\n kitTooltipFilter='.nav-item'\n class=\"nav-item\"\n [active]=\"currentVisibleItem?.value === item.value\"\n [type]=\"kitButtonType.GHOST\"\n [kind]=\"kitButtonKind.SMALL\"\n [icon]=\"item.icon\"\n [iconPosition]=\"kitButtonIconPosition.LEADING\"\n [state]=\"item.state ?? kitButtonState.DEFAULT\"\n [label]=\"item.text\"\n [title]=\"item.tooltipText\"\n [disabled]=\"isNavigationBtnDisabled()\"\n [kitTooltipVisible]=\"!!item.tooltipText\"\n ></kit-button>\n </div>\n</ng-template>\n", styles: [".kit-scroll-navigation{display:flex;flex-direction:column;height:100%}.kit-scroll-navigation-items{padding-bottom:27px}.kit-scroll-navigation .nav-item.active .kit-button .k-button{color:var(--ui-kit-color-white);border-color:var(--ui-kit-color-main);background:var(--ui-kit-color-main)}.kit-scroll-navigation-content{display:flex;flex-direction:column;flex:1;gap:20px;position:relative;overflow-y:auto}.kit-scroll-navigation-section{flex-shrink:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: KitButtonModule }, { kind: "component", type: KitButtonComponent, selector: "kit-button", inputs: ["disabled", "label", "type", "icon", "iconType", "kind", "state", "iconPosition", "buttonClass", "active"], outputs: ["clicked"] }, { kind: "ngmodule", type: KitSvgIconModule }, { kind: "component", type: KitCollapsedListComponent, selector: "kit-collapsed-list", inputs: ["itemList", "lineHeight", "dropdownDefaultValueText", "gap", "disableActions", "itemTemplate", "dropdownFooterTemplate", "dropdownItemTemplate", "dropdownNoDataTemplate", "appendTo", "alwaysShowDropdown", "dropdownAlign"], outputs: ["onSelectItem"] }, { kind: "directive", type: KitTooltipDirective, selector: "[kitTooltip]", inputs: ["kitTooltipPosition", "kitTooltipFilter", "kitTooltipTemplateRef", "kitTooltipVisible"] }, { kind: "directive", type: KitBadgeDirective, selector: "[kitBadge]", inputs: ["kitBadgeText", "kitBadgeTheme", "kitBadgeVisible"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
6191
6200
|
}
|
|
6192
6201
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: KitScrollNavigationComponent, decorators: [{
|
|
6193
6202
|
type: Component,
|
|
@@ -6199,7 +6208,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImpor
|
|
|
6199
6208
|
KitTooltipDirective,
|
|
6200
6209
|
KitBadgeDirective,
|
|
6201
6210
|
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"kit-scroll-navigation\">\n <div class=\"kit-scroll-navigation-items\">\n <kit-collapsed-list [itemList]=\"collapsedListItems()\"\n [dropdownDefaultValueText]=\"dropdownDefaultText()\"\n [gap]=\"18\"\n [itemTemplate]=\"navItem\"\n [disableActions]=\"isNavigationBtnDisabled()\"\n [dropdownAlign]=\"kitCollapsedListDropdownAlign.END\"\n (onSelectItem)=\"scrollToSection($event)\" />\n </div>\n\n <div #content\n class=\"kit-scroll-navigation-content\"\n (scroll)=\"onSectionScroll()\">\n @for (item of sections?.toArray(); track item) {\n <ng-container *ngTemplateOutlet=\"item.sectionTemplate\"\n ></ng-container>\n }\n </div>\n</div>\n\n<ng-template #navItem let-item>\n <div kitBadge\n [kitBadgeVisible]=\"item.badgeCount\"\n [kitBadgeText]=\"item.badgeCount\"\n [kitBadgeTheme]=\"kitBadgeTheme.DANGER\">\n <kit-button kitTooltip\n kitTooltipFilter='.nav-item'\n class=\"nav-item\"\n [active]=\"currentVisibleItem?.value === item.value\"\n [type]=\"kitButtonType.GHOST\"\n [kind]=\"kitButtonKind.SMALL\"\n [icon]=\"item.icon\"\n [iconPosition]=\"kitButtonIconPosition.LEADING\"\n [state]=\"item.state ?? kitButtonState.DEFAULT\"\n [label]=\"item.text\"\n [title]=\"item.tooltipText\"\n [disabled]=\"isNavigationBtnDisabled()\"\n [kitTooltipVisible]=\"!!item.tooltipText\"\n ></kit-button>\n </div>\n</ng-template>\n", styles: [".kit-scroll-navigation{display:flex;flex-direction:column;height:100%}.kit-scroll-navigation-items{padding-bottom:27px}.kit-scroll-navigation .nav-item.active .kit-button .k-button{color:var(--ui-kit-color-white);border-color:var(--ui-kit-color-main);background:var(--ui-kit-color-main)}.kit-scroll-navigation-content{display:flex;flex-direction:column;flex:1;gap:20px;position:relative;overflow-y:auto}.kit-scroll-navigation-section{flex-shrink:0}\n"] }]
|
|
6202
|
-
}], ctorParameters: () => [], propDecorators: { sections: [{
|
|
6211
|
+
}], ctorParameters: () => [{ type: i1$7.ActivatedRoute }], propDecorators: { sections: [{
|
|
6203
6212
|
type: ContentChildren,
|
|
6204
6213
|
args: [KitScrollNavigationSectionComponent]
|
|
6205
6214
|
}], content: [{
|
|
@@ -7052,7 +7061,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImpor
|
|
|
7052
7061
|
type: Input
|
|
7053
7062
|
}] } });
|
|
7054
7063
|
|
|
7055
|
-
const kitDataStateToODataString = (state, utcDates = false) => toODataString(state, { utcDates });
|
|
7064
|
+
const kitDataStateToODataString = (state, utcDates = false) => decodeURIComponent(toODataString(state, { utcDates }));
|
|
7056
7065
|
|
|
7057
7066
|
class KitPageLayoutComponent {
|
|
7058
7067
|
constructor(kitNavigationMenuService) {
|