@dangl/ava-partial-updater 1.4.5-beta0053 → 1.4.5-beta0057

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 CHANGED
@@ -1,207 +1,207 @@
1
- # Dangl.AngularAva
2
-
3
- [![Node version](https://img.shields.io/npm/v/@dangl/angular-ava)](https://www.npmjs.com/package/@dangl/angular-ava)
4
-
5
- `@dangl/angular-ava` is an UI library for Angular applications. It's used to render trees of AVA Projects. _AVA_ in German stands for _Ausschreibung, Vergabe & Abrechnung_ (_Tendering, awarding & billing_), they represent services and elements of construction projects. Additionally, it has components for displaying invoice views for e.g. the XRechnung standard for electronic invoices.
6
-
7
- [AVACloud by Dangl**IT** GmbH](https://www.dangl-it.com/products/avacloud-gaeb-saas/) is one way of creating such data structures.
8
-
9
- ## Usage
10
-
11
- ### Import the Component
12
-
13
- ```typescript
14
- import { AvaTreeComponent } from "@dangl/angular-ava";
15
-
16
- @Component({
17
- imports: [AvaTreeComponent],
18
- })
19
- export class AppComponent {}
20
- ```
21
-
22
- ### Use the Component
23
-
24
- ```html
25
- <ava-tree [project]="projectData" [config]="config"> </ava-tree>
26
- ```
27
-
28
- `projectData` must be of type `ProjectDto`.
29
-
30
- ### Configuration
31
-
32
- ```typescript
33
- export interface IConfigurationTree {
34
- /**
35
- * Optional, defaults to 20px. If this is set, then the tree will be indented by the given value each level.
36
- * This can be any valid CSS value for the padding-left property, such as 20px, 1em, or 5%.
37
- */
38
- indent?: string;
39
-
40
- /**
41
- * Optional, you can supply a color to be used as the background color for the selected line. Defaults to the primary
42
- * color from the Material theme, which is #00acc1.
43
- */
44
- selectedColor?: string;
45
-
46
- /**
47
- * Optional, defaults to true. If this is disabled, then the double click event for elements is not raised, and clicking on an elemt sends an immediate result since the component has not to wait and check if a double click event is fired.
48
- */
49
- allowDblClick?: boolean;
50
-
51
- /**
52
- * If this is set to true, then the tree will be in selection mode, and the user can select elements by clicking on them. The selected elements will be emitted in the selectedElementsChanged event.
53
- */
54
- isSelectionMode?: boolean;
55
-
56
- /**
57
- * You can optionally supply a list of elements that should be selected initially. This is only used if isSelectionMode is true.
58
- */
59
- initiallySelectedElements?: SelectedElement[];
60
-
61
- /**
62
- * You can supply a map of strings to be used for the text in the tree. This allows you to translate the text in the tree to other languages. There are also 'DEFAULT_TEXT_WORDS' and 'germanTextsAva' supplied with the package. You may optionally just submit the string values 'en' or 'de' to use the default text words for English or German.
63
- */
64
- textWords?: ITextWords | "en" | "de";
65
-
66
- /**
67
- * Defaults to true. If this is enabled, then navigating in the tree with the keyboard only works if the mouse is over the tree area. This limitation is useful if you have multiple trees or other components that might be using keyboard input.
68
- */
69
- mouseAwareKeyboardControl?: boolean;
70
-
71
- /**
72
- * With this parameter, you can configure which keys will be listenend to to switch the tree elements, and also to disable the functionality of the keys
73
- */
74
- customKeyboardOperationConfig?: IKeyboardOperationConfig | null;
75
-
76
- /**
77
- * You can supply custom filters that are processed when the filter input is changed. Default filters are used that check for short text and item number matches, and you can either add custom filters or replace the default ones.
78
- */
79
- listFilterFunc?: FilterFunction[];
80
-
81
- /**
82
- * Optional. For table views, this allows you to add custom columns to the table.
83
- * addTableColumns: Array of objects
84
- * {
85
- * name: string, // name of column
86
- * title: string, // showed title of column
87
- * align?: string, // optional alight: left(default) / center / right
88
- * numberFormat?: string // optional format of number value, example: '1.2-2'
89
- * }
90
- */
91
- addTableColumns?: TableColumnType[];
92
-
93
- /**
94
- * This allows you to supply a list of functions that can be used to change the appearance of elements.
95
- * They objects contain a predicate function that is evaluated, along with an option to configure the appearance of the element.
96
- * functionView: Array of objects
97
- * {
98
- * name: string, // name of view part: you can add/remove it when needed
99
- * func: (element: any, result?: any) => boolean, // this filter function calculates conditions to change the view
100
- * view: {
101
- * iconName?: string, // changed name of icon
102
- * iconColor?: string, // changed color of icon
103
- * textBold?: string, // changed weight of text
104
- * textColor?: string // changed color of text
105
- * }
106
- * }
107
- */
108
- functionView?: IFunctionViewLine[];
109
- }
110
- ```
111
-
112
- You can also supply the following input parameters
113
-
114
- ```typescript
115
- /**
116
- * Optionally, you can supply a map of expansion states for the tree. The keys should be the
117
- * id properties of the elements in the tree, and the values should be true if the element is
118
- * expanded, and false if it is collapsed.
119
- */
120
- readonly expansionstate = input<IExpansionState | null, IExpansionState>(null, {
121
- transform: this.transformFn<IExpansionState>
122
- });
123
-
124
- /**
125
- * Optionally, you can supply the id of the node that should be selected in the tree initially.
126
- */
127
- readonly selectednodeid = input<string | null>(null);
128
-
129
- /**
130
- * You can specify which view type to use for the tree. The default is ModeViewType.Tree, but you can also use
131
- * ModeViewType.List or ModeViewType.Table.
132
- */
133
- readonly modeview = input<ModeViewType>(ModeViewType.Tree);
134
- ```
135
-
136
- ### Output Parameters
137
-
138
- ```typescript
139
- /**
140
- * This is emitted when an element is selected by clicking on it. The selected element is emitted as the event value.
141
- */
142
- @Output() selectClick = new EventEmitter<IElementDto | null>();
143
- /**
144
- * This is emitted when an element is selected by double clicking on it. The selected element is emitted as the event value.
145
- */
146
- @Output() selectDblClick = new EventEmitter<IElementDto>();
147
- /**
148
- * This is emitted when an element is selected by right clicking on it. The selected element is emitted as the event value.
149
- */
150
- @Output() contextMenuEvent = new EventEmitter<ContextMenuDataType>();
151
- /**
152
- * This is emitted when the selected elements in the tree are changed. The selected elements are emitted as the event value.
153
- * Selected elements are elements whose checkboxes are checked, and are different than elements that are in an active selection state.
154
- * Typcial use cases for this include e.g. selecting multiple elements within a service specification without
155
- * actually focussing them, e.g. for further processing.
156
- */
157
- @Output() selectedElementsChanged = new EventEmitter<SelectedElement[]>();
158
- ```
159
-
160
- ## Invoice Module
161
-
162
- There is also an `InvoiceDisplayComponent` available that can be used to show invoice objects.
163
-
164
- ## Usage
165
-
166
- ### Import the Component
167
-
168
- ```typescript
169
- import { InvoiceDisplayComponent } from "@dangl/angular-ava";
170
-
171
- @Component({
172
- imports: [InvoiceDisplayComponent],
173
- })
174
- export class AppComponent {}
175
- ```
176
-
177
- ### Use the Component
178
-
179
- ```html
180
- <ava-invoice-display
181
- [invoice]="INVOICE"
182
- [config]="config"
183
- ></ava-invoice-display>
184
- ```
185
-
186
- `INVOICE` must be of type `Invoice`.
187
-
188
- ### Configuration
189
-
190
- ```typescript
191
- export interface IConfigurationInvoice {
192
- //** If specified, the invoice viewer will use the given textWords for the text in the UI. */
193
- textWords?: ITextWordInvoice | null;
194
-
195
- //** If specified, the invoice viewer will use non-interactive display features, . */
196
- pdfViewEnabled?: boolean;
197
-
198
- //** If specified, the invoice viewer will use the given language for the text in the UI. */
199
- language?: LanguageType; // type LanguageType = 'en' | 'de';
200
-
201
- //** This controls how many digits are displayed for quantities. It defaults to '1.3-3', meaning it will always show three decimal palces. */
202
- quantityDecimalPlaces?: string;
203
-
204
- //** If specified, the invoice color settings will be used for the invoice viewer.*/
205
- colorSettings?: IColorSettings | null;
206
- }
207
- ```
1
+ # Dangl.AngularAva
2
+
3
+ [![Node version](https://img.shields.io/npm/v/@dangl/angular-ava)](https://www.npmjs.com/package/@dangl/angular-ava)
4
+
5
+ `@dangl/angular-ava` is an UI library for Angular applications. It's used to render trees of AVA Projects. _AVA_ in German stands for _Ausschreibung, Vergabe & Abrechnung_ (_Tendering, awarding & billing_), they represent services and elements of construction projects. Additionally, it has components for displaying invoice views for e.g. the XRechnung standard for electronic invoices.
6
+
7
+ [AVACloud by Dangl**IT** GmbH](https://www.dangl-it.com/products/avacloud-gaeb-saas/) is one way of creating such data structures.
8
+
9
+ ## Usage
10
+
11
+ ### Import the Component
12
+
13
+ ```typescript
14
+ import { AvaTreeComponent } from "@dangl/angular-ava";
15
+
16
+ @Component({
17
+ imports: [AvaTreeComponent],
18
+ })
19
+ export class AppComponent {}
20
+ ```
21
+
22
+ ### Use the Component
23
+
24
+ ```html
25
+ <ava-tree [project]="projectData" [config]="config"> </ava-tree>
26
+ ```
27
+
28
+ `projectData` must be of type `ProjectDto`.
29
+
30
+ ### Configuration
31
+
32
+ ```typescript
33
+ export interface IConfigurationTree {
34
+ /**
35
+ * Optional, defaults to 20px. If this is set, then the tree will be indented by the given value each level.
36
+ * This can be any valid CSS value for the padding-left property, such as 20px, 1em, or 5%.
37
+ */
38
+ indent?: string;
39
+
40
+ /**
41
+ * Optional, you can supply a color to be used as the background color for the selected line. Defaults to the primary
42
+ * color from the Material theme, which is #00acc1.
43
+ */
44
+ selectedColor?: string;
45
+
46
+ /**
47
+ * Optional, defaults to true. If this is disabled, then the double click event for elements is not raised, and clicking on an elemt sends an immediate result since the component has not to wait and check if a double click event is fired.
48
+ */
49
+ allowDblClick?: boolean;
50
+
51
+ /**
52
+ * If this is set to true, then the tree will be in selection mode, and the user can select elements by clicking on them. The selected elements will be emitted in the selectedElementsChanged event.
53
+ */
54
+ isSelectionMode?: boolean;
55
+
56
+ /**
57
+ * You can optionally supply a list of elements that should be selected initially. This is only used if isSelectionMode is true.
58
+ */
59
+ initiallySelectedElements?: SelectedElement[];
60
+
61
+ /**
62
+ * You can supply a map of strings to be used for the text in the tree. This allows you to translate the text in the tree to other languages. There are also 'DEFAULT_TEXT_WORDS' and 'germanTextsAva' supplied with the package. You may optionally just submit the string values 'en' or 'de' to use the default text words for English or German.
63
+ */
64
+ textWords?: ITextWords | "en" | "de";
65
+
66
+ /**
67
+ * Defaults to true. If this is enabled, then navigating in the tree with the keyboard only works if the mouse is over the tree area. This limitation is useful if you have multiple trees or other components that might be using keyboard input.
68
+ */
69
+ mouseAwareKeyboardControl?: boolean;
70
+
71
+ /**
72
+ * With this parameter, you can configure which keys will be listenend to to switch the tree elements, and also to disable the functionality of the keys
73
+ */
74
+ customKeyboardOperationConfig?: IKeyboardOperationConfig | null;
75
+
76
+ /**
77
+ * You can supply custom filters that are processed when the filter input is changed. Default filters are used that check for short text and item number matches, and you can either add custom filters or replace the default ones.
78
+ */
79
+ listFilterFunc?: FilterFunction[];
80
+
81
+ /**
82
+ * Optional. For table views, this allows you to add custom columns to the table.
83
+ * addTableColumns: Array of objects
84
+ * {
85
+ * name: string, // name of column
86
+ * title: string, // showed title of column
87
+ * align?: string, // optional alight: left(default) / center / right
88
+ * numberFormat?: string // optional format of number value, example: '1.2-2'
89
+ * }
90
+ */
91
+ addTableColumns?: TableColumnType[];
92
+
93
+ /**
94
+ * This allows you to supply a list of functions that can be used to change the appearance of elements.
95
+ * They objects contain a predicate function that is evaluated, along with an option to configure the appearance of the element.
96
+ * functionView: Array of objects
97
+ * {
98
+ * name: string, // name of view part: you can add/remove it when needed
99
+ * func: (element: any, result?: any) => boolean, // this filter function calculates conditions to change the view
100
+ * view: {
101
+ * iconName?: string, // changed name of icon
102
+ * iconColor?: string, // changed color of icon
103
+ * textBold?: string, // changed weight of text
104
+ * textColor?: string // changed color of text
105
+ * }
106
+ * }
107
+ */
108
+ functionView?: IFunctionViewLine[];
109
+ }
110
+ ```
111
+
112
+ You can also supply the following input parameters
113
+
114
+ ```typescript
115
+ /**
116
+ * Optionally, you can supply a map of expansion states for the tree. The keys should be the
117
+ * id properties of the elements in the tree, and the values should be true if the element is
118
+ * expanded, and false if it is collapsed.
119
+ */
120
+ readonly expansionstate = input<IExpansionState | null, IExpansionState>(null, {
121
+ transform: this.transformFn<IExpansionState>
122
+ });
123
+
124
+ /**
125
+ * Optionally, you can supply the id of the node that should be selected in the tree initially.
126
+ */
127
+ readonly selectednodeid = input<string | null>(null);
128
+
129
+ /**
130
+ * You can specify which view type to use for the tree. The default is ModeViewType.Tree, but you can also use
131
+ * ModeViewType.List or ModeViewType.Table.
132
+ */
133
+ readonly modeview = input<ModeViewType>(ModeViewType.Tree);
134
+ ```
135
+
136
+ ### Output Parameters
137
+
138
+ ```typescript
139
+ /**
140
+ * This is emitted when an element is selected by clicking on it. The selected element is emitted as the event value.
141
+ */
142
+ @Output() selectClick = new EventEmitter<IElementDto | null>();
143
+ /**
144
+ * This is emitted when an element is selected by double clicking on it. The selected element is emitted as the event value.
145
+ */
146
+ @Output() selectDblClick = new EventEmitter<IElementDto>();
147
+ /**
148
+ * This is emitted when an element is selected by right clicking on it. The selected element is emitted as the event value.
149
+ */
150
+ @Output() contextMenuEvent = new EventEmitter<ContextMenuDataType>();
151
+ /**
152
+ * This is emitted when the selected elements in the tree are changed. The selected elements are emitted as the event value.
153
+ * Selected elements are elements whose checkboxes are checked, and are different than elements that are in an active selection state.
154
+ * Typcial use cases for this include e.g. selecting multiple elements within a service specification without
155
+ * actually focussing them, e.g. for further processing.
156
+ */
157
+ @Output() selectedElementsChanged = new EventEmitter<SelectedElement[]>();
158
+ ```
159
+
160
+ ## Invoice Module
161
+
162
+ There is also an `InvoiceDisplayComponent` available that can be used to show invoice objects.
163
+
164
+ ## Usage
165
+
166
+ ### Import the Component
167
+
168
+ ```typescript
169
+ import { InvoiceDisplayComponent } from "@dangl/angular-ava";
170
+
171
+ @Component({
172
+ imports: [InvoiceDisplayComponent],
173
+ })
174
+ export class AppComponent {}
175
+ ```
176
+
177
+ ### Use the Component
178
+
179
+ ```html
180
+ <ava-invoice-display
181
+ [invoice]="INVOICE"
182
+ [config]="config"
183
+ ></ava-invoice-display>
184
+ ```
185
+
186
+ `INVOICE` must be of type `Invoice`.
187
+
188
+ ### Configuration
189
+
190
+ ```typescript
191
+ export interface IConfigurationInvoice {
192
+ //** If specified, the invoice viewer will use the given textWords for the text in the UI. */
193
+ textWords?: ITextWordInvoice | null;
194
+
195
+ //** If specified, the invoice viewer will use non-interactive display features, . */
196
+ pdfViewEnabled?: boolean;
197
+
198
+ //** If specified, the invoice viewer will use the given language for the text in the UI. */
199
+ language?: LanguageType; // type LanguageType = 'en' | 'de';
200
+
201
+ //** This controls how many digits are displayed for quantities. It defaults to '1.3-3', meaning it will always show three decimal palces. */
202
+ quantityDecimalPlaces?: string;
203
+
204
+ //** If specified, the invoice color settings will be used for the invoice viewer.*/
205
+ colorSettings?: IColorSettings | null;
206
+ }
207
+ ```
@@ -1 +1 @@
1
- {"version":3,"file":"dangl-ava-partial-updater.mjs","sources":["../../../projects/ava-partial-updater/src/lib/utils/get-flat-list.ts","../../../projects/ava-partial-updater/src/lib/ava-partial-updater.service.ts","../../../projects/ava-partial-updater/src/public-api.ts","../../../projects/ava-partial-updater/src/dangl-ava-partial-updater.ts"],"sourcesContent":["import { IElementDto, ServiceSpecificationGroupDto } from '../interfaces/ava-models';\r\n\r\nexport function getFlatElements(container: { elements?: IElementDto[] | null }): IElementDto[] {\r\n const flatElements: IElementDto[] = [];\r\n\r\n if (container.elements) {\r\n container.elements.forEach((e) => {\r\n flatElements.push(e);\r\n if (e.elementTypeDiscriminator === 'ServiceSpecificationGroupDto') {\r\n const group = e as ServiceSpecificationGroupDto;\r\n flatElements.push(...getFlatElements(group));\r\n }\r\n });\r\n }\r\n\r\n return flatElements;\r\n}\r\n","import { IElementDto, ServiceSpecificationDto, ServiceSpecificationGroupDto } from './interfaces/ava-models';\r\nimport { AvaProjectDiff } from './interfaces/ava-project-diff.interface';\r\nimport { Operation } from './interfaces/operation.interface';\r\nimport { getFlatElements } from './utils/get-flat-list';\r\n\r\nimport jsonPatch, { Operation as JsonPatchOperation } from 'fast-json-patch';\r\n\r\nconst { applyOperation } = jsonPatch;\r\n\r\nexport class AvaPartialUpdaterService {\r\n public static applyAvaProjectDiffToSpecificServiceSpecification(\r\n serviceSpecification: ServiceSpecificationDto,\r\n avaProjectDiff: AvaProjectDiff\r\n ): ServiceSpecificationDto {\r\n const clonedServiceSpecification = structuredClone(serviceSpecification);\r\n\r\n const flatElements = getFlatElements(clonedServiceSpecification);\r\n const elementsById: { [id: string]: IElementDto } = {};\r\n const containers: { id?: string; elements?: IElementDto[] }[] = [];\r\n flatElements.forEach((element) => {\r\n elementsById[element.id] = element;\r\n if (element.elementType === 'ServiceSpecificationGroupDto') {\r\n containers.push(element);\r\n }\r\n });\r\n containers.push(clonedServiceSpecification);\r\n\r\n return this.internalServiceSpecificationDiffApply(clonedServiceSpecification, avaProjectDiff, elementsById, containers);\r\n }\r\n\r\n private static internalServiceSpecificationDiffApply(\r\n serviceSpecification: ServiceSpecificationDto,\r\n avaProjectDiff: AvaProjectDiff,\r\n elementsById: { [elementId: string]: IElementDto },\r\n containers: { id?: string; elements?: IElementDto[] }[]\r\n ): ServiceSpecificationDto {\r\n if (avaProjectDiff.elementDiffs != null) {\r\n for (const elementId in avaProjectDiff.elementDiffs) {\r\n const originalElement = elementsById[elementId];\r\n if (originalElement) {\r\n avaProjectDiff.elementDiffs[elementId].forEach((operation) => {\r\n this.applySingleElementDiffOperation(originalElement, operation);\r\n });\r\n }\r\n }\r\n }\r\n\r\n // Here, it's important that we first remove the elements that are to be deleted,\r\n // because a move between two containers is represented as a deletion and a move, so we\r\n // first delete the element and then add it again to the new container.\r\n if (avaProjectDiff.removedElementIds && avaProjectDiff.removedElementIds.length > 0) {\r\n avaProjectDiff.removedElementIds.forEach((removedElementId) => {\r\n if (elementsById[removedElementId]) {\r\n delete elementsById[removedElementId];\r\n }\r\n\r\n const parentContainer = containers.find((c) => c.elements?.some((e) => e.id === removedElementId));\r\n if (parentContainer && parentContainer.elements?.length) {\r\n const elementIndex = parentContainer.elements.findIndex((e) => e.id === removedElementId);\r\n if (elementIndex >= 0) {\r\n parentContainer.elements.splice(elementIndex, 1);\r\n }\r\n\r\n const cachedContainerIndex = containers.findIndex((c) => c.id === removedElementId);\r\n if (cachedContainerIndex >= 0) {\r\n containers.splice(cachedContainerIndex, 1);\r\n }\r\n }\r\n });\r\n }\r\n if (avaProjectDiff.newElements) {\r\n if (avaProjectDiff.newElements.length > 0) {\r\n avaProjectDiff.newElements.forEach((newElement) => {\r\n if (newElement.element) {\r\n elementsById[newElement.element.id] = newElement.element;\r\n\r\n const parentContainer = containers.find((c) => c.id === newElement.parentElementId);\r\n if (parentContainer) {\r\n if (parentContainer.elements && newElement.elementIndex) {\r\n parentContainer.elements.splice(newElement.elementIndex, 0, newElement.element);\r\n }\r\n\r\n if (newElement.element.elementType === 'ServiceSpecificationGroupDto') {\r\n const group = newElement.element as ServiceSpecificationGroupDto;\r\n if (group.elements == null) {\r\n group.elements = [];\r\n }\r\n\r\n containers.push(newElement.element);\r\n }\r\n }\r\n }\r\n });\r\n }\r\n }\r\n\r\n if (avaProjectDiff.serviceSpecificationDiff && avaProjectDiff.serviceSpecificationDiff.length > 0) {\r\n avaProjectDiff.serviceSpecificationDiff.forEach((operation) => {\r\n applyOperation(serviceSpecification, this.transformToJsonPatchOperation(operation));\r\n });\r\n }\r\n\r\n if (avaProjectDiff.moveOperations && avaProjectDiff.moveOperations.length > 0) {\r\n avaProjectDiff.moveOperations.forEach((moveOperation) => {\r\n const sourceContainer = containers.find((c) => c.id === moveOperation.sourceContainerId);\r\n if (sourceContainer && sourceContainer.elements) {\r\n const targetContainer = containers.find((c) => c.id === moveOperation.targetContainerId);\r\n const sourceIndex = sourceContainer.elements.findIndex((e) => e.id === moveOperation.elementId);\r\n const element = sourceContainer.elements[sourceIndex];\r\n sourceContainer.elements.splice(sourceIndex, 1);\r\n // Reordering happens in the next step, so we only need to move the element to the new container\r\n if (targetContainer && targetContainer.elements) {\r\n targetContainer.elements.push(element);\r\n }\r\n }\r\n });\r\n }\r\n\r\n if (avaProjectDiff.containerReorderOperations && avaProjectDiff.containerReorderOperations.length > 0) {\r\n avaProjectDiff.containerReorderOperations.forEach((reorderOperation) => {\r\n const localCachedContainer = containers.find((c) => c.id === reorderOperation.containerId);\r\n if (localCachedContainer && localCachedContainer.elements && reorderOperation.elementIds && reorderOperation.elementIds.length) {\r\n const newElements = reorderOperation.elementIds.map((elementId) => elementsById[elementId]);\r\n // To keep the reference for the array but just set the new values, we're directly using\r\n // Object.assign to set the values. We need to additionally also set the length property.\r\n // Taken from here: https://stackoverflow.com/a/44660117/4190785\r\n Object.assign(localCachedContainer.elements, newElements, {\r\n length: newElements.length\r\n });\r\n }\r\n });\r\n }\r\n\r\n return serviceSpecification;\r\n }\r\n\r\n private static transformToJsonPatchOperation(operation: Operation): JsonPatchOperation {\r\n return operation as JsonPatchOperation;\r\n }\r\n\r\n private static applySingleElementDiffOperation(originalElement: IElementDto, operation: Operation): void {\r\n applyOperation(originalElement, this.transformToJsonPatchOperation(operation));\r\n }\r\n}\r\n","/*\r\n * Public API Surface of ava-partial-updater\r\n */\r\n\r\nexport * from './lib/ava-partial-updater.service';\r\nexport { AvaProjectDiff } from './lib/interfaces/ava-project-diff.interface';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAEM,SAAU,eAAe,CAAC,SAA8C,EAAA;IAC5E,MAAM,YAAY,GAAkB,EAAE;AAEtC,IAAA,IAAI,SAAS,CAAC,QAAQ,EAAE;QACtB,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,KAAI;AAC/B,YAAA,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;AACpB,YAAA,IAAI,CAAC,CAAC,wBAAwB,KAAK,8BAA8B,EAAE;gBACjE,MAAM,KAAK,GAAG,CAAiC;gBAC/C,YAAY,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;;AAEhD,SAAC,CAAC;;AAGJ,IAAA,OAAO,YAAY;AACrB;;ACTA,MAAM,EAAE,cAAc,EAAE,GAAG,SAAS;MAEvB,wBAAwB,CAAA;AAC5B,IAAA,OAAO,iDAAiD,CAC7D,oBAA6C,EAC7C,cAA8B,EAAA;AAE9B,QAAA,MAAM,0BAA0B,GAAG,eAAe,CAAC,oBAAoB,CAAC;AAExE,QAAA,MAAM,YAAY,GAAG,eAAe,CAAC,0BAA0B,CAAC;QAChE,MAAM,YAAY,GAAkC,EAAE;QACtD,MAAM,UAAU,GAAgD,EAAE;AAClE,QAAA,YAAY,CAAC,OAAO,CAAC,CAAC,OAAO,KAAI;AAC/B,YAAA,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,OAAO;AAClC,YAAA,IAAI,OAAO,CAAC,WAAW,KAAK,8BAA8B,EAAE;AAC1D,gBAAA,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC;;AAE5B,SAAC,CAAC;AACF,QAAA,UAAU,CA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AE;YACrG,cAAc,CAAC,0BAA0B,CAAC,OAAO,CAAC,CAAC,gBAAgB,KAAI;AACrE,gBAAA,MAAM,oBAAoB,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,gBAAgB,CAAC,WAAW,CAAC;AAC1F,gBAAA,IAAI,oBAAoB,IAAI,oBAAoB,CAAC,QAAQ,IAAI,gBAAgB,CAAC,UAAU,IAAI,gBAAgB,CAAC,UAAU,CAAC,MAAM,EAAE;AAC9H,oBAAA,MAAM,WAAW,GAAG,gBAAgB,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,KAAK,YAAY,CAAC,SAAS,CAAC,CAAC;;;;oBAI3F,MAAM,CAAC,MAAM,CAAC,oBAAoB,CAAC,QAAQ,EAAE,WAAW,EAAE;wBACxD,MAAM,EAAE,WAAW,CAAC;AACrB,qBAAA,CAAC;;AAEN,aAAC,CAAC;;AAGJ,QAAA,OAAO,oBAAoB;;IAGrB,OAAO,6BAA6B,CAAC,SAAoB,EAAA;AAC/D,QAAA,OAAO,SAA+B;;AAGhC,IAAA,OAAO,+BAA+B,CAAC,eAA4B,EAAE,SAAoB,EAAA;QAC/F,cAAc,CAAC,eAAe,EAAE,IAAI,CAAC,6BAA6B,CAAC,SAAS,CAAC,CAAC;;AAEjF;;AC/ID;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"dangl-ava-partial-updater.mjs","sources":["../../../projects/ava-partial-updater/src/lib/utils/get-flat-list.ts","../../../projects/ava-partial-updater/src/lib/ava-partial-updater.service.ts","../../../projects/ava-partial-updater/src/public-api.ts","../../../projects/ava-partial-updater/src/dangl-ava-partial-updater.ts"],"sourcesContent":["import { IElementDto, ServiceSpecificationGroupDto } from '../interfaces/ava-models';\n\nexport function getFlatElements(container: { elements?: IElementDto[] | null }): IElementDto[] {\n const flatElements: IElementDto[] = [];\n\n if (container.elements) {\n container.elements.forEach((e) => {\n flatElements.push(e);\n if (e.elementTypeDiscriminator === 'ServiceSpecificationGroupDto') {\n const group = e as ServiceSpecificationGroupDto;\n flatElements.push(...getFlatElements(group));\n }\n });\n }\n\n return flatElements;\n}\n","import { IElementDto, ServiceSpecificationDto, ServiceSpecificationGroupDto } from './interfaces/ava-models';\nimport { AvaProjectDiff } from './interfaces/ava-project-diff.interface';\nimport { Operation } from './interfaces/operation.interface';\nimport { getFlatElements } from './utils/get-flat-list';\n\nimport jsonPatch, { Operation as JsonPatchOperation } from 'fast-json-patch';\n\nconst { applyOperation } = jsonPatch;\n\nexport class AvaPartialUpdaterService {\n public static applyAvaProjectDiffToSpecificServiceSpecification(\n serviceSpecification: ServiceSpecificationDto,\n avaProjectDiff: AvaProjectDiff\n ): ServiceSpecificationDto {\n const clonedServiceSpecification = structuredClone(serviceSpecification);\n\n const flatElements = getFlatElements(clonedServiceSpecification);\n const elementsById: { [id: string]: IElementDto } = {};\n const containers: { id?: string; elements?: IElementDto[] }[] = [];\n flatElements.forEach((element) => {\n elementsById[element.id] = element;\n if (element.elementType === 'ServiceSpecificationGroupDto') {\n containers.push(element);\n }\n });\n containers.push(clonedServiceSpecification);\n\n return this.internalServiceSpecificationDiffApply(clonedServiceSpecification, avaProjectDiff, elementsById, containers);\n }\n\n private static internalServiceSpecificationDiffApply(\n serviceSpecification: ServiceSpecificationDto,\n avaProjectDiff: AvaProjectDiff,\n elementsById: { [elementId: string]: IElementDto },\n containers: { id?: string; elements?: IElementDto[] }[]\n ): ServiceSpecificationDto {\n if (avaProjectDiff.elementDiffs != null) {\n for (const elementId in avaProjectDiff.elementDiffs) {\n const originalElement = elementsById[elementId];\n if (originalElement) {\n avaProjectDiff.elementDiffs[elementId].forEach((operation) => {\n this.applySingleElementDiffOperation(originalElement, operation);\n });\n }\n }\n }\n\n // Here, it's important that we first remove the elements that are to be deleted,\n // because a move between two containers is represented as a deletion and a move, so we\n // first delete the element and then add it again to the new container.\n if (avaProjectDiff.removedElementIds && avaProjectDiff.removedElementIds.length > 0) {\n avaProjectDiff.removedElementIds.forEach((removedElementId) => {\n if (elementsById[removedElementId]) {\n delete elementsById[removedElementId];\n }\n\n const parentContainer = containers.find((c) => c.elements?.some((e) => e.id === removedElementId));\n if (parentContainer && parentContainer.elements?.length) {\n const elementIndex = parentContainer.elements.findIndex((e) => e.id === removedElementId);\n if (elementIndex >= 0) {\n parentContainer.elements.splice(elementIndex, 1);\n }\n\n const cachedContainerIndex = containers.findIndex((c) => c.id === removedElementId);\n if (cachedContainerIndex >= 0) {\n containers.splice(cachedContainerIndex, 1);\n }\n }\n });\n }\n if (avaProjectDiff.newElements) {\n if (avaProjectDiff.newElements.length > 0) {\n avaProjectDiff.newElements.forEach((newElement) => {\n if (newElement.element) {\n elementsById[newElement.element.id] = newElement.element;\n\n const parentContainer = containers.find((c) => c.id === newElement.parentElementId);\n if (parentContainer) {\n if (parentContainer.elements && newElement.elementIndex) {\n parentContainer.elements.splice(newElement.elementIndex, 0, newElement.element);\n }\n\n if (newElement.element.elementType === 'ServiceSpecificationGroupDto') {\n const group = newElement.element as ServiceSpecificationGroupDto;\n if (group.elements == null) {\n group.elements = [];\n }\n\n containers.push(newElement.element);\n }\n }\n }\n });\n }\n }\n\n if (avaProjectDiff.serviceSpecificationDiff && avaProjectDiff.serviceSpecificationDiff.length > 0) {\n avaProjectDiff.serviceSpecificationDiff.forEach((operation) => {\n applyOperation(serviceSpecification, this.transformToJsonPatchOperation(operation));\n });\n }\n\n if (avaProjectDiff.moveOperations && avaProjectDiff.moveOperations.length > 0) {\n avaProjectDiff.moveOperations.forEach((moveOperation) => {\n const sourceContainer = containers.find((c) => c.id === moveOperation.sourceContainerId);\n if (sourceContainer && sourceContainer.elements) {\n const targetContainer = containers.find((c) => c.id === moveOperation.targetContainerId);\n const sourceIndex = sourceContainer.elements.findIndex((e) => e.id === moveOperation.elementId);\n const element = sourceContainer.elements[sourceIndex];\n sourceContainer.elements.splice(sourceIndex, 1);\n // Reordering happens in the next step, so we only need to move the element to the new container\n if (targetContainer && targetContainer.elements) {\n targetContainer.elements.push(element);\n }\n }\n });\n }\n\n if (avaProjectDiff.containerReorderOperations && avaProjectDiff.containerReorderOperations.length > 0) {\n avaProjectDiff.containerReorderOperations.forEach((reorderOperation) => {\n const localCachedContainer = containers.find((c) => c.id === reorderOperation.containerId);\n if (localCachedContainer && localCachedContainer.elements && reorderOperation.elementIds && reorderOperation.elementIds.length) {\n const newElements = reorderOperation.elementIds.map((elementId) => elementsById[elementId]);\n // To keep the reference for the array but just set the new values, we're directly using\n // Object.assign to set the values. We need to additionally also set the length property.\n // Taken from here: https://stackoverflow.com/a/44660117/4190785\n Object.assign(localCachedContainer.elements, newElements, {\n length: newElements.length\n });\n }\n });\n }\n\n return serviceSpecification;\n }\n\n private static transformToJsonPatchOperation(operation: Operation): JsonPatchOperation {\n return operation as JsonPatchOperation;\n }\n\n private static applySingleElementDiffOperation(originalElement: IElementDto, operation: Operation): void {\n applyOperation(originalElement, this.transformToJsonPatchOperation(operation));\n }\n}\n","/*\n * Public API Surface of ava-partial-updater\n */\n\nexport * from './lib/ava-partial-updater.service';\nexport { AvaProjectDiff } from './lib/interfaces/ava-project-diff.interface';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAEM,SAAU,eAAe,CAAC,SAA8C,EAAA;IAC5E,MAAM,YAAY,GAAkB,EAAE;AAEtC,IAAA,IAAI,SAAS,CAAC,QAAQ,EAAE;QACtB,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,KAAI;AAC/B,YAAA,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;AACpB,YAAA,IAAI,CAAC,CAAC,wBAAwB,KAAK,8BAA8B,EAAE;gBACjE,MAAM,KAAK,GAAG,CAAiC;gBAC/C,YAAY,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;;AAEhD,SAAC,CAAC;;AAGJ,IAAA,OAAO,YAAY;AACrB;;ACTA,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A,OAAO,SAA+B;;AAGhC,IAAA,OAAO,+BAA+B,CAAC,eAA4B,EAAE,SAAoB,EAAA;QAC/F,cAAc,CAAC,eAAe,EAAE,IAAI,CAAC,6BAA6B,CAAC,SAAS,CAAC,CAAC;;AAEjF;;AC/ID;;AAEG;;ACFH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dangl/ava-partial-updater",
3
- "version": "1.4.5-beta0053",
3
+ "version": "1.4.5-beta0057",
4
4
  "description": "A package to apply partial updates to Ava Projects",
5
5
  "dependencies": {
6
6
  "fast-json-patch": "^3.1.1",