wt-front-shared 19.0.44 → 19.0.45

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.
Files changed (51) hide show
  1. package/README.md +72 -13
  2. package/fesm2022/wt-front-shared.mjs +3823 -803
  3. package/fesm2022/wt-front-shared.mjs.map +1 -1
  4. package/lib/core/+state/router/router.effects.d.ts +1 -1
  5. package/lib/core/+state/static-data/static-data.actions.d.ts +1 -0
  6. package/lib/core/+state/static-data/static-data.facade.d.ts +1 -0
  7. package/lib/core/+state/users/users.effects.d.ts +7 -2
  8. package/lib/core/components/auto-form/interfaces/form-field-others.d.ts +11 -0
  9. package/lib/core/components/auto-form/interfaces/form-field.d.ts +3 -0
  10. package/lib/core/components/external-services/external-service-dialog.component.d.ts +15 -0
  11. package/lib/core/components/external-services/external-service.models.d.ts +19 -0
  12. package/lib/core/components/external-services/external-services.facade.d.ts +23 -0
  13. package/lib/core/components/external-services/index.d.ts +3 -0
  14. package/lib/core/components/image/image.component.d.ts +6 -1
  15. package/lib/core/components/index.d.ts +4 -0
  16. package/lib/core/components/profile/profile.component.d.ts +29 -0
  17. package/lib/core/components/profile/profile.module.d.ts +12 -0
  18. package/lib/core/components/static-data/boards/board-edit-dialog.component.d.ts +22 -0
  19. package/lib/core/components/static-data/boards/board-filter.component.d.ts +55 -0
  20. package/lib/core/components/static-data/boards/board-settings-dialog.component.d.ts +41 -0
  21. package/lib/core/components/static-data/boards/board.models.d.ts +28 -0
  22. package/lib/core/components/static-data/boards/boards.facade.d.ts +17 -0
  23. package/lib/core/components/static-data/boards/index.d.ts +6 -0
  24. package/lib/core/components/static-data/boards/kanban.component.d.ts +24 -0
  25. package/lib/core/components/static-data/components/filtering-dialog/filtering-dialog.component.d.ts +6 -3
  26. package/lib/core/components/static-data/components/static-data-list-items/column-preferences.d.ts +6 -0
  27. package/lib/core/components/static-data/components/static-data-list-items/group-nested-items.d.ts +6 -0
  28. package/lib/core/components/static-data/components/static-data-list-items/static-data-list-items.component.d.ts +74 -12
  29. package/lib/core/components/static-data/components/static-data-list-items/visible-nested-rows.d.ts +4 -0
  30. package/lib/core/components/static-data/containers/static-data-items/column-filter.component.d.ts +26 -0
  31. package/lib/core/components/static-data/containers/static-data-items/column-resize.directive.d.ts +26 -0
  32. package/lib/core/components/static-data/containers/static-data-items/static-data-items.component.d.ts +9 -1
  33. package/lib/core/components/static-data/containers/static-data-list/static-data-list.component.d.ts +13 -4
  34. package/lib/core/components/static-data/interfaces/static-data.interface.d.ts +17 -1
  35. package/lib/core/components/static-data/presets/index.d.ts +4 -0
  36. package/lib/core/components/static-data/presets/preset.models.d.ts +10 -0
  37. package/lib/core/components/static-data/presets/presets.component.d.ts +29 -0
  38. package/lib/core/components/static-data/presets/presets.facade.d.ts +13 -0
  39. package/lib/core/components/static-data/presets/save-preset-dialog.component.d.ts +23 -0
  40. package/lib/core/interceptors/headers.interceptor.d.ts +1 -0
  41. package/lib/core/services/static-data/static-data.service.d.ts +2 -0
  42. package/lib/core/utils/index.d.ts +1 -0
  43. package/lib/core/utils/user-profile.helper.d.ts +76 -0
  44. package/lib/models/endpoints/static-data/board-settings-request.d.ts +28 -0
  45. package/lib/models/endpoints/static-data/index.d.ts +2 -0
  46. package/lib/models/endpoints/static-data/preset-settings-request.d.ts +28 -0
  47. package/lib/models/endpoints/static-data/static-data-endpoint-types.d.ts +4 -0
  48. package/lib/models/endpoints/static-data/static-data-get-list/request/static-data-get-list-request-config.d.ts +1 -0
  49. package/lib/models/models/user/user-model.d.ts +1 -0
  50. package/package.json +1 -1
  51. package/public-api.d.ts +4 -0
@@ -2,7 +2,7 @@ import { Location } from '@angular/common';
2
2
  import { Store } from '@ngrx/store';
3
3
  import { Router } from '@angular/router';
4
4
  import { Actions } from '@ngrx/effects';
5
- import * as RouterAction from './router.actions';
5
+ import { GoPayload } from './router.actions';
6
6
  import { SharedState } from '../index';
7
7
  import * as i0 from "@angular/core";
8
8
  export declare class RouterEffects {
@@ -216,6 +216,7 @@ export declare const StaticDataPartUpdate: import("@ngrx/store").ActionCreator<"
216
216
  payload: StaticDataPartUpdatePayload;
217
217
  } & import("@ngrx/store").Action<"[static-data] static-data Update Part">>;
218
218
  export interface StaticDataGetListPayload {
219
+ boardFilter?: import('../../components/static-data/boards/board.models').BoardFilterGroup;
219
220
  contentType: string;
220
221
  subSection?: string;
221
222
  where?: {
@@ -12,6 +12,7 @@ export interface LoadStaticDataParams {
12
12
  sort?: string;
13
13
  forPanel?: boolean;
14
14
  search?: string;
15
+ boardFilter?: import('../../components/static-data/boards/board.models').BoardFilterGroup;
15
16
  popular?: boolean;
16
17
  keepState?: boolean;
17
18
  }
@@ -38,9 +38,14 @@ export declare class UsersEffects {
38
38
  error: any;
39
39
  };
40
40
  } & import("@ngrx/store").Action<"[Users] Refresh Token Error">)> & import("@ngrx/effects").CreateEffectMetadata;
41
- refreshTokenSuccess$: import("rxjs").Observable<[{
41
+ refreshTokenSuccess$: import("rxjs").Observable<{
42
42
  payload: UsersAction.RefreshTokenSuccessPayment;
43
- } & import("@ngrx/store").Action<"[Users] Refresh Token Success 2">, import("wt-front-shared").UsersState]> & import("@ngrx/effects").CreateEffectMetadata;
43
+ } & import("@ngrx/store").Action<"[Users] Refresh Token Success 2">> & import("@ngrx/effects").CreateEffectMetadata;
44
+ refreshTokenFail$: import("rxjs").Observable<{
45
+ payload: {
46
+ error: any;
47
+ };
48
+ } & import("@ngrx/store").Action<"[Users] Refresh Token Error">> & import("@ngrx/effects").CreateEffectMetadata;
44
49
  constructor(appConfig: AppConfig, actions$: Actions, store: Store<SharedState>, usersService: UsersService, usersFacade: UsersFacade, authenticationService: AuthenticationService, routerService: RouterService, actionsService: ActionsService, notificationsFacade: NotificationsFacade, cookiesService: CookiesService);
45
50
  static ɵfac: i0.ɵɵFactoryDeclaration<UsersEffects, never>;
46
51
  static ɵprov: i0.ɵɵInjectableDeclaration<UsersEffects>;
@@ -1,4 +1,5 @@
1
1
  import { IFormFieldFormat } from './form-field-format';
2
+ import { Type } from '@angular/core';
2
3
  import { IFormFieldOption } from './form-field-option';
3
4
  import { StaticDataModel } from "../../../../models";
4
5
  export interface IFormFieldSubscribeToFormChanges {
@@ -69,7 +70,14 @@ export interface IFormFieldOptions {
69
70
  placeholder?: string;
70
71
  innerSearch?: boolean;
71
72
  showIf?: IFormFieldOptionsShowIfValue;
73
+ columnFilter?: {
74
+ options?: {
75
+ id: number;
76
+ name: string;
77
+ }[];
78
+ };
72
79
  showing?: {
80
+ customListViewComponent?: Type<unknown>;
73
81
  getValue?: any;
74
82
  customEditViewComponent?: any;
75
83
  options?: {
@@ -103,4 +111,7 @@ export interface IFormFieldOptions {
103
111
  sizeLimit?: number;
104
112
  allowedExtensions?: string;
105
113
  };
114
+ status?: string;
115
+ calculationFunction?: (injector?: any, facade?: any, http?: any) => any;
116
+ getFunction?: (injector?: any, facade?: any, http?: any) => any;
106
117
  }
@@ -18,4 +18,7 @@ export interface IFormField {
18
18
  data?: {
19
19
  needToShow?: boolean;
20
20
  };
21
+ status?: string;
22
+ calculationFunction?: (injector?: any, facade?: any, http?: any) => any;
23
+ getFunction?: (injector?: any, facade?: any, http?: any) => any;
21
24
  }
@@ -0,0 +1,15 @@
1
+ import { MatDialogRef } from '@angular/material/dialog';
2
+ import { ExternalService, ExternalServiceDialogData } from './external-service.models';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ExternalServiceDialogComponent {
5
+ data: ExternalServiceDialogData;
6
+ private ref;
7
+ service: Partial<ExternalService>;
8
+ readonly presetIcons: string[];
9
+ constructor(data: ExternalServiceDialogData, ref: MatDialogRef<ExternalServiceDialogComponent>);
10
+ selectIcon(icon: string): void;
11
+ isValid(): boolean;
12
+ apply(): void;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<ExternalServiceDialogComponent, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<ExternalServiceDialogComponent, "shared-external-service-dialog", never, {}, {}, never, never, true, never>;
15
+ }
@@ -0,0 +1,19 @@
1
+ export interface ExternalService {
2
+ id: string;
3
+ name: string;
4
+ icon?: string;
5
+ description?: string;
6
+ url: string;
7
+ ssoClientId?: string;
8
+ enabled?: boolean;
9
+ order?: number;
10
+ createdAt?: string;
11
+ updatedAt?: string;
12
+ }
13
+ export interface ExternalServiceDialogData {
14
+ service?: Partial<ExternalService>;
15
+ isNew?: boolean;
16
+ maxPosition?: number;
17
+ }
18
+ /** Normalize legacy lists to contiguous, one-based positions without mutating the input. */
19
+ export declare function orderExternalServices(services: readonly ExternalService[]): ExternalService[];
@@ -0,0 +1,23 @@
1
+ import { Observable } from 'rxjs';
2
+ import { ExternalService } from './external-service.models';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ExternalServicesFacade {
5
+ private readonly http;
6
+ private readonly servicesSubject;
7
+ readonly services$: Observable<ExternalService[]>;
8
+ private readonly root;
9
+ readonly apiBaseUrl: string;
10
+ constructor();
11
+ get snapshot(): ExternalService[];
12
+ refresh(): Observable<ExternalService[]>;
13
+ saveAll(services: ExternalService[]): Observable<ExternalService[]>;
14
+ add(service: Omit<ExternalService, 'id'> & {
15
+ id?: string;
16
+ }): Observable<ExternalService>;
17
+ update(id: string, changes: Partial<ExternalService>): Observable<ExternalService | null>;
18
+ remove(id: string): Observable<boolean>;
19
+ private loadFromStorage;
20
+ private saveToStorage;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<ExternalServicesFacade, never>;
22
+ static ɵprov: i0.ɵɵInjectableDeclaration<ExternalServicesFacade>;
23
+ }
@@ -0,0 +1,3 @@
1
+ export * from './external-service.models';
2
+ export * from './external-service-dialog.component';
3
+ export * from './external-services.facade';
@@ -9,6 +9,10 @@ export declare class ImageComponent implements OnInit, OnChanges {
9
9
  index: number;
10
10
  haveZoom: boolean;
11
11
  imgClass: string;
12
+ loading: 'eager' | 'lazy' | 'auto';
13
+ width?: number;
14
+ height?: number;
15
+ sizes?: string;
12
16
  clickEvent: EventEmitter<number>;
13
17
  delete: EventEmitter<any>;
14
18
  src: string;
@@ -18,8 +22,9 @@ export declare class ImageComponent implements OnInit, OnChanges {
18
22
  ngOnChanges(changes: SimpleChanges): void;
19
23
  private checkSubscribersForDelete;
20
24
  private setSrc;
25
+ get srcSet(): string | null;
21
26
  clickHandler(): void;
22
27
  deleteImage(): void;
23
28
  static ɵfac: i0.ɵɵFactoryDeclaration<ImageComponent, never>;
24
- static ɵcmp: i0.ɵɵComponentDeclaration<ImageComponent, "shared-image", never, { "versions": { "alias": "versions"; "required": false; }; "url": { "alias": "url"; "required": false; }; "version": { "alias": "version"; "required": false; }; "title": { "alias": "title"; "required": false; }; "index": { "alias": "index"; "required": false; }; "haveZoom": { "alias": "haveZoom"; "required": false; }; "imgClass": { "alias": "imgClass"; "required": false; }; }, { "clickEvent": "clickEvent"; "delete": "delete"; }, never, never, false, never>;
29
+ static ɵcmp: i0.ɵɵComponentDeclaration<ImageComponent, "shared-image", never, { "versions": { "alias": "versions"; "required": false; }; "url": { "alias": "url"; "required": false; }; "version": { "alias": "version"; "required": false; }; "title": { "alias": "title"; "required": false; }; "index": { "alias": "index"; "required": false; }; "haveZoom": { "alias": "haveZoom"; "required": false; }; "imgClass": { "alias": "imgClass"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "sizes": { "alias": "sizes"; "required": false; }; }, { "clickEvent": "clickEvent"; "delete": "delete"; }, never, never, false, never>;
25
30
  }
@@ -21,6 +21,7 @@ export * from './static-data/containers/static-data-list/static-data-list.compon
21
21
  export * from './static-data/containers/static-data-items/static-data-items.component';
22
22
  export * from './static-data/containers/static-data-view/static-data-view.component';
23
23
  export * from './static-data/containers/static-data-details/static-data-details.component';
24
+ export * from './static-data/components/filtering-dialog/filtering-dialog.component';
24
25
  export * from './chips-input/chips-input.module';
25
26
  export * from './chips-input/chips-input.component';
26
27
  export * from './files-upload/files-upload.module';
@@ -57,3 +58,6 @@ export * from './tag-cloud/tag-cloud.module';
57
58
  export * from './tag-cloud/tag-cloud.component';
58
59
  export * from './text-with-link-more/text-with-link-more.module';
59
60
  export * from './text-with-link-more/text-with-link-more.component';
61
+ export * from './profile/profile.module';
62
+ export * from './profile/profile.component';
63
+ export * from '../utils/user-profile.helper';
@@ -0,0 +1,29 @@
1
+ import { ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
2
+ import { UserModel } from '../../../models/models/user/user-model';
3
+ import { AuthenticationService } from '../../services/auth/authentication.service';
4
+ import { ResolvedUserProfile } from '../../utils/user-profile.helper';
5
+ import * as i0 from "@angular/core";
6
+ export declare class ProfileComponent implements OnInit, OnChanges, OnDestroy {
7
+ private authService;
8
+ private cd;
9
+ user: UserModel | null;
10
+ token: string | null;
11
+ title: string;
12
+ parentTitle: string;
13
+ parentUrl: string[];
14
+ logout: EventEmitter<void>;
15
+ back: EventEmitter<void>;
16
+ profile: ResolvedUserProfile;
17
+ imageFailed: boolean;
18
+ private authSubscription?;
19
+ constructor(authService: AuthenticationService, cd: ChangeDetectorRef);
20
+ ngOnInit(): void;
21
+ ngOnChanges(changes: SimpleChanges): void;
22
+ ngOnDestroy(): void;
23
+ private updateProfile;
24
+ onImageError(): void;
25
+ onBack(): void;
26
+ onLogout(): void;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<ProfileComponent, never>;
28
+ static ɵcmp: i0.ɵɵComponentDeclaration<ProfileComponent, "shared-profile", never, { "user": { "alias": "user"; "required": false; }; "token": { "alias": "token"; "required": false; }; "title": { "alias": "title"; "required": false; }; "parentTitle": { "alias": "parentTitle"; "required": false; }; "parentUrl": { "alias": "parentUrl"; "required": false; }; }, { "logout": "logout"; "back": "back"; }, never, never, false, never>;
29
+ }
@@ -0,0 +1,12 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./profile.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/router";
5
+ import * as i4 from "@angular/material/button";
6
+ import * as i5 from "@angular/material/icon";
7
+ import * as i6 from "../panel-header/panel-header.module";
8
+ export declare class ProfileModule {
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<ProfileModule, never>;
10
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ProfileModule, [typeof i1.ProfileComponent], [typeof i2.CommonModule, typeof i3.RouterModule, typeof i4.MatButtonModule, typeof i5.MatIconModule, typeof i6.PanelHeaderModule], [typeof i2.CommonModule, typeof i1.ProfileComponent]>;
11
+ static ɵinj: i0.ɵɵInjectorDeclaration<ProfileModule>;
12
+ }
@@ -0,0 +1,22 @@
1
+ import { MatDialogRef } from '@angular/material/dialog';
2
+ import { StaticDataBoard } from './board.models';
3
+ import { IFormField } from '../../auto-form/interfaces/form-field';
4
+ import * as i0 from "@angular/core";
5
+ export interface BoardEditDialogData {
6
+ board: StaticDataBoard;
7
+ fields: IFormField[];
8
+ kanbanFields: IFormField[];
9
+ isNew?: boolean;
10
+ }
11
+ export declare class BoardEditDialogComponent {
12
+ data: BoardEditDialogData;
13
+ private ref;
14
+ board: StaticDataBoard;
15
+ readonly presetIcons: string[];
16
+ constructor(data: BoardEditDialogData, ref: MatDialogRef<BoardEditDialogComponent>);
17
+ selectIcon(icon: string): void;
18
+ isValid(): boolean;
19
+ apply(): void;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<BoardEditDialogComponent, never>;
21
+ static ɵcmp: i0.ɵɵComponentDeclaration<BoardEditDialogComponent, "shared-board-edit-dialog", never, {}, {}, never, never, true, never>;
22
+ }
@@ -0,0 +1,55 @@
1
+ import { Observable } from 'rxjs';
2
+ import { IFormField } from '../../auto-form/interfaces/form-field';
3
+ import { BoardCondition, BoardFilterGroup, BoardOperator, BoardValue } from './board.models';
4
+ import * as i0 from "@angular/core";
5
+ export interface FilterOperatorOption {
6
+ value: BoardOperator;
7
+ label: string;
8
+ }
9
+ export declare function toStaticDataKey(name?: string): string;
10
+ export declare class BoardFilterComponent {
11
+ private readonly facade;
12
+ private readonly cd;
13
+ private readonly injector;
14
+ private readonly http;
15
+ private readonly config;
16
+ group: BoardFilterGroup;
17
+ fields: IFormField[];
18
+ depth: number;
19
+ private optionStreams;
20
+ asGroup(node: BoardCondition | BoardFilterGroup): BoardFilterGroup | null;
21
+ asCondition(node: BoardCondition | BoardFilterGroup): BoardCondition | null;
22
+ getField(fieldName: string): IFormField | undefined;
23
+ isCalculatedField(fieldOrName?: IFormField | string): boolean;
24
+ isRelationField(fieldOrName?: IFormField | string): boolean;
25
+ isIntegerField(field?: IFormField): boolean;
26
+ isDateField(field?: IFormField): boolean;
27
+ getOperators(fieldName: string): FilterOperatorOption[];
28
+ addCondition(): void;
29
+ addGroup(): void;
30
+ removeNode(index: number): void;
31
+ changeField(condition: BoardCondition, field: string): void;
32
+ changeOperator(condition: BoardCondition, operator: BoardOperator): void;
33
+ getMultipleValue(condition: BoardCondition): BoardValue[];
34
+ setMultipleValue(condition: BoardCondition, val: BoardValue[]): void;
35
+ getSingleValue(condition: BoardCondition): BoardValue | '';
36
+ setSingleValue(condition: BoardCondition, val: BoardValue): void;
37
+ formatSelectedLabels(fieldName: string, value: any): string;
38
+ valueText(value: BoardCondition['value']): string;
39
+ setValue(condition: BoardCondition, text: string): void;
40
+ searchQueries: Map<string, string>;
41
+ private rawOptionsCache;
42
+ getFilterSearch(field: string): string;
43
+ setFilterSearch(field: string, query: string): void;
44
+ filteredOptions(fieldName: string): Observable<{
45
+ id: BoardValue;
46
+ name: string;
47
+ }[]>;
48
+ private normalizeOptions;
49
+ options(fieldName: string): Observable<{
50
+ id: BoardValue;
51
+ name: string;
52
+ }[]>;
53
+ static ɵfac: i0.ɵɵFactoryDeclaration<BoardFilterComponent, never>;
54
+ static ɵcmp: i0.ɵɵComponentDeclaration<BoardFilterComponent, "shared-board-filter", never, { "group": { "alias": "group"; "required": false; }; "fields": { "alias": "fields"; "required": false; }; "depth": { "alias": "depth"; "required": false; }; }, {}, never, never, true, never>;
55
+ }
@@ -0,0 +1,41 @@
1
+ import { ChangeDetectorRef, OnDestroy } from '@angular/core';
2
+ import { MatDialog, MatDialogRef } from '@angular/material/dialog';
3
+ import { IFormField } from '../../auto-form/interfaces/form-field';
4
+ import { BoardSettings, StaticDataBoard } from './board.models';
5
+ import { StaticDataBoardsFacade } from './boards.facade';
6
+ import * as i0 from "@angular/core";
7
+ export interface BoardSettingsDialogData {
8
+ contentType: string;
9
+ settings: BoardSettings;
10
+ fields: IFormField[];
11
+ }
12
+ export declare class BoardSettingsDialogComponent implements OnDestroy {
13
+ data: BoardSettingsDialogData;
14
+ private facade;
15
+ private ref;
16
+ private cd;
17
+ private dialog;
18
+ activeSection: 'boards';
19
+ readonly sections: {
20
+ id: "boards";
21
+ label: string;
22
+ icon: string;
23
+ }[];
24
+ boards: StaticDataBoard[];
25
+ fields: IFormField[];
26
+ kanbanFields: IFormField[];
27
+ saving: boolean;
28
+ error: string;
29
+ private readonly destroyed;
30
+ constructor(data: BoardSettingsDialogData, facade: StaticDataBoardsFacade, ref: MatDialogRef<BoardSettingsDialogComponent>, cd: ChangeDetectorRef, dialog: MatDialog);
31
+ ngOnDestroy(): void;
32
+ getKanbanTitle(fieldKey?: string): string;
33
+ openEdit(board?: StaticDataBoard, index?: number): void;
34
+ add(): void;
35
+ remove(index: number): void;
36
+ move(index: number, direction: number): void;
37
+ valid(): boolean;
38
+ save(): void;
39
+ static ɵfac: i0.ɵɵFactoryDeclaration<BoardSettingsDialogComponent, never>;
40
+ static ɵcmp: i0.ɵɵComponentDeclaration<BoardSettingsDialogComponent, "shared-board-settings-dialog", never, {}, {}, never, never, true, never>;
41
+ }
@@ -0,0 +1,28 @@
1
+ export type BoardValue = string | number | boolean;
2
+ export type BoardOperator = 'eq' | 'ne' | 'in' | 'notIn' | 'contains' | 'gt' | 'gte' | 'lt' | 'lte' | 'isEmpty' | 'notEmpty';
3
+ export interface BoardCondition {
4
+ field: string;
5
+ operator: BoardOperator;
6
+ value?: BoardValue | BoardValue[];
7
+ }
8
+ export interface BoardFilterGroup {
9
+ operator: 'and' | 'or';
10
+ children: (BoardCondition | BoardFilterGroup)[];
11
+ }
12
+ export interface StaticDataBoard {
13
+ id: string;
14
+ name: string;
15
+ filter: BoardFilterGroup;
16
+ groupBy?: string;
17
+ enabled?: boolean;
18
+ icon?: string;
19
+ description?: string;
20
+ }
21
+ export interface BoardSettings {
22
+ boards: StaticDataBoard[];
23
+ version: number;
24
+ canManage: boolean;
25
+ filterFields?: string[];
26
+ kanbanFields?: string[];
27
+ }
28
+ export declare function validBoardGroup(group: BoardFilterGroup, root?: boolean): boolean;
@@ -0,0 +1,17 @@
1
+ import { Observable } from 'rxjs';
2
+ import { BoardSettings, StaticDataBoard } from './board.models';
3
+ import * as i0 from "@angular/core";
4
+ export declare class StaticDataBoardsFacade {
5
+ private readonly service;
6
+ private readonly auth;
7
+ private readonly changesSubject;
8
+ readonly changes$: Observable<{
9
+ contentType: string;
10
+ settings: BoardSettings;
11
+ }>;
12
+ load(contentType: string): Observable<BoardSettings>;
13
+ save(contentType: string, boards: StaticDataBoard[], version: number): Observable<BoardSettings>;
14
+ private request;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<StaticDataBoardsFacade, never>;
16
+ static ɵprov: i0.ɵɵInjectableDeclaration<StaticDataBoardsFacade>;
17
+ }
@@ -0,0 +1,6 @@
1
+ export * from './board.models';
2
+ export * from './boards.facade';
3
+ export * from './board-filter.component';
4
+ export * from './board-settings-dialog.component';
5
+ export * from './board-edit-dialog.component';
6
+ export * from './kanban.component';
@@ -0,0 +1,24 @@
1
+ import { EventEmitter, OnChanges } from '@angular/core';
2
+ import { Observable } from 'rxjs';
3
+ import { IFormField } from '../../auto-form/interfaces/form-field';
4
+ import { StaticDataModel } from '../../../../models/models/static-data/static-data.model';
5
+ import * as i0 from "@angular/core";
6
+ export interface KanbanColumn {
7
+ key: string;
8
+ title: string;
9
+ items: StaticDataModel[];
10
+ }
11
+ export declare function groupKanbanItems(items: StaticDataModel[], field: string, labels: {
12
+ id: unknown;
13
+ name: string;
14
+ }[]): KanbanColumn[];
15
+ export declare class StaticDataKanbanComponent implements OnChanges {
16
+ private readonly facade;
17
+ items: StaticDataModel[];
18
+ field: IFormField;
19
+ open: EventEmitter<StaticDataModel>;
20
+ columns$: Observable<KanbanColumn[]>;
21
+ ngOnChanges(): void;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<StaticDataKanbanComponent, never>;
23
+ static ɵcmp: i0.ɵɵComponentDeclaration<StaticDataKanbanComponent, "shared-static-data-kanban", never, { "items": { "alias": "items"; "required": false; }; "field": { "alias": "field"; "required": false; }; }, { "open": "open"; }, never, never, true, never>;
24
+ }
@@ -9,8 +9,10 @@ import { SharedState } from "../../../../+state";
9
9
  import { StaticDataSectionFiltering, StaticDataSectionFilteringFieldTypes } from "../../interfaces/static-data.interface";
10
10
  import * as i0 from "@angular/core";
11
11
  export interface FilteringDialogData {
12
- filteringConfig: StaticDataSectionFiltering;
13
- sectionFields: IFormField[];
12
+ filteringConfig?: StaticDataSectionFiltering;
13
+ sectionFields?: IFormField[];
14
+ currentValues?: Record<string, any>;
15
+ currentValuesDisplay?: Record<string, any>;
14
16
  }
15
17
  export declare class FilteringDialogComponent implements OnInit {
16
18
  private dialogRef;
@@ -23,6 +25,7 @@ export declare class FilteringDialogComponent implements OnInit {
23
25
  form: UntypedFormGroup;
24
26
  fields: any[];
25
27
  protected readonly FieldType: typeof FieldType;
28
+ protected readonly StaticDataSectionFilteringFieldTypes: typeof StaticDataSectionFilteringFieldTypes;
26
29
  storedOption: {
27
30
  [key: string]: {
28
31
  value: string;
@@ -33,11 +36,11 @@ export declare class FilteringDialogComponent implements OnInit {
33
36
  constructor(dialogRef: MatDialogRef<FilteringDialogComponent>, data: FilteringDialogData, staticDataFacade: StaticDataFacade, store: Store<SharedState>, fb: UntypedFormBuilder, cd: ChangeDetectorRef);
34
37
  ngOnInit(): void;
35
38
  onNoClick(): void;
39
+ resetClick(): void;
36
40
  submitClick(): Promise<void>;
37
41
  private initForm;
38
42
  private collectSelectOptions;
39
43
  preparingFields(): void;
40
- protected readonly StaticDataSectionFilteringFieldTypes: typeof StaticDataSectionFilteringFieldTypes;
41
44
  static ɵfac: i0.ɵɵFactoryDeclaration<FilteringDialogComponent, never>;
42
45
  static ɵcmp: i0.ɵɵComponentDeclaration<FilteringDialogComponent, "app-filtering-dialog", never, {}, {}, never, never, true, never>;
43
46
  }
@@ -0,0 +1,6 @@
1
+ export interface ListColumn {
2
+ field: string;
3
+ title: string;
4
+ }
5
+ export declare function restoreColumns(contentType: string, fields: ListColumn[], defaults: ListColumn[], browser: boolean): ListColumn[];
6
+ export declare function saveColumns(contentType: string, columns: ListColumn[], browser: boolean): void;
@@ -0,0 +1,6 @@
1
+ /** Keep every loaded row, including children whose parent is on another page. */
2
+ export declare function groupNestedItems<T extends {
3
+ id: number;
4
+ name?: string;
5
+ [key: string]: unknown;
6
+ }>(items: T[], parentField: string): T[];
@@ -1,4 +1,9 @@
1
- import { ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges, Type } from '@angular/core';
1
+ import { PresetSettings, PresetWhere, StaticDataPreset } from '../../presets/preset.models';
2
+ import { StaticDataPresetsFacade } from '../../presets/presets.facade';
3
+ import { BoardSettings, StaticDataBoard } from '../../boards/board.models';
4
+ import { StaticDataBoardsFacade } from '../../boards/boards.facade';
5
+ import { IFormField } from '../../../auto-form/interfaces/form-field';
6
+ import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges, Type, ViewContainerRef } from '@angular/core';
2
7
  import { Observable } from 'rxjs';
3
8
  import { MatSort } from '@angular/material/sort';
4
9
  import { MatPaginator } from '@angular/material/paginator';
@@ -13,15 +18,17 @@ import * as i0 from "@angular/core";
13
18
  /**
14
19
  * @title Data table with sorting, pagination, and filtering.
15
20
  */
16
- export declare class StaticDataListItemsComponent implements OnInit, OnDestroy, OnChanges {
21
+ export declare class StaticDataListItemsComponent implements OnInit, AfterViewInit, OnDestroy, OnChanges {
17
22
  private platformId;
18
23
  dialog: MatDialog;
19
24
  private rightService;
20
- private staticDataFacade;
21
- private changeDetectorRef;
22
- private routerFacade;
23
- private createNewDialog;
24
- private config;
25
+ private boardsFacade;
26
+ private presetsFacade?;
27
+ private staticDataFacade?;
28
+ private changeDetectorRef?;
29
+ private routerFacade?;
30
+ private createNewDialog?;
31
+ private config?;
25
32
  mode: StaticDataListComponentModes;
26
33
  selectIsRequired: boolean;
27
34
  staticDataConfiguration: StaticDataSections;
@@ -42,6 +49,7 @@ export declare class StaticDataListItemsComponent implements OnInit, OnDestroy,
42
49
  subEntity: SubEntity;
43
50
  leftBlockFilterParamData: any;
44
51
  defaultLanguageId: number;
52
+ presetApplied: EventEmitter<PresetWhere>;
45
53
  selectingItem: EventEmitter<{
46
54
  id: string;
47
55
  name: string;
@@ -51,12 +59,53 @@ export declare class StaticDataListItemsComponent implements OnInit, OnDestroy,
51
59
  paginator: MatPaginator;
52
60
  sort: MatSort;
53
61
  searchInput: ElementRef;
62
+ customTopFilterHost?: ViewContainerRef;
63
+ customTopFilterData: {
64
+ [key: string]: any;
65
+ };
66
+ private customTopFilterRef?;
67
+ private customTopFilterSub?;
68
+ get hasCustomTopFilter(): boolean;
69
+ boardSettings: BoardSettings;
70
+ activeBoard: StaticDataBoard | null;
71
+ boardView: 'list' | 'kanban';
72
+ get boardSubSection(): string;
73
+ get visibleBoards(): StaticDataBoard[];
74
+ boardsLoading: boolean;
75
+ boardsError: string;
76
+ private boardsLoadSub?;
77
+ private boardsDialogSub?;
78
+ private boardsChangesSub?;
79
+ get boardsEnabled(): boolean;
80
+ get kanbanField(): IFormField | undefined;
81
+ loadBoards(): void;
82
+ selectBoard(board: StaticDataBoard | null): void;
83
+ openBoardSettings(): void;
84
+ openKanbanItem(item: StaticDataModel, rights: {
85
+ [key: string]: boolean;
86
+ }): void;
87
+ presetWhere: PresetWhere;
88
+ presetSettings: PresetSettings;
89
+ activePresetId: string;
90
+ private restoredPreset;
91
+ private presetsLoadSub?;
92
+ private presetsChangesSub?;
93
+ get presetsEnabled(): boolean;
94
+ loadPresets(): void;
95
+ selectPreset(preset: StaticDataPreset): void;
96
+ removePreset(preset: StaticDataPreset, event: MouseEvent): void;
97
+ applyPreset(where: PresetWhere): void;
54
98
  title: string;
55
99
  isLoaded: boolean;
56
100
  loaded$: Observable<boolean>;
57
101
  staticSection: StaticDataSection;
58
102
  totalCount: number;
59
103
  perPage: number;
104
+ columnFilters: Record<string, number[]>;
105
+ filterColumn(event: {
106
+ field: string;
107
+ values: number[];
108
+ }): void;
60
109
  pageIndex: number;
61
110
  staticData$: Observable<any[]>;
62
111
  staticDataMeta$: Observable<{
@@ -82,10 +131,15 @@ export declare class StaticDataListItemsComponent implements OnInit, OnDestroy,
82
131
  title: string;
83
132
  }[];
84
133
  defaultFieldsList: FieldsOnListPage[];
85
- constructor(platformId: Object, dialog: MatDialog, rightService: RightService, staticDataFacade: StaticDataFacade, changeDetectorRef: ChangeDetectorRef, routerFacade: RouterFacade, createNewDialog: Type<any>, config: AppConfig);
134
+ constructor(platformId: Object, dialog: MatDialog, rightService: RightService, boardsFacade: StaticDataBoardsFacade, presetsFacade?: StaticDataPresetsFacade, staticDataFacade?: StaticDataFacade, changeDetectorRef?: ChangeDetectorRef, routerFacade?: RouterFacade, createNewDialog?: Type<any>, config?: AppConfig);
86
135
  ngOnInit(): void;
136
+ ngAfterViewInit(): void;
87
137
  ngOnDestroy(): void;
88
138
  ngOnChanges(changes: SimpleChanges): void;
139
+ handleCustomTopFilter(filters: {
140
+ [field: string]: any;
141
+ } | null): void;
142
+ private setupCustomTopFilter;
89
143
  private preparingData;
90
144
  addHandle(): void;
91
145
  searchHandle(searchValue: string): void;
@@ -115,15 +169,23 @@ export declare class StaticDataListItemsComponent implements OnInit, OnDestroy,
115
169
  field: string;
116
170
  type: string;
117
171
  }): void;
172
+ get hasFilteringFields(): boolean;
173
+ get activeFilterChips(): {
174
+ field: string;
175
+ title: string;
176
+ value: string;
177
+ }[];
178
+ get activeFilterChipsCount(): number;
179
+ openFilterFieldsDialog(): void;
180
+ removeFilterChip(field: string): void;
181
+ clearAllFilterChips(): void;
118
182
  openFieldSettings(): void;
119
183
  private loadStaticData;
120
- private groupItemsByNestedField;
121
- private groupItemsByNestedFieldRecursion;
122
184
  private loadStaticDataMeta;
123
185
  private openDeleteDialog;
124
186
  private preLoadSections;
125
187
  deleteEvent(item: StaticDataModel): void;
126
188
  changePage(data: any): void;
127
- static ɵfac: i0.ɵɵFactoryDeclaration<StaticDataListItemsComponent, [null, null, null, null, null, null, { optional: true; }, null]>;
128
- static ɵcmp: i0.ɵɵComponentDeclaration<StaticDataListItemsComponent, "app-static-data-list-items", never, { "mode": { "alias": "mode"; "required": false; }; "selectIsRequired": { "alias": "selectIsRequired"; "required": false; }; "staticDataConfiguration": { "alias": "staticDataConfiguration"; "required": false; }; "viewMode": { "alias": "viewMode"; "required": false; }; "contentType": { "alias": "contentType"; "required": false; }; "customTitle": { "alias": "customTitle"; "required": false; }; "addTitle": { "alias": "addTitle"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "parentSection": { "alias": "parentSection"; "required": false; }; "parentItemId": { "alias": "parentItemId"; "required": false; }; "showPanelHeader": { "alias": "showPanelHeader"; "required": false; }; "parentData": { "alias": "parentData"; "required": false; }; "parentSectionHashtag": { "alias": "parentSectionHashtag"; "required": false; }; "autoCompleteFields": { "alias": "autoCompleteFields"; "required": false; }; "filteringQuery": { "alias": "filteringQuery"; "required": false; }; "subEntity": { "alias": "subEntity"; "required": false; }; "leftBlockFilterParamData": { "alias": "leftBlockFilterParamData"; "required": false; }; "defaultLanguageId": { "alias": "defaultLanguageId"; "required": false; }; "createUpdateUrl": { "alias": "createUpdateUrl"; "required": false; }; "viewUrl": { "alias": "viewUrl"; "required": false; }; }, { "selectingItem": "selectingItem"; }, never, never, true, never>;
189
+ static ɵfac: i0.ɵɵFactoryDeclaration<StaticDataListItemsComponent, [null, null, null, null, { optional: true; }, null, null, null, { optional: true; }, { optional: true; }]>;
190
+ static ɵcmp: i0.ɵɵComponentDeclaration<StaticDataListItemsComponent, "app-static-data-list-items", never, { "mode": { "alias": "mode"; "required": false; }; "selectIsRequired": { "alias": "selectIsRequired"; "required": false; }; "staticDataConfiguration": { "alias": "staticDataConfiguration"; "required": false; }; "viewMode": { "alias": "viewMode"; "required": false; }; "contentType": { "alias": "contentType"; "required": false; }; "customTitle": { "alias": "customTitle"; "required": false; }; "addTitle": { "alias": "addTitle"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "parentSection": { "alias": "parentSection"; "required": false; }; "parentItemId": { "alias": "parentItemId"; "required": false; }; "showPanelHeader": { "alias": "showPanelHeader"; "required": false; }; "parentData": { "alias": "parentData"; "required": false; }; "parentSectionHashtag": { "alias": "parentSectionHashtag"; "required": false; }; "autoCompleteFields": { "alias": "autoCompleteFields"; "required": false; }; "filteringQuery": { "alias": "filteringQuery"; "required": false; }; "subEntity": { "alias": "subEntity"; "required": false; }; "leftBlockFilterParamData": { "alias": "leftBlockFilterParamData"; "required": false; }; "defaultLanguageId": { "alias": "defaultLanguageId"; "required": false; }; "createUpdateUrl": { "alias": "createUpdateUrl"; "required": false; }; "viewUrl": { "alias": "viewUrl"; "required": false; }; }, { "presetApplied": "presetApplied"; "selectingItem": "selectingItem"; }, never, never, true, never>;
129
191
  }
@@ -0,0 +1,4 @@
1
+ export declare function visibleNestedRows<T extends {
2
+ id?: unknown;
3
+ [key: string]: unknown;
4
+ }>(items: T[], parentField: string, expanded: Set<unknown>): T[];