@acorex-platform/module-data-management-client 0.0.21
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/fesm2022/acorex-platform-module-data-management-client-contracts.mjs +366 -0
- package/fesm2022/acorex-platform-module-data-management-client-contracts.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-index-CMxKYDas.mjs +298 -0
- package/fesm2022/acorex-platform-module-data-management-client-index-CMxKYDas.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-agreement-scale-options.query-Dl7jMXp1.mjs +67 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-agreement-scale-options.query-Dl7jMXp1.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-availability-options.query-CdaHTgij.mjs +64 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-availability-options.query-CdaHTgij.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-frequency-options.query-BvsPPzFj.mjs +52 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-frequency-options.query-BvsPPzFj.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-gender-options.query-BA6Bwv66.mjs +55 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-gender-options.query-BA6Bwv66.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-nps-scale-options.query-C8Pbp0Ow.mjs +49 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-nps-scale-options.query-C8Pbp0Ow.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-priority-options.query-GCuv4lU3.mjs +51 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-priority-options.query-GCuv4lU3.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-rating-1-10-options.query-BYBU_yzv.mjs +49 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-rating-1-10-options.query-BYBU_yzv.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-rating-scale-options.query-H-jWx7_1.mjs +72 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-rating-scale-options.query-H-jWx7_1.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-satisfaction-options.query-BIDjWNP5.mjs +67 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-satisfaction-options.query-BIDjWNP5.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-yes-no-maybe-options.query-C90RnQ5A.mjs +50 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-yes-no-maybe-options.query-C90RnQ5A.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-yes-no-na-options.query-tz9dR33P.mjs +53 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-yes-no-na-options.query-tz9dR33P.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-yes-no-options.query-w2mqJJNZ.mjs +49 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-yes-no-options.query-w2mqJJNZ.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client.mjs +8397 -0
- package/fesm2022/acorex-platform-module-data-management-client.mjs.map +1 -0
- package/package.json +28 -0
- package/types/acorex-platform-module-data-management-client-contracts.d.ts +429 -0
- package/types/acorex-platform-module-data-management-client.d.ts +1798 -0
|
@@ -0,0 +1,1798 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { InjectionToken, OnInit } from '@angular/core';
|
|
3
|
+
import * as i1 from '@acorex-platform/framework-client/layout/widget-core';
|
|
4
|
+
import { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';
|
|
5
|
+
import { AXPMenuProvider, AXPMenuProviderContext } from '@acorex-platform/framework-client/common';
|
|
6
|
+
import { AXPWidgetConfig } from '@acorex-platform/framework-shared/widget-core';
|
|
7
|
+
import * as _acorex_platform_framework_shared_core from '@acorex-platform/framework-shared/core';
|
|
8
|
+
import { AXPOptionsData, AXPFilterDefinition, AXPFilterClause, AXPExpressionEvaluatorScopeProvider, AXPExpressionEvaluatorScopeProviderContext, AXPMultiLanguageString, AXPActionMenuItem } from '@acorex-platform/framework-shared/core';
|
|
9
|
+
import * as _acorex_platform_module_data_management_client_contracts from '@acorex-platform/module-data-management-client/contracts';
|
|
10
|
+
import { AXPQueryBuilderData, AXPQueryOutputType, AXPQuerySortRule, AXPAggregateOperation, AXPQueryExecutionResult, AXMMetaDataBuilderValue, AXMMetaDataDefinitionEntityModel } from '@acorex-platform/module-data-management-client/contracts';
|
|
11
|
+
export { AXPAggregateOperation, AXPQueryBuilderData, AXPQuerySortRule } from '@acorex-platform/module-data-management-client/contracts';
|
|
12
|
+
import * as _acorex_platform_module_data_management_client from '@acorex-platform/module-data-management-client';
|
|
13
|
+
import { AXDropListDroppedEvent } from '@acorex/cdk/drag-drop';
|
|
14
|
+
import { AXDataSourceOperator, AXDataSource, AXFilterLogic } from '@acorex/cdk/common';
|
|
15
|
+
import { AXPCommand, AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';
|
|
16
|
+
import { AXPDynamicFormGroupDefinition, AXPDynamicFormMode, AXPDynamicFormDefinition, AXPLayoutRendererComponent, AXPLayoutBuilderService } from '@acorex-platform/framework-client/layout/builder';
|
|
17
|
+
import { AXTranslationService } from '@acorex/core/translation';
|
|
18
|
+
import { AXPEntityService, AXPEntityDefinitionRegistryService, AXPEntityActionPlugin } from '@acorex-platform/framework-client/layout/entity';
|
|
19
|
+
import { AXPBuilderValue, AXPStandardSectionItemsBuilderConfig, ItemConfiguratorListItem } from '@acorex-platform/framework-client/layout/components';
|
|
20
|
+
import { AXPTagProvider, AXPTag } from '@acorex-platform/framework-client/core';
|
|
21
|
+
|
|
22
|
+
declare class AXMMetaDataFeatureModule {
|
|
23
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMMetaDataFeatureModule, never>;
|
|
24
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXMMetaDataFeatureModule, never, never, never>;
|
|
25
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXMMetaDataFeatureModule>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
declare class AXMTagsFeatureModule {
|
|
29
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMTagsFeatureModule, never>;
|
|
30
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXMTagsFeatureModule, never, never, never>;
|
|
31
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXMTagsFeatureModule>;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare class AXMDataManagementModule {
|
|
35
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMDataManagementModule, never>;
|
|
36
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXMDataManagementModule, never, [typeof i1.AXPWidgetCoreModule, typeof AXMMetaDataFeatureModule, typeof AXMTagsFeatureModule], never>;
|
|
37
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXMDataManagementModule>;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
declare class AXMMenuProvider implements AXPMenuProvider {
|
|
41
|
+
private entityService;
|
|
42
|
+
provide(context: AXPMenuProviderContext): Promise<void>;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
declare const AXPQueryBuilderWidget: AXPWidgetConfig<AXPQueryBuilderWidgetConfigType>;
|
|
46
|
+
type AXPQueryBuilderWidgetConfigType = {
|
|
47
|
+
type: 'editor';
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Aggregate function category
|
|
52
|
+
* Logical category name coming from aggregate providers
|
|
53
|
+
* (e.g., 'statistical', 'string', 'date', 'custom', or any custom category)
|
|
54
|
+
*/
|
|
55
|
+
type AXPAggregateCategory = string;
|
|
56
|
+
/**
|
|
57
|
+
* Database type support
|
|
58
|
+
* Logical database type name coming from providers
|
|
59
|
+
* (e.g., 'mysql', 'postgresql', 'mongodb', 'sql', 'nosql', or any custom type)
|
|
60
|
+
*/
|
|
61
|
+
type AXPDatabaseType = string;
|
|
62
|
+
/**
|
|
63
|
+
* Aggregate function definition
|
|
64
|
+
* Defines an aggregate function with its properties and database support
|
|
65
|
+
*/
|
|
66
|
+
interface AXPAggregateFunctionDefinition {
|
|
67
|
+
/**
|
|
68
|
+
* Function name/identifier (e.g., 'sum', 'avg', 'count')
|
|
69
|
+
*/
|
|
70
|
+
name: string;
|
|
71
|
+
/**
|
|
72
|
+
* Display title
|
|
73
|
+
*/
|
|
74
|
+
title: string;
|
|
75
|
+
/**
|
|
76
|
+
* Description of what the function does
|
|
77
|
+
*/
|
|
78
|
+
description?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Category for grouping functions
|
|
81
|
+
*/
|
|
82
|
+
category: AXPAggregateCategory;
|
|
83
|
+
/**
|
|
84
|
+
* Database types that support this function
|
|
85
|
+
* If 'all' is included, the function is universally supported
|
|
86
|
+
*/
|
|
87
|
+
supportedDatabases: AXPDatabaseType[];
|
|
88
|
+
/**
|
|
89
|
+
* Whether this function requires a field parameter
|
|
90
|
+
* Some functions like COUNT(*) don't require a field
|
|
91
|
+
*/
|
|
92
|
+
requiresField: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Whether this function supports DISTINCT modifier
|
|
95
|
+
*/
|
|
96
|
+
supportsDistinct?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Whether this function supports nested aggregates
|
|
99
|
+
* Functions like CONCAT can contain other aggregate functions as parameters
|
|
100
|
+
* Example: CONCAT(MIN(field1), MAX(field2))
|
|
101
|
+
*/
|
|
102
|
+
supportsNested?: boolean;
|
|
103
|
+
}
|
|
104
|
+
/** Column / field metadata used by query-builder UIs. */
|
|
105
|
+
interface AXPQueryBuilderDataFieldDefinition {
|
|
106
|
+
name: string;
|
|
107
|
+
title: string;
|
|
108
|
+
datatype: string;
|
|
109
|
+
type: string;
|
|
110
|
+
options?: AXPOptionsData;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Structural datasource schema passed into the query builder
|
|
114
|
+
* (columns + optional filters). Formerly DI-registry `AXPDataSourceDefinition`.
|
|
115
|
+
*/
|
|
116
|
+
interface AXPQueryBuilderDataSourceDefinition {
|
|
117
|
+
name?: string;
|
|
118
|
+
title?: string;
|
|
119
|
+
columns: AXPQueryBuilderDataFieldDefinition[];
|
|
120
|
+
filters?: AXPFilterDefinition[];
|
|
121
|
+
valueField?: {
|
|
122
|
+
name: string;
|
|
123
|
+
title: string;
|
|
124
|
+
};
|
|
125
|
+
textField?: {
|
|
126
|
+
name: string;
|
|
127
|
+
title: string;
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
declare class AXPQueryBuilderWidgetEditComponent extends AXPValueWidgetComponent<AXPQueryBuilderData> {
|
|
132
|
+
/**
|
|
133
|
+
* Default empty query data structure
|
|
134
|
+
*/
|
|
135
|
+
protected readonly defaultQueryData: AXPQueryBuilderData;
|
|
136
|
+
/**
|
|
137
|
+
* Get datasource definition from options (passed from entity context)
|
|
138
|
+
* The entity passes the selected datasource definition via context
|
|
139
|
+
*/
|
|
140
|
+
protected readonly dataSourceDefinition: _angular_core.Signal<AXPQueryBuilderDataSourceDefinition | undefined>;
|
|
141
|
+
/**
|
|
142
|
+
* Handle value change from query builder
|
|
143
|
+
*/
|
|
144
|
+
onValueChange(data: AXPQueryBuilderData): void;
|
|
145
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPQueryBuilderWidgetEditComponent, never>;
|
|
146
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXPQueryBuilderWidgetEditComponent, "axp-query-builder-widget-edit", never, {}, {}, never, never, true, never>;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
declare class AXPQueryBuilderWidgetViewComponent extends AXPValueWidgetComponent<AXPFilterClause> {
|
|
150
|
+
protected queryData: _angular_core.Signal<AXPFilterClause>;
|
|
151
|
+
getTotalItemsCount(): number;
|
|
152
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPQueryBuilderWidgetViewComponent, never>;
|
|
153
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXPQueryBuilderWidgetViewComponent, "axp-query-builder-widget-view", never, {}, {}, never, never, true, never>;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
declare class AXPQueryBuilderWidgetColumnComponent extends AXPValueWidgetComponent<AXPFilterClause> {
|
|
157
|
+
protected queryData: _angular_core.Signal<AXPFilterClause>;
|
|
158
|
+
getTotalItemsCount(): number;
|
|
159
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPQueryBuilderWidgetColumnComponent, never>;
|
|
160
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXPQueryBuilderWidgetColumnComponent, "axp-query-builder-widget-column", never, {}, {}, never, never, true, never>;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
declare class AXPQueryBuilderWidgetDesignerComponent extends AXPValueWidgetComponent<any> {
|
|
164
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPQueryBuilderWidgetDesignerComponent, never>;
|
|
165
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXPQueryBuilderWidgetDesignerComponent, "axp-query-builder-widget-designer", never, {}, {}, never, never, true, never>;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Full Query Builder Component
|
|
170
|
+
*
|
|
171
|
+
* Provides a complete query builder interface with:
|
|
172
|
+
* - Columns: Multi-select from datasource columns
|
|
173
|
+
* - Where: WHERE clause builder (groups + conditions)
|
|
174
|
+
* - Sort: Sort rules with field and direction
|
|
175
|
+
* - Group By: Multi-select from datasource columns
|
|
176
|
+
*
|
|
177
|
+
* Receives AXPQueryBuilderDataSourceDefinition as input and distributes data to child components.
|
|
178
|
+
*/
|
|
179
|
+
declare class AXPQueryBuilderComponent {
|
|
180
|
+
private readonly databaseTypeService;
|
|
181
|
+
/**
|
|
182
|
+
* Current query builder value
|
|
183
|
+
*/
|
|
184
|
+
value: _angular_core.InputSignal<AXPQueryBuilderData>;
|
|
185
|
+
/**
|
|
186
|
+
* Datasource definition containing columns and filters
|
|
187
|
+
*/
|
|
188
|
+
dataSourceDefinition: _angular_core.InputSignal<AXPQueryBuilderDataSourceDefinition | undefined>;
|
|
189
|
+
/**
|
|
190
|
+
* Emitted when query structure changes
|
|
191
|
+
*/
|
|
192
|
+
valueChange: _angular_core.OutputEmitterRef<AXPQueryBuilderData>;
|
|
193
|
+
protected queryData: _angular_core.WritableSignal<AXPQueryBuilderData>;
|
|
194
|
+
protected activeTab: _angular_core.WritableSignal<number>;
|
|
195
|
+
protected isRawMode: _angular_core.WritableSignal<boolean>;
|
|
196
|
+
/**
|
|
197
|
+
* Extract columns from datasource definition
|
|
198
|
+
*/
|
|
199
|
+
protected readonly columns: _angular_core.Signal<_acorex_platform_module_data_management_client.AXPQueryBuilderDataFieldDefinition[]>;
|
|
200
|
+
/**
|
|
201
|
+
* Extract filter definitions from datasource definition
|
|
202
|
+
*/
|
|
203
|
+
protected readonly filterDefinitions: _angular_core.Signal<_acorex_platform_framework_shared_core.AXPFilterDefinition[]>;
|
|
204
|
+
/**
|
|
205
|
+
* Validation warnings/errors for query builder
|
|
206
|
+
*/
|
|
207
|
+
protected readonly validationWarnings: _angular_core.Signal<string[]>;
|
|
208
|
+
constructor();
|
|
209
|
+
/**
|
|
210
|
+
* Update columns selection
|
|
211
|
+
*/
|
|
212
|
+
protected onColumnsChange(selectedColumns: string[]): void;
|
|
213
|
+
/**
|
|
214
|
+
* Update WHERE clause
|
|
215
|
+
*/
|
|
216
|
+
protected onWhereChange(where: AXPQueryBuilderData['where']): void;
|
|
217
|
+
/**
|
|
218
|
+
* Update sort rules
|
|
219
|
+
*/
|
|
220
|
+
protected onSortChange(sort: AXPQueryBuilderData['sort']): void;
|
|
221
|
+
/**
|
|
222
|
+
* Update group by selection
|
|
223
|
+
*/
|
|
224
|
+
protected onGroupByChange(selectedColumns: string[]): void;
|
|
225
|
+
/**
|
|
226
|
+
* Update aggregate operations
|
|
227
|
+
*/
|
|
228
|
+
protected onAggregatesChange(aggregates: AXPQueryBuilderData['aggregates']): void;
|
|
229
|
+
/**
|
|
230
|
+
* Update raw query
|
|
231
|
+
*/
|
|
232
|
+
protected onRawQueryChange(rawQuery: string): void;
|
|
233
|
+
/**
|
|
234
|
+
* Update query language
|
|
235
|
+
*/
|
|
236
|
+
protected onQueryLanguageChange(language: string): Promise<void>;
|
|
237
|
+
/**
|
|
238
|
+
* Update output type
|
|
239
|
+
*/
|
|
240
|
+
protected onOutputTypeChange(outputType: AXPQueryOutputType): void;
|
|
241
|
+
/**
|
|
242
|
+
* Generate SQL from structured query
|
|
243
|
+
*/
|
|
244
|
+
protected generateSqlFromStructured(): Promise<void>;
|
|
245
|
+
private updateValue;
|
|
246
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPQueryBuilderComponent, never>;
|
|
247
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXPQueryBuilderComponent, "axp-query-builder", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "dataSourceDefinition": { "alias": "dataSourceDefinition"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Selected field data emitted when condition changes
|
|
252
|
+
*/
|
|
253
|
+
type SelectedField = {
|
|
254
|
+
id: string;
|
|
255
|
+
field: string;
|
|
256
|
+
operator: AXDataSourceOperator['type'];
|
|
257
|
+
value: any;
|
|
258
|
+
/**
|
|
259
|
+
* When true, this condition should be filled by user as a parameter (isParametric).
|
|
260
|
+
*/
|
|
261
|
+
isParametric: boolean;
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Where Builder Component
|
|
266
|
+
*
|
|
267
|
+
* Handles WHERE clause building with groups (AND/OR) and conditions (field/operator/value).
|
|
268
|
+
* This component is used as a child component within the full QueryBuilderComponent.
|
|
269
|
+
*
|
|
270
|
+
* Layout Architecture:
|
|
271
|
+
*
|
|
272
|
+
* Grid-Based Group Layout:
|
|
273
|
+
* - Each group uses CSS Grid: `grid-template-columns: auto 1fr`
|
|
274
|
+
* - Left column: connector line with AND/OR selector (fixed width: 3.5rem)
|
|
275
|
+
* - Right column: conditions container (flexible width)
|
|
276
|
+
* - Both columns stretch to same height via `align-items: stretch`
|
|
277
|
+
*
|
|
278
|
+
* Single Connector Line Per Group:
|
|
279
|
+
* - ONE continuous vertical connector line per group (root and nested)
|
|
280
|
+
* - Line spans full height of the group using `top: 0; bottom: 0` positioning
|
|
281
|
+
* - Rendered using `border-left: 2px solid` for clean appearance
|
|
282
|
+
* - The AND/OR selector chip is absolutely positioned in the center of this line
|
|
283
|
+
* - Selector uses `left: 50%; top: 50%; transform: translate(-50%, -50%)` for perfect centering
|
|
284
|
+
* - All conditions in the group visually attach to this single line on the right side
|
|
285
|
+
* - Nested groups create their own connector line, indented appropriately
|
|
286
|
+
*
|
|
287
|
+
* Typography:
|
|
288
|
+
* - Uses standard platform font sizes (ax-sm for buttons/selects)
|
|
289
|
+
* - AND/OR chip: 0.8125rem (13px) font size for readability
|
|
290
|
+
* - Condition rows: standard padding and spacing matching form controls
|
|
291
|
+
* - No reduced font sizes - relies on spacing and subtle borders for visual lightness
|
|
292
|
+
*
|
|
293
|
+
* Empty Group State:
|
|
294
|
+
* - Compact empty state with just an "Add condition" button
|
|
295
|
+
* - No nested boxes or heavy borders
|
|
296
|
+
* - Minimal height, aligned with group padding
|
|
297
|
+
*
|
|
298
|
+
* Visual Design:
|
|
299
|
+
* - Subtle borders (1px) using platform border tokens
|
|
300
|
+
* - Soft colors with light surface elevation
|
|
301
|
+
* - Standard spacing throughout (gap-3, px-3, py-2.5)
|
|
302
|
+
* - Consistent styling for root and nested groups (except root has no border/background)
|
|
303
|
+
*/
|
|
304
|
+
declare class AXPWhereBuilderComponent {
|
|
305
|
+
private readonly widgetRegistry;
|
|
306
|
+
private readonly elementRef;
|
|
307
|
+
private readonly destroyRef;
|
|
308
|
+
private readonly platformId;
|
|
309
|
+
private readonly isBrowser;
|
|
310
|
+
/**
|
|
311
|
+
* Current query builder value (root group with conditions/groups)
|
|
312
|
+
*/
|
|
313
|
+
value: _angular_core.InputSignal<AXPFilterDefinition>;
|
|
314
|
+
/**
|
|
315
|
+
* Available filter definitions from entity/context
|
|
316
|
+
* Each filterDefinition contains field metadata and widget configuration
|
|
317
|
+
*/
|
|
318
|
+
filterDefinitions: _angular_core.InputSignal<AXPFilterDefinition[]>;
|
|
319
|
+
/**
|
|
320
|
+
* Emitted when query structure changes
|
|
321
|
+
* Parent components can consume this to build queries
|
|
322
|
+
*/
|
|
323
|
+
valueChange: _angular_core.OutputEmitterRef<AXPFilterDefinition>;
|
|
324
|
+
protected queryData: _angular_core.WritableSignal<AXPFilterDefinition>;
|
|
325
|
+
protected readonly logicalOperatorsItems: {
|
|
326
|
+
value: string;
|
|
327
|
+
text: string;
|
|
328
|
+
}[];
|
|
329
|
+
protected readonly logicalOperators: AXDataSource<{
|
|
330
|
+
value: string;
|
|
331
|
+
text: string;
|
|
332
|
+
} | undefined>;
|
|
333
|
+
/**
|
|
334
|
+
* Computed filter definitions for field selector
|
|
335
|
+
* Maps filterDefinitions to a format suitable for select-box
|
|
336
|
+
*/
|
|
337
|
+
protected readonly availableFilterDefinitions: _angular_core.Signal<{
|
|
338
|
+
value: string | undefined;
|
|
339
|
+
text: string;
|
|
340
|
+
definition: AXPFilterDefinition;
|
|
341
|
+
}[]>;
|
|
342
|
+
constructor();
|
|
343
|
+
private connectorLayoutRafId;
|
|
344
|
+
private connectorResizeObserver;
|
|
345
|
+
/**
|
|
346
|
+
* Initialize a ResizeObserver to keep connector line bounds synced with the DOM.
|
|
347
|
+
* This is browser-only and safely skipped during SSR.
|
|
348
|
+
*/
|
|
349
|
+
private initConnectorAutoLayout;
|
|
350
|
+
private scheduleConnectorLayoutUpdate;
|
|
351
|
+
/**
|
|
352
|
+
* Sets CSS variables on each group element so the vertical connector line
|
|
353
|
+
* starts/ends exactly at the center of the first/last rendered row.
|
|
354
|
+
*
|
|
355
|
+
* This fixes cases where an item grows vertically (nested groups), which
|
|
356
|
+
* cannot be handled accurately by fixed CSS insets.
|
|
357
|
+
*/
|
|
358
|
+
private updateConnectorCssVars;
|
|
359
|
+
private generateId;
|
|
360
|
+
private updateValue;
|
|
361
|
+
/**
|
|
362
|
+
* Normalize order property for all items in the query structure
|
|
363
|
+
* Ensures all items have order property and filters are sorted by order
|
|
364
|
+
*/
|
|
365
|
+
private normalizeOrder;
|
|
366
|
+
/**
|
|
367
|
+
* Get sorted filters for a group (used in template)
|
|
368
|
+
* Ensures filters are sorted by order property
|
|
369
|
+
*/
|
|
370
|
+
protected getSortedFilters(filters: AXPFilterClause[]): AXPFilterClause[];
|
|
371
|
+
private findGroupById;
|
|
372
|
+
/**
|
|
373
|
+
* Add a new condition (rule) to the root group
|
|
374
|
+
* All conditions must be inside a group, so this adds to the root group
|
|
375
|
+
*/
|
|
376
|
+
addCondition(): void;
|
|
377
|
+
/**
|
|
378
|
+
* Add a new nested group to the root group
|
|
379
|
+
* All groups must be inside the root group
|
|
380
|
+
*/
|
|
381
|
+
addGroup(): void;
|
|
382
|
+
/**
|
|
383
|
+
* Add a new condition to a specific group
|
|
384
|
+
*/
|
|
385
|
+
addConditionToGroup(groupId: string): void;
|
|
386
|
+
/**
|
|
387
|
+
* Get filter definition by field ID
|
|
388
|
+
* Used to resolve widget type and metadata for a condition
|
|
389
|
+
*/
|
|
390
|
+
getFilterDefinition(fieldId: string): AXPFilterDefinition | undefined;
|
|
391
|
+
/**
|
|
392
|
+
* Resolve default filter widget type for a field
|
|
393
|
+
* Uses widget registry to get the defaultFilterWidgetName from the field's widget config
|
|
394
|
+
*/
|
|
395
|
+
resolveDefaultFilterWidget(fieldId: string): string;
|
|
396
|
+
/**
|
|
397
|
+
* Convert QueryBuilderData to AXPFilterClause format
|
|
398
|
+
*
|
|
399
|
+
* This method transforms the internal query builder structure to the platform's filter clause format
|
|
400
|
+
* that can be consumed by data sources and query services.
|
|
401
|
+
*
|
|
402
|
+
* Conversion Logic:
|
|
403
|
+
* - Conditions (rules) are converted to AXDataSourceFilterOption with field, operator, and value
|
|
404
|
+
* - Groups are converted to nested filter structures with logic (AND/OR) and filters array
|
|
405
|
+
* - Empty conditions (no field or value) are skipped
|
|
406
|
+
* - Single-item groups are flattened (no nested structure needed)
|
|
407
|
+
*
|
|
408
|
+
* @returns AXPFilterClause compatible with AXDataSourceFilterOption structure
|
|
409
|
+
*
|
|
410
|
+
* Example output:
|
|
411
|
+
* {
|
|
412
|
+
* logic: 'and',
|
|
413
|
+
* filters: [
|
|
414
|
+
* { field: 'name', operator: { type: 'contains' }, value: 'John' },
|
|
415
|
+
* {
|
|
416
|
+
* logic: 'or',
|
|
417
|
+
* filters: [
|
|
418
|
+
* { field: 'age', operator: { type: 'gt' }, value: 18 },
|
|
419
|
+
* { field: 'status', operator: { type: 'equal' }, value: 'active' }
|
|
420
|
+
* ]
|
|
421
|
+
* }
|
|
422
|
+
* ]
|
|
423
|
+
* }
|
|
424
|
+
*/
|
|
425
|
+
toFilterClause(): AXPFilterClause;
|
|
426
|
+
addGroupToGroup(parentGroupId: string): void;
|
|
427
|
+
removeItem(id: string): void;
|
|
428
|
+
updateCondition(condition: SelectedField): void;
|
|
429
|
+
updateRootLogicalOperator(operator: AXFilterLogic): void;
|
|
430
|
+
updateGroupLogicalOperator(groupId: string, operator: AXFilterLogic): void;
|
|
431
|
+
clearAll(): void;
|
|
432
|
+
getTotalItemsCount(): number;
|
|
433
|
+
reorderRootItems(event: AXDropListDroppedEvent): void;
|
|
434
|
+
reorderGroupItems(groupId: string, previousIndex: number, currentIndex: number): void;
|
|
435
|
+
reorderGroupItemsEvent(groupId: string, event: AXDropListDroppedEvent): void;
|
|
436
|
+
moveItemUp(index: number, parentId: string): void;
|
|
437
|
+
moveItemDown(index: number, parentId: string): void;
|
|
438
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPWhereBuilderComponent, never>;
|
|
439
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXPWhereBuilderComponent, "axp-where-builder", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "filterDefinitions": { "alias": "filterDefinitions"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* Columns Builder Component
|
|
444
|
+
*
|
|
445
|
+
* Handles column selection for query builder.
|
|
446
|
+
* Provides multi-select interface with select all/clear all functionality.
|
|
447
|
+
*/
|
|
448
|
+
declare class AXPColumnsBuilderComponent {
|
|
449
|
+
/**
|
|
450
|
+
* Available columns from datasource definition
|
|
451
|
+
*/
|
|
452
|
+
columns: _angular_core.InputSignal<AXPQueryBuilderDataFieldDefinition[]>;
|
|
453
|
+
/**
|
|
454
|
+
* Selected column names
|
|
455
|
+
*/
|
|
456
|
+
value: _angular_core.InputSignal<string[]>;
|
|
457
|
+
/**
|
|
458
|
+
* Emitted when selection changes
|
|
459
|
+
*/
|
|
460
|
+
valueChange: _angular_core.OutputEmitterRef<string[]>;
|
|
461
|
+
/**
|
|
462
|
+
* Columns data source for multi-select
|
|
463
|
+
*/
|
|
464
|
+
protected readonly columnsDataSource: _angular_core.Signal<AXDataSource<{
|
|
465
|
+
value: string;
|
|
466
|
+
text: string;
|
|
467
|
+
definition: AXPQueryBuilderDataFieldDefinition;
|
|
468
|
+
} | null>>;
|
|
469
|
+
/**
|
|
470
|
+
* Handle columns selection change
|
|
471
|
+
*/
|
|
472
|
+
protected onColumnsChange(selectedColumns: string[]): void;
|
|
473
|
+
/**
|
|
474
|
+
* Select all columns
|
|
475
|
+
*/
|
|
476
|
+
protected selectAll(): void;
|
|
477
|
+
/**
|
|
478
|
+
* Clear all columns
|
|
479
|
+
*/
|
|
480
|
+
protected clearAll(): void;
|
|
481
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPColumnsBuilderComponent, never>;
|
|
482
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXPColumnsBuilderComponent, "axp-columns-builder", never, { "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* Sort Builder Component
|
|
487
|
+
*
|
|
488
|
+
* Handles sort rules for query builder.
|
|
489
|
+
* Allows adding/removing sort rules with field and direction selection.
|
|
490
|
+
*/
|
|
491
|
+
declare class AXPSortBuilderComponent {
|
|
492
|
+
/**
|
|
493
|
+
* Available columns from datasource definition
|
|
494
|
+
*/
|
|
495
|
+
columns: _angular_core.InputSignal<AXPQueryBuilderDataFieldDefinition[]>;
|
|
496
|
+
/**
|
|
497
|
+
* Current sort rules
|
|
498
|
+
*/
|
|
499
|
+
value: _angular_core.InputSignal<AXPQuerySortRule[]>;
|
|
500
|
+
/**
|
|
501
|
+
* Emitted when sort rules change
|
|
502
|
+
*/
|
|
503
|
+
valueChange: _angular_core.OutputEmitterRef<AXPQuerySortRule[]>;
|
|
504
|
+
/**
|
|
505
|
+
* Sort field data source (from columns)
|
|
506
|
+
*/
|
|
507
|
+
protected readonly sortFieldDataSource: _angular_core.Signal<AXDataSource<{
|
|
508
|
+
value: string;
|
|
509
|
+
text: string;
|
|
510
|
+
} | null>>;
|
|
511
|
+
/**
|
|
512
|
+
* Sort direction options
|
|
513
|
+
*/
|
|
514
|
+
protected readonly sortDirectionItems: {
|
|
515
|
+
value: string;
|
|
516
|
+
text: string;
|
|
517
|
+
}[];
|
|
518
|
+
protected readonly sortDirectionDataSource: AXDataSource<{
|
|
519
|
+
value: string;
|
|
520
|
+
text: string;
|
|
521
|
+
} | undefined>;
|
|
522
|
+
/**
|
|
523
|
+
* Add a new sort rule
|
|
524
|
+
*/
|
|
525
|
+
protected addSortRule(): void;
|
|
526
|
+
/**
|
|
527
|
+
* Remove a sort rule
|
|
528
|
+
*/
|
|
529
|
+
protected removeSortRule(index: number): void;
|
|
530
|
+
/**
|
|
531
|
+
* Update a sort rule field
|
|
532
|
+
*/
|
|
533
|
+
protected updateSortRuleField(index: number, field: string): void;
|
|
534
|
+
/**
|
|
535
|
+
* Update a sort rule direction
|
|
536
|
+
*/
|
|
537
|
+
protected updateSortRuleDirection(index: number, dir: string): void;
|
|
538
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPSortBuilderComponent, never>;
|
|
539
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXPSortBuilderComponent, "axp-sort-builder", never, { "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* Group By Builder Component
|
|
544
|
+
*
|
|
545
|
+
* Handles group by column selection for query builder.
|
|
546
|
+
* Provides multi-select interface with select all/clear all functionality.
|
|
547
|
+
*/
|
|
548
|
+
declare class AXPGroupByBuilderComponent {
|
|
549
|
+
/**
|
|
550
|
+
* Available columns from datasource definition
|
|
551
|
+
*/
|
|
552
|
+
columns: _angular_core.InputSignal<AXPQueryBuilderDataFieldDefinition[]>;
|
|
553
|
+
/**
|
|
554
|
+
* Selected column names for group by
|
|
555
|
+
*/
|
|
556
|
+
value: _angular_core.InputSignal<string[]>;
|
|
557
|
+
/**
|
|
558
|
+
* Emitted when selection changes
|
|
559
|
+
*/
|
|
560
|
+
valueChange: _angular_core.OutputEmitterRef<string[]>;
|
|
561
|
+
/**
|
|
562
|
+
* Group By columns data source (same as columns)
|
|
563
|
+
*/
|
|
564
|
+
protected readonly groupByDataSource: _angular_core.Signal<AXDataSource<{
|
|
565
|
+
value: string;
|
|
566
|
+
text: string;
|
|
567
|
+
definition: AXPQueryBuilderDataFieldDefinition;
|
|
568
|
+
} | null>>;
|
|
569
|
+
/**
|
|
570
|
+
* Handle group by selection change
|
|
571
|
+
*/
|
|
572
|
+
protected onGroupByChange(selectedColumns: string[]): void;
|
|
573
|
+
/**
|
|
574
|
+
* Select all columns
|
|
575
|
+
*/
|
|
576
|
+
protected selectAll(): void;
|
|
577
|
+
/**
|
|
578
|
+
* Clear all columns
|
|
579
|
+
*/
|
|
580
|
+
protected clearAll(): void;
|
|
581
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPGroupByBuilderComponent, never>;
|
|
582
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXPGroupByBuilderComponent, "axp-group-by-builder", never, { "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
/**
|
|
586
|
+
* Aggregate Builder Component
|
|
587
|
+
*
|
|
588
|
+
* Handles aggregate function selection and configuration for query builder.
|
|
589
|
+
* Provides filtering by category and database type, and allows adding/removing aggregate operations.
|
|
590
|
+
*/
|
|
591
|
+
declare class AXPAggregateBuilderComponent {
|
|
592
|
+
private readonly aggregateFunctionService;
|
|
593
|
+
/**
|
|
594
|
+
* Available columns from datasource definition
|
|
595
|
+
*/
|
|
596
|
+
columns: _angular_core.InputSignal<AXPQueryBuilderDataFieldDefinition[]>;
|
|
597
|
+
/**
|
|
598
|
+
* Current aggregate operations
|
|
599
|
+
*/
|
|
600
|
+
value: _angular_core.InputSignal<AXPAggregateOperation[]>;
|
|
601
|
+
/**
|
|
602
|
+
* Database type for filtering functions (optional)
|
|
603
|
+
* If provided, only functions supported by this database will be shown
|
|
604
|
+
*/
|
|
605
|
+
databaseType: _angular_core.InputSignal<string | undefined>;
|
|
606
|
+
/**
|
|
607
|
+
* Emitted when aggregate operations change
|
|
608
|
+
*/
|
|
609
|
+
valueChange: _angular_core.OutputEmitterRef<AXPAggregateOperation[]>;
|
|
610
|
+
protected selectedCategory: _angular_core.WritableSignal<string>;
|
|
611
|
+
protected searchText: _angular_core.WritableSignal<string>;
|
|
612
|
+
protected showAddForm: _angular_core.WritableSignal<boolean>;
|
|
613
|
+
protected newAggregate: _angular_core.WritableSignal<Partial<AXPAggregateOperation>>;
|
|
614
|
+
protected availableFunctionsList: _angular_core.WritableSignal<AXPAggregateFunctionDefinition[]>;
|
|
615
|
+
protected availableCategoriesList: _angular_core.WritableSignal<string[]>;
|
|
616
|
+
protected editingNestedIndex: _angular_core.WritableSignal<{
|
|
617
|
+
parentIndex: number;
|
|
618
|
+
nestedIndex: number;
|
|
619
|
+
} | null>;
|
|
620
|
+
protected maxNestingDepth: _angular_core.WritableSignal<number>;
|
|
621
|
+
constructor();
|
|
622
|
+
/**
|
|
623
|
+
* Load max nesting depth from service
|
|
624
|
+
*/
|
|
625
|
+
private loadMaxNestingDepth;
|
|
626
|
+
/**
|
|
627
|
+
* Available aggregate functions filtered by category, database, and search
|
|
628
|
+
*/
|
|
629
|
+
protected readonly availableFunctions: _angular_core.Signal<AXPAggregateFunctionDefinition[]>;
|
|
630
|
+
/**
|
|
631
|
+
* Available categories
|
|
632
|
+
*/
|
|
633
|
+
protected readonly categories: _angular_core.Signal<{
|
|
634
|
+
value: string;
|
|
635
|
+
text: string;
|
|
636
|
+
}[]>;
|
|
637
|
+
/**
|
|
638
|
+
* Categories data source for filter dropdown
|
|
639
|
+
*/
|
|
640
|
+
protected readonly categoriesDataSource: _angular_core.Signal<AXDataSource<{
|
|
641
|
+
value: string;
|
|
642
|
+
text: string;
|
|
643
|
+
} | null>>;
|
|
644
|
+
/**
|
|
645
|
+
* Columns data source for field selection
|
|
646
|
+
*/
|
|
647
|
+
protected readonly columnsDataSource: _angular_core.Signal<AXDataSource<{
|
|
648
|
+
value: string;
|
|
649
|
+
text: string;
|
|
650
|
+
} | null>>;
|
|
651
|
+
/**
|
|
652
|
+
* Functions data source for function selection
|
|
653
|
+
*/
|
|
654
|
+
protected readonly functionsDataSource: _angular_core.Signal<AXDataSource<{
|
|
655
|
+
value: string;
|
|
656
|
+
text: string;
|
|
657
|
+
definition: AXPAggregateFunctionDefinition;
|
|
658
|
+
} | null>>;
|
|
659
|
+
/**
|
|
660
|
+
* Add a new aggregate operation
|
|
661
|
+
*/
|
|
662
|
+
protected addAggregate(): void;
|
|
663
|
+
/**
|
|
664
|
+
* Remove an aggregate operation
|
|
665
|
+
*/
|
|
666
|
+
protected removeAggregate(index: number): void;
|
|
667
|
+
/**
|
|
668
|
+
* Update an aggregate operation
|
|
669
|
+
*/
|
|
670
|
+
protected updateAggregate(index: number, updates: Partial<AXPAggregateOperation>): void;
|
|
671
|
+
/**
|
|
672
|
+
* Load functions from service
|
|
673
|
+
*/
|
|
674
|
+
private loadFunctions;
|
|
675
|
+
/**
|
|
676
|
+
* Load categories from service
|
|
677
|
+
*/
|
|
678
|
+
private loadCategories;
|
|
679
|
+
/**
|
|
680
|
+
* Get function definition for display (synchronous, uses cache)
|
|
681
|
+
*/
|
|
682
|
+
protected getFunctionDefinition(functionName: string): AXPAggregateFunctionDefinition | undefined;
|
|
683
|
+
/**
|
|
684
|
+
* Check if function requires field
|
|
685
|
+
* Note: Functions that support nested aggregates don't require a field (they can use nestedAggregates instead)
|
|
686
|
+
*/
|
|
687
|
+
protected functionRequiresField(functionName: string): boolean;
|
|
688
|
+
/**
|
|
689
|
+
* Check if function supports distinct
|
|
690
|
+
*/
|
|
691
|
+
protected functionSupportsDistinct(functionName: string): boolean;
|
|
692
|
+
/**
|
|
693
|
+
* Get category title for display
|
|
694
|
+
*/
|
|
695
|
+
protected getCategoryTitle(category: AXPAggregateCategory | 'all'): string;
|
|
696
|
+
/**
|
|
697
|
+
* Toggle add form visibility
|
|
698
|
+
*/
|
|
699
|
+
protected toggleAddForm(): void;
|
|
700
|
+
/**
|
|
701
|
+
* Reset new aggregate form
|
|
702
|
+
*/
|
|
703
|
+
protected resetNewAggregate(): void;
|
|
704
|
+
/**
|
|
705
|
+
* Handle function selection change
|
|
706
|
+
*/
|
|
707
|
+
protected onFunctionChange(functionName: string): void;
|
|
708
|
+
/**
|
|
709
|
+
* Handle field selection change
|
|
710
|
+
*/
|
|
711
|
+
protected onFieldChange(field: string): void;
|
|
712
|
+
/**
|
|
713
|
+
* Handle alias change
|
|
714
|
+
*/
|
|
715
|
+
protected onAliasChange(alias: string): void;
|
|
716
|
+
/**
|
|
717
|
+
* Handle distinct change
|
|
718
|
+
*/
|
|
719
|
+
protected onDistinctChange(distinct: boolean): void;
|
|
720
|
+
/**
|
|
721
|
+
* Check if function supports nested aggregates
|
|
722
|
+
*/
|
|
723
|
+
protected functionSupportsNested(functionName: string): boolean;
|
|
724
|
+
/**
|
|
725
|
+
* Check if can add more nested aggregates (based on depth)
|
|
726
|
+
*/
|
|
727
|
+
protected canAddNestedAggregate(parentIndex: number, currentDepth?: number): boolean;
|
|
728
|
+
/**
|
|
729
|
+
* Get current nesting depth for an aggregate operation
|
|
730
|
+
*/
|
|
731
|
+
protected getNestingDepth(agg: AXPAggregateOperation, currentDepth?: number): number;
|
|
732
|
+
/**
|
|
733
|
+
* Add nested aggregate to an existing aggregate operation
|
|
734
|
+
*/
|
|
735
|
+
protected addNestedAggregate(parentIndex: number): void;
|
|
736
|
+
/**
|
|
737
|
+
* Remove nested aggregate from an aggregate operation
|
|
738
|
+
*/
|
|
739
|
+
protected removeNestedAggregate(parentIndex: number, nestedIndex: number): void;
|
|
740
|
+
/**
|
|
741
|
+
* Update nested aggregate
|
|
742
|
+
*/
|
|
743
|
+
protected updateNestedAggregate(parentIndex: number, nestedIndex: number, updates: Partial<AXPAggregateOperation>): void;
|
|
744
|
+
/**
|
|
745
|
+
* Add nested aggregate to new aggregate form
|
|
746
|
+
*/
|
|
747
|
+
protected addNestedToNewAggregate(): void;
|
|
748
|
+
/**
|
|
749
|
+
* Remove nested aggregate from new aggregate form
|
|
750
|
+
*/
|
|
751
|
+
protected removeNestedFromNewAggregate(nestedIndex: number): void;
|
|
752
|
+
/**
|
|
753
|
+
* Update nested aggregate in new aggregate form
|
|
754
|
+
*/
|
|
755
|
+
protected updateNestedInNewAggregate(nestedIndex: number, updates: Partial<AXPAggregateOperation>): void;
|
|
756
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPAggregateBuilderComponent, never>;
|
|
757
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXPAggregateBuilderComponent, "axp-aggregate-builder", never, { "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "databaseType": { "alias": "databaseType"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
/**
|
|
761
|
+
* Standard Aggregate Functions Registry
|
|
762
|
+
*
|
|
763
|
+
* Provides a comprehensive list of aggregate functions with their properties,
|
|
764
|
+
* categories, and database support information.
|
|
765
|
+
*
|
|
766
|
+
* Based on SQL standard (ISO/IEC 9075) and common NoSQL implementations.
|
|
767
|
+
*/
|
|
768
|
+
declare class AXPAggregateFunctionsRegistry {
|
|
769
|
+
private static readonly functions;
|
|
770
|
+
/**
|
|
771
|
+
* Get all aggregate functions
|
|
772
|
+
*/
|
|
773
|
+
static getAll(): AXPAggregateFunctionDefinition[];
|
|
774
|
+
/**
|
|
775
|
+
* Get functions by category
|
|
776
|
+
*/
|
|
777
|
+
static getByCategory(category: AXPAggregateCategory): AXPAggregateFunctionDefinition[];
|
|
778
|
+
/**
|
|
779
|
+
* Get functions by database support
|
|
780
|
+
*/
|
|
781
|
+
static getByDatabase(database: AXPDatabaseType): AXPAggregateFunctionDefinition[];
|
|
782
|
+
/**
|
|
783
|
+
* Get functions filtered by category and/or database
|
|
784
|
+
*/
|
|
785
|
+
static getFiltered(options: {
|
|
786
|
+
category?: AXPAggregateCategory;
|
|
787
|
+
database?: AXPDatabaseType;
|
|
788
|
+
search?: string;
|
|
789
|
+
}): AXPAggregateFunctionDefinition[];
|
|
790
|
+
/**
|
|
791
|
+
* Get function by name
|
|
792
|
+
*/
|
|
793
|
+
static getByName(name: string): AXPAggregateFunctionDefinition | undefined;
|
|
794
|
+
/**
|
|
795
|
+
* Get all categories
|
|
796
|
+
*/
|
|
797
|
+
static getCategories(): AXPAggregateCategory[];
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
/**
|
|
801
|
+
* Aggregate Function Provider Token
|
|
802
|
+
* Can be a provider instance or a Promise that resolves to a provider
|
|
803
|
+
*/
|
|
804
|
+
type AXPAggregateFunctionProviderToken = AXPAggregateFunctionProvider | Promise<AXPAggregateFunctionProvider>;
|
|
805
|
+
/**
|
|
806
|
+
* Injection token for aggregate function providers
|
|
807
|
+
* Multiple providers can be registered to extend aggregate function definitions
|
|
808
|
+
*/
|
|
809
|
+
declare const AXP_AGGREGATE_FUNCTION_PROVIDER: InjectionToken<AXPAggregateFunctionProviderToken[]>;
|
|
810
|
+
/**
|
|
811
|
+
* Aggregate Function Provider Interface
|
|
812
|
+
*
|
|
813
|
+
* Allows modules to provide custom aggregate functions that extend
|
|
814
|
+
* the default set of aggregate functions available in the query builder.
|
|
815
|
+
*
|
|
816
|
+
* Example usage:
|
|
817
|
+
* ```typescript
|
|
818
|
+
* @Injectable()
|
|
819
|
+
* export class MyCustomAggregateProvider implements AXPAggregateFunctionProvider {
|
|
820
|
+
* async getFunctions(databaseType?: AXPDatabaseType): Promise<AXPAggregateFunctionDefinition[]> {
|
|
821
|
+
* return [
|
|
822
|
+
* {
|
|
823
|
+
* name: 'custom_avg',
|
|
824
|
+
* title: 'CUSTOM_AVG',
|
|
825
|
+
* description: 'Custom average function',
|
|
826
|
+
* category: 'statistical',
|
|
827
|
+
* supportedDatabases: ['mysql'],
|
|
828
|
+
* requiresField: true,
|
|
829
|
+
* supportsDistinct: true,
|
|
830
|
+
* }
|
|
831
|
+
* ];
|
|
832
|
+
* }
|
|
833
|
+
* }
|
|
834
|
+
* ```
|
|
835
|
+
*/
|
|
836
|
+
interface AXPAggregateFunctionProvider {
|
|
837
|
+
/**
|
|
838
|
+
* Get list of aggregate functions
|
|
839
|
+
*
|
|
840
|
+
* @param databaseType - Optional database type filter. If provided, only functions
|
|
841
|
+
* supported by this database type should be returned.
|
|
842
|
+
* If undefined, return all functions.
|
|
843
|
+
* @returns Promise that resolves to array of aggregate function definitions
|
|
844
|
+
*/
|
|
845
|
+
getFunctions(databaseType?: AXPDatabaseType): Promise<AXPAggregateFunctionDefinition[]>;
|
|
846
|
+
/**
|
|
847
|
+
* Get a single aggregate function by name
|
|
848
|
+
*
|
|
849
|
+
* @param name - Function name/identifier (e.g., 'sum', 'avg', 'count')
|
|
850
|
+
* @returns Promise that resolves to function definition or undefined if not found
|
|
851
|
+
*/
|
|
852
|
+
getByName(name: string): Promise<AXPAggregateFunctionDefinition | undefined>;
|
|
853
|
+
/**
|
|
854
|
+
* Get all unique categories available from this provider
|
|
855
|
+
*
|
|
856
|
+
* @returns Promise that resolves to array of category names
|
|
857
|
+
*/
|
|
858
|
+
getCategories(): Promise<AXPAggregateCategory[]>;
|
|
859
|
+
/**
|
|
860
|
+
* Get maximum nesting depth for nested aggregates
|
|
861
|
+
*
|
|
862
|
+
* @returns Maximum allowed nesting depth (default: 3)
|
|
863
|
+
*/
|
|
864
|
+
getMaxNestingDepth(): number;
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
/**
|
|
868
|
+
* Aggregate Function Service
|
|
869
|
+
*
|
|
870
|
+
* Aggregates functions from all registered providers and provides a unified API
|
|
871
|
+
* for accessing aggregate function definitions.
|
|
872
|
+
*
|
|
873
|
+
* Performance optimizations:
|
|
874
|
+
* 1. Aggressive caching prevents duplicate API calls
|
|
875
|
+
* 2. Single pending request per resource prevents race conditions
|
|
876
|
+
* 3. Lazy loading - only loads data when needed
|
|
877
|
+
* 4. Merges results from all providers
|
|
878
|
+
*/
|
|
879
|
+
declare class AXPAggregateFunctionService {
|
|
880
|
+
private readonly providers;
|
|
881
|
+
private readonly categoryProviders;
|
|
882
|
+
/** Cache for all functions by database type - O(1) lookup */
|
|
883
|
+
private functionsByDatabaseType;
|
|
884
|
+
/** Cache for functions by name - O(1) lookup */
|
|
885
|
+
private functionsByName;
|
|
886
|
+
/** Cache for categories */
|
|
887
|
+
private categoriesCache;
|
|
888
|
+
/** Pending API requests to prevent duplicate calls */
|
|
889
|
+
private pendingFunctionsRequests;
|
|
890
|
+
private pendingFunctionRequests;
|
|
891
|
+
private pendingCategoriesRequest;
|
|
892
|
+
/**
|
|
893
|
+
* Get all aggregate functions with optional database type filter
|
|
894
|
+
*
|
|
895
|
+
* Optimization: Returns cached result immediately if available,
|
|
896
|
+
* preventing unnecessary API calls
|
|
897
|
+
*
|
|
898
|
+
* @param databaseType - Optional database type filter
|
|
899
|
+
* @returns Array of aggregate function definitions
|
|
900
|
+
*/
|
|
901
|
+
getFunctions(databaseType?: AXPDatabaseType): Promise<AXPAggregateFunctionDefinition[]>;
|
|
902
|
+
/**
|
|
903
|
+
* Get single function by name with O(1) lookup
|
|
904
|
+
*
|
|
905
|
+
* Optimization: Uses Map for instant retrieval, falls back to
|
|
906
|
+
* searching cache, then providers if not found
|
|
907
|
+
*/
|
|
908
|
+
getByName(name: string): Promise<AXPAggregateFunctionDefinition | undefined>;
|
|
909
|
+
/**
|
|
910
|
+
* Get all unique categories from all providers
|
|
911
|
+
*
|
|
912
|
+
* @returns Array of category names
|
|
913
|
+
*/
|
|
914
|
+
getCategories(): Promise<AXPAggregateCategory[]>;
|
|
915
|
+
/**
|
|
916
|
+
* Get maximum nesting depth for nested aggregates
|
|
917
|
+
* Returns the minimum depth from all providers (most restrictive)
|
|
918
|
+
*
|
|
919
|
+
* @returns Maximum allowed nesting depth
|
|
920
|
+
*/
|
|
921
|
+
getMaxNestingDepth(): number;
|
|
922
|
+
/**
|
|
923
|
+
* Load functions from all providers and merge results
|
|
924
|
+
*
|
|
925
|
+
* Optimization: Merges results from all providers, removes duplicates by name
|
|
926
|
+
*/
|
|
927
|
+
private loadFunctionsFromProviders;
|
|
928
|
+
/**
|
|
929
|
+
* Load single function from providers
|
|
930
|
+
*/
|
|
931
|
+
private loadFunctionFromProviders;
|
|
932
|
+
/**
|
|
933
|
+
* Load categories from all providers and merge unique values
|
|
934
|
+
*/
|
|
935
|
+
private loadCategoriesFromProviders;
|
|
936
|
+
/**
|
|
937
|
+
* Clear all caches
|
|
938
|
+
*/
|
|
939
|
+
clearAllCache(): void;
|
|
940
|
+
/**
|
|
941
|
+
* Clear functions cache only
|
|
942
|
+
*/
|
|
943
|
+
clearFunctionsCache(): void;
|
|
944
|
+
/**
|
|
945
|
+
* Clear categories cache only
|
|
946
|
+
*/
|
|
947
|
+
clearCategoriesCache(): void;
|
|
948
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPAggregateFunctionService, never>;
|
|
949
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPAggregateFunctionService>;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
/**
|
|
953
|
+
* Default Aggregate Function Provider
|
|
954
|
+
*
|
|
955
|
+
* Provides the standard set of aggregate functions defined in the registry.
|
|
956
|
+
* This is the default provider that includes all built-in aggregate functions
|
|
957
|
+
* (SUM, AVG, COUNT, MIN, MAX, CONCAT, etc.).
|
|
958
|
+
*
|
|
959
|
+
* This provider is automatically registered and provides the base set of
|
|
960
|
+
* aggregate functions. Additional providers can be registered to extend
|
|
961
|
+
* this functionality.
|
|
962
|
+
*/
|
|
963
|
+
declare class AXMDefaultAggregateFunctionProvider implements AXPAggregateFunctionProvider {
|
|
964
|
+
/**
|
|
965
|
+
* Get list of aggregate functions
|
|
966
|
+
*
|
|
967
|
+
* @param databaseType - Optional database type filter
|
|
968
|
+
* @returns Promise that resolves to array of aggregate function definitions
|
|
969
|
+
*/
|
|
970
|
+
getFunctions(databaseType?: AXPDatabaseType): Promise<AXPAggregateFunctionDefinition[]>;
|
|
971
|
+
/**
|
|
972
|
+
* Get a single aggregate function by name
|
|
973
|
+
*
|
|
974
|
+
* @param name - Function name/identifier
|
|
975
|
+
* @returns Promise that resolves to function definition or undefined
|
|
976
|
+
*/
|
|
977
|
+
getByName(name: string): Promise<AXPAggregateFunctionDefinition | undefined>;
|
|
978
|
+
/**
|
|
979
|
+
* Get all unique categories available
|
|
980
|
+
*
|
|
981
|
+
* @returns Promise that resolves to array of category names
|
|
982
|
+
*/
|
|
983
|
+
getCategories(): Promise<AXPAggregateCategory[]>;
|
|
984
|
+
getMaxNestingDepth(): number;
|
|
985
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMDefaultAggregateFunctionProvider, never>;
|
|
986
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMDefaultAggregateFunctionProvider>;
|
|
987
|
+
}
|
|
988
|
+
/**
|
|
989
|
+
* Default Aggregate Function Provider Registration
|
|
990
|
+
*
|
|
991
|
+
* This constant can be used in module providers to register the default provider:
|
|
992
|
+
*
|
|
993
|
+
* ```typescript
|
|
994
|
+
* @NgModule({
|
|
995
|
+
* providers: [
|
|
996
|
+
* AXP_DEFAULT_AGGREGATE_FUNCTION_PROVIDER,
|
|
997
|
+
* ],
|
|
998
|
+
* })
|
|
999
|
+
* ```
|
|
1000
|
+
*/
|
|
1001
|
+
declare const AXP_DEFAULT_AGGREGATE_FUNCTION_PROVIDER: {
|
|
1002
|
+
provide: _angular_core.InjectionToken<_acorex_platform_module_data_management_client.AXPAggregateFunctionProviderToken[]>;
|
|
1003
|
+
useClass: typeof AXMDefaultAggregateFunctionProvider;
|
|
1004
|
+
multi: boolean;
|
|
1005
|
+
};
|
|
1006
|
+
|
|
1007
|
+
/**
|
|
1008
|
+
* Raw Query Builder Component
|
|
1009
|
+
*
|
|
1010
|
+
* Provides a text area for writing raw SQL/queries with:
|
|
1011
|
+
* - Query language selector (MySQL, PostgreSQL, MongoDB, etc.)
|
|
1012
|
+
* - Syntax validation with error highlighting
|
|
1013
|
+
* - Two-way sync with structured query builder
|
|
1014
|
+
*/
|
|
1015
|
+
declare class AXPRawQueryBuilderComponent {
|
|
1016
|
+
private readonly databaseTypeService;
|
|
1017
|
+
/**
|
|
1018
|
+
* Current raw query string
|
|
1019
|
+
*/
|
|
1020
|
+
value: _angular_core.InputSignal<string>;
|
|
1021
|
+
/**
|
|
1022
|
+
* Current query language (database type name)
|
|
1023
|
+
*/
|
|
1024
|
+
queryLanguage: _angular_core.InputSignal<string>;
|
|
1025
|
+
/**
|
|
1026
|
+
* Emitted when raw query changes
|
|
1027
|
+
*/
|
|
1028
|
+
valueChange: _angular_core.OutputEmitterRef<string>;
|
|
1029
|
+
/**
|
|
1030
|
+
* Emitted when query language changes
|
|
1031
|
+
*/
|
|
1032
|
+
queryLanguageChange: _angular_core.OutputEmitterRef<string>;
|
|
1033
|
+
protected rawQuery: _angular_core.WritableSignal<string>;
|
|
1034
|
+
protected selectedLanguage: _angular_core.WritableSignal<string>;
|
|
1035
|
+
protected validationError: _angular_core.WritableSignal<string | null>;
|
|
1036
|
+
protected isValid: _angular_core.Signal<boolean>;
|
|
1037
|
+
protected databaseTypes: _angular_core.WritableSignal<{
|
|
1038
|
+
value: string;
|
|
1039
|
+
text: string;
|
|
1040
|
+
}[]>;
|
|
1041
|
+
/**
|
|
1042
|
+
* Available query languages (loaded from database type service)
|
|
1043
|
+
*/
|
|
1044
|
+
protected queryLanguageDataSource: _angular_core.WritableSignal<AXDataSource<{
|
|
1045
|
+
value: string;
|
|
1046
|
+
text: string;
|
|
1047
|
+
} | null>>;
|
|
1048
|
+
constructor();
|
|
1049
|
+
/**
|
|
1050
|
+
* Handle raw query text change
|
|
1051
|
+
*/
|
|
1052
|
+
protected onQueryChange(query: string): void;
|
|
1053
|
+
/**
|
|
1054
|
+
* Load database types from service
|
|
1055
|
+
*/
|
|
1056
|
+
private loadDatabaseTypes;
|
|
1057
|
+
/**
|
|
1058
|
+
* Handle query language change
|
|
1059
|
+
*/
|
|
1060
|
+
protected onLanguageChange(language: string): void;
|
|
1061
|
+
/**
|
|
1062
|
+
* Validate SQL query syntax using database type service
|
|
1063
|
+
*/
|
|
1064
|
+
protected validateQuery(query: string): Promise<void>;
|
|
1065
|
+
/**
|
|
1066
|
+
* Format/beautify the query
|
|
1067
|
+
*/
|
|
1068
|
+
protected formatQuery(): void;
|
|
1069
|
+
/**
|
|
1070
|
+
* Clear the query
|
|
1071
|
+
*/
|
|
1072
|
+
protected clearQuery(): void;
|
|
1073
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPRawQueryBuilderComponent, never>;
|
|
1074
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXPRawQueryBuilderComponent, "axp-raw-query-builder", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "queryLanguage": { "alias": "queryLanguage"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "queryLanguageChange": "queryLanguageChange"; }, never, never, true, never>;
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
/**
|
|
1078
|
+
* Database Type Definition
|
|
1079
|
+
* Defines a database type with its properties and capabilities
|
|
1080
|
+
*/
|
|
1081
|
+
interface AXPDatabaseTypeDefinition {
|
|
1082
|
+
/**
|
|
1083
|
+
* Unique identifier for the database type (e.g., 'mysql', 'postgresql', 'mongodb')
|
|
1084
|
+
*/
|
|
1085
|
+
name: string;
|
|
1086
|
+
/**
|
|
1087
|
+
* Display title (e.g., 'MySQL', 'PostgreSQL', 'MongoDB')
|
|
1088
|
+
*/
|
|
1089
|
+
title: string;
|
|
1090
|
+
/**
|
|
1091
|
+
* Description of the database type
|
|
1092
|
+
*/
|
|
1093
|
+
description: string;
|
|
1094
|
+
/**
|
|
1095
|
+
* SQL identifier escape character (e.g., '`' for MySQL, '"' for PostgreSQL)
|
|
1096
|
+
*/
|
|
1097
|
+
identifierQuote: string;
|
|
1098
|
+
/**
|
|
1099
|
+
* Whether this database supports SQL syntax
|
|
1100
|
+
*/
|
|
1101
|
+
supportsSql: boolean;
|
|
1102
|
+
/**
|
|
1103
|
+
* Whether this database is NoSQL
|
|
1104
|
+
*/
|
|
1105
|
+
isNoSql: boolean;
|
|
1106
|
+
}
|
|
1107
|
+
/**
|
|
1108
|
+
* Database Type Provider Token
|
|
1109
|
+
*/
|
|
1110
|
+
type AXPDatabaseTypeProviderToken = AXPDatabaseTypeProvider | Promise<AXPDatabaseTypeProvider>;
|
|
1111
|
+
/**
|
|
1112
|
+
* Injection token for database type providers
|
|
1113
|
+
*/
|
|
1114
|
+
declare const AXP_DATABASE_TYPE_PROVIDER: InjectionToken<AXPDatabaseTypeProviderToken[]>;
|
|
1115
|
+
/**
|
|
1116
|
+
* Database Type Provider Interface
|
|
1117
|
+
*
|
|
1118
|
+
* Allows modules to provide custom database types and their conversion/validation logic.
|
|
1119
|
+
*/
|
|
1120
|
+
interface AXPDatabaseTypeProvider {
|
|
1121
|
+
/**
|
|
1122
|
+
* Get list of all database types
|
|
1123
|
+
*/
|
|
1124
|
+
getTypes(): Promise<AXPDatabaseTypeDefinition[]>;
|
|
1125
|
+
/**
|
|
1126
|
+
* Get a single database type by name
|
|
1127
|
+
*/
|
|
1128
|
+
getByName(name: string): Promise<AXPDatabaseTypeDefinition | undefined>;
|
|
1129
|
+
/**
|
|
1130
|
+
* Escape SQL identifier for the given database type
|
|
1131
|
+
*/
|
|
1132
|
+
escapeIdentifier(identifier: string, databaseType: string): string;
|
|
1133
|
+
/**
|
|
1134
|
+
* Escape SQL value for the given database type
|
|
1135
|
+
*/
|
|
1136
|
+
escapeValue(value: unknown, databaseType: string): string;
|
|
1137
|
+
/**
|
|
1138
|
+
* Convert operator type to SQL operator for the given database type
|
|
1139
|
+
*/
|
|
1140
|
+
convertOperatorToSql(operatorType: string, databaseType: string): string;
|
|
1141
|
+
/**
|
|
1142
|
+
* Validate SQL query syntax for the given database type
|
|
1143
|
+
*/
|
|
1144
|
+
validateQuery(sql: string, databaseType: string): {
|
|
1145
|
+
valid: boolean;
|
|
1146
|
+
error?: string;
|
|
1147
|
+
};
|
|
1148
|
+
/**
|
|
1149
|
+
* Convert QueryBuilderData model to query string (SQL or JSON for NoSQL)
|
|
1150
|
+
*
|
|
1151
|
+
* @param queryData - The structured query builder data model
|
|
1152
|
+
* @param databaseType - Target database type
|
|
1153
|
+
* @returns Promise that resolves to query string (SQL for SQL databases, JSON string for MongoDB)
|
|
1154
|
+
*/
|
|
1155
|
+
toQuery(queryData: AXPQueryBuilderData, databaseType: string): Promise<string>;
|
|
1156
|
+
/**
|
|
1157
|
+
* Parse query string (SQL or JSON) back to QueryBuilderData model
|
|
1158
|
+
*
|
|
1159
|
+
* @param query - The query string (SQL or JSON)
|
|
1160
|
+
* @param databaseType - Source database type
|
|
1161
|
+
* @returns Promise that resolves to partial QueryBuilderData model
|
|
1162
|
+
*/
|
|
1163
|
+
fromQuery(query: string, databaseType: string): Promise<Partial<AXPQueryBuilderData>>;
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
/**
|
|
1167
|
+
* Database Type Service
|
|
1168
|
+
*
|
|
1169
|
+
* Aggregates database types from all registered providers and provides a unified API
|
|
1170
|
+
* for accessing database type definitions and conversion/validation logic.
|
|
1171
|
+
*/
|
|
1172
|
+
declare class AXPDatabaseTypeService {
|
|
1173
|
+
private readonly providers;
|
|
1174
|
+
/** Cache for all database types */
|
|
1175
|
+
private typesCache;
|
|
1176
|
+
/** Cache for types by name */
|
|
1177
|
+
private typesByName;
|
|
1178
|
+
/** Pending requests */
|
|
1179
|
+
private pendingTypesRequest;
|
|
1180
|
+
private pendingTypeRequests;
|
|
1181
|
+
/**
|
|
1182
|
+
* Get all database types
|
|
1183
|
+
*/
|
|
1184
|
+
getTypes(): Promise<AXPDatabaseTypeDefinition[]>;
|
|
1185
|
+
/**
|
|
1186
|
+
* Get single database type by name
|
|
1187
|
+
*/
|
|
1188
|
+
getByName(name: string): Promise<AXPDatabaseTypeDefinition | undefined>;
|
|
1189
|
+
/**
|
|
1190
|
+
* Escape SQL identifier for the given database type
|
|
1191
|
+
*/
|
|
1192
|
+
escapeIdentifier(identifier: string, databaseType: string): Promise<string>;
|
|
1193
|
+
/**
|
|
1194
|
+
* Escape SQL value for the given database type
|
|
1195
|
+
*/
|
|
1196
|
+
escapeValue(value: unknown, databaseType: string): Promise<string>;
|
|
1197
|
+
/**
|
|
1198
|
+
* Convert operator type to SQL operator
|
|
1199
|
+
*/
|
|
1200
|
+
convertOperatorToSql(operatorType: string, databaseType: string): Promise<string>;
|
|
1201
|
+
/**
|
|
1202
|
+
* Validate SQL query syntax
|
|
1203
|
+
*/
|
|
1204
|
+
validateQuery(sql: string, databaseType: string): Promise<{
|
|
1205
|
+
valid: boolean;
|
|
1206
|
+
error?: string;
|
|
1207
|
+
}>;
|
|
1208
|
+
/**
|
|
1209
|
+
* Convert QueryBuilderData model to query string (SQL or JSON for NoSQL)
|
|
1210
|
+
*
|
|
1211
|
+
* @param queryData - The structured query builder data model
|
|
1212
|
+
* @param databaseType - Target database type
|
|
1213
|
+
* @returns Promise that resolves to query string
|
|
1214
|
+
*/
|
|
1215
|
+
toQuery(queryData: AXPQueryBuilderData, databaseType: string): Promise<string>;
|
|
1216
|
+
/**
|
|
1217
|
+
* Parse query string (SQL or JSON) back to QueryBuilderData model
|
|
1218
|
+
*
|
|
1219
|
+
* @param query - The query string (SQL or JSON)
|
|
1220
|
+
* @param databaseType - Source database type
|
|
1221
|
+
* @returns Promise that resolves to partial QueryBuilderData model
|
|
1222
|
+
*/
|
|
1223
|
+
fromQuery(query: string, databaseType: string): Promise<Partial<AXPQueryBuilderData>>;
|
|
1224
|
+
private loadTypesFromProviders;
|
|
1225
|
+
private loadTypeFromProviders;
|
|
1226
|
+
clearCache(): void;
|
|
1227
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPDatabaseTypeService, never>;
|
|
1228
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPDatabaseTypeService>;
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
/**
|
|
1232
|
+
* Default Database Type Provider
|
|
1233
|
+
*
|
|
1234
|
+
* Provides standard database types (MySQL, PostgreSQL, SQL Server, MongoDB) with
|
|
1235
|
+
* their conversion and validation logic.
|
|
1236
|
+
*/
|
|
1237
|
+
declare class AXMDefaultDatabaseTypeProvider implements AXPDatabaseTypeProvider {
|
|
1238
|
+
private readonly types;
|
|
1239
|
+
getTypes(): Promise<AXPDatabaseTypeDefinition[]>;
|
|
1240
|
+
getByName(name: string): Promise<AXPDatabaseTypeDefinition | undefined>;
|
|
1241
|
+
escapeIdentifier(identifier: string, databaseType: string): string;
|
|
1242
|
+
escapeValue(value: unknown, databaseType: string): string;
|
|
1243
|
+
convertOperatorToSql(operatorType: string, databaseType: string): string;
|
|
1244
|
+
validateQuery(sql: string, databaseType: string): {
|
|
1245
|
+
valid: boolean;
|
|
1246
|
+
error?: string;
|
|
1247
|
+
};
|
|
1248
|
+
toQuery(queryData: AXPQueryBuilderData, databaseType: string): Promise<string>;
|
|
1249
|
+
fromQuery(query: string, databaseType: string): Promise<Partial<AXPQueryBuilderData>>;
|
|
1250
|
+
/**
|
|
1251
|
+
* Convert QueryBuilderData to SQL query string
|
|
1252
|
+
*/
|
|
1253
|
+
private toSql;
|
|
1254
|
+
/**
|
|
1255
|
+
* Convert WHERE clause (AXPFilterDefinition) to SQL WHERE clause
|
|
1256
|
+
*/
|
|
1257
|
+
private convertWhereToSql;
|
|
1258
|
+
/**
|
|
1259
|
+
* Convert a single filter item (condition or group) to SQL condition
|
|
1260
|
+
*/
|
|
1261
|
+
private convertFilterItemToSql;
|
|
1262
|
+
/**
|
|
1263
|
+
* Convert aggregate operation to SQL expression
|
|
1264
|
+
*/
|
|
1265
|
+
private convertAggregateToSql;
|
|
1266
|
+
/**
|
|
1267
|
+
* Parse SQL query back to QueryBuilderData (basic implementation)
|
|
1268
|
+
*/
|
|
1269
|
+
private fromSql;
|
|
1270
|
+
/**
|
|
1271
|
+
* Convert QueryBuilderData to MongoDB aggregation pipeline
|
|
1272
|
+
*/
|
|
1273
|
+
private toMongoDb;
|
|
1274
|
+
/**
|
|
1275
|
+
* Convert WHERE clause to MongoDB $match expression
|
|
1276
|
+
*/
|
|
1277
|
+
private convertWhereToMongoDb;
|
|
1278
|
+
/**
|
|
1279
|
+
* Parse MongoDB aggregation pipeline back to QueryBuilderData
|
|
1280
|
+
*/
|
|
1281
|
+
private fromMongoDb;
|
|
1282
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMDefaultDatabaseTypeProvider, never>;
|
|
1283
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMDefaultDatabaseTypeProvider>;
|
|
1284
|
+
}
|
|
1285
|
+
/**
|
|
1286
|
+
* Default Database Type Provider Registration
|
|
1287
|
+
*/
|
|
1288
|
+
declare const AXP_DEFAULT_DATABASE_TYPE_PROVIDER: {
|
|
1289
|
+
provide: _angular_core.InjectionToken<_acorex_platform_module_data_management_client.AXPDatabaseTypeProviderToken[]>;
|
|
1290
|
+
useClass: typeof AXMDefaultDatabaseTypeProvider;
|
|
1291
|
+
multi: boolean;
|
|
1292
|
+
};
|
|
1293
|
+
|
|
1294
|
+
/**
|
|
1295
|
+
* Executes saved query-builder definitions by query entity id.
|
|
1296
|
+
* Implementations resolve query metadata and run the configured data source pipeline.
|
|
1297
|
+
*/
|
|
1298
|
+
declare abstract class AXMQueryService {
|
|
1299
|
+
/**
|
|
1300
|
+
* Executes a saved query by its entity id.
|
|
1301
|
+
*/
|
|
1302
|
+
abstract execute(id: string): Promise<AXPQueryExecutionResult>;
|
|
1303
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMQueryService, never>;
|
|
1304
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMQueryService>;
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
/**
|
|
1308
|
+
* Aggregate category definition.
|
|
1309
|
+
* Used by providers to describe available aggregate categories.
|
|
1310
|
+
*/
|
|
1311
|
+
interface AXPAggregateCategoryDefinition {
|
|
1312
|
+
/**
|
|
1313
|
+
* Unique category name (e.g., 'statistical', 'string', 'date', or any custom value)
|
|
1314
|
+
*/
|
|
1315
|
+
name: AXPAggregateCategory;
|
|
1316
|
+
/**
|
|
1317
|
+
* Display title for UI
|
|
1318
|
+
*/
|
|
1319
|
+
title: string;
|
|
1320
|
+
/**
|
|
1321
|
+
* Optional description for tooltips or help text
|
|
1322
|
+
*/
|
|
1323
|
+
description?: string;
|
|
1324
|
+
/**
|
|
1325
|
+
* Optional order index for sorting in UI
|
|
1326
|
+
*/
|
|
1327
|
+
order?: number;
|
|
1328
|
+
}
|
|
1329
|
+
/**
|
|
1330
|
+
* Aggregate Category Provider Token
|
|
1331
|
+
* Can be a provider instance or a Promise that resolves to a provider.
|
|
1332
|
+
*/
|
|
1333
|
+
type AXPAggregateCategoryProviderToken = AXPAggregateCategoryProvider | Promise<AXPAggregateCategoryProvider>;
|
|
1334
|
+
/**
|
|
1335
|
+
* Injection token for aggregate category providers.
|
|
1336
|
+
* Multiple providers can be registered to extend category definitions.
|
|
1337
|
+
*/
|
|
1338
|
+
declare const AXP_AGGREGATE_CATEGORY_PROVIDER: InjectionToken<AXPAggregateCategoryProviderToken[]>;
|
|
1339
|
+
/**
|
|
1340
|
+
* Aggregate Category Provider Interface
|
|
1341
|
+
*
|
|
1342
|
+
* Allows modules to provide custom aggregate categories that are used
|
|
1343
|
+
* by the query builder UI for filtering aggregate functions.
|
|
1344
|
+
*/
|
|
1345
|
+
interface AXPAggregateCategoryProvider {
|
|
1346
|
+
/**
|
|
1347
|
+
* Get list of aggregate categories.
|
|
1348
|
+
*/
|
|
1349
|
+
getList(): Promise<AXPAggregateCategoryDefinition[]>;
|
|
1350
|
+
/**
|
|
1351
|
+
* Get a single category by name.
|
|
1352
|
+
*/
|
|
1353
|
+
getByName(name: AXPAggregateCategory): Promise<AXPAggregateCategoryDefinition | undefined>;
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
/**
|
|
1357
|
+
* Default Aggregate Category Provider
|
|
1358
|
+
*
|
|
1359
|
+
* Provides the standard set of aggregate categories used by the built‑in
|
|
1360
|
+
* aggregate functions. Other modules can extend or override these categories
|
|
1361
|
+
* by registering additional providers for `AXP_AGGREGATE_CATEGORY_PROVIDER`.
|
|
1362
|
+
*/
|
|
1363
|
+
declare class AXMDefaultAggregateCategoryProvider implements AXPAggregateCategoryProvider {
|
|
1364
|
+
private readonly categories;
|
|
1365
|
+
getList(): Promise<AXPAggregateCategoryDefinition[]>;
|
|
1366
|
+
getByName(name: AXPAggregateCategory): Promise<AXPAggregateCategoryDefinition | undefined>;
|
|
1367
|
+
private getTitle;
|
|
1368
|
+
private getDescription;
|
|
1369
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMDefaultAggregateCategoryProvider, never>;
|
|
1370
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMDefaultAggregateCategoryProvider>;
|
|
1371
|
+
}
|
|
1372
|
+
declare const AXP_DEFAULT_AGGREGATE_CATEGORY_PROVIDER: {
|
|
1373
|
+
provide: _angular_core.InjectionToken<_acorex_platform_module_data_management_client.AXPAggregateCategoryProviderToken[]>;
|
|
1374
|
+
useClass: typeof AXMDefaultAggregateCategoryProvider;
|
|
1375
|
+
multi: boolean;
|
|
1376
|
+
};
|
|
1377
|
+
|
|
1378
|
+
/**
|
|
1379
|
+
* Input for ExecuteQuery command.
|
|
1380
|
+
*/
|
|
1381
|
+
interface ExecuteQueryCommandInput {
|
|
1382
|
+
/**
|
|
1383
|
+
* Query ID to execute.
|
|
1384
|
+
*/
|
|
1385
|
+
queryId: string;
|
|
1386
|
+
/**
|
|
1387
|
+
* Query name (for display).
|
|
1388
|
+
*/
|
|
1389
|
+
queryName?: string;
|
|
1390
|
+
/**
|
|
1391
|
+
* Query title (for display).
|
|
1392
|
+
*/
|
|
1393
|
+
queryTitle?: string;
|
|
1394
|
+
}
|
|
1395
|
+
/**
|
|
1396
|
+
* Command that executes a query and displays the result in a dialog.
|
|
1397
|
+
*/
|
|
1398
|
+
declare class ExecuteQueryCommand implements AXPCommand<ExecuteQueryCommandInput, void> {
|
|
1399
|
+
private readonly queryService;
|
|
1400
|
+
private readonly layoutBuilder;
|
|
1401
|
+
private readonly toastService;
|
|
1402
|
+
private readonly translationService;
|
|
1403
|
+
execute(input: ExecuteQueryCommandInput): AXPCommandExecuteResultPromise<void>;
|
|
1404
|
+
/**
|
|
1405
|
+
* Formats query result for display.
|
|
1406
|
+
*/
|
|
1407
|
+
private formatResult;
|
|
1408
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ExecuteQueryCommand, never>;
|
|
1409
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ExecuteQueryCommand>;
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1412
|
+
declare const META_DATA_SELECTOR_FIELD = "metaDataList";
|
|
1413
|
+
declare const META_DATA_FORM_FIELD = "metaDataForm";
|
|
1414
|
+
|
|
1415
|
+
declare const AXPMetaDataFormWidget: AXPWidgetConfig<AXPMetaDataFormWidgetConfigType>;
|
|
1416
|
+
type AXPMetaDataFormWidgetConfigType = {
|
|
1417
|
+
type: 'editor';
|
|
1418
|
+
metadataDefinitions: any[];
|
|
1419
|
+
layoutLook?: 'normal' | 'compact' | 'borderless';
|
|
1420
|
+
layoutDirection?: 'vertical' | 'horizontal' | 'grid';
|
|
1421
|
+
groupByCategory?: boolean;
|
|
1422
|
+
showCategoryHeaders?: boolean;
|
|
1423
|
+
};
|
|
1424
|
+
|
|
1425
|
+
declare class AXPMetaDataFormWidgetEditComponent extends AXPValueWidgetComponent implements OnInit {
|
|
1426
|
+
#private;
|
|
1427
|
+
/**
|
|
1428
|
+
* Groups structure from meta-data-selector or evaluated expression
|
|
1429
|
+
*/
|
|
1430
|
+
groups: _angular_core.Signal<AXPDynamicFormGroupDefinition[]>;
|
|
1431
|
+
/** Inherits parent widget render mode (`view` on Entity:View / single forms). */
|
|
1432
|
+
protected get layoutRenderMode(): AXPDynamicFormMode;
|
|
1433
|
+
/**
|
|
1434
|
+
* Check if there are any valid metadata definitions available
|
|
1435
|
+
*/
|
|
1436
|
+
hasDefinitions: _angular_core.Signal<boolean>;
|
|
1437
|
+
/**
|
|
1438
|
+
* Emitted when form context changes
|
|
1439
|
+
*/
|
|
1440
|
+
contextChange: _angular_core.OutputEmitterRef<any>;
|
|
1441
|
+
/**
|
|
1442
|
+
* Emitted when form validity changes
|
|
1443
|
+
*/
|
|
1444
|
+
validityChange: _angular_core.OutputEmitterRef<boolean>;
|
|
1445
|
+
private layoutRenderer;
|
|
1446
|
+
/**
|
|
1447
|
+
* Form definition signal that only updates when structure actually changes
|
|
1448
|
+
*/
|
|
1449
|
+
protected formDefinition: _angular_core.WritableSignal<AXPDynamicFormDefinition>;
|
|
1450
|
+
ngOnInit(): void;
|
|
1451
|
+
/**
|
|
1452
|
+
* Handle context change from dynamic form
|
|
1453
|
+
*/
|
|
1454
|
+
protected onContextChange(context: any): void;
|
|
1455
|
+
/**
|
|
1456
|
+
* Handle validity change from dynamic form
|
|
1457
|
+
*/
|
|
1458
|
+
protected onValidityChange(isValid: boolean): void;
|
|
1459
|
+
private resolveLayoutRenderMode;
|
|
1460
|
+
/**
|
|
1461
|
+
* Initialize form definition based on current inputs
|
|
1462
|
+
*/
|
|
1463
|
+
private initializeFormDefinition;
|
|
1464
|
+
/**
|
|
1465
|
+
* Convert groups structure from meta-data-selector to form definition
|
|
1466
|
+
* Each metadata group becomes a separate form group with visual separation (card look)
|
|
1467
|
+
*/
|
|
1468
|
+
private convertGroupsToFormDefinition;
|
|
1469
|
+
/**
|
|
1470
|
+
* Ensures nested dynamic fields use view components when the parent form is read-only.
|
|
1471
|
+
*/
|
|
1472
|
+
private applyRenderModeToFieldDefinition;
|
|
1473
|
+
/**
|
|
1474
|
+
* Convert single metadata definition to field definition
|
|
1475
|
+
*/
|
|
1476
|
+
private convertMetadataToFieldDefinition;
|
|
1477
|
+
/**
|
|
1478
|
+
* Parse interface configuration from metadata
|
|
1479
|
+
*/
|
|
1480
|
+
private parseInterfaceConfig;
|
|
1481
|
+
/**
|
|
1482
|
+
* Parse validations from interface configuration
|
|
1483
|
+
*/
|
|
1484
|
+
private parseValidations;
|
|
1485
|
+
/**
|
|
1486
|
+
* Sanitize group name for use as identifier
|
|
1487
|
+
*/
|
|
1488
|
+
private sanitizeGroupName;
|
|
1489
|
+
/**
|
|
1490
|
+
* Get the layout renderer component instance
|
|
1491
|
+
*/
|
|
1492
|
+
getLayoutRenderer(): AXPLayoutRendererComponent | undefined;
|
|
1493
|
+
/**
|
|
1494
|
+
* Validate the form
|
|
1495
|
+
*/
|
|
1496
|
+
validate(): Promise<boolean>;
|
|
1497
|
+
/**
|
|
1498
|
+
* Get current form context
|
|
1499
|
+
*/
|
|
1500
|
+
getContext(): any;
|
|
1501
|
+
/**
|
|
1502
|
+
* Update form context programmatically
|
|
1503
|
+
*/
|
|
1504
|
+
updateContext(context: any): void;
|
|
1505
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPMetaDataFormWidgetEditComponent, never>;
|
|
1506
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXPMetaDataFormWidgetEditComponent, "axp-meta-data-form-widget-edit", never, {}, { "contextChange": "contextChange"; "validityChange": "validityChange"; }, never, never, true, never>;
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
interface ShowMetaDataFormPopupInput {
|
|
1510
|
+
entity: string;
|
|
1511
|
+
id: string;
|
|
1512
|
+
field?: string;
|
|
1513
|
+
title?: string;
|
|
1514
|
+
path: string;
|
|
1515
|
+
}
|
|
1516
|
+
/** Result of resolveGroups; dialogTitle is optional fallback when input.title is not set. */
|
|
1517
|
+
interface ResolveGroupsResult {
|
|
1518
|
+
/** Expression string (evaluated at runtime) or groups array */
|
|
1519
|
+
groups: string | AXPDynamicFormGroupDefinition[];
|
|
1520
|
+
dialogTitle?: string;
|
|
1521
|
+
}
|
|
1522
|
+
declare class ShowMetaDataFormPopupCommand implements AXPCommand<ShowMetaDataFormPopupInput, any> {
|
|
1523
|
+
protected readonly layoutBuilder: AXPLayoutBuilderService;
|
|
1524
|
+
protected readonly translationService: AXTranslationService;
|
|
1525
|
+
protected readonly entityService: AXPEntityService;
|
|
1526
|
+
protected readonly entityRegistry: AXPEntityDefinitionRegistryService;
|
|
1527
|
+
execute(input: ShowMetaDataFormPopupInput | any): AXPCommandExecuteResultPromise<any>;
|
|
1528
|
+
/**
|
|
1529
|
+
* Loads a record by entity and id. Override to use custom data sources or key handling.
|
|
1530
|
+
* @param input - Optional; overrides can use input.data or other fields to return custom record.
|
|
1531
|
+
*/
|
|
1532
|
+
protected findRecord(entity: string, id: string, input?: ShowMetaDataFormPopupInput): Promise<Record<string, unknown> | null>;
|
|
1533
|
+
/**
|
|
1534
|
+
* Resolves groups for the meta-data-form-editor.
|
|
1535
|
+
* Override to load groups from custom APIs instead of entity metadata.
|
|
1536
|
+
* @returns Expression string (evaluated at runtime) or groups array; dialogTitle is optional fallback.
|
|
1537
|
+
*/
|
|
1538
|
+
protected resolveGroups(input: ShowMetaDataFormPopupInput, currentRecord: Record<string, unknown>): Promise<ResolveGroupsResult>;
|
|
1539
|
+
/**
|
|
1540
|
+
* Persists meta-data form changes. Override to use custom persistence or validation.
|
|
1541
|
+
*/
|
|
1542
|
+
protected updateRecord(entity: string, id: string, data: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
1543
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ShowMetaDataFormPopupCommand, never>;
|
|
1544
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ShowMetaDataFormPopupCommand>;
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
declare const AXPMetaDataBuilderWidget: AXPWidgetConfig<AXPMetaDataBuilderWidgetConfigType>;
|
|
1548
|
+
type AXPMetaDataBuilderWidgetConfigType = {
|
|
1549
|
+
type: 'editor';
|
|
1550
|
+
};
|
|
1551
|
+
|
|
1552
|
+
declare class AXPMetaDataBuilderWidgetEditComponent extends AXPValueWidgetComponent<AXMMetaDataBuilderValue> {
|
|
1553
|
+
#private;
|
|
1554
|
+
private readonly currentValue;
|
|
1555
|
+
protected valueForGroups: _angular_core.Signal<AXMMetaDataBuilderValue>;
|
|
1556
|
+
protected optionsForGroups: _angular_core.Signal<Record<string, any>>;
|
|
1557
|
+
protected onValueChange(value: AXMMetaDataBuilderValue): void;
|
|
1558
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPMetaDataBuilderWidgetEditComponent, never>;
|
|
1559
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXPMetaDataBuilderWidgetEditComponent, "axp-meta-data-builder-widget-edit", never, {}, {}, never, never, true, never>;
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
/**
|
|
1563
|
+
* Meta-data builder: groups/fields editing via {@link AXPStandardSectionItemsBuilder}.
|
|
1564
|
+
*/
|
|
1565
|
+
declare class AXPMetaDataBuilderGroupsComponent {
|
|
1566
|
+
#private;
|
|
1567
|
+
private readonly entityService;
|
|
1568
|
+
readonly value: _angular_core.InputSignal<AXMMetaDataBuilderValue | null | undefined>;
|
|
1569
|
+
readonly options: _angular_core.InputSignal<Record<string, unknown>>;
|
|
1570
|
+
readonly contextPath: _angular_core.InputSignal<string | undefined>;
|
|
1571
|
+
readonly valueChange: _angular_core.OutputEmitterRef<AXMMetaDataBuilderValue>;
|
|
1572
|
+
private readonly standardRef;
|
|
1573
|
+
private readonly entityDataSelector;
|
|
1574
|
+
private readonly metaDataService;
|
|
1575
|
+
private readonly entityResolver;
|
|
1576
|
+
private readonly dialogService;
|
|
1577
|
+
private readonly translationService;
|
|
1578
|
+
private readonly layoutBuilder;
|
|
1579
|
+
private readonly widgetPropertyViewerService;
|
|
1580
|
+
private readonly contextStore;
|
|
1581
|
+
protected readonly builderValue: _angular_core.WritableSignal<AXPBuilderValue>;
|
|
1582
|
+
protected readonly standardConfig: _angular_core.Signal<AXPStandardSectionItemsBuilderConfig>;
|
|
1583
|
+
protected hideHeaderActions: _angular_core.Signal<boolean>;
|
|
1584
|
+
protected readonly: _angular_core.Signal<boolean>;
|
|
1585
|
+
protected previewGroups: _angular_core.Signal<{
|
|
1586
|
+
name: string;
|
|
1587
|
+
title: _acorex_platform_module_data_management_client_contracts.AXMMetaDataLocalizedString | undefined;
|
|
1588
|
+
description: _acorex_platform_module_data_management_client_contracts.AXMMetaDataLocalizedString | undefined;
|
|
1589
|
+
fields: {
|
|
1590
|
+
name: string;
|
|
1591
|
+
title: _acorex_platform_module_data_management_client_contracts.AXMMetaDataLocalizedString;
|
|
1592
|
+
description: _acorex_platform_module_data_management_client_contracts.AXMMetaDataLocalizedString | undefined;
|
|
1593
|
+
interface: string;
|
|
1594
|
+
configuration: Record<string, any> | undefined;
|
|
1595
|
+
defaultValue: any;
|
|
1596
|
+
}[];
|
|
1597
|
+
}[]>;
|
|
1598
|
+
protected previewFormDefinition: _angular_core.Signal<AXPDynamicFormDefinition>;
|
|
1599
|
+
protected isPreviewDisabled: _angular_core.Signal<boolean>;
|
|
1600
|
+
private syncBuilderToHost;
|
|
1601
|
+
protected onBuilderValueChange(next: AXPBuilderValue): void;
|
|
1602
|
+
/** Page toolbar / header: open standardized add-section dialog. */
|
|
1603
|
+
addSection(): Promise<void>;
|
|
1604
|
+
private mapItemToView;
|
|
1605
|
+
private parseInterfaceConfig;
|
|
1606
|
+
private parseValidations;
|
|
1607
|
+
private sanitizeGroupName;
|
|
1608
|
+
private convertFieldToFormDefinition;
|
|
1609
|
+
private getWidgetTitle;
|
|
1610
|
+
private promptAddItems;
|
|
1611
|
+
private promptEditItem;
|
|
1612
|
+
private buildFieldOverrideProperties;
|
|
1613
|
+
private collectItemNames;
|
|
1614
|
+
private generateUniqueItemName;
|
|
1615
|
+
handlePreviewClick(): Promise<void>;
|
|
1616
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPMetaDataBuilderGroupsComponent, never>;
|
|
1617
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXPMetaDataBuilderGroupsComponent, "axp-meta-data-builder-groups", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "contextPath": { "alias": "contextPath"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
/** Component key used when display is 'page'. Register via AXP_PAGE_COMPONENT_PROVIDER. */
|
|
1621
|
+
declare const META_DATA_BUILDER_PAGE_COMPONENT_KEY = "entity-meta-data-builder-page";
|
|
1622
|
+
/** Display configuration for section (builder shown inline in entity views) */
|
|
1623
|
+
type MetaDataBuilderSectionConfig = {
|
|
1624
|
+
enabled?: boolean;
|
|
1625
|
+
title?: string;
|
|
1626
|
+
order?: number;
|
|
1627
|
+
};
|
|
1628
|
+
/** Display configuration for popup (action opens builder in dialog) */
|
|
1629
|
+
type MetaDataBuilderPopupConfig = {
|
|
1630
|
+
enabled?: boolean;
|
|
1631
|
+
title?: string;
|
|
1632
|
+
order?: number;
|
|
1633
|
+
};
|
|
1634
|
+
/** Display configuration for page (builder shown as entity tab with toolbar actions) */
|
|
1635
|
+
type MetaDataBuilderPageConfig = {
|
|
1636
|
+
enabled?: boolean;
|
|
1637
|
+
title?: string;
|
|
1638
|
+
icon?: string;
|
|
1639
|
+
order?: number;
|
|
1640
|
+
};
|
|
1641
|
+
/** Flexible display configuration object for the meta-data-builder */
|
|
1642
|
+
type MetaDataBuilderDisplayConfig = {
|
|
1643
|
+
section?: MetaDataBuilderSectionConfig;
|
|
1644
|
+
popup?: MetaDataBuilderPopupConfig;
|
|
1645
|
+
page?: MetaDataBuilderPageConfig;
|
|
1646
|
+
};
|
|
1647
|
+
/** Display option - where to show the meta-data-builder: section, popup, page, or both */
|
|
1648
|
+
type MetaDataBuilderDisplay = MetaDataBuilderDisplayConfig | 'section' | 'popup' | 'page' | 'both';
|
|
1649
|
+
type MetaDataBuilderPluginOptions = {
|
|
1650
|
+
/** Field and group title */
|
|
1651
|
+
title?: string;
|
|
1652
|
+
/** How to display the meta-data-builder: section (inline), popup (button opens dialog), page (entity tab with toolbar actions), or both */
|
|
1653
|
+
display?: MetaDataBuilderDisplay;
|
|
1654
|
+
/** If true, each metadata group becomes a separate entity section (TODO) */
|
|
1655
|
+
renderGroupsAsSections?: boolean;
|
|
1656
|
+
};
|
|
1657
|
+
/**
|
|
1658
|
+
* meta-data-builder plugin
|
|
1659
|
+
*
|
|
1660
|
+
* Dynamic behavior:
|
|
1661
|
+
* - Creates a single property for metadata builder configuration
|
|
1662
|
+
* - Dynamically generates entity groups and meta-data-form widgets based on configured groups
|
|
1663
|
+
* - Reads group configuration at runtime from the field value
|
|
1664
|
+
*/
|
|
1665
|
+
declare const metaDataBuilderPlugin: AXPEntityActionPlugin;
|
|
1666
|
+
|
|
1667
|
+
/**
|
|
1668
|
+
* Contract for loading and persisting the record that holds the meta-data builder field.
|
|
1669
|
+
*/
|
|
1670
|
+
declare abstract class AXMMetaDataBuilderRecordService {
|
|
1671
|
+
abstract findRecord(entity: string, id: string): Promise<Record<string, unknown> | null>;
|
|
1672
|
+
abstract updateRecord(entity: string, id: string, data: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
1673
|
+
}
|
|
1674
|
+
declare class AXMDefaultMetaDataBuilderRecordService extends AXMMetaDataBuilderRecordService {
|
|
1675
|
+
private readonly entityService;
|
|
1676
|
+
findRecord(entity: string, id: string): Promise<Record<string, unknown> | null>;
|
|
1677
|
+
updateRecord(entity: string, id: string, data: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
1678
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMDefaultMetaDataBuilderRecordService, never>;
|
|
1679
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMDefaultMetaDataBuilderRecordService>;
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1682
|
+
declare function metaDataValueToBuilderValue(val: AXMMetaDataBuilderValue | null | undefined): AXPBuilderValue;
|
|
1683
|
+
declare function builderValueToMetaDataValue(v: AXPBuilderValue): AXMMetaDataBuilderValue;
|
|
1684
|
+
|
|
1685
|
+
declare class AXPMetaDataBuilderWidgetViewComponent extends AXPValueWidgetComponent<unknown> {
|
|
1686
|
+
get display(): string;
|
|
1687
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPMetaDataBuilderWidgetViewComponent, never>;
|
|
1688
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXPMetaDataBuilderWidgetViewComponent, "axp-meta-data-builder-widget-view", never, {}, {}, never, never, true, never>;
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1691
|
+
interface ShowMetaDataBuilderPopupInput {
|
|
1692
|
+
entity: string;
|
|
1693
|
+
id: string;
|
|
1694
|
+
/** Selector field name (default: META_DATA_SELECTOR_FIELD) */
|
|
1695
|
+
field?: string;
|
|
1696
|
+
title?: string;
|
|
1697
|
+
}
|
|
1698
|
+
/**
|
|
1699
|
+
* Opens the meta-data-builder (configuration UI for groups/fields) in a popup.
|
|
1700
|
+
* Used when meta-data-builder plugin has display: 'popup' or 'both'.
|
|
1701
|
+
*/
|
|
1702
|
+
declare class ShowMetaDataBuilderPopupCommand implements AXPCommand<ShowMetaDataBuilderPopupInput, any> {
|
|
1703
|
+
protected readonly layoutBuilder: AXPLayoutBuilderService;
|
|
1704
|
+
protected readonly translationService: AXTranslationService;
|
|
1705
|
+
protected readonly recordService: AXMMetaDataBuilderRecordService;
|
|
1706
|
+
execute(input: ShowMetaDataBuilderPopupInput | any): AXPCommandExecuteResultPromise<any>;
|
|
1707
|
+
/**
|
|
1708
|
+
* Loads a record by entity and id. Delegates to {@link AXMMetaDataBuilderRecordService}.
|
|
1709
|
+
* Override in a subclass to use custom logic instead of the injected service.
|
|
1710
|
+
*/
|
|
1711
|
+
protected findRecord(entity: string, id: string): Promise<Record<string, unknown> | null>;
|
|
1712
|
+
/**
|
|
1713
|
+
* Persists meta-data changes. Delegates to {@link AXMMetaDataBuilderRecordService}.
|
|
1714
|
+
* Override in a subclass to use custom logic instead of the injected service.
|
|
1715
|
+
*/
|
|
1716
|
+
protected updateRecord(entity: string, id: string, data: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
1717
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ShowMetaDataBuilderPopupCommand, never>;
|
|
1718
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ShowMetaDataBuilderPopupCommand>;
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
/**
|
|
1722
|
+
* Metadata Evaluator Scope Provider
|
|
1723
|
+
*
|
|
1724
|
+
* Provides expression evaluation capabilities for metadata operations:
|
|
1725
|
+
* - Get category IDs from context/expressions
|
|
1726
|
+
* - Retrieve metadata by category IDs
|
|
1727
|
+
* - Access category metadata inheritance
|
|
1728
|
+
* - Filter metadata definitions by group name
|
|
1729
|
+
*/
|
|
1730
|
+
declare class AXMMetadataEvaluatorScopeProvider implements AXPExpressionEvaluatorScopeProvider {
|
|
1731
|
+
private readonly queryService;
|
|
1732
|
+
private readonly entityDefinitionRegistryService;
|
|
1733
|
+
private readonly entityService;
|
|
1734
|
+
provide(context: AXPExpressionEvaluatorScopeProviderContext): Promise<void>;
|
|
1735
|
+
/**
|
|
1736
|
+
* Merge interface overrides from meta-data-builder into fetched groups
|
|
1737
|
+
* Matches fields by id or name and applies overridden interfaces
|
|
1738
|
+
*/
|
|
1739
|
+
private mergeInterfaceOverrides;
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
/**
|
|
1743
|
+
* Select a meta-data definition (entity record) and preview its interface widget, mirroring
|
|
1744
|
+
* {@link AXPWidgetFieldConfiguratorComponent} but backed by {@link AXMMetaDataDefinitionService}.
|
|
1745
|
+
*/
|
|
1746
|
+
declare class AXMetaDataConfiguratorComponent {
|
|
1747
|
+
private readonly entityService;
|
|
1748
|
+
/** When set, uses this list instead of loading from {@link AXMMetaDataDefinitionService}. */
|
|
1749
|
+
items: _angular_core.InputSignal<AXMMetaDataDefinitionEntityModel<string>[] | undefined>;
|
|
1750
|
+
label: _angular_core.InputSignal<string>;
|
|
1751
|
+
/** Selected meta-data definition id (entity id). */
|
|
1752
|
+
definitionId: _angular_core.ModelSignal<string>;
|
|
1753
|
+
/** Optional preview field name override; defaults to the selected definition's `name`. */
|
|
1754
|
+
fieldName: _angular_core.InputSignal<string | undefined>;
|
|
1755
|
+
/** Optional preview field title override; defaults to the selected definition's `title`. */
|
|
1756
|
+
fieldTitle: _angular_core.InputSignal<AXPMultiLanguageString | undefined>;
|
|
1757
|
+
readonly: _angular_core.InputSignal<boolean>;
|
|
1758
|
+
private readonly metaDataDefinitionService;
|
|
1759
|
+
private readonly translation;
|
|
1760
|
+
private readonly widgetRegistry;
|
|
1761
|
+
/** Recomputes list labels when the active locale changes. */
|
|
1762
|
+
private readonly activeLocale;
|
|
1763
|
+
private readonly loadedItems;
|
|
1764
|
+
private readonly fetchOnce;
|
|
1765
|
+
protected definitions: _angular_core.Signal<AXMMetaDataDefinitionEntityModel<string>[]>;
|
|
1766
|
+
protected configuratorItems: _angular_core.Signal<ItemConfiguratorListItem[]>;
|
|
1767
|
+
protected selectedDefinition: _angular_core.Signal<AXMMetaDataDefinitionEntityModel<string> | null>;
|
|
1768
|
+
protected previewHeaderActions: _angular_core.Signal<AXPActionMenuItem[]>;
|
|
1769
|
+
constructor();
|
|
1770
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMetaDataConfiguratorComponent, never>;
|
|
1771
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXMetaDataConfiguratorComponent, "axm-meta-data-configurator", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "definitionId": { "alias": "definitionId"; "required": false; "isSignal": true; }; "fieldName": { "alias": "fieldName"; "required": false; "isSignal": true; }; "fieldTitle": { "alias": "fieldTitle"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; }, { "definitionId": "definitionIdChange"; }, never, never, true, never>;
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1774
|
+
/**
|
|
1775
|
+
* Default system tag provider
|
|
1776
|
+
* Provides readonly system-level tags
|
|
1777
|
+
*/
|
|
1778
|
+
declare class AXPSystemTagProvider extends AXPTagProvider {
|
|
1779
|
+
name: string;
|
|
1780
|
+
/**
|
|
1781
|
+
* Provide default system tags
|
|
1782
|
+
*/
|
|
1783
|
+
provide(): Promise<AXPTag[]>;
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1786
|
+
interface AXPTagPluginOptions {
|
|
1787
|
+
propertyName?: string;
|
|
1788
|
+
placeholder?: string;
|
|
1789
|
+
hasClearButton?: boolean;
|
|
1790
|
+
allowDuplicate?: boolean;
|
|
1791
|
+
showInList?: boolean;
|
|
1792
|
+
/** Persist each tag as a locale map; chip globe opens translate popup. Default true. */
|
|
1793
|
+
multiLanguage?: boolean;
|
|
1794
|
+
}
|
|
1795
|
+
declare const tagsPlugin: AXPEntityActionPlugin;
|
|
1796
|
+
|
|
1797
|
+
export { AXMDataManagementModule, AXMDefaultAggregateCategoryProvider, AXMDefaultAggregateFunctionProvider, AXMDefaultDatabaseTypeProvider, AXMDefaultMetaDataBuilderRecordService, AXMMenuProvider, AXMMetaDataBuilderRecordService, AXMMetaDataFeatureModule, AXMMetadataEvaluatorScopeProvider, AXMQueryService, AXMTagsFeatureModule, AXMetaDataConfiguratorComponent, AXPAggregateBuilderComponent, AXPAggregateFunctionService, AXPAggregateFunctionsRegistry, AXPColumnsBuilderComponent, AXPDatabaseTypeService, AXPGroupByBuilderComponent, AXPMetaDataBuilderGroupsComponent, AXPMetaDataBuilderWidget, AXPMetaDataBuilderWidgetEditComponent, AXPMetaDataBuilderWidgetViewComponent, AXPMetaDataFormWidget, AXPMetaDataFormWidgetEditComponent, AXPQueryBuilderComponent, AXPQueryBuilderWidget, AXPQueryBuilderWidgetColumnComponent, AXPQueryBuilderWidgetDesignerComponent, AXPQueryBuilderWidgetEditComponent, AXPQueryBuilderWidgetViewComponent, AXPRawQueryBuilderComponent, AXPSortBuilderComponent, AXPSystemTagProvider, AXPWhereBuilderComponent, AXP_AGGREGATE_CATEGORY_PROVIDER, AXP_AGGREGATE_FUNCTION_PROVIDER, AXP_DATABASE_TYPE_PROVIDER, AXP_DEFAULT_AGGREGATE_CATEGORY_PROVIDER, AXP_DEFAULT_AGGREGATE_FUNCTION_PROVIDER, AXP_DEFAULT_DATABASE_TYPE_PROVIDER, ExecuteQueryCommand, META_DATA_BUILDER_PAGE_COMPONENT_KEY, META_DATA_FORM_FIELD, META_DATA_SELECTOR_FIELD, ShowMetaDataBuilderPopupCommand, ShowMetaDataFormPopupCommand, builderValueToMetaDataValue, metaDataBuilderPlugin, metaDataValueToBuilderValue, tagsPlugin };
|
|
1798
|
+
export type { AXPAggregateCategory, AXPAggregateCategoryDefinition, AXPAggregateCategoryProvider, AXPAggregateCategoryProviderToken, AXPAggregateFunctionDefinition, AXPAggregateFunctionProvider, AXPAggregateFunctionProviderToken, AXPDatabaseType, AXPDatabaseTypeDefinition, AXPDatabaseTypeProvider, AXPDatabaseTypeProviderToken, AXPMetaDataBuilderWidgetConfigType, AXPMetaDataFormWidgetConfigType, AXPQueryBuilderDataFieldDefinition, AXPQueryBuilderDataSourceDefinition, AXPQueryBuilderWidgetConfigType, AXPTagPluginOptions, ExecuteQueryCommandInput, MetaDataBuilderDisplay, MetaDataBuilderDisplayConfig, MetaDataBuilderPageConfig, MetaDataBuilderPluginOptions, MetaDataBuilderPopupConfig, MetaDataBuilderSectionConfig, ResolveGroupsResult, ShowMetaDataBuilderPopupInput, ShowMetaDataFormPopupInput };
|