nuxeo-development-framework 5.3.3 → 5.3.4

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 (120) hide show
  1. package/bundles/nuxeo-development-framework.umd.js +2674 -289
  2. package/bundles/nuxeo-development-framework.umd.js.map +1 -1
  3. package/esm2015/lib/components/ndf-config-editor/components/config-editor-actions/config-editor-actions.component.js +35 -0
  4. package/esm2015/lib/components/ndf-config-editor/components/editor-mode-switch.component.js +43 -0
  5. package/esm2015/lib/components/ndf-config-editor/components/index.js +4 -0
  6. package/esm2015/lib/components/ndf-config-editor/components/info-dialog/info-dialog.component.js +27 -0
  7. package/esm2015/lib/components/ndf-config-editor/config.token.js +3 -0
  8. package/esm2015/lib/components/ndf-config-editor/constants/index.js +4 -0
  9. package/esm2015/lib/components/ndf-config-editor/constants/mode.js +5 -0
  10. package/esm2015/lib/components/ndf-config-editor/constants/query.js +5 -0
  11. package/esm2015/lib/components/ndf-config-editor/constants/type.js +5 -0
  12. package/esm2015/lib/components/ndf-config-editor/containers/config-preview/config-preview.component.js +28 -0
  13. package/esm2015/lib/components/ndf-config-editor/containers/editor-settings/editor-settings.component.js +73 -0
  14. package/esm2015/lib/components/ndf-config-editor/containers/index.js +5 -0
  15. package/esm2015/lib/components/ndf-config-editor/containers/monaco-editor.component.js +195 -0
  16. package/esm2015/lib/components/ndf-config-editor/containers/ndf-config-editor/ndf-config-editor.component.js +133 -0
  17. package/esm2015/lib/components/ndf-config-editor/index.js +2 -0
  18. package/esm2015/lib/components/ndf-config-editor/models/config.js +2 -0
  19. package/esm2015/lib/components/ndf-config-editor/models/dialog-data.js +2 -0
  20. package/esm2015/lib/components/ndf-config-editor/models/editor-model.js +2 -0
  21. package/esm2015/lib/components/ndf-config-editor/models/index.js +5 -0
  22. package/esm2015/lib/components/ndf-config-editor/models/type-helper.js +2 -0
  23. package/esm2015/lib/components/ndf-config-editor/ndf-config-editor.module.js +118 -0
  24. package/esm2015/lib/components/ndf-config-editor/pipes/index.js +3 -0
  25. package/esm2015/lib/components/ndf-config-editor/pipes/is-valid-json.pipe.js +17 -0
  26. package/esm2015/lib/components/ndf-config-editor/pipes/validate-object.pipe.js +16 -0
  27. package/esm2015/lib/components/ndf-config-editor/public/editor-navigate-button.js +104 -0
  28. package/esm2015/lib/components/ndf-config-editor/public/index.js +2 -0
  29. package/esm2015/lib/components/ndf-config-editor/public-api.js +7 -0
  30. package/esm2015/lib/components/ndf-config-editor/services/data-access.service.js +26 -0
  31. package/esm2015/lib/components/ndf-config-editor/services/data-store.service.js +52 -0
  32. package/esm2015/lib/components/ndf-config-editor/services/dummy-data.js +1321 -0
  33. package/esm2015/lib/components/ndf-config-editor/services/index.js +4 -0
  34. package/esm2015/lib/components/ndf-config-editor/services/monaco.loader.service.js +51 -0
  35. package/esm2015/lib/components/ndf-config-editor/utility/index.js +2 -0
  36. package/esm2015/lib/components/ndf-config-editor/utility/json.js +10 -0
  37. package/esm2015/lib/components/reports/index.js +3 -0
  38. package/esm2015/lib/components/reports/ndf-reports/containers/ndf-reports/ndf-reports.component.js +19 -12
  39. package/esm2015/lib/components/reports/ndf-reports/ndf-reports.module.js +14 -5
  40. package/esm2015/lib/components/reports/ndf-reports/services/chart-data-transformers.service.js +15 -1
  41. package/esm2015/lib/components/reports/ndf-reports/services/chart-plugins-registry.service.js +9 -1
  42. package/esm2015/lib/components/spell-checker-field/spell-checker-field.module.js +1 -1
  43. package/esm2015/lib/components/tables/ndf-table/containers/ndf-table/ndf-table.component.js +20 -14
  44. package/esm2015/lib/components/tables/ndf-table/directives/index.js +1 -2
  45. package/esm2015/lib/components/tables/ndf-table/models/table-config.js +1 -1
  46. package/esm2015/lib/components/tables/ndf-table/ndf-table.module.js +15 -7
  47. package/esm2015/lib/core/services/extension/component-register.service.js +4 -1
  48. package/esm2015/lib/core/tokens/index.js +2 -0
  49. package/esm2015/lib/core/tokens/project.token.js +3 -0
  50. package/esm2015/lib/directive/permissions/evaluators.service.js +20 -18
  51. package/esm2015/lib/shared/directives/copy-to-clipboard.directive.js +41 -0
  52. package/esm2015/lib/shared/directives/element-height.directive.js +80 -0
  53. package/esm2015/lib/shared/directives/fluid-height.directive.js +115 -0
  54. package/esm2015/lib/shared/directives/index.js +4 -0
  55. package/esm2015/lib/shared/index.js +6 -0
  56. package/esm2015/lib/shared/libraryShared.module.js +35 -10
  57. package/esm2015/lib/shared/models/index.js +2 -1
  58. package/esm2015/lib/shared/models/ndf-request.model.js +2 -0
  59. package/esm2015/public-api.js +4 -1
  60. package/fesm2015/nuxeo-development-framework.js +2528 -190
  61. package/fesm2015/nuxeo-development-framework.js.map +1 -1
  62. package/lib/components/ndf-config-editor/components/config-editor-actions/config-editor-actions.component.d.ts +14 -0
  63. package/lib/components/ndf-config-editor/components/editor-mode-switch.component.d.ts +17 -0
  64. package/lib/components/ndf-config-editor/components/index.d.ts +3 -0
  65. package/lib/components/ndf-config-editor/components/info-dialog/info-dialog.component.d.ts +11 -0
  66. package/lib/components/ndf-config-editor/config.token.d.ts +9 -0
  67. package/lib/components/ndf-config-editor/constants/index.d.ts +3 -0
  68. package/lib/components/ndf-config-editor/constants/mode.d.ts +4 -0
  69. package/lib/components/ndf-config-editor/constants/query.d.ts +4 -0
  70. package/lib/components/ndf-config-editor/constants/type.d.ts +4 -0
  71. package/lib/components/ndf-config-editor/containers/config-preview/config-preview.component.d.ts +15 -0
  72. package/lib/components/ndf-config-editor/containers/editor-settings/editor-settings.component.d.ts +24 -0
  73. package/lib/components/ndf-config-editor/containers/index.d.ts +4 -0
  74. package/lib/components/ndf-config-editor/containers/monaco-editor.component.d.ts +33 -0
  75. package/lib/components/ndf-config-editor/containers/ndf-config-editor/ndf-config-editor.component.d.ts +48 -0
  76. package/lib/components/ndf-config-editor/index.d.ts +1 -0
  77. package/lib/components/ndf-config-editor/models/config.d.ts +24 -0
  78. package/lib/components/ndf-config-editor/models/dialog-data.d.ts +6 -0
  79. package/lib/components/ndf-config-editor/models/editor-model.d.ts +15 -0
  80. package/lib/components/ndf-config-editor/models/index.d.ts +4 -0
  81. package/lib/components/ndf-config-editor/models/type-helper.d.ts +3 -0
  82. package/lib/components/ndf-config-editor/ndf-config-editor.module.d.ts +36 -0
  83. package/lib/components/ndf-config-editor/pipes/index.d.ts +2 -0
  84. package/lib/components/ndf-config-editor/pipes/is-valid-json.pipe.d.ts +7 -0
  85. package/lib/components/ndf-config-editor/pipes/validate-object.pipe.d.ts +7 -0
  86. package/lib/components/ndf-config-editor/public/editor-navigate-button.d.ts +31 -0
  87. package/lib/components/ndf-config-editor/public/index.d.ts +1 -0
  88. package/lib/components/ndf-config-editor/public-api.d.ts +6 -0
  89. package/lib/components/ndf-config-editor/services/data-access.service.d.ts +8 -0
  90. package/lib/components/ndf-config-editor/services/data-store.service.d.ts +24 -0
  91. package/lib/components/ndf-config-editor/services/dummy-data.d.ts +992 -0
  92. package/lib/components/ndf-config-editor/services/index.d.ts +3 -0
  93. package/lib/components/ndf-config-editor/services/monaco.loader.service.d.ts +14 -0
  94. package/lib/components/ndf-config-editor/utility/index.d.ts +1 -0
  95. package/lib/components/ndf-config-editor/utility/json.d.ts +1 -0
  96. package/lib/components/reports/index.d.ts +2 -0
  97. package/lib/components/reports/ndf-reports/containers/ndf-reports/ndf-reports.component.d.ts +6 -3
  98. package/lib/components/reports/ndf-reports/ndf-reports.module.d.ts +4 -2
  99. package/lib/components/reports/ndf-reports/services/chart-data-transformers.service.d.ts +10 -0
  100. package/lib/components/reports/ndf-reports/services/chart-plugins-registry.service.d.ts +6 -0
  101. package/lib/components/tables/ndf-table/containers/ndf-table/ndf-table.component.d.ts +3 -1
  102. package/lib/components/tables/ndf-table/directives/index.d.ts +0 -1
  103. package/lib/components/tables/ndf-table/models/table-config.d.ts +1 -0
  104. package/lib/components/tables/ndf-table/ndf-table.module.d.ts +4 -2
  105. package/lib/core/services/extension/component-register.service.d.ts +3 -0
  106. package/lib/core/tokens/index.d.ts +1 -0
  107. package/lib/core/tokens/project.token.d.ts +2 -0
  108. package/lib/directive/permissions/evaluators.service.d.ts +4 -2
  109. package/lib/shared/directives/copy-to-clipboard.directive.d.ts +15 -0
  110. package/lib/shared/directives/element-height.directive.d.ts +28 -0
  111. package/lib/{components/tables/ndf-table → shared}/directives/fluid-height.directive.d.ts +2 -1
  112. package/lib/shared/directives/index.d.ts +3 -0
  113. package/lib/shared/index.d.ts +5 -0
  114. package/lib/shared/libraryShared.module.d.ts +3 -1
  115. package/lib/shared/models/index.d.ts +1 -0
  116. package/lib/shared/models/ndf-request.model.d.ts +7 -0
  117. package/package.json +4 -2
  118. package/public-api.d.ts +3 -0
  119. package/src/docs/ndf-table.doc.md +1433 -0
  120. package/esm2015/lib/components/tables/ndf-table/directives/fluid-height.directive.js +0 -112
@@ -0,0 +1,1433 @@
1
+ ---
2
+ ModifiedDate: 2025-05-07 10:53
3
+ CreatedDate: 2025-05-06 11:27
4
+ ---
5
+
6
+ # `NdfTableConfig`
7
+ Configuration type for the NDF Table component. Extends `TablePaginationOptions` and provides additional properties for customizing table behavior, appearance, and data handling.
8
+
9
+ ```ts
10
+ type NdfTableConfig = TablePaginationOptions & {
11
+ isDataProvided?: boolean;
12
+ options?: NdfTableOptions;
13
+ scrollbarH?: boolean;
14
+ columnMode?: 'flex' | 'fixed' | 'force';
15
+ pageProvider: string;
16
+ fields: Record<string, string>;
17
+ customUrl?: { url: string; method: 'POST' | 'GET'; payload?: Record<string, any>; predicateKey?: string };
18
+ quickFilters?: string;
19
+ columns: TableColumnConfig[];
20
+ columnsWithDynamicVisibiltiy?: string[];
21
+ columnsWithDynamicDisplay?: string[];
22
+ filtersWithDynamicDisplay?: string[];
23
+ responsiveColumns?: TableColumnConfig[];
24
+ fullWidth?: string;
25
+ prefix?: string;
26
+ sortingBy?: TableSortOptions;
27
+ defaultSort?: TableDefaultSortModel;
28
+ headers?: Record<string, any>;
29
+ queryParam?: Record<string, any>;
30
+ tableActions?: TableColumnAction[];
31
+ highlightSelectedCard?: boolean;
32
+ tabs?: TableTab[];
33
+ sortingArray?: TableSortingArray[];
34
+ skipAggregation?: 'never' | 'onPageChange';
35
+ range?: any;
36
+ isSearchPage?: any;
37
+ multiSelectRows?: boolean;
38
+ customFirstRow?: boolean;
39
+ showActionsAsMenu?: boolean;
40
+ filterParams?: Record<string, any>;
41
+ format?: string;
42
+ pageSizes?: { label: string; size: number }[];
43
+ };
44
+ ```
45
+
46
+ ---
47
+
48
+ # Table options : `NdfTableOptions` Interface
49
+
50
+ The `NdfTableOptions` interface is used to configure table components in the application. Below is a detailed description of its properties along with JSON examples for all possible values.
51
+
52
+ ```ts
53
+ export type NdfTableOptions = {
54
+ filters: FiltersConfig;
55
+ search?: GlobalSearchConfig;
56
+ sortList?: TranslateKey[];
57
+ tableMode?: TableModeConfig;
58
+ export?: TableExportConfig;
59
+ columns?: {
60
+ toggle?: boolean;
61
+ sortable?: TableSortConfig;
62
+ };
63
+
64
+ };
65
+ ```
66
+
67
+ ---
68
+
69
+ ## 1 - `search` (optional)
70
+ - **Type**: `GlobalSearchConfig`  
71
+ - **Purpose**: Configures a global search input with behavior, UI labels, filtering logic, and optional contextual dialogs.
72
+ ---
73
+ ### Type Definition: `GlobalSearchConfig`
74
+
75
+
76
+ ```ts
77
+ export type GlobalSearchConfig = {
78
+   fieldKey: string;
79
+   label?: string;
80
+   placeholder?: string;
81
+   operator?: ComparisonOperator; // see COMPARISON_OPERATOR
82
+   searchMode: 'realTime' | 'triggered';
83
+   debounceTime?: number;
84
+   searchButtonLabel?: string;
85
+   suffix?: {
86
+     dialog?: HtmlDialogConfig;
87
+   };
88
+ };
89
+ ```
90
+
91
+ ### Property Descriptions
92
+
93
+ | Property | Type | Required | Description |
94
+ |---------------------|-------------------------------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
95
+ | `fieldKey` | `string` | ✅ | The target field to apply the search against. |
96
+ | `label` | `string` | ❌ | Display label for the search input (e.g., above or beside it). |
97
+ | `placeholder` | `string` | ❌ | Text displayed inside the input field as a prompt. |
98
+ | `operator` | `ComparisonOperator` | ❌ | Logic for comparison. Supported values include: `=`, `!=`, `<`, `>`, `<=`, `>=`, `IN`, `NOT IN`, `BETWEEN`, `LIKE`, `ILIKE`, `NOT LIKE`, `NOT ILIKE`, `STARTSWITH`, `FULLTEXT` |
99
+ | `searchMode` | `'realTime'` \| `'triggered'` | ✅ | Controls how and when the search is executed: • `realTime`: Fires on user input with optional debounce. • `triggered`: Fires only on explicit user action (e.g., button click). |
100
+ | `debounceTime` | `number` | ❌ | Delay in milliseconds for real-time searches. Only applicable when `searchMode` is `'realTime'`. |
101
+ | `searchButtonLabel` | `string` | ❌ | Custom text for the search button (used in `'triggered'` mode). |
102
+ | `suffix.dialog` | `HtmlDialogConfig` | ❌ | Adds a supplementary dialog for user guidance or advanced options. |
103
+
104
+ ---
105
+ ###### HtmlDialogConfig
106
+
107
+ ```ts
108
+ type HtmlDialogConfig = {
109
+   content: string[];
110
+   title?: string;
111
+   options?: Partial<MatDialogConfig>;
112
+ };
113
+
114
+ ```
115
+
116
+ **Property Descriptions**
117
+
118
+ | Property | Type | Required | Description |
119
+ |-----------|----------------------------|----------|-------------------------------------------------------------------------|
120
+ | `title` | `string` | ❌ | Dialog title shown at the top of the popup. |
121
+ | `content` | `string[]` | ✅ | List of ##translate keys## or raw content to display inside the dialog. |
122
+ | `options` | `Partial<MatDialogConfig>` | ❌ | Optional Angular Material dialog configuration overrides. |
123
+
124
+ ### Examples
125
+
126
+
127
+ ```yaml
128
+ // Real-Time Search with Help Dialog
129
+ // any text between ##..## will be translated
130
+ {
131
+   "fieldKey": "ecm:fulltext",
132
+   "label": "Search Name",
133
+   "placeholder": "Enter a name...",
134
+   "operator": "ILIKE",
135
+   "searchMode": "realTime",
136
+   "debounceTime": 300,
137
+   "suffix": {
138
+     "dialog": {
139
+       "title": "INFO.dialogTitle",
140
+       "content": [
141
+       "not translated text",
142
+         "##INFO.query_sequence##",
143
+         "##INFO.query_and##",
144
+         "##INFO.query_negation##",
145
+         "##INFO.query_prefix##",
146
+         "##INFO.query_historical##",
147
+         "##INFO.query_or##",
148
+       ]
149
+     }
150
+   }
151
+ }
152
+
153
+ //Triggered Search with Button
154
+ {
155
+   "fieldKey": "ecm:fulltext",
156
+   "label": "Search",
157
+   "placeholder": "search ...",
158
+   "operator": "=",
159
+   "searchMode": "triggered",
160
+   "searchButtonLabel": "Find"
161
+ }
162
+
163
+ ```
164
+
165
+
166
+
167
+ ---
168
+ ---
169
+ ## 2 -`sortList` (optional)
170
+
171
+ - **Type**: `TranslateKey[]`
172
+ - **Description**: List of sorting configurations for the table.
173
+ ---
174
+ ### Type Definition: `TranslateKey`
175
+
176
+ ```ts
177
+ export type TranslateKey = {
178
+ key: TranslatedKey;
179
+ value: string;
180
+ direction: 'asc' | 'desc';
181
+ selected?: boolean;
182
+ };
183
+ ```
184
+ ### Property Descriptions
185
+
186
+ | Property | Type | Required | Description |
187
+ |-------------|---------------------|----------|-------------------------------------------------------|
188
+ | `key` | `TranslatedKey` | ✅ | The display label key for internationalization. |
189
+ | `value` | `string` | ✅ | The field in the dataset to apply the sorting on. |
190
+ | `direction` | `'asc'` \| `'desc'` | ✅ | Sort direction: ascending or descending. |
191
+ | `selected` | `boolean` | ❌ | Indicates if this sort option is selected by default. |
192
+ ### Example
193
+
194
+ ```json
195
+ [
196
+ {
197
+ "key": "SORT.name",
198
+ "value": "name",
199
+ "direction": "asc",
200
+ "selected": true
201
+ },
202
+ {
203
+ "key": "SORT.date",
204
+ "value": "createdAt",
205
+ "direction": "desc"
206
+ }
207
+ ]
208
+ ```
209
+
210
+
211
+
212
+ ---
213
+ ---
214
+
215
+ ## 3- `tableMode` (optional)
216
+
217
+ - **Type**: `TableModeConfig`
218
+ - **Description**: Configuration for handling different `CTS table` display modes. Supports toggling between multiple predefined views such as list, card, dynamicCard, or a custom component view.
219
+ ### Type Definition: `TableModeConfig
220
+ `
221
+ ```ts
222
+ type TableViewMode = 'dynamicCard' | 'list' | 'card' | 'custom';
223
+
224
+ type TableToggleItem = {
225
+ key?: TranslatedKey;
226
+ value: TableViewMode;
227
+ icon: string;
228
+ };
229
+
230
+ type TableModeList = TableToggleItem[];
231
+
232
+ type BaseTableModel = {
233
+ toggleMode?: boolean;
234
+ availableMode?: TableModeList;
235
+ };
236
+
237
+ type StandardTableMode = BaseTableModel & {
238
+ mode?: Exclude<TableViewMode, 'custom'>;
239
+ };
240
+
241
+ type CustomTableMode = BaseTableModel & {
242
+ mode: 'custom';
243
+ componentName: string;
244
+ };
245
+
246
+ type TableModeConfig = StandardTableMode | CustomTableMode;
247
+
248
+ ```
249
+
250
+ ### Property Descriptions
251
+
252
+ | Property | Type | Required | Default | Description |
253
+ |-----------------|-------------------------------------------------------|---------------------------|---------|---------------------------------------------------------------------------------------------------|
254
+ | `mode` | `'list'` \| `'card'` \| `'dynamicCard'` \| `'custom'` | ❌ | | Defines the current table view mode. If `mode` is `'custom'`, a `componentName` must be provided. |
255
+ | `toggleMode` | `boolean` | ❌ | `false` | Enables or disables toggling between multiple view modes. |
256
+ | `availableMode` | `TableModeList` | ❌ | | List of available view modes and their icons for use in toggle controls. |
257
+ | `componentName` | `string` | ✅ (if mode is `'custom'`) | | Name of the custom Angular component to render in custom mode. |
258
+ > [!note] NOTE
259
+ When using `mode: 'custom'`, the specified component in `componentName` **must extend `BaseCustomComponent`** to ensure compatibility with the dynamic rendering system.
260
+
261
+
262
+ ### Example Toggle Between List and Custom View
263
+
264
+ ```yaml
265
+ {
266
+ "mode": "list",
267
+ "componentName": "rms.components.advancedSearchCard", //Required for the custom mode inside availableMode list
268
+ "toggleMode": true,
269
+ "availableMode": [
270
+ { "key" : "GOLBAL.list",
271
+ "value": "list",
272
+ "icon": "table_rows"
273
+ },
274
+ { "value": "custom",
275
+ "icon": "rectangle"
276
+ }
277
+ ]}
278
+ ```
279
+
280
+ *Example* Custom Component Mode
281
+ ```json
282
+ {
283
+ "mode": "custom",
284
+ "componentName": "rms.components.requestCard"
285
+ }
286
+ ```
287
+
288
+
289
+
290
+ ## 4- `export` (optional)
291
+
292
+ - **Type**: `TableExportConfig`
293
+ - **Description**: Configures the functionality for exporting table data. This includes settings for enabling or disabling the export feature, specifying the export formats, defining the fields to be exported, and customizing the request parameters for fetching the data.
294
+ ### Type Definition: `TableExportConfig`
295
+
296
+ ```ts
297
+ export type TableExportConfig = {
298
+ enabled: boolean;
299
+ request: NdfRequestConfig; //common type
300
+ docTypeName: 'task' | 'request' | 'record';
301
+ defaultType: 'excel' | 'docx' | 'pdf';
302
+ allowedTypes?: LabelValue<string, 'excel' | 'docx' | 'pdf'>[]; //common type
303
+ fields?: string[];
304
+ locale?: string;
305
+ };
306
+ ```
307
+
308
+ ### Property Descriptions
309
+
310
+ | Property | Type | Required | Description |
311
+ |----------------|----------------------------------------------------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
312
+ | `enabled` | `boolean` | ✅ | Enables or disables the export feature. |
313
+ | `request` | `NdfRequestConfig` | ✅ | Configuration for making the export HTTP request. |
314
+ | `docTypeName` | `'task'` \| `'request'` \| `'record'` | ✅ | Specifies the type of document being exported. |
315
+ | `defaultType` | `'excel'` \| `'docx'` \| `'pdf'` | ✅ | Sets the default export format. |
316
+ | `allowedTypes` | `LabelValue<string, 'excel' \| 'docx' \| 'pdf'>[]` | ❌ | List of allowed export types with labels for UI. |
317
+ | `fields` | `string[]` | ❌ | List of fields or columns to include in the export. If not provided, it will be derived from the `headerClass` property of the columns.(e.g., `["dc:title"]` ) |
318
+ | `locale` | `string` | ❌ | Locale code for language-specific formatting (e.g., `'en'`, `'ar'`). |
319
+ ### Example
320
+
321
+ ```yaml
322
+ {
323
+ "enabled": true,
324
+ "request": {
325
+ "method": "post",
326
+ url: '/custom-search/pp/PP_RPT_Expected_TransferArchive_Records/report',
327
+ },
328
+ "docTypeName": "record",
329
+ "defaultType": "excel",
330
+ "allowedTypes": [
331
+ [
332
+ {
333
+ "value": "pdf",
334
+ "label": "TABLE.EXPORT.PDF"
335
+ },
336
+ {
337
+ "value": "excel",
338
+ "label": "TABLE.EXPORT.EXCEL"
339
+ },
340
+ {
341
+ "value": "docx",
342
+ "label": "TABLE.EXPORT.WORD"
343
+ }
344
+ ]
345
+ ],
346
+ "locale": "en",
347
+ }
348
+
349
+ ```
350
+
351
+
352
+
353
+
354
+
355
+ ---
356
+ ---
357
+
358
+ ## 5- `columns` (optional)
359
+
360
+ - **Type**: `{ toggle?: boolean; sortable?: TableSortConfig; }`
361
+ - **Description**: Configuration for controlling the visibility and ordering of table columns. This includes enabling column visibility toggles and defining the column order based on sorting preferences
362
+
363
+ ### Type Definition
364
+
365
+ ```ts
366
+ type columns = {
367
+     toggle?: boolean;
368
+     sortable?: TableSortConfig; //common type for column ordering configuration
369
+   };
370
+ ```
371
+
372
+ ### Property Descriptions
373
+
374
+ | Property | Type | Required | Description |
375
+ |------------|-------------------|----------|------------------------------------------------------------------------------------------------------|
376
+ | `toggle` | `boolean` | ❌ | Enables or disables the toggle visibility functionality for columns. |
377
+ | `sortable` | `TableSortConfig` | ❌ | Configuration for specifying the column order (sorting) and options to control the order of columns. |
378
+ ### Example
379
+
380
+ ```yaml
381
+ {
382
+ "toggle": true,
383
+ "sortable": {
384
+ "enabled": true,
385
+ "frozenColumns": [
386
+ "OPTIONS"
387
+ ]
388
+ }}
389
+ ```
390
+
391
+
392
+
393
+
394
+ ---
395
+ ---
396
+
397
+ ## 6- `Filters`
398
+
399
+ - **Type**: `FiltersConfig`
400
+ - **Description**: Configuration for table filters.
401
+
402
+ ### Type Definition: `FiltersConfig`
403
+
404
+ ```ts
405
+ export type FilterMode =
406
+ | { mode: 'payload' }
407
+ | {
408
+ mode: 'params';
409
+ stringifyParams: boolean;
410
+ };
411
+
412
+ export type FilterReloadConfig =
413
+ | { strategy: 'always' }
414
+ | { strategy: 'never' }
415
+ | { strategy: 'onChange'; triggerFields: string[] };
416
+
417
+ type FiltersConfig = FilterMode & {
418
+ reload?: FilterReloadConfig;
419
+ fields: FieldConfigModel[];
420
+ panel?: {
421
+ visible?: boolean;
422
+ toggleButton?: boolean;
423
+ };
424
+ };
425
+ ```
426
+
427
+ ### Property Descriptions
428
+
429
+ | Property | Type | Required | Default | Description |
430
+ |----------------------|---------------------------|---------------------------|----------|-------------------------------------------------------------------------------------------------------------------------|
431
+ | `mode` | `'payload'` \| `'params'` | ✅ | `params` | Defines how filter data is sent. `payload` sends data in the request body. `params` sends data as URL query parameters. |
432
+ | `stringifyParams` | `boolean` | ✅ (if mode is `'params'`) | `false` | If `true`, parameters will be stringified when sent as query parameters. Only used when `mode` is `'params'`. |
433
+ | `reload` | `FilterReloadConfig` | ❌ | | Determines when the filters should trigger a fields reload. |
434
+ | `fields` | `FieldConfigModel[]` | ✅ | | List of filter fields to render in the filter UI. |
435
+ | `panel.visible` | `boolean` | ❌ | `true` | Controls whether the filter panel is visible by default. |
436
+ | `panel.toggleButton` | `boolean` | ❌ | `true` | If `true`, shows a toggle button to show/hide the filter panel. |
437
+ | | | | | |
438
+ #### Reload Strategies
439
+
440
+ | Strategy | Description |
441
+ |------------|------------------------------------------------------------------------------------------------------------------------------------------------|
442
+ | `always` | The Filters Panel reloads Fields (e.g., aggregations) **every time** filters are applied or changed, regardless of what fields were modified. |
443
+ | `never` | Disables automatic reloads filters after initialized. **Reload only if the config is changed** |
444
+ | `onChange` | Reloads filters **only if specific filter fields** (defined in `triggerFields`) have changed between the previous and current filter states. |
445
+
446
+ **Examples**
447
+
448
+ ```json
449
+ {
450
+ "mode": "params",
451
+ "stringifyParams": true,
452
+ "reload": {
453
+ "strategy": "always"
454
+ },
455
+ "panel": {
456
+ "visible": true,
457
+ "toggleButton": true
458
+ }
459
+ }
460
+ ```
461
+
462
+ Example :`onChange` Strategy
463
+
464
+ ```yaml
465
+ {
466
+ "mode": "params",
467
+ "stringifyParams": true,
468
+ "reload": {
469
+ "strategy": "onChange",
470
+ "triggerFields" : [""]
471
+ },
472
+ "panel": {
473
+ "visible": true,
474
+ "toggleButton": true
475
+ }
476
+ }
477
+
478
+ ```
479
+
480
+
481
+
482
+ ---
483
+ ---
484
+
485
+ ## FILTER FIELDS
486
+ - **Type**: `FieldConfigModel`
487
+ - **Description**: Defines the structure and behavior of individual fields used in the table filters. Each field can be one of the following types: `aggregation`, `predicate`, or `custom`.
488
+ ### Type Definition: `FieldConfigModel`
489
+
490
+ ```ts
491
+ type FieldConfigModel =
492
+ | { type: 'aggregation'; config: AggregationFieldConfig; }
493
+ | { type: 'predicate'; config: PredicateFieldConfig; }
494
+ | { type: 'custom'; config: CustomFieldConfig; };
495
+
496
+ ```
497
+
498
+ ### Property Descriptions
499
+
500
+ | Property | Type | Required | Applies To | Description |
501
+ |----------|---------------------------------------------------------------------------|----------|------------|--------------------------------------------------|
502
+ | `type` | `'aggregation'` \| `'predicate'` \| `'custom'` | ✅ | All | Specifies the type of filter field. |
503
+ | `config` | `AggregationFieldConfig` \| `PredicateFieldConfig` \| `CustomFieldConfig` | ✅ | All | Configuration object specific to the field type. |
504
+ #### `BaseFieldConfig` *(shared across all configs)*
505
+
506
+ | Property | Type | Required | Default | Description |
507
+ |--------------|---------------------------------|----------|---------------|-----------------------------------------------------------------------|
508
+ | `label` | `TranslateKey` | ✅ | | Field label used for internationalization. |
509
+ | `fieldKey` | `string` | ✅ | | Unique identifier for the field; used for data binding and filtering. |
510
+ | `values` | `unknown` | ❌ | | Static values or data set used for the filter, if applicable. |
511
+ | `prefix` | `string` | ❌ | | Optional prefix used for values translations |
512
+ | `order` | `number` | ❌ | 0 | Determines the field's display order in the filter UI. |
513
+ | `operator` | `ComparisonOperator` | ❌ | | Operator used for filtering (e.g., `EQ`, `IN`). |
514
+ | `valueType` | `'valueObject'` \| `'property'` | ✅ | `valueObject` | Defines how values are interpreted in the filter context. |
515
+ | `visible` | `boolean` | ❌ | | Controls whether the field is visible in the UI. |
516
+ | `roles` | `string[]` | ❌ | | List of roles required to view/use the field. |
517
+ | `permission` | `string` | ❌ | | Specific permission required to access the field. |
518
+
519
+ ### Predicate Field Config
520
+
521
+ ```ts
522
+ type PredicateFieldConfig =
523
+ BaseFieldConfig & {
524
+ sendMode: Exclude<FieldSendModeType, 'custom'>;
525
+ render: InputOptions | DateInputOptions;
526
+ }
527
+ ```
528
+
529
+ #### Property Descriptions
530
+
531
+ | Property | Type | Required | Description |
532
+ |------------|----------------------------------------|----------|-----------------------------------------------------------------------------------------------------|
533
+ | `sendMode` | `Exclude<FieldSendModeType, 'custom'>` | ✅ | Specifies how the field value should be sent (e.g., `payload`, `queryParam`), excluding `'custom'`. |
534
+ | `render` | `InputOptions` \| `DateInputOptions` | ✅ | Defines how the input should be displayed and interacted with in the UI. |
535
+ #### Example
536
+
537
+ ```yaml
538
+ [
539
+ {
540
+ "type": "predicate",
541
+ "config": {
542
+ "label": "FILTERS.tags",
543
+ "fieldKey": "ecm:tag",
544
+ "sendMode": "payload",
545
+ "valueType": "valueObject",
546
+ "permission": "hasRoleOnArchiveOrLoan",
547
+ "render": {
548
+ // render config here
549
+ }
550
+ }
551
+ },
552
+ {
553
+ "type": "predicate",
554
+ "config": {
555
+ "label": "FILTERS.tags",
556
+ "fieldKey": "ecm:tag",
557
+ "order": 0,
558
+ "sendMode": "queryParam",
559
+ "valueType": "property",
560
+ "prefix": "search.buckets.",
561
+ "render": {
562
+ // render config here
563
+ }
564
+ }
565
+ }
566
+ ]
567
+
568
+ ```
569
+
570
+
571
+ ---
572
+ ---
573
+
574
+ ### Aggregation Field Config
575
+
576
+ ```ts
577
+ type AggregationFieldConfig = BaseFieldConfig & {
578
+ aggregation: string;
579
+ propertyPath?: string;
580
+ bindLabel?: { ar: string; en: string };
581
+ bindValue?: string;
582
+ dataTransformer?: string;
583
+ sendMode: FieldSendModeType;
584
+ tooltip?: AggregationTooltipType;
585
+ render:
586
+ | CheckboxOptions
587
+ | SwitchOptions
588
+ | RadioOptions
589
+ | DropdownOptions
590
+ | AutocompleteOptions
591
+ | CustomOptions
592
+ | DateListOptions;
593
+ }
594
+ ```
595
+
596
+ #### Property Descriptions
597
+
598
+ | Property | Type | Required | Description |
599
+ |-------------------|----------------------------------------------------------------------------------------------------------------------------------|----------|----------------------------------------------------------------------------------------------------------|
600
+ | `aggregation` | `string` | ✅ | The name of the aggregation |
601
+ | `propertyPath` | `string` | ❌ | Path to the property used in aggregation (if different from `fieldKey`). |
602
+ | `bindLabel` | `{ ar: string; en: string }` | ❌ | Property name to use as Label |
603
+ | `bindValue` | `string` | ❌ | Property name to use as the value |
604
+ | `dataTransformer` | `string` | ❌ | Optional name of a transformer function to apply on the aggregation data. |
605
+ | `sendMode` | `FieldSendModeType` | ✅ | Defines how the selected value should be sent in the request (e.g., `payload`, `queryParam` , `custom`). |
606
+ | `tooltip` | `AggregationTooltipType` | ❌ | Tooltip text or configuration to display additional info for the field. |
607
+ | `render` | `CheckboxOptions \| SwitchOptions \| RadioOptions \| DropdownOptions \| AutocompleteOptions \| CustomOptions \| DateListOptions` | ✅ | Specifies how the field will be rendered in the UI. |
608
+ | | | | |
609
+ #### Example
610
+
611
+ ```ts
612
+ [
613
+ {
614
+ "type": "aggregation",
615
+ "config": {
616
+ "label": "FILTERS.priority",
617
+ "aggregation": "generaldocument_importance_agg",
618
+ "fieldKey": "gdoc:importance",
619
+ "prefix": "search.buckets.",
620
+ "sendMode": "queryParam",
621
+ "valueType": "property",
622
+ "render": {
623
+ // render config here
624
+ }
625
+ }
626
+ },
627
+ ]
628
+
629
+ ```
630
+
631
+
632
+ #### Aggregation Tooltip
633
+ **Type**: `AggregationTooltipType`
634
+
635
+ ```ts
636
+ export type AggregationTooltipType = {
637
+ properties: Record<string, any>;
638
+ } & (TooltipPlainText | TooltipLocalizedText | TooltipFormattedDate | TooltipTranslationKey | TooltipTranslatedDate);
639
+
640
+ ```
641
+
642
+ | Property | Type | Required | Description |
643
+ |--------------|-----------------------|----------|-----------------------------------------------------------------------|
644
+ | `properties` | `Record<string, any>` | ✅ | Dynamic object used to resolve tooltip content, such as field values. |
645
+
646
+ 1. Variant: `TooltipPlainText`
647
+ ```ts
648
+ type TooltipPlainText = {
649
+ type: 'text';
650
+ separator?: string;
651
+ };
652
+ ```
653
+
654
+ | Property | Type | Required | Description |
655
+ |-------------|----------|----------|--------------------------------------------------|
656
+ | `type` | `'text'` | ✅ | Defines this variant as plain text. |
657
+ | `separator` | `string` | ❌ | Optional separator used between multiple values. |
658
+
659
+ 2. Variant: `TooltipLocalizedText`
660
+ ```ts
661
+ type TooltipLocalizedText = {
662
+ type: 'localizeValue';
663
+ translateKey: string;
664
+ };
665
+ ```
666
+
667
+ | Property | Type | Required | Description |
668
+ |----------------|-------------------|----------|--------------------------------------------|
669
+ | `type` | `'localizeValue'` | ✅ | Defines this variant as a localized value. |
670
+ | `translateKey` | `string` | ✅ | Key used for localization. |
671
+
672
+ 3. Variant: `TooltipFormattedDate`
673
+ ```ts
674
+ type TooltipFormattedDate = {
675
+ type: 'date';
676
+ format: string;
677
+ separator?: string;
678
+ };
679
+ ```
680
+
681
+ | Property | Type | Required | Description |
682
+ |-------------|----------|----------|---------------------------------------------|
683
+ | `type` | `'date'` | ✅ | Defines this variant as a formatted date. |
684
+ | `format` | `string` | ✅ | Date format string (e.g., `YYYY-MM-DD`). |
685
+ | `separator` | `string` | ❌ | Optional separator for multiple date values |
686
+
687
+ 4. Variant: `TooltipTranslationKey`
688
+ ```ts
689
+ type TooltipTranslationKey = {
690
+ type: 'translate';
691
+ prefix: string;
692
+ separator?: string;
693
+ };
694
+ ```
695
+
696
+ | Property | Type | Required | Description |
697
+ |-------------|---------------|----------|-------------------------------------------------|
698
+ | `type` | `'translate'` | ✅ | Indicates translation via a key with prefix. |
699
+ | `prefix` | `string` | ✅ | Prefix to be appended to the value as a key. |
700
+ | `separator` | `string` | ❌ | Optional separator used when constructing keys. |
701
+
702
+
703
+ 5. Variant: `TooltipTranslatedDate`
704
+ ```ts
705
+ type TooltipTranslatedDate = {
706
+ type: 'translatedDate';
707
+ format: string;
708
+ translateKey: string;
709
+ };
710
+ ```
711
+
712
+ | Property | Type | Required | Description |
713
+ |----------------|--------------------|----------|-------------------------------------------------------|
714
+ | `type` | `'translatedDate'` | ✅ | Defines this variant as a translated, formatted date. |
715
+ | `format` | `string` | ✅ | Date format string. |
716
+ | `translateKey` | `string` | ✅ | Key used to lookup the translated string. |
717
+
718
+ #### Example `tooltip`
719
+
720
+ ```yaml
721
+ [
722
+ {
723
+ "type": "aggregation",
724
+ "config": {
725
+ "label": "FILTERS.priority",
726
+ "aggregation": "generaldocument_importance_agg",
727
+ "fieldKey": "gdoc:importance",
728
+ "prefix": "search.buckets.",
729
+ "sendMode": "queryParam",
730
+ "valueType": "property",
731
+ "tooltip": {
732
+ "type": "date",
733
+ "properties": {
734
+ "from": "from",
735
+ "to": "to"
736
+ }
737
+ },
738
+ "render": {
739
+ // render config here
740
+ }
741
+ }
742
+ },
743
+ ]
744
+ ```
745
+
746
+
747
+ ---
748
+ ---
749
+
750
+
751
+
752
+
753
+ # FIELDS
754
+
755
+ ## Predicate Field Render
756
+ - **Type**: `InputOptions | DateInputOptions`
757
+ - **Description**: Defines how a predicate filter field is rendered in the UI. The render type determines whether the input is a basic text field, a date input, or other supported formats. This controls the user interface element and its behavior for entering filter values.
758
+
759
+ ### Supported Types
760
+ #### *Input*
761
+
762
+ ```ts
763
+ type InputOptions = {
764
+ type: 'input';
765
+ options?: {
766
+ hideLabel?: boolean
767
+ inputType?: 'text' | 'search' | 'url';
768
+ placeholder?: string;
769
+ debounceTime?: number;
770
+ mask?: {
771
+ mask: string;
772
+ shownMaskExpression?: string;
773
+ dropSpecialCharacters?: boolean;
774
+ showMaskTyped?: boolean;
775
+ validation?: boolean;
776
+ allowNegativeNumbers?: boolean;
777
+ keepCharacterPositions?: boolean;
778
+ leadZero?: boolean;
779
+ hiddenInput?: boolean;
780
+ clearIfNotMatch?: boolean;
781
+ prefix?: string;
782
+ suffix?: string;
783
+ };
784
+ suffix?: {
785
+ text?: string;
786
+ dropdown?: {
787
+ selectedValue?: string;
788
+ items: KeyValue<string, string>[];
789
+ };
790
+ tooltip?: string;
791
+ dialog?: HtmlDialogConfig;
792
+ };
793
+ } ;
794
+ };
795
+ ```
796
+
797
+ | Property | Type | Description |
798
+ |--------------------------------|-----------------------------------|------------------------------------------------------------------------|
799
+ | `inputType` | `'text'` \| `'search'` \| `'url'` | Specifies the input field type. Defaults to `'text'`. |
800
+ | `placeholder` | `string` | Placeholder text shown in the input field. |
801
+ | `debounceTime` | `number` | Delay in milliseconds before the input is processed (for performance). |
802
+ | `mask` | `object` (see below) | Input mask settings to constrain input format. |
803
+ | `suffix` | `object` (see below) | Optional interactive element (text, dropdown, tooltip, or dialog). |
804
+ | `hideLabel` (from `HideLabel`) | `boolean` | Determines whether the field label is hidden. |
805
+
806
+ ##### *mask Configuration*
807
+
808
+ | Property | Type | Description |
809
+ |--------------------------|-----------|-------------------------------------------------------------------|
810
+ | `mask` | `string` | Mask pattern for formatting input. |
811
+ | `shownMaskExpression` | `string` | Custom expression to show the mask visually. |
812
+ | `dropSpecialCharacters` | `boolean` | If `true`, removes mask characters from value. |
813
+ | `showMaskTyped` | `boolean` | Shows masked characters while typing. |
814
+ | `validation` | `boolean` | Enables input validation based on mask. |
815
+ | `allowNegativeNumbers` | `boolean` | Allows negative numeric input. |
816
+ | `keepCharacterPositions` | `boolean` | Maintains fixed character positions when editing. |
817
+ | `leadZero` | `boolean` | Allows numbers to start with zero. |
818
+ | `hiddenInput` | `boolean` | Masks the actual input characters (e.g., password-like behavior). |
819
+ | `clearIfNotMatch` | `boolean` | Clears input if it doesn't match the mask. |
820
+ | `prefix` | `string` | Text to show before the input. |
821
+ | `suffix` | `string` | Text to show after the input. |
822
+
823
+ *`suffix` Configuration*
824
+
825
+ | Property | Type | Description |
826
+ |------------|-------------------------------------------------------------------------|--------------------------------------------------------------------|
827
+ | `text` | `string` | ##translated## or text displayed after the input. |
828
+ | `dropdown` | `{ selectedValue?: string; items: KeyValue<TranslatedKey, string>[]; }` | Dropdown menu attached to the suffix. |
829
+ | `tooltip` | `string` | Tooltip shown on hover. |
830
+ | `dialog` | `HtmlDialogConfig` | Adds a supplementary dialog for user guidance or advanced options. |
831
+
832
+ *Example*
833
+
834
+ ```yaml
835
+ [
836
+ //*Example* : Input Field with Dropdown Suffix
837
+ {
838
+ "type": "predicate",
839
+ "config": {
840
+ "render": {
841
+ "type": "input",
842
+ "options": {
843
+ "delay": 300,
844
+ "suffix": {
845
+ "dropdown": {
846
+ "items": [
847
+ {
848
+ "key": "OPERATORS.equals",
849
+ "value": "="
850
+ },
851
+ {
852
+ "key": "OPERATORS.notEquals",
853
+ "value": "!="
854
+ }
855
+ ]
856
+ }
857
+ }
858
+ }
859
+ }
860
+ }
861
+ },
862
+
863
+ // *Example* : Input Field with Mask
864
+ {
865
+ "type": "predicate",
866
+ "config": {
867
+ "render": {
868
+ "type": "input",
869
+ "options": {
870
+ "debounceTime": 400,
871
+ "mask": {
872
+ "mask": "00-00-00-00-000",
873
+ "dropSpecialCharacters": false,
874
+ "showMaskTyped": true
875
+ }
876
+ }
877
+ }
878
+ }
879
+ }
880
+ ]
881
+
882
+ ```
883
+
884
+
885
+
886
+ #### *Date Input*
887
+
888
+ ```ts
889
+ export type DateInputOptions = {
890
+ type: 'date';
891
+ options?:
892
+ {
893
+ placeholder?: string;
894
+ debounceTime?: number;
895
+ isDateRange?: boolean;
896
+ showActions?: boolean;
897
+ autoFill?: boolean;
898
+ panelClass?: string;
899
+ endDatePlaceholder?: string;
900
+ startDatePlaceholder?: string;
901
+ startView?: 'month' | 'year' | 'multi-year';
902
+ max?: Date | string | null;
903
+ min?: Date | string | null;
904
+ startAt?: Date | string | null;
905
+ updateLocalLang?: boolean;
906
+ hijriDisplayFormat?: string;
907
+ displayFormat?: string;
908
+ hideLabel?: boolean
909
+ }
910
+ };
911
+ ```
912
+
913
+ | Property | Type | Description |
914
+ |--------------------------------|-----------------------------------------|------------------------------------------------------------------|
915
+ | `placeholder` | `string` | Placeholder text for the date input. |
916
+ | `debounceTime` | `number` | Delay in milliseconds before emitting value changes. |
917
+ | `isDateRange` | `boolean` | Enables range selection between start and end dates. |
918
+ | `showActions` | `boolean` | Whether to show action buttons like "Apply" or "Clear". |
919
+ | `autoFill` | `boolean` | Automatically fills the date if empty on blur or initialization. |
920
+ | `panelClass` | `string` | Custom CSS class to apply to the datepicker panel. |
921
+ | `endDatePlaceholder` | `string` | Placeholder for the end date field in range mode. |
922
+ | `startDatePlaceholder` | `string` | Placeholder for the start date field in range mode. |
923
+ | `startView` | `'month'` \| `'year'` \| `'multi-year'` | Initial calendar view opened. |
924
+ | `max` | `Date` \| `string` \| `null` | Maximum allowed date. |
925
+ | `min` | `Date` \| `string` \| `null` | Minimum allowed date. |
926
+ | `startAt` | `Date` \| `string` \| `null` | Initial date to open the calendar on. |
927
+ | `updateLocalLang` | `boolean` | Whether to automatically apply the current language settings. |
928
+ | `hijriDisplayFormat` | `string` | Format used for Hijri calendar display. |
929
+ | `displayFormat` | `string` | Format used for Gregorian calendar display. |
930
+ | `hideLabel` (from `HideLabel`) | `boolean` | Whether to hide the field's label. |
931
+ *Example* :Date Field
932
+ ```json
933
+ {
934
+ "type": "predicate",
935
+ "config": {
936
+ "label": "FILTERS.creationDate",
937
+ "fieldKey": "createdAt",
938
+ "sendMode": "payload",
939
+ "render": {
940
+ "type": "date",
941
+ "options": {
942
+ "isDateRange": false,
943
+ "displayFormat": "DD/MM/YYYY",
944
+ "startView": "month"
945
+ }
946
+ }
947
+ }
948
+ }
949
+ ```
950
+
951
+
952
+
953
+ ---
954
+ ---
955
+
956
+ ## Aggregation Field Render
957
+ - **Type**: `CheckboxOptions` | `SwitchOptions` | `RadioOptions` | `DropdownOptions` | `AutocompleteOptions` | `CustomOptions` | `DateListOptions`
958
+ - **Description**: Defines the rendering configuration for an aggregation field. The render type determines how users interact with the filter or input—for example, as checkboxes, a dropdown, or a custom UI.
959
+
960
+ ### Supported Types
961
+
962
+ #### *Checkbox*
963
+
964
+ ```ts
965
+ type CheckboxOptions = {
966
+   type: 'checkbox';
967
+   options?: ShowTotalConfig & FilterConfig & CollapseConfig & SearchConfig & HideLabel & SortOptions;
968
+ };
969
+ ```
970
+
971
+ | Property | Type | Required | Description |
972
+ |-----------|--------------------------------------------------------------------------------------------|----------|------------------------------------|
973
+ | `type` | `'checkbox'` | ✅ | Specifies the input type. |
974
+ | `options` | `ShowTotalConfig & FilterConfig & CollapseConfig & SearchConfig & HideLabel & SortOptions` | ❌ | Configurable UI and data features. |
975
+
976
+ ```json
977
+ {
978
+ "type": "checkbox",
979
+ "options": {
980
+ "showTotal": true,
981
+ "filter": true,
982
+ "collapse": true,
983
+ "minVisibleCount": 2,
984
+ "expandedCount": 5,
985
+ "hideLabel": false,
986
+ "sort": true,
987
+ "search": {
988
+ "placeholder": "Find switch options...",
989
+ "query": {
990
+ "field": "gdoc:categoryHierarchyCode",
991
+ "method": "post",
992
+ "url": "/api/switch/search",
993
+ "operator": "equals",
994
+ "template": " payload value {{text}}",
995
+ "params": {
996
+ "active": 1
997
+ },
998
+ "headers": {
999
+ "X-Custom-Header": "value"
1000
+ }
1001
+ }
1002
+ }
1003
+ }
1004
+ }
1005
+
1006
+ ```
1007
+ #### *Switch*
1008
+ ```ts
1009
+ type SwitchOptions = {
1010
+   type: 'switch';
1011
+   options?: ShowTotalConfig & FilterConfig & CollapseConfig & MultipleConfig & SearchConfig & HideLabel & SortOptions;
1012
+ };
1013
+ ```
1014
+
1015
+
1016
+ | Property | Type | Required | Description |
1017
+ |-----------|-------------------------------------------------------------------------------------------------------------|----------|------------------------------------------------|
1018
+ | `type` | `'switch'` | ✅ | Specifies the input type. |
1019
+ | `options` | `ShowTotalConfig & FilterConfig & CollapseConfig & MultipleConfig & SearchConfig & HideLabel & SortOptions` | ❌ | Includes `multiple` for multi-selection logic. |
1020
+ ```json
1021
+ {
1022
+ "type": "switch",
1023
+ "options": {
1024
+ "showTotal": false,
1025
+ "filter": true,
1026
+ "collapse": true,
1027
+ "minVisibleCount": 1,
1028
+ "expandedCount": 3,
1029
+ "multiple": true,
1030
+ "hideLabel": true,
1031
+ "sort": false
1032
+ }
1033
+ }
1034
+
1035
+ ```
1036
+
1037
+ #### *Radio*
1038
+ ```ts
1039
+ type RadioOptions = {
1040
+   type: 'radio';
1041
+   options?: ShowTotalConfig & FilterConfig & CollapseConfig & SearchConfig & HideLabel & SortOptions;
1042
+ };
1043
+ ```
1044
+
1045
+ | Property | Type | Required | Description |
1046
+ |-----------|--------------------------------------------------------------------------------------------|----------|----------------------------------------------|
1047
+ | `type` | `'radio'` | ✅ | Specifies the input type. |
1048
+ | `options` | `ShowTotalConfig & FilterConfig & CollapseConfig & SearchConfig & HideLabel & SortOptions` | ❌ | Similar to `CheckboxOptions`, no `multiple`. |
1049
+ #### *Dropdown*
1050
+ ```ts
1051
+ type DropdownOptions = {
1052
+
1053
+   type: 'dropdown';
1054
+
1055
+   options?: Prettify<ShowTotalConfig & MultipleConfig & HideLabel>;
1056
+
1057
+ };
1058
+ ```
1059
+
1060
+ | Property | Type | Required | Description |
1061
+ |-----------|------------------------------------------------|----------|------------------------------------------------------|
1062
+ | `type` | `'dropdown'` | ✅ | Specifies the input type. |
1063
+ | `options` | `ShowTotalConfig & MultipleConfig & HideLabel` | ❌ | Only includes total, multiple, and label visibility. |
1064
+
1065
+ ```json
1066
+ {
1067
+ "type": "dropdown",
1068
+ "options": {
1069
+ "showTotal": true,
1070
+ "multiple": false,
1071
+ "hideLabel": false
1072
+ }
1073
+ }
1074
+ ```
1075
+
1076
+ #### *Autocomplete*
1077
+ ```ts
1078
+ type AutocompleteOptions = {
1079
+   type: 'autocomplete';
1080
+   options?: Prettify<ShowTotalConfig & HideLabel>;
1081
+ };
1082
+ ```
1083
+
1084
+ | Property | Type | Required | Description |
1085
+ |-----------|-------------------------------|----------|------------------------------------------------|
1086
+ | `type` | `'autocomplete'` | ✅ | Autocomplete input field. |
1087
+ | `options` | `ShowTotalConfig & HideLabel` | ❌ | Minimal config: total count and label control. |
1088
+ #### *Date List*
1089
+ ```ts
1090
+ type DateListOptions = {
1091
+
1092
+   type: 'dateList';
1093
+   options: Prettify<ShowTotalConfig & HideLabel> & {
1094
+     view: (typeof DATE_LIST_VIEW)[keyof typeof DATE_LIST_VIEW]; //list - dropdown
1095
+     minMax?: boolean;
1096
+   };
1097
+ };
1098
+ ```
1099
+
1100
+ | Property | Type | Required | Description |
1101
+ |-------------|-----------------------------------------------------------------|----------|-----------------------------------------------------------|
1102
+ | `type` | `'dateList'` | ✅ | Specifies it's a date list input. |
1103
+ | `options` | `ShowTotalConfig & HideLabel & { view: ..., minMax?: boolean }` | ✅ | Includes display view and optional min-max toggle. |
1104
+ | └─ `view` | `DATE_LIST_VIEW[keyof DATE_LIST_VIEW]` | ✅ | UI view type (e.g., `'list'` or `'dropdown'`). |
1105
+ | └─ `minMax` | `boolean` | ❌ | Enables min/max range support (e.g., for date filtering). |
1106
+ #### *Custom Options*
1107
+ ```ts
1108
+ type CustomOptions = {
1109
+   type: 'custom';
1110
+   options?: Record<string, any> & HideLabel;
1111
+ };
1112
+ ```
1113
+
1114
+ | Property | Type | Required | Description |
1115
+ |-----------|-----------------------------------|----------|---------------------------------------------------|
1116
+ | `type` | `'custom'` | ✅ | Custom input component. |
1117
+ | `options` | `Record<string, any> & HideLabel` | ❌ | Arbitrary config props with optional `hideLabel`. |
1118
+
1119
+
1120
+
1121
+ ---
1122
+ ---
1123
+
1124
+ ## Custom Field Render
1125
+ - **Type**: `ActiveUserSwitcherOptions`
1126
+ - **Description**: Defines the rendering configuration for a custom field.
1127
+
1128
+ ### Supported Types
1129
+ #### *Active user options*
1130
+ ```ts
1131
+ type ActiveUserSwitcherOptions = {
1132
+ type: 'activeUser';
1133
+ options?: Prettify<
1134
+ HideLabel & {
1135
+ bindValue?: string;
1136
+ text?: string;
1137
+ }
1138
+ >;
1139
+ }
1140
+ ```
1141
+
1142
+ | Property | Type | Required | Description |
1143
+ |-----------|--------------------------------------------------------------|----------|-------------------------------------------------------|
1144
+ | `type` | `'activeUser'` | ✅ | Represents an active user switcher component. |
1145
+ | `options` | `{ hideLabel?: boolean; bindValue?: string; text?: string }` | ❌ | Optional label hiding, bound value, and display text. |
1146
+
1147
+
1148
+
1149
+
1150
+
1151
+ ---
1152
+ ---
1153
+ # Common Types
1154
+
1155
+ These common types are used throughout the `NdfTableOptions` interface.
1156
+
1157
+ ---
1158
+
1159
+ *Field options*
1160
+
1161
+ ```ts
1162
+ type FilterConfig = { filter?: boolean };
1163
+
1164
+ type HideLabel = { hideLabel?: boolean };
1165
+
1166
+ type CollapseConfig = {
1167
+   collapse?: boolean;
1168
+   minVisibleCount?: number;
1169
+   expandedCount?: number;
1170
+
1171
+ };
1172
+
1173
+ type MultipleConfig = { multiple?: boolean };
1174
+
1175
+ type ShowTotalConfig = { showTotal?: boolean };
1176
+
1177
+ type SortOptions = { sort?: boolean };
1178
+
1179
+ type SearchConfig = {
1180
+
1181
+     search?: {
1182
+         placeholder?: string;
1183
+         query: {
1184
+             field?: string;
1185
+             method?: 'get' | 'post';
1186
+             url: string;
1187
+             operator?: ComparisonOperator;
1188
+             template?: EvaluatedString;
1189
+             params?: Record<StringOrNumber, StringOrNumber>;
1190
+             headers?: Record<StringOrNumber, StringOrNumber>;
1191
+         };
1192
+     };
1193
+ };
1194
+ ```
1195
+
1196
+ | Property | Type | Description |
1197
+ |-------------------|----------------------------------------|------------------------------------------------------------|
1198
+ | `showTotal` | `boolean` | Whether to display a total count (from `ShowTotalConfig`). |
1199
+ | `filter` | `boolean` | Enables filtering for this field (from `FilterConfig`). |
1200
+ | `collapse` | `boolean` | Enables collapsing (from `CollapseConfig`). |
1201
+ | `minVisibleCount` | `number` | Minimum items visible before collapsing. |
1202
+ | `expandedCount` | `number` | Number of items shown when expanded. |
1203
+ | `multiple` | `boolean` | Allow multiple selections (from `MultipleConfig`). |
1204
+ | `hideLabel` | `boolean` | Hides the label of the field/component (from `HideLabel`). |
1205
+ | `sort` | `boolean` | Enables field options sort (from `SortOptions`). |
1206
+ | `search` | `{ placeholder?: string; query: ... }` | Enables search configuration (from `SearchConfig`). |
1207
+
1208
+ *Label Value*
1209
+
1210
+ ```ts
1211
+ type LabelValue<L, V> = {
1212
+ label: L;
1213
+ value: V;
1214
+ };
1215
+ ```
1216
+
1217
+ *Ndf Request Config*
1218
+
1219
+ ```ts
1220
+ type NdfRequestConfig = {
1221
+ method: 'post' | 'get';
1222
+ url: string;
1223
+ payload?: Record<string, any>;
1224
+ params?: Record<string, any>;
1225
+ headers?: Record<string, any>;
1226
+ };
1227
+ ```
1228
+
1229
+ *Table Sort Config*
1230
+
1231
+ ```ts
1232
+ type TableSortConfig = {
1233
+ enabled: boolean;
1234
+ frozenColumns?: string[]; // Specifies which columns should remain fixed (frozen) during column ordering
1235
+ };
1236
+ ```
1237
+
1238
+ *Comparison Operator*
1239
+
1240
+ ```ts
1241
+ type ComparisonOperator = | '=' | '!=' | '<' | '>' | '<=' | '>=' | 'IN' | 'NOT IN' | 'BETWEEN' | 'LIKE' | 'ILIKE' | 'NOT LIKE' | 'NOT ILIKE' | 'STARTSWITH' | 'FULLTEXT';
1242
+ ```
1243
+
1244
+ *Translate Key*
1245
+
1246
+ ```ts
1247
+ type TranslateKey = string
1248
+ ```
1249
+
1250
+
1251
+
1252
+ # Full Example
1253
+
1254
+ ```json
1255
+ {
1256
+ "options": {
1257
+ "columns": {
1258
+ "toggle": true,
1259
+ "sortable": {
1260
+ "enabled": true
1261
+ }
1262
+ },
1263
+ "filters": {
1264
+ "mode": "payload",
1265
+ "reload": {
1266
+ "strategy": "always"
1267
+ },
1268
+ "panel": {
1269
+ "visible": true,
1270
+ "toggleButton": true
1271
+ },
1272
+ "fields": [
1273
+ {
1274
+ "type": "aggregation",
1275
+ "config": {
1276
+ "label": "rmAdvancedSearch.recDefintionSystemName",
1277
+ "aggregation": "RecordDefinition_systemName_agg",
1278
+ "fieldKey": "recdef:systemName",
1279
+ "dataTransformer": "system",
1280
+ "order": 0,
1281
+ "sendMode": "queryParam",
1282
+ "render": {
1283
+ "type": "checkbox",
1284
+ "options": {
1285
+ "showTotal": true
1286
+ }
1287
+ }
1288
+ }
1289
+ },
1290
+ {
1291
+ "type": "predicate",
1292
+ "config": {
1293
+ "label": "FILTERS.gdocDocumentSubject",
1294
+ "fieldKey": "gdoc:documentSubject",
1295
+ "sendMode": "payload",
1296
+ "valueType": "valueObject",
1297
+ "render": {
1298
+ "type": "input",
1299
+ "options": {
1300
+ "debounceTime": 400,
1301
+ "mask": {
1302
+ "mask": "00-00-00-00-000",
1303
+ "dropSpecialCharacters": false,
1304
+ "showMaskTyped": true
1305
+ },
1306
+ "suffix": {
1307
+ "dropdown": {
1308
+ "items": [
1309
+ {
1310
+ "key": "OPERATORS.equals",
1311
+ "value": "="
1312
+ },
1313
+ {
1314
+ "key": "OPERATORS.notEquals",
1315
+ "value": "!="
1316
+ },
1317
+ {
1318
+ "key": "OPERATORS.like",
1319
+ "value": "LIKE"
1320
+ },
1321
+ {
1322
+ "key": "OPERATORS.iLike",
1323
+ "value": "ILIKE"
1324
+ }
1325
+ ]
1326
+ }
1327
+ }
1328
+ }
1329
+ }
1330
+ }
1331
+ },
1332
+ {
1333
+ "type": "aggregation",
1334
+ "config": {
1335
+ "label": "rmAdvancedSearch.gdocGDocumentDate",
1336
+ "aggregation": "generaldocument_gDocumentDate_agg",
1337
+ "fieldKey": "gdoc:gDocumentDate",
1338
+ "prefix": "search.buckets.",
1339
+ "sendMode": "custom",
1340
+ "valueType": "valueObject",
1341
+ "render": {
1342
+ "type": "dateList",
1343
+ "view": "list",
1344
+ "options": {
1345
+ "showTotal": true,
1346
+ "minMax": true
1347
+ }
1348
+ }
1349
+ }
1350
+ }
1351
+ ]
1352
+ },
1353
+ "search": {
1354
+ "fieldKey": "ecm:fulltext",
1355
+ "searchMode": "triggered",
1356
+ "suffix": {
1357
+ "dialog": {
1358
+ "title": "INFO.dialogTitle",
1359
+ "content": [
1360
+ "##INFO.query_sequence##",
1361
+ "##INFO.query_and##",
1362
+ "##INFO.query_negation##",
1363
+ "##INFO.query_prefix##",
1364
+ "##INFO.query_historical##",
1365
+ "##INFO.query_or##",
1366
+ "##INFO.query_phrase##"
1367
+ ]
1368
+ }
1369
+ }
1370
+ },
1371
+ "tableMode": {
1372
+ "mode": "list",
1373
+ "componentName": "rms.components.advancedSearchCard",
1374
+ "toggleMode": true,
1375
+ "availableMode": [
1376
+ {
1377
+ "value": "list",
1378
+ "icon": "table_rows"
1379
+ },
1380
+ {
1381
+ "value": "custom",
1382
+ "icon": "rectangle"
1383
+ }
1384
+ ]
1385
+ }
1386
+ },
1387
+ "scrollbarH": true,
1388
+ "pageNumber": 1,
1389
+ "pageSize": 10,
1390
+ "prefix": "LISTING.",
1391
+ "pageProvider": "PP_RM_Record",
1392
+ "customUrl": {
1393
+ "url": "/api/v1/custom-search/pp/PP_RM_Record/execute",
1394
+ "method": "POST"
1395
+ },
1396
+ "headers": {
1397
+ "properties": "dublincore, file"
1398
+ },
1399
+ "quickFilters": "After Archiving",
1400
+ "fields": {
1401
+ "systemName": "recdef:systemName",
1402
+ "title": "dc:title"
1403
+ },
1404
+ "columns": [
1405
+ {
1406
+ "name": "systemName",
1407
+ "prop": "properties.systemName",
1408
+ "display": true,
1409
+ "type": "custom",
1410
+ "template": "common.components.systemName",
1411
+ "translatePrefix": "search.buckets",
1412
+ "isOrginalKey": true,
1413
+ "sortable": false,
1414
+ "headerClass": "recdef:systemName",
1415
+ "defaultVisible": true,
1416
+ "minWidth": 150
1417
+ },
1418
+ {
1419
+ "name": "physicalOriginal",
1420
+ "prop": "properties.physicalOriginal",
1421
+ "display": true,
1422
+ "type": "custom",
1423
+ "template": "rms.components.TranslatedValueColumn",
1424
+ "translatePrefix": "rmDocumentUpload.hasPhysicalOriginal",
1425
+ "isBooleanValue": true,
1426
+ "sortable": false,
1427
+ "headerClass": "recdef:physicalOriginal",
1428
+ "defaultVisible": false,
1429
+ "minWidth": 150
1430
+ }
1431
+ ]
1432
+ }
1433
+ ```