nuxeo-development-framework 5.4.4 → 5.4.6

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 (80) hide show
  1. package/bundles/nuxeo-development-framework.umd.js +761 -440
  2. package/bundles/nuxeo-development-framework.umd.js.map +1 -1
  3. package/esm2015/lib/components/dynamic-search/dynamic-search/dynamic-search.component.js +2 -2
  4. package/esm2015/lib/components/ndf-filters/base/base-checkbox-radio.component.js +18 -7
  5. package/esm2015/lib/components/ndf-filters/constants/type.js +3 -2
  6. package/esm2015/lib/components/ndf-filters/containers/aggregation-field/aggregation-field.component.js +15 -14
  7. package/esm2015/lib/components/ndf-filters/containers/base-field.js +1 -1
  8. package/esm2015/lib/components/ndf-filters/containers/custom-field/custom-field.component.js +3 -2
  9. package/esm2015/lib/components/ndf-filters/containers/filters-panel/filters-panel.component.js +5 -3
  10. package/esm2015/lib/components/ndf-filters/custom-components/aggregation-group/aggregation-group.component.js +87 -0
  11. package/esm2015/lib/components/ndf-filters/custom-components/aggregation-group/map-aggregation-config.js +20 -0
  12. package/esm2015/lib/components/ndf-filters/custom-components/index.js +3 -1
  13. package/esm2015/lib/components/ndf-filters/models/custom-field-config.js +1 -1
  14. package/esm2015/lib/components/ndf-filters/models/field-options/custom-fields-options.js +1 -1
  15. package/esm2015/lib/components/ndf-filters/ndf-filters-panel.module.js +97 -28
  16. package/esm2015/lib/components/ndf-filters/public-api.js +4 -3
  17. package/esm2015/lib/components/ndf-filters/services/dynamic-component-loader.service.js +7 -33
  18. package/esm2015/lib/components/ndf-filters/utility/nxql-query.js +4 -4
  19. package/esm2015/lib/components/ndf-tabs/component/ndf-tabs.component.js +2 -2
  20. package/esm2015/lib/components/reports/ndf-reports/base/base-chart.js +10 -2
  21. package/esm2015/lib/components/reports/ndf-reports/charts-components/digit-chart/digit-chart.component.js +2 -2
  22. package/esm2015/lib/components/reports/ndf-reports/charts-components/graph-chart/graph-chart.component.js +2 -2
  23. package/esm2015/lib/components/reports/ndf-reports/components/_parts/timeline-dialog/timeline-dialog.component.js +12 -4
  24. package/esm2015/lib/components/reports/ndf-reports/components/digit-report/digit-report.component.js +1 -1
  25. package/esm2015/lib/components/reports/ndf-reports/components/dynamic-timeline-report/dynamic-timeline-report.component.js +8 -8
  26. package/esm2015/lib/components/reports/ndf-reports/components/graph-report/graph-report.component.js +2 -2
  27. package/esm2015/lib/components/reports/ndf-reports/containers/ndf-report/ndf-report.component.js +1 -1
  28. package/esm2015/lib/components/reports/ndf-reports/containers/ndf-reports/ndf-reports.component.js +27 -3
  29. package/esm2015/lib/components/reports/ndf-reports/models/base.js +1 -1
  30. package/esm2015/lib/components/reports/ndf-reports/models/details.js +1 -1
  31. package/esm2015/lib/components/reports/ndf-reports/models/dynamic-line.js +1 -1
  32. package/esm2015/lib/components/reports/ndf-reports/models/ndf-reports.config.js +1 -1
  33. package/esm2015/lib/components/reports/ndf-reports/models/request.js +1 -1
  34. package/esm2015/lib/components/reports/ndf-reports/services/base-chart-builder.service.js +5 -5
  35. package/esm2015/lib/components/reports/ndf-reports/services/chart-data-transformers.service.js +1 -1
  36. package/esm2015/lib/components/reports/ndf-reports/services/digit-chart.service.js +3 -3
  37. package/esm2015/lib/components/reports/ndf-reports/services/dynamic-timeline-report.service.js +34 -29
  38. package/esm2015/lib/components/reports/ndf-reports/services/index.js +2 -1
  39. package/esm2015/lib/components/reports/ndf-reports/services/ndf-reports.service.js +12 -5
  40. package/esm2015/lib/components/reports/ndf-reports/services/reports-data-transformers.service.js +70 -0
  41. package/esm2015/lib/components/reports/ndf-reports/utilities/reports-table.mapper.js +6 -5
  42. package/esm2015/lib/components/skeleton/skeleton.component.js +1 -1
  43. package/esm2015/lib/components/spell-checker-field/spell-checker-field.module.js +1 -1
  44. package/esm2015/lib/components/tables/dynamic-table/dynamic-table/dynamic-table.component.js +32 -8
  45. package/esm2015/lib/components/tables/ndf-table/containers/ndf-table/ndf-table.component.js +2 -2
  46. package/esm2015/lib/components/tables/ndf-table/models/table-config.js +1 -1
  47. package/esm2015/lib/shared/evaluator/types.js +1 -1
  48. package/fesm2015/nuxeo-development-framework.js +754 -464
  49. package/fesm2015/nuxeo-development-framework.js.map +1 -1
  50. package/lib/components/ndf-filters/base/base-checkbox-radio.component.d.ts +1 -0
  51. package/lib/components/ndf-filters/constants/type.d.ts +1 -0
  52. package/lib/components/ndf-filters/custom-components/aggregation-group/aggregation-group.component.d.ts +26 -0
  53. package/lib/components/ndf-filters/custom-components/aggregation-group/map-aggregation-config.d.ts +9 -0
  54. package/lib/components/ndf-filters/custom-components/index.d.ts +2 -0
  55. package/lib/components/ndf-filters/models/custom-field-config.d.ts +2 -2
  56. package/lib/components/ndf-filters/models/field-options/custom-fields-options.d.ts +14 -0
  57. package/lib/components/ndf-filters/ndf-filters-panel.module.d.ts +58 -47
  58. package/lib/components/ndf-filters/public-api.d.ts +3 -2
  59. package/lib/components/ndf-filters/services/dynamic-component-loader.service.d.ts +1 -3
  60. package/lib/components/reports/ndf-reports/base/base-chart.d.ts +5 -2
  61. package/lib/components/reports/ndf-reports/components/_parts/timeline-dialog/timeline-dialog.component.d.ts +2 -0
  62. package/lib/components/reports/ndf-reports/components/dynamic-timeline-report/dynamic-timeline-report.component.d.ts +4 -2
  63. package/lib/components/reports/ndf-reports/containers/ndf-reports/ndf-reports.component.d.ts +8 -2
  64. package/lib/components/reports/ndf-reports/models/base.d.ts +7 -3
  65. package/lib/components/reports/ndf-reports/models/details.d.ts +6 -1
  66. package/lib/components/reports/ndf-reports/models/dynamic-line.d.ts +6 -1
  67. package/lib/components/reports/ndf-reports/models/ndf-reports.config.d.ts +4 -0
  68. package/lib/components/reports/ndf-reports/models/request.d.ts +1 -0
  69. package/lib/components/reports/ndf-reports/services/base-chart-builder.service.d.ts +3 -3
  70. package/lib/components/reports/ndf-reports/services/chart-data-transformers.service.d.ts +9 -2
  71. package/lib/components/reports/ndf-reports/services/digit-chart.service.d.ts +2 -2
  72. package/lib/components/reports/ndf-reports/services/dynamic-timeline-report.service.d.ts +10 -15
  73. package/lib/components/reports/ndf-reports/services/index.d.ts +1 -0
  74. package/lib/components/reports/ndf-reports/services/ndf-reports.service.d.ts +5 -1
  75. package/lib/components/reports/ndf-reports/services/reports-data-transformers.service.d.ts +48 -0
  76. package/lib/components/tables/dynamic-table/dynamic-table/dynamic-table.component.d.ts +5 -1
  77. package/lib/components/tables/ndf-table/models/table-config.d.ts +5 -0
  78. package/lib/shared/evaluator/types.d.ts +3 -1
  79. package/package.json +1 -1
  80. package/src/docs/ndf-table.doc.md +4 -5
@@ -4,6 +4,7 @@ import { AdapterService } from '../../../../core/adapters/adapter.service';
4
4
  import { CallApiService } from '../../../../core/services/callApi/call-api.service';
5
5
  import { DynamicTableService } from '../services/dynamic-table.service';
6
6
  import { PageEvent } from '@angular/material/paginator/paginator';
7
+ import { EvaluatedString } from '../../../../shared';
7
8
  import * as i0 from "@angular/core";
8
9
  /**
9
10
  * this component is an additional layer that uses [Table Component]{@link TableComponent} internally,
@@ -120,6 +121,9 @@ export declare class DynamicTableComponent implements OnInit, OnDestroy {
120
121
  method: 'POST' | 'GET';
121
122
  };
122
123
  format: string;
124
+ requestActions?: {
125
+ beforeSubmit?: EvaluatedString<'payload'>;
126
+ };
123
127
  rows: any[];
124
128
  totalRecords: number;
125
129
  myDataSubscription: Subscription;
@@ -144,5 +148,5 @@ export declare class DynamicTableComponent implements OnInit, OnDestroy {
144
148
  paginationChange(event: any): void;
145
149
  onChangePageSize(pageSize: number): void;
146
150
  static ɵfac: i0.ɵɵFactoryDeclaration<DynamicTableComponent, never>;
147
- static ɵcmp: i0.ɵɵComponentDeclaration<DynamicTableComponent, "cts-dynamic-table", never, { "columns": "columns"; "responsiveColumns": "responsiveColumns"; "entityType": "entityType"; "prefix": "prefix"; "headers": "headers"; "fields": "fields"; "pageProvider": "pageProvider"; "pageSize": "pageSize"; "isLegacyMode": "isLegacyMode"; "showTotalRecord": "showTotalRecord"; "pageNumber": "pageNumber"; "sortingBy": "sortingBy"; "queryParam": "queryParam"; "customFilters": "customFilters"; "quickFilter": "quickFilter"; "report": "report"; "rowCursor": "rowCursor"; "fullWidth": "fullWidth"; "tableMode": "tableMode"; "componentName": "componentName"; "tableActions": "tableActions"; "defultSort": "defultSort"; "range": "range"; "isSearchPage": "isSearchPage"; "multiSelectRows": "multiSelectRows"; "customFirstRow": "customFirstRow"; "highlightSelectedCard": "highlightSelectedCard"; "showActionsAsMenu": "showActionsAsMenu"; "filterParams": "filterParams"; "skipAggregation": "skipAggregation"; "customUrl": "customUrl"; "format": "format"; "pageSizes": "pageSizes"; }, { "onRowSelected": "onRowSelected"; "onRowIndexSelected": "onRowIndexSelected"; "actionOnRow": "actionOnRow"; "onGettingData": "onGettingData"; "onMultiRowSelected": "onMultiRowSelected"; "onLoading": "onLoading"; "sortChanged": "sortChanged"; "onPageChange": "onPageChange"; "onPage": "onPage"; "onLoad": "onLoad"; "onInitialize": "onInitialize"; }, ["emptyTemplate"], never>;
151
+ static ɵcmp: i0.ɵɵComponentDeclaration<DynamicTableComponent, "cts-dynamic-table", never, { "columns": "columns"; "responsiveColumns": "responsiveColumns"; "entityType": "entityType"; "prefix": "prefix"; "headers": "headers"; "fields": "fields"; "pageProvider": "pageProvider"; "pageSize": "pageSize"; "isLegacyMode": "isLegacyMode"; "showTotalRecord": "showTotalRecord"; "pageNumber": "pageNumber"; "sortingBy": "sortingBy"; "queryParam": "queryParam"; "customFilters": "customFilters"; "quickFilter": "quickFilter"; "report": "report"; "rowCursor": "rowCursor"; "fullWidth": "fullWidth"; "tableMode": "tableMode"; "componentName": "componentName"; "tableActions": "tableActions"; "defultSort": "defultSort"; "range": "range"; "isSearchPage": "isSearchPage"; "multiSelectRows": "multiSelectRows"; "customFirstRow": "customFirstRow"; "highlightSelectedCard": "highlightSelectedCard"; "showActionsAsMenu": "showActionsAsMenu"; "filterParams": "filterParams"; "skipAggregation": "skipAggregation"; "customUrl": "customUrl"; "format": "format"; "requestActions": "requestActions"; "pageSizes": "pageSizes"; }, { "onRowSelected": "onRowSelected"; "onRowIndexSelected": "onRowIndexSelected"; "actionOnRow": "actionOnRow"; "onGettingData": "onGettingData"; "onMultiRowSelected": "onMultiRowSelected"; "onLoading": "onLoading"; "sortChanged": "sortChanged"; "onPageChange": "onPageChange"; "onPage": "onPage"; "onLoad": "onLoad"; "onInitialize": "onInitialize"; }, ["emptyTemplate"], never>;
148
152
  }
@@ -1,6 +1,7 @@
1
1
  import { TableColumnAction, TableColumnConfig } from './table-column';
2
2
  import { NdfTableOptions } from './table-options';
3
3
  import { TableDefaultSortModel, TablePaginationOptions, TableSortingArray, TableSortOptions, TableTab } from './types';
4
+ import { EvaluatedString } from '../../../../shared';
4
5
  /**
5
6
  * Configuration type for the NDF Table component.
6
7
  * Extends `TablePaginationOptions` and provides additional properties
@@ -27,6 +28,10 @@ export declare type NdfTableConfig = TablePaginationOptions & {
27
28
  payload?: Record<string, any>;
28
29
  predicateKey?: string;
29
30
  };
31
+ requestActions?: {
32
+ /** Action to be executed before submitting the request. */
33
+ beforeSubmit?: EvaluatedString<'payload'>;
34
+ };
30
35
  /** Quick filter identifier for the table. */
31
36
  quickFilters?: string;
32
37
  /** Configuration for table columns. */
@@ -13,4 +13,6 @@ export declare type TemplateSettings = {
13
13
  escape: RegExp;
14
14
  };
15
15
  export declare type InterpolateString = `${string}{{${string | number}}}${string}`;
16
- export declare type EvaluatedString<VAR extends string = string> = `${VAR}=${string | number}`;
16
+ export declare type EvaluatedString<VAR extends string = string> = `${string}${VAR}${Whitespace}=${Whitespace}${string}`;
17
+ declare type Whitespace = '' | ' ' | `${any}`;
18
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxeo-development-framework",
3
- "version": "5.4.4",
3
+ "version": "5.4.6",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "12.2.3",
6
6
  "@angular/common": "12.2.3",
@@ -1,6 +1,5 @@
1
1
  ---
2
2
 
3
-
4
3
  # `NdfTableConfig`
5
4
  Configuration type for the NDF Table component. Extends `TablePaginationOptions` and provides additional properties for customizing table behavior, appearance, and data handling.
6
5
 
@@ -578,7 +577,7 @@ type AggregationFieldConfig = BaseFieldConfig & {
578
577
  dataTransformer?: string;
579
578
  sendMode: FieldSendModeType;
580
579
  tooltip?: AggregationTooltipType;
581
- condition?:InterpolateString;
580
+ condition?:EvaluatedString;
582
581
  render:
583
582
  | CheckboxOptions
584
583
  | SwitchOptions
@@ -598,10 +597,10 @@ type AggregationFieldConfig = BaseFieldConfig & {
598
597
  | `propertyPath` | `string` | ❌ | Path to the property used in aggregation (if different from `fieldKey`). |
599
598
  | `bindLabel` | `{ ar: string; en: string }` | ❌ | Property name to use as Label |
600
599
  | `bindValue` | `string` | ❌ | Property name to use as the value |
601
- | `dataTransformer` | `string` | ❌ | Optional name of a transformer function to apply on the aggregation data. |
600
+ | `dataTransformer` | `string` | ❌ | Optional name of a transformer function to apply to the aggregation data. This function must be registered with the `NdfTransformService` in the core or app module.` |
602
601
  | `sendMode` | `FieldSendModeType` | ✅ | Defines how the selected value should be sent in the request (e.g., `payload`, `queryParam` , `custom`). |
603
602
  | `tooltip` | `AggregationTooltipType` | ❌ | Tooltip text or configuration to display additional info for the field. |
604
- | `condition` | `InterpolateString` | ❌ | Assign a `boolean` value (`true` or `false`) to the `show` variable based on a custom condition using the provided `language`, `user`, and `aggregations`, in order to determine whether the field should be shown or hidden. |
603
+ | `condition` | `EvaluatedString` | ❌ | Assign a `boolean` value (`true` or `false`) to the `show` variable based on a custom condition using the provided `language`, `user`, and `aggregations`, in order to determine whether the field should be shown or hidden. |
605
604
  | `render` | `CheckboxOptions \| SwitchOptions \| RadioOptions \| DropdownOptions \| AutocompleteOptions \| CustomOptions \| DateListOptions` | ✅ | Specifies how the field will be rendered in the UI. |
606
605
  | | | | |
607
606
  #### Example
@@ -1255,7 +1254,7 @@ type SearchConfig = {
1255
1254
              method?: 'get' | 'post';
1256
1255
              url: string;
1257
1256
              operator?: ComparisonOperator;
1258
-             template?: InterpolateString;
1257
+             template?: EvaluatedString;
1259
1258
              params?: Record<StringOrNumber, StringOrNumber>;
1260
1259
              headers?: Record<StringOrNumber, StringOrNumber>;
1261
1260
          };