nuxeo-development-framework 5.3.1 → 5.3.2

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.
@@ -1,22 +1,24 @@
1
1
  import { Direction } from '@angular/cdk/bidi';
2
- import { EventEmitter, TemplateRef } from '@angular/core';
2
+ import { EventEmitter, OnChanges, SimpleChanges, TemplateRef } from '@angular/core';
3
3
  import { MatDialog } from '@angular/material/dialog';
4
4
  import { TranslateService } from '@ngx-translate/core';
5
+ import { Observable } from 'rxjs';
5
6
  import { AggregationResponse, FormQueryModel } from '../../filters-panel';
6
7
  import { CustomCriteriaModel, ExportType, NdfTableConfig, SortTableItem, TableColumnConfig, TableSortOptions, TableViewMode } from '../../models';
7
- import { FiltersMapperService, NdfTableService } from '../../services';
8
+ import { FiltersMapperService, NdfTableConfigurationService, NdfTableService } from '../../services';
8
9
  import { PageEvent } from '@angular/material/paginator/paginator';
9
10
  import { DestroySubject } from '../../../../../shared/components';
10
11
  import { NuxeoPagination } from '../../../../../shared/models';
11
12
  import { DynamicTableService } from '../../../dynamic-table';
12
13
  import { CustomToastrService } from '../../../../custom-toastr/services/custom-toastr.service';
13
14
  import * as i0 from "@angular/core";
14
- export declare class NdfTableComponent extends DestroySubject {
15
+ export declare class NdfTableComponent extends DestroySubject implements OnChanges {
15
16
  private _filtersMapper;
16
17
  private _dynamicTableService;
17
18
  private _translateService;
18
19
  private _ngTableService;
19
20
  private _toastrService;
21
+ private _ndfTableConfigurationService;
20
22
  private _dialog;
21
23
  private readonly _aggregationsSub;
22
24
  private readonly _displayedColumnsSub;
@@ -25,23 +27,29 @@ export declare class NdfTableComponent extends DestroySubject {
25
27
  private readonly _textSearchSub;
26
28
  private readonly _activatedCriteriaSub;
27
29
  private readonly _customCriteriaSub;
28
- readonly aggregations$: import("rxjs").Observable<Record<string, AggregationResponse>>;
29
- readonly displayedColumns$: import("rxjs").Observable<TableColumnConfig[]>;
30
- readonly sortOption$: import("rxjs").Observable<TableSortOptions>;
31
- readonly viewMode$: import("rxjs").Observable<TableViewMode>;
32
- readonly customFilters$: import("rxjs").Observable<{
30
+ readonly aggregations$: Observable<Record<string, AggregationResponse>>;
31
+ readonly displayedColumns$: Observable<TableColumnConfig[]>;
32
+ readonly sortOption$: Observable<TableSortOptions>;
33
+ readonly viewMode$: Observable<TableViewMode>;
34
+ readonly customFilters$: Observable<{
33
35
  params?: Record<string, any>;
34
36
  payload?: {
35
37
  predicateList: any[];
36
38
  } & Record<string, any>;
37
39
  }>;
38
- readonly textSearch$: import("rxjs").Observable<string>;
39
- readonly searchAndFilters$: import("rxjs").Observable<any>;
40
+ readonly textSearch$: Observable<string>;
41
+ readonly searchAndFilters$: Observable<any>;
40
42
  rows: Array<unknown>;
41
43
  totalRecords: number;
42
44
  autoCalculateHeight: boolean;
43
45
  emptyMessage: string;
44
46
  activeQuery: FormQueryModel;
47
+ configPath: string;
48
+ configTransformer: (config: NdfTableConfig) => Observable<NdfTableConfig>;
49
+ tableKey: string;
50
+ private _config;
51
+ set config(config: NdfTableConfig);
52
+ get tableConfig(): NdfTableConfig;
45
53
  set customCriteria(criteria: CustomCriteriaModel);
46
54
  set searchTerm(value: string);
47
55
  onRowSelected: EventEmitter<any>;
@@ -59,8 +67,6 @@ export declare class NdfTableComponent extends DestroySubject {
59
67
  searchTableTemplate: TemplateRef<any>;
60
68
  filterCustomTemplate: TemplateRef<any>;
61
69
  private _tableConfigSub;
62
- set config(config: NdfTableConfig);
63
- get config(): NdfTableConfig;
64
70
  get options(): import("../../models").NdfTableOptions;
65
71
  get filtersConfig(): import("../../models").FiltersConfig;
66
72
  get sortList(): SortTableItem[];
@@ -96,7 +102,8 @@ export declare class NdfTableComponent extends DestroySubject {
96
102
  /**
97
103
  *
98
104
  */
99
- constructor(_filtersMapper: FiltersMapperService, _dynamicTableService: DynamicTableService, _translateService: TranslateService, _ngTableService: NdfTableService, _toastrService: CustomToastrService, _dialog: MatDialog);
105
+ constructor(_filtersMapper: FiltersMapperService, _dynamicTableService: DynamicTableService, _translateService: TranslateService, _ngTableService: NdfTableService, _toastrService: CustomToastrService, _ndfTableConfigurationService: NdfTableConfigurationService, _dialog: MatDialog);
106
+ ngOnChanges(changes: SimpleChanges): void;
100
107
  togglePanel(): void;
101
108
  onLoad(data: NuxeoPagination<any>): void;
102
109
  onInitialize(data: NuxeoPagination<any>): void;
@@ -114,6 +121,18 @@ export declare class NdfTableComponent extends DestroySubject {
114
121
  private _prepareSearch;
115
122
  private _stringifyValues;
116
123
  private _triggerCriteriaChanges;
124
+ /**
125
+ * @description
126
+ * This method is used to set the table configuration.
127
+ * @param config NdfTableConfig
128
+ */
129
+ private _applyTableConfig;
130
+ /**
131
+ * @private
132
+ * @description Loads the table configuration based on the provided key and applies it.
133
+ * @param {string} key - The key used to fetch the table configuration.
134
+ */
135
+ private _loadTableConfig;
117
136
  static ɵfac: i0.ɵɵFactoryDeclaration<NdfTableComponent, never>;
118
- static ɵcmp: i0.ɵɵComponentDeclaration<NdfTableComponent, "app-ndf-table", never, { "rows": "rows"; "totalRecords": "totalRecords"; "autoCalculateHeight": "autoCalculateHeight"; "emptyMessage": "emptyMessage"; "activeQuery": "activeQuery"; "customCriteria": "customCriteria"; "searchTerm": "searchTerm"; "config": "config"; }, { "onRowSelected": "onRowSelected"; "onRowIndexSelected": "onRowIndexSelected"; "actionOnRow": "actionOnRow"; "onGettingData": "onGettingData"; "onMultiRowSelected": "onMultiRowSelected"; "onLoading": "onLoading"; "onPage": "onPage"; "onInitialized": "onInitialized"; "onLoaded": "onLoaded"; "onQueryChange": "onQueryChange"; "onSort": "onSort"; }, ["actionsTableTemplate", "searchTableTemplate", "filterCustomTemplate"], never>;
137
+ static ɵcmp: i0.ɵɵComponentDeclaration<NdfTableComponent, "app-ndf-table", never, { "rows": "rows"; "totalRecords": "totalRecords"; "autoCalculateHeight": "autoCalculateHeight"; "emptyMessage": "emptyMessage"; "activeQuery": "activeQuery"; "configPath": "configPath"; "configTransformer": "configTransformer"; "tableKey": "tableKey"; "config": "config"; "customCriteria": "customCriteria"; "searchTerm": "searchTerm"; }, { "onRowSelected": "onRowSelected"; "onRowIndexSelected": "onRowIndexSelected"; "actionOnRow": "actionOnRow"; "onGettingData": "onGettingData"; "onMultiRowSelected": "onMultiRowSelected"; "onLoading": "onLoading"; "onPage": "onPage"; "onInitialized": "onInitialized"; "onLoaded": "onLoaded"; "onQueryChange": "onQueryChange"; "onSort": "onSort"; }, ["actionsTableTemplate", "searchTableTemplate", "filterCustomTemplate"], never>;
119
138
  }
@@ -1,2 +1,3 @@
1
1
  export * from './filters-mapper.service';
2
2
  export * from './ndf-table.service';
3
+ export * from './ndf-table-configuration.service';
@@ -0,0 +1,14 @@
1
+ import { Injector } from '@angular/core';
2
+ import { HttpBaseService } from '../../../../shared/services/base/http-base.service';
3
+ import { Observable } from 'rxjs';
4
+ import { NdfTableConfig } from '../models';
5
+ import * as i0 from "@angular/core";
6
+ export declare class NdfTableConfigurationService extends HttpBaseService {
7
+ readonly injector: Injector;
8
+ private readonly appConfigService;
9
+ private readonly configurationsUrl;
10
+ constructor(injector: Injector);
11
+ getTableConfiguration(key: string, path?: string): Observable<NdfTableConfig>;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<NdfTableConfigurationService, never>;
13
+ static ɵprov: i0.ɵɵInjectableDeclaration<NdfTableConfigurationService>;
14
+ }
@@ -44,6 +44,7 @@ export interface Environment {
44
44
  showDataCatalogPage?: boolean;
45
45
  enableDataCatalogConfiguration?: boolean;
46
46
  faceRecognitionEnabled?: string;
47
+ configurationsUrl?: string;
47
48
  }
48
49
  export declare class EnvManager {
49
50
  static environment: Environment;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxeo-development-framework",
3
- "version": "5.3.1",
3
+ "version": "5.3.2",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "12.2.3",
6
6
  "@angular/common": "12.2.3",