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