@expeed/ngx-data-mapper 1.3.2 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +284 -0
- package/fesm2022/expeed-ngx-data-mapper.mjs +180 -1622
- package/fesm2022/expeed-ngx-data-mapper.mjs.map +1 -1
- package/package.json +2 -3
- package/types/expeed-ngx-data-mapper.d.ts +40 -619
|
@@ -1,21 +1,38 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { AfterViewInit, OnDestroy, EventEmitter, ElementRef
|
|
3
|
-
import {
|
|
2
|
+
import { AfterViewInit, OnDestroy, EventEmitter, ElementRef } from '@angular/core';
|
|
3
|
+
import { JSONSchema7 } from 'json-schema';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Field type enumeration matching Java's FieldType enum
|
|
7
|
+
*/
|
|
8
|
+
type FieldType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'date';
|
|
9
|
+
/**
|
|
10
|
+
* Reference to a field - matches Java's FieldReference class.
|
|
11
|
+
* This is the public API type used in FieldMapping output.
|
|
12
|
+
*/
|
|
13
|
+
interface FieldReference {
|
|
6
14
|
id: string;
|
|
7
15
|
name: string;
|
|
8
|
-
type: 'string' | 'number' | 'boolean' | 'object' | 'array' | 'date';
|
|
9
16
|
path: string;
|
|
10
|
-
|
|
11
|
-
expanded?: boolean;
|
|
17
|
+
type: FieldType;
|
|
12
18
|
description?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Internal type for tree rendering with UI state.
|
|
22
|
+
* Extends FieldReference with tree-specific properties.
|
|
23
|
+
*/
|
|
24
|
+
interface SchemaTreeNode extends FieldReference {
|
|
25
|
+
children?: SchemaTreeNode[];
|
|
26
|
+
expanded?: boolean;
|
|
13
27
|
isArrayItem?: boolean;
|
|
14
28
|
parentArrayPath?: string;
|
|
15
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Internal schema definition for tree rendering
|
|
32
|
+
*/
|
|
16
33
|
interface SchemaDefinition {
|
|
17
34
|
name: string;
|
|
18
|
-
fields:
|
|
35
|
+
fields: SchemaTreeNode[];
|
|
19
36
|
}
|
|
20
37
|
type TransformationType = 'direct' | 'concat' | 'substring' | 'replace' | 'uppercase' | 'lowercase' | 'trim' | 'mask' | 'dateFormat' | 'extractYear' | 'extractMonth' | 'extractDay' | 'extractHour' | 'extractMinute' | 'extractSecond' | 'numberFormat' | 'template';
|
|
21
38
|
interface TransformationCondition {
|
|
@@ -40,8 +57,8 @@ interface TransformationConfig {
|
|
|
40
57
|
}
|
|
41
58
|
interface FieldMapping {
|
|
42
59
|
id: string;
|
|
43
|
-
sourceFields:
|
|
44
|
-
targetField:
|
|
60
|
+
sourceFields: SchemaTreeNode[];
|
|
61
|
+
targetField: SchemaTreeNode;
|
|
45
62
|
transformations: TransformationConfig[];
|
|
46
63
|
isArrayMapping?: boolean;
|
|
47
64
|
arrayMappingId?: string;
|
|
@@ -71,8 +88,8 @@ interface ArrayFilterConfig {
|
|
|
71
88
|
}
|
|
72
89
|
interface ArrayMapping {
|
|
73
90
|
id: string;
|
|
74
|
-
sourceArray:
|
|
75
|
-
targetArray:
|
|
91
|
+
sourceArray: SchemaTreeNode;
|
|
92
|
+
targetArray: SchemaTreeNode;
|
|
76
93
|
itemMappings: FieldMapping[];
|
|
77
94
|
filter?: ArrayFilterConfig;
|
|
78
95
|
}
|
|
@@ -83,326 +100,34 @@ interface ArraySelectorConfig {
|
|
|
83
100
|
}
|
|
84
101
|
interface ArrayToObjectMapping {
|
|
85
102
|
id: string;
|
|
86
|
-
sourceArray:
|
|
87
|
-
targetObject:
|
|
103
|
+
sourceArray: SchemaTreeNode;
|
|
104
|
+
targetObject: SchemaTreeNode;
|
|
88
105
|
selector: ArraySelectorConfig;
|
|
89
106
|
itemMappings: FieldMapping[];
|
|
90
107
|
}
|
|
91
|
-
interface ConnectionPoint {
|
|
92
|
-
fieldId: string;
|
|
93
|
-
side: 'source' | 'target';
|
|
94
|
-
x: number;
|
|
95
|
-
y: number;
|
|
96
|
-
}
|
|
97
|
-
interface Connection {
|
|
98
|
-
id: string;
|
|
99
|
-
mappingId: string;
|
|
100
|
-
sourcePoints: ConnectionPoint[];
|
|
101
|
-
targetPoint: ConnectionPoint;
|
|
102
|
-
transformations: TransformationConfig[];
|
|
103
|
-
}
|
|
104
|
-
interface DragState {
|
|
105
|
-
isDragging: boolean;
|
|
106
|
-
sourceField: SchemaField | null;
|
|
107
|
-
startPoint: {
|
|
108
|
-
x: number;
|
|
109
|
-
y: number;
|
|
110
|
-
} | null;
|
|
111
|
-
currentPoint: {
|
|
112
|
-
x: number;
|
|
113
|
-
y: number;
|
|
114
|
-
} | null;
|
|
115
|
-
dragMode: 'new' | 'move-source' | 'move-target';
|
|
116
|
-
mappingId?: string;
|
|
117
|
-
sourceFieldIndex?: number;
|
|
118
|
-
}
|
|
119
108
|
interface DefaultValue {
|
|
120
109
|
id: string;
|
|
121
|
-
targetField:
|
|
110
|
+
targetField: SchemaTreeNode;
|
|
122
111
|
value: string | number | boolean | Date | null;
|
|
123
112
|
}
|
|
124
113
|
|
|
125
114
|
/**
|
|
126
|
-
*
|
|
115
|
+
* JSON Schema (draft-07) types
|
|
116
|
+
* Re-exports from @types/json-schema
|
|
127
117
|
*/
|
|
128
|
-
interface JsonSchema {
|
|
129
|
-
$schema?: string;
|
|
130
|
-
$id?: string;
|
|
131
|
-
title?: string;
|
|
132
|
-
description?: string;
|
|
133
|
-
type?: JsonSchemaType | JsonSchemaType[];
|
|
134
|
-
properties?: Record<string, JsonSchema>;
|
|
135
|
-
items?: JsonSchema;
|
|
136
|
-
required?: string[];
|
|
137
|
-
enum?: (string | number | boolean | null)[];
|
|
138
|
-
const?: unknown;
|
|
139
|
-
default?: unknown;
|
|
140
|
-
minLength?: number;
|
|
141
|
-
maxLength?: number;
|
|
142
|
-
pattern?: string;
|
|
143
|
-
format?: string;
|
|
144
|
-
minimum?: number;
|
|
145
|
-
maximum?: number;
|
|
146
|
-
exclusiveMinimum?: number;
|
|
147
|
-
exclusiveMaximum?: number;
|
|
148
|
-
multipleOf?: number;
|
|
149
|
-
minItems?: number;
|
|
150
|
-
maxItems?: number;
|
|
151
|
-
uniqueItems?: boolean;
|
|
152
|
-
minProperties?: number;
|
|
153
|
-
maxProperties?: number;
|
|
154
|
-
additionalProperties?: boolean | JsonSchema;
|
|
155
|
-
allOf?: JsonSchema[];
|
|
156
|
-
anyOf?: JsonSchema[];
|
|
157
|
-
oneOf?: JsonSchema[];
|
|
158
|
-
not?: JsonSchema;
|
|
159
|
-
$ref?: string;
|
|
160
|
-
definitions?: Record<string, JsonSchema>;
|
|
161
|
-
}
|
|
162
|
-
type JsonSchemaType = 'string' | 'number' | 'integer' | 'boolean' | 'object' | 'array' | 'null';
|
|
163
|
-
/**
|
|
164
|
-
* Helper type for working with JSON schemas in the UI
|
|
165
|
-
*/
|
|
166
|
-
interface JsonSchemaField {
|
|
167
|
-
name: string;
|
|
168
|
-
path: string;
|
|
169
|
-
schema: JsonSchema;
|
|
170
|
-
children?: JsonSchemaField[];
|
|
171
|
-
expanded?: boolean;
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* Convert JSON Schema to flat field list for UI rendering
|
|
175
|
-
*/
|
|
176
|
-
declare function schemaToFields(schema: JsonSchema, parentPath?: string): JsonSchemaField[];
|
|
177
|
-
/**
|
|
178
|
-
* Get the simple type for display purposes
|
|
179
|
-
*/
|
|
180
|
-
declare function getSchemaType(schema: JsonSchema): string;
|
|
181
|
-
/**
|
|
182
|
-
* Create an empty JSON Schema for a new schema definition
|
|
183
|
-
*/
|
|
184
|
-
declare function createEmptySchema(title?: string): JsonSchema;
|
|
185
|
-
/**
|
|
186
|
-
* Add a property to a schema
|
|
187
|
-
*/
|
|
188
|
-
declare function addProperty(schema: JsonSchema, name: string, type: JsonSchemaType, options?: {
|
|
189
|
-
description?: string;
|
|
190
|
-
required?: boolean;
|
|
191
|
-
}): JsonSchema;
|
|
192
|
-
/**
|
|
193
|
-
* Remove a property from a schema
|
|
194
|
-
*/
|
|
195
|
-
declare function removeProperty(schema: JsonSchema, name: string): JsonSchema;
|
|
196
|
-
|
|
197
|
-
declare class MappingService {
|
|
198
|
-
private mappings;
|
|
199
|
-
private arrayMappings;
|
|
200
|
-
private arrayToObjectMappings;
|
|
201
|
-
private defaultValues;
|
|
202
|
-
private selectedMappingId;
|
|
203
|
-
private _sourceSchemaRef;
|
|
204
|
-
private _targetSchemaRef;
|
|
205
|
-
private dragState;
|
|
206
|
-
readonly allMappings: _angular_core.Signal<FieldMapping[]>;
|
|
207
|
-
readonly allArrayMappings: _angular_core.Signal<ArrayMapping[]>;
|
|
208
|
-
readonly allArrayToObjectMappings: _angular_core.Signal<ArrayToObjectMapping[]>;
|
|
209
|
-
readonly allDefaultValues: _angular_core.Signal<DefaultValue[]>;
|
|
210
|
-
readonly sourceSchemaRef: _angular_core.Signal<string | null>;
|
|
211
|
-
readonly targetSchemaRef: _angular_core.Signal<string | null>;
|
|
212
|
-
readonly selectedMapping: _angular_core.Signal<FieldMapping | null>;
|
|
213
|
-
readonly currentDragState: _angular_core.Signal<DragState>;
|
|
214
|
-
private generateId;
|
|
215
|
-
startDrag(field: SchemaField, startPoint: {
|
|
216
|
-
x: number;
|
|
217
|
-
y: number;
|
|
218
|
-
}): void;
|
|
219
|
-
startEndpointDrag(mappingId: string, endpointType: 'source' | 'target', startPoint: {
|
|
220
|
-
x: number;
|
|
221
|
-
y: number;
|
|
222
|
-
}, sourceFieldIndex?: number): void;
|
|
223
|
-
updateDragPosition(currentPoint: {
|
|
224
|
-
x: number;
|
|
225
|
-
y: number;
|
|
226
|
-
}): void;
|
|
227
|
-
endDrag(): void;
|
|
228
|
-
changeSourceField(mappingId: string, newSourceField: SchemaField, sourceFieldIndex?: number): void;
|
|
229
|
-
changeTargetField(mappingId: string, newTargetField: SchemaField): void;
|
|
230
|
-
createMapping(sourceFields: SchemaField[], targetField: SchemaField, transformation?: TransformationConfig): FieldMapping;
|
|
231
|
-
private createArrayMapping;
|
|
232
|
-
private createArrayToObjectMapping;
|
|
233
|
-
private findOrCreateArrayContext;
|
|
234
|
-
private findOrCreateArrayToObjectContext;
|
|
235
|
-
getArrayMapping(id: string): ArrayMapping | undefined;
|
|
236
|
-
getArrayMappingForField(field: SchemaField): ArrayMapping | undefined;
|
|
237
|
-
removeArrayMapping(arrayMappingId: string): void;
|
|
238
|
-
updateArrayFilter(arrayMappingId: string, filter: ArrayFilterConfig | undefined): void;
|
|
239
|
-
getArrayToObjectMapping(id: string): ArrayToObjectMapping | undefined;
|
|
240
|
-
updateArrayToObjectSelector(mappingId: string, selector: ArraySelectorConfig): void;
|
|
241
|
-
removeArrayToObjectMapping(mappingId: string): void;
|
|
242
|
-
updateMapping(mappingId: string, updates: Partial<FieldMapping>): void;
|
|
243
|
-
updateTransformations(mappingId: string, transformations: TransformationConfig[]): void;
|
|
244
|
-
removeMapping(mappingId: string): void;
|
|
245
|
-
removeSourceFromMapping(mappingId: string, sourceFieldId: string): void;
|
|
246
|
-
selectMapping(mappingId: string | null): void;
|
|
247
|
-
getMappingForTarget(targetFieldId: string): FieldMapping | undefined;
|
|
248
|
-
getMappingsForSource(sourceFieldId: string): FieldMapping[];
|
|
249
|
-
clearAllMappings(): void;
|
|
250
|
-
setSourceSchemaRef(ref: string | null): void;
|
|
251
|
-
setTargetSchemaRef(ref: string | null): void;
|
|
252
|
-
setDefaultValue(targetField: SchemaField, value: string | number | boolean | Date | null): DefaultValue;
|
|
253
|
-
getDefaultValue(targetFieldId: string): DefaultValue | undefined;
|
|
254
|
-
removeDefaultValue(targetFieldId: string): void;
|
|
255
|
-
hasDefaultValue(targetFieldId: string): boolean;
|
|
256
|
-
exportMappings(name?: string, description?: string): string;
|
|
257
|
-
/**
|
|
258
|
-
* Export mappings as a MappingDocument object (not stringified)
|
|
259
|
-
*/
|
|
260
|
-
exportMappingsAsObject(name?: string, description?: string): object;
|
|
261
|
-
importMappings(json: string): void;
|
|
262
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MappingService, never>;
|
|
263
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<MappingService>;
|
|
264
|
-
}
|
|
265
118
|
|
|
266
|
-
|
|
267
|
-
applyTransformation(sourceValues: Record<string, unknown>, sourceFields: SchemaField[], config: TransformationConfig): string;
|
|
268
|
-
/**
|
|
269
|
-
* Apply a transformation to a single value (for chained transformations)
|
|
270
|
-
*/
|
|
271
|
-
applyTransformationToValue(value: unknown, config: TransformationConfig): string;
|
|
272
|
-
/**
|
|
273
|
-
* Apply multiple transformations in sequence, respecting conditions
|
|
274
|
-
*/
|
|
275
|
-
applyTransformations(sourceValues: Record<string, unknown>, sourceFields: SchemaField[], transformations: TransformationConfig[]): string;
|
|
276
|
-
private getValueByPath;
|
|
277
|
-
private applyTemplate;
|
|
278
|
-
private formatDate;
|
|
279
|
-
private extractDatePart;
|
|
280
|
-
private formatNumber;
|
|
281
|
-
private applyMask;
|
|
282
|
-
getTransformationLabel(type: TransformationType): string;
|
|
283
|
-
getAvailableTransformations(): {
|
|
284
|
-
type: TransformationType;
|
|
285
|
-
label: string;
|
|
286
|
-
category?: string;
|
|
287
|
-
}[];
|
|
288
|
-
evaluateCondition(value: unknown, condition: FilterGroup): boolean;
|
|
289
|
-
private evaluateGroup;
|
|
290
|
-
private evaluateItem;
|
|
291
|
-
private evaluateConditionItem;
|
|
292
|
-
/**
|
|
293
|
-
* Check if a transformation's condition is met
|
|
294
|
-
*/
|
|
295
|
-
isConditionMet(value: unknown, config: TransformationConfig): boolean;
|
|
296
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TransformationService, never>;
|
|
297
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<TransformationService>;
|
|
298
|
-
}
|
|
119
|
+
type JsonSchema = JSONSchema7;
|
|
299
120
|
|
|
300
121
|
interface Point {
|
|
301
122
|
x: number;
|
|
302
123
|
y: number;
|
|
303
124
|
}
|
|
304
|
-
interface ConnectionPath {
|
|
305
|
-
id: string;
|
|
306
|
-
mappingId: string;
|
|
307
|
-
path: string;
|
|
308
|
-
sourcePoints: Point[];
|
|
309
|
-
targetPoint: Point;
|
|
310
|
-
midPoint: Point;
|
|
311
|
-
isSelected: boolean;
|
|
312
|
-
hasTransformation: boolean;
|
|
313
|
-
}
|
|
314
|
-
declare class SvgConnectorService {
|
|
315
|
-
createBezierPath(start: Point, end: Point): string;
|
|
316
|
-
createMultiSourcePath(sources: Point[], target: Point): {
|
|
317
|
-
paths: string[];
|
|
318
|
-
mergePoint: Point;
|
|
319
|
-
};
|
|
320
|
-
getMidPoint(start: Point, end: Point): Point;
|
|
321
|
-
getMultiSourceMidPoint(sources: Point[], target: Point): Point;
|
|
322
|
-
calculateConnectionPoint(rect: DOMRect, side: 'source' | 'target', containerRect: DOMRect): Point;
|
|
323
|
-
isPointNearPath(point: Point, pathStart: Point, pathEnd: Point, threshold?: number): boolean;
|
|
324
|
-
createDragPath(start: Point, end: Point): string;
|
|
325
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SvgConnectorService, never>;
|
|
326
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SvgConnectorService>;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
interface SchemaDocument extends JsonSchema {
|
|
330
|
-
$ref?: string;
|
|
331
|
-
$defs?: Record<string, JsonSchema>;
|
|
332
|
-
exclude?: string[];
|
|
333
|
-
include?: string[];
|
|
334
|
-
}
|
|
335
|
-
interface ModelRegistry {
|
|
336
|
-
[modelName: string]: JsonSchema;
|
|
337
|
-
}
|
|
338
|
-
declare class SchemaParserService {
|
|
339
|
-
private modelRegistry;
|
|
340
|
-
private idCounter;
|
|
341
|
-
registerModels(models: ModelRegistry): void;
|
|
342
|
-
clearRegistry(): void;
|
|
343
|
-
parseSchema(schemaJson: string | SchemaDocument, schemaName?: string): SchemaDefinition;
|
|
344
|
-
private resolveRef;
|
|
345
|
-
private buildFields;
|
|
346
|
-
private buildField;
|
|
347
|
-
private mapType;
|
|
348
|
-
private applyExclude;
|
|
349
|
-
private applyInclude;
|
|
350
|
-
private hasIncludedChild;
|
|
351
|
-
createSchemaFromRef(modelRef: string, options?: {
|
|
352
|
-
exclude?: string[];
|
|
353
|
-
include?: string[];
|
|
354
|
-
title?: string;
|
|
355
|
-
}): SchemaDocument;
|
|
356
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SchemaParserService, never>;
|
|
357
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SchemaParserService>;
|
|
358
|
-
}
|
|
359
125
|
|
|
360
126
|
interface FieldPositionEvent {
|
|
361
|
-
field:
|
|
127
|
+
field: SchemaTreeNode;
|
|
362
128
|
element: HTMLElement;
|
|
363
129
|
rect: DOMRect;
|
|
364
130
|
}
|
|
365
|
-
declare class SchemaTreeComponent implements AfterViewInit, OnDestroy {
|
|
366
|
-
schema: {
|
|
367
|
-
name: string;
|
|
368
|
-
fields: SchemaField[];
|
|
369
|
-
};
|
|
370
|
-
side: 'source' | 'target';
|
|
371
|
-
mappings: FieldMapping[];
|
|
372
|
-
defaultValues: DefaultValue[];
|
|
373
|
-
showSchemaName: boolean;
|
|
374
|
-
fieldDragStart: EventEmitter<FieldPositionEvent>;
|
|
375
|
-
fieldDragEnd: EventEmitter<void>;
|
|
376
|
-
fieldDrop: EventEmitter<FieldPositionEvent>;
|
|
377
|
-
sourceDrop: EventEmitter<FieldPositionEvent>;
|
|
378
|
-
fieldPositionsChanged: EventEmitter<Map<string, DOMRect>>;
|
|
379
|
-
fieldDefaultValueClick: EventEmitter<FieldPositionEvent>;
|
|
380
|
-
schemaFieldsContainer: ElementRef<HTMLDivElement>;
|
|
381
|
-
fieldItems: QueryList<ElementRef>;
|
|
382
|
-
private mappingService;
|
|
383
|
-
private resizeObserver;
|
|
384
|
-
private scrollHandler;
|
|
385
|
-
ngAfterViewInit(): void;
|
|
386
|
-
ngOnDestroy(): void;
|
|
387
|
-
onScroll(): void;
|
|
388
|
-
emitFieldPositions(): void;
|
|
389
|
-
toggleExpand(field: SchemaField, event: Event): void;
|
|
390
|
-
onDragStart(event: MouseEvent, field: SchemaField): void;
|
|
391
|
-
isEndpointDragMode(): boolean;
|
|
392
|
-
isSourceEndpointDragging(): boolean;
|
|
393
|
-
isTargetEndpointDragging(): boolean;
|
|
394
|
-
onDragOver(event: DragEvent): void;
|
|
395
|
-
onDrop(event: MouseEvent, field: SchemaField): void;
|
|
396
|
-
getTypeIcon(type: string): string;
|
|
397
|
-
isFieldMapped(field: SchemaField): boolean;
|
|
398
|
-
getFieldMappingCount(field: SchemaField): number;
|
|
399
|
-
hasDefaultValue(field: SchemaField): boolean;
|
|
400
|
-
getDefaultValueDisplay(field: SchemaField): string;
|
|
401
|
-
onFieldClick(event: MouseEvent, field: SchemaField): void;
|
|
402
|
-
trackByFieldId(index: number, field: SchemaField): string;
|
|
403
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SchemaTreeComponent, never>;
|
|
404
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SchemaTreeComponent, "schema-tree", never, { "schema": { "alias": "schema"; "required": false; }; "side": { "alias": "side"; "required": false; }; "mappings": { "alias": "mappings"; "required": false; }; "defaultValues": { "alias": "defaultValues"; "required": false; }; "showSchemaName": { "alias": "showSchemaName"; "required": false; }; }, { "fieldDragStart": "fieldDragStart"; "fieldDragEnd": "fieldDragEnd"; "fieldDrop": "fieldDrop"; "sourceDrop": "sourceDrop"; "fieldPositionsChanged": "fieldPositionsChanged"; "fieldDefaultValueClick": "fieldDefaultValueClick"; }, never, never, true, never>;
|
|
405
|
-
}
|
|
406
131
|
|
|
407
132
|
interface VisualConnection {
|
|
408
133
|
id: string;
|
|
@@ -419,8 +144,8 @@ interface VisualConnection {
|
|
|
419
144
|
isBeingDragged: boolean;
|
|
420
145
|
}
|
|
421
146
|
declare class DataMapperComponent implements AfterViewInit, OnDestroy {
|
|
422
|
-
set sourceSchema(value: JsonSchema
|
|
423
|
-
set targetSchema(value: JsonSchema
|
|
147
|
+
set sourceSchema(value: JsonSchema);
|
|
148
|
+
set targetSchema(value: JsonSchema);
|
|
424
149
|
set sourceSchemaRef(value: string | null | undefined);
|
|
425
150
|
set targetSchemaRef(value: string | null | undefined);
|
|
426
151
|
sampleData: Record<string, unknown>;
|
|
@@ -449,7 +174,7 @@ declare class DataMapperComponent implements AfterViewInit, OnDestroy {
|
|
|
449
174
|
showArraySelectorModal: _angular_core.WritableSignal<boolean>;
|
|
450
175
|
selectedArrayToObjectMapping: _angular_core.WritableSignal<ArrayToObjectMapping | null>;
|
|
451
176
|
showDefaultValuePopover: _angular_core.WritableSignal<boolean>;
|
|
452
|
-
selectedDefaultValueField: _angular_core.WritableSignal<
|
|
177
|
+
selectedDefaultValueField: _angular_core.WritableSignal<SchemaTreeNode | null>;
|
|
453
178
|
defaultValuePopoverPosition: _angular_core.WritableSignal<{
|
|
454
179
|
x: number;
|
|
455
180
|
y: number;
|
|
@@ -504,309 +229,5 @@ declare class DataMapperComponent implements AfterViewInit, OnDestroy {
|
|
|
504
229
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DataMapperComponent, "data-mapper", never, { "sourceSchema": { "alias": "sourceSchema"; "required": false; }; "targetSchema": { "alias": "targetSchema"; "required": false; }; "sourceSchemaRef": { "alias": "sourceSchemaRef"; "required": false; }; "targetSchemaRef": { "alias": "targetSchemaRef"; "required": false; }; "sampleData": { "alias": "sampleData"; "required": false; }; }, { "mappingsChange": "mappingsChange"; }, never, never, true, never>;
|
|
505
230
|
}
|
|
506
231
|
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
id: string;
|
|
510
|
-
name: string;
|
|
511
|
-
type: 'string' | 'number' | 'boolean' | 'date' | 'time' | 'object' | 'array';
|
|
512
|
-
format?: string;
|
|
513
|
-
displayType?: DisplayType$1;
|
|
514
|
-
label?: string;
|
|
515
|
-
required?: boolean;
|
|
516
|
-
defaultValue?: string | number | boolean;
|
|
517
|
-
allowedValues?: string[];
|
|
518
|
-
minLength?: number;
|
|
519
|
-
maxLength?: number;
|
|
520
|
-
pattern?: string;
|
|
521
|
-
minimum?: number;
|
|
522
|
-
maximum?: number;
|
|
523
|
-
children?: EditorField[];
|
|
524
|
-
expanded?: boolean;
|
|
525
|
-
isEditingValues?: boolean;
|
|
526
|
-
isEditingDefault?: boolean;
|
|
527
|
-
isEditingValidators?: boolean;
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
type DisplayType = 'textbox' | 'dropdown' | 'textarea' | 'richtext' | 'datepicker' | 'datetimepicker' | 'timepicker' | 'stepper' | 'checkbox' | 'toggle';
|
|
531
|
-
declare class SchemaEditorComponent {
|
|
532
|
-
private appRef;
|
|
533
|
-
set schema(value: JsonSchema | null);
|
|
534
|
-
private hasUncommittedChildFields;
|
|
535
|
-
showJsonToggle: boolean;
|
|
536
|
-
showSchemaName: boolean;
|
|
537
|
-
showDisplayType: boolean;
|
|
538
|
-
schemaChange: EventEmitter<JsonSchema>;
|
|
539
|
-
save: EventEmitter<JsonSchema>;
|
|
540
|
-
schemaName: _angular_core.WritableSignal<string>;
|
|
541
|
-
fields: _angular_core.WritableSignal<EditorField[]>;
|
|
542
|
-
viewMode: _angular_core.WritableSignal<"visual" | "json">;
|
|
543
|
-
jsonText: _angular_core.WritableSignal<string>;
|
|
544
|
-
jsonError: _angular_core.WritableSignal<string | null>;
|
|
545
|
-
fieldTypes: Array<{
|
|
546
|
-
value: string;
|
|
547
|
-
label: string;
|
|
548
|
-
icon: string;
|
|
549
|
-
}>;
|
|
550
|
-
stringDisplayTypes: Array<{
|
|
551
|
-
value: DisplayType;
|
|
552
|
-
label: string;
|
|
553
|
-
icon: string;
|
|
554
|
-
}>;
|
|
555
|
-
dateDisplayTypes: Array<{
|
|
556
|
-
value: DisplayType;
|
|
557
|
-
label: string;
|
|
558
|
-
icon: string;
|
|
559
|
-
}>;
|
|
560
|
-
timeDisplayTypes: Array<{
|
|
561
|
-
value: DisplayType;
|
|
562
|
-
label: string;
|
|
563
|
-
icon: string;
|
|
564
|
-
}>;
|
|
565
|
-
numberDisplayTypes: Array<{
|
|
566
|
-
value: DisplayType;
|
|
567
|
-
label: string;
|
|
568
|
-
icon: string;
|
|
569
|
-
}>;
|
|
570
|
-
booleanDisplayTypes: Array<{
|
|
571
|
-
value: DisplayType;
|
|
572
|
-
label: string;
|
|
573
|
-
icon: string;
|
|
574
|
-
}>;
|
|
575
|
-
stringFormats: Array<{
|
|
576
|
-
value: string;
|
|
577
|
-
label: string;
|
|
578
|
-
}>;
|
|
579
|
-
getDisplayTypes(fieldType: string): Array<{
|
|
580
|
-
value: DisplayType;
|
|
581
|
-
label: string;
|
|
582
|
-
icon: string;
|
|
583
|
-
}>;
|
|
584
|
-
private generateId;
|
|
585
|
-
private cloneFields;
|
|
586
|
-
getTypeIcon(type: string): string;
|
|
587
|
-
addField(): void;
|
|
588
|
-
addChildField(parent: EditorField): void;
|
|
589
|
-
onFieldChange(): void;
|
|
590
|
-
onFieldDelete(field: EditorField): void;
|
|
591
|
-
onFieldDuplicate(field: EditorField): void;
|
|
592
|
-
deleteField(field: EditorField, parentList: EditorField[]): void;
|
|
593
|
-
duplicateField(field: EditorField, parentList: EditorField[]): void;
|
|
594
|
-
toggleExpand(field: EditorField): void;
|
|
595
|
-
onFieldNameChange(field: EditorField, event: Event): void;
|
|
596
|
-
onFieldNameBlur(field: EditorField): void;
|
|
597
|
-
onFieldTypeChange(field: EditorField, type: string): void;
|
|
598
|
-
onDisplayTypeChange(field: EditorField, displayType: string): void;
|
|
599
|
-
toggleRequired(field: EditorField): void;
|
|
600
|
-
onLabelChange(field: EditorField, label: string): void;
|
|
601
|
-
onLabelBlur(): void;
|
|
602
|
-
toggleValuesEditor(field: EditorField): void;
|
|
603
|
-
addAllowedValue(field: EditorField, input: HTMLInputElement | Event): void;
|
|
604
|
-
removeAllowedValue(field: EditorField, index: number): void;
|
|
605
|
-
onAllowedValueKeydown(event: KeyboardEvent, field: EditorField, input: HTMLInputElement): void;
|
|
606
|
-
toggleDefaultEditor(field: EditorField): void;
|
|
607
|
-
onDefaultValueChange(field: EditorField, value: string): void;
|
|
608
|
-
clearDefaultValue(field: EditorField): void;
|
|
609
|
-
onDefaultValueKeydown(event: KeyboardEvent, field: EditorField): void;
|
|
610
|
-
toggleValidatorsEditor(field: EditorField): void;
|
|
611
|
-
hasValidators(field: EditorField): boolean;
|
|
612
|
-
onFormatChange(field: EditorField, format: string): void;
|
|
613
|
-
onMinLengthChange(field: EditorField, value: string): void;
|
|
614
|
-
onMaxLengthChange(field: EditorField, value: string): void;
|
|
615
|
-
onPatternChange(field: EditorField, value: string): void;
|
|
616
|
-
onMinimumChange(field: EditorField, value: string): void;
|
|
617
|
-
onMaximumChange(field: EditorField, value: string): void;
|
|
618
|
-
moveFieldUp(field: EditorField, parentList: EditorField[]): void;
|
|
619
|
-
moveFieldDown(field: EditorField, parentList: EditorField[]): void;
|
|
620
|
-
onFieldDrop(event: CdkDragDrop<EditorField[]>): void;
|
|
621
|
-
canIndent(field: EditorField, parentList: EditorField[]): boolean;
|
|
622
|
-
indentField(field: EditorField, parentList: EditorField[]): void;
|
|
623
|
-
outdentField(field: EditorField, parentList: EditorField[], level: number): void;
|
|
624
|
-
private findParentOfList;
|
|
625
|
-
private findParentList;
|
|
626
|
-
onSchemaNameChange(name: string, input?: HTMLInputElement): void;
|
|
627
|
-
private emitChange;
|
|
628
|
-
onSave(): void;
|
|
629
|
-
private jsonSchemaToEditorFields;
|
|
630
|
-
private jsonSchemaPropertyToEditorField;
|
|
631
|
-
private jsonSchemaTypeToEditorType;
|
|
632
|
-
toJson(): string;
|
|
633
|
-
toJsonSchema(): object;
|
|
634
|
-
private fieldToJsonSchema;
|
|
635
|
-
private stripEditingState;
|
|
636
|
-
trackByFieldId(index: number, field: EditorField): string;
|
|
637
|
-
setViewMode(mode: 'visual' | 'json'): void;
|
|
638
|
-
onJsonTextChange(text: string): void;
|
|
639
|
-
applyJsonChanges(): void;
|
|
640
|
-
formatJson(): void;
|
|
641
|
-
copyJson(): void;
|
|
642
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SchemaEditorComponent, never>;
|
|
643
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SchemaEditorComponent, "schema-editor", never, { "schema": { "alias": "schema"; "required": false; }; "showJsonToggle": { "alias": "showJsonToggle"; "required": false; }; "showSchemaName": { "alias": "showSchemaName"; "required": false; }; "showDisplayType": { "alias": "showDisplayType"; "required": false; }; }, { "schemaChange": "schemaChange"; "save": "save"; }, never, never, true, never>;
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
declare class TransformationPopoverComponent implements OnInit, OnChanges {
|
|
647
|
-
mapping: FieldMapping;
|
|
648
|
-
position: {
|
|
649
|
-
x: number;
|
|
650
|
-
y: number;
|
|
651
|
-
};
|
|
652
|
-
sampleData: Record<string, unknown>;
|
|
653
|
-
save: EventEmitter<TransformationConfig[]>;
|
|
654
|
-
delete: EventEmitter<void>;
|
|
655
|
-
close: EventEmitter<void>;
|
|
656
|
-
private transformationService;
|
|
657
|
-
steps: TransformationConfig[];
|
|
658
|
-
stepPreviews: string[];
|
|
659
|
-
stepInputs: string[];
|
|
660
|
-
finalPreview: string;
|
|
661
|
-
expandedStepIndex: number;
|
|
662
|
-
availableTransformations: {
|
|
663
|
-
type: TransformationType;
|
|
664
|
-
label: string;
|
|
665
|
-
category?: string;
|
|
666
|
-
}[];
|
|
667
|
-
ngOnInit(): void;
|
|
668
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
669
|
-
private initFromMapping;
|
|
670
|
-
get isMultiStep(): boolean;
|
|
671
|
-
onStepTypeChange(index: number): void;
|
|
672
|
-
private getDefaultTemplate;
|
|
673
|
-
addStep(): void;
|
|
674
|
-
removeStep(index: number): void;
|
|
675
|
-
onStepDrop(event: CdkDragDrop<TransformationConfig[]>): void;
|
|
676
|
-
toggleStep(index: number): void;
|
|
677
|
-
isStepExpanded(index: number): boolean;
|
|
678
|
-
updatePreview(): void;
|
|
679
|
-
private getValueByPath;
|
|
680
|
-
onConfigChange(): void;
|
|
681
|
-
onSave(): void;
|
|
682
|
-
onDelete(): void;
|
|
683
|
-
onClose(): void;
|
|
684
|
-
getSourceFieldNames(): string;
|
|
685
|
-
getPopoverStyle(): Record<string, string>;
|
|
686
|
-
getStepTypeLabel(type: TransformationType): string;
|
|
687
|
-
hasCondition(step: TransformationConfig): boolean;
|
|
688
|
-
toggleCondition(step: TransformationConfig, enabled: boolean): void;
|
|
689
|
-
onConditionChange(step: TransformationConfig, group: FilterGroup): void;
|
|
690
|
-
private createEmptyConditionGroup;
|
|
691
|
-
getConditionSummary(step: TransformationConfig): string;
|
|
692
|
-
private summarizeConditionGroup;
|
|
693
|
-
private getOperatorLabel;
|
|
694
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TransformationPopoverComponent, never>;
|
|
695
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TransformationPopoverComponent, "transformation-popover", never, { "mapping": { "alias": "mapping"; "required": false; }; "position": { "alias": "position"; "required": false; }; "sampleData": { "alias": "sampleData"; "required": false; }; }, { "save": "save"; "delete": "delete"; "close": "close"; }, never, never, true, never>;
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
interface OperatorOption$1 {
|
|
699
|
-
value: FilterOperator;
|
|
700
|
-
label: string;
|
|
701
|
-
needsValue: boolean;
|
|
702
|
-
}
|
|
703
|
-
declare class ArrayFilterModalComponent implements OnInit {
|
|
704
|
-
arrayMapping: ArrayMapping;
|
|
705
|
-
save: EventEmitter<ArrayFilterConfig | undefined>;
|
|
706
|
-
close: EventEmitter<void>;
|
|
707
|
-
filterEnabled: _angular_core.WritableSignal<boolean>;
|
|
708
|
-
rootGroup: _angular_core.WritableSignal<FilterGroup>;
|
|
709
|
-
availableFields: _angular_core.Signal<{
|
|
710
|
-
path: string;
|
|
711
|
-
name: string;
|
|
712
|
-
type: string;
|
|
713
|
-
}[]>;
|
|
714
|
-
stringOperators: OperatorOption$1[];
|
|
715
|
-
numberOperators: OperatorOption$1[];
|
|
716
|
-
booleanOperators: OperatorOption$1[];
|
|
717
|
-
ngOnInit(): void;
|
|
718
|
-
private createEmptyGroup;
|
|
719
|
-
private generateId;
|
|
720
|
-
private cloneGroup;
|
|
721
|
-
private collectFields;
|
|
722
|
-
getOperatorsForField(fieldPath: string): OperatorOption$1[];
|
|
723
|
-
getFieldType(fieldPath: string): string;
|
|
724
|
-
operatorNeedsValue(operator: FilterOperator): boolean;
|
|
725
|
-
isCondition(item: FilterItem): item is FilterCondition;
|
|
726
|
-
isGroup(item: FilterItem): item is FilterGroup;
|
|
727
|
-
addCondition(group: FilterGroup): void;
|
|
728
|
-
addGroup(parentGroup: FilterGroup): void;
|
|
729
|
-
removeItem(parentGroup: FilterGroup, itemId: string): void;
|
|
730
|
-
onFieldChange(condition: FilterCondition, fieldPath: string): void;
|
|
731
|
-
onOperatorChange(condition: FilterCondition, operator: FilterOperator): void;
|
|
732
|
-
onValueChange(condition: FilterCondition, value: string | boolean): void;
|
|
733
|
-
onLogicChange(group: FilterGroup, logic: 'and' | 'or'): void;
|
|
734
|
-
private triggerUpdate;
|
|
735
|
-
hasConditions(group: FilterGroup): boolean;
|
|
736
|
-
countConditions(group: FilterGroup): number;
|
|
737
|
-
onSave(): void;
|
|
738
|
-
onClose(): void;
|
|
739
|
-
onBackdropClick(event: MouseEvent): void;
|
|
740
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ArrayFilterModalComponent, never>;
|
|
741
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ArrayFilterModalComponent, "array-filter-modal", never, { "arrayMapping": { "alias": "arrayMapping"; "required": true; }; }, { "save": "save"; "close": "close"; }, never, never, true, never>;
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
interface OperatorOption {
|
|
745
|
-
value: FilterOperator;
|
|
746
|
-
label: string;
|
|
747
|
-
needsValue: boolean;
|
|
748
|
-
}
|
|
749
|
-
declare class ArraySelectorModalComponent implements OnInit {
|
|
750
|
-
mapping: ArrayToObjectMapping;
|
|
751
|
-
save: EventEmitter<ArraySelectorConfig>;
|
|
752
|
-
close: EventEmitter<void>;
|
|
753
|
-
selectionMode: _angular_core.WritableSignal<ArraySelectionMode>;
|
|
754
|
-
conditionGroup: _angular_core.WritableSignal<FilterGroup>;
|
|
755
|
-
availableFields: _angular_core.Signal<{
|
|
756
|
-
path: string;
|
|
757
|
-
name: string;
|
|
758
|
-
type: string;
|
|
759
|
-
}[]>;
|
|
760
|
-
stringOperators: OperatorOption[];
|
|
761
|
-
numberOperators: OperatorOption[];
|
|
762
|
-
booleanOperators: OperatorOption[];
|
|
763
|
-
ngOnInit(): void;
|
|
764
|
-
private createEmptyGroup;
|
|
765
|
-
private generateId;
|
|
766
|
-
private cloneGroup;
|
|
767
|
-
private collectFields;
|
|
768
|
-
getOperatorsForField(fieldPath: string): OperatorOption[];
|
|
769
|
-
operatorNeedsValue(operator: FilterOperator): boolean;
|
|
770
|
-
isCondition(item: FilterItem): item is FilterCondition;
|
|
771
|
-
isGroup(item: FilterItem): item is FilterGroup;
|
|
772
|
-
addCondition(group: FilterGroup): void;
|
|
773
|
-
addGroup(parentGroup: FilterGroup): void;
|
|
774
|
-
removeItem(parentGroup: FilterGroup, itemId: string): void;
|
|
775
|
-
onFieldChange(condition: FilterCondition, fieldPath: string): void;
|
|
776
|
-
onOperatorChange(condition: FilterCondition, operator: FilterOperator): void;
|
|
777
|
-
onValueChange(condition: FilterCondition, value: string | boolean): void;
|
|
778
|
-
onLogicChange(group: FilterGroup, logic: 'and' | 'or'): void;
|
|
779
|
-
private triggerUpdate;
|
|
780
|
-
onSave(): void;
|
|
781
|
-
onClose(): void;
|
|
782
|
-
onBackdropClick(event: MouseEvent): void;
|
|
783
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ArraySelectorModalComponent, never>;
|
|
784
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ArraySelectorModalComponent, "array-selector-modal", never, { "mapping": { "alias": "mapping"; "required": true; }; }, { "save": "save"; "close": "close"; }, never, never, true, never>;
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
declare class DefaultValuePopoverComponent implements OnInit {
|
|
788
|
-
field: SchemaField;
|
|
789
|
-
existingValue?: DefaultValue;
|
|
790
|
-
position: {
|
|
791
|
-
x: number;
|
|
792
|
-
y: number;
|
|
793
|
-
};
|
|
794
|
-
save: EventEmitter<string | number | boolean | Date | null>;
|
|
795
|
-
delete: EventEmitter<void>;
|
|
796
|
-
close: EventEmitter<void>;
|
|
797
|
-
stringValue: string;
|
|
798
|
-
numberValue: number | null;
|
|
799
|
-
booleanValue: boolean;
|
|
800
|
-
dateValue: Date | null;
|
|
801
|
-
ngOnInit(): void;
|
|
802
|
-
get fieldType(): string;
|
|
803
|
-
onSave(): void;
|
|
804
|
-
onDelete(): void;
|
|
805
|
-
onClose(): void;
|
|
806
|
-
onBackdropClick(event: MouseEvent): void;
|
|
807
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DefaultValuePopoverComponent, never>;
|
|
808
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DefaultValuePopoverComponent, "default-value-popover", never, { "field": { "alias": "field"; "required": false; }; "existingValue": { "alias": "existingValue"; "required": false; }; "position": { "alias": "position"; "required": false; }; }, { "save": "save"; "delete": "delete"; "close": "close"; }, never, never, true, never>;
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
export { ArrayFilterModalComponent, ArraySelectorModalComponent, DataMapperComponent, DefaultValuePopoverComponent, MappingService, SchemaEditorComponent, SchemaParserService, SchemaTreeComponent, SvgConnectorService, TransformationPopoverComponent, TransformationService, addProperty, createEmptySchema, getSchemaType, removeProperty, schemaToFields };
|
|
812
|
-
export type { ArrayFilterConfig, ArrayMapping, ArraySelectionMode, ArraySelectorConfig, ArrayToObjectMapping, Connection, ConnectionPath, ConnectionPoint, DefaultValue, DragState, FieldMapping, FieldPositionEvent, FilterCondition, FilterGroup, FilterItem, FilterOperator, JsonSchema, JsonSchemaField, JsonSchemaType, ModelRegistry, Point, SchemaDefinition, SchemaDocument, SchemaField, TransformationCondition, TransformationConfig, TransformationType };
|
|
232
|
+
export { DataMapperComponent };
|
|
233
|
+
export type { ArrayMapping, ArrayToObjectMapping, DefaultValue, FieldMapping, FieldReference, FieldType, JsonSchema, SchemaTreeNode, TransformationConfig, TransformationType };
|