@indigina/ui-kit 1.1.547 → 1.1.548
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/fesm2022/indigina-ui-kit.mjs +734 -446
- package/fesm2022/indigina-ui-kit.mjs.map +1 -1
- package/package.json +1 -1
- package/types/indigina-ui-kit.d.ts +94 -11
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i1$7 from '@angular/common';
|
|
2
|
-
import { NgClass, NgTemplateOutlet, CommonModule, DatePipe, AsyncPipe, Location, TitleCasePipe
|
|
2
|
+
import { NgClass, NgTemplateOutlet, CommonModule, DatePipe, AsyncPipe, DecimalPipe, Location, TitleCasePipe } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { Input, ChangeDetectionStrategy, Component, input, EventEmitter, Output, ViewEncapsulation, InjectionToken, inject, Injectable, Directive, model, output, viewChild, contentChild, TemplateRef, computed, effect, ElementRef, NgZone, Renderer2, forwardRef, signal, HostListener, ContentChild, NgModule, RendererFactory2, ViewChild, DOCUMENT, ViewContainerRef, DestroyRef, afterNextRender, contentChildren, linkedSignal, ContentChildren, viewChildren, QueryList, ViewChildren, Pipe, Injector, runInInjectionContext } from '@angular/core';
|
|
5
5
|
import * as i1 from '@progress/kendo-angular-buttons';
|
|
@@ -29,7 +29,7 @@ import { v4 } from 'uuid';
|
|
|
29
29
|
import { DefaultGlobalConfig, TOAST_CONFIG, ToastrModule, ToastrService } from 'ngx-toastr';
|
|
30
30
|
import { prevDayOfWeek, Day, nextDayOfWeek } from '@progress/kendo-date-math';
|
|
31
31
|
import { endOfDay, startOfDay } from 'date-fns';
|
|
32
|
-
import { fromZonedTime,
|
|
32
|
+
import { fromZonedTime, formatInTimeZone, toZonedTime } from 'date-fns-tz';
|
|
33
33
|
import * as i1$9 from '@angular/router';
|
|
34
34
|
import { RouterModule, ActivatedRoute, Router, NavigationEnd, RouterLink } from '@angular/router';
|
|
35
35
|
import * as i1$a from '@progress/kendo-angular-dialog';
|
|
@@ -54,16 +54,16 @@ import * as i2$1 from '@progress/kendo-angular-sortable';
|
|
|
54
54
|
import { KENDO_SORTABLE } from '@progress/kendo-angular-sortable';
|
|
55
55
|
import { patch, append, removeItem, updateItem } from '@ngxs/store/operators';
|
|
56
56
|
import { toODataString, filterBy } from '@progress/kendo-data-query';
|
|
57
|
+
import { StateReset } from 'ngxs-reset-plugin';
|
|
58
|
+
import { saveAs, encodeBase64 } from '@progress/kendo-file-saver';
|
|
59
|
+
import { Workbook } from '@progress/kendo-ooxml';
|
|
60
|
+
import { catchError as catchError$1, tap as tap$1, map as map$1 } from 'rxjs/operators';
|
|
57
61
|
import { DeviceDetectorService } from 'ngx-device-detector';
|
|
58
62
|
import { signalSetFn, SIGNAL } from '@angular/core/primitives/signals';
|
|
59
|
-
import { StateReset } from 'ngxs-reset-plugin';
|
|
60
63
|
import { pdf } from '@progress/kendo-drawing';
|
|
61
|
-
import { saveAs, encodeBase64 } from '@progress/kendo-file-saver';
|
|
62
64
|
import { json2csv } from 'json-2-csv';
|
|
63
|
-
import { Workbook } from '@progress/kendo-ooxml';
|
|
64
65
|
import * as i1$f from '@progress/kendo-angular-scheduler';
|
|
65
66
|
import { ToolbarService, KENDO_SCHEDULER } from '@progress/kendo-angular-scheduler';
|
|
66
|
-
import { catchError as catchError$1, map as map$1, tap as tap$1 } from 'rxjs/operators';
|
|
67
67
|
import * as i1$g from '@progress/kendo-angular-treeview';
|
|
68
68
|
import { KENDO_TREEVIEW } from '@progress/kendo-angular-treeview';
|
|
69
69
|
|
|
@@ -10973,106 +10973,703 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
10973
10973
|
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"kit-users-settings\">\n <kit-card-details [title]=\"title()\"\n [pageSize]=\"pageSize\"\n [cardData$]=\"cardData$\"\n (cardClicked)=\"onCardSelected($event)\"\n (dataStateChanged)=\"onDataStateChanged($event)\">\n <ng-template #headerActions>\n <kit-button [label]=\"'kit.usersSettings.details.createNewUser' | translate\"\n [icon]=\"kitSvgIcon.PLUS\"\n [iconPosition]=\"kitButtonIconPosition.LEADING\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [type]=\"kitButtonType.GHOST\"\n (clicked)=\"isCreatingNewUser.set(true)\" />\n </ng-template>\n\n <ng-template #cardElement\n let-user>\n <div class=\"kit-users-settings-card-row\">\n <kit-truncate-text class=\"kit-users-settings-card\">{{ getUserDisplayName(user) }}</kit-truncate-text>\n <kit-button [icon]=\"kitSvgIcon.TRASH\"\n [kind]=\"kitButtonKind.SMALL\"\n [type]=\"kitButtonType.TEXT\"\n [iconType]=\"kitSvgIconType.STROKE\"\n [disabled]=\"isDeleteDisabled(user.id)\"\n (clicked)=\"onDeleteUser(user)\" />\n </div>\n </ng-template>\n\n <ng-template #details\n let-activeId>\n <kit-users-settings-profile [showIdentityType]=\"showIdentityType()\"\n (saveClicked)=\"saveClicked.emit()\">\n <ng-content select=\"[extended-entitlements]\" />\n </kit-users-settings-profile>\n </ng-template>\n </kit-card-details>\n\n <kit-users-settings-create-dialog [(opened)]=\"isCreatingNewUser\" />\n\n <ng-template #deleteDialogActions>\n <div class=\"kit-users-settings-delete-dialog-actions\">\n <kit-button [label]=\"'kit.usersSettings.deleteDialog.cancel' | translate\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [type]=\"kitButtonType.GHOST\"\n (clicked)=\"closeDeleteDialog()\" />\n <kit-button [label]=\"'kit.usersSettings.deleteDialog.confirm' | translate\"\n [kind]=\"kitButtonKind.MEDIUM\"\n (clicked)=\"confirmDeleteUser()\" />\n </div>\n </ng-template>\n</div>\n", styles: [".kit-users-settings-card-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.kit-users-settings-card{margin:10px 0;min-width:0}::ng-deep .kit-users-settings-delete-dialog-actions{display:flex;justify-content:space-between}\n"] }]
|
|
10974
10974
|
}], propDecorators: { cardDetailsComponent: [{ type: i0.ViewChild, args: [i0.forwardRef(() => KitCardDetailsComponent), { isSignal: true }] }], deleteDialogActionsTemplate: [{ type: i0.ViewChild, args: ['deleteDialogActions', { ...{ read: TemplateRef }, isSignal: true }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], showIdentityType: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIdentityType", required: false }] }], saveClicked: [{ type: i0.Output, args: ["saveClicked"] }] } });
|
|
10975
10975
|
|
|
10976
|
-
|
|
10977
|
-
(function (KitThemes) {
|
|
10978
|
-
KitThemes["Light"] = "light";
|
|
10979
|
-
KitThemes["Dark"] = "dark";
|
|
10980
|
-
})(KitThemes || (KitThemes = {}));
|
|
10976
|
+
const KIT_USER_PATH = new InjectionToken('kitUserPath');
|
|
10981
10977
|
|
|
10982
|
-
|
|
10983
|
-
|
|
10978
|
+
const KIT_USER_APPLICATIONS_PATH = new InjectionToken('kitUserApplicationsPath');
|
|
10979
|
+
|
|
10980
|
+
class KitUserApiService {
|
|
10981
|
+
constructor() {
|
|
10982
|
+
this.httpClient = inject(HttpClient);
|
|
10983
|
+
this.basePath = inject(KIT_BASE_PATH);
|
|
10984
|
+
this.userPath = inject(KIT_USER_PATH);
|
|
10985
|
+
this.userApplicationsPath = inject(KIT_USER_APPLICATIONS_PATH);
|
|
10986
|
+
}
|
|
10987
|
+
getUserInfo() {
|
|
10988
|
+
const url = `${this.basePath}/${this.userPath}`;
|
|
10989
|
+
return this.httpClient.get(url);
|
|
10990
|
+
}
|
|
10991
|
+
getUserApplicationList() {
|
|
10992
|
+
const url = `${this.basePath}/${this.userApplicationsPath}`;
|
|
10993
|
+
return this.httpClient.get(url);
|
|
10994
|
+
}
|
|
10995
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitUserApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
10996
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitUserApiService, providedIn: 'root' }); }
|
|
10984
10997
|
}
|
|
10998
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitUserApiService, decorators: [{
|
|
10999
|
+
type: Injectable,
|
|
11000
|
+
args: [{
|
|
11001
|
+
providedIn: 'root',
|
|
11002
|
+
}]
|
|
11003
|
+
}] });
|
|
10985
11004
|
|
|
10986
|
-
|
|
10987
|
-
|
|
10988
|
-
|
|
10989
|
-
|
|
11005
|
+
class FetchUser {
|
|
11006
|
+
static { this.type = '[User] Fetch'; }
|
|
11007
|
+
}
|
|
11008
|
+
|
|
11009
|
+
const KIT_USER_STATE_TOKEN = new StateToken('user');
|
|
11010
|
+
let KitUserState = class KitUserState {
|
|
11011
|
+
constructor() {
|
|
11012
|
+
this.kitUserApiService = inject(KitUserApiService);
|
|
10990
11013
|
}
|
|
10991
|
-
|
|
10992
|
-
|
|
11014
|
+
fetchUser(ctx) {
|
|
11015
|
+
return this.kitUserApiService.getUserInfo().pipe(tap(user => ctx.setState({
|
|
11016
|
+
data: user,
|
|
11017
|
+
loading: false,
|
|
11018
|
+
})));
|
|
10993
11019
|
}
|
|
10994
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type:
|
|
10995
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type:
|
|
11020
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitUserState, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
11021
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitUserState }); }
|
|
10996
11022
|
};
|
|
10997
11023
|
__decorate([
|
|
10998
|
-
Action(
|
|
10999
|
-
],
|
|
11000
|
-
__decorate([
|
|
11001
|
-
Selector([KIT_MOBILE_MENU_STATE_TOKEN])
|
|
11002
|
-
], KitMobileMenuState, "selectedItem", null);
|
|
11003
|
-
KitMobileMenuState = __decorate([
|
|
11024
|
+
Action(FetchUser)
|
|
11025
|
+
], KitUserState.prototype, "fetchUser", null);
|
|
11026
|
+
KitUserState = __decorate([
|
|
11004
11027
|
State({
|
|
11005
|
-
name:
|
|
11028
|
+
name: KIT_USER_STATE_TOKEN,
|
|
11006
11029
|
defaults: {
|
|
11007
|
-
|
|
11030
|
+
data: null,
|
|
11031
|
+
loading: true,
|
|
11008
11032
|
},
|
|
11009
11033
|
})
|
|
11010
|
-
],
|
|
11011
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type:
|
|
11034
|
+
], KitUserState);
|
|
11035
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitUserState, decorators: [{
|
|
11012
11036
|
type: Injectable
|
|
11013
|
-
}], propDecorators: {
|
|
11037
|
+
}], propDecorators: { fetchUser: [] } });
|
|
11014
11038
|
|
|
11015
|
-
class
|
|
11039
|
+
class KitGridCellService {
|
|
11016
11040
|
constructor() {
|
|
11041
|
+
this.translateService = inject(TranslateService);
|
|
11042
|
+
this.decimalPipe = inject(DecimalPipe);
|
|
11043
|
+
this.datePipe = inject(DatePipe);
|
|
11044
|
+
this.dateFormatConfig = inject(KIT_GRID_CELL_DATE_FORMAT_CONFIG, { optional: true });
|
|
11017
11045
|
this.store = inject(Store);
|
|
11018
|
-
this.
|
|
11019
|
-
|
|
11020
|
-
this.
|
|
11021
|
-
this.
|
|
11022
|
-
this.themes = KitThemes;
|
|
11023
|
-
this.selectedItem = this.store.selectSignal(KitMobileMenuState.selectedItem);
|
|
11046
|
+
this.userState = this.store.selectSignal(KIT_USER_STATE_TOKEN)();
|
|
11047
|
+
const dateFormatConfig = this.dateFormatConfig;
|
|
11048
|
+
this.dateFormat = dateFormatConfig?.dateFormat ?? KIT_DATE_FORMAT;
|
|
11049
|
+
this.dateTimeFormat = dateFormatConfig?.dateTimeFormat ?? KIT_DATETIME_FORMAT_LONG;
|
|
11024
11050
|
}
|
|
11025
|
-
|
|
11026
|
-
this.
|
|
11051
|
+
createCellValue(columnType, columnField, dataItem, translationMap = {}, defaultValue = '', valueTransforms = {}) {
|
|
11052
|
+
const rawValue = this.getCellValue(dataItem, columnField);
|
|
11053
|
+
const value = valueTransforms[columnField]?.(rawValue) ?? rawValue;
|
|
11054
|
+
if (columnField in translationMap && value != null && value !== '') {
|
|
11055
|
+
return this.translateService.instant(translationMap[columnField](value)) ?? defaultValue;
|
|
11056
|
+
}
|
|
11057
|
+
switch (columnType) {
|
|
11058
|
+
case 'number':
|
|
11059
|
+
return this.decimalPipe.transform(value) ?? defaultValue;
|
|
11060
|
+
case 'plainNumber':
|
|
11061
|
+
return value || defaultValue;
|
|
11062
|
+
case 'date':
|
|
11063
|
+
return this.datePipe.transform(value, this.dateFormat, 'UTC') ?? defaultValue;
|
|
11064
|
+
case 'dateTime':
|
|
11065
|
+
return this.datePipe.transform(value, this.dateTimeFormat, 'UTC') ?? defaultValue;
|
|
11066
|
+
case 'dateLocal':
|
|
11067
|
+
return this.datePipe.transform(value, this.dateFormat) ?? defaultValue;
|
|
11068
|
+
case 'dateTimeLocal':
|
|
11069
|
+
return this.datePipe.transform(value, this.dateTimeFormat) ?? defaultValue;
|
|
11070
|
+
case 'dateZone':
|
|
11071
|
+
return value ? formatInTimeZone(value, this.userState.data?.namedTimeZone ?? 'UTC', this.dateFormat) : defaultValue;
|
|
11072
|
+
case 'dateTimeZone':
|
|
11073
|
+
return value ? formatInTimeZone(value, this.userState.data?.namedTimeZone ?? 'UTC', this.dateTimeFormat) : defaultValue;
|
|
11074
|
+
case 'boolean':
|
|
11075
|
+
return this.translateService.instant(value ? 'common.yes' : 'common.no');
|
|
11076
|
+
default:
|
|
11077
|
+
return value || defaultValue;
|
|
11078
|
+
}
|
|
11027
11079
|
}
|
|
11028
|
-
|
|
11029
|
-
|
|
11080
|
+
getCellValue(dataItem, field) {
|
|
11081
|
+
let value = dataItem[field];
|
|
11082
|
+
if (!value) {
|
|
11083
|
+
value = this.getNestedGridCellValue(dataItem, field);
|
|
11084
|
+
}
|
|
11085
|
+
return value;
|
|
11086
|
+
}
|
|
11087
|
+
getNestedGridCellValue(dataItem, field) {
|
|
11088
|
+
const value = field.split('.').reduce((acc, key) => acc !== null && typeof acc === 'object' && key in acc
|
|
11089
|
+
? acc[key]
|
|
11090
|
+
: undefined, dataItem);
|
|
11091
|
+
return value === 0 ? 0 : value || '';
|
|
11092
|
+
}
|
|
11093
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitGridCellService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
11094
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitGridCellService }); }
|
|
11030
11095
|
}
|
|
11031
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type:
|
|
11032
|
-
type:
|
|
11033
|
-
|
|
11034
|
-
KitSvgIconComponent,
|
|
11035
|
-
NgClass,
|
|
11036
|
-
RouterLink,
|
|
11037
|
-
], template: "<div class=\"header\"\n [ngClass]=\"theme()\">\n @if (selectedItem()) {\n <kit-svg-icon class=\"header-icon\"\n [routerLink]=\"['/']\"\n [icon]=\"kitSvgIcon.MOBILE_HOME\"\n (click)=\"setSelectedItem(null)\" />\n\n <div class=\"header-selected-category\">\n <kit-svg-icon class=\"header-icon category\"\n [icon]=\"selectedItem()?.icon\" \n [iconClass]=\"kitSvgIconType.STROKE\" />\n <p class=\"header-selected-category-title\">{{ selectedItem()?.title }}</p>\n </div>\n } @else {\n <div class=\"header-logo\"\n [routerLink]=\"['/']\"\n (click)=\"selectedItem() && setSelectedItem(null)\">\n @if (theme() === themes.Light) {\n <img class=\"header-logo\" \n src=\"assets/config/logo.svg\" alt=\"Logo\"/>\n } @else {\n <img class=\"header-logo\" \n src=\"assets/config/logo-dark-theme.svg\" alt=\"Logo\"/>\n }\n </div>\n }\n</div>\n", styles: [".header{display:flex;align-items:center;justify-content:space-between;padding:0 25px;height:100%;border-bottom:1px solid var(--ui-kit-color-grey-11)}.header-selected-category{display:flex;align-items:center;gap:15px}.header-selected-category-title{color:var(--ui-kit-color-navy);flex:16px;line-height:24px}.header-icon{width:38px;height:38px;cursor:pointer}.header-icon.category{fill:none;cursor:auto}.header-logo{margin:auto;width:212px;height:38px}.header.dark{background-color:var(--ui-kit-color-navy);border-bottom-color:var(--ui-kit-color-grey-14)}.header.dark .header-selected-category-title{color:var(--ui-kit-color-white)}\n"] }]
|
|
11038
|
-
}], propDecorators: { theme: [{ type: i0.Input, args: [{ isSignal: true, alias: "theme", required: false }] }] } });
|
|
11096
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitGridCellService, decorators: [{
|
|
11097
|
+
type: Injectable
|
|
11098
|
+
}], ctorParameters: () => [] });
|
|
11039
11099
|
|
|
11040
|
-
class
|
|
11100
|
+
class KitExcelExportService {
|
|
11041
11101
|
constructor() {
|
|
11042
|
-
this.
|
|
11043
|
-
this.
|
|
11044
|
-
this.
|
|
11045
|
-
this.sidebarContainer = viewChild('sidebarContainer', ...(ngDevMode ? [{ debugName: "sidebarContainer" }] : /* istanbul ignore next */ []));
|
|
11046
|
-
this.topBarContainer = viewChild('topBarContainer', ...(ngDevMode ? [{ debugName: "topBarContainer" }] : /* istanbul ignore next */ []));
|
|
11047
|
-
this.isMenuCollapsed = this.kitNavigationMenuService.getCollapsedState();
|
|
11048
|
-
this.hasMenuSelected = this.kitNavigationMenuService.getSelectedState();
|
|
11049
|
-
this.hasSidebar = signal(false, ...(ngDevMode ? [{ debugName: "hasSidebar" }] : /* istanbul ignore next */ []));
|
|
11050
|
-
this.hasTopBar = signal(false, ...(ngDevMode ? [{ debugName: "hasTopBar" }] : /* istanbul ignore next */ []));
|
|
11051
|
-
effect(() => {
|
|
11052
|
-
const sidebar = this.sidebarContainer()?.nativeElement;
|
|
11053
|
-
const topBar = this.topBarContainer()?.nativeElement;
|
|
11054
|
-
this.hasSidebar.set(!!sidebar?.querySelector('[sidebar]'));
|
|
11055
|
-
this.hasTopBar.set(!!topBar?.querySelector('[topBar]'));
|
|
11056
|
-
});
|
|
11102
|
+
this.translateService = inject(TranslateService);
|
|
11103
|
+
this.store = inject(Store);
|
|
11104
|
+
this.gridCellService = inject(KitGridCellService);
|
|
11057
11105
|
}
|
|
11058
|
-
|
|
11059
|
-
|
|
11106
|
+
async export(data, exportedColumns, exportedFileName, translationMap, valueTransforms = {}) {
|
|
11107
|
+
const userTimezone = this.store.selectSnapshot(KIT_USER_STATE_TOKEN).data?.namedTimeZone ?? 'UTC';
|
|
11108
|
+
const workbook = { sheets: [{ rows: [], columns: [] }] };
|
|
11109
|
+
const columns = exportedColumns.map(({ title, field }) => ({
|
|
11110
|
+
value: this.translateService.instant(title || field),
|
|
11111
|
+
background: '#7a7a7a',
|
|
11112
|
+
color: '#fff',
|
|
11113
|
+
width: 170,
|
|
11114
|
+
}));
|
|
11115
|
+
workbook.sheets[0].rows = this.getExportedExcelRows(columns, data, exportedColumns, translationMap, userTimezone, valueTransforms);
|
|
11116
|
+
workbook.sheets[0].columns = columns;
|
|
11117
|
+
const dataUrl = await new Workbook(workbook).toDataURL();
|
|
11118
|
+
return saveAs(dataUrl, `${exportedFileName}.xlsx`);
|
|
11060
11119
|
}
|
|
11061
|
-
|
|
11062
|
-
|
|
11120
|
+
getExportedExcelRows(columns, data, gridColumns, translationMap, userTimezone, valueTransforms = {}) {
|
|
11121
|
+
const rows = [{ cells: columns, type: 'header' }];
|
|
11122
|
+
for (const row of data) {
|
|
11123
|
+
const rowCells = gridColumns.map((column) => {
|
|
11124
|
+
const rawValue = this.gridCellService.getCellValue(row, column.field);
|
|
11125
|
+
const value = valueTransforms[column.field]?.(rawValue) ?? rawValue;
|
|
11126
|
+
switch (column.type) {
|
|
11127
|
+
case 'number': {
|
|
11128
|
+
return { value: (value ?? undefined) };
|
|
11129
|
+
}
|
|
11130
|
+
case 'time':
|
|
11131
|
+
return { format: column.excelFormat, value: this.timeStringToExcelFraction(value) };
|
|
11132
|
+
case 'date':
|
|
11133
|
+
case 'dateTime': {
|
|
11134
|
+
const format = column.excelFormat || (column.type === 'date' ? KIT_DATE_FORMAT : KIT_DATETIME_FORMAT_LONG);
|
|
11135
|
+
const dateValue = value ? this.truncateToSeconds(this.convertToUtcDate(value)) : undefined;
|
|
11136
|
+
return { format, value: dateValue };
|
|
11137
|
+
}
|
|
11138
|
+
case 'dateLocal':
|
|
11139
|
+
case 'dateTimeLocal': {
|
|
11140
|
+
const format = column.excelFormat || (column.type === 'dateLocal' ? KIT_DATE_FORMAT : KIT_DATETIME_FORMAT_LONG);
|
|
11141
|
+
const dateValue = value ? this.truncateToSeconds(new Date(value)) : undefined;
|
|
11142
|
+
return { format, value: dateValue };
|
|
11143
|
+
}
|
|
11144
|
+
case 'dateZone':
|
|
11145
|
+
case 'dateTimeZone': {
|
|
11146
|
+
const format = column.excelFormat || (column.type === 'dateZone' ? KIT_DATE_FORMAT : KIT_DATETIME_FORMAT_LONG);
|
|
11147
|
+
const dateValue = value
|
|
11148
|
+
? this.truncateToSeconds(toZonedTime(new Date(value), userTimezone))
|
|
11149
|
+
: undefined;
|
|
11150
|
+
return { format, value: dateValue };
|
|
11151
|
+
}
|
|
11152
|
+
}
|
|
11153
|
+
return { value: this.gridCellService.createCellValue(column.type, column.field, row, translationMap, '', valueTransforms) };
|
|
11154
|
+
});
|
|
11155
|
+
rows.push({ cells: rowCells, type: 'data' });
|
|
11156
|
+
}
|
|
11157
|
+
return rows;
|
|
11158
|
+
}
|
|
11159
|
+
timeStringToExcelFraction(time) {
|
|
11160
|
+
if (!time) {
|
|
11161
|
+
return '';
|
|
11162
|
+
}
|
|
11163
|
+
const [hoursStr, minutesStr,] = time.split(':');
|
|
11164
|
+
const hours = Number.parseInt(hoursStr, 10);
|
|
11165
|
+
const minutes = Number.parseInt(minutesStr, 10);
|
|
11166
|
+
return (hours * 60 + minutes) / (24 * 60);
|
|
11167
|
+
}
|
|
11168
|
+
convertToUtcDate(dateString) {
|
|
11169
|
+
const date = new Date(dateString);
|
|
11170
|
+
const timezoneOffset = date.getTimezoneOffset();
|
|
11171
|
+
return new Date(date.getTime() + timezoneOffset * 60 * 1000);
|
|
11172
|
+
}
|
|
11173
|
+
truncateToSeconds(date) {
|
|
11174
|
+
const result = new Date(date);
|
|
11175
|
+
result.setMilliseconds(0);
|
|
11176
|
+
return result;
|
|
11177
|
+
}
|
|
11178
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitExcelExportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
11179
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitExcelExportService }); }
|
|
11063
11180
|
}
|
|
11064
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type:
|
|
11065
|
-
type:
|
|
11066
|
-
|
|
11181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitExcelExportService, decorators: [{
|
|
11182
|
+
type: Injectable
|
|
11183
|
+
}] });
|
|
11184
|
+
|
|
11185
|
+
const KIT_ENTITY_CREATE_SERVICE = new InjectionToken('kitEntityCreateService');
|
|
11186
|
+
class KitCreateEntityDialogComponent extends DialogContentBase {
|
|
11187
|
+
constructor() {
|
|
11188
|
+
const dialog = inject(DialogRef);
|
|
11189
|
+
super(dialog);
|
|
11190
|
+
this.entityService = inject(KIT_ENTITY_CREATE_SERVICE);
|
|
11191
|
+
this.kitFormErrors = inject(KitFormErrors);
|
|
11192
|
+
this.formBuilder = inject(FormBuilder);
|
|
11193
|
+
this.maxLength = input(256, ...(ngDevMode ? [{ debugName: "maxLength" }] : /* istanbul ignore next */ []));
|
|
11194
|
+
this.form = this.formBuilder.group({
|
|
11195
|
+
name: this.formBuilder.control('', [
|
|
11196
|
+
Validators.required,
|
|
11197
|
+
kitWhitespaceValidator(),
|
|
11198
|
+
Validators.maxLength(this.maxLength()),
|
|
11199
|
+
]),
|
|
11200
|
+
});
|
|
11201
|
+
this.kitButtonKind = KitButtonKind;
|
|
11202
|
+
this.kitButtonType = KitButtonType;
|
|
11203
|
+
this.isSaving = signal(false, ...(ngDevMode ? [{ debugName: "isSaving" }] : /* istanbul ignore next */ []));
|
|
11204
|
+
this.getTextboxState = getTextboxState;
|
|
11205
|
+
effect(() => {
|
|
11206
|
+
const maxLength = this.maxLength();
|
|
11207
|
+
this.form.controls['name'].setValidators([
|
|
11208
|
+
Validators.required,
|
|
11209
|
+
kitWhitespaceValidator(),
|
|
11210
|
+
Validators.maxLength(maxLength),
|
|
11211
|
+
]);
|
|
11212
|
+
this.form.controls['name'].updateValueAndValidity({ emitEvent: false });
|
|
11213
|
+
});
|
|
11214
|
+
}
|
|
11215
|
+
createEntity() {
|
|
11216
|
+
this.isSaving.set(true);
|
|
11217
|
+
this.entityService.save({ name: this.form.controls['name'].value.trim() }).pipe(finalize(() => this.isSaving.set(false))).subscribe((data) => {
|
|
11218
|
+
this.dialog.close(data);
|
|
11219
|
+
});
|
|
11220
|
+
}
|
|
11221
|
+
getFormErrorMessages(form, controlName) {
|
|
11222
|
+
return this.kitFormErrors.getErrors(form.controls[controlName]).join('. ');
|
|
11223
|
+
}
|
|
11224
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitCreateEntityDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11225
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.4", type: KitCreateEntityDialogComponent, isStandalone: true, selector: "kit-create-entity-dialog", inputs: { maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null } }, providers: [KitFormErrors], usesInheritance: true, ngImport: i0, template: "<div [formGroup]=\"form\">\n <kit-textbox class=\"textbox\"\n formControlName=\"name\"\n [label]=\"'Name' | translate\"\n [showStateIcon]=\"false\"\n [state]=\"getTextboxState(form.get('name'))\"\n [messageText]=\"getFormErrorMessages(form, 'name')\" />\n\n <kit-dialog-actions>\n <kit-button [label]=\"'Cancel' | translate\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [type]=\"kitButtonType.GHOST\"\n (clicked)=\"dialog.close()\" />\n <kit-button [label]=\"'Save' | translate\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [disabled]=\"form.invalid || isSaving()\"\n (clicked)=\"createEntity()\" />\n </kit-dialog-actions>\n</div>\n", styles: ["::ng-deep .kit-dialog .k-dialog{min-width:400px}::ng-deep .kit-dialog .k-dialog .k-dialog-content{padding:20px 25px}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "component", type: KitTextboxComponent, selector: "kit-textbox", inputs: ["placeholder", "label", "labelTooltip", "defaultValue", "messageIcon", "messageText", "messageTemplate", "disabled", "maxlength", "state", "size", "icon", "clearButton", "showStateIcon", "readonly", "customStateIcon", "type"], outputs: ["defaultValueChange", "disabledChange", "blured", "focused", "changed"] }, { kind: "component", type: KitDialogActionsComponent, selector: "kit-dialog-actions" }, { kind: "component", type: KitButtonComponent, selector: "kit-button", inputs: ["disabled", "label", "type", "icon", "iconType", "kind", "state", "iconPosition", "buttonClass", "active"], outputs: ["clicked"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$8.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$8.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$8.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i1$e.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11226
|
+
}
|
|
11227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitCreateEntityDialogComponent, decorators: [{
|
|
11228
|
+
type: Component,
|
|
11229
|
+
args: [{ selector: 'kit-create-entity-dialog', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
11230
|
+
TranslateModule,
|
|
11231
|
+
KitTextboxComponent,
|
|
11232
|
+
KitDialogActionsComponent,
|
|
11233
|
+
KitButtonComponent,
|
|
11234
|
+
FormsModule,
|
|
11235
|
+
ReactiveFormsModule,
|
|
11236
|
+
], providers: [KitFormErrors], template: "<div [formGroup]=\"form\">\n <kit-textbox class=\"textbox\"\n formControlName=\"name\"\n [label]=\"'Name' | translate\"\n [showStateIcon]=\"false\"\n [state]=\"getTextboxState(form.get('name'))\"\n [messageText]=\"getFormErrorMessages(form, 'name')\" />\n\n <kit-dialog-actions>\n <kit-button [label]=\"'Cancel' | translate\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [type]=\"kitButtonType.GHOST\"\n (clicked)=\"dialog.close()\" />\n <kit-button [label]=\"'Save' | translate\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [disabled]=\"form.invalid || isSaving()\"\n (clicked)=\"createEntity()\" />\n </kit-dialog-actions>\n</div>\n", styles: ["::ng-deep .kit-dialog .k-dialog{min-width:400px}::ng-deep .kit-dialog .k-dialog .k-dialog-content{padding:20px 25px}\n"] }]
|
|
11237
|
+
}], ctorParameters: () => [], propDecorators: { maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }] } });
|
|
11238
|
+
|
|
11239
|
+
const KIT_GRID_COLUMN_WIDTH = 170;
|
|
11240
|
+
const KIT_GRID_PAGE_SIZE = 10;
|
|
11241
|
+
|
|
11242
|
+
var KitPermissionTypes;
|
|
11243
|
+
(function (KitPermissionTypes) {
|
|
11244
|
+
KitPermissionTypes["Create"] = "Create";
|
|
11245
|
+
KitPermissionTypes["Delete"] = "Delete";
|
|
11246
|
+
KitPermissionTypes["Edit"] = "Edit";
|
|
11247
|
+
KitPermissionTypes["View"] = "View";
|
|
11248
|
+
KitPermissionTypes["Set"] = "Set";
|
|
11249
|
+
KitPermissionTypes["Use"] = "Use";
|
|
11250
|
+
})(KitPermissionTypes || (KitPermissionTypes = {}));
|
|
11251
|
+
const defaultUserRolesSort = [{ field: 'name', dir: 'asc' }];
|
|
11252
|
+
const exportedUserRoleColumns = [
|
|
11253
|
+
kitBuildGridColumn('name', 'Name', 'string', false, false, KIT_GRID_COLUMN_WIDTH),
|
|
11254
|
+
];
|
|
11255
|
+
|
|
11256
|
+
class KitPartnerDetailsComponent {
|
|
11257
|
+
constructor() {
|
|
11258
|
+
this.kitDialogService = inject(KitDialogService);
|
|
11259
|
+
this.translateService = inject(TranslateService);
|
|
11260
|
+
this.viewContainerRef = inject(ViewContainerRef);
|
|
11261
|
+
this.id = input.required(...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
11262
|
+
this.name = input.required(...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
11263
|
+
this.userPermissionTypes = input.required(...(ngDevMode ? [{ debugName: "userPermissionTypes" }] : /* istanbul ignore next */ []));
|
|
11264
|
+
this.updatedName = output();
|
|
11265
|
+
this.deleted = output();
|
|
11266
|
+
this.permissionTypes = KitPermissionTypes;
|
|
11267
|
+
this.kitSvgIcon = KitSvgIcon;
|
|
11268
|
+
this.kitSvgIconType = KitSvgIconType;
|
|
11269
|
+
this.kitButtonType = KitButtonType;
|
|
11270
|
+
this.kitButtonKind = KitButtonKind;
|
|
11271
|
+
this.kitButtonIconPosition = KitButtonIconPosition;
|
|
11272
|
+
this.nameValidators = [
|
|
11273
|
+
Validators.required,
|
|
11274
|
+
Validators.maxLength(50),
|
|
11275
|
+
kitWhitespaceValidator(),
|
|
11276
|
+
];
|
|
11277
|
+
this.cancelAction = {
|
|
11278
|
+
text: this.translateService.instant('Cancel'),
|
|
11279
|
+
cssClass: `${KitButtonType.GHOST} ${KitButtonState.DEFAULT} ${KitButtonKind.MEDIUM}`,
|
|
11280
|
+
};
|
|
11281
|
+
this.deleteAction = {
|
|
11282
|
+
text: this.translateService.instant('Buttons.Delete'),
|
|
11283
|
+
cssClass: `${KitButtonType.PRIMARY} ${KitButtonState.ERROR} ${KitButtonKind.MEDIUM}`,
|
|
11284
|
+
};
|
|
11285
|
+
}
|
|
11286
|
+
deletePartner() {
|
|
11287
|
+
this.kitDialogService.openDialog({
|
|
11288
|
+
title: `${this.translateService.instant('Buttons.Delete')} ${this.name()}`,
|
|
11289
|
+
content: `${this.translateService.instant('Confirmation.Delete')}: ${this.name()}?`,
|
|
11290
|
+
appendTo: this.viewContainerRef,
|
|
11291
|
+
actions: [
|
|
11292
|
+
this.cancelAction,
|
|
11293
|
+
this.deleteAction,
|
|
11294
|
+
],
|
|
11295
|
+
cssClass: 'confirmation-dialog-limited-width',
|
|
11296
|
+
});
|
|
11297
|
+
this.kitDialogService.dialogRef?.result.pipe(take(1)).subscribe(action => {
|
|
11298
|
+
if (action === this.deleteAction) {
|
|
11299
|
+
this.deleted.emit({ id: this.id() });
|
|
11300
|
+
}
|
|
11301
|
+
});
|
|
11302
|
+
}
|
|
11303
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitPartnerDetailsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11304
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.4", type: KitPartnerDetailsComponent, isStandalone: true, selector: "kit-partner-details", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: true, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, userPermissionTypes: { classPropertyName: "userPermissionTypes", publicName: "userPermissionTypes", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { updatedName: "updatedName", deleted: "deleted" }, ngImport: i0, template: "<div class=\"partner-details\">\n <kit-entity-section-container>\n <ng-container title>\n <div class=\"details-header\">\n <span>{{ \"kit.partners.detailsTitle\" | translate }}</span>\n <kit-button *kitPermission=\"[permissionTypes.Delete]; user: userPermissionTypes()\"\n [label]=\"'kit.common.delete' | translate\"\n [icon]=\"kitSvgIcon.TRASH\"\n [iconType]=\"kitSvgIconType.STROKE\"\n [iconPosition]=\"kitButtonIconPosition.LEADING\"\n [type]=\"kitButtonType.GHOST\"\n [kind]=\"kitButtonKind.MEDIUM\"\n (clicked)=\"deletePartner()\"/>\n </div>\n </ng-container>\n </kit-entity-section-container>\n <div class=\"details-content\">\n <kit-textbox-actions class=\"textbox-name\"\n [disabled]=\"!userPermissionTypes().includes(permissionTypes.Edit)\"\n [showActions]=\"userPermissionTypes().includes(permissionTypes.Edit)\"\n [label]=\"'kit.common.name' | translate\"\n [defaultValue]=\"name()\"\n [validators]=\"nameValidators\"\n (saved)=\"updatedName.emit($event)\"/>\n </div>\n</div>\n", styles: [".partner-details .details-header{display:flex;justify-content:space-between;align-items:center}.partner-details .details-content{padding:20px 0}.partner-details ::ng-deep .kit-entity-section-container{padding-bottom:10px;gap:0}.partner-details ::ng-deep .kit-entity-section-container-title{font-weight:400}\n"], dependencies: [{ kind: "component", type: KitButtonComponent, selector: "kit-button", inputs: ["disabled", "label", "type", "icon", "iconType", "kind", "state", "iconPosition", "buttonClass", "active"], outputs: ["clicked"] }, { kind: "component", type: KitEntitySectionContainerComponent, selector: "kit-entity-section-container" }, { kind: "component", type: KitTextboxActionsComponent, selector: "kit-textbox-actions", inputs: ["defaultValue", "placeholder", "label", "validators", "disabled", "showActions", "clearOnFocus"], outputs: ["defaultValueChange", "saved", "canceled"] }, { kind: "directive", type: KitPermissionDirective, selector: "[kitPermission]", inputs: ["kitPermission", "kitPermissionUser"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11305
|
+
}
|
|
11306
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitPartnerDetailsComponent, decorators: [{
|
|
11307
|
+
type: Component,
|
|
11308
|
+
args: [{ selector: 'kit-partner-details', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
11309
|
+
KitButtonComponent,
|
|
11310
|
+
KitEntitySectionContainerComponent,
|
|
11311
|
+
KitTextboxActionsComponent,
|
|
11312
|
+
KitPermissionDirective,
|
|
11313
|
+
TranslatePipe,
|
|
11314
|
+
], template: "<div class=\"partner-details\">\n <kit-entity-section-container>\n <ng-container title>\n <div class=\"details-header\">\n <span>{{ \"kit.partners.detailsTitle\" | translate }}</span>\n <kit-button *kitPermission=\"[permissionTypes.Delete]; user: userPermissionTypes()\"\n [label]=\"'kit.common.delete' | translate\"\n [icon]=\"kitSvgIcon.TRASH\"\n [iconType]=\"kitSvgIconType.STROKE\"\n [iconPosition]=\"kitButtonIconPosition.LEADING\"\n [type]=\"kitButtonType.GHOST\"\n [kind]=\"kitButtonKind.MEDIUM\"\n (clicked)=\"deletePartner()\"/>\n </div>\n </ng-container>\n </kit-entity-section-container>\n <div class=\"details-content\">\n <kit-textbox-actions class=\"textbox-name\"\n [disabled]=\"!userPermissionTypes().includes(permissionTypes.Edit)\"\n [showActions]=\"userPermissionTypes().includes(permissionTypes.Edit)\"\n [label]=\"'kit.common.name' | translate\"\n [defaultValue]=\"name()\"\n [validators]=\"nameValidators\"\n (saved)=\"updatedName.emit($event)\"/>\n </div>\n</div>\n", styles: [".partner-details .details-header{display:flex;justify-content:space-between;align-items:center}.partner-details .details-content{padding:20px 0}.partner-details ::ng-deep .kit-entity-section-container{padding-bottom:10px;gap:0}.partner-details ::ng-deep .kit-entity-section-container-title{font-weight:400}\n"] }]
|
|
11315
|
+
}], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: true }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], userPermissionTypes: [{ type: i0.Input, args: [{ isSignal: true, alias: "userPermissionTypes", required: true }] }], updatedName: [{ type: i0.Output, args: ["updatedName"] }], deleted: [{ type: i0.Output, args: ["deleted"] }] } });
|
|
11316
|
+
|
|
11317
|
+
const defaultPartnerSort = [{ field: 'name', dir: 'asc' }];
|
|
11318
|
+
const exportedPartnerColumns = [
|
|
11319
|
+
kitBuildGridColumn('name', 'Name', 'string', false, false, KIT_GRID_COLUMN_WIDTH),
|
|
11320
|
+
];
|
|
11321
|
+
|
|
11322
|
+
class KitHttpErrorHandlerService {
|
|
11323
|
+
constructor() {
|
|
11324
|
+
this.kitNotificationService = inject(KitNotificationService);
|
|
11325
|
+
this.translateService = inject(TranslateService);
|
|
11326
|
+
this.router = inject(Router);
|
|
11327
|
+
}
|
|
11328
|
+
handleServerError(error) {
|
|
11329
|
+
if (error.error instanceof ErrorEvent) {
|
|
11330
|
+
this.showErrorNotification(`${this.translateService.instant('kit.http.clientError')} ${error.error.message}`);
|
|
11331
|
+
return throwError(() => error);
|
|
11332
|
+
}
|
|
11333
|
+
switch (error.status) {
|
|
11334
|
+
case HttpStatusCode.Unauthorized:
|
|
11335
|
+
this.showErrorNotification(this.translateService.instant('kit.http.unauthorized'));
|
|
11336
|
+
break;
|
|
11337
|
+
case HttpStatusCode.Forbidden:
|
|
11338
|
+
this.showErrorNotification(this.translateService.instant('kit.http.forbidden'));
|
|
11339
|
+
this.router.navigate(['forbidden']);
|
|
11340
|
+
break;
|
|
11341
|
+
case HttpStatusCode.NotFound:
|
|
11342
|
+
this.showErrorNotification(this.translateService.instant('kit.http.notFound'));
|
|
11343
|
+
break;
|
|
11344
|
+
case HttpStatusCode.BadRequest:
|
|
11345
|
+
this.showErrorNotification(`${this.translateService.instant('kit.http.validationError')} ${error.error?.title ?? ''}`);
|
|
11346
|
+
break;
|
|
11347
|
+
default:
|
|
11348
|
+
if (error.status >= HttpStatusCode.InternalServerError) {
|
|
11349
|
+
this.showErrorNotification(`${this.translateService.instant('kit.http.serverError')} ${error.error?.title ?? ''}`);
|
|
11350
|
+
}
|
|
11351
|
+
}
|
|
11352
|
+
return throwError(() => error);
|
|
11353
|
+
}
|
|
11354
|
+
showSuccessNotification(message) {
|
|
11355
|
+
this.kitNotificationService.addNotification(KitNotificationType.SUCCESS, message, true, 3000);
|
|
11356
|
+
}
|
|
11357
|
+
showErrorNotification(message) {
|
|
11358
|
+
this.kitNotificationService.addNotification(KitNotificationType.ERROR, message);
|
|
11359
|
+
}
|
|
11360
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitHttpErrorHandlerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
11361
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitHttpErrorHandlerService }); }
|
|
11362
|
+
}
|
|
11363
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitHttpErrorHandlerService, decorators: [{
|
|
11364
|
+
type: Injectable
|
|
11365
|
+
}] });
|
|
11366
|
+
|
|
11367
|
+
class KitPartnerService {
|
|
11368
|
+
constructor() {
|
|
11369
|
+
this.httpClient = inject(HttpClient);
|
|
11370
|
+
this.baseUrl = `${trimTrailingSlash(inject(KIT_BASE_PATH))}`;
|
|
11371
|
+
this.kitHttpErrorHandlerService = inject(KitHttpErrorHandlerService);
|
|
11372
|
+
this.translateService = inject(TranslateService);
|
|
11373
|
+
}
|
|
11374
|
+
fetch({ skip, take, sort, filter }) {
|
|
11375
|
+
return this.httpClient.get(`${this.baseUrl}/partners`, { params: kitBuildHttpParams({ $skip: skip, $top: take, $orderby: kitBuildSortString(sort), $filter: kitBuildOdataFilter(filter) }) }).pipe(catchError$1((err) => this.kitHttpErrorHandlerService.handleServerError(err)));
|
|
11376
|
+
}
|
|
11377
|
+
fetchDetails(id) {
|
|
11378
|
+
return this.httpClient.get(`${this.baseUrl}/partners/${id}`).pipe(catchError$1((err) => this.kitHttpErrorHandlerService.handleServerError(err)));
|
|
11379
|
+
}
|
|
11380
|
+
save(payload) {
|
|
11381
|
+
if (!payload.id) {
|
|
11382
|
+
return this.httpClient.post(`${this.baseUrl}/partners`, { ...payload, permissions: {} }).pipe(tap$1(() => this.kitHttpErrorHandlerService.showSuccessNotification(this.translateService.instant('kit.http.savedSuccessfully'))), catchError$1((err) => this.kitHttpErrorHandlerService.handleServerError(err)));
|
|
11383
|
+
}
|
|
11384
|
+
return this.httpClient.put(`${this.baseUrl}/partners/${payload.id}`, payload).pipe(tap$1(() => this.kitHttpErrorHandlerService.showSuccessNotification(this.translateService.instant('kit.http.savedSuccessfully'))), catchError$1((err) => this.kitHttpErrorHandlerService.handleServerError(err)));
|
|
11385
|
+
}
|
|
11386
|
+
delete(id) {
|
|
11387
|
+
return this.httpClient.delete(`${this.baseUrl}/partners/${id}`).pipe(tap$1(() => this.kitHttpErrorHandlerService.showSuccessNotification(this.translateService.instant('kit.http.removedSuccessfully'))), catchError$1((err) => this.kitHttpErrorHandlerService.handleServerError(err)));
|
|
11388
|
+
}
|
|
11389
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitPartnerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
11390
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitPartnerService }); }
|
|
11391
|
+
}
|
|
11392
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitPartnerService, decorators: [{
|
|
11393
|
+
type: Injectable
|
|
11394
|
+
}] });
|
|
11395
|
+
|
|
11396
|
+
class FetchPartners extends KitAbstractPayloadAction {
|
|
11397
|
+
static { this.type = '[Partners] Fetch'; }
|
|
11398
|
+
}
|
|
11399
|
+
class DeletePartner extends KitAbstractPayloadAction {
|
|
11400
|
+
static { this.type = '[Partners] Delete'; }
|
|
11401
|
+
}
|
|
11402
|
+
class UpdatePartnerName extends KitAbstractPayloadAction {
|
|
11403
|
+
static { this.type = '[Partners] Update Name'; }
|
|
11404
|
+
}
|
|
11405
|
+
|
|
11406
|
+
const KIT_PARTNERS_STATE_TOKEN = new StateToken('partners');
|
|
11407
|
+
let KitPartnerState = class KitPartnerState {
|
|
11408
|
+
constructor() {
|
|
11409
|
+
this.partnerService = inject(KitPartnerService);
|
|
11410
|
+
}
|
|
11411
|
+
fetchPartners(ctx, action) {
|
|
11412
|
+
const { skip, take, filter, sort } = action.payload;
|
|
11413
|
+
return this.partnerService.fetch({ skip, take, filter, sort }).pipe(tap(response => ctx.setState({
|
|
11414
|
+
data: response.data,
|
|
11415
|
+
total: response.total,
|
|
11416
|
+
loading: false,
|
|
11417
|
+
})), catchError(error => {
|
|
11418
|
+
ctx.setState({
|
|
11419
|
+
data: [],
|
|
11420
|
+
total: 0,
|
|
11421
|
+
loading: false,
|
|
11422
|
+
});
|
|
11423
|
+
return throwError(() => error);
|
|
11424
|
+
}));
|
|
11425
|
+
}
|
|
11426
|
+
deletePartner(ctx, { payload }) {
|
|
11427
|
+
return this.partnerService.delete(payload.id).pipe(tap(() => {
|
|
11428
|
+
const state = ctx.getState();
|
|
11429
|
+
const filteredData = state.data.filter(partner => partner.id !== payload.id);
|
|
11430
|
+
const wasDeleted = filteredData.length < state.data.length;
|
|
11431
|
+
ctx.patchState({
|
|
11432
|
+
data: filteredData,
|
|
11433
|
+
total: wasDeleted ? (state.total ?? 1) - 1 : state.total,
|
|
11434
|
+
loading: false,
|
|
11435
|
+
});
|
|
11436
|
+
}));
|
|
11437
|
+
}
|
|
11438
|
+
updatePartnerName(ctx, { payload }) {
|
|
11439
|
+
return this.partnerService.save(payload).pipe(tap(() => {
|
|
11440
|
+
ctx.setState(patch({
|
|
11441
|
+
data: updateItem(partner => partner?.id === payload.id, patch({ name: payload.name })),
|
|
11442
|
+
}));
|
|
11443
|
+
}));
|
|
11444
|
+
}
|
|
11445
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitPartnerState, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
11446
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitPartnerState }); }
|
|
11447
|
+
};
|
|
11448
|
+
__decorate([
|
|
11449
|
+
Action(FetchPartners, { cancelUncompleted: true })
|
|
11450
|
+
], KitPartnerState.prototype, "fetchPartners", null);
|
|
11451
|
+
__decorate([
|
|
11452
|
+
Action(DeletePartner)
|
|
11453
|
+
], KitPartnerState.prototype, "deletePartner", null);
|
|
11454
|
+
__decorate([
|
|
11455
|
+
Action(UpdatePartnerName)
|
|
11456
|
+
], KitPartnerState.prototype, "updatePartnerName", null);
|
|
11457
|
+
KitPartnerState = __decorate([
|
|
11458
|
+
State({
|
|
11459
|
+
name: KIT_PARTNERS_STATE_TOKEN,
|
|
11460
|
+
defaults: kitApiResponseDefaultEntities(),
|
|
11461
|
+
})
|
|
11462
|
+
], KitPartnerState);
|
|
11463
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitPartnerState, decorators: [{
|
|
11464
|
+
type: Injectable
|
|
11465
|
+
}], propDecorators: { fetchPartners: [], deletePartner: [], updatePartnerName: [] } });
|
|
11466
|
+
|
|
11467
|
+
class KitPartnerComponent {
|
|
11468
|
+
constructor() {
|
|
11469
|
+
this.store = inject(Store);
|
|
11470
|
+
this.kitDialogService = inject(KitDialogService);
|
|
11471
|
+
this.translateService = inject(TranslateService);
|
|
11472
|
+
this.viewContainerRef = inject(ViewContainerRef);
|
|
11473
|
+
this.partnerService = inject(KitPartnerService);
|
|
11474
|
+
this.kitExcelExportService = inject(KitExcelExportService);
|
|
11475
|
+
this.injector = inject(Injector);
|
|
11476
|
+
this.permissionCategory = input.required(...(ngDevMode ? [{ debugName: "permissionCategory" }] : /* istanbul ignore next */ []));
|
|
11477
|
+
this.kitCardDetailsComponent = viewChild.required((KitCardDetailsComponent));
|
|
11478
|
+
this.userPermissions = this.store.selectSignal(KIT_USER_PERMISSIONS_STATE_TOKEN);
|
|
11479
|
+
this.userPermissionTypes = computed(() => kitGetPermissionTypesByCategory(this.permissionCategory(), this.userPermissions()) ?? [], ...(ngDevMode ? [{ debugName: "userPermissionTypes" }] : /* istanbul ignore next */ []));
|
|
11480
|
+
this.permissionTypes = KitPermissionTypes;
|
|
11481
|
+
this.partners$ = this.store.select(KIT_PARTNERS_STATE_TOKEN).pipe(map(state => kitBuildGridDataResults(state.data, state.loading, state.total)));
|
|
11482
|
+
this.selectedCard = signal(null, ...(ngDevMode ? [{ debugName: "selectedCard" }] : /* istanbul ignore next */ []));
|
|
11483
|
+
this.cardDetailsSkeletonConfig = {
|
|
11484
|
+
itemHeight: 54,
|
|
11485
|
+
itemsCount: 5,
|
|
11486
|
+
};
|
|
11487
|
+
this.kitButtonType = KitButtonType;
|
|
11488
|
+
this.kitButtonKind = KitButtonKind;
|
|
11489
|
+
this.kitSvgIcon = KitSvgIcon;
|
|
11490
|
+
this.kitSvgIconType = KitSvgIconType;
|
|
11491
|
+
this.kitButtonIconPosition = KitButtonIconPosition;
|
|
11492
|
+
}
|
|
11493
|
+
ngOnDestroy() {
|
|
11494
|
+
this.store.dispatch(new StateReset(KitPartnerState));
|
|
11495
|
+
}
|
|
11496
|
+
onDataStateChanged({ skip, take, search, filters }) {
|
|
11497
|
+
const filter = search
|
|
11498
|
+
? {
|
|
11499
|
+
logic: KitFilterLogic.AND,
|
|
11500
|
+
filters: [
|
|
11501
|
+
{ field: 'name', operator: KitFilterOperator.CONTAINS, value: search },
|
|
11502
|
+
...(filters?.filters ?? []),
|
|
11503
|
+
],
|
|
11504
|
+
}
|
|
11505
|
+
: filters;
|
|
11506
|
+
this.store.dispatch(new FetchPartners({ skip, take, filter, sort: defaultPartnerSort }));
|
|
11507
|
+
}
|
|
11508
|
+
deletePartner(id) {
|
|
11509
|
+
this.store.dispatch(new DeletePartner({ id: +id })).subscribe(() => {
|
|
11510
|
+
this.kitCardDetailsComponent().deleteCard(id);
|
|
11511
|
+
});
|
|
11512
|
+
}
|
|
11513
|
+
updateName({ name, id }) {
|
|
11514
|
+
this.store.dispatch(new UpdatePartnerName({ id: +id, name })).subscribe(() => {
|
|
11515
|
+
this.kitCardDetailsComponent().updateSpecificCardData({ id: +id, name });
|
|
11516
|
+
});
|
|
11517
|
+
}
|
|
11518
|
+
createNewPartner() {
|
|
11519
|
+
this.kitDialogService.openDialog({
|
|
11520
|
+
title: this.translateService.instant('CreateNew'),
|
|
11521
|
+
content: KitCreateEntityDialogComponent,
|
|
11522
|
+
appendTo: this.viewContainerRef,
|
|
11523
|
+
});
|
|
11524
|
+
this.kitDialogService.dialogRef?.result.pipe(take(1)).subscribe((result) => {
|
|
11525
|
+
if (result && 'id' in result) {
|
|
11526
|
+
this.appendCard(result);
|
|
11527
|
+
}
|
|
11528
|
+
});
|
|
11529
|
+
}
|
|
11530
|
+
exportExcel() {
|
|
11531
|
+
this.partnerService.fetch({}).subscribe(data => {
|
|
11532
|
+
runInInjectionContext(this.injector, () => {
|
|
11533
|
+
this.kitExcelExportService.export(data.data, exportedPartnerColumns, 'Partners', {});
|
|
11534
|
+
});
|
|
11535
|
+
});
|
|
11536
|
+
}
|
|
11537
|
+
appendCard(card) {
|
|
11538
|
+
this.kitCardDetailsComponent().appendCard(card);
|
|
11539
|
+
this.kitCardDetailsComponent().onCardClick(card);
|
|
11540
|
+
requestAnimationFrame(() => this.kitCardDetailsComponent().scrollToCardById(card.id.toString()));
|
|
11541
|
+
}
|
|
11542
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitPartnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11543
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: KitPartnerComponent, isStandalone: true, selector: "kit-partners", inputs: { permissionCategory: { classPropertyName: "permissionCategory", publicName: "permissionCategory", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
|
|
11544
|
+
KitPartnerService,
|
|
11545
|
+
KitExcelExportService,
|
|
11546
|
+
KitGridCellService,
|
|
11547
|
+
DecimalPipe,
|
|
11548
|
+
DatePipe,
|
|
11549
|
+
{
|
|
11550
|
+
provide: KIT_ENTITY_CREATE_SERVICE,
|
|
11551
|
+
useExisting: KitPartnerService,
|
|
11552
|
+
},
|
|
11553
|
+
], viewQueries: [{ propertyName: "kitCardDetailsComponent", first: true, predicate: (KitCardDetailsComponent), descendants: true, isSignal: true }], ngImport: i0, template: "<kit-card-details class=\"kit-partners\"\n [cardData$]=\"partners$\"\n [pageSize]=\"10\"\n [title]=\"'kit.partners.title' | translate\"\n [cardSkeletonConfig]=\"cardDetailsSkeletonConfig\"\n (dataStateChanged)=\"onDataStateChanged($event)\"\n (cardClicked)=\"selectedCard.set($event)\">\n <ng-template #headerActions>\n <div class=\"header-actions\">\n <kit-button [label]=\"'kit.common.export' | translate\"\n [icon]=\"kitSvgIcon.EXPORT\"\n [iconType]=\"kitSvgIconType.STROKE\"\n [iconPosition]=\"kitButtonIconPosition.LEADING\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [type]=\"kitButtonType.GHOST\"\n (clicked)=\"exportExcel()\" />\n <kit-button *kitPermission=\"[permissionTypes.Create]; user: userPermissionTypes()\"\n [label]=\"'kit.common.createNew' | translate\"\n [icon]=\"kitSvgIcon.PLUS\"\n [iconPosition]=\"kitButtonIconPosition.LEADING\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [type]=\"kitButtonType.GHOST\"\n (clicked)=\"createNewPartner()\" />\n </div>\n </ng-template>\n\n <ng-template #cardElement let-card>\n <p class=\"kit-partners-card-name\">\n <kit-truncate-text>{{ card.name }}</kit-truncate-text>\n </p>\n </ng-template>\n\n <ng-template #details let-activeId>\n @if (activeId) {\n <kit-partner-details [id]=\"activeId\"\n [name]=\"selectedCard()?.name ?? ''\"\n [userPermissionTypes]=\"userPermissionTypes()\"\n (updatedName)=\"updateName({ name: $event, id: activeId })\"\n (deleted)=\"deletePartner($event.id)\"/>\n }\n </ng-template>\n</kit-card-details>\n", styles: [".kit-partners .header-actions{display:flex;gap:10px}.kit-partners-card-name{margin:10px 0}\n"], dependencies: [{ kind: "component", type: KitButtonComponent, selector: "kit-button", inputs: ["disabled", "label", "type", "icon", "iconType", "kind", "state", "iconPosition", "buttonClass", "active"], outputs: ["clicked"] }, { kind: "component", type: KitCardDetailsComponent, selector: "kit-card-details", inputs: ["cardData$", "pageSize", "title", "cardSkeletonConfig"], outputs: ["dataStateChanged", "cardClicked"] }, { kind: "component", type: KitTruncateTextComponent, selector: "kit-truncate-text", inputs: ["tooltipText"] }, { kind: "directive", type: KitPermissionDirective, selector: "[kitPermission]", inputs: ["kitPermission", "kitPermissionUser"] }, { kind: "component", type: KitPartnerDetailsComponent, selector: "kit-partner-details", inputs: ["id", "name", "userPermissionTypes"], outputs: ["updatedName", "deleted"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11554
|
+
}
|
|
11555
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitPartnerComponent, decorators: [{
|
|
11556
|
+
type: Component,
|
|
11557
|
+
args: [{ selector: 'kit-partners', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
11558
|
+
KitButtonComponent,
|
|
11559
|
+
KitCardDetailsComponent,
|
|
11560
|
+
TranslatePipe,
|
|
11561
|
+
KitTruncateTextComponent,
|
|
11562
|
+
KitPermissionDirective,
|
|
11563
|
+
KitPartnerDetailsComponent,
|
|
11564
|
+
], providers: [
|
|
11565
|
+
KitPartnerService,
|
|
11566
|
+
KitExcelExportService,
|
|
11567
|
+
KitGridCellService,
|
|
11568
|
+
DecimalPipe,
|
|
11569
|
+
DatePipe,
|
|
11570
|
+
{
|
|
11571
|
+
provide: KIT_ENTITY_CREATE_SERVICE,
|
|
11572
|
+
useExisting: KitPartnerService,
|
|
11573
|
+
},
|
|
11574
|
+
], template: "<kit-card-details class=\"kit-partners\"\n [cardData$]=\"partners$\"\n [pageSize]=\"10\"\n [title]=\"'kit.partners.title' | translate\"\n [cardSkeletonConfig]=\"cardDetailsSkeletonConfig\"\n (dataStateChanged)=\"onDataStateChanged($event)\"\n (cardClicked)=\"selectedCard.set($event)\">\n <ng-template #headerActions>\n <div class=\"header-actions\">\n <kit-button [label]=\"'kit.common.export' | translate\"\n [icon]=\"kitSvgIcon.EXPORT\"\n [iconType]=\"kitSvgIconType.STROKE\"\n [iconPosition]=\"kitButtonIconPosition.LEADING\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [type]=\"kitButtonType.GHOST\"\n (clicked)=\"exportExcel()\" />\n <kit-button *kitPermission=\"[permissionTypes.Create]; user: userPermissionTypes()\"\n [label]=\"'kit.common.createNew' | translate\"\n [icon]=\"kitSvgIcon.PLUS\"\n [iconPosition]=\"kitButtonIconPosition.LEADING\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [type]=\"kitButtonType.GHOST\"\n (clicked)=\"createNewPartner()\" />\n </div>\n </ng-template>\n\n <ng-template #cardElement let-card>\n <p class=\"kit-partners-card-name\">\n <kit-truncate-text>{{ card.name }}</kit-truncate-text>\n </p>\n </ng-template>\n\n <ng-template #details let-activeId>\n @if (activeId) {\n <kit-partner-details [id]=\"activeId\"\n [name]=\"selectedCard()?.name ?? ''\"\n [userPermissionTypes]=\"userPermissionTypes()\"\n (updatedName)=\"updateName({ name: $event, id: activeId })\"\n (deleted)=\"deletePartner($event.id)\"/>\n }\n </ng-template>\n</kit-card-details>\n", styles: [".kit-partners .header-actions{display:flex;gap:10px}.kit-partners-card-name{margin:10px 0}\n"] }]
|
|
11575
|
+
}], propDecorators: { permissionCategory: [{ type: i0.Input, args: [{ isSignal: true, alias: "permissionCategory", required: true }] }], kitCardDetailsComponent: [{ type: i0.ViewChild, args: [i0.forwardRef(() => KitCardDetailsComponent), { isSignal: true }] }] } });
|
|
11576
|
+
|
|
11577
|
+
var KitThemes;
|
|
11578
|
+
(function (KitThemes) {
|
|
11579
|
+
KitThemes["Light"] = "light";
|
|
11580
|
+
KitThemes["Dark"] = "dark";
|
|
11581
|
+
})(KitThemes || (KitThemes = {}));
|
|
11582
|
+
|
|
11583
|
+
class SetSelectedMobileMenuItem extends KitAbstractPayloadAction {
|
|
11584
|
+
static { this.type = '[KitMobileMenu] SetSelectedMobileMenuItem'; }
|
|
11585
|
+
}
|
|
11586
|
+
|
|
11587
|
+
const KIT_MOBILE_MENU_STATE_TOKEN = new StateToken('kitMobileMenu');
|
|
11588
|
+
let KitMobileMenuState = class KitMobileMenuState {
|
|
11589
|
+
static selectedItem(state) {
|
|
11590
|
+
return state?.selectedItem || null;
|
|
11591
|
+
}
|
|
11592
|
+
setSelectedMobileMenuItem(ctx, action) {
|
|
11593
|
+
ctx.patchState({ selectedItem: action.payload });
|
|
11594
|
+
}
|
|
11595
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitMobileMenuState, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
11596
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitMobileMenuState }); }
|
|
11597
|
+
};
|
|
11598
|
+
__decorate([
|
|
11599
|
+
Action(SetSelectedMobileMenuItem)
|
|
11600
|
+
], KitMobileMenuState.prototype, "setSelectedMobileMenuItem", null);
|
|
11601
|
+
__decorate([
|
|
11602
|
+
Selector([KIT_MOBILE_MENU_STATE_TOKEN])
|
|
11603
|
+
], KitMobileMenuState, "selectedItem", null);
|
|
11604
|
+
KitMobileMenuState = __decorate([
|
|
11605
|
+
State({
|
|
11606
|
+
name: KIT_MOBILE_MENU_STATE_TOKEN,
|
|
11607
|
+
defaults: {
|
|
11608
|
+
selectedItem: null,
|
|
11609
|
+
},
|
|
11610
|
+
})
|
|
11611
|
+
], KitMobileMenuState);
|
|
11612
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitMobileMenuState, decorators: [{
|
|
11613
|
+
type: Injectable
|
|
11614
|
+
}], propDecorators: { setSelectedMobileMenuItem: [] } });
|
|
11615
|
+
|
|
11616
|
+
class KitMobileHeaderComponent {
|
|
11617
|
+
constructor() {
|
|
11618
|
+
this.store = inject(Store);
|
|
11619
|
+
this.theme = input(KitThemes.Light, ...(ngDevMode ? [{ debugName: "theme" }] : /* istanbul ignore next */ []));
|
|
11620
|
+
this.kitSvgIcon = KitSvgIcon;
|
|
11621
|
+
this.kitButtonType = KitButtonType;
|
|
11622
|
+
this.kitSvgIconType = KitSvgIconType;
|
|
11623
|
+
this.themes = KitThemes;
|
|
11624
|
+
this.selectedItem = this.store.selectSignal(KitMobileMenuState.selectedItem);
|
|
11625
|
+
}
|
|
11626
|
+
setSelectedItem(item) {
|
|
11627
|
+
this.store.dispatch(new SetSelectedMobileMenuItem(item));
|
|
11628
|
+
}
|
|
11629
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitMobileHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11630
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: KitMobileHeaderComponent, isStandalone: true, selector: "kit-mobile-header", inputs: { theme: { classPropertyName: "theme", publicName: "theme", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"header\"\n [ngClass]=\"theme()\">\n @if (selectedItem()) {\n <kit-svg-icon class=\"header-icon\"\n [routerLink]=\"['/']\"\n [icon]=\"kitSvgIcon.MOBILE_HOME\"\n (click)=\"setSelectedItem(null)\" />\n\n <div class=\"header-selected-category\">\n <kit-svg-icon class=\"header-icon category\"\n [icon]=\"selectedItem()?.icon\" \n [iconClass]=\"kitSvgIconType.STROKE\" />\n <p class=\"header-selected-category-title\">{{ selectedItem()?.title }}</p>\n </div>\n } @else {\n <div class=\"header-logo\"\n [routerLink]=\"['/']\"\n (click)=\"selectedItem() && setSelectedItem(null)\">\n @if (theme() === themes.Light) {\n <img class=\"header-logo\" \n src=\"assets/config/logo.svg\" alt=\"Logo\"/>\n } @else {\n <img class=\"header-logo\" \n src=\"assets/config/logo-dark-theme.svg\" alt=\"Logo\"/>\n }\n </div>\n }\n</div>\n", styles: [".header{display:flex;align-items:center;justify-content:space-between;padding:0 25px;height:100%;border-bottom:1px solid var(--ui-kit-color-grey-11)}.header-selected-category{display:flex;align-items:center;gap:15px}.header-selected-category-title{color:var(--ui-kit-color-navy);flex:16px;line-height:24px}.header-icon{width:38px;height:38px;cursor:pointer}.header-icon.category{fill:none;cursor:auto}.header-logo{margin:auto;width:212px;height:38px}.header.dark{background-color:var(--ui-kit-color-navy);border-bottom-color:var(--ui-kit-color-grey-14)}.header.dark .header-selected-category-title{color:var(--ui-kit-color-white)}\n"], dependencies: [{ kind: "component", type: KitSvgIconComponent, selector: "kit-svg-icon", inputs: ["icon", "iconClass"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11631
|
+
}
|
|
11632
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitMobileHeaderComponent, decorators: [{
|
|
11633
|
+
type: Component,
|
|
11634
|
+
args: [{ selector: 'kit-mobile-header', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
11635
|
+
KitSvgIconComponent,
|
|
11636
|
+
NgClass,
|
|
11637
|
+
RouterLink,
|
|
11638
|
+
], template: "<div class=\"header\"\n [ngClass]=\"theme()\">\n @if (selectedItem()) {\n <kit-svg-icon class=\"header-icon\"\n [routerLink]=\"['/']\"\n [icon]=\"kitSvgIcon.MOBILE_HOME\"\n (click)=\"setSelectedItem(null)\" />\n\n <div class=\"header-selected-category\">\n <kit-svg-icon class=\"header-icon category\"\n [icon]=\"selectedItem()?.icon\" \n [iconClass]=\"kitSvgIconType.STROKE\" />\n <p class=\"header-selected-category-title\">{{ selectedItem()?.title }}</p>\n </div>\n } @else {\n <div class=\"header-logo\"\n [routerLink]=\"['/']\"\n (click)=\"selectedItem() && setSelectedItem(null)\">\n @if (theme() === themes.Light) {\n <img class=\"header-logo\" \n src=\"assets/config/logo.svg\" alt=\"Logo\"/>\n } @else {\n <img class=\"header-logo\" \n src=\"assets/config/logo-dark-theme.svg\" alt=\"Logo\"/>\n }\n </div>\n }\n</div>\n", styles: [".header{display:flex;align-items:center;justify-content:space-between;padding:0 25px;height:100%;border-bottom:1px solid var(--ui-kit-color-grey-11)}.header-selected-category{display:flex;align-items:center;gap:15px}.header-selected-category-title{color:var(--ui-kit-color-navy);flex:16px;line-height:24px}.header-icon{width:38px;height:38px;cursor:pointer}.header-icon.category{fill:none;cursor:auto}.header-logo{margin:auto;width:212px;height:38px}.header.dark{background-color:var(--ui-kit-color-navy);border-bottom-color:var(--ui-kit-color-grey-14)}.header.dark .header-selected-category-title{color:var(--ui-kit-color-white)}\n"] }]
|
|
11639
|
+
}], propDecorators: { theme: [{ type: i0.Input, args: [{ isSignal: true, alias: "theme", required: false }] }] } });
|
|
11640
|
+
|
|
11641
|
+
class KitPageLayoutComponent {
|
|
11642
|
+
constructor() {
|
|
11643
|
+
this.kitNavigationMenuService = inject(KitNavigationMenuService);
|
|
11644
|
+
this.deviceService = inject(DeviceDetectorService);
|
|
11645
|
+
this.theme = input(KitThemes.Light, ...(ngDevMode ? [{ debugName: "theme" }] : /* istanbul ignore next */ []));
|
|
11646
|
+
this.sidebarContainer = viewChild('sidebarContainer', ...(ngDevMode ? [{ debugName: "sidebarContainer" }] : /* istanbul ignore next */ []));
|
|
11647
|
+
this.topBarContainer = viewChild('topBarContainer', ...(ngDevMode ? [{ debugName: "topBarContainer" }] : /* istanbul ignore next */ []));
|
|
11648
|
+
this.isMenuCollapsed = this.kitNavigationMenuService.getCollapsedState();
|
|
11649
|
+
this.hasMenuSelected = this.kitNavigationMenuService.getSelectedState();
|
|
11650
|
+
this.hasSidebar = signal(false, ...(ngDevMode ? [{ debugName: "hasSidebar" }] : /* istanbul ignore next */ []));
|
|
11651
|
+
this.hasTopBar = signal(false, ...(ngDevMode ? [{ debugName: "hasTopBar" }] : /* istanbul ignore next */ []));
|
|
11652
|
+
effect(() => {
|
|
11653
|
+
const sidebar = this.sidebarContainer()?.nativeElement;
|
|
11654
|
+
const topBar = this.topBarContainer()?.nativeElement;
|
|
11655
|
+
this.hasSidebar.set(!!sidebar?.querySelector('[sidebar]'));
|
|
11656
|
+
this.hasTopBar.set(!!topBar?.querySelector('[topBar]'));
|
|
11657
|
+
});
|
|
11658
|
+
}
|
|
11659
|
+
get isMobile() {
|
|
11660
|
+
return this.deviceService.isMobile();
|
|
11661
|
+
}
|
|
11662
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitPageLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11663
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: KitPageLayoutComponent, isStandalone: true, selector: "kit-page-layout", inputs: { theme: { classPropertyName: "theme", publicName: "theme", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "sidebarContainer", first: true, predicate: ["sidebarContainer"], descendants: true, isSignal: true }, { propertyName: "topBarContainer", first: true, predicate: ["topBarContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"page-layout\"\n [ngClass]=\"theme()\"\n [class.mobile]=\"isMobile\"\n [class.sidebar-expanded]=\"!isMenuCollapsed() && hasMenuSelected()\"\n [class.has-sidebar]=\"hasSidebar()\"\n [class.has-top-bar]=\"hasTopBar()\">\n\n @if (!isMobile) {\n <div class=\"sidebar\" #sidebarContainer>\n <ng-content select=\"[sidebar]\" />\n </div>\n }\n\n <div class=\"main\">\n @if (isMobile) {\n <kit-mobile-header class=\"mobile-header\"\n [theme]=\"theme()\"/>\n } @else {\n <div class=\"top-bar\" #topBarContainer>\n <ng-content select=\"[topBar]\" />\n </div>\n }\n\n <div class=\"content\">\n <ng-content select=\"[content]\" />\n </div>\n </div>\n</div>\n", styles: [".page-layout{display:flex;min-height:100%}.page-layout.has-sidebar .sidebar{position:fixed;top:0;left:0;height:100%;min-width:var(--ui-kit-sidebar-collapsed-width);background:var(--ui-kit-color-navy);overflow-x:hidden;z-index:11}.page-layout.has-sidebar .main{margin-left:var(--ui-kit-sidebar-collapsed-width)}.page-layout.has-sidebar.sidebar-expanded .main{margin-left:var(--ui-kit-sidebar-expanded-width)}.page-layout .main{display:flex;flex-direction:column;flex:1;padding:0 var(--ui-kit-layout-gap);width:0;transition:.2s ease-in-out}.page-layout.has-top-bar .top-bar,.page-layout .mobile-header{position:sticky;top:0;left:0;width:100%;height:var(--ui-kit-header-height);background:var(--ui-kit-color-grey-13);z-index:10}.page-layout .content{padding:25px 0;flex:1}.page-layout .content:has(.kit-breadcrumbs){padding-top:10px}.page-layout .content:has(.iframe-wrapper){padding:0}.page-layout.mobile .mobile-header{background-color:var(--ui-kit-color-white)}.page-layout.mobile .main{padding:0}.page-layout.mobile .content{background-color:var(--ui-kit-color-grey-13);padding:var(--ui-kit-layout-gap)}.page-layout.mobile.dark .content{background-color:var(--ui-kit-color-navy)}\n"], dependencies: [{ kind: "component", type: KitMobileHeaderComponent, selector: "kit-mobile-header", inputs: ["theme"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11664
|
+
}
|
|
11665
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitPageLayoutComponent, decorators: [{
|
|
11666
|
+
type: Component,
|
|
11667
|
+
args: [{ selector: 'kit-page-layout', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
11067
11668
|
KitMobileHeaderComponent,
|
|
11068
11669
|
NgClass,
|
|
11069
11670
|
], template: "<div class=\"page-layout\"\n [ngClass]=\"theme()\"\n [class.mobile]=\"isMobile\"\n [class.sidebar-expanded]=\"!isMenuCollapsed() && hasMenuSelected()\"\n [class.has-sidebar]=\"hasSidebar()\"\n [class.has-top-bar]=\"hasTopBar()\">\n\n @if (!isMobile) {\n <div class=\"sidebar\" #sidebarContainer>\n <ng-content select=\"[sidebar]\" />\n </div>\n }\n\n <div class=\"main\">\n @if (isMobile) {\n <kit-mobile-header class=\"mobile-header\"\n [theme]=\"theme()\"/>\n } @else {\n <div class=\"top-bar\" #topBarContainer>\n <ng-content select=\"[topBar]\" />\n </div>\n }\n\n <div class=\"content\">\n <ng-content select=\"[content]\" />\n </div>\n </div>\n</div>\n", styles: [".page-layout{display:flex;min-height:100%}.page-layout.has-sidebar .sidebar{position:fixed;top:0;left:0;height:100%;min-width:var(--ui-kit-sidebar-collapsed-width);background:var(--ui-kit-color-navy);overflow-x:hidden;z-index:11}.page-layout.has-sidebar .main{margin-left:var(--ui-kit-sidebar-collapsed-width)}.page-layout.has-sidebar.sidebar-expanded .main{margin-left:var(--ui-kit-sidebar-expanded-width)}.page-layout .main{display:flex;flex-direction:column;flex:1;padding:0 var(--ui-kit-layout-gap);width:0;transition:.2s ease-in-out}.page-layout.has-top-bar .top-bar,.page-layout .mobile-header{position:sticky;top:0;left:0;width:100%;height:var(--ui-kit-header-height);background:var(--ui-kit-color-grey-13);z-index:10}.page-layout .content{padding:25px 0;flex:1}.page-layout .content:has(.kit-breadcrumbs){padding-top:10px}.page-layout .content:has(.iframe-wrapper){padding:0}.page-layout.mobile .mobile-header{background-color:var(--ui-kit-color-white)}.page-layout.mobile .main{padding:0}.page-layout.mobile .content{background-color:var(--ui-kit-color-grey-13);padding:var(--ui-kit-layout-gap)}.page-layout.mobile.dark .content{background-color:var(--ui-kit-color-navy)}\n"] }]
|
|
11070
11671
|
}], ctorParameters: () => [], propDecorators: { theme: [{ type: i0.Input, args: [{ isSignal: true, alias: "theme", required: false }] }], sidebarContainer: [{ type: i0.ViewChild, args: ['sidebarContainer', { isSignal: true }] }], topBarContainer: [{ type: i0.ViewChild, args: ['topBarContainer', { isSignal: true }] }] } });
|
|
11071
11672
|
|
|
11072
|
-
const KIT_USER_PATH = new InjectionToken('kitUserPath');
|
|
11073
|
-
|
|
11074
|
-
const KIT_USER_APPLICATIONS_PATH = new InjectionToken('kitUserApplicationsPath');
|
|
11075
|
-
|
|
11076
11673
|
const kitTranslations = {
|
|
11077
11674
|
en: {
|
|
11078
11675
|
kit: {
|
|
@@ -11247,6 +11844,8 @@ const kitTranslations = {
|
|
|
11247
11844
|
confirmationDelete: 'Are you sure you want to permanently delete {{name}}?',
|
|
11248
11845
|
name: 'Name',
|
|
11249
11846
|
save: 'Save',
|
|
11847
|
+
export: 'Export',
|
|
11848
|
+
createNew: 'Create New',
|
|
11250
11849
|
},
|
|
11251
11850
|
tree: {
|
|
11252
11851
|
actions: {
|
|
@@ -11319,6 +11918,10 @@ const kitTranslations = {
|
|
|
11319
11918
|
failedToCopy: 'Failed to copy',
|
|
11320
11919
|
deleteConfirmation: 'Are you sure you want to permanently delete',
|
|
11321
11920
|
},
|
|
11921
|
+
partners: {
|
|
11922
|
+
title: 'Partners',
|
|
11923
|
+
detailsTitle: 'Partner Details',
|
|
11924
|
+
},
|
|
11322
11925
|
entitySectionEditable: {
|
|
11323
11926
|
add: 'Add',
|
|
11324
11927
|
edit: 'Edit',
|
|
@@ -11525,6 +12128,8 @@ const kitTranslations = {
|
|
|
11525
12128
|
confirmationDelete: 'Вы уверены, что хотите безвозвратно удалить {{name}}?',
|
|
11526
12129
|
name: 'Название',
|
|
11527
12130
|
save: 'Сохранить',
|
|
12131
|
+
export: 'Экспорт',
|
|
12132
|
+
createNew: 'Создать',
|
|
11528
12133
|
},
|
|
11529
12134
|
tree: {
|
|
11530
12135
|
actions: {
|
|
@@ -11594,6 +12199,10 @@ const kitTranslations = {
|
|
|
11594
12199
|
failedToCopy: 'Не удалось скопировать',
|
|
11595
12200
|
deleteConfirmation: 'Вы уверены, что хотите удалить',
|
|
11596
12201
|
},
|
|
12202
|
+
partners: {
|
|
12203
|
+
title: 'Партнеры',
|
|
12204
|
+
detailsTitle: 'Детали партнера',
|
|
12205
|
+
},
|
|
11597
12206
|
entitySectionEditable: {
|
|
11598
12207
|
add: 'Добавить',
|
|
11599
12208
|
edit: 'Редактировать',
|
|
@@ -12045,65 +12654,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
12045
12654
|
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"kit-grid-views-manager\">\n <kit-sortable itemClass=\"item\"\n activeItemClass=\"item active\"\n [columnCount]=\"2\"\n [items]=\"items()\"\n (dragEnd)=\"checkChanges()\">\n <ng-template let-item>\n <div class=\"item-wrapper\"\n [class.hidden]=\"item.hidden\"\n [ngClass]=\"[item.type]\">\n <kit-svg-icon kitTooltip\n kitTooltipFilter=\".item-move\"\n class=\"item-move\"\n [kitTooltipPosition]=\"kitTooltipPosition.TOP\"\n [title]=\"'kit.views.moveView' | translate\"\n [icon]=\"kitSvgIcon.MENU\"\n ></kit-svg-icon>\n <div class=\"item-label\">\n <kit-truncate-text>{{ item.title | titlecase }}</kit-truncate-text>\n </div>\n @if (!isSystemView(item)) {\n <kit-svg-icon kitTooltip\n kitTooltipFilter=\".item-remove\"\n class=\"item-remove\"\n [kitTooltipPosition]=\"kitTooltipPosition.TOP\"\n [title]=\"'kit.views.removeView' | translate\"\n [icon]=\"kitSvgIcon.CIRCLE_MINUS\"\n (click)=\"onViewRemove(item)\"\n ></kit-svg-icon>\n <kit-svg-icon kitTooltip\n kitTooltipFilter=\".item-toggle\"\n class=\"item-toggle\"\n [kitTooltipPosition]=\"kitTooltipPosition.TOP\"\n [title]=\"item.hidden ? ('kit.views.showView' | translate) : ('kit.views.hideView' | translate)\"\n [icon]=\"item.hidden && kitSvgIcon.EYE_CLOSE || kitSvgIcon.EYE_OPEN\"\n (click)=\"onColumnVisibilityChange(item.hidden, item)\"\n ></kit-svg-icon>\n }\n </div>\n </ng-template>\n </kit-sortable>\n\n <kit-dialog-actions>\n <kit-button [label]=\"'kit.views.cancel' | translate\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [type]=\"kitButtonType.GHOST\"\n [disabled]=\"isSaving()\"\n (clicked)=\"close()\"\n ></kit-button>\n <kit-button [label]=\"'kit.views.apply' | translate\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [disabled]=\"!hasUnsavedChanges() || isSaving()\"\n (clicked)=\"applyChanges()\"\n ></kit-button>\n </kit-dialog-actions>\n</div>\n", styles: [".kit-grid-views-manager{width:452px}.kit-grid-views-manager ::ng-deep .kit-sortable{margin:0 -12px;column-gap:24px;column-rule:1px solid var(--ui-kit-color-grey-11)}.kit-grid-views-manager ::ng-deep .item{margin-bottom:8px;padding:8px 12px;border-radius:8px;box-sizing:border-box;cursor:pointer}.kit-grid-views-manager ::ng-deep .item .item-label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.kit-grid-views-manager ::ng-deep .item .system .item-label{color:var(--ui-kit-color-blue)}.kit-grid-views-manager ::ng-deep .item .user .item-label{color:var(--ui-kit-color-main)}.kit-grid-views-manager ::ng-deep .item-wrapper{display:flex;align-items:center;gap:8px}.kit-grid-views-manager ::ng-deep .item-wrapper.hidden .item-label{color:var(--ui-kit-color-grey-12)}.kit-grid-views-manager ::ng-deep .item-wrapper.hidden .item-toggle{fill:var(--ui-kit-color-grey-12)}.kit-grid-views-manager ::ng-deep .item:hover .item-move{fill:var(--ui-kit-color-main)}.kit-grid-views-manager ::ng-deep .item-label{flex:1;color:var(--ui-kit-color-grey-10);font-size:14px;font-weight:400;line-height:22px}.kit-grid-views-manager ::ng-deep .item .item-move{margin-right:4px;width:12px;height:12px;fill:var(--ui-kit-color-grey-12)}.kit-grid-views-manager ::ng-deep .item .item-toggle{width:18px;height:18px;fill:var(--ui-kit-color-main)}.kit-grid-views-manager ::ng-deep .item .item-remove{width:14px;height:14px;stroke:var(--ui-kit-color-grey-12);fill:none}.kit-grid-views-manager ::ng-deep .item .item-remove:hover{stroke:var(--ui-kit-color-main)}.kit-grid-views-manager ::ng-deep .item.active{box-shadow:4px 4px 8px #0003;background:var(--ui-kit-color-white)}.kit-grid-views-manager ::ng-deep .item.active .item-move{fill:var(--ui-kit-color-main)}\n"] }]
|
|
12046
12655
|
}], ctorParameters: () => [], propDecorators: { configGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "configGroup", required: true }] }] } });
|
|
12047
12656
|
|
|
12048
|
-
class KitUserApiService {
|
|
12049
|
-
constructor() {
|
|
12050
|
-
this.httpClient = inject(HttpClient);
|
|
12051
|
-
this.basePath = inject(KIT_BASE_PATH);
|
|
12052
|
-
this.userPath = inject(KIT_USER_PATH);
|
|
12053
|
-
this.userApplicationsPath = inject(KIT_USER_APPLICATIONS_PATH);
|
|
12054
|
-
}
|
|
12055
|
-
getUserInfo() {
|
|
12056
|
-
const url = `${this.basePath}/${this.userPath}`;
|
|
12057
|
-
return this.httpClient.get(url);
|
|
12058
|
-
}
|
|
12059
|
-
getUserApplicationList() {
|
|
12060
|
-
const url = `${this.basePath}/${this.userApplicationsPath}`;
|
|
12061
|
-
return this.httpClient.get(url);
|
|
12062
|
-
}
|
|
12063
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitUserApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
12064
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitUserApiService, providedIn: 'root' }); }
|
|
12065
|
-
}
|
|
12066
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitUserApiService, decorators: [{
|
|
12067
|
-
type: Injectable,
|
|
12068
|
-
args: [{
|
|
12069
|
-
providedIn: 'root',
|
|
12070
|
-
}]
|
|
12071
|
-
}] });
|
|
12072
|
-
|
|
12073
|
-
class FetchUser {
|
|
12074
|
-
static { this.type = '[User] Fetch'; }
|
|
12075
|
-
}
|
|
12076
|
-
|
|
12077
|
-
const KIT_USER_STATE_TOKEN = new StateToken('user');
|
|
12078
|
-
let KitUserState = class KitUserState {
|
|
12079
|
-
constructor() {
|
|
12080
|
-
this.kitUserApiService = inject(KitUserApiService);
|
|
12081
|
-
}
|
|
12082
|
-
fetchUser(ctx) {
|
|
12083
|
-
return this.kitUserApiService.getUserInfo().pipe(tap(user => ctx.setState({
|
|
12084
|
-
data: user,
|
|
12085
|
-
loading: false,
|
|
12086
|
-
})));
|
|
12087
|
-
}
|
|
12088
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitUserState, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
12089
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitUserState }); }
|
|
12090
|
-
};
|
|
12091
|
-
__decorate([
|
|
12092
|
-
Action(FetchUser)
|
|
12093
|
-
], KitUserState.prototype, "fetchUser", null);
|
|
12094
|
-
KitUserState = __decorate([
|
|
12095
|
-
State({
|
|
12096
|
-
name: KIT_USER_STATE_TOKEN,
|
|
12097
|
-
defaults: {
|
|
12098
|
-
data: null,
|
|
12099
|
-
loading: true,
|
|
12100
|
-
},
|
|
12101
|
-
})
|
|
12102
|
-
], KitUserState);
|
|
12103
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitUserState, decorators: [{
|
|
12104
|
-
type: Injectable
|
|
12105
|
-
}], propDecorators: { fetchUser: [] } });
|
|
12106
|
-
|
|
12107
12657
|
class KitGridViewsSaveComponent {
|
|
12108
12658
|
constructor() {
|
|
12109
12659
|
this.store = inject(Store);
|
|
@@ -13650,115 +14200,54 @@ class KitGridFiltersComponent {
|
|
|
13650
14200
|
getDateFilterConstraint(filter) {
|
|
13651
14201
|
return this.columns().find(col => col.field === filter.field)?.dateFilterConstraint;
|
|
13652
14202
|
}
|
|
13653
|
-
isFilterSelectorItemDisabled(item, filters) {
|
|
13654
|
-
return filters.some(filter => filter.field === item.field || filter.field === item.apiField);
|
|
13655
|
-
}
|
|
13656
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitGridFiltersComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13657
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: KitGridFiltersComponent, isStandalone: true, selector: "kit-grid-filters", inputs: { excludedColumns: { classPropertyName: "excludedColumns", publicName: "excludedColumns", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, filterListConfig: { classPropertyName: "filterListConfig", publicName: "filterListConfig", isSignal: true, isRequired: true, transformFunction: null }, useLocalTimeZone: { classPropertyName: "useLocalTimeZone", publicName: "useLocalTimeZone", isSignal: true, isRequired: false, transformFunction: null }, nullLabel: { classPropertyName: "nullLabel", publicName: "nullLabel", isSignal: true, isRequired: false, transformFunction: null }, notNullLabel: { classPropertyName: "notNullLabel", publicName: "notNullLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filterChanged: "filterChanged" }, ngImport: i0, template: "<div class=\"kit-grid-filters\">\n @for (item of filters(); track item) {\n @switch (item.type) {\n @case (kitFilterType.CHECKBOX) {\n <kit-filter-checkbox [filter]=\"item\"\n [items]=\"filterListConfig()[item.field].items\"\n [translateKeyPrefix]=\"filterListConfig()[item.field].translateKeyPrefix\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-checkbox>\n }\n @case (kitFilterType.GUID) {\n <kit-filter-checkbox [filter]=\"item\"\n [items]=\"filterListConfig()[item.field].items\"\n [guidField]=\"filterListConfig()[item.field].guidField\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-checkbox>\n }\n @case (kitFilterType.RADIO) {\n <kit-filter-radio [filter]=\"item\"\n [items]=\"filterListConfig()?.[item.field].items\"\n [translateKeyPrefix]=\"filterListConfig()?.[item.field].translateKeyPrefix\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-radio>\n }\n @case (kitFilterType.DATE) {\n <kit-filter-date [filter]=\"item\"\n [useLocalTimeZone]=\"useLocalTimeZone() || isLocalDateColumn(item)\"\n [useUserTimeZone]=\"useUserTimeZone(item)\"\n [dateFilterConstraint]=\"getDateFilterConstraint(item)\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-date>\n }\n @case (kitFilterType.TEXT) {\n <kit-filter-input [filterInputType]=\"kitFilterType.TEXT\"\n [filter]=\"item\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-input>\n }\n @case (kitFilterType.NUMERIC) {\n <kit-filter-input [filterInputType]=\"kitFilterType.NUMERIC\"\n [filter]=\"item\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-input>\n }\n @case (kitFilterType.NULL) {\n <kit-filter-null-check [filter]=\"item\"\n [nullLabel]=\"nullLabel()\"\n [notNullLabel]=\"notNullLabel()\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-null-check>\n }\n @case (kitFilterType.CUSTOM_INPUT) {\n <kit-filter-custom-input [filter]=\"item\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-custom-input>\n }\n }\n }\n\n <kit-filter-selector [items]=\"filterSelectorItems()\"\n (itemSelected)=\"addFilter($event)\"\n ></kit-filter-selector>\n</div>\n", styles: [".kit-grid-filters{display:flex;flex-wrap:wrap;gap:10px}::ng-deep .kit-pill-content{white-space:nowrap}\n"], dependencies: [{ kind: "component", type: KitFilterSelectorComponent, selector: "kit-filter-selector", inputs: ["items"], outputs: ["itemSelected"] }, { kind: "component", type: KitFilterCheckboxComponent, selector: "kit-filter-checkbox", inputs: ["filter", "translateKeyPrefix", "items", "showPopupOnInit", "guidField"], outputs: ["itemsChange", "filterRemoved", "filterChanged"] }, { kind: "component", type: KitFilterDateComponent, selector: "kit-filter-date", inputs: ["filter", "useUserTimeZone", "useLocalTimeZone", "dateFilterConstraint"], outputs: ["filterRemoved", "filterChanged"] }, { kind: "component", type: KitFilterRadioComponent, selector: "kit-filter-radio", inputs: ["filter", "translateKeyPrefix", "items"], outputs: ["itemsChange", "filterRemoved", "filterChanged"] }, { kind: "component", type: KitFilterInputComponent, selector: "kit-filter-input", inputs: ["filter", "filterInputType"], outputs: ["filterRemoved", "filterChanged"] }, { kind: "component", type: KitFilterNullCheckComponent, selector: "kit-filter-null-check", inputs: ["filter", "nullLabel", "notNullLabel", "showPopupOnInit", "selectedOption", "options"], outputs: ["filterRemoved", "filterChanged", "selectedOptionChange", "optionsChange"] }, { kind: "component", type: KitFilterCustomInputComponent, selector: "kit-filter-custom-input", inputs: ["filter"], outputs: ["filterRemoved", "filterChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13658
|
-
}
|
|
13659
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitGridFiltersComponent, decorators: [{
|
|
13660
|
-
type: Component,
|
|
13661
|
-
args: [{ selector: 'kit-grid-filters', standalone: true, imports: [
|
|
13662
|
-
KitFilterSelectorComponent,
|
|
13663
|
-
KitFilterCheckboxComponent,
|
|
13664
|
-
KitFilterDateComponent,
|
|
13665
|
-
KitFilterRadioComponent,
|
|
13666
|
-
KitFilterInputComponent,
|
|
13667
|
-
KitFilterNullCheckComponent,
|
|
13668
|
-
KitFilterCustomInputComponent,
|
|
13669
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"kit-grid-filters\">\n @for (item of filters(); track item) {\n @switch (item.type) {\n @case (kitFilterType.CHECKBOX) {\n <kit-filter-checkbox [filter]=\"item\"\n [items]=\"filterListConfig()[item.field].items\"\n [translateKeyPrefix]=\"filterListConfig()[item.field].translateKeyPrefix\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-checkbox>\n }\n @case (kitFilterType.GUID) {\n <kit-filter-checkbox [filter]=\"item\"\n [items]=\"filterListConfig()[item.field].items\"\n [guidField]=\"filterListConfig()[item.field].guidField\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-checkbox>\n }\n @case (kitFilterType.RADIO) {\n <kit-filter-radio [filter]=\"item\"\n [items]=\"filterListConfig()?.[item.field].items\"\n [translateKeyPrefix]=\"filterListConfig()?.[item.field].translateKeyPrefix\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-radio>\n }\n @case (kitFilterType.DATE) {\n <kit-filter-date [filter]=\"item\"\n [useLocalTimeZone]=\"useLocalTimeZone() || isLocalDateColumn(item)\"\n [useUserTimeZone]=\"useUserTimeZone(item)\"\n [dateFilterConstraint]=\"getDateFilterConstraint(item)\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-date>\n }\n @case (kitFilterType.TEXT) {\n <kit-filter-input [filterInputType]=\"kitFilterType.TEXT\"\n [filter]=\"item\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-input>\n }\n @case (kitFilterType.NUMERIC) {\n <kit-filter-input [filterInputType]=\"kitFilterType.NUMERIC\"\n [filter]=\"item\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-input>\n }\n @case (kitFilterType.NULL) {\n <kit-filter-null-check [filter]=\"item\"\n [nullLabel]=\"nullLabel()\"\n [notNullLabel]=\"notNullLabel()\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-null-check>\n }\n @case (kitFilterType.CUSTOM_INPUT) {\n <kit-filter-custom-input [filter]=\"item\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-custom-input>\n }\n }\n }\n\n <kit-filter-selector [items]=\"filterSelectorItems()\"\n (itemSelected)=\"addFilter($event)\"\n ></kit-filter-selector>\n</div>\n", styles: [".kit-grid-filters{display:flex;flex-wrap:wrap;gap:10px}::ng-deep .kit-pill-content{white-space:nowrap}\n"] }]
|
|
13670
|
-
}], propDecorators: { excludedColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "excludedColumns", required: true }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], filterListConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterListConfig", required: true }] }], useLocalTimeZone: [{ type: i0.Input, args: [{ isSignal: true, alias: "useLocalTimeZone", required: false }] }], nullLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "nullLabel", required: false }] }], notNullLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "notNullLabel", required: false }] }], filterChanged: [{ type: i0.Output, args: ["filterChanged"] }] } });
|
|
13671
|
-
|
|
13672
|
-
class KitGridFiltersToggleComponent {
|
|
13673
|
-
constructor() {
|
|
13674
|
-
this.filters = input.required(...(ngDevMode ? [{ debugName: "filters" }] : /* istanbul ignore next */ []));
|
|
13675
|
-
this.hasTooltip = input(true, ...(ngDevMode ? [{ debugName: "hasTooltip" }] : /* istanbul ignore next */ []));
|
|
13676
|
-
this.active = input(false, ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
13677
|
-
this.clicked = output();
|
|
13678
|
-
this.kitSvgIcon = KitSvgIcon;
|
|
13679
|
-
this.kitButtonType = KitButtonType;
|
|
13680
|
-
this.kitButtonKind = KitButtonKind;
|
|
13681
|
-
this.kitButtonIconPosition = KitButtonIconPosition;
|
|
13682
|
-
this.kitBadgeTheme = KitBadgeTheme;
|
|
13683
|
-
this.kitSvgIconType = KitSvgIconType;
|
|
13684
|
-
this.kitTooltipPosition = KitTooltipPosition;
|
|
13685
|
-
}
|
|
13686
|
-
onClick() {
|
|
13687
|
-
this.clicked.emit();
|
|
13688
|
-
}
|
|
13689
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitGridFiltersToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13690
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.4", type: KitGridFiltersToggleComponent, isStandalone: true, selector: "kit-grid-filters-toggle", inputs: { filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: true, transformFunction: null }, hasTooltip: { classPropertyName: "hasTooltip", publicName: "hasTooltip", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked" }, ngImport: i0, template: "<kit-button kitBadge\n kitTooltip\n kitTooltipFilter=\"kit-button\"\n [title]=\"'kit.filters.title' | translate\"\n [kitTooltipPosition]=\"kitTooltipPosition.TOP\"\n [kitTooltipVisible]=\"hasTooltip()\"\n [kitBadgeText]=\"filters().length\"\n [kitBadgeTheme]=\"kitBadgeTheme.DANGER\"\n [kitBadgeVisible]=\"filters().length > 0\"\n [label]=\"hasTooltip() ? '' : 'kit.filters.title' | translate\"\n [type]=\"kitButtonType.GHOST\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [icon]=\"kitSvgIcon.FILTER\"\n [iconPosition]=\"kitButtonIconPosition.LEADING\"\n [active]=\"active()\"\n (clicked)=\"onClick()\" />\n", dependencies: [{ kind: "component", type: KitButtonComponent, selector: "kit-button", inputs: ["disabled", "label", "type", "icon", "iconType", "kind", "state", "iconPosition", "buttonClass", "active"], outputs: ["clicked"] }, { kind: "directive", type: KitBadgeDirective, selector: "[kitBadge]", inputs: ["kitBadgeText", "kitBadgeTheme", "kitBadgeVisible"] }, { kind: "directive", type: KitTooltipDirective, selector: "[kitTooltip]", inputs: ["kitTooltipPosition", "kitTooltipFilter", "kitTooltipTemplateRef", "kitTooltipVisible", "kitTooltipOffset"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13691
|
-
}
|
|
13692
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitGridFiltersToggleComponent, decorators: [{
|
|
13693
|
-
type: Component,
|
|
13694
|
-
args: [{ selector: 'kit-grid-filters-toggle', imports: [
|
|
13695
|
-
KitButtonComponent,
|
|
13696
|
-
KitBadgeDirective,
|
|
13697
|
-
KitTooltipDirective,
|
|
13698
|
-
TranslatePipe,
|
|
13699
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<kit-button kitBadge\n kitTooltip\n kitTooltipFilter=\"kit-button\"\n [title]=\"'kit.filters.title' | translate\"\n [kitTooltipPosition]=\"kitTooltipPosition.TOP\"\n [kitTooltipVisible]=\"hasTooltip()\"\n [kitBadgeText]=\"filters().length\"\n [kitBadgeTheme]=\"kitBadgeTheme.DANGER\"\n [kitBadgeVisible]=\"filters().length > 0\"\n [label]=\"hasTooltip() ? '' : 'kit.filters.title' | translate\"\n [type]=\"kitButtonType.GHOST\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [icon]=\"kitSvgIcon.FILTER\"\n [iconPosition]=\"kitButtonIconPosition.LEADING\"\n [active]=\"active()\"\n (clicked)=\"onClick()\" />\n" }]
|
|
13700
|
-
}], propDecorators: { filters: [{ type: i0.Input, args: [{ isSignal: true, alias: "filters", required: true }] }], hasTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasTooltip", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], clicked: [{ type: i0.Output, args: ["clicked"] }] } });
|
|
13701
|
-
|
|
13702
|
-
class KitGridCellService {
|
|
13703
|
-
constructor() {
|
|
13704
|
-
this.translateService = inject(TranslateService);
|
|
13705
|
-
this.decimalPipe = inject(DecimalPipe);
|
|
13706
|
-
this.datePipe = inject(DatePipe);
|
|
13707
|
-
this.dateFormatConfig = inject(KIT_GRID_CELL_DATE_FORMAT_CONFIG, { optional: true });
|
|
13708
|
-
this.store = inject(Store);
|
|
13709
|
-
this.userState = this.store.selectSignal(KIT_USER_STATE_TOKEN)();
|
|
13710
|
-
const dateFormatConfig = this.dateFormatConfig;
|
|
13711
|
-
this.dateFormat = dateFormatConfig?.dateFormat ?? KIT_DATE_FORMAT;
|
|
13712
|
-
this.dateTimeFormat = dateFormatConfig?.dateTimeFormat ?? KIT_DATETIME_FORMAT_LONG;
|
|
13713
|
-
}
|
|
13714
|
-
createCellValue(columnType, columnField, dataItem, translationMap = {}, defaultValue = '', valueTransforms = {}) {
|
|
13715
|
-
const rawValue = this.getCellValue(dataItem, columnField);
|
|
13716
|
-
const value = valueTransforms[columnField]?.(rawValue) ?? rawValue;
|
|
13717
|
-
if (columnField in translationMap && value != null && value !== '') {
|
|
13718
|
-
return this.translateService.instant(translationMap[columnField](value)) ?? defaultValue;
|
|
13719
|
-
}
|
|
13720
|
-
switch (columnType) {
|
|
13721
|
-
case 'number':
|
|
13722
|
-
return this.decimalPipe.transform(value) ?? defaultValue;
|
|
13723
|
-
case 'plainNumber':
|
|
13724
|
-
return value || defaultValue;
|
|
13725
|
-
case 'date':
|
|
13726
|
-
return this.datePipe.transform(value, this.dateFormat, 'UTC') ?? defaultValue;
|
|
13727
|
-
case 'dateTime':
|
|
13728
|
-
return this.datePipe.transform(value, this.dateTimeFormat, 'UTC') ?? defaultValue;
|
|
13729
|
-
case 'dateLocal':
|
|
13730
|
-
return this.datePipe.transform(value, this.dateFormat) ?? defaultValue;
|
|
13731
|
-
case 'dateTimeLocal':
|
|
13732
|
-
return this.datePipe.transform(value, this.dateTimeFormat) ?? defaultValue;
|
|
13733
|
-
case 'dateZone':
|
|
13734
|
-
return value ? formatInTimeZone(value, this.userState.data?.namedTimeZone ?? 'UTC', this.dateFormat) : defaultValue;
|
|
13735
|
-
case 'dateTimeZone':
|
|
13736
|
-
return value ? formatInTimeZone(value, this.userState.data?.namedTimeZone ?? 'UTC', this.dateTimeFormat) : defaultValue;
|
|
13737
|
-
case 'boolean':
|
|
13738
|
-
return this.translateService.instant(value ? 'common.yes' : 'common.no');
|
|
13739
|
-
default:
|
|
13740
|
-
return value || defaultValue;
|
|
13741
|
-
}
|
|
13742
|
-
}
|
|
13743
|
-
getCellValue(dataItem, field) {
|
|
13744
|
-
let value = dataItem[field];
|
|
13745
|
-
if (!value) {
|
|
13746
|
-
value = this.getNestedGridCellValue(dataItem, field);
|
|
13747
|
-
}
|
|
13748
|
-
return value;
|
|
13749
|
-
}
|
|
13750
|
-
getNestedGridCellValue(dataItem, field) {
|
|
13751
|
-
const value = field.split('.').reduce((acc, key) => acc !== null && typeof acc === 'object' && key in acc
|
|
13752
|
-
? acc[key]
|
|
13753
|
-
: undefined, dataItem);
|
|
13754
|
-
return value === 0 ? 0 : value || '';
|
|
14203
|
+
isFilterSelectorItemDisabled(item, filters) {
|
|
14204
|
+
return filters.some(filter => filter.field === item.field || filter.field === item.apiField);
|
|
13755
14205
|
}
|
|
13756
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type:
|
|
13757
|
-
static { this.ɵ
|
|
14206
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitGridFiltersComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14207
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: KitGridFiltersComponent, isStandalone: true, selector: "kit-grid-filters", inputs: { excludedColumns: { classPropertyName: "excludedColumns", publicName: "excludedColumns", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, filterListConfig: { classPropertyName: "filterListConfig", publicName: "filterListConfig", isSignal: true, isRequired: true, transformFunction: null }, useLocalTimeZone: { classPropertyName: "useLocalTimeZone", publicName: "useLocalTimeZone", isSignal: true, isRequired: false, transformFunction: null }, nullLabel: { classPropertyName: "nullLabel", publicName: "nullLabel", isSignal: true, isRequired: false, transformFunction: null }, notNullLabel: { classPropertyName: "notNullLabel", publicName: "notNullLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filterChanged: "filterChanged" }, ngImport: i0, template: "<div class=\"kit-grid-filters\">\n @for (item of filters(); track item) {\n @switch (item.type) {\n @case (kitFilterType.CHECKBOX) {\n <kit-filter-checkbox [filter]=\"item\"\n [items]=\"filterListConfig()[item.field].items\"\n [translateKeyPrefix]=\"filterListConfig()[item.field].translateKeyPrefix\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-checkbox>\n }\n @case (kitFilterType.GUID) {\n <kit-filter-checkbox [filter]=\"item\"\n [items]=\"filterListConfig()[item.field].items\"\n [guidField]=\"filterListConfig()[item.field].guidField\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-checkbox>\n }\n @case (kitFilterType.RADIO) {\n <kit-filter-radio [filter]=\"item\"\n [items]=\"filterListConfig()?.[item.field].items\"\n [translateKeyPrefix]=\"filterListConfig()?.[item.field].translateKeyPrefix\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-radio>\n }\n @case (kitFilterType.DATE) {\n <kit-filter-date [filter]=\"item\"\n [useLocalTimeZone]=\"useLocalTimeZone() || isLocalDateColumn(item)\"\n [useUserTimeZone]=\"useUserTimeZone(item)\"\n [dateFilterConstraint]=\"getDateFilterConstraint(item)\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-date>\n }\n @case (kitFilterType.TEXT) {\n <kit-filter-input [filterInputType]=\"kitFilterType.TEXT\"\n [filter]=\"item\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-input>\n }\n @case (kitFilterType.NUMERIC) {\n <kit-filter-input [filterInputType]=\"kitFilterType.NUMERIC\"\n [filter]=\"item\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-input>\n }\n @case (kitFilterType.NULL) {\n <kit-filter-null-check [filter]=\"item\"\n [nullLabel]=\"nullLabel()\"\n [notNullLabel]=\"notNullLabel()\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-null-check>\n }\n @case (kitFilterType.CUSTOM_INPUT) {\n <kit-filter-custom-input [filter]=\"item\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-custom-input>\n }\n }\n }\n\n <kit-filter-selector [items]=\"filterSelectorItems()\"\n (itemSelected)=\"addFilter($event)\"\n ></kit-filter-selector>\n</div>\n", styles: [".kit-grid-filters{display:flex;flex-wrap:wrap;gap:10px}::ng-deep .kit-pill-content{white-space:nowrap}\n"], dependencies: [{ kind: "component", type: KitFilterSelectorComponent, selector: "kit-filter-selector", inputs: ["items"], outputs: ["itemSelected"] }, { kind: "component", type: KitFilterCheckboxComponent, selector: "kit-filter-checkbox", inputs: ["filter", "translateKeyPrefix", "items", "showPopupOnInit", "guidField"], outputs: ["itemsChange", "filterRemoved", "filterChanged"] }, { kind: "component", type: KitFilterDateComponent, selector: "kit-filter-date", inputs: ["filter", "useUserTimeZone", "useLocalTimeZone", "dateFilterConstraint"], outputs: ["filterRemoved", "filterChanged"] }, { kind: "component", type: KitFilterRadioComponent, selector: "kit-filter-radio", inputs: ["filter", "translateKeyPrefix", "items"], outputs: ["itemsChange", "filterRemoved", "filterChanged"] }, { kind: "component", type: KitFilterInputComponent, selector: "kit-filter-input", inputs: ["filter", "filterInputType"], outputs: ["filterRemoved", "filterChanged"] }, { kind: "component", type: KitFilterNullCheckComponent, selector: "kit-filter-null-check", inputs: ["filter", "nullLabel", "notNullLabel", "showPopupOnInit", "selectedOption", "options"], outputs: ["filterRemoved", "filterChanged", "selectedOptionChange", "optionsChange"] }, { kind: "component", type: KitFilterCustomInputComponent, selector: "kit-filter-custom-input", inputs: ["filter"], outputs: ["filterRemoved", "filterChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13758
14208
|
}
|
|
13759
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type:
|
|
13760
|
-
type:
|
|
13761
|
-
|
|
14209
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitGridFiltersComponent, decorators: [{
|
|
14210
|
+
type: Component,
|
|
14211
|
+
args: [{ selector: 'kit-grid-filters', standalone: true, imports: [
|
|
14212
|
+
KitFilterSelectorComponent,
|
|
14213
|
+
KitFilterCheckboxComponent,
|
|
14214
|
+
KitFilterDateComponent,
|
|
14215
|
+
KitFilterRadioComponent,
|
|
14216
|
+
KitFilterInputComponent,
|
|
14217
|
+
KitFilterNullCheckComponent,
|
|
14218
|
+
KitFilterCustomInputComponent,
|
|
14219
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"kit-grid-filters\">\n @for (item of filters(); track item) {\n @switch (item.type) {\n @case (kitFilterType.CHECKBOX) {\n <kit-filter-checkbox [filter]=\"item\"\n [items]=\"filterListConfig()[item.field].items\"\n [translateKeyPrefix]=\"filterListConfig()[item.field].translateKeyPrefix\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-checkbox>\n }\n @case (kitFilterType.GUID) {\n <kit-filter-checkbox [filter]=\"item\"\n [items]=\"filterListConfig()[item.field].items\"\n [guidField]=\"filterListConfig()[item.field].guidField\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-checkbox>\n }\n @case (kitFilterType.RADIO) {\n <kit-filter-radio [filter]=\"item\"\n [items]=\"filterListConfig()?.[item.field].items\"\n [translateKeyPrefix]=\"filterListConfig()?.[item.field].translateKeyPrefix\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-radio>\n }\n @case (kitFilterType.DATE) {\n <kit-filter-date [filter]=\"item\"\n [useLocalTimeZone]=\"useLocalTimeZone() || isLocalDateColumn(item)\"\n [useUserTimeZone]=\"useUserTimeZone(item)\"\n [dateFilterConstraint]=\"getDateFilterConstraint(item)\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-date>\n }\n @case (kitFilterType.TEXT) {\n <kit-filter-input [filterInputType]=\"kitFilterType.TEXT\"\n [filter]=\"item\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-input>\n }\n @case (kitFilterType.NUMERIC) {\n <kit-filter-input [filterInputType]=\"kitFilterType.NUMERIC\"\n [filter]=\"item\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-input>\n }\n @case (kitFilterType.NULL) {\n <kit-filter-null-check [filter]=\"item\"\n [nullLabel]=\"nullLabel()\"\n [notNullLabel]=\"notNullLabel()\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-null-check>\n }\n @case (kitFilterType.CUSTOM_INPUT) {\n <kit-filter-custom-input [filter]=\"item\"\n (filterRemoved)=\"removeFilter(item.field)\"\n (filterChanged)=\"applyFilter(item, $event)\"\n ></kit-filter-custom-input>\n }\n }\n }\n\n <kit-filter-selector [items]=\"filterSelectorItems()\"\n (itemSelected)=\"addFilter($event)\"\n ></kit-filter-selector>\n</div>\n", styles: [".kit-grid-filters{display:flex;flex-wrap:wrap;gap:10px}::ng-deep .kit-pill-content{white-space:nowrap}\n"] }]
|
|
14220
|
+
}], propDecorators: { excludedColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "excludedColumns", required: true }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], filterListConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterListConfig", required: true }] }], useLocalTimeZone: [{ type: i0.Input, args: [{ isSignal: true, alias: "useLocalTimeZone", required: false }] }], nullLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "nullLabel", required: false }] }], notNullLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "notNullLabel", required: false }] }], filterChanged: [{ type: i0.Output, args: ["filterChanged"] }] } });
|
|
14221
|
+
|
|
14222
|
+
class KitGridFiltersToggleComponent {
|
|
14223
|
+
constructor() {
|
|
14224
|
+
this.filters = input.required(...(ngDevMode ? [{ debugName: "filters" }] : /* istanbul ignore next */ []));
|
|
14225
|
+
this.hasTooltip = input(true, ...(ngDevMode ? [{ debugName: "hasTooltip" }] : /* istanbul ignore next */ []));
|
|
14226
|
+
this.active = input(false, ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
14227
|
+
this.clicked = output();
|
|
14228
|
+
this.kitSvgIcon = KitSvgIcon;
|
|
14229
|
+
this.kitButtonType = KitButtonType;
|
|
14230
|
+
this.kitButtonKind = KitButtonKind;
|
|
14231
|
+
this.kitButtonIconPosition = KitButtonIconPosition;
|
|
14232
|
+
this.kitBadgeTheme = KitBadgeTheme;
|
|
14233
|
+
this.kitSvgIconType = KitSvgIconType;
|
|
14234
|
+
this.kitTooltipPosition = KitTooltipPosition;
|
|
14235
|
+
}
|
|
14236
|
+
onClick() {
|
|
14237
|
+
this.clicked.emit();
|
|
14238
|
+
}
|
|
14239
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitGridFiltersToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14240
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.4", type: KitGridFiltersToggleComponent, isStandalone: true, selector: "kit-grid-filters-toggle", inputs: { filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: true, transformFunction: null }, hasTooltip: { classPropertyName: "hasTooltip", publicName: "hasTooltip", isSignal: true, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked" }, ngImport: i0, template: "<kit-button kitBadge\n kitTooltip\n kitTooltipFilter=\"kit-button\"\n [title]=\"'kit.filters.title' | translate\"\n [kitTooltipPosition]=\"kitTooltipPosition.TOP\"\n [kitTooltipVisible]=\"hasTooltip()\"\n [kitBadgeText]=\"filters().length\"\n [kitBadgeTheme]=\"kitBadgeTheme.DANGER\"\n [kitBadgeVisible]=\"filters().length > 0\"\n [label]=\"hasTooltip() ? '' : 'kit.filters.title' | translate\"\n [type]=\"kitButtonType.GHOST\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [icon]=\"kitSvgIcon.FILTER\"\n [iconPosition]=\"kitButtonIconPosition.LEADING\"\n [active]=\"active()\"\n (clicked)=\"onClick()\" />\n", dependencies: [{ kind: "component", type: KitButtonComponent, selector: "kit-button", inputs: ["disabled", "label", "type", "icon", "iconType", "kind", "state", "iconPosition", "buttonClass", "active"], outputs: ["clicked"] }, { kind: "directive", type: KitBadgeDirective, selector: "[kitBadge]", inputs: ["kitBadgeText", "kitBadgeTheme", "kitBadgeVisible"] }, { kind: "directive", type: KitTooltipDirective, selector: "[kitTooltip]", inputs: ["kitTooltipPosition", "kitTooltipFilter", "kitTooltipTemplateRef", "kitTooltipVisible", "kitTooltipOffset"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
14241
|
+
}
|
|
14242
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitGridFiltersToggleComponent, decorators: [{
|
|
14243
|
+
type: Component,
|
|
14244
|
+
args: [{ selector: 'kit-grid-filters-toggle', imports: [
|
|
14245
|
+
KitButtonComponent,
|
|
14246
|
+
KitBadgeDirective,
|
|
14247
|
+
KitTooltipDirective,
|
|
14248
|
+
TranslatePipe,
|
|
14249
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<kit-button kitBadge\n kitTooltip\n kitTooltipFilter=\"kit-button\"\n [title]=\"'kit.filters.title' | translate\"\n [kitTooltipPosition]=\"kitTooltipPosition.TOP\"\n [kitTooltipVisible]=\"hasTooltip()\"\n [kitBadgeText]=\"filters().length\"\n [kitBadgeTheme]=\"kitBadgeTheme.DANGER\"\n [kitBadgeVisible]=\"filters().length > 0\"\n [label]=\"hasTooltip() ? '' : 'kit.filters.title' | translate\"\n [type]=\"kitButtonType.GHOST\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [icon]=\"kitSvgIcon.FILTER\"\n [iconPosition]=\"kitButtonIconPosition.LEADING\"\n [active]=\"active()\"\n (clicked)=\"onClick()\" />\n" }]
|
|
14250
|
+
}], propDecorators: { filters: [{ type: i0.Input, args: [{ isSignal: true, alias: "filters", required: true }] }], hasTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasTooltip", required: false }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], clicked: [{ type: i0.Output, args: ["clicked"] }] } });
|
|
13762
14251
|
|
|
13763
14252
|
var GridExportOptions;
|
|
13764
14253
|
(function (GridExportOptions) {
|
|
@@ -13794,91 +14283,6 @@ const gridExportOptions = [
|
|
|
13794
14283
|
},
|
|
13795
14284
|
];
|
|
13796
14285
|
|
|
13797
|
-
class KitExcelExportService {
|
|
13798
|
-
constructor() {
|
|
13799
|
-
this.translateService = inject(TranslateService);
|
|
13800
|
-
this.store = inject(Store);
|
|
13801
|
-
this.gridCellService = inject(KitGridCellService);
|
|
13802
|
-
}
|
|
13803
|
-
async export(data, exportedColumns, exportedFileName, translationMap, valueTransforms = {}) {
|
|
13804
|
-
const userTimezone = this.store.selectSnapshot(KIT_USER_STATE_TOKEN).data?.namedTimeZone ?? 'UTC';
|
|
13805
|
-
const workbook = { sheets: [{ rows: [], columns: [] }] };
|
|
13806
|
-
const columns = exportedColumns.map(({ title, field }) => ({
|
|
13807
|
-
value: this.translateService.instant(title || field),
|
|
13808
|
-
background: '#7a7a7a',
|
|
13809
|
-
color: '#fff',
|
|
13810
|
-
width: 170,
|
|
13811
|
-
}));
|
|
13812
|
-
workbook.sheets[0].rows = this.getExportedExcelRows(columns, data, exportedColumns, translationMap, userTimezone, valueTransforms);
|
|
13813
|
-
workbook.sheets[0].columns = columns;
|
|
13814
|
-
const dataUrl = await new Workbook(workbook).toDataURL();
|
|
13815
|
-
return saveAs(dataUrl, `${exportedFileName}.xlsx`);
|
|
13816
|
-
}
|
|
13817
|
-
getExportedExcelRows(columns, data, gridColumns, translationMap, userTimezone, valueTransforms = {}) {
|
|
13818
|
-
const rows = [{ cells: columns, type: 'header' }];
|
|
13819
|
-
for (const row of data) {
|
|
13820
|
-
const rowCells = gridColumns.map((column) => {
|
|
13821
|
-
const rawValue = this.gridCellService.getCellValue(row, column.field);
|
|
13822
|
-
const value = valueTransforms[column.field]?.(rawValue) ?? rawValue;
|
|
13823
|
-
switch (column.type) {
|
|
13824
|
-
case 'number': {
|
|
13825
|
-
return { value: (value ?? undefined) };
|
|
13826
|
-
}
|
|
13827
|
-
case 'time':
|
|
13828
|
-
return { format: column.excelFormat, value: this.timeStringToExcelFraction(value) };
|
|
13829
|
-
case 'date':
|
|
13830
|
-
case 'dateTime': {
|
|
13831
|
-
const format = column.excelFormat || (column.type === 'date' ? KIT_DATE_FORMAT : KIT_DATETIME_FORMAT_LONG);
|
|
13832
|
-
const dateValue = value ? this.truncateToSeconds(this.convertToUtcDate(value)) : undefined;
|
|
13833
|
-
return { format, value: dateValue };
|
|
13834
|
-
}
|
|
13835
|
-
case 'dateLocal':
|
|
13836
|
-
case 'dateTimeLocal': {
|
|
13837
|
-
const format = column.excelFormat || (column.type === 'dateLocal' ? KIT_DATE_FORMAT : KIT_DATETIME_FORMAT_LONG);
|
|
13838
|
-
const dateValue = value ? this.truncateToSeconds(new Date(value)) : undefined;
|
|
13839
|
-
return { format, value: dateValue };
|
|
13840
|
-
}
|
|
13841
|
-
case 'dateZone':
|
|
13842
|
-
case 'dateTimeZone': {
|
|
13843
|
-
const format = column.excelFormat || (column.type === 'dateZone' ? KIT_DATE_FORMAT : KIT_DATETIME_FORMAT_LONG);
|
|
13844
|
-
const dateValue = value
|
|
13845
|
-
? this.truncateToSeconds(toZonedTime(new Date(value), userTimezone))
|
|
13846
|
-
: undefined;
|
|
13847
|
-
return { format, value: dateValue };
|
|
13848
|
-
}
|
|
13849
|
-
}
|
|
13850
|
-
return { value: this.gridCellService.createCellValue(column.type, column.field, row, translationMap, '', valueTransforms) };
|
|
13851
|
-
});
|
|
13852
|
-
rows.push({ cells: rowCells, type: 'data' });
|
|
13853
|
-
}
|
|
13854
|
-
return rows;
|
|
13855
|
-
}
|
|
13856
|
-
timeStringToExcelFraction(time) {
|
|
13857
|
-
if (!time) {
|
|
13858
|
-
return '';
|
|
13859
|
-
}
|
|
13860
|
-
const [hoursStr, minutesStr,] = time.split(':');
|
|
13861
|
-
const hours = Number.parseInt(hoursStr, 10);
|
|
13862
|
-
const minutes = Number.parseInt(minutesStr, 10);
|
|
13863
|
-
return (hours * 60 + minutes) / (24 * 60);
|
|
13864
|
-
}
|
|
13865
|
-
convertToUtcDate(dateString) {
|
|
13866
|
-
const date = new Date(dateString);
|
|
13867
|
-
const timezoneOffset = date.getTimezoneOffset();
|
|
13868
|
-
return new Date(date.getTime() + timezoneOffset * 60 * 1000);
|
|
13869
|
-
}
|
|
13870
|
-
truncateToSeconds(date) {
|
|
13871
|
-
const result = new Date(date);
|
|
13872
|
-
result.setMilliseconds(0);
|
|
13873
|
-
return result;
|
|
13874
|
-
}
|
|
13875
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitExcelExportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
13876
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitExcelExportService }); }
|
|
13877
|
-
}
|
|
13878
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitExcelExportService, decorators: [{
|
|
13879
|
-
type: Injectable
|
|
13880
|
-
}] });
|
|
13881
|
-
|
|
13882
14286
|
class KitGridExportComponent {
|
|
13883
14287
|
constructor() {
|
|
13884
14288
|
this.translateService = inject(TranslateService);
|
|
@@ -15301,9 +15705,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
15301
15705
|
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"kit-skeleton-section\">\n <kit-skeleton [height]=\"24\"\n [width]=\"250\"\n ></kit-skeleton>\n\n <kit-skeleton [height]=\"500\"\n ></kit-skeleton>\n</div>\n", styles: [".kit-skeleton-section{display:flex;flex-direction:column;gap:30px}\n"] }]
|
|
15302
15706
|
}] });
|
|
15303
15707
|
|
|
15304
|
-
const KIT_GRID_COLUMN_WIDTH = 170;
|
|
15305
|
-
const KIT_GRID_PAGE_SIZE = 10;
|
|
15306
|
-
|
|
15307
15708
|
class KitGridLiveUpdatesControlComponent {
|
|
15308
15709
|
constructor() {
|
|
15309
15710
|
this.source = input.required(...(ngDevMode ? [{ debugName: "source" }] : /* istanbul ignore next */ []));
|
|
@@ -15368,51 +15769,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
15368
15769
|
}]
|
|
15369
15770
|
}] });
|
|
15370
15771
|
|
|
15371
|
-
class KitHttpErrorHandlerService {
|
|
15372
|
-
constructor() {
|
|
15373
|
-
this.kitNotificationService = inject(KitNotificationService);
|
|
15374
|
-
this.translateService = inject(TranslateService);
|
|
15375
|
-
this.router = inject(Router);
|
|
15376
|
-
}
|
|
15377
|
-
handleServerError(error) {
|
|
15378
|
-
if (error.error instanceof ErrorEvent) {
|
|
15379
|
-
this.showErrorNotification(`${this.translateService.instant('kit.http.clientError')} ${error.error.message}`);
|
|
15380
|
-
return throwError(() => error);
|
|
15381
|
-
}
|
|
15382
|
-
switch (error.status) {
|
|
15383
|
-
case HttpStatusCode.Unauthorized:
|
|
15384
|
-
this.showErrorNotification(this.translateService.instant('kit.http.unauthorized'));
|
|
15385
|
-
break;
|
|
15386
|
-
case HttpStatusCode.Forbidden:
|
|
15387
|
-
this.showErrorNotification(this.translateService.instant('kit.http.forbidden'));
|
|
15388
|
-
this.router.navigate(['forbidden']);
|
|
15389
|
-
break;
|
|
15390
|
-
case HttpStatusCode.NotFound:
|
|
15391
|
-
this.showErrorNotification(this.translateService.instant('kit.http.notFound'));
|
|
15392
|
-
break;
|
|
15393
|
-
case HttpStatusCode.BadRequest:
|
|
15394
|
-
this.showErrorNotification(`${this.translateService.instant('kit.http.validationError')} ${error.error?.title ?? ''}`);
|
|
15395
|
-
break;
|
|
15396
|
-
default:
|
|
15397
|
-
if (error.status >= HttpStatusCode.InternalServerError) {
|
|
15398
|
-
this.showErrorNotification(`${this.translateService.instant('kit.http.serverError')} ${error.error?.title ?? ''}`);
|
|
15399
|
-
}
|
|
15400
|
-
}
|
|
15401
|
-
return throwError(() => error);
|
|
15402
|
-
}
|
|
15403
|
-
showSuccessNotification(message) {
|
|
15404
|
-
this.kitNotificationService.addNotification(KitNotificationType.SUCCESS, message);
|
|
15405
|
-
}
|
|
15406
|
-
showErrorNotification(message) {
|
|
15407
|
-
this.kitNotificationService.addNotification(KitNotificationType.ERROR, message);
|
|
15408
|
-
}
|
|
15409
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitHttpErrorHandlerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
15410
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitHttpErrorHandlerService }); }
|
|
15411
|
-
}
|
|
15412
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitHttpErrorHandlerService, decorators: [{
|
|
15413
|
-
type: Injectable
|
|
15414
|
-
}] });
|
|
15415
|
-
|
|
15416
15772
|
class KitClipboardService {
|
|
15417
15773
|
constructor() {
|
|
15418
15774
|
this.window = inject(WINDOW);
|
|
@@ -16360,74 +16716,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
16360
16716
|
], template: "<div class=\"kit-tree\">\n <div class=\"kit-tree-toolbar\">\n @if (isStructuredFormat()) {\n <kit-button kitTooltip\n kitTooltipFilter=\"kit-button\"\n [title]=\"toggleAllTitleKey() | translate\"\n [kitTooltipPosition]=\"kitTooltipPosition.TOP\"\n [type]=\"kitButtonType.GHOST\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [icon]=\"toggleAllIcon()\"\n [disabled]=\"isExpandAllDisabled()\"\n (clicked)=\"toggleAll()\"\n ></kit-button>\n }\n <kit-button kitTooltip\n kitTooltipFilter=\"kit-button\"\n [title]=\"'kit.tree.actions.copyRaw' | translate\"\n [kitTooltipPosition]=\"kitTooltipPosition.TOP\"\n [type]=\"kitButtonType.GHOST\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [icon]=\"kitSvgIcon.COPY\"\n [iconType]=\"kitSvgIconType.STROKE\"\n (clicked)=\"copyRawInput()\"\n ></kit-button>\n <kit-button kitTooltip\n kitTooltipFilter=\"kit-button\"\n [title]=\"'kit.tree.actions.copyPrettified' | translate\"\n [kitTooltipPosition]=\"kitTooltipPosition.TOP\"\n [type]=\"kitButtonType.GHOST\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [icon]=\"kitSvgIcon.MAGIC_WAND\"\n (clicked)=\"copyPrettifiedInput()\"\n ></kit-button>\n\n @if (isStructuredFormat()) {\n <kit-button kitTooltip\n kitTooltipFilter=\"kit-button\"\n [title]=\"toggleViewTitleKey() | translate\"\n [kitTooltipPosition]=\"kitTooltipPosition.TOP\"\n [type]=\"kitButtonType.GHOST\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [icon]=\"toggleViewIcon()\"\n [active]=\"isRawView()\"\n (clicked)=\"toggleRawFormattedView()\"\n ></kit-button>\n }\n\n @for (action of customActions(); track action.id) {\n <kit-button kitTooltip\n kitTooltipFilter=\"kit-button\"\n [title]=\"action.label\"\n [kitTooltipPosition]=\"kitTooltipPosition.TOP\"\n [type]=\"kitButtonType.GHOST\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [icon]=\"action.icon\"\n [active]=\"activeCustomActionId() === action.id\"\n [disabled]=\"!!action.disabled\"\n (clicked)=\"onCustomActionClick(action)\"\n ></kit-button>\n }\n </div>\n\n <div class=\"kit-tree-content\">\n @if (isCustomContentActive()) {\n <div class=\"kit-tree-custom-content\">\n <ng-container [ngTemplateOutlet]=\"activeTemplate()?.templateRef ?? null\"></ng-container>\n </div>\n } @else if (isRawView() || !isStructuredFormat()) {\n <pre class=\"kit-tree-raw\">{{ rawContent() }}</pre>\n } @else {\n <kendo-treeview kendoTreeViewHierarchyBinding\n kendoTreeViewExpandable\n childrenField=\"children\"\n textField=\"displayKey\"\n expandBy=\"key\"\n [nodes]=\"treeNodes()\"\n [expandedKeys]=\"expandedKeys()\"\n (expandedKeysChange)=\"onExpandedKeysChange($event)\">\n <ng-template kendoTreeViewNodeTemplate\n let-dataItem>\n <div class=\"kit-tree-node\">\n @if (dataItem.displayValue !== undefined) {\n <div class=\"kit-tree-node-key\">{{ dataItem.displayKey }}</div>\n <div class=\"kit-tree-node-separator\">:</div>\n @if (!isNodeExpanded(dataItem)) {\n <div class=\"kit-tree-node-value\">{{ dataItem.displayValue }}</div>\n }\n } @else {\n <div class=\"kit-tree-node-key\">{{ dataItem.text }}</div>\n }\n </div>\n </ng-template>\n </kendo-treeview>\n }\n </div>\n</div>\n", styles: [".display-flex{display:flex}.flex-align-items-center{align-items:center}.flex-justify-content-center{justify-content:center}.flex-justify-content-end{justify-content:flex-end}.display-block{display:block}div[kendowatermarkoverlay]{display:none}:root{--ui-kit-header-height: 86px;--ui-kit-sidebar-collapsed-width: 56px;--ui-kit-sidebar-expanded-width: 256px;--ui-kit-layout-gap: 25px}.kit-tree{padding:15px;background-color:var(--ui-kit-color-white);border:1px solid var(--ui-kit-color-grey-11);border-radius:10px}.kit-tree-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding-bottom:10px;border-bottom:1px solid var(--ui-kit-color-grey-11)}.kit-tree-content{padding:15px 0 0}.kit-tree-node{display:flex;align-items:center;gap:5px;padding:3px 0;font-size:14px;font-family:monospace;line-height:1.5}.kit-tree-node-key{color:var(--ui-kit-color-grey-10);font-weight:600}.kit-tree-node-separator{color:var(--ui-kit-color-grey-10)}.kit-tree-node-value{color:var(--ui-kit-color-main)}.kit-tree-raw{margin:0;padding:10px;color:var(--ui-kit-color-grey-10);font-family:monospace;border-radius:6px;white-space:pre-wrap;word-break:break-word;background:var(--ui-kit-color-grey-8)}.kit-tree .k-treeview::-webkit-scrollbar{height:8px;width:8px;background-color:var(--ui-kit-color-white)}.kit-tree .k-treeview::-webkit-scrollbar-thumb{background-color:var(--ui-kit-color-grey-12);border-radius:4px}.kit-tree .k-treeview::-webkit-scrollbar-thumb:hover{background-color:var(--ui-kit-color-grey-18)}.kit-tree .k-treeview{scrollbar-color:initial}.kit-tree .k-treeview-group{padding-left:20px}.kit-tree .k-treeview-lines{margin:0;padding:0;list-style:none}.kit-tree .k-treeview-leaf{padding:0}.kit-tree .k-treeview-item{list-style:none}.kit-tree .k-treeview-item-content{display:flex;align-items:center;gap:5px;padding-inline-start:calc(var(--kendo-treeview-level, 0) * 20px)}.kit-tree .k-treeview-item-content:hover{background:none}.kit-tree .k-treeview-item-content.k-focus{box-shadow:none}.kit-tree .k-treeview-toggle{margin-inline-start:-25px;width:18px;height:18px;cursor:pointer}.kit-tree .k-treeview-toggle:hover{color:var(--ui-kit-color-main)}.kit-tree .k-treeview-toggle .k-icon{padding:0;width:100%;height:100%}\n"] }]
|
|
16361
16717
|
}], ctorParameters: () => [], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], customActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "customActions", required: false }] }], contentTemplates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => KitTreeContentDirective), { isSignal: true }] }] } });
|
|
16362
16718
|
|
|
16363
|
-
const KIT_ENTITY_CREATE_SERVICE = new InjectionToken('kitEntityCreateService');
|
|
16364
|
-
class KitCreateEntityDialogComponent extends DialogContentBase {
|
|
16365
|
-
constructor() {
|
|
16366
|
-
const dialog = inject(DialogRef);
|
|
16367
|
-
super(dialog);
|
|
16368
|
-
this.entityService = inject(KIT_ENTITY_CREATE_SERVICE);
|
|
16369
|
-
this.kitFormErrors = inject(KitFormErrors);
|
|
16370
|
-
this.formBuilder = inject(FormBuilder);
|
|
16371
|
-
this.maxLength = input(256, ...(ngDevMode ? [{ debugName: "maxLength" }] : /* istanbul ignore next */ []));
|
|
16372
|
-
this.form = this.formBuilder.group({
|
|
16373
|
-
name: this.formBuilder.control('', [
|
|
16374
|
-
Validators.required,
|
|
16375
|
-
kitWhitespaceValidator(),
|
|
16376
|
-
Validators.maxLength(this.maxLength()),
|
|
16377
|
-
]),
|
|
16378
|
-
});
|
|
16379
|
-
this.kitButtonKind = KitButtonKind;
|
|
16380
|
-
this.kitButtonType = KitButtonType;
|
|
16381
|
-
this.isSaving = signal(false, ...(ngDevMode ? [{ debugName: "isSaving" }] : /* istanbul ignore next */ []));
|
|
16382
|
-
this.getTextboxState = getTextboxState;
|
|
16383
|
-
effect(() => {
|
|
16384
|
-
const maxLength = this.maxLength();
|
|
16385
|
-
this.form.controls['name'].setValidators([
|
|
16386
|
-
Validators.required,
|
|
16387
|
-
kitWhitespaceValidator(),
|
|
16388
|
-
Validators.maxLength(maxLength),
|
|
16389
|
-
]);
|
|
16390
|
-
this.form.controls['name'].updateValueAndValidity({ emitEvent: false });
|
|
16391
|
-
});
|
|
16392
|
-
}
|
|
16393
|
-
createEntity() {
|
|
16394
|
-
this.isSaving.set(true);
|
|
16395
|
-
this.entityService.save({ name: this.form.controls['name'].value.trim() }).pipe(finalize(() => this.isSaving.set(false))).subscribe((data) => {
|
|
16396
|
-
this.dialog.close(data);
|
|
16397
|
-
});
|
|
16398
|
-
}
|
|
16399
|
-
getFormErrorMessages(form, controlName) {
|
|
16400
|
-
return this.kitFormErrors.getErrors(form.controls[controlName]).join('. ');
|
|
16401
|
-
}
|
|
16402
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitCreateEntityDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
16403
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.4", type: KitCreateEntityDialogComponent, isStandalone: true, selector: "kit-create-entity-dialog", inputs: { maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null } }, providers: [KitFormErrors], usesInheritance: true, ngImport: i0, template: "<div [formGroup]=\"form\">\n <kit-textbox class=\"textbox\"\n formControlName=\"name\"\n [label]=\"'Name' | translate\"\n [showStateIcon]=\"false\"\n [state]=\"getTextboxState(form.get('name'))\"\n [messageText]=\"getFormErrorMessages(form, 'name')\" />\n\n <kit-dialog-actions>\n <kit-button [label]=\"'Cancel' | translate\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [type]=\"kitButtonType.GHOST\"\n (clicked)=\"dialog.close()\" />\n <kit-button [label]=\"'Save' | translate\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [disabled]=\"form.invalid || isSaving()\"\n (clicked)=\"createEntity()\" />\n </kit-dialog-actions>\n</div>\n", styles: ["::ng-deep .kit-dialog .k-dialog{min-width:400px}::ng-deep .kit-dialog .k-dialog .k-dialog-content{padding:20px 25px}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "component", type: KitTextboxComponent, selector: "kit-textbox", inputs: ["placeholder", "label", "labelTooltip", "defaultValue", "messageIcon", "messageText", "messageTemplate", "disabled", "maxlength", "state", "size", "icon", "clearButton", "showStateIcon", "readonly", "customStateIcon", "type"], outputs: ["defaultValueChange", "disabledChange", "blured", "focused", "changed"] }, { kind: "component", type: KitDialogActionsComponent, selector: "kit-dialog-actions" }, { kind: "component", type: KitButtonComponent, selector: "kit-button", inputs: ["disabled", "label", "type", "icon", "iconType", "kind", "state", "iconPosition", "buttonClass", "active"], outputs: ["clicked"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$8.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$8.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$8.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i1$e.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
16404
|
-
}
|
|
16405
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: KitCreateEntityDialogComponent, decorators: [{
|
|
16406
|
-
type: Component,
|
|
16407
|
-
args: [{ selector: 'kit-create-entity-dialog', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
16408
|
-
TranslateModule,
|
|
16409
|
-
KitTextboxComponent,
|
|
16410
|
-
KitDialogActionsComponent,
|
|
16411
|
-
KitButtonComponent,
|
|
16412
|
-
FormsModule,
|
|
16413
|
-
ReactiveFormsModule,
|
|
16414
|
-
], providers: [KitFormErrors], template: "<div [formGroup]=\"form\">\n <kit-textbox class=\"textbox\"\n formControlName=\"name\"\n [label]=\"'Name' | translate\"\n [showStateIcon]=\"false\"\n [state]=\"getTextboxState(form.get('name'))\"\n [messageText]=\"getFormErrorMessages(form, 'name')\" />\n\n <kit-dialog-actions>\n <kit-button [label]=\"'Cancel' | translate\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [type]=\"kitButtonType.GHOST\"\n (clicked)=\"dialog.close()\" />\n <kit-button [label]=\"'Save' | translate\"\n [kind]=\"kitButtonKind.MEDIUM\"\n [disabled]=\"form.invalid || isSaving()\"\n (clicked)=\"createEntity()\" />\n </kit-dialog-actions>\n</div>\n", styles: ["::ng-deep .kit-dialog .k-dialog{min-width:400px}::ng-deep .kit-dialog .k-dialog .k-dialog-content{padding:20px 25px}\n"] }]
|
|
16415
|
-
}], ctorParameters: () => [], propDecorators: { maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }] } });
|
|
16416
|
-
|
|
16417
|
-
var KitPermissionTypes;
|
|
16418
|
-
(function (KitPermissionTypes) {
|
|
16419
|
-
KitPermissionTypes["Create"] = "Create";
|
|
16420
|
-
KitPermissionTypes["Delete"] = "Delete";
|
|
16421
|
-
KitPermissionTypes["Edit"] = "Edit";
|
|
16422
|
-
KitPermissionTypes["View"] = "View";
|
|
16423
|
-
KitPermissionTypes["Set"] = "Set";
|
|
16424
|
-
KitPermissionTypes["Use"] = "Use";
|
|
16425
|
-
})(KitPermissionTypes || (KitPermissionTypes = {}));
|
|
16426
|
-
const defaultUserRolesSort = [{ field: 'name', dir: 'asc' }];
|
|
16427
|
-
const exportedUserRoleColumns = [
|
|
16428
|
-
kitBuildGridColumn('name', 'Name', 'string', false, false, KIT_GRID_COLUMN_WIDTH),
|
|
16429
|
-
];
|
|
16430
|
-
|
|
16431
16719
|
class FetchUserRoles extends KitAbstractPayloadAction {
|
|
16432
16720
|
static { this.type = '[KitUserRoles] Fetch User Roles'; }
|
|
16433
16721
|
}
|
|
@@ -16855,5 +17143,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
16855
17143
|
* Generated bundle index. Do not edit.
|
|
16856
17144
|
*/
|
|
16857
17145
|
|
|
16858
|
-
export { AbstractKitCtaPanelConfirmationComponent, AddGridFilter, FetchApiTokens, FetchUser, FetchUserIdentities, FetchUserPermissions, FetchUserSettings, HighlightPipe, KIT_ALL_PERMISSIONS_PATH, KIT_API_TOKENS_STATE_TOKEN, KIT_BASE_PATH, KIT_DATETIME_FORMAT_LONG, KIT_DATE_FORMAT, KIT_DATE_FORMAT_SHORT, KIT_ENTITY_CREATE_SERVICE, KIT_GRID_CELL_DATE_FORMAT_CONFIG, KIT_GRID_COLUMN_WIDTH, KIT_GRID_PAGE_SIZE, KIT_GRID_STATE_TOKEN, KIT_TIME_FORMAT_SHORT, KIT_USER_APPLICATIONS_PATH, KIT_USER_IDENTITIES_STATE_TOKEN, KIT_USER_PATH, KIT_USER_PERMISSIONS_PATH, KIT_USER_PERMISSIONS_STATE_TOKEN, KIT_USER_STATE_TOKEN, KitAbstractIdPayloadAction, KitAbstractPayloadAction, KitAccountService, KitApiTokenMaintenanceListComponent, KitApiTokenMaintenanceListState, KitApiTokensPermissionCategories, KitAutocompleteComponent, KitAutocompleteDirective, KitAvatarComponent, KitAvatarSize, KitBackButtonComponent, KitBadgeDirective, KitBadgeTheme, KitBreadcrumbsComponent, KitBreadcrumbsService, KitButtonComponent, KitButtonIconPosition, KitButtonKind, KitButtonState, KitButtonType, KitCardComponent, KitCardDetailsComponent, KitCardTheme, KitCheckboxComponent, KitCheckboxState, KitClipboardService, KitCodeEditorComponent, KitCodeEditorLanguage, KitCodeEditorMode, KitCollapsedListComponent, KitCollapsedListDropdownAlign, KitCopyTextComponent, KitCreateEntityDialogComponent, KitCtaPanelAbstractConfirmationComponent, KitCtaPanelActionComponent, KitCtaPanelConfirmationComponent, KitCtaPanelItemComponent, KitCtaPanelItemType, KitDataFieldComponent, KitDataFieldState, KitDateRangeSingleInput, KitDatepickerComponent, KitDatepickerSize, KitDaterangeComponent, KitDaterangeType, KitDatetimepickerComponent, KitDeferredFailedRequestService, KitDialogActionsComponent, KitDialogComponent, KitDialogService, KitDialogTitlebarComponent, KitDialogType, KitDrawerComponent, KitDrawerContentTemplateDirective, KitDrawerFooterTemplateDirective, KitDrawerMode, KitDropdownComponent, KitDropdownItemTemplateDirective, KitDropdownSize, KitEmptySectionComponent, KitEmptySectionSize, KitEntityGridComponent, KitEntitySectionComponent, KitEntitySectionContainerComponent, KitEntitySectionEditableActionsTemplateDirective, KitEntitySectionEditableComponent, KitEntitySectionEditableEditTemplateDirective, KitEntitySectionEditableMode, KitEntitySectionEditableViewTemplateDirective, KitEntityTitleComponent, KitExcelExportService, KitExpansionPanelComponent, KitExpansionPanelHeaderTemplateDirective, KitExpansionPanelToggleMode, KitExpansionPanelView, KitFileCardComponent, KitFileCardMessagesComponent, KitFileCardSize, KitFileUploadComponent, KitFilterCheckboxComponent, KitFilterDateRange, KitFilterLogic, KitFilterOperator, KitFilterType, KitForbiddenComponent, KitFormErrors, KitFormFieldComponent, KitFormLabelComponent, KitFormMessageComponent, KitGlobalSearchComponent, KitGridActionComponent, KitGridArchiveToggle, KitGridCellComponent, KitGridCellService, KitGridCellTemplateDirective, KitGridCheckboxColumnComponent, KitGridCheckboxColumnType, KitGridColumnComponent, KitGridColumnManagerComponent, KitGridComponent, KitGridDetailTemplateDirective, KitGridDetailsButtonComponent, KitGridDropPosition, KitGridExportComponent, KitGridFiltersComponent, KitGridFiltersToggleComponent, KitGridLiveUpdatesControlComponent, KitGridSearchComponent, KitGridSortSettingsMode, KitGridState, KitGridUrlStateService, KitGridViewType, KitGridViewsComponent, KitGridViewsState, KitHttpErrorHandlerService, KitListComponent, KitLoaderComponent, KitLocationStepperComponent, KitLocationStepperIconTheme, KitLocationStepperTheme, KitMobileHeaderComponent, KitMobileMenuComponent, KitMobileMenuState, KitMultiselectComponent, KitMultiselectGroupTagTemplateDirective, KitMultiselectItemsDirection, KitMultiselectSize, KitNavigationMenuComponent, KitNavigationMenuService, KitNavigationMenuSubmenuComponent, KitNavigationTabsComponent, KitNavigationTabsType, KitNotFoundComponent, KitNoteComponent, KitNotificationComponent, KitNotificationService, KitNotificationType, KitNumericTextboxComponent, KitNumericTextboxSize, KitNumericTextboxState, KitOptionToggleComponent, KitOptionToggleSize, KitPageLayoutComponent, KitPermissionDirective, KitPillComponent, KitPillTheme, KitPillType, KitPopoverAnchorDirective, KitPopoverComponent, KitPopoverPosition, KitPopoverShowOption, KitPopupAlignHorizontal, KitPopupAlignVertical, KitPopupComponent, KitPopupPositionMode, KitProfileMenuComponent, KitQueryParamsName, KitQueryParamsService, KitRadioButtonComponent, KitRadioButtonType, KitRoutePathComponent, KitSchedulerAgendaTimeTemplateDirective, KitSchedulerComponent, KitSchedulerCustomViewTemplateDirective, KitSchedulerMonthEventTemplateDirective, KitSchedulerMonthHeaderCellTemplateDirective, KitSchedulerToolbarTemplateDirective, KitSchedulerWeekEventTemplateDirective, KitScrollNavigationComponent, KitScrollNavigationSectionComponent, KitSearchBarComponent, KitSelectableCardComponent, KitSidebarComponent, KitSkeletonAnimation, KitSkeletonComponent, KitSkeletonGridComponent, KitSkeletonSectionComponent, KitSkeletonShape, KitSortDirection, KitSortableComponent, KitSplitContainerComponent, KitStatusLabelColor, KitStatusLabelComponent, KitStatusLabelSize, KitSvgIcon, KitSvgIconComponent, KitSvgIconType, KitSvgSpriteComponent, KitSwitchComponent, KitSwitchMode, KitSwitchState, KitTabComponent, KitTabContentDirective, KitTabsComponent, KitTabsSize, KitTabsType, KitTextLabelComponent, KitTextLabelState, KitTextareaAutoresizeDirective, KitTextareaComponent, KitTextareaState, KitTextboxActionsComponent, KitTextboxComponent, KitTextboxSize, KitTextboxState, KitThemeService, KitThemes, KitTileLayoutComponent, KitTileLayoutItemComponent, KitTimelineCardComponent, KitTimelineCompactComponent, KitTimelineCompactItemTheme, KitTimelineComponent, KitTimelineTheme, KitTimelineType, KitTimepickerComponent, KitTitleTemplateDirective, KitToastrModule, KitToastrPosition, KitToastrService, KitToastrType, KitToggleComponent, KitToggleSize, KitTooltipDirective, KitTooltipPosition, KitTopBarComponent, KitTrackingCardComponent, KitTrackingTimelineComponent, KitTranslateLoader, KitTranslateService, KitTreeComponent, KitTreeContentDirective, KitTreeContentFormat, KitTreeViewMode, KitTruncateTextComponent, KitUnitsTextboxComponent, KitUnitsTextboxDropdownPosition, KitUnitsTextboxType, KitUserApplicationsState, KitUserIdentitiesInterceptor, KitUserIdentitiesSelector, KitUserIdentitiesState, KitUserPermissionsState, KitUserRoleDetailsComponent, KitUserRolesComponent, KitUserRolesService, KitUserRolesState, KitUserSettingsComponent, KitUserSettingsKeys, KitUserSettingsState, KitUserState, KitUserType, KitUsersSettingsComponent, KitUsersSettingsEntitlementsService, KitUsersSettingsEntitlementsState, KitUsersSettingsReferenceService, KitUsersSettingsService, KitUsersSettingsState, RemoveGridFilter, SetGridColumns, SetGridFilters, SetGridSearch, SetGridSkip, SetGridSort, SetGridTake, SetUserIdentity, UpdateGridFilter, buildRandomUUID, changeFilterField, createDataFetcherFactory, findMatches, getTextboxState, isKitFilterDescriptor, kitApiResponseDefaultEntities, kitApiTokenMaintenanceConfig, kitApiTokenMaintenanceRoutes, kitBuildFilterBooleanOptions, kitBuildFilterListOptions, kitBuildFilters, kitBuildGridColumn, kitBuildGridDataResults, kitBuildHttpParams, kitBuildOdataFilter, kitBuildSortString, kitDataStateToODataString, kitEncodeViewNameToUrl, kitFetchExportGridData, kitFetchGridData, kitFilterBy, kitFormatStringForSearch, kitGetPermissionTypesByCategory, kitHasPermission, kitNormalizeDateToUtc, kitShouldResetGridState, kitTranslations, kitUserPermissionsGuard, kitUserRolesConfig, kitWhitespaceValidator, mapGlobalSearchResult, trimTrailingSlash };
|
|
17146
|
+
export { AbstractKitCtaPanelConfirmationComponent, AddGridFilter, DeletePartner, FetchApiTokens, FetchPartners, FetchUser, FetchUserIdentities, FetchUserPermissions, FetchUserSettings, HighlightPipe, KIT_ALL_PERMISSIONS_PATH, KIT_API_TOKENS_STATE_TOKEN, KIT_BASE_PATH, KIT_DATETIME_FORMAT_LONG, KIT_DATE_FORMAT, KIT_DATE_FORMAT_SHORT, KIT_ENTITY_CREATE_SERVICE, KIT_GRID_CELL_DATE_FORMAT_CONFIG, KIT_GRID_COLUMN_WIDTH, KIT_GRID_PAGE_SIZE, KIT_GRID_STATE_TOKEN, KIT_PARTNERS_STATE_TOKEN, KIT_TIME_FORMAT_SHORT, KIT_USER_APPLICATIONS_PATH, KIT_USER_IDENTITIES_STATE_TOKEN, KIT_USER_PATH, KIT_USER_PERMISSIONS_PATH, KIT_USER_PERMISSIONS_STATE_TOKEN, KIT_USER_STATE_TOKEN, KitAbstractIdPayloadAction, KitAbstractPayloadAction, KitAccountService, KitApiTokenMaintenanceListComponent, KitApiTokenMaintenanceListState, KitApiTokensPermissionCategories, KitAutocompleteComponent, KitAutocompleteDirective, KitAvatarComponent, KitAvatarSize, KitBackButtonComponent, KitBadgeDirective, KitBadgeTheme, KitBreadcrumbsComponent, KitBreadcrumbsService, KitButtonComponent, KitButtonIconPosition, KitButtonKind, KitButtonState, KitButtonType, KitCardComponent, KitCardDetailsComponent, KitCardTheme, KitCheckboxComponent, KitCheckboxState, KitClipboardService, KitCodeEditorComponent, KitCodeEditorLanguage, KitCodeEditorMode, KitCollapsedListComponent, KitCollapsedListDropdownAlign, KitCopyTextComponent, KitCreateEntityDialogComponent, KitCtaPanelAbstractConfirmationComponent, KitCtaPanelActionComponent, KitCtaPanelConfirmationComponent, KitCtaPanelItemComponent, KitCtaPanelItemType, KitDataFieldComponent, KitDataFieldState, KitDateRangeSingleInput, KitDatepickerComponent, KitDatepickerSize, KitDaterangeComponent, KitDaterangeType, KitDatetimepickerComponent, KitDeferredFailedRequestService, KitDialogActionsComponent, KitDialogComponent, KitDialogService, KitDialogTitlebarComponent, KitDialogType, KitDrawerComponent, KitDrawerContentTemplateDirective, KitDrawerFooterTemplateDirective, KitDrawerMode, KitDropdownComponent, KitDropdownItemTemplateDirective, KitDropdownSize, KitEmptySectionComponent, KitEmptySectionSize, KitEntityGridComponent, KitEntitySectionComponent, KitEntitySectionContainerComponent, KitEntitySectionEditableActionsTemplateDirective, KitEntitySectionEditableComponent, KitEntitySectionEditableEditTemplateDirective, KitEntitySectionEditableMode, KitEntitySectionEditableViewTemplateDirective, KitEntityTitleComponent, KitExcelExportService, KitExpansionPanelComponent, KitExpansionPanelHeaderTemplateDirective, KitExpansionPanelToggleMode, KitExpansionPanelView, KitFileCardComponent, KitFileCardMessagesComponent, KitFileCardSize, KitFileUploadComponent, KitFilterCheckboxComponent, KitFilterDateRange, KitFilterLogic, KitFilterOperator, KitFilterType, KitForbiddenComponent, KitFormErrors, KitFormFieldComponent, KitFormLabelComponent, KitFormMessageComponent, KitGlobalSearchComponent, KitGridActionComponent, KitGridArchiveToggle, KitGridCellComponent, KitGridCellService, KitGridCellTemplateDirective, KitGridCheckboxColumnComponent, KitGridCheckboxColumnType, KitGridColumnComponent, KitGridColumnManagerComponent, KitGridComponent, KitGridDetailTemplateDirective, KitGridDetailsButtonComponent, KitGridDropPosition, KitGridExportComponent, KitGridFiltersComponent, KitGridFiltersToggleComponent, KitGridLiveUpdatesControlComponent, KitGridSearchComponent, KitGridSortSettingsMode, KitGridState, KitGridUrlStateService, KitGridViewType, KitGridViewsComponent, KitGridViewsState, KitHttpErrorHandlerService, KitListComponent, KitLoaderComponent, KitLocationStepperComponent, KitLocationStepperIconTheme, KitLocationStepperTheme, KitMobileHeaderComponent, KitMobileMenuComponent, KitMobileMenuState, KitMultiselectComponent, KitMultiselectGroupTagTemplateDirective, KitMultiselectItemsDirection, KitMultiselectSize, KitNavigationMenuComponent, KitNavigationMenuService, KitNavigationMenuSubmenuComponent, KitNavigationTabsComponent, KitNavigationTabsType, KitNotFoundComponent, KitNoteComponent, KitNotificationComponent, KitNotificationService, KitNotificationType, KitNumericTextboxComponent, KitNumericTextboxSize, KitNumericTextboxState, KitOptionToggleComponent, KitOptionToggleSize, KitPageLayoutComponent, KitPartnerComponent, KitPartnerService, KitPartnerState, KitPermissionDirective, KitPillComponent, KitPillTheme, KitPillType, KitPopoverAnchorDirective, KitPopoverComponent, KitPopoverPosition, KitPopoverShowOption, KitPopupAlignHorizontal, KitPopupAlignVertical, KitPopupComponent, KitPopupPositionMode, KitProfileMenuComponent, KitQueryParamsName, KitQueryParamsService, KitRadioButtonComponent, KitRadioButtonType, KitRoutePathComponent, KitSchedulerAgendaTimeTemplateDirective, KitSchedulerComponent, KitSchedulerCustomViewTemplateDirective, KitSchedulerMonthEventTemplateDirective, KitSchedulerMonthHeaderCellTemplateDirective, KitSchedulerToolbarTemplateDirective, KitSchedulerWeekEventTemplateDirective, KitScrollNavigationComponent, KitScrollNavigationSectionComponent, KitSearchBarComponent, KitSelectableCardComponent, KitSidebarComponent, KitSkeletonAnimation, KitSkeletonComponent, KitSkeletonGridComponent, KitSkeletonSectionComponent, KitSkeletonShape, KitSortDirection, KitSortableComponent, KitSplitContainerComponent, KitStatusLabelColor, KitStatusLabelComponent, KitStatusLabelSize, KitSvgIcon, KitSvgIconComponent, KitSvgIconType, KitSvgSpriteComponent, KitSwitchComponent, KitSwitchMode, KitSwitchState, KitTabComponent, KitTabContentDirective, KitTabsComponent, KitTabsSize, KitTabsType, KitTextLabelComponent, KitTextLabelState, KitTextareaAutoresizeDirective, KitTextareaComponent, KitTextareaState, KitTextboxActionsComponent, KitTextboxComponent, KitTextboxSize, KitTextboxState, KitThemeService, KitThemes, KitTileLayoutComponent, KitTileLayoutItemComponent, KitTimelineCardComponent, KitTimelineCompactComponent, KitTimelineCompactItemTheme, KitTimelineComponent, KitTimelineTheme, KitTimelineType, KitTimepickerComponent, KitTitleTemplateDirective, KitToastrModule, KitToastrPosition, KitToastrService, KitToastrType, KitToggleComponent, KitToggleSize, KitTooltipDirective, KitTooltipPosition, KitTopBarComponent, KitTrackingCardComponent, KitTrackingTimelineComponent, KitTranslateLoader, KitTranslateService, KitTreeComponent, KitTreeContentDirective, KitTreeContentFormat, KitTreeViewMode, KitTruncateTextComponent, KitUnitsTextboxComponent, KitUnitsTextboxDropdownPosition, KitUnitsTextboxType, KitUserApplicationsState, KitUserIdentitiesInterceptor, KitUserIdentitiesSelector, KitUserIdentitiesState, KitUserPermissionsState, KitUserRoleDetailsComponent, KitUserRolesComponent, KitUserRolesService, KitUserRolesState, KitUserSettingsComponent, KitUserSettingsKeys, KitUserSettingsState, KitUserState, KitUserType, KitUsersSettingsComponent, KitUsersSettingsEntitlementsService, KitUsersSettingsEntitlementsState, KitUsersSettingsReferenceService, KitUsersSettingsService, KitUsersSettingsState, RemoveGridFilter, SetGridColumns, SetGridFilters, SetGridSearch, SetGridSkip, SetGridSort, SetGridTake, SetUserIdentity, UpdateGridFilter, UpdatePartnerName, buildRandomUUID, changeFilterField, createDataFetcherFactory, findMatches, getTextboxState, isKitFilterDescriptor, kitApiResponseDefaultEntities, kitApiTokenMaintenanceConfig, kitApiTokenMaintenanceRoutes, kitBuildFilterBooleanOptions, kitBuildFilterListOptions, kitBuildFilters, kitBuildGridColumn, kitBuildGridDataResults, kitBuildHttpParams, kitBuildOdataFilter, kitBuildSortString, kitDataStateToODataString, kitEncodeViewNameToUrl, kitFetchExportGridData, kitFetchGridData, kitFilterBy, kitFormatStringForSearch, kitGetPermissionTypesByCategory, kitHasPermission, kitNormalizeDateToUtc, kitShouldResetGridState, kitTranslations, kitUserPermissionsGuard, kitUserRolesConfig, kitWhitespaceValidator, mapGlobalSearchResult, trimTrailingSlash };
|
|
16859
17147
|
//# sourceMappingURL=indigina-ui-kit.mjs.map
|