@indigina/ui-kit 1.1.129 → 1.1.131
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 +786 -27
- package/fesm2022/indigina-ui-kit.mjs.map +1 -1
- package/lib/components/kit-navigation-menu/kit-navigation-menu.component.d.ts +4 -4
- package/lib/i18n/kit-translations.d.ts +2 -0
- package/lib/services/api/kit-settings-api/kit-settings-api.model.d.ts +9 -0
- package/lib/services/api/kit-settings-api/kit-settings-api.service.d.ts +14 -0
- package/lib/services/kit-translate/kit-translate.service.d.ts +9 -0
- package/lib/store/abstract-payload.action.d.ts +4 -0
- package/lib/store/store.const.d.ts +2 -0
- package/lib/store/store.model.d.ts +5 -0
- package/lib/token/kit-base-path.token.d.ts +2 -0
- package/lib/widgets/kit-grid-management/kit-grid-filters/kit-grid-filters.model.d.ts +18 -0
- package/lib/widgets/kit-grid-management/kit-grid-filters/kit-grid-filters.util.d.ts +3 -0
- package/lib/widgets/kit-grid-management/kit-grid-management.util.d.ts +3 -0
- package/lib/widgets/kit-grid-management/kit-grid-views/kit-grid-views-list/kit-grid-views-list.component.d.ts +50 -0
- package/lib/widgets/kit-grid-management/kit-grid-views/kit-grid-views-manager/kit-grid-views-manager.component.d.ts +25 -0
- package/lib/widgets/kit-grid-management/kit-grid-views/kit-grid-views-save/kit-grid-views-save.component.d.ts +38 -0
- package/lib/widgets/kit-grid-management/kit-grid-views/kit-grid-views.component.d.ts +38 -0
- package/lib/widgets/kit-grid-management/kit-grid-views/kit-grid-views.util.d.ts +13 -0
- package/lib/widgets/kit-grid-management/kit-grid-views/store/kit-grid-views.action.d.ts +23 -0
- package/lib/widgets/kit-grid-management/kit-grid-views/store/kit-grid-views.model.d.ts +33 -0
- package/lib/widgets/kit-grid-management/kit-grid-views/store/kit-grid-views.state.d.ts +25 -0
- package/lib/widgets/kit-grid-management/store/kit-grid.action.d.ts +25 -0
- package/lib/widgets/kit-grid-management/store/kit-grid.model.d.ts +18 -0
- package/lib/widgets/kit-grid-management/store/kit-grid.state.d.ts +18 -0
- package/package.json +1 -1
- package/public-api.d.ts +11 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnInit, WritableSignal } from '@angular/core';
|
|
1
|
+
import { InputSignal, ModelSignal, OnInit, WritableSignal } from '@angular/core';
|
|
2
2
|
import { KitNavigationMenuAppItem, KitNavigationMenuItem } from './kit-navigation-menu.model';
|
|
3
3
|
import { KitSvgIconType, KitSvgIcon } from '../kit-svg-icon/kit-svg-icon.const';
|
|
4
4
|
import { Router } from '@angular/router';
|
|
@@ -11,11 +11,11 @@ export declare class KitNavigationMenuComponent implements OnInit {
|
|
|
11
11
|
/**
|
|
12
12
|
* An items list which is going to be rendered as menu items
|
|
13
13
|
*/
|
|
14
|
-
menuItems: KitNavigationMenuItem[]
|
|
14
|
+
readonly menuItems: ModelSignal<KitNavigationMenuItem[]>;
|
|
15
15
|
/**
|
|
16
16
|
* An items list which is going to be rendered as apps menu items
|
|
17
17
|
*/
|
|
18
|
-
appsMenuItems: KitNavigationMenuAppItem[]
|
|
18
|
+
readonly appsMenuItems: InputSignal<KitNavigationMenuAppItem[]>;
|
|
19
19
|
logoPath: string;
|
|
20
20
|
readonly selectedItem: WritableSignal<KitNavigationMenuItem | null>;
|
|
21
21
|
readonly selectedAppsItems: WritableSignal<KitNavigationMenuAppItem[] | null>;
|
|
@@ -34,5 +34,5 @@ export declare class KitNavigationMenuComponent implements OnInit {
|
|
|
34
34
|
private toggleItem;
|
|
35
35
|
private updateMenuState;
|
|
36
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<KitNavigationMenuComponent, never>;
|
|
37
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KitNavigationMenuComponent, "kit-navigation-menu", never, { "menuItems": { "alias": "menuItems"; "required": false; }; "appsMenuItems": { "alias": "appsMenuItems"; "required": false; }; "logoPath": { "alias": "logoPath"; "required": false; }; }, {}, never, never, false, never>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KitNavigationMenuComponent, "kit-navigation-menu", never, { "menuItems": { "alias": "menuItems"; "required": false; "isSignal": true; }; "appsMenuItems": { "alias": "appsMenuItems"; "required": false; "isSignal": true; }; "logoPath": { "alias": "logoPath"; "required": false; }; }, { "menuItems": "menuItemsChange"; }, never, never, false, never>;
|
|
38
38
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { SettingValue, SettingView } from './kit-settings-api.model';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class KitSettingsApiService {
|
|
6
|
+
private readonly httpClient;
|
|
7
|
+
private readonly basePath;
|
|
8
|
+
constructor(httpClient: HttpClient, basePath: string);
|
|
9
|
+
getSettingsByGroup(group: string): Observable<SettingView[]>;
|
|
10
|
+
setSettingByKey(key: string, settingValue: SettingValue): Observable<SettingValue>;
|
|
11
|
+
deleteSettingByGroupAndKey(key: string, group: string): Observable<null>;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KitSettingsApiService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<KitSettingsApiService>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class KitTranslateService {
|
|
4
|
+
private readonly translateService;
|
|
5
|
+
constructor(translateService: TranslateService);
|
|
6
|
+
registerTranslations(): void;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KitTranslateService, never>;
|
|
8
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<KitTranslateService>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { KitFilterDescriptor } from '../../../utils/kit-data-query/kit-data-query.model';
|
|
2
|
+
import { KitFilterLogic } from '../../../utils/kit-data-query/kit-data-query.const';
|
|
3
|
+
export interface KitFilterValue {
|
|
4
|
+
logic: KitFilterLogic;
|
|
5
|
+
filters: KitFilterDescriptor[];
|
|
6
|
+
}
|
|
7
|
+
export interface KitFilterItem {
|
|
8
|
+
title: string;
|
|
9
|
+
field: string;
|
|
10
|
+
readonly?: boolean;
|
|
11
|
+
type?: KitFilterType;
|
|
12
|
+
value: KitFilterValue | null;
|
|
13
|
+
}
|
|
14
|
+
export declare enum KitFilterType {
|
|
15
|
+
CHECKBOX = "checkbox",
|
|
16
|
+
DATE = "date",
|
|
17
|
+
TEXT = "text"
|
|
18
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { KitGridColumnConfig, KitGridColumnType } from './store/kit-grid.model';
|
|
2
|
+
import { KitFilterType } from './kit-grid-filters/kit-grid-filters.model';
|
|
3
|
+
export declare const kitBuildGridColumn: (field: string, title: string, type: KitGridColumnType, sortable?: boolean, hidden?: boolean, width?: number, filterType?: KitFilterType) => KitGridColumnConfig;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ElementRef, InputSignal, Signal, ViewContainerRef, WritableSignal } from '@angular/core';
|
|
2
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
4
|
+
import { Store } from '@ngxs/store';
|
|
5
|
+
import { KitGridView, KitGridViewType } from '../store/kit-grid-views.model';
|
|
6
|
+
import { KitPopupComponent } from '../../../../components/kit-popup/kit-popup.component';
|
|
7
|
+
import { KitSortDescriptor } from '../../../../utils/kit-data-query/kit-data-query.model';
|
|
8
|
+
import { KitButtonIconPosition, KitButtonKind, KitButtonType } from '../../../../components/kit-button/kit-button.const';
|
|
9
|
+
import { KitSvgIcon, KitSvgIconType } from '../../../../components/kit-svg-icon/kit-svg-icon.const';
|
|
10
|
+
import { KitTextboxState } from '../../../../components/kit-textbox/kit-textbox.const';
|
|
11
|
+
import { KitDialogService } from '../../../../components/kit-dialog/kit-dialog.service';
|
|
12
|
+
import { KitGridColumnConfig } from '../../store/kit-grid.model';
|
|
13
|
+
import * as i0 from "@angular/core";
|
|
14
|
+
export declare class KitGridViewsListComponent {
|
|
15
|
+
private readonly activatedRoute;
|
|
16
|
+
private readonly router;
|
|
17
|
+
private readonly store;
|
|
18
|
+
private readonly kitDialogService;
|
|
19
|
+
private readonly translateService;
|
|
20
|
+
private readonly viewContainerRef;
|
|
21
|
+
readonly viewGroup: InputSignal<string>;
|
|
22
|
+
readonly viewConfigGroup: InputSignal<string>;
|
|
23
|
+
readonly views: InputSignal<KitGridView[]>;
|
|
24
|
+
readonly defaultColumns: InputSignal<KitGridColumnConfig[]>;
|
|
25
|
+
readonly defaultSorting: InputSignal<KitSortDescriptor[]>;
|
|
26
|
+
readonly defaultViewName: InputSignal<string>;
|
|
27
|
+
readonly anchor: Signal<ElementRef>;
|
|
28
|
+
readonly popup: Signal<KitPopupComponent | undefined>;
|
|
29
|
+
readonly viewName: WritableSignal<string>;
|
|
30
|
+
readonly createViewPopupVisible: WritableSignal<boolean>;
|
|
31
|
+
readonly kitButtonType: typeof KitButtonType;
|
|
32
|
+
readonly kitButtonKind: typeof KitButtonKind;
|
|
33
|
+
readonly kitSvgIcon: typeof KitSvgIcon;
|
|
34
|
+
readonly kitSvgIconType: typeof KitSvgIconType;
|
|
35
|
+
readonly kitButtonIconPosition: typeof KitButtonIconPosition;
|
|
36
|
+
readonly gridViewType: typeof KitGridViewType;
|
|
37
|
+
readonly kitTextboxState: typeof KitTextboxState;
|
|
38
|
+
readonly selectedView: Signal<KitGridView | null>;
|
|
39
|
+
constructor(activatedRoute: ActivatedRoute, router: Router, store: Store, kitDialogService: KitDialogService, translateService: TranslateService, viewContainerRef: ViewContainerRef);
|
|
40
|
+
get isViewNameValid(): boolean;
|
|
41
|
+
get inputMessage(): string;
|
|
42
|
+
onViewSelect(item: KitGridView): void;
|
|
43
|
+
newViewToggle(visible: boolean): void;
|
|
44
|
+
onPopupToggle(): void;
|
|
45
|
+
onViewCreate(): void;
|
|
46
|
+
openViewsManagerModal(): void;
|
|
47
|
+
private handleViewChange;
|
|
48
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KitGridViewsListComponent, never>;
|
|
49
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KitGridViewsListComponent, "kit-grid-views-list", never, { "viewGroup": { "alias": "viewGroup"; "required": true; "isSignal": true; }; "viewConfigGroup": { "alias": "viewConfigGroup"; "required": true; "isSignal": true; }; "views": { "alias": "views"; "required": true; "isSignal": true; }; "defaultColumns": { "alias": "defaultColumns"; "required": true; "isSignal": true; }; "defaultSorting": { "alias": "defaultSorting"; "required": true; "isSignal": true; }; "defaultViewName": { "alias": "defaultViewName"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
50
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { InputSignal, WritableSignal } from '@angular/core';
|
|
2
|
+
import { Store } from '@ngxs/store';
|
|
3
|
+
import { KitGridView } from '../store/kit-grid-views.model';
|
|
4
|
+
import { KitButtonKind, KitButtonType } from '../../../../components/kit-button/kit-button.const';
|
|
5
|
+
import { KitSvgIcon, KitSvgIconType } from '../../../../components/kit-svg-icon/kit-svg-icon.const';
|
|
6
|
+
import { DialogContentBase, DialogRef } from '@progress/kendo-angular-dialog';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class KitGridViewsManagerComponent extends DialogContentBase {
|
|
9
|
+
private readonly store;
|
|
10
|
+
dialog: DialogRef;
|
|
11
|
+
readonly configGroup: InputSignal<string>;
|
|
12
|
+
readonly items: WritableSignal<KitGridView[]>;
|
|
13
|
+
readonly kitButtonKind: typeof KitButtonKind;
|
|
14
|
+
readonly kitButtonType: typeof KitButtonType;
|
|
15
|
+
readonly kitSvgIcon: typeof KitSvgIcon;
|
|
16
|
+
readonly kitSvgIconType: typeof KitSvgIconType;
|
|
17
|
+
constructor(store: Store, dialog: DialogRef);
|
|
18
|
+
applyChanges(): void;
|
|
19
|
+
close(): void;
|
|
20
|
+
onColumnVisibilityChange(event: boolean, view: KitGridView): void;
|
|
21
|
+
isSystemView(item: KitGridView): boolean;
|
|
22
|
+
onViewRemove(view: KitGridView): void;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KitGridViewsManagerComponent, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KitGridViewsManagerComponent, "kit-grid-views-manager", never, { "configGroup": { "alias": "configGroup"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ElementRef, InputSignal, Signal, WritableSignal } from '@angular/core';
|
|
2
|
+
import { Store } from '@ngxs/store';
|
|
3
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
4
|
+
import { KitPopupComponent } from '../../../../components/kit-popup/kit-popup.component';
|
|
5
|
+
import { KitGridView } from '../store/kit-grid-views.model';
|
|
6
|
+
import { KitAutocompleteItem } from '../../../../components/kit-autocomplete/kit-autocomplete.component';
|
|
7
|
+
import { KitButtonIconPosition, KitButtonKind } from '../../../../components/kit-button/kit-button.const';
|
|
8
|
+
import { KitSvgIcon } from '../../../../components/kit-svg-icon/kit-svg-icon.const';
|
|
9
|
+
import { KitTooltipPosition } from '../../../../directives/kit-tooltip/kit-tooltip.const';
|
|
10
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
12
|
+
export declare class KitGridViewsSaveComponent {
|
|
13
|
+
private readonly store;
|
|
14
|
+
private readonly router;
|
|
15
|
+
private readonly activatedRoute;
|
|
16
|
+
private readonly translateService;
|
|
17
|
+
readonly viewGroup: InputSignal<string>;
|
|
18
|
+
readonly views: InputSignal<KitGridView[]>;
|
|
19
|
+
readonly viewsAutocompleteItems: InputSignal<KitAutocompleteItem<string>[] | null>;
|
|
20
|
+
readonly anchor: Signal<ElementRef>;
|
|
21
|
+
readonly popup: Signal<KitPopupComponent | undefined>;
|
|
22
|
+
readonly viewName: WritableSignal<string>;
|
|
23
|
+
readonly kitButtonKind: typeof KitButtonKind;
|
|
24
|
+
readonly kitSvgIcon: typeof KitSvgIcon;
|
|
25
|
+
readonly kitButtonIconPosition: typeof KitButtonIconPosition;
|
|
26
|
+
readonly kitTooltipPosition: typeof KitTooltipPosition;
|
|
27
|
+
readonly hasUnsavedChanges: WritableSignal<boolean>;
|
|
28
|
+
readonly selectedView: Signal<KitGridView | null>;
|
|
29
|
+
constructor(store: Store, router: Router, activatedRoute: ActivatedRoute, translateService: TranslateService);
|
|
30
|
+
get isViewNameValid(): boolean;
|
|
31
|
+
get inputMessage(): string;
|
|
32
|
+
ngOnInit(): void;
|
|
33
|
+
onPopupToggle(): void;
|
|
34
|
+
onViewSave(): void;
|
|
35
|
+
onValueChange(value: string | null): void;
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KitGridViewsSaveComponent, never>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KitGridViewsSaveComponent, "kit-grid-views-save", never, { "viewGroup": { "alias": "viewGroup"; "required": true; "isSignal": true; }; "views": { "alias": "views"; "required": true; "isSignal": true; }; "viewsAutocompleteItems": { "alias": "viewsAutocompleteItems"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
38
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { DestroyRef, EventEmitter, InputSignal, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { Store } from '@ngxs/store';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { TitleCasePipe } from '@angular/common';
|
|
5
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
6
|
+
import { KitSortDescriptor } from '../../../utils/kit-data-query/kit-data-query.model';
|
|
7
|
+
import { KitAutocompleteItem } from '../../../components/kit-autocomplete/kit-autocomplete.component';
|
|
8
|
+
import { ApiResponseState } from '../../../store/store.model';
|
|
9
|
+
import { KitGridView, KitViewsState } from './store/kit-grid-views.model';
|
|
10
|
+
import { KitGridColumnConfig } from '../store/kit-grid.model';
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
12
|
+
export declare class KitGridViewsComponent implements OnInit, OnDestroy {
|
|
13
|
+
private readonly store;
|
|
14
|
+
private readonly activatedRoute;
|
|
15
|
+
private readonly router;
|
|
16
|
+
private readonly destroyRef;
|
|
17
|
+
private readonly titleCasePipe;
|
|
18
|
+
readonly viewGroup: InputSignal<string>;
|
|
19
|
+
readonly viewConfigGroup: InputSignal<string>;
|
|
20
|
+
readonly defaultColumns: InputSignal<KitGridColumnConfig[]>;
|
|
21
|
+
readonly defaultViewName: InputSignal<string>;
|
|
22
|
+
readonly defaultSorting: InputSignal<KitSortDescriptor[]>;
|
|
23
|
+
readonly systemViews: InputSignal<KitGridView[]>;
|
|
24
|
+
viewChanged: EventEmitter<void>;
|
|
25
|
+
readonly currentViewName$: Observable<string>;
|
|
26
|
+
readonly viewsState$: Observable<ApiResponseState<KitViewsState>>;
|
|
27
|
+
readonly views$: Observable<KitGridView[]>;
|
|
28
|
+
readonly viewsAutocompleteItems$: Observable<KitAutocompleteItem<string>[]>;
|
|
29
|
+
constructor(store: Store, activatedRoute: ActivatedRoute, router: Router, destroyRef: DestroyRef, titleCasePipe: TitleCasePipe);
|
|
30
|
+
ngOnInit(): void;
|
|
31
|
+
ngOnDestroy(): void;
|
|
32
|
+
private fetchViews;
|
|
33
|
+
private handleViewOnRouteChange;
|
|
34
|
+
private handleViewChange;
|
|
35
|
+
private updateGridState;
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KitGridViewsComponent, never>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KitGridViewsComponent, "kit-grid-views", never, { "viewGroup": { "alias": "viewGroup"; "required": true; "isSignal": true; }; "viewConfigGroup": { "alias": "viewConfigGroup"; "required": true; "isSignal": true; }; "defaultColumns": { "alias": "defaultColumns"; "required": true; "isSignal": true; }; "defaultViewName": { "alias": "defaultViewName"; "required": true; "isSignal": true; }; "defaultSorting": { "alias": "defaultSorting"; "required": true; "isSignal": true; }; "systemViews": { "alias": "systemViews"; "required": true; "isSignal": true; }; }, { "viewChanged": "viewChanged"; }, never, never, true, never>;
|
|
38
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
2
|
+
import { KitGridView, KitGridViewColumn } from './store/kit-grid-views.model';
|
|
3
|
+
import { KitGridColumnConfig } from '../store/kit-grid.model';
|
|
4
|
+
export declare const filterDuplicateGridViews: (views: KitGridView[]) => KitGridView[];
|
|
5
|
+
export declare const findGridViewByName: (views: KitGridView[], name: string) => KitGridView | null;
|
|
6
|
+
export declare const buildGridViewColumns: (columns: KitGridColumnConfig[]) => KitGridViewColumn[];
|
|
7
|
+
export declare const hasOverriddenSystemView: (name: string, views: KitGridView[]) => boolean;
|
|
8
|
+
export declare const buildGridColumns: (columns: KitGridColumnConfig[], viewColumns: KitGridViewColumn[]) => KitGridColumnConfig[];
|
|
9
|
+
export declare const navigateToView: (name: string, router: Router, activatedRoute: ActivatedRoute) => void;
|
|
10
|
+
export declare const kitEncodeViewNameToUrl: (name: string) => string;
|
|
11
|
+
export declare const decodeViewNameFromUrl: (name: string) => string;
|
|
12
|
+
export declare const isViewNameValid: (name: string) => boolean;
|
|
13
|
+
export declare const getInputMessage: (views: KitGridView[], viewName: string) => string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { KitGridView, KitGridViewsFetchPayload } from '../store/kit-grid-views.model';
|
|
2
|
+
import { AbstractPayloadAction } from '../../../../store/abstract-payload.action';
|
|
3
|
+
export declare class FetchGridViews extends AbstractPayloadAction<KitGridViewsFetchPayload> {
|
|
4
|
+
static readonly type: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class AddGridView extends AbstractPayloadAction<KitGridView> {
|
|
7
|
+
static readonly type: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class RemoveGridView extends AbstractPayloadAction<KitGridView> {
|
|
10
|
+
static readonly type: string;
|
|
11
|
+
}
|
|
12
|
+
export declare class SetGridViews extends AbstractPayloadAction<KitGridView[]> {
|
|
13
|
+
static readonly type: string;
|
|
14
|
+
}
|
|
15
|
+
export declare class FetchGridViewsConfig extends AbstractPayloadAction<string> {
|
|
16
|
+
static readonly type: string;
|
|
17
|
+
}
|
|
18
|
+
export declare class UpdateGridViewsConfig extends AbstractPayloadAction<KitGridView> {
|
|
19
|
+
static readonly type: string;
|
|
20
|
+
}
|
|
21
|
+
export declare class SetSelectedView extends AbstractPayloadAction<KitGridView> {
|
|
22
|
+
static readonly type: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { KitSortDescriptor } from '../../../../utils/kit-data-query/kit-data-query.model';
|
|
2
|
+
import { KitFilterItem } from '../../kit-grid-filters/kit-grid-filters.model';
|
|
3
|
+
export interface KitGridViewsFetchPayload {
|
|
4
|
+
group: string;
|
|
5
|
+
defaultItems?: KitGridView[];
|
|
6
|
+
}
|
|
7
|
+
export interface KitViewsState {
|
|
8
|
+
views: KitGridView[];
|
|
9
|
+
config: KitGridView | null;
|
|
10
|
+
selectedView: KitGridView | null;
|
|
11
|
+
}
|
|
12
|
+
export declare enum KitGridViewType {
|
|
13
|
+
SYSTEM = "system",
|
|
14
|
+
USER = "user",
|
|
15
|
+
CONFIG = "config"
|
|
16
|
+
}
|
|
17
|
+
export interface KitGridViewState {
|
|
18
|
+
sort?: KitSortDescriptor[];
|
|
19
|
+
filter?: KitFilterItem[];
|
|
20
|
+
columns?: KitGridViewColumn[];
|
|
21
|
+
config?: KitGridView[];
|
|
22
|
+
}
|
|
23
|
+
export interface KitGridView {
|
|
24
|
+
title: string;
|
|
25
|
+
group: string | null;
|
|
26
|
+
type: KitGridViewType;
|
|
27
|
+
hidden?: boolean;
|
|
28
|
+
value?: KitGridViewState;
|
|
29
|
+
}
|
|
30
|
+
export interface KitGridViewColumn {
|
|
31
|
+
field: string;
|
|
32
|
+
hidden: boolean;
|
|
33
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { StateContext, StateToken } from '@ngxs/store';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { AddGridView, FetchGridViews, FetchGridViewsConfig, RemoveGridView, SetGridViews, SetSelectedView, UpdateGridViewsConfig } from './kit-grid-views.action';
|
|
4
|
+
import { KitViewsState, KitGridView } from './kit-grid-views.model';
|
|
5
|
+
import { ApiResponseState } from '../../../../store/store.model';
|
|
6
|
+
import { KitSettingsApiService } from '../../../../services/api/kit-settings-api/kit-settings-api.service';
|
|
7
|
+
import { SettingValue } from '../../../../services/api/kit-settings-api/kit-settings-api.model';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare const KIT_GRID_VIEWS_STATE_TOKEN: StateToken<ApiResponseState<KitViewsState>>;
|
|
10
|
+
export declare class KitGridViewsState {
|
|
11
|
+
private readonly settingsService;
|
|
12
|
+
constructor(settingsService: KitSettingsApiService);
|
|
13
|
+
fetchGridViews(ctx: StateContext<ApiResponseState<KitViewsState>>, action: FetchGridViews): Observable<KitGridView[]>;
|
|
14
|
+
addGridView(ctx: StateContext<ApiResponseState<KitViewsState>>, action: AddGridView): Observable<SettingValue>;
|
|
15
|
+
removeGridView(ctx: StateContext<ApiResponseState<KitViewsState>>, action: RemoveGridView): Observable<null>;
|
|
16
|
+
setGridViews(ctx: StateContext<ApiResponseState<KitViewsState>>, action: SetGridViews): Observable<KitGridView[]>;
|
|
17
|
+
fetchGridViewsConfig(ctx: StateContext<ApiResponseState<KitViewsState>>, action: FetchGridViewsConfig): Observable<KitGridView[]>;
|
|
18
|
+
updateGridViewsConfig(ctx: StateContext<ApiResponseState<KitViewsState>>, action: UpdateGridViewsConfig): Observable<SettingValue>;
|
|
19
|
+
setSelectedView(ctx: StateContext<ApiResponseState<KitViewsState>>, action: SetSelectedView): Observable<KitGridView>;
|
|
20
|
+
static getViews(): (gridViewsState: ApiResponseState<KitViewsState>) => KitGridView[];
|
|
21
|
+
private hasUserView;
|
|
22
|
+
static selectedView(state: ApiResponseState<KitViewsState>): KitGridView | null;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KitGridViewsState, never>;
|
|
24
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<KitGridViewsState>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AbstractPayloadAction } from '../../../store/abstract-payload.action';
|
|
2
|
+
import { KitSortDescriptor } from '../../../utils/kit-data-query/kit-data-query.model';
|
|
3
|
+
import { KitGridColumnConfig } from './kit-grid.model';
|
|
4
|
+
import { KitFilterItem } from '../kit-grid-filters/kit-grid-filters.model';
|
|
5
|
+
export declare class SetGridSkip extends AbstractPayloadAction<number> {
|
|
6
|
+
static readonly type: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class SetGridSort extends AbstractPayloadAction<KitSortDescriptor[]> {
|
|
9
|
+
static readonly type: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class SetGridColumns extends AbstractPayloadAction<KitGridColumnConfig[]> {
|
|
12
|
+
static readonly type: string;
|
|
13
|
+
}
|
|
14
|
+
export declare class AddGridFilter extends AbstractPayloadAction<KitFilterItem> {
|
|
15
|
+
static readonly type: string;
|
|
16
|
+
}
|
|
17
|
+
export declare class RemoveGridFilter extends AbstractPayloadAction<string> {
|
|
18
|
+
static readonly type: string;
|
|
19
|
+
}
|
|
20
|
+
export declare class UpdateGridFilter extends AbstractPayloadAction<KitFilterItem> {
|
|
21
|
+
static readonly type: string;
|
|
22
|
+
}
|
|
23
|
+
export declare class SetGridFilters extends AbstractPayloadAction<KitFilterItem[]> {
|
|
24
|
+
static readonly type: string;
|
|
25
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { KitFilterItem, KitFilterType } from '../kit-grid-filters/kit-grid-filters.model';
|
|
2
|
+
import { KitSortDescriptor } from '../../../utils/kit-data-query/kit-data-query.model';
|
|
3
|
+
export type KitGridColumnType = 'date' | 'number' | 'boolean' | 'string' | 'dateTime';
|
|
4
|
+
export interface KitGridColumnConfig {
|
|
5
|
+
field: string;
|
|
6
|
+
title: string;
|
|
7
|
+
sortable: boolean;
|
|
8
|
+
hidden: boolean;
|
|
9
|
+
type: KitGridColumnType;
|
|
10
|
+
width?: number;
|
|
11
|
+
filterType?: KitFilterType;
|
|
12
|
+
}
|
|
13
|
+
export interface KitGridDataState {
|
|
14
|
+
skip: number;
|
|
15
|
+
sort: KitSortDescriptor[];
|
|
16
|
+
filter: KitFilterItem[];
|
|
17
|
+
columns: KitGridColumnConfig[];
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { StateContext, StateToken } from '@ngxs/store';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { AddGridFilter, RemoveGridFilter, SetGridColumns, SetGridFilters, SetGridSkip, SetGridSort, UpdateGridFilter } from '../store/kit-grid.action';
|
|
4
|
+
import { KitGridDataState } from '../store/kit-grid.model';
|
|
5
|
+
import { KitFilterItem } from '../kit-grid-filters/kit-grid-filters.model';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare const KIT_GRID_STATE_TOKEN: StateToken<KitGridDataState>;
|
|
8
|
+
export declare class KitGridState {
|
|
9
|
+
setGridSkip(ctx: StateContext<KitGridDataState>, action: SetGridSkip): void;
|
|
10
|
+
setGridSort(ctx: StateContext<KitGridDataState>, action: SetGridSort): void;
|
|
11
|
+
setGridColumns(ctx: StateContext<KitGridDataState>, action: SetGridColumns): void;
|
|
12
|
+
addGridFilter(ctx: StateContext<KitGridDataState>, action: AddGridFilter): Observable<KitFilterItem[]>;
|
|
13
|
+
removeGridFilter(ctx: StateContext<KitGridDataState>, action: RemoveGridFilter): Observable<KitFilterItem[]>;
|
|
14
|
+
updateGridFilter(ctx: StateContext<KitGridDataState>, action: UpdateGridFilter): Observable<KitFilterItem[]>;
|
|
15
|
+
setGridFilters(ctx: StateContext<KitGridDataState>, action: SetGridFilters): Observable<KitFilterItem[]>;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<KitGridState, never>;
|
|
17
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<KitGridState>;
|
|
18
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -168,3 +168,14 @@ export { KitFilterOperator, KitFilterLogic, KitSortDirection } from './lib/utils
|
|
|
168
168
|
export { KitTruncateTextComponent } from './lib/components/kit-truncate-text/kit-truncate-text.component';
|
|
169
169
|
export { KitCollapsedListComponent } from './lib/components/kit-collapsed-list/kit-collapsed-list.component';
|
|
170
170
|
export { KitCollapsedListItem } from './lib/components/kit-collapsed-list/kit-collapsed-list.model';
|
|
171
|
+
export { KIT_BASE_PATH } from './lib/token/kit-base-path.token';
|
|
172
|
+
export { KitTranslateService } from './lib/services/kit-translate/kit-translate.service';
|
|
173
|
+
export { KitGridState, KIT_GRID_STATE_TOKEN } from './lib/widgets/kit-grid-management/store/kit-grid.state';
|
|
174
|
+
export { kitBuildGridColumn } from './lib/widgets/kit-grid-management/kit-grid-management.util';
|
|
175
|
+
export { KitGridDataState, KitGridColumnConfig } from './lib/widgets/kit-grid-management/store/kit-grid.model';
|
|
176
|
+
export { AddGridFilter, RemoveGridFilter, SetGridSkip, SetGridSort, SetGridColumns, UpdateGridFilter, } from './lib/widgets/kit-grid-management/store/kit-grid.action';
|
|
177
|
+
export { KitGridViewsComponent } from './lib/widgets/kit-grid-management/kit-grid-views/kit-grid-views.component';
|
|
178
|
+
export { KitGridViewsState } from './lib/widgets/kit-grid-management/kit-grid-views/store/kit-grid-views.state';
|
|
179
|
+
export { KitGridView, KitGridViewColumn, KitGridViewType, } from './lib/widgets/kit-grid-management/kit-grid-views/store/kit-grid-views.model';
|
|
180
|
+
export { kitEncodeViewNameToUrl } from './lib/widgets/kit-grid-management/kit-grid-views/kit-grid-views.util';
|
|
181
|
+
export { KitFilterItem, KitFilterType, KitFilterValue } from './lib/widgets/kit-grid-management/kit-grid-filters/kit-grid-filters.model';
|