@dangl/angular-ava 0.1.1-beta0093

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +1 -0
  2. package/esm2022/dangl-angular-ava.mjs +5 -0
  3. package/esm2022/lib/angular-ava.module.mjs +91 -0
  4. package/esm2022/lib/ava-tree/tree/components/ava-tree/ava-tree.component.mjs +412 -0
  5. package/esm2022/lib/ava-tree/tree/components/list-structure/list-structure.component.mjs +41 -0
  6. package/esm2022/lib/ava-tree/tree/components/table-structure/table-structure.component.mjs +110 -0
  7. package/esm2022/lib/ava-tree/tree/components/tree-item/tree-item.component.mjs +102 -0
  8. package/esm2022/lib/ava-tree/tree/components/tree-node/tree-node.component.mjs +53 -0
  9. package/esm2022/lib/ava-tree/tree/components/tree-structure/tree-structure.component.mjs +33 -0
  10. package/esm2022/lib/ava-tree/tree/constants/defaultFilters.mjs +23 -0
  11. package/esm2022/lib/ava-tree/tree/constants/defaultTextWords.mjs +11 -0
  12. package/esm2022/lib/ava-tree/tree/constants/defaults.mjs +4 -0
  13. package/esm2022/lib/ava-tree/tree/constants/index.mjs +5 -0
  14. package/esm2022/lib/ava-tree/tree/directives/save-changing-view.directive.mjs +47 -0
  15. package/esm2022/lib/ava-tree/tree/model/ava-models.mjs +199 -0
  16. package/esm2022/lib/ava-tree/tree/model/context-menu-data.model.mjs +2 -0
  17. package/esm2022/lib/ava-tree/tree/model/function-view-line.model.mjs +2 -0
  18. package/esm2022/lib/ava-tree/tree/model/index.mjs +4 -0
  19. package/esm2022/lib/ava-tree/tree/model/selecting.model.mjs +2 -0
  20. package/esm2022/lib/ava-tree/tree/model/tableColumnType.mjs +2 -0
  21. package/esm2022/lib/ava-tree/tree/model/tree-mode.model.mjs +7 -0
  22. package/esm2022/lib/ava-tree/tree/pipes/element-icon-name.pipe.mjs +27 -0
  23. package/esm2022/lib/ava-tree/tree/pipes/element-item-number.pipe.mjs +23 -0
  24. package/esm2022/lib/ava-tree/tree/pipes/element-text.pipe.mjs +27 -0
  25. package/esm2022/lib/ava-tree/tree/pipes/group-child-elements.pipe.mjs +20 -0
  26. package/esm2022/lib/ava-tree/tree/services/expand-parent-group.service.mjs +32 -0
  27. package/esm2022/lib/ava-tree/tree/services/flat-elements.service.mjs +96 -0
  28. package/esm2022/lib/ava-tree/tree/services/keyboard-operation.service.mjs +116 -0
  29. package/esm2022/lib/ava-tree/tree/services/select-element.service.mjs +41 -0
  30. package/esm2022/lib/ava-tree/tree/services/tree-node-selection.service.mjs +133 -0
  31. package/esm2022/lib/version.mjs +10 -0
  32. package/esm2022/public-api.mjs +8 -0
  33. package/fesm2022/dangl-angular-ava.mjs +1574 -0
  34. package/fesm2022/dangl-angular-ava.mjs.map +1 -0
  35. package/index.d.ts +5 -0
  36. package/lib/angular-ava.module.d.ts +27 -0
  37. package/lib/ava-tree/tree/components/ava-tree/ava-tree.component.d.ts +165 -0
  38. package/lib/ava-tree/tree/components/list-structure/list-structure.component.d.ts +18 -0
  39. package/lib/ava-tree/tree/components/table-structure/table-structure.component.d.ts +34 -0
  40. package/lib/ava-tree/tree/components/tree-item/tree-item.component.d.ts +35 -0
  41. package/lib/ava-tree/tree/components/tree-node/tree-node.component.d.ts +23 -0
  42. package/lib/ava-tree/tree/components/tree-structure/tree-structure.component.d.ts +14 -0
  43. package/lib/ava-tree/tree/constants/defaultFilters.d.ts +2 -0
  44. package/lib/ava-tree/tree/constants/defaultTextWords.d.ts +11 -0
  45. package/lib/ava-tree/tree/constants/defaults.d.ts +3 -0
  46. package/lib/ava-tree/tree/constants/index.d.ts +4 -0
  47. package/lib/ava-tree/tree/directives/save-changing-view.directive.d.ts +13 -0
  48. package/lib/ava-tree/tree/model/ava-models.d.ts +1041 -0
  49. package/lib/ava-tree/tree/model/context-menu-data.model.d.ts +8 -0
  50. package/lib/ava-tree/tree/model/function-view-line.model.d.ts +12 -0
  51. package/lib/ava-tree/tree/model/index.d.ts +7 -0
  52. package/lib/ava-tree/tree/model/selecting.model.d.ts +14 -0
  53. package/lib/ava-tree/tree/model/tableColumnType.d.ts +6 -0
  54. package/lib/ava-tree/tree/model/tree-mode.model.d.ts +5 -0
  55. package/lib/ava-tree/tree/pipes/element-icon-name.pipe.d.ts +8 -0
  56. package/lib/ava-tree/tree/pipes/element-item-number.pipe.d.ts +8 -0
  57. package/lib/ava-tree/tree/pipes/element-text.pipe.d.ts +8 -0
  58. package/lib/ava-tree/tree/pipes/group-child-elements.pipe.d.ts +8 -0
  59. package/lib/ava-tree/tree/services/expand-parent-group.service.d.ts +7 -0
  60. package/lib/ava-tree/tree/services/flat-elements.service.d.ts +28 -0
  61. package/lib/ava-tree/tree/services/keyboard-operation.service.d.ts +35 -0
  62. package/lib/ava-tree/tree/services/select-element.service.d.ts +31 -0
  63. package/lib/ava-tree/tree/services/tree-node-selection.service.d.ts +23 -0
  64. package/lib/version.d.ts +8 -0
  65. package/package.json +31 -0
  66. package/public-api.d.ts +4 -0
@@ -0,0 +1,1574 @@
1
+ import * as i3 from '@angular/common';
2
+ import { CommonModule } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { Injectable, inject, Directive, Input, Pipe, Component, EventEmitter, Self, Output, ViewChild, NgModule } from '@angular/core';
5
+ import * as i5 from '@angular/forms';
6
+ import { ReactiveFormsModule, FormsModule } from '@angular/forms';
7
+ import * as i11 from '@angular/material/button';
8
+ import { MatButtonModule } from '@angular/material/button';
9
+ import * as i6 from '@angular/material/checkbox';
10
+ import { MatCheckboxModule } from '@angular/material/checkbox';
11
+ import * as i4$1 from '@angular/material/core';
12
+ import { MatRippleModule } from '@angular/material/core';
13
+ import * as i9 from '@angular/material/form-field';
14
+ import { MatFormFieldModule } from '@angular/material/form-field';
15
+ import * as i4 from '@angular/material/icon';
16
+ import { MatIconModule } from '@angular/material/icon';
17
+ import * as i8 from '@angular/material/input';
18
+ import { MatInputModule } from '@angular/material/input';
19
+ import * as i7 from '@angular/material/table';
20
+ import { MatTableModule } from '@angular/material/table';
21
+ import * as i12 from '@angular/material/tooltip';
22
+ import { MatTooltipModule } from '@angular/material/tooltip';
23
+ import { ReplaySubject, of, BehaviorSubject, Subject, takeUntil, debounceTime, fromEvent, filter } from 'rxjs';
24
+
25
+ //----------------------
26
+ // <auto-generated>
27
+ // Generated using the NSwag toolchain v14.0.0.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
28
+ // </auto-generated>
29
+ //----------------------
30
+ /* tslint:disable */
31
+ /* eslint-disable */
32
+ // ReSharper disable InconsistentNaming
33
+ /** This enum configures rounding modes for price calculations in projects */
34
+ var PriceRoundingModeDto;
35
+ (function (PriceRoundingModeDto) {
36
+ PriceRoundingModeDto["Normal"] = "Normal";
37
+ PriceRoundingModeDto["Floor"] = "Floor";
38
+ PriceRoundingModeDto["Ceiling"] = "Ceiling";
39
+ })(PriceRoundingModeDto || (PriceRoundingModeDto = {}));
40
+ /** Determines the type of an ItemNumberSchema */
41
+ var ItemNumberTypeDto;
42
+ (function (ItemNumberTypeDto) {
43
+ ItemNumberTypeDto["Numeric"] = "Numeric";
44
+ ItemNumberTypeDto["Alphanumeric"] = "Alphanumeric";
45
+ })(ItemNumberTypeDto || (ItemNumberTypeDto = {}));
46
+ /** Specifies the type an ItemNumberSchemaTier represents. For example, a tier may indicate to be used for positions or for groups. */
47
+ var ItemNumberSchemaTierTypeDto;
48
+ (function (ItemNumberSchemaTierTypeDto) {
49
+ ItemNumberSchemaTierTypeDto["Undefined"] = "Undefined";
50
+ ItemNumberSchemaTierTypeDto["Index"] = "Index";
51
+ ItemNumberSchemaTierTypeDto["Position"] = "Position";
52
+ ItemNumberSchemaTierTypeDto["Group"] = "Group";
53
+ ItemNumberSchemaTierTypeDto["Lot"] = "Lot";
54
+ })(ItemNumberSchemaTierTypeDto || (ItemNumberSchemaTierTypeDto = {}));
55
+ /** This enumeration models types of price components for better classification. */
56
+ var PriceComponentTypeDto;
57
+ (function (PriceComponentTypeDto) {
58
+ PriceComponentTypeDto["Unknown"] = "Unknown";
59
+ PriceComponentTypeDto["Wages"] = "Wages";
60
+ PriceComponentTypeDto["Materials"] = "Materials";
61
+ PriceComponentTypeDto["Plant"] = "Plant";
62
+ PriceComponentTypeDto["Miscellaneous"] = "Miscellaneous";
63
+ })(PriceComponentTypeDto || (PriceComponentTypeDto = {}));
64
+ /** This enumeration describes the type of the award / procurement process. If this is used in a GAEB context, more information about award types can be found in the German VOB/A rules and the GAEB standard */
65
+ var AwardTypeDto;
66
+ (function (AwardTypeDto) {
67
+ AwardTypeDto["Unspecified"] = "Unspecified";
68
+ AwardTypeDto["OpenProcurement"] = "OpenProcurement";
69
+ AwardTypeDto["ClosedProducrement"] = "ClosedProducrement";
70
+ AwardTypeDto["NegotiationProcurementWithoutPublicAnnouncement"] = "NegotiationProcurementWithoutPublicAnnouncement";
71
+ AwardTypeDto["NegotiationProcurement"] = "NegotiationProcurement";
72
+ AwardTypeDto["OpenCall"] = "OpenCall";
73
+ AwardTypeDto["SelectedCallWithoutPublicCompetition"] = "SelectedCallWithoutPublicCompetition";
74
+ AwardTypeDto["SelectedCall"] = "SelectedCall";
75
+ AwardTypeDto["DirectAward"] = "DirectAward";
76
+ AwardTypeDto["InternationalNATOProcurement"] = "InternationalNATOProcurement";
77
+ AwardTypeDto["CompetitiveDialog"] = "CompetitiveDialog";
78
+ })(AwardTypeDto || (AwardTypeDto = {}));
79
+ /** This enumeration describes awards for project that are not just a regular procurement. For example, it can be used to describe recurring maintenance or an outline contract (German: Rahmenvertrag) which just specifies services and prices but may be requested on demand when necessary */
80
+ var SpecialAwardKindDto;
81
+ (function (SpecialAwardKindDto) {
82
+ SpecialAwardKindDto["Unspecified"] = "Unspecified";
83
+ SpecialAwardKindDto["MaintenanceContract"] = "MaintenanceContract";
84
+ SpecialAwardKindDto["OutlineContract"] = "OutlineContract";
85
+ SpecialAwardKindDto["OutlineForMaintenanceContract"] = "OutlineForMaintenanceContract";
86
+ })(SpecialAwardKindDto || (SpecialAwardKindDto = {}));
87
+ /** This enumeration describes the type of a catalogue. Catalogues, or collections, hold information to categorize and describe items. For example, the German DIN 276 cost group standards describe different types of costs for building projects. When referencing the DIN 276 catalogue and providing an item key or identifier, it is possible to reference data in this catalogue. */
88
+ var CatalogueTypeDto;
89
+ (function (CatalogueTypeDto) {
90
+ CatalogueTypeDto["Unknown"] = "Unknown";
91
+ CatalogueTypeDto["Location"] = "Location";
92
+ CatalogueTypeDto["DIN276"] = "DIN276";
93
+ CatalogueTypeDto["CostUnit"] = "CostUnit";
94
+ CatalogueTypeDto["WorkCategory"] = "WorkCategory";
95
+ CatalogueTypeDto["OenormB1801CostGroup"] = "OenormB1801CostGroup";
96
+ CatalogueTypeDto["BIM"] = "BIM";
97
+ CatalogueTypeDto["Attachment"] = "Attachment";
98
+ })(CatalogueTypeDto || (CatalogueTypeDto = {}));
99
+ /** Indicates the origin of an element. */
100
+ var AdditionTypeDto;
101
+ (function (AdditionTypeDto) {
102
+ AdditionTypeDto["None"] = "None";
103
+ AdditionTypeDto["ByBuyer"] = "ByBuyer";
104
+ AdditionTypeDto["ByBidder"] = "ByBidder";
105
+ })(AdditionTypeDto || (AdditionTypeDto = {}));
106
+ /** This enumeration identifies a pre-known standard used for referencing standardized descriptions. */
107
+ var StandardReferenceTypeDto;
108
+ (function (StandardReferenceTypeDto) {
109
+ StandardReferenceTypeDto["Unknown"] = "Unknown";
110
+ StandardReferenceTypeDto["StLB"] = "StLB";
111
+ StandardReferenceTypeDto["StLK"] = "StLK";
112
+ StandardReferenceTypeDto["STLBBauZ"] = "STLBBauZ";
113
+ })(StandardReferenceTypeDto || (StandardReferenceTypeDto = {}));
114
+ /** Indicates if this service specification item is commissioned (and therefore should be executed), postponed for later or undefined. */
115
+ var ComissionStatusDto;
116
+ (function (ComissionStatusDto) {
117
+ ComissionStatusDto["Undefined"] = "Undefined";
118
+ ComissionStatusDto["Commissioned"] = "Commissioned";
119
+ ComissionStatusDto["Postponed"] = "Postponed";
120
+ ComissionStatusDto["Removed"] = "Removed";
121
+ })(ComissionStatusDto || (ComissionStatusDto = {}));
122
+ /** This is a classification for Position elements. */
123
+ var PositionTypeDto;
124
+ (function (PositionTypeDto) {
125
+ PositionTypeDto["Regular"] = "Regular";
126
+ PositionTypeDto["Optional"] = "Optional";
127
+ PositionTypeDto["Alternative"] = "Alternative";
128
+ })(PositionTypeDto || (PositionTypeDto = {}));
129
+ /** This indicates the price type of a IPricedElement. */
130
+ var PriceTypeDto;
131
+ (function (PriceTypeDto) {
132
+ PriceTypeDto["WithTotal"] = "WithTotal";
133
+ PriceTypeDto["WithoutTotal"] = "WithoutTotal";
134
+ })(PriceTypeDto || (PriceTypeDto = {}));
135
+ /** The service type describes the type of service a Position represents. */
136
+ var ServiceTypeDto;
137
+ (function (ServiceTypeDto) {
138
+ ServiceTypeDto["Regular"] = "Regular";
139
+ ServiceTypeDto["HourlyPaidWork"] = "HourlyPaidWork";
140
+ })(ServiceTypeDto || (ServiceTypeDto = {}));
141
+ /** This indicates where the content of this element originates, if set. It corresponds to 'herkunftskennzeichen' in ÖNorm */
142
+ var OenormOriginCodeDto;
143
+ (function (OenormOriginCodeDto) {
144
+ OenormOriginCodeDto["Unknown"] = "Unknown";
145
+ OenormOriginCodeDto["FreeText"] = "FreeText";
146
+ OenormOriginCodeDto["AdditionDescription"] = "AdditionDescription";
147
+ })(OenormOriginCodeDto || (OenormOriginCodeDto = {}));
148
+ /** This enumeration represents the status of an addendum, 'Nachtrag' in German */
149
+ var AddendumStatusDto;
150
+ (function (AddendumStatusDto) {
151
+ AddendumStatusDto["Unknown"] = "Unknown";
152
+ AddendumStatusDto["Recognized"] = "Recognized";
153
+ AddendumStatusDto["Filed"] = "Filed";
154
+ AddendumStatusDto["Offered"] = "Offered";
155
+ AddendumStatusDto["Withdrawn"] = "Withdrawn";
156
+ AddendumStatusDto["Rejected"] = "Rejected";
157
+ AddendumStatusDto["RejectionObjected"] = "RejectionObjected";
158
+ AddendumStatusDto["FormallyAcknowledged"] = "FormallyAcknowledged";
159
+ AddendumStatusDto["Approved"] = "Approved";
160
+ })(AddendumStatusDto || (AddendumStatusDto = {}));
161
+ /** This enum represents the different ways in which a complementing position type can be specified. It is typically only used in GAEB exports, since in Dangl.AVA, complementing positions are always explicitly referenced. */
162
+ var PositionComplementingTypeDto;
163
+ (function (PositionComplementingTypeDto) {
164
+ PositionComplementingTypeDto["Undefined"] = "Undefined";
165
+ PositionComplementingTypeDto["AllPreviousMarkedPositions"] = "AllPreviousMarkedPositions";
166
+ PositionComplementingTypeDto["AllPreviousPositions"] = "AllPreviousPositions";
167
+ PositionComplementingTypeDto["ReferencedPositions"] = "ReferencedPositions";
168
+ })(PositionComplementingTypeDto || (PositionComplementingTypeDto = {}));
169
+ /** Types of retentions to be used in positions */
170
+ var HoldOutTypeDto;
171
+ (function (HoldOutTypeDto) {
172
+ HoldOutTypeDto["Unknown"] = "Unknown";
173
+ HoldOutTypeDto["Base"] = "Base";
174
+ HoldOutTypeDto["Extension"] = "Extension";
175
+ HoldOutTypeDto["Rent"] = "Rent";
176
+ })(HoldOutTypeDto || (HoldOutTypeDto = {}));
177
+ /** Duration used in retention positions */
178
+ var HoldOutDurationUnitDto;
179
+ (function (HoldOutDurationUnitDto) {
180
+ HoldOutDurationUnitDto["Unknown"] = "Unknown";
181
+ HoldOutDurationUnitDto["Minutes"] = "Minutes";
182
+ HoldOutDurationUnitDto["Hours"] = "Hours";
183
+ HoldOutDurationUnitDto["Days"] = "Days";
184
+ HoldOutDurationUnitDto["Weeks"] = "Weeks";
185
+ HoldOutDurationUnitDto["Months"] = "Months";
186
+ })(HoldOutDurationUnitDto || (HoldOutDurationUnitDto = {}));
187
+ /** Indicates a ServiceSpecification's exchange phase, based on the GAEB exchange phases. */
188
+ var ExchangePhaseDto;
189
+ (function (ExchangePhaseDto) {
190
+ ExchangePhaseDto["Undefined"] = "Undefined";
191
+ ExchangePhaseDto["Base"] = "Base";
192
+ ExchangePhaseDto["CostEstimate"] = "CostEstimate";
193
+ ExchangePhaseDto["OfferRequest"] = "OfferRequest";
194
+ ExchangePhaseDto["Offer"] = "Offer";
195
+ ExchangePhaseDto["SideOffer"] = "SideOffer";
196
+ ExchangePhaseDto["Grant"] = "Grant";
197
+ })(ExchangePhaseDto || (ExchangePhaseDto = {}));
198
+ /** Indicates where a service specification was originally created. */
199
+ var OriginDto;
200
+ (function (OriginDto) {
201
+ OriginDto["Self"] = "Self";
202
+ OriginDto["Gaeb90"] = "Gaeb90";
203
+ OriginDto["Gaeb2000"] = "Gaeb2000";
204
+ OriginDto["GaebXml"] = "GaebXml";
205
+ OriginDto["Oenorm"] = "Oenorm";
206
+ OriginDto["Reb"] = "Reb";
207
+ OriginDto["Sia"] = "Sia";
208
+ })(OriginDto || (OriginDto = {}));
209
+ /** This enumeration represents the unit of a duration */
210
+ var DurationUnitDto;
211
+ (function (DurationUnitDto) {
212
+ DurationUnitDto["Months"] = "Months";
213
+ DurationUnitDto["Years"] = "Years";
214
+ })(DurationUnitDto || (DurationUnitDto = {}));
215
+ /** This enum represents types of price inquiries */
216
+ var CommerceInquiryTypeDto;
217
+ (function (CommerceInquiryTypeDto) {
218
+ CommerceInquiryTypeDto["Unknown"] = "Unknown";
219
+ CommerceInquiryTypeDto["Project"] = "Project";
220
+ CommerceInquiryTypeDto["Immediate"] = "Immediate";
221
+ CommerceInquiryTypeDto["Exhibition"] = "Exhibition";
222
+ })(CommerceInquiryTypeDto || (CommerceInquiryTypeDto = {}));
223
+
224
+ var ModeViewType;
225
+ (function (ModeViewType) {
226
+ ModeViewType["Tree"] = "Tree";
227
+ ModeViewType["List"] = "List";
228
+ ModeViewType["Table"] = "Table";
229
+ })(ModeViewType || (ModeViewType = {}));
230
+
231
+ const DEFAULT_FILTERS = [
232
+ (element, filter) => {
233
+ if (element.elementType === 'PositionDto' ||
234
+ element.elementType === 'ServiceSpecificationGroupDto' ||
235
+ element.elementType === 'NoteTextDto') {
236
+ return element.shortText?.trim().toLocaleLowerCase().includes(filter);
237
+ }
238
+ return false;
239
+ },
240
+ (element, filter) => {
241
+ if (element.elementType === 'ExecutionDescriptionDto') {
242
+ return element.label?.trim().toLocaleLowerCase().includes(filter);
243
+ }
244
+ return false;
245
+ },
246
+ (element, filter) => {
247
+ if (element.elementType === 'PositionDto' || element.elementType === 'ServiceSpecificationGroupDto') {
248
+ return element.itemNumber?.stringRepresentation?.includes(filter);
249
+ }
250
+ return false;
251
+ }
252
+ ];
253
+
254
+ const DEFAULT_TEXT_WORDS = {
255
+ textSearch: 'Suche',
256
+ textNothing: 'Nichts',
257
+ textNothingFiltered: 'Kein Filter',
258
+ textAll: 'Alle',
259
+ tooltipAllOpen: 'Alle aufklappen',
260
+ tooltipAllClose: 'Alle zuklappen',
261
+ tooltipAllAdd: 'Alle hinzufügen',
262
+ tooltipAllRemove: 'Alle entfernen'
263
+ };
264
+
265
+ const defaults = {
266
+ doubleClickTimeoutInMilliseconds: 300
267
+ };
268
+
269
+ class ExpandParentGroupService {
270
+ constructor() { }
271
+ expandParentGroups(element, flatElements, expansionState) {
272
+ if (!flatElements?.length) {
273
+ return;
274
+ }
275
+ const listGroup = flatElements.filter((item) => item.elements?.length);
276
+ if (!listGroup.length) {
277
+ return;
278
+ }
279
+ const findAndExpandParent = (currentElement) => {
280
+ for (const itemGroup of listGroup) {
281
+ if (expansionState[itemGroup.id]) {
282
+ continue;
283
+ }
284
+ if (itemGroup.elements?.find((item) => currentElement.id === item.id)) {
285
+ expansionState[itemGroup.id] = true;
286
+ return itemGroup;
287
+ }
288
+ }
289
+ return null;
290
+ };
291
+ const expandRecursive = (innerElement) => {
292
+ const parentGroup = findAndExpandParent(innerElement);
293
+ if (parentGroup) {
294
+ expandRecursive(parentGroup);
295
+ }
296
+ };
297
+ expandRecursive(element);
298
+ }
299
+ }
300
+
301
+ class FlatElementsService {
302
+ constructor() {
303
+ this._flatElementsDto = [];
304
+ this.flatElementsDtoSource = new ReplaySubject(1);
305
+ this.flatElementsDto = this.flatElementsDtoSource.asObservable();
306
+ this.functionView = null;
307
+ this.listFilterFunc = DEFAULT_FILTERS;
308
+ }
309
+ setElementsDto(elementsDto) {
310
+ this._flatElementsDto = FlatElementsService.getFlatElements(elementsDto);
311
+ this.objectElementsDto = FlatElementsService.getObjectElements(this._flatElementsDto);
312
+ this.flatElementsDtoSource.next(this._flatElementsDto);
313
+ }
314
+ static getFlatElements(container) {
315
+ const flatElements = [];
316
+ if (container.elements) {
317
+ container.elements.forEach((e) => {
318
+ flatElements.push(e);
319
+ if (e.elementTypeDiscriminator === 'ServiceSpecificationGroupDto') {
320
+ const group = e;
321
+ flatElements.push(...this.getFlatElements(group));
322
+ }
323
+ });
324
+ }
325
+ return flatElements;
326
+ }
327
+ static getObjectElements(elements) {
328
+ const objectElements = {};
329
+ if (elements?.length) {
330
+ elements.forEach((e) => {
331
+ if (e?.id) {
332
+ objectElements[e.id] = e;
333
+ }
334
+ });
335
+ }
336
+ return objectElements;
337
+ }
338
+ getOneElementById(id) {
339
+ return of(id ? this.objectElementsDto?.[id] || null : null);
340
+ }
341
+ checkFilterValue(element, filterValue) {
342
+ const cleanFilter = filterValue.trim().toLocaleLowerCase();
343
+ for (const func of this.listFilterFunc) {
344
+ if (func(element, cleanFilter)) {
345
+ return true;
346
+ }
347
+ }
348
+ return false;
349
+ }
350
+ jumpNextNode(delta, currentElement, conditionFunc) {
351
+ if (!this._flatElementsDto.length || (conditionFunc && !this._flatElementsDto.find((item) => conditionFunc(item)))) {
352
+ return null;
353
+ }
354
+ const startElement = currentElement || this._flatElementsDto[0];
355
+ let nextIndex = this._flatElementsDto.findIndex((item) => startElement.id === item.id);
356
+ if (currentElement) {
357
+ nextIndex = this.getNextIndex(this._flatElementsDto.length, nextIndex, delta);
358
+ }
359
+ while (conditionFunc && !conditionFunc(this._flatElementsDto[nextIndex])) {
360
+ nextIndex = this.getNextIndex(this._flatElementsDto.length, nextIndex, delta);
361
+ }
362
+ return this._flatElementsDto[nextIndex];
363
+ }
364
+ getNextIndex(length, index, delta) {
365
+ let nextIndex = index + delta;
366
+ nextIndex = nextIndex < 0 ? length - 1 : nextIndex;
367
+ nextIndex = nextIndex > length - 1 ? 0 : nextIndex;
368
+ return nextIndex;
369
+ }
370
+ getChangedView(id) {
371
+ if (this.objectElementsDto) {
372
+ const element = this.objectElementsDto[id];
373
+ if (element && this.functionView?.length) {
374
+ for (const objectView of this.functionView) {
375
+ if (objectView.func(element)) {
376
+ return objectView.view;
377
+ }
378
+ }
379
+ }
380
+ }
381
+ return null;
382
+ }
383
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FlatElementsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
384
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FlatElementsService, providedIn: 'root' }); }
385
+ }
386
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: FlatElementsService, decorators: [{
387
+ type: Injectable,
388
+ args: [{
389
+ providedIn: 'root'
390
+ }]
391
+ }], ctorParameters: () => [] });
392
+
393
+ class SelectElementService {
394
+ constructor() {
395
+ this.preselectedElementSource = new ReplaySubject(1);
396
+ this.preselectedElementWasNull = false;
397
+ this.preselectedElement = this.preselectedElementSource.asObservable();
398
+ this.selectClickElementSource = new ReplaySubject(1);
399
+ this.selectClickElement = this.selectClickElementSource.asObservable();
400
+ this.selectDblClickElementSource = new ReplaySubject(1);
401
+ this.selectDblClickElement = this.selectDblClickElementSource.asObservable();
402
+ this.selectContextMenuElementSource = new ReplaySubject(1);
403
+ this.selectContextMenuElement = this.selectContextMenuElementSource.asObservable();
404
+ }
405
+ setPreselectedElement(element) {
406
+ this.preselectedElementSource.next(element);
407
+ this.preselectedElementWasNull = element == null;
408
+ }
409
+ setClickElement(element) {
410
+ this.selectClickElementSource.next(element);
411
+ if (!this.preselectedElementWasNull) {
412
+ this.preselectedElementSource.next(null);
413
+ }
414
+ }
415
+ setDblClickElement(element) {
416
+ this.selectDblClickElementSource.next(element);
417
+ }
418
+ setContextMenuElement(data) {
419
+ this.selectContextMenuElementSource.next(data);
420
+ }
421
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: SelectElementService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
422
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: SelectElementService, providedIn: 'root' }); }
423
+ }
424
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: SelectElementService, decorators: [{
425
+ type: Injectable,
426
+ args: [{
427
+ providedIn: 'root'
428
+ }]
429
+ }] });
430
+
431
+ var KeyboardOperationType;
432
+ (function (KeyboardOperationType) {
433
+ KeyboardOperationType["MoveSelectedPositionUp"] = "moveSelectedPositionUp";
434
+ KeyboardOperationType["MoveSelectedPositionDown"] = "moveSelectedPositionDown";
435
+ KeyboardOperationType["MoveChosenPositionDown"] = "moveChosenPositionDown";
436
+ KeyboardOperationType["MoveChosenPositionUp"] = "moveChosenPositionUp";
437
+ KeyboardOperationType["ClearChosenPosition"] = "clearChosenPosition";
438
+ KeyboardOperationType["SelectChosenPosition"] = "selectChosenPosition";
439
+ })(KeyboardOperationType || (KeyboardOperationType = {}));
440
+ class KeyboardOperationService {
441
+ constructor() {
442
+ this.defaultKeyboardOperationConfig = {
443
+ operations: {
444
+ moveSelectedPositionUp: { disabled: false, keyEvent: 'F11' },
445
+ moveSelectedPositionDown: { disabled: false, keyEvent: 'F12' },
446
+ moveChosenPositionDown: { disabled: false, keyEvent: 'ArrowDown' },
447
+ moveChosenPositionUp: { disabled: false, keyEvent: 'ArrowUp' },
448
+ clearChosenPosition: { disabled: false, keyEvent: 'Escape' },
449
+ selectChosenPosition: { disabled: false, keyEvent: 'Enter' }
450
+ }
451
+ };
452
+ this.flatElementsService = inject(FlatElementsService);
453
+ this.selectElementService = inject(SelectElementService);
454
+ this.currentConfig = { ...this.defaultKeyboardOperationConfig };
455
+ }
456
+ getConfig() {
457
+ return this.currentConfig;
458
+ }
459
+ mergeConfigOperation(config) {
460
+ this.currentConfig = this.deepMerge(this.currentConfig, config);
461
+ }
462
+ deepMerge(obj1, obj2) {
463
+ const mergedConfig = { ...obj1 };
464
+ for (const key in obj2) {
465
+ if (Object.prototype.hasOwnProperty.call(obj2, key)) {
466
+ if (Object.prototype.hasOwnProperty.call(mergedConfig, key) &&
467
+ typeof mergedConfig[key] === 'object' &&
468
+ mergedConfig[key] !== null &&
469
+ typeof obj2[key] === 'object' &&
470
+ obj2[key] !== null) {
471
+ mergedConfig[key] = this.deepMerge(mergedConfig[key], obj2[key]);
472
+ }
473
+ else {
474
+ mergedConfig[key] = obj2[key];
475
+ }
476
+ }
477
+ }
478
+ return mergedConfig;
479
+ }
480
+ handleKeyboardEvent(keyEvent, element) {
481
+ let nextElement;
482
+ if (this.currentConfig.operations.moveSelectedPositionUp?.keyEvent === keyEvent.key &&
483
+ !this.currentConfig.operations.moveSelectedPositionUp?.disabled) {
484
+ keyEvent.preventDefault();
485
+ nextElement = this.flatElementsService.jumpNextNode(-1, element);
486
+ this.selectElementService.setClickElement(nextElement);
487
+ return {
488
+ operation: KeyboardOperationType.MoveSelectedPositionUp,
489
+ nextElement: nextElement
490
+ };
491
+ }
492
+ if (this.currentConfig.operations.moveSelectedPositionDown?.keyEvent === keyEvent.key &&
493
+ !this.currentConfig.operations.moveSelectedPositionDown?.disabled) {
494
+ keyEvent.preventDefault();
495
+ nextElement = this.flatElementsService.jumpNextNode(1, element);
496
+ this.selectElementService.setClickElement(nextElement);
497
+ return {
498
+ operation: KeyboardOperationType.MoveSelectedPositionDown,
499
+ nextElement: nextElement
500
+ };
501
+ }
502
+ if (this.currentConfig.operations.moveChosenPositionDown?.keyEvent === keyEvent.key &&
503
+ !this.currentConfig.operations.moveChosenPositionDown?.disabled) {
504
+ keyEvent.preventDefault();
505
+ nextElement = this.flatElementsService.jumpNextNode(1, element);
506
+ this.selectElementService.setPreselectedElement(nextElement?.id === element?.id ? null : nextElement);
507
+ return {
508
+ operation: KeyboardOperationType.MoveChosenPositionDown,
509
+ nextElement: nextElement
510
+ };
511
+ }
512
+ if (this.currentConfig.operations.moveChosenPositionUp?.keyEvent === keyEvent.key &&
513
+ !this.currentConfig.operations.moveChosenPositionUp?.disabled) {
514
+ keyEvent.preventDefault();
515
+ nextElement = this.flatElementsService.jumpNextNode(-1, element);
516
+ this.selectElementService.setPreselectedElement(nextElement?.id === element?.id ? null : nextElement);
517
+ return {
518
+ operation: KeyboardOperationType.MoveChosenPositionUp,
519
+ nextElement: nextElement
520
+ };
521
+ }
522
+ if (this.currentConfig.operations.selectChosenPosition?.keyEvent === keyEvent.key &&
523
+ !this.currentConfig.operations.selectChosenPosition?.disabled) {
524
+ keyEvent.preventDefault();
525
+ this.selectElementService.setClickElement(element);
526
+ return {
527
+ operation: KeyboardOperationType.SelectChosenPosition,
528
+ nextElement: null
529
+ };
530
+ }
531
+ if (this.currentConfig.operations.clearChosenPosition?.keyEvent === keyEvent.key &&
532
+ !this.currentConfig.operations.clearChosenPosition?.disabled) {
533
+ keyEvent.preventDefault();
534
+ this.selectElementService.setPreselectedElement(null);
535
+ return {
536
+ operation: KeyboardOperationType.ClearChosenPosition,
537
+ nextElement: null
538
+ };
539
+ }
540
+ return null;
541
+ }
542
+ }
543
+
544
+ class TreeNodeSelectionService {
545
+ constructor() {
546
+ this.treeNodeSelectingSource = new BehaviorSubject({});
547
+ this.treeNodeSelecting = this.treeNodeSelectingSource.asObservable();
548
+ this._selectingElementsTreeData = null;
549
+ this.selectingChangedSource = new ReplaySubject(1);
550
+ this.selectingChanged = this.selectingChangedSource.asObservable();
551
+ this.flatSelectedListId = [];
552
+ }
553
+ setSelectingChanged(selectingChanged) {
554
+ this.selectingChangedSource.next(selectingChanged);
555
+ }
556
+ loadSelectingElements(elements, parent = null) {
557
+ const list = [];
558
+ if (elements && elements.length) {
559
+ elements.forEach((element) => {
560
+ const obj = {
561
+ parent,
562
+ elementId: element.id,
563
+ checked: false
564
+ };
565
+ if (element.elementType === 'ServiceSpecificationGroupDto') {
566
+ obj.indeterminate = false;
567
+ obj.children = this.loadSelectingElements(element.elements, obj);
568
+ }
569
+ list.push(obj);
570
+ this.treeNodeSelectingSource.value[element.id] = obj;
571
+ });
572
+ this._selectingElementsTreeData = list;
573
+ }
574
+ return list;
575
+ }
576
+ getTreeData() {
577
+ return this._selectingElementsTreeData;
578
+ }
579
+ changeAllChild(children, value) {
580
+ children.forEach((item) => {
581
+ item.checked = value;
582
+ if (item.children) {
583
+ item.indeterminate = false;
584
+ this.changeAllChild(item.children, value);
585
+ }
586
+ });
587
+ }
588
+ changeAllParent(parent, value) {
589
+ parent.checked = value;
590
+ if (parent.parent) {
591
+ this.changeAllParent(parent.parent, value);
592
+ }
593
+ }
594
+ changeSelecting(value, id, isUserChanged = true) {
595
+ const selectingNode = this.treeNodeSelectingSource.value[id];
596
+ if (!selectingNode) {
597
+ return;
598
+ }
599
+ selectingNode.checked = value;
600
+ if (selectingNode.children) {
601
+ selectingNode.indeterminate = false;
602
+ if (isUserChanged) {
603
+ this.changeAllChild(selectingNode.children, value);
604
+ }
605
+ }
606
+ if (selectingNode.parent) {
607
+ this.changeAllParent(selectingNode.parent, value);
608
+ }
609
+ this.getIndeterminate(selectingNode?.parent || null);
610
+ if (isUserChanged) {
611
+ this.treeNodeSelectingSource.next(this.treeNodeSelectingSource.value);
612
+ }
613
+ }
614
+ getIndeterminate(parentNode) {
615
+ if (!parentNode) {
616
+ return;
617
+ }
618
+ if (!parentNode.children || !parentNode.children.length) {
619
+ return;
620
+ }
621
+ let resultIndeterminateSome = false;
622
+ let resultIndeterminateAll = false;
623
+ parentNode.children.forEach((item) => {
624
+ if (item.checked || item.indeterminate) {
625
+ resultIndeterminateSome = true;
626
+ }
627
+ if (!item.checked) {
628
+ resultIndeterminateAll = true;
629
+ }
630
+ });
631
+ if (!resultIndeterminateSome) {
632
+ parentNode.indeterminate = false;
633
+ parentNode.checked = false;
634
+ }
635
+ else if (resultIndeterminateAll) {
636
+ parentNode.indeterminate = true;
637
+ parentNode.checked = false;
638
+ }
639
+ else {
640
+ parentNode.indeterminate = false;
641
+ parentNode.checked = true;
642
+ }
643
+ this.getIndeterminate(parentNode.parent);
644
+ }
645
+ changeAll(value) {
646
+ Object.values(this.treeNodeSelectingSource.value).forEach((e) => {
647
+ this.changeSelecting(value, e.elementId, false);
648
+ });
649
+ this.treeNodeSelectingSource.next(this.treeNodeSelectingSource.value);
650
+ }
651
+ getFlatSelectedListId(selectedElements) {
652
+ selectedElements.forEach((el) => {
653
+ if (el.children) {
654
+ this.getFlatSelectedListId(el.children);
655
+ }
656
+ else {
657
+ this.flatSelectedListId.push(el.elementId);
658
+ }
659
+ });
660
+ }
661
+ getTreeRoot(treeRoot) {
662
+ const list = [];
663
+ treeRoot.forEach((item) => {
664
+ if (item.checked || item.indeterminate) {
665
+ const obj = { elementId: item.elementId };
666
+ if (item.children) {
667
+ obj.children = this.getTreeRoot(item.children);
668
+ }
669
+ list.push(obj);
670
+ }
671
+ });
672
+ return list;
673
+ }
674
+ }
675
+
676
+ class SaveChangingViewDirective {
677
+ constructor(el, renderer, flatElementsService) {
678
+ this.el = el;
679
+ this.renderer = renderer;
680
+ this.flatElementsService = flatElementsService;
681
+ this.attributeValue = 'text';
682
+ }
683
+ ngAfterViewInit() {
684
+ const el = this.el?.nativeElement;
685
+ const id = el?.id;
686
+ if (id) {
687
+ const view = this.flatElementsService?.getChangedView(id);
688
+ switch (this.attributeValue) {
689
+ case 'icon':
690
+ if (view?.iconName) {
691
+ el.textContent = view.iconName;
692
+ }
693
+ if (view?.iconColor) {
694
+ this.renderer?.setStyle(el, 'color', view.iconColor);
695
+ }
696
+ break;
697
+ case 'text':
698
+ if (view?.textBold) {
699
+ this.renderer?.setStyle(el, 'font-weight', view.textBold);
700
+ }
701
+ if (view?.textColor) {
702
+ this.renderer?.setStyle(el, 'color', view.textColor);
703
+ }
704
+ break;
705
+ }
706
+ }
707
+ }
708
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: SaveChangingViewDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: FlatElementsService }], target: i0.ɵɵFactoryTarget.Directive }); }
709
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.1", type: SaveChangingViewDirective, selector: "[saveChangingView]", inputs: { attributeValue: "attributeValue" }, ngImport: i0 }); }
710
+ }
711
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: SaveChangingViewDirective, decorators: [{
712
+ type: Directive,
713
+ args: [{
714
+ selector: '[saveChangingView]'
715
+ }]
716
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: FlatElementsService }], propDecorators: { attributeValue: [{
717
+ type: Input
718
+ }] } });
719
+
720
+ class ElementIconNamePipe {
721
+ transform(element) {
722
+ switch (element.elementTypeDiscriminator) {
723
+ case 'NoteTextDto':
724
+ return 'subject';
725
+ case 'ExecutionDescriptionDto':
726
+ return 'event';
727
+ case 'ServiceSpecificationGroupDto':
728
+ return 'folder_open';
729
+ case 'PositionDto':
730
+ return 'add';
731
+ default:
732
+ return '';
733
+ }
734
+ }
735
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ElementIconNamePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
736
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.1", ngImport: i0, type: ElementIconNamePipe, name: "elementIconName" }); }
737
+ }
738
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ElementIconNamePipe, decorators: [{
739
+ type: Pipe,
740
+ args: [{
741
+ name: 'elementIconName'
742
+ }]
743
+ }] });
744
+
745
+ class ElementTextPipe {
746
+ transform(element) {
747
+ switch (element.elementTypeDiscriminator) {
748
+ case 'NoteTextDto':
749
+ return element.shortText || 'Hinweis';
750
+ case 'ExecutionDescriptionDto':
751
+ return `${element.identifier ? element.identifier + ' - ' : ''}${element.label || 'Description'}`;
752
+ case 'ServiceSpecificationGroupDto':
753
+ return element.shortText || 'Group';
754
+ case 'PositionDto':
755
+ return element.shortText || 'Position';
756
+ default:
757
+ return '';
758
+ }
759
+ }
760
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ElementTextPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
761
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.1", ngImport: i0, type: ElementTextPipe, name: "elementText" }); }
762
+ }
763
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ElementTextPipe, decorators: [{
764
+ type: Pipe,
765
+ args: [{
766
+ name: 'elementText'
767
+ }]
768
+ }] });
769
+
770
+ class ElementItemNumberPipe {
771
+ transform(element) {
772
+ switch (element.elementTypeDiscriminator) {
773
+ case 'ServiceSpecificationGroupDto':
774
+ return element.itemNumber?.stringRepresentation || '';
775
+ case 'PositionDto':
776
+ return element.itemNumber?.stringRepresentation || '';
777
+ default:
778
+ return '';
779
+ }
780
+ }
781
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ElementItemNumberPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
782
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.1", ngImport: i0, type: ElementItemNumberPipe, name: "elementItemNumber" }); }
783
+ }
784
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ElementItemNumberPipe, decorators: [{
785
+ type: Pipe,
786
+ args: [{
787
+ name: 'elementItemNumber'
788
+ }]
789
+ }] });
790
+
791
+ class TreeItemComponent {
792
+ constructor(selectElementService, treeNodeSelectionService, cdr) {
793
+ this.selectElementService = selectElementService;
794
+ this.treeNodeSelectionService = treeNodeSelectionService;
795
+ this.cdr = cdr;
796
+ this.element = {};
797
+ this.expansionState = {};
798
+ this.isSelectionMode = false;
799
+ this.allowDblClick = true;
800
+ this.selectedElement = null;
801
+ this.preselectedElement = null;
802
+ this.isAllowOneClick = true;
803
+ this.timerStop = null;
804
+ this.$destroy = new Subject();
805
+ this.checkedElements = {};
806
+ }
807
+ ngOnInit() {
808
+ this.selectElementService.selectClickElement.pipe(takeUntil(this.$destroy)).subscribe((element) => (this.selectedElement = element));
809
+ this.selectElementService.preselectedElement.pipe(takeUntil(this.$destroy)).subscribe((element) => (this.preselectedElement = element));
810
+ if (this.isSelectionMode) {
811
+ this.treeNodeSelectionService.treeNodeSelecting.pipe(takeUntil(this.$destroy)).subscribe((treeNodeSelecting) => {
812
+ this.checkedElements = treeNodeSelecting;
813
+ this.cdr.detectChanges();
814
+ });
815
+ }
816
+ }
817
+ ngOnDestroy() {
818
+ this.timerStop && clearTimeout(this.timerStop);
819
+ this.$destroy.next(true);
820
+ this.$destroy.complete();
821
+ }
822
+ expand() {
823
+ if (this.element) {
824
+ this.expansionState[this.element.id] = true;
825
+ }
826
+ }
827
+ select() {
828
+ const clickElement = () => {
829
+ this.selectElementService.setClickElement(this.selectedElement?.id === this.element.id ? null : this.element);
830
+ if (this.element.elementTypeDiscriminator === 'ServiceSpecificationGroupDto') {
831
+ this.expand();
832
+ }
833
+ };
834
+ if (!this.allowDblClick) {
835
+ clickElement();
836
+ }
837
+ else if (this.isAllowOneClick) {
838
+ this.isAllowOneClick = false;
839
+ this.timerStop = setTimeout(() => {
840
+ clickElement();
841
+ this.isAllowOneClick = true;
842
+ }, defaults.doubleClickTimeoutInMilliseconds);
843
+ }
844
+ }
845
+ dblSelect() {
846
+ if (!this.allowDblClick) {
847
+ return;
848
+ }
849
+ this.timerStop && clearTimeout(this.timerStop);
850
+ this.selectElementService.setDblClickElement(this.element);
851
+ if (this.element.elementTypeDiscriminator === 'ServiceSpecificationGroupDto') {
852
+ this.expand();
853
+ }
854
+ this.isAllowOneClick = true;
855
+ }
856
+ openContextMenu(event) {
857
+ event.preventDefault();
858
+ this.selectElementService.setContextMenuElement({ position: { x: `${event.x}px`, y: `${event.y}px` }, node: this.element });
859
+ }
860
+ changeSelecting(element, isSelected) {
861
+ this.treeNodeSelectionService.changeSelecting(isSelected, element.id);
862
+ }
863
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: TreeItemComponent, deps: [{ token: SelectElementService }, { token: TreeNodeSelectionService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
864
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: TreeItemComponent, selector: "ava-tree-item", inputs: { element: "element", expansionState: "expansionState", isSelectionMode: "isSelectionMode", allowDblClick: "allowDblClick" }, ngImport: i0, template: "<div\n *ngIf=\"element\"\n (click)=\"select()\"\n (dblclick)=\"dblSelect()\"\n (contextmenu)=\"openContextMenu($event)\"\n class=\"ava-tree-item\"\n [id]=\"element.id\"\n>\n <mat-icon\n class=\"ava-tree-item__icon\"\n saveChangingView=\"icon\"\n [id]=\"element.id\"\n >{{ element | elementIconName }}</mat-icon\n >\n <div\n *ngIf=\"!isSelectionMode\"\n class=\"ava-tree-item__text\"\n [class.choose]=\"!isSelectionMode && element.id === preselectedElement?.id\"\n [id]=\"element.id\"\n saveChangingView=\"text\"\n >\n <ng-container [ngTemplateOutlet]=\"text\"></ng-container>\n </div>\n <mat-checkbox\n *ngIf=\"isSelectionMode\"\n class=\"ava-tree-item__checkbox\"\n color=\"primary\"\n [indeterminate]=\"checkedElements[element.id].indeterminate\"\n [(ngModel)]=\"checkedElements[element.id].checked\"\n (ngModelChange)=\"changeSelecting(element, $event)\"\n (click)=\"$event.stopPropagation()\"\n >\n <div\n class=\"ava-tree-item__text\"\n saveChangingView=\"text\"\n [id]=\"element.id\"\n >\n <ng-container [ngTemplateOutlet]=\"text\"></ng-container>\n </div>\n </mat-checkbox>\n</div>\n\n<ng-template #text>\n <ng-container\n *ngIf=\"\n element?.elementTypeDiscriminator === 'ServiceSpecificationGroupDto' || element?.elementTypeDiscriminator === 'PositionDto';\n else simpleText\n \"\n >\n {{ element | elementItemNumber }} - {{ element | elementText }}\n </ng-container>\n</ng-template>\n<ng-template #simpleText>\n {{ element | elementText }}\n</ng-template>\n", styles: ["::ng-deep .ava-tree-item__checkbox .mdc-form-field .mdc-checkbox{padding:0;flex:0 0 16px;width:16px;height:16px}::ng-deep .ava-tree-item__checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__native-control{width:100%;height:100%}::ng-deep .ava-tree-item__checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__ripple{opacity:0!important}::ng-deep .ava-tree-item__checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__background{top:0;left:0;width:100%;height:100%}::ng-deep .ava-tree-item__checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff!important}::ng-deep .ava-tree-item__checkbox .mdc-form-field>label{line-height:24px;padding-left:8px;-webkit-user-select:none;user-select:none}::ng-deep .ava-tree-item__checkbox .mat-mdc-checkbox-touch-target{width:16px!important;height:16px!important}.ava-tree-item{display:flex;align-items:center}.ava-tree-item__icon,.ava-tree-item__checkbox{flex-shrink:0}.ava-tree-item__text{flex-grow:1;-webkit-user-select:none;user-select:none;white-space:nowrap}.ava-tree-item__text.choose{color:red!important}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: SaveChangingViewDirective, selector: "[saveChangingView]", inputs: ["attributeValue"] }, { kind: "pipe", type: ElementIconNamePipe, name: "elementIconName" }, { kind: "pipe", type: ElementTextPipe, name: "elementText" }, { kind: "pipe", type: ElementItemNumberPipe, name: "elementItemNumber" }] }); }
865
+ }
866
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: TreeItemComponent, decorators: [{
867
+ type: Component,
868
+ args: [{ selector: 'ava-tree-item', template: "<div\n *ngIf=\"element\"\n (click)=\"select()\"\n (dblclick)=\"dblSelect()\"\n (contextmenu)=\"openContextMenu($event)\"\n class=\"ava-tree-item\"\n [id]=\"element.id\"\n>\n <mat-icon\n class=\"ava-tree-item__icon\"\n saveChangingView=\"icon\"\n [id]=\"element.id\"\n >{{ element | elementIconName }}</mat-icon\n >\n <div\n *ngIf=\"!isSelectionMode\"\n class=\"ava-tree-item__text\"\n [class.choose]=\"!isSelectionMode && element.id === preselectedElement?.id\"\n [id]=\"element.id\"\n saveChangingView=\"text\"\n >\n <ng-container [ngTemplateOutlet]=\"text\"></ng-container>\n </div>\n <mat-checkbox\n *ngIf=\"isSelectionMode\"\n class=\"ava-tree-item__checkbox\"\n color=\"primary\"\n [indeterminate]=\"checkedElements[element.id].indeterminate\"\n [(ngModel)]=\"checkedElements[element.id].checked\"\n (ngModelChange)=\"changeSelecting(element, $event)\"\n (click)=\"$event.stopPropagation()\"\n >\n <div\n class=\"ava-tree-item__text\"\n saveChangingView=\"text\"\n [id]=\"element.id\"\n >\n <ng-container [ngTemplateOutlet]=\"text\"></ng-container>\n </div>\n </mat-checkbox>\n</div>\n\n<ng-template #text>\n <ng-container\n *ngIf=\"\n element?.elementTypeDiscriminator === 'ServiceSpecificationGroupDto' || element?.elementTypeDiscriminator === 'PositionDto';\n else simpleText\n \"\n >\n {{ element | elementItemNumber }} - {{ element | elementText }}\n </ng-container>\n</ng-template>\n<ng-template #simpleText>\n {{ element | elementText }}\n</ng-template>\n", styles: ["::ng-deep .ava-tree-item__checkbox .mdc-form-field .mdc-checkbox{padding:0;flex:0 0 16px;width:16px;height:16px}::ng-deep .ava-tree-item__checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__native-control{width:100%;height:100%}::ng-deep .ava-tree-item__checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__ripple{opacity:0!important}::ng-deep .ava-tree-item__checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__background{top:0;left:0;width:100%;height:100%}::ng-deep .ava-tree-item__checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff!important}::ng-deep .ava-tree-item__checkbox .mdc-form-field>label{line-height:24px;padding-left:8px;-webkit-user-select:none;user-select:none}::ng-deep .ava-tree-item__checkbox .mat-mdc-checkbox-touch-target{width:16px!important;height:16px!important}.ava-tree-item{display:flex;align-items:center}.ava-tree-item__icon,.ava-tree-item__checkbox{flex-shrink:0}.ava-tree-item__text{flex-grow:1;-webkit-user-select:none;user-select:none;white-space:nowrap}.ava-tree-item__text.choose{color:red!important}\n"] }]
869
+ }], ctorParameters: () => [{ type: SelectElementService }, { type: TreeNodeSelectionService }, { type: i0.ChangeDetectorRef }], propDecorators: { element: [{
870
+ type: Input
871
+ }], expansionState: [{
872
+ type: Input
873
+ }], isSelectionMode: [{
874
+ type: Input
875
+ }], allowDblClick: [{
876
+ type: Input
877
+ }] } });
878
+
879
+ class GroupChildElementsPipe {
880
+ transform(element) {
881
+ if (element.elementTypeDiscriminator === 'ServiceSpecificationGroupDto') {
882
+ return element?.elements || null;
883
+ }
884
+ return null;
885
+ }
886
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: GroupChildElementsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
887
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.1", ngImport: i0, type: GroupChildElementsPipe, name: "groupChildElements" }); }
888
+ }
889
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: GroupChildElementsPipe, decorators: [{
890
+ type: Pipe,
891
+ args: [{
892
+ name: 'groupChildElements',
893
+ pure: true
894
+ }]
895
+ }] });
896
+
897
+ class TreeNodeComponent {
898
+ constructor(selectElementService) {
899
+ this.selectElementService = selectElementService;
900
+ this.elementList = [];
901
+ this.indent = '';
902
+ this.expansionState = {};
903
+ this.isSelectionMode = false;
904
+ this.selectedColor = null;
905
+ this.allowDblClick = true;
906
+ this.selectedElement = null;
907
+ this.$destroy = new Subject();
908
+ }
909
+ ngOnInit() {
910
+ this.selectElementService.selectClickElement.pipe(takeUntil(this.$destroy)).subscribe((element) => {
911
+ this.selectedElement = element;
912
+ });
913
+ }
914
+ ngOnDestroy() {
915
+ this.$destroy.next(true);
916
+ this.$destroy.complete();
917
+ }
918
+ expand(element) {
919
+ this.expansionState[element.id] = !this.expansionState[element.id];
920
+ }
921
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: TreeNodeComponent, deps: [{ token: SelectElementService }], target: i0.ɵɵFactoryTarget.Component }); }
922
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: TreeNodeComponent, selector: "ava-tree-node", inputs: { elementList: "elementList", indent: "indent", expansionState: "expansionState", isSelectionMode: "isSelectionMode", selectedColor: "selectedColor", allowDblClick: "allowDblClick" }, ngImport: i0, template: "<ng-container *ngFor=\"let element of elementList\">\n <div\n class=\"tree-node-wrapper\"\n [class.select]=\"!isSelectionMode && element.id === selectedElement?.id\"\n [style.background]=\"!isSelectionMode && element.id === selectedElement?.id ? selectedColor || '' : ''\"\n >\n <div class=\"tree-node-wrapper__content\">\n <mat-icon\n *ngIf=\"element.elementTypeDiscriminator === 'ServiceSpecificationGroupDto'; else nullIcon\"\n matRipple\n (click)=\"expand(element)\"\n class=\"tree-node__icon\"\n >\n {{ expansionState[element.id] ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n <ava-tree-item\n [element]=\"element\"\n [expansionState]=\"expansionState\"\n [isSelectionMode]=\"isSelectionMode\"\n [allowDblClick]=\"allowDblClick\"\n ></ava-tree-item>\n </div>\n </div>\n\n <div\n *ngIf=\"element.elementTypeDiscriminator === 'ServiceSpecificationGroupDto' && expansionState?.[element.id]\"\n [style.paddingLeft]=\"indent\"\n >\n <ava-tree-node\n [elementList]=\"element | groupChildElements\"\n [expansionState]=\"expansionState\"\n [isSelectionMode]=\"isSelectionMode\"\n [selectedColor]=\"selectedColor\"\n [allowDblClick]=\"allowDblClick\"\n [indent]=\"indent\"\n ></ava-tree-node>\n </div>\n</ng-container>\n<ng-template #nullIcon>\n <mat-icon></mat-icon>\n</ng-template>\n", styles: [".tree-node-wrapper{display:flex;align-items:center}.tree-node-wrapper__content{flex:1 0 100%;display:flex}.tree-node__icon{flex-shrink:0}.select{background-color:var(--mdc-filled-text-field-caret-color);color:#fff}.select *{color:#fff}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4$1.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "component", type: TreeNodeComponent, selector: "ava-tree-node", inputs: ["elementList", "indent", "expansionState", "isSelectionMode", "selectedColor", "allowDblClick"] }, { kind: "component", type: TreeItemComponent, selector: "ava-tree-item", inputs: ["element", "expansionState", "isSelectionMode", "allowDblClick"] }, { kind: "pipe", type: GroupChildElementsPipe, name: "groupChildElements" }] }); }
923
+ }
924
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: TreeNodeComponent, decorators: [{
925
+ type: Component,
926
+ args: [{ selector: 'ava-tree-node', template: "<ng-container *ngFor=\"let element of elementList\">\n <div\n class=\"tree-node-wrapper\"\n [class.select]=\"!isSelectionMode && element.id === selectedElement?.id\"\n [style.background]=\"!isSelectionMode && element.id === selectedElement?.id ? selectedColor || '' : ''\"\n >\n <div class=\"tree-node-wrapper__content\">\n <mat-icon\n *ngIf=\"element.elementTypeDiscriminator === 'ServiceSpecificationGroupDto'; else nullIcon\"\n matRipple\n (click)=\"expand(element)\"\n class=\"tree-node__icon\"\n >\n {{ expansionState[element.id] ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n <ava-tree-item\n [element]=\"element\"\n [expansionState]=\"expansionState\"\n [isSelectionMode]=\"isSelectionMode\"\n [allowDblClick]=\"allowDblClick\"\n ></ava-tree-item>\n </div>\n </div>\n\n <div\n *ngIf=\"element.elementTypeDiscriminator === 'ServiceSpecificationGroupDto' && expansionState?.[element.id]\"\n [style.paddingLeft]=\"indent\"\n >\n <ava-tree-node\n [elementList]=\"element | groupChildElements\"\n [expansionState]=\"expansionState\"\n [isSelectionMode]=\"isSelectionMode\"\n [selectedColor]=\"selectedColor\"\n [allowDblClick]=\"allowDblClick\"\n [indent]=\"indent\"\n ></ava-tree-node>\n </div>\n</ng-container>\n<ng-template #nullIcon>\n <mat-icon></mat-icon>\n</ng-template>\n", styles: [".tree-node-wrapper{display:flex;align-items:center}.tree-node-wrapper__content{flex:1 0 100%;display:flex}.tree-node__icon{flex-shrink:0}.select{background-color:var(--mdc-filled-text-field-caret-color);color:#fff}.select *{color:#fff}\n"] }]
927
+ }], ctorParameters: () => [{ type: SelectElementService }], propDecorators: { elementList: [{
928
+ type: Input
929
+ }], indent: [{
930
+ type: Input
931
+ }], expansionState: [{
932
+ type: Input
933
+ }], isSelectionMode: [{
934
+ type: Input
935
+ }], selectedColor: [{
936
+ type: Input
937
+ }], allowDblClick: [{
938
+ type: Input
939
+ }] } });
940
+
941
+ class TreeStructureComponent {
942
+ constructor() {
943
+ this.serviceSpecification = null;
944
+ this.indent = '';
945
+ this.expansionState = {};
946
+ this.isSelectionMode = false;
947
+ this.selectedColor = null;
948
+ this.allowDblClick = true;
949
+ }
950
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: TreeStructureComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
951
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: TreeStructureComponent, selector: "ava-tree-structure", inputs: { serviceSpecification: "serviceSpecification", indent: "indent", expansionState: "expansionState", isSelectionMode: "isSelectionMode", selectedColor: "selectedColor", allowDblClick: "allowDblClick" }, ngImport: i0, template: "<ava-tree-node\n *ngIf=\"serviceSpecification?.elements\"\n [elementList]=\"serviceSpecification?.elements\"\n [indent]=\"indent\"\n [expansionState]=\"expansionState\"\n [isSelectionMode]=\"isSelectionMode\"\n [selectedColor]=\"selectedColor\"\n [allowDblClick]=\"allowDblClick\"\n>\n</ava-tree-node>\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TreeNodeComponent, selector: "ava-tree-node", inputs: ["elementList", "indent", "expansionState", "isSelectionMode", "selectedColor", "allowDblClick"] }] }); }
952
+ }
953
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: TreeStructureComponent, decorators: [{
954
+ type: Component,
955
+ args: [{ selector: 'ava-tree-structure', template: "<ava-tree-node\n *ngIf=\"serviceSpecification?.elements\"\n [elementList]=\"serviceSpecification?.elements\"\n [indent]=\"indent\"\n [expansionState]=\"expansionState\"\n [isSelectionMode]=\"isSelectionMode\"\n [selectedColor]=\"selectedColor\"\n [allowDblClick]=\"allowDblClick\"\n>\n</ava-tree-node>\n" }]
956
+ }], propDecorators: { serviceSpecification: [{
957
+ type: Input
958
+ }], indent: [{
959
+ type: Input
960
+ }], expansionState: [{
961
+ type: Input
962
+ }], isSelectionMode: [{
963
+ type: Input
964
+ }], selectedColor: [{
965
+ type: Input
966
+ }], allowDblClick: [{
967
+ type: Input
968
+ }] } });
969
+
970
+ class ListStructureComponent {
971
+ constructor(selectElementService) {
972
+ this.selectElementService = selectElementService;
973
+ this.filteredElementList = [];
974
+ this.isSelectionMode = false;
975
+ this.selectedColor = null;
976
+ this.allowDblClick = true;
977
+ this.selectedElement = null;
978
+ this.$destroy = new Subject();
979
+ }
980
+ ngOnInit() {
981
+ this.selectElementService.selectClickElement.pipe(takeUntil(this.$destroy)).subscribe((element) => {
982
+ this.selectedElement = element;
983
+ });
984
+ }
985
+ ngOnDestroy() {
986
+ this.$destroy.next(true);
987
+ this.$destroy.complete();
988
+ }
989
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ListStructureComponent, deps: [{ token: SelectElementService }], target: i0.ɵɵFactoryTarget.Component }); }
990
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: ListStructureComponent, selector: "ava-list-structure", inputs: { filteredElementList: "filteredElementList", isSelectionMode: "isSelectionMode", selectedColor: "selectedColor", allowDblClick: "allowDblClick" }, ngImport: i0, template: "<ng-container *ngFor=\"let element of filteredElementList\">\n <div\n [class.select]=\"!isSelectionMode && element.id === selectedElement?.id\"\n [style.background]=\"!isSelectionMode && element.id === selectedElement?.id ? selectedColor || '' : ''\"\n >\n <ava-tree-item\n [element]=\"element\"\n [isSelectionMode]=\"isSelectionMode\"\n [allowDblClick]=\"allowDblClick\"\n ></ava-tree-item>\n </div>\n</ng-container>\n", styles: [".select{background:var(--mdc-filled-text-field-caret-color);color:#fff}.select *{color:#fff}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: TreeItemComponent, selector: "ava-tree-item", inputs: ["element", "expansionState", "isSelectionMode", "allowDblClick"] }] }); }
991
+ }
992
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: ListStructureComponent, decorators: [{
993
+ type: Component,
994
+ args: [{ selector: 'ava-list-structure', template: "<ng-container *ngFor=\"let element of filteredElementList\">\n <div\n [class.select]=\"!isSelectionMode && element.id === selectedElement?.id\"\n [style.background]=\"!isSelectionMode && element.id === selectedElement?.id ? selectedColor || '' : ''\"\n >\n <ava-tree-item\n [element]=\"element\"\n [isSelectionMode]=\"isSelectionMode\"\n [allowDblClick]=\"allowDblClick\"\n ></ava-tree-item>\n </div>\n</ng-container>\n", styles: [".select{background:var(--mdc-filled-text-field-caret-color);color:#fff}.select *{color:#fff}\n"] }]
995
+ }], ctorParameters: () => [{ type: SelectElementService }], propDecorators: { filteredElementList: [{
996
+ type: Input
997
+ }], isSelectionMode: [{
998
+ type: Input
999
+ }], selectedColor: [{
1000
+ type: Input
1001
+ }], allowDblClick: [{
1002
+ type: Input
1003
+ }] } });
1004
+
1005
+ class TableStructureComponent {
1006
+ constructor(selectElementService, treeNodeSelectionService, cdr) {
1007
+ this.selectElementService = selectElementService;
1008
+ this.treeNodeSelectionService = treeNodeSelectionService;
1009
+ this.cdr = cdr;
1010
+ this.filteredElementList = [];
1011
+ this.isSelectionMode = false;
1012
+ this.addTableColumns = [];
1013
+ this.selectedColor = null;
1014
+ this.allowDblClick = true;
1015
+ this.displayedColumns = [];
1016
+ this.isAllowOneClick = true;
1017
+ this.selectedElement = null;
1018
+ this.preselectedElement = null;
1019
+ this.timerStop = null;
1020
+ this.checkedElements = {};
1021
+ this.$destroy = new Subject();
1022
+ }
1023
+ ngOnInit() {
1024
+ this.selectElementService.selectClickElement.pipe(takeUntil(this.$destroy)).subscribe((element) => {
1025
+ this.selectedElement = element;
1026
+ });
1027
+ this.selectElementService.preselectedElement.pipe(takeUntil(this.$destroy)).subscribe((element) => {
1028
+ this.preselectedElement = element;
1029
+ });
1030
+ if (this.isSelectionMode) {
1031
+ this.displayedColumns = ['icon', 'checkbox', 'itemNumber', 'text', ...this.addTableColumns.map((item) => item.name)];
1032
+ this.treeNodeSelectionService.treeNodeSelecting.pipe(takeUntil(this.$destroy)).subscribe((treeNodeSelecting) => {
1033
+ this.checkedElements = treeNodeSelecting;
1034
+ this.cdr.detectChanges();
1035
+ });
1036
+ }
1037
+ else {
1038
+ this.displayedColumns = ['icon', 'itemNumber', 'text', ...this.addTableColumns.map((item) => item.name)];
1039
+ }
1040
+ }
1041
+ ngOnDestroy() {
1042
+ this.timerStop && clearTimeout(this.timerStop);
1043
+ this.$destroy.next(true);
1044
+ this.$destroy.complete();
1045
+ }
1046
+ select(row) {
1047
+ if (this.isSelectionMode) {
1048
+ return;
1049
+ }
1050
+ const clickElement = () => {
1051
+ this.selectElementService.setClickElement(this.selectedElement?.id === row.id ? null : row);
1052
+ };
1053
+ if (!this.allowDblClick) {
1054
+ clickElement();
1055
+ }
1056
+ else if (this.isAllowOneClick) {
1057
+ this.isAllowOneClick = false;
1058
+ this.timerStop = setTimeout(() => {
1059
+ clickElement();
1060
+ this.isAllowOneClick = true;
1061
+ }, defaults.doubleClickTimeoutInMilliseconds);
1062
+ }
1063
+ }
1064
+ dblSelect(row) {
1065
+ if (!this.allowDblClick) {
1066
+ return;
1067
+ }
1068
+ if (this.isSelectionMode) {
1069
+ return;
1070
+ }
1071
+ this.timerStop && clearTimeout(this.timerStop);
1072
+ this.selectElementService.setDblClickElement(row);
1073
+ this.isAllowOneClick = true;
1074
+ }
1075
+ openContextMenu(event, row) {
1076
+ event.preventDefault();
1077
+ this.selectElementService.setContextMenuElement({ position: { x: `${event.x}px`, y: `${event.y}px` }, node: row });
1078
+ }
1079
+ changeSelecting(element, event) {
1080
+ this.treeNodeSelectionService.changeSelecting(event, element.id);
1081
+ }
1082
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: TableStructureComponent, deps: [{ token: SelectElementService }, { token: TreeNodeSelectionService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1083
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: TableStructureComponent, selector: "ava-table-structure", inputs: { filteredElementList: "filteredElementList", isSelectionMode: "isSelectionMode", addTableColumns: "addTableColumns", selectedColor: "selectedColor", allowDblClick: "allowDblClick" }, ngImport: i0, template: "<table\n mat-table\n [dataSource]=\"filteredElementList\"\n>\n <ng-container matColumnDef=\"icon\">\n <th\n mat-header-cell\n *matHeaderCellDef\n ></th>\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"table-cell-small-width\"\n >\n <mat-icon\n class=\"icon-element\"\n saveChangingView=\"icon\"\n [id]=\"row.id\"\n >\n {{ row | elementIconName }}\n </mat-icon>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"checkbox\">\n <th\n mat-header-cell\n *matHeaderCellDef\n ></th>\n <td\n mat-cell\n *matCellDef=\"let element\"\n class=\"table-cell-small-width\"\n >\n <mat-checkbox\n class=\"checkbox\"\n color=\"primary\"\n [indeterminate]=\"checkedElements[element.id].indeterminate\"\n [(ngModel)]=\"checkedElements[element.id].checked\"\n (ngModelChange)=\"changeSelecting(element, $event)\"\n (click)=\"$event.stopPropagation()\"\n >\n </mat-checkbox>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"itemNumber\">\n <th\n mat-header-cell\n *matHeaderCellDef\n >\n OZ\n </th>\n <td\n mat-cell\n *matCellDef=\"let row\"\n [style.width.ch]=\"row?.itemNumber?.stringRepresentation.length\"\n >\n <div\n class=\"text-element\"\n saveChangingView=\"text\"\n [id]=\"row.id\"\n >\n {{ row | elementItemNumber }}\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"text\">\n <th\n mat-header-cell\n *matHeaderCellDef\n >\n Text\n </th>\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"table-text\"\n >\n <div\n class=\"text-element\"\n saveChangingView=\"text\"\n [id]=\"row.id\"\n >\n {{ row | elementText }}\n </div>\n </td>\n </ng-container>\n\n <ng-container *ngFor=\"let oneColumn of addTableColumns\">\n <ng-container matColumnDef=\"{{ oneColumn.name }}\">\n <th\n mat-header-cell\n *matHeaderCellDef\n >\n {{ oneColumn.title }}\n </th>\n <td\n mat-cell\n *matCellDef=\"let row\"\n >\n <div\n [style.textAlign]=\"oneColumn.align\"\n saveChangingView=\"text\"\n [id]=\"row.id\"\n >\n {{ !oneColumn.numberFormat ? row[oneColumn.name] : (row[oneColumn.name] | number: oneColumn.numberFormat) }}\n </div>\n </td>\n </ng-container>\n </ng-container>\n\n <tr\n mat-header-row\n *matHeaderRowDef=\"displayedColumns; sticky: true\"\n class=\"mat-header-row\"\n ></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns\"\n (click)=\"select(row)\"\n (dblclick)=\"dblSelect(row)\"\n (contextmenu)=\"openContextMenu($event, row)\"\n [ngClass]=\"{\n choose: !isSelectionMode && row.id === preselectedElement?.id,\n select: !isSelectionMode && row.id === selectedElement?.id\n }\"\n [style.background]=\"!isSelectionMode && row.id === selectedElement?.id ? selectedColor || '' : ''\"\n [id]=\"row.id\"\n ></tr>\n</table>\n", styles: ["table{width:100%}table tr.mat-mdc-row,table tr.mat-mdc-header-row{height:24px}table tr input{box-sizing:border-box;padding:0 3px;outline:none;border:none;height:20px;width:calc(100% - 2px)}table tr input:focus{background:#fff!important}table tr .right{text-align:right}table tr td,table tr th{border-right:1px solid #777;border-bottom:1px solid #777;padding:0}table tr td:first-child,table tr th:first-child{border-left:1px solid #777}table tr td.min-width,table tr th.min-width{width:12ch;min-width:12ch}table tr td div,table tr th div{padding:0 3px}table tr th{border-top:1px solid #777;padding:0 3px}.table-text{overflow-x:hidden;position:relative}.table-text div{position:absolute;top:50%;left:0;white-space:nowrap;transform:translateY(-50%)}.select{background:var(--mdc-filled-text-field-caret-color);color:#fff}.select *{color:#fff}.choose div{color:red!important}::ng-deep .checkbox .mdc-form-field .mdc-checkbox{padding:0;flex:0 0 16px;width:16px;height:16px}::ng-deep .checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__native-control{width:100%;height:100%}::ng-deep .checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__ripple{opacity:0!important}::ng-deep .checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__background{top:0;left:0;width:100%;height:100%}::ng-deep .checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff!important}::ng-deep .checkbox .mdc-form-field>label{line-height:24px;padding-left:8px;-webkit-user-select:none;user-select:none}.text-element{-webkit-user-select:none;user-select:none}.table-cell-small-width{width:24px;min-width:24px;position:relative;text-align:center}.table-cell-small-width .icon-element{position:absolute;top:0;left:0}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: i7.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i7.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i7.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i7.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i7.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i7.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i7.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i7.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i7.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i7.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: SaveChangingViewDirective, selector: "[saveChangingView]", inputs: ["attributeValue"] }, { kind: "pipe", type: i3.DecimalPipe, name: "number" }, { kind: "pipe", type: ElementIconNamePipe, name: "elementIconName" }, { kind: "pipe", type: ElementTextPipe, name: "elementText" }, { kind: "pipe", type: ElementItemNumberPipe, name: "elementItemNumber" }] }); }
1084
+ }
1085
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: TableStructureComponent, decorators: [{
1086
+ type: Component,
1087
+ args: [{ selector: 'ava-table-structure', template: "<table\n mat-table\n [dataSource]=\"filteredElementList\"\n>\n <ng-container matColumnDef=\"icon\">\n <th\n mat-header-cell\n *matHeaderCellDef\n ></th>\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"table-cell-small-width\"\n >\n <mat-icon\n class=\"icon-element\"\n saveChangingView=\"icon\"\n [id]=\"row.id\"\n >\n {{ row | elementIconName }}\n </mat-icon>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"checkbox\">\n <th\n mat-header-cell\n *matHeaderCellDef\n ></th>\n <td\n mat-cell\n *matCellDef=\"let element\"\n class=\"table-cell-small-width\"\n >\n <mat-checkbox\n class=\"checkbox\"\n color=\"primary\"\n [indeterminate]=\"checkedElements[element.id].indeterminate\"\n [(ngModel)]=\"checkedElements[element.id].checked\"\n (ngModelChange)=\"changeSelecting(element, $event)\"\n (click)=\"$event.stopPropagation()\"\n >\n </mat-checkbox>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"itemNumber\">\n <th\n mat-header-cell\n *matHeaderCellDef\n >\n OZ\n </th>\n <td\n mat-cell\n *matCellDef=\"let row\"\n [style.width.ch]=\"row?.itemNumber?.stringRepresentation.length\"\n >\n <div\n class=\"text-element\"\n saveChangingView=\"text\"\n [id]=\"row.id\"\n >\n {{ row | elementItemNumber }}\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"text\">\n <th\n mat-header-cell\n *matHeaderCellDef\n >\n Text\n </th>\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"table-text\"\n >\n <div\n class=\"text-element\"\n saveChangingView=\"text\"\n [id]=\"row.id\"\n >\n {{ row | elementText }}\n </div>\n </td>\n </ng-container>\n\n <ng-container *ngFor=\"let oneColumn of addTableColumns\">\n <ng-container matColumnDef=\"{{ oneColumn.name }}\">\n <th\n mat-header-cell\n *matHeaderCellDef\n >\n {{ oneColumn.title }}\n </th>\n <td\n mat-cell\n *matCellDef=\"let row\"\n >\n <div\n [style.textAlign]=\"oneColumn.align\"\n saveChangingView=\"text\"\n [id]=\"row.id\"\n >\n {{ !oneColumn.numberFormat ? row[oneColumn.name] : (row[oneColumn.name] | number: oneColumn.numberFormat) }}\n </div>\n </td>\n </ng-container>\n </ng-container>\n\n <tr\n mat-header-row\n *matHeaderRowDef=\"displayedColumns; sticky: true\"\n class=\"mat-header-row\"\n ></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: displayedColumns\"\n (click)=\"select(row)\"\n (dblclick)=\"dblSelect(row)\"\n (contextmenu)=\"openContextMenu($event, row)\"\n [ngClass]=\"{\n choose: !isSelectionMode && row.id === preselectedElement?.id,\n select: !isSelectionMode && row.id === selectedElement?.id\n }\"\n [style.background]=\"!isSelectionMode && row.id === selectedElement?.id ? selectedColor || '' : ''\"\n [id]=\"row.id\"\n ></tr>\n</table>\n", styles: ["table{width:100%}table tr.mat-mdc-row,table tr.mat-mdc-header-row{height:24px}table tr input{box-sizing:border-box;padding:0 3px;outline:none;border:none;height:20px;width:calc(100% - 2px)}table tr input:focus{background:#fff!important}table tr .right{text-align:right}table tr td,table tr th{border-right:1px solid #777;border-bottom:1px solid #777;padding:0}table tr td:first-child,table tr th:first-child{border-left:1px solid #777}table tr td.min-width,table tr th.min-width{width:12ch;min-width:12ch}table tr td div,table tr th div{padding:0 3px}table tr th{border-top:1px solid #777;padding:0 3px}.table-text{overflow-x:hidden;position:relative}.table-text div{position:absolute;top:50%;left:0;white-space:nowrap;transform:translateY(-50%)}.select{background:var(--mdc-filled-text-field-caret-color);color:#fff}.select *{color:#fff}.choose div{color:red!important}::ng-deep .checkbox .mdc-form-field .mdc-checkbox{padding:0;flex:0 0 16px;width:16px;height:16px}::ng-deep .checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__native-control{width:100%;height:100%}::ng-deep .checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__ripple{opacity:0!important}::ng-deep .checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__background{top:0;left:0;width:100%;height:100%}::ng-deep .checkbox .mdc-form-field .mdc-checkbox .mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff!important}::ng-deep .checkbox .mdc-form-field>label{line-height:24px;padding-left:8px;-webkit-user-select:none;user-select:none}.text-element{-webkit-user-select:none;user-select:none}.table-cell-small-width{width:24px;min-width:24px;position:relative;text-align:center}.table-cell-small-width .icon-element{position:absolute;top:0;left:0}\n"] }]
1088
+ }], ctorParameters: () => [{ type: SelectElementService }, { type: TreeNodeSelectionService }, { type: i0.ChangeDetectorRef }], propDecorators: { filteredElementList: [{
1089
+ type: Input
1090
+ }], isSelectionMode: [{
1091
+ type: Input
1092
+ }], addTableColumns: [{
1093
+ type: Input
1094
+ }], selectedColor: [{
1095
+ type: Input
1096
+ }], allowDblClick: [{
1097
+ type: Input
1098
+ }] } });
1099
+
1100
+ class AvaTreeComponent {
1101
+ /**
1102
+ * You can supply a map of strings to be used for the text in the tree. This allows you to translate
1103
+ * the text in the tree to other languages.
1104
+ * {
1105
+ * textSearch: string,
1106
+ * textNothing: string,
1107
+ * textNothingFiltered: string,
1108
+ * textAll: string,
1109
+ * tooltipAllOpen: string,
1110
+ * tooltipAllClose: string,
1111
+ * tooltipAllAdd:string,
1112
+ * tooltipAllRemove: string,
1113
+ * }
1114
+ */
1115
+ set textWords(words) {
1116
+ this._textWords = { ...this.textWords, ...words };
1117
+ } // allow to translate all texts to other language
1118
+ get textWords() {
1119
+ return this._textWords;
1120
+ }
1121
+ /**
1122
+ * With this parameter, you can configure which keys will be listenend to to switch the tree elements,
1123
+ * and also to disable the functionality of the keys */
1124
+ set customKeyboardOperationConfig(config) {
1125
+ this.keyboardOperationService.mergeConfigOperation(config);
1126
+ }
1127
+ constructor(flatElementsService, selectElementService, treeNodeSelectionService, expandParentGroupService, keyboardOperationService, ngZone) {
1128
+ this.flatElementsService = flatElementsService;
1129
+ this.selectElementService = selectElementService;
1130
+ this.treeNodeSelectionService = treeNodeSelectionService;
1131
+ this.expandParentGroupService = expandParentGroupService;
1132
+ this.keyboardOperationService = keyboardOperationService;
1133
+ this.ngZone = ngZone;
1134
+ /**
1135
+ * This is the main data element for the tree structure. You should supply a ProjectDto with
1136
+ * exactly one service specification in it.
1137
+ */
1138
+ this.project = null;
1139
+ /**
1140
+ * Optionally, you can supply a map of expansion states for the tree. The keys should be the
1141
+ * id properties of the elements in the tree, and the values should be true if the element is
1142
+ * expanded, and false if it is collapsed.
1143
+ */
1144
+ this.expansionState = {};
1145
+ /**
1146
+ * Optionally, you can supply the id of the node that should be selected in the tree initially.
1147
+ */
1148
+ this.selectedNodeId = null;
1149
+ /**
1150
+ * Optional, defaults to 20px. If this is set, then the tree will be indented by the given value each level.
1151
+ * This can be any valid CSS value for the padding-left property, such as 20px, 1em, or 5%.
1152
+ *
1153
+ */
1154
+ this.indent = '20px';
1155
+ /**
1156
+ * Optional, you can supply a color to be used as the background color for the selected line. Defaults to the primary
1157
+ * color from the Material theme, which is #00acc1.
1158
+ */
1159
+ this.selectedColor = null;
1160
+ /**
1161
+ * You can specify which view type to use for the tree. The default is ModeViewType.Tree, but you can also use
1162
+ * ModeViewType.List or ModeViewType.Table.
1163
+ */
1164
+ this.modeView = ModeViewType.Tree;
1165
+ /** Optional, defaults to true. If this is disabled, then the double click event for elements is not raised,
1166
+ * and clicking on an elemt sends an immediate result since the component has not to wait and check if a double click event
1167
+ * is fired.
1168
+ */
1169
+ this.allowDblClick = true;
1170
+ /**
1171
+ * If this is set to true, then the tree will be in selection mode, and the user can select elements
1172
+ * by clicking on them. The selected elements will be emitted in the selectedElementsChanged event.
1173
+ */
1174
+ this.isSelectionMode = false;
1175
+ /**
1176
+ * You can optionally supply a list of elements that should be selected initially. This is only used if
1177
+ * isSelectionMode is true.
1178
+ */
1179
+ this.initiallySelectedElements = null;
1180
+ this._textWords = null;
1181
+ /**
1182
+ * Defaults to true. If this is enabled, then navigating in the tree with the keyboard only works
1183
+ * if the mouse is over the tree area. This limitation is useful if you have multiple trees or other components
1184
+ * that might be using keyboard input.
1185
+ */
1186
+ this.mouseAwareKeyboardControl = true;
1187
+ /**
1188
+ * You can supply custom filters that are processed when the filter input is changed. Default filters are used
1189
+ * that check for short text and item number matches, and you can either add custom filters or replace the default ones.
1190
+ */
1191
+ this.listFilterFunc = DEFAULT_FILTERS;
1192
+ /**
1193
+ * Optional. For table views, this allows you to add custom columns to the table.
1194
+ * addTableColumns: Array of objects
1195
+ * {
1196
+ * name: string, // name of column
1197
+ * title: string, // showed title of column
1198
+ * align?: string, // optional alight: left(default) / center / right
1199
+ * numberFormat?: string // optional format of number value, example: '1.2-2'
1200
+ * }
1201
+ */
1202
+ this.addTableColumns = [];
1203
+ /**
1204
+ * This allows you to supply a list of functions that can be used to change the appearance of elements.
1205
+ * They objects contain a predicate function that is evaluated, along with an option to configure the
1206
+ * appearance of the element.
1207
+ * functionView: Array of objects
1208
+ * {
1209
+ * name: string, // name of view part: you can add/remove it when it need
1210
+ * func: (element: any, result?: any) => boolean, // this filter function calculate condition to change view
1211
+ * view: {
1212
+ * iconName?: string, // changed name of icon
1213
+ * iconColor?: string, // changed color of icon
1214
+ * textBold?: string, // changed weight of text
1215
+ * textColor?: string // changed color of text
1216
+ * }
1217
+ * }
1218
+ */
1219
+ this.functionView = null;
1220
+ this.selectClick = new EventEmitter(); // event after element selected by click
1221
+ this.selectDblClick = new EventEmitter(); // event after element selected by double click
1222
+ this.contextMenuEvent = new EventEmitter(); // event after element call context menu by right button click
1223
+ this.selectedElementsChanged = new EventEmitter(); // event after changed selecting in selecting mode
1224
+ this.selectedElement = null;
1225
+ this.isListenKeyboard = false;
1226
+ this.isEmiteSelectedElements = false;
1227
+ this.selectingElementsTreeData = [];
1228
+ this.flatElements = null;
1229
+ this.preselectedElement = null;
1230
+ this.filterInput = '';
1231
+ this.listModeViewType = ModeViewType;
1232
+ this.filter = '';
1233
+ this.$filter = new ReplaySubject(1);
1234
+ this.filteredElementList = [];
1235
+ this.$destroy = new Subject();
1236
+ this._textWords = { ...DEFAULT_TEXT_WORDS };
1237
+ }
1238
+ ngOnInit() {
1239
+ this.selectElementService.preselectedElement.pipe(takeUntil(this.$destroy)).subscribe((e) => (this.preselectedElement = e));
1240
+ this.selectElementService.selectClickElement.pipe(takeUntil(this.$destroy)).subscribe((e) => {
1241
+ this.selectedElement = e;
1242
+ this.selectClick.emit(e);
1243
+ });
1244
+ this.selectElementService.selectDblClickElement.pipe(takeUntil(this.$destroy)).subscribe((e) => this.selectDblClick.emit(e));
1245
+ this.selectElementService.selectContextMenuElement.pipe(takeUntil(this.$destroy)).subscribe((e) => this.contextMenuEvent.emit(e));
1246
+ this.flatElementsService.flatElementsDto.pipe(takeUntil(this.$destroy)).subscribe((e) => {
1247
+ this.flatElements = e;
1248
+ this.getFilteredList();
1249
+ });
1250
+ this.$filter.pipe(takeUntil(this.$destroy), debounceTime(250)).subscribe((filter) => {
1251
+ this.filter = filter;
1252
+ this.getFilteredList();
1253
+ });
1254
+ }
1255
+ ngAfterViewInit() {
1256
+ this.initializeEventListeners();
1257
+ }
1258
+ ngOnChanges(changes) {
1259
+ this.flatElementsService.listFilterFunc = this.listFilterFunc;
1260
+ this.flatElementsService.functionView = this.functionView;
1261
+ if (changes['project'] && this.project?.serviceSpecifications?.[0]) {
1262
+ this.serviceSpecification = this.project.serviceSpecifications[0];
1263
+ this.flatElementsService.setElementsDto(this.serviceSpecification);
1264
+ if (this.isSelectionMode) {
1265
+ this.selectingElementsTreeData = this.treeNodeSelectionService.loadSelectingElements(this.serviceSpecification.elements);
1266
+ this.treeNodeSelectionService.treeNodeSelecting.pipe(takeUntil(this.$destroy)).subscribe(() => {
1267
+ if (this.isEmiteSelectedElements) {
1268
+ setTimeout(() => {
1269
+ const selectingTree = this.treeNodeSelectionService.getTreeRoot(this.selectingElementsTreeData);
1270
+ this.selectedElementsChanged.emit(selectingTree);
1271
+ }, 0);
1272
+ }
1273
+ });
1274
+ }
1275
+ }
1276
+ if ((changes['selectedNodeId'] && this.project) || changes['project']) {
1277
+ this.flatElementsService.getOneElementById(this.selectedNodeId).subscribe((e) => {
1278
+ if (e) {
1279
+ this.selectElementService.setClickElement(e);
1280
+ }
1281
+ });
1282
+ }
1283
+ if (this.isSelectionMode && (changes['initiallySelectedElements'] || changes['project'])) {
1284
+ this.formSelectingList();
1285
+ }
1286
+ }
1287
+ ngOnDestroy() {
1288
+ this.$destroy.next(true);
1289
+ this.$destroy.complete();
1290
+ }
1291
+ mouseOver() {
1292
+ if (!this.isListenKeyboard) {
1293
+ this.isListenKeyboard = true;
1294
+ this.avaTreeFilterInput?.nativeElement.focus();
1295
+ }
1296
+ }
1297
+ mouseOut() {
1298
+ this.isListenKeyboard = false;
1299
+ }
1300
+ handleGlobalKeyboardEvent(event) {
1301
+ this.ngZone.run(() => {
1302
+ const keyEvent = event;
1303
+ if (!this.mouseAwareKeyboardControl || this.isListenKeyboard) {
1304
+ const element = this.preselectedElement || this.selectedElement;
1305
+ const { operation, nextElement } = this.keyboardOperationService.handleKeyboardEvent(keyEvent, element) || { nextElement: null };
1306
+ switch (operation) {
1307
+ case KeyboardOperationType.MoveSelectedPositionUp:
1308
+ this.showElement(nextElement, '.select');
1309
+ break;
1310
+ case KeyboardOperationType.MoveSelectedPositionDown:
1311
+ this.showElement(nextElement, '.select');
1312
+ break;
1313
+ case KeyboardOperationType.MoveChosenPositionDown:
1314
+ this.showElement(nextElement, nextElement?.id === this.selectedElement?.id ? '.select' : '.choose');
1315
+ break;
1316
+ case KeyboardOperationType.MoveChosenPositionUp:
1317
+ this.showElement(nextElement, nextElement?.id === this.selectedElement?.id ? '.select' : '.choose');
1318
+ break;
1319
+ default:
1320
+ break;
1321
+ }
1322
+ }
1323
+ });
1324
+ }
1325
+ showElement(element, nameQuery) {
1326
+ if (element) {
1327
+ if (this.modeView === ModeViewType.Tree) {
1328
+ this.expandParentGroups(element);
1329
+ }
1330
+ setTimeout(() => this.scrollLine(nameQuery), 0);
1331
+ }
1332
+ }
1333
+ scrollLine(nameQuery) {
1334
+ const parentRect = this.avaTreeWrapper?.nativeElement.getBoundingClientRect();
1335
+ const showedElement = this.avaTreeWrapper?.nativeElement.querySelector(nameQuery);
1336
+ if (!showedElement) {
1337
+ return;
1338
+ }
1339
+ const childRect = showedElement.getBoundingClientRect();
1340
+ if (childRect.bottom > parentRect.bottom ||
1341
+ childRect.top < parentRect.top ||
1342
+ (this.modeView === ModeViewType.Table && childRect.top < parentRect.top + 24)) {
1343
+ showedElement?.scrollIntoView();
1344
+ this.avaTreeWrapper?.nativeElement.scrollTo({ left: 0 });
1345
+ if (this.modeView === ModeViewType.Table) {
1346
+ setTimeout(() => this.correctScrollTableLine(showedElement, parentRect), 0);
1347
+ }
1348
+ }
1349
+ }
1350
+ correctScrollTableLine(showedElement, parentRect) {
1351
+ const childRect = showedElement.getBoundingClientRect();
1352
+ if (childRect.top < parentRect.top + 24) {
1353
+ this.avaTreeWrapper.nativeElement.scrollTop -= 24;
1354
+ }
1355
+ }
1356
+ expandParentGroups(element) {
1357
+ this.expandParentGroupService.expandParentGroups(element, this.flatElements, this.expansionState);
1358
+ }
1359
+ onFilter(value) {
1360
+ this.$filter.next(value);
1361
+ }
1362
+ changeAllElementsExpansionStatus(isExpanded) {
1363
+ if (!isExpanded) {
1364
+ Object.keys(this.expansionState).forEach((id) => delete this.expansionState[id]);
1365
+ }
1366
+ else {
1367
+ this.flatElements?.forEach((item) => {
1368
+ if (item.elementTypeDiscriminator === 'ServiceSpecificationGroupDto') {
1369
+ this.expansionState[item.id] = true;
1370
+ }
1371
+ });
1372
+ }
1373
+ }
1374
+ formSelectingList() {
1375
+ this.isEmiteSelectedElements = false;
1376
+ if (!this.initiallySelectedElements) {
1377
+ this.isEmiteSelectedElements = true;
1378
+ return;
1379
+ }
1380
+ this.treeNodeSelectionService.getFlatSelectedListId(this.initiallySelectedElements);
1381
+ this.treeNodeSelectionService.flatSelectedListId.forEach((id, index) => {
1382
+ this.treeNodeSelectionService.changeSelecting(true, id);
1383
+ if (index === this.treeNodeSelectionService.flatSelectedListId.length - 1) {
1384
+ this.isEmiteSelectedElements = true;
1385
+ }
1386
+ });
1387
+ }
1388
+ selectOrDeselectAll(value) {
1389
+ this.treeNodeSelectionService.changeAll(value);
1390
+ }
1391
+ getFilteredList() {
1392
+ if (this.flatElements?.length) {
1393
+ if (!this.filter) {
1394
+ this.filteredElementList = this.flatElements;
1395
+ }
1396
+ else {
1397
+ this.filteredElementList = this.flatElements.filter((item) => this.flatElementsService.checkFilterValue(item, this.filter));
1398
+ }
1399
+ }
1400
+ }
1401
+ initializeEventListeners() {
1402
+ this.ngZone.runOutsideAngular(() => {
1403
+ fromEvent(this.avaMainWrapper.nativeElement, 'mouseleave')
1404
+ .pipe(takeUntil(this.$destroy))
1405
+ .subscribe(() => {
1406
+ this.mouseOut();
1407
+ });
1408
+ fromEvent(this.avaMainWrapper.nativeElement, 'mouseenter')
1409
+ .pipe(takeUntil(this.$destroy))
1410
+ .subscribe(() => {
1411
+ this.mouseOver();
1412
+ });
1413
+ if (!this.isSelectionMode) {
1414
+ fromEvent(document, 'keydown')
1415
+ .pipe(takeUntil(this.$destroy), filter(() => !this.mouseAwareKeyboardControl || this.isListenKeyboard))
1416
+ .subscribe((event) => {
1417
+ this.handleGlobalKeyboardEvent(event);
1418
+ });
1419
+ }
1420
+ });
1421
+ }
1422
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: AvaTreeComponent, deps: [{ token: FlatElementsService, self: true }, { token: SelectElementService, self: true }, { token: TreeNodeSelectionService, self: true }, { token: ExpandParentGroupService, self: true }, { token: KeyboardOperationService, self: true }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
1423
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: AvaTreeComponent, selector: "ava-tree", inputs: { project: "project", expansionState: "expansionState", selectedNodeId: "selectedNodeId", indent: "indent", selectedColor: "selectedColor", modeView: "modeView", allowDblClick: "allowDblClick", isSelectionMode: "isSelectionMode", initiallySelectedElements: "initiallySelectedElements", textWords: "textWords", mouseAwareKeyboardControl: "mouseAwareKeyboardControl", customKeyboardOperationConfig: "customKeyboardOperationConfig", listFilterFunc: "listFilterFunc", addTableColumns: "addTableColumns", functionView: "functionView" }, outputs: { selectClick: "selectClick", selectDblClick: "selectDblClick", contextMenuEvent: "contextMenuEvent", selectedElementsChanged: "selectedElementsChanged" }, providers: [FlatElementsService, SelectElementService, TreeNodeSelectionService, ExpandParentGroupService, KeyboardOperationService], viewQueries: [{ propertyName: "avaTreeWrapper", first: true, predicate: ["avaTreeWrapper"], descendants: true }, { propertyName: "avaMainWrapper", first: true, predicate: ["avaMainWrapper"], descendants: true }, { propertyName: "avaTreeFilterInput", first: true, predicate: ["avaTreeFilterInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"main-wrapper\"\n #avaMainWrapper\n>\n <div\n class=\"control\"\n #control\n >\n <mat-form-field class=\"control-filter\">\n <mat-label>{{ textWords?.textSearch }}</mat-label>\n <input\n matInput\n [ngModel]=\"filterInput\"\n (ngModelChange)=\"onFilter($event)\"\n #avaTreeFilterInput\n />\n </mat-form-field>\n <ng-container *ngIf=\"modeView === listModeViewType.Tree\">\n <button\n class=\"control-icon\"\n mat-icon-button\n color=\"primary\"\n (click)=\"changeAllElementsExpansionStatus(true)\"\n [matTooltip]=\"textWords?.tooltipAllOpen || ''\"\n >\n <mat-icon class=\"layer-background\">layers</mat-icon>\n <mat-icon class=\"layer-icon\">add</mat-icon>\n </button>\n <button\n class=\"control-icon\"\n mat-icon-button\n color=\"primary\"\n (click)=\"changeAllElementsExpansionStatus(false)\"\n [matTooltip]=\"textWords?.tooltipAllClose || ''\"\n >\n <mat-icon class=\"layer-background\">layers</mat-icon>\n <mat-icon class=\"layer-icon\">remove</mat-icon>\n </button>\n </ng-container>\n <ng-container *ngIf=\"isSelectionMode\">\n <button\n mat-raised-button\n (click)=\"selectOrDeselectAll(true)\"\n [matTooltip]=\"textWords?.tooltipAllAdd || ''\"\n class=\"control-button\"\n >\n <mat-icon>add</mat-icon>\n <span>{{ textWords?.textAll }}</span>\n </button>\n <button\n mat-raised-button\n (click)=\"selectOrDeselectAll(false)\"\n [matTooltip]=\"textWords?.tooltipAllRemove || ''\"\n class=\"control-button\"\n >\n <mat-icon>remove</mat-icon>\n <span>{{ textWords?.textAll }}</span>\n </button>\n </ng-container>\n </div>\n <div\n [style.height]=\"'calc(100% - ' + control.offsetHeight + 'px)'\"\n class=\"ava-tree-wrapper\"\n #avaTreeWrapper\n >\n <ng-container *ngIf=\"flatElements?.length; else nothing\">\n <ng-container *ngIf=\"filteredElementList?.length; else nothingFiltered\">\n <ava-tree-structure\n *ngIf=\"modeView === listModeViewType.Tree && !avaTreeFilterInput.value\"\n [serviceSpecification]=\"serviceSpecification\"\n [indent]=\"indent\"\n [expansionState]=\"expansionState\"\n [isSelectionMode]=\"isSelectionMode\"\n [selectedColor]=\"selectedColor\"\n [allowDblClick]=\"allowDblClick\"\n >\n </ava-tree-structure>\n <ava-list-structure\n *ngIf=\"modeView === listModeViewType.List || (modeView === listModeViewType.Tree && avaTreeFilterInput.value)\"\n [filteredElementList]=\"filteredElementList\"\n [isSelectionMode]=\"isSelectionMode\"\n [selectedColor]=\"selectedColor\"\n [allowDblClick]=\"allowDblClick\"\n >\n </ava-list-structure>\n <ava-table-structure\n *ngIf=\"modeView === listModeViewType.Table\"\n [filteredElementList]=\"filteredElementList\"\n [isSelectionMode]=\"isSelectionMode\"\n [addTableColumns]=\"addTableColumns\"\n [selectedColor]=\"selectedColor\"\n [allowDblClick]=\"allowDblClick\"\n >\n </ava-table-structure>\n </ng-container>\n </ng-container>\n </div>\n</div>\n<ng-template #nothing>\n {{ textWords?.textNothing }}\n</ng-template>\n<ng-template #nothingFiltered>\n {{ textWords?.textNothingFiltered }}\n</ng-template>\n", styles: [".main-wrapper{max-height:100%;height:100%;overflow-y:auto;overflow-x:hidden}.control{display:flex;align-items:center;gap:5px;padding:4px}.control-filter{flex-grow:1}.control-icon{width:36px;height:36px;padding:0}.control-button{padding:0 5px}.ava-tree-wrapper{overflow-y:auto;overflow-x:hidden}::ng-deep .control .mat-mdc-form-field-subscript-wrapper{display:none}::ng-deep .control .control-filter .mat-mdc-form-field-infix{min-height:auto;padding-top:10px;padding-bottom:2px}::ng-deep .control .control-filter .mat-mdc-floating-label{top:18px}::ng-deep .control .control-filter .mdc-text-field{padding:0 6px}.layer-background{font-size:36px;width:36px;height:36px}.layer-icon{width:36px;height:36px;position:absolute;inset:1px 0 0;color:#fff}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i8.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i9.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i9.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i11.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i11.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: i12.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: TreeStructureComponent, selector: "ava-tree-structure", inputs: ["serviceSpecification", "indent", "expansionState", "isSelectionMode", "selectedColor", "allowDblClick"] }, { kind: "component", type: ListStructureComponent, selector: "ava-list-structure", inputs: ["filteredElementList", "isSelectionMode", "selectedColor", "allowDblClick"] }, { kind: "component", type: TableStructureComponent, selector: "ava-table-structure", inputs: ["filteredElementList", "isSelectionMode", "addTableColumns", "selectedColor", "allowDblClick"] }] }); }
1424
+ }
1425
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: AvaTreeComponent, decorators: [{
1426
+ type: Component,
1427
+ args: [{ selector: 'ava-tree', providers: [FlatElementsService, SelectElementService, TreeNodeSelectionService, ExpandParentGroupService, KeyboardOperationService], template: "<div\n class=\"main-wrapper\"\n #avaMainWrapper\n>\n <div\n class=\"control\"\n #control\n >\n <mat-form-field class=\"control-filter\">\n <mat-label>{{ textWords?.textSearch }}</mat-label>\n <input\n matInput\n [ngModel]=\"filterInput\"\n (ngModelChange)=\"onFilter($event)\"\n #avaTreeFilterInput\n />\n </mat-form-field>\n <ng-container *ngIf=\"modeView === listModeViewType.Tree\">\n <button\n class=\"control-icon\"\n mat-icon-button\n color=\"primary\"\n (click)=\"changeAllElementsExpansionStatus(true)\"\n [matTooltip]=\"textWords?.tooltipAllOpen || ''\"\n >\n <mat-icon class=\"layer-background\">layers</mat-icon>\n <mat-icon class=\"layer-icon\">add</mat-icon>\n </button>\n <button\n class=\"control-icon\"\n mat-icon-button\n color=\"primary\"\n (click)=\"changeAllElementsExpansionStatus(false)\"\n [matTooltip]=\"textWords?.tooltipAllClose || ''\"\n >\n <mat-icon class=\"layer-background\">layers</mat-icon>\n <mat-icon class=\"layer-icon\">remove</mat-icon>\n </button>\n </ng-container>\n <ng-container *ngIf=\"isSelectionMode\">\n <button\n mat-raised-button\n (click)=\"selectOrDeselectAll(true)\"\n [matTooltip]=\"textWords?.tooltipAllAdd || ''\"\n class=\"control-button\"\n >\n <mat-icon>add</mat-icon>\n <span>{{ textWords?.textAll }}</span>\n </button>\n <button\n mat-raised-button\n (click)=\"selectOrDeselectAll(false)\"\n [matTooltip]=\"textWords?.tooltipAllRemove || ''\"\n class=\"control-button\"\n >\n <mat-icon>remove</mat-icon>\n <span>{{ textWords?.textAll }}</span>\n </button>\n </ng-container>\n </div>\n <div\n [style.height]=\"'calc(100% - ' + control.offsetHeight + 'px)'\"\n class=\"ava-tree-wrapper\"\n #avaTreeWrapper\n >\n <ng-container *ngIf=\"flatElements?.length; else nothing\">\n <ng-container *ngIf=\"filteredElementList?.length; else nothingFiltered\">\n <ava-tree-structure\n *ngIf=\"modeView === listModeViewType.Tree && !avaTreeFilterInput.value\"\n [serviceSpecification]=\"serviceSpecification\"\n [indent]=\"indent\"\n [expansionState]=\"expansionState\"\n [isSelectionMode]=\"isSelectionMode\"\n [selectedColor]=\"selectedColor\"\n [allowDblClick]=\"allowDblClick\"\n >\n </ava-tree-structure>\n <ava-list-structure\n *ngIf=\"modeView === listModeViewType.List || (modeView === listModeViewType.Tree && avaTreeFilterInput.value)\"\n [filteredElementList]=\"filteredElementList\"\n [isSelectionMode]=\"isSelectionMode\"\n [selectedColor]=\"selectedColor\"\n [allowDblClick]=\"allowDblClick\"\n >\n </ava-list-structure>\n <ava-table-structure\n *ngIf=\"modeView === listModeViewType.Table\"\n [filteredElementList]=\"filteredElementList\"\n [isSelectionMode]=\"isSelectionMode\"\n [addTableColumns]=\"addTableColumns\"\n [selectedColor]=\"selectedColor\"\n [allowDblClick]=\"allowDblClick\"\n >\n </ava-table-structure>\n </ng-container>\n </ng-container>\n </div>\n</div>\n<ng-template #nothing>\n {{ textWords?.textNothing }}\n</ng-template>\n<ng-template #nothingFiltered>\n {{ textWords?.textNothingFiltered }}\n</ng-template>\n", styles: [".main-wrapper{max-height:100%;height:100%;overflow-y:auto;overflow-x:hidden}.control{display:flex;align-items:center;gap:5px;padding:4px}.control-filter{flex-grow:1}.control-icon{width:36px;height:36px;padding:0}.control-button{padding:0 5px}.ava-tree-wrapper{overflow-y:auto;overflow-x:hidden}::ng-deep .control .mat-mdc-form-field-subscript-wrapper{display:none}::ng-deep .control .control-filter .mat-mdc-form-field-infix{min-height:auto;padding-top:10px;padding-bottom:2px}::ng-deep .control .control-filter .mat-mdc-floating-label{top:18px}::ng-deep .control .control-filter .mdc-text-field{padding:0 6px}.layer-background{font-size:36px;width:36px;height:36px}.layer-icon{width:36px;height:36px;position:absolute;inset:1px 0 0;color:#fff}\n"] }]
1428
+ }], ctorParameters: () => [{ type: FlatElementsService, decorators: [{
1429
+ type: Self
1430
+ }] }, { type: SelectElementService, decorators: [{
1431
+ type: Self
1432
+ }] }, { type: TreeNodeSelectionService, decorators: [{
1433
+ type: Self
1434
+ }] }, { type: ExpandParentGroupService, decorators: [{
1435
+ type: Self
1436
+ }] }, { type: KeyboardOperationService, decorators: [{
1437
+ type: Self
1438
+ }] }, { type: i0.NgZone }], propDecorators: { project: [{
1439
+ type: Input
1440
+ }], expansionState: [{
1441
+ type: Input
1442
+ }], selectedNodeId: [{
1443
+ type: Input
1444
+ }], indent: [{
1445
+ type: Input
1446
+ }], selectedColor: [{
1447
+ type: Input
1448
+ }], modeView: [{
1449
+ type: Input
1450
+ }], allowDblClick: [{
1451
+ type: Input
1452
+ }], isSelectionMode: [{
1453
+ type: Input
1454
+ }], initiallySelectedElements: [{
1455
+ type: Input
1456
+ }], textWords: [{
1457
+ type: Input
1458
+ }], mouseAwareKeyboardControl: [{
1459
+ type: Input
1460
+ }], customKeyboardOperationConfig: [{
1461
+ type: Input
1462
+ }], listFilterFunc: [{
1463
+ type: Input
1464
+ }], addTableColumns: [{
1465
+ type: Input
1466
+ }], functionView: [{
1467
+ type: Input
1468
+ }], selectClick: [{
1469
+ type: Output
1470
+ }], selectDblClick: [{
1471
+ type: Output
1472
+ }], contextMenuEvent: [{
1473
+ type: Output
1474
+ }], selectedElementsChanged: [{
1475
+ type: Output
1476
+ }], avaTreeWrapper: [{
1477
+ type: ViewChild,
1478
+ args: ['avaTreeWrapper']
1479
+ }], avaMainWrapper: [{
1480
+ type: ViewChild,
1481
+ args: ['avaMainWrapper']
1482
+ }], avaTreeFilterInput: [{
1483
+ type: ViewChild,
1484
+ args: ['avaTreeFilterInput']
1485
+ }] } });
1486
+
1487
+ class AngularAvaModule {
1488
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: AngularAvaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1489
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.1", ngImport: i0, type: AngularAvaModule, declarations: [TreeStructureComponent,
1490
+ TreeNodeComponent,
1491
+ AvaTreeComponent,
1492
+ TreeItemComponent,
1493
+ ListStructureComponent,
1494
+ TableStructureComponent,
1495
+ ElementIconNamePipe,
1496
+ ElementTextPipe,
1497
+ GroupChildElementsPipe,
1498
+ ElementItemNumberPipe,
1499
+ SaveChangingViewDirective], imports: [CommonModule,
1500
+ MatIconModule,
1501
+ MatRippleModule,
1502
+ MatInputModule,
1503
+ MatFormFieldModule,
1504
+ ReactiveFormsModule,
1505
+ FormsModule,
1506
+ MatButtonModule,
1507
+ MatCheckboxModule,
1508
+ MatTableModule,
1509
+ MatTooltipModule], exports: [AvaTreeComponent] }); }
1510
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: AngularAvaModule, imports: [CommonModule,
1511
+ MatIconModule,
1512
+ MatRippleModule,
1513
+ MatInputModule,
1514
+ MatFormFieldModule,
1515
+ ReactiveFormsModule,
1516
+ FormsModule,
1517
+ MatButtonModule,
1518
+ MatCheckboxModule,
1519
+ MatTableModule,
1520
+ MatTooltipModule] }); }
1521
+ }
1522
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: AngularAvaModule, decorators: [{
1523
+ type: NgModule,
1524
+ args: [{
1525
+ declarations: [
1526
+ TreeStructureComponent,
1527
+ TreeNodeComponent,
1528
+ AvaTreeComponent,
1529
+ TreeItemComponent,
1530
+ ListStructureComponent,
1531
+ TableStructureComponent,
1532
+ ElementIconNamePipe,
1533
+ ElementTextPipe,
1534
+ GroupChildElementsPipe,
1535
+ ElementItemNumberPipe,
1536
+ SaveChangingViewDirective
1537
+ ],
1538
+ imports: [
1539
+ CommonModule,
1540
+ MatIconModule,
1541
+ MatRippleModule,
1542
+ MatInputModule,
1543
+ MatFormFieldModule,
1544
+ ReactiveFormsModule,
1545
+ FormsModule,
1546
+ MatButtonModule,
1547
+ MatCheckboxModule,
1548
+ MatTableModule,
1549
+ MatTooltipModule
1550
+ ],
1551
+ exports: [AvaTreeComponent]
1552
+ }]
1553
+ }] });
1554
+
1555
+ // This file is automatically generated as part of the build process
1556
+ const version = {
1557
+ version: "0.1.1-beta0093",
1558
+ commitInfo: "Branch.develop.Sha.37ddc57b20301a1e73e50cae70f4b7295d68489c",
1559
+ commitDate: "2024-02-17",
1560
+ commitHash: "37ddc57b20301a1e73e50cae70f4b7295d68489c",
1561
+ informationalVersion: "0.1.1-beta.93+Branch.develop.Sha.37ddc57b20301a1e73e50cae70f4b7295d68489c",
1562
+ buildDateUtc: new Date(Date.UTC(2024, 1, 17, 21, 47, 30))
1563
+ };
1564
+
1565
+ /*
1566
+ * Public API Surface of angular-ava
1567
+ */
1568
+
1569
+ /**
1570
+ * Generated bundle index. Do not edit.
1571
+ */
1572
+
1573
+ export { AngularAvaModule, AvaTreeComponent, ExchangePhaseDto, ItemNumberSchemaTierTypeDto, ItemNumberTypeDto, ModeViewType, OriginDto, PriceRoundingModeDto, PriceTypeDto, version };
1574
+ //# sourceMappingURL=dangl-angular-ava.mjs.map