@metadev/daga-angular 3.1.0 → 3.1.2

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.
@@ -1,13 +1,13 @@
1
- import { Side, DiagramCanvas, DiagramActions, layouts, getLocationsOfNodes, ApplyLayoutAction, Events, setCursorStyle, CursorStyle, DragEvents, filterByOnlyDescendants, AddNodeAction, generalClosedPath, DIAGRAM_FIELD_DEFAULTS, getLeftMargin, getTopMargin, Type, Property, isObject, equals, Keys, Corner, DagaImporter, DagaExporter } from '@metadev/daga';
1
+ import { Side, DiagramCanvas, DiagramActions, Corner, layouts, getLocationsOfNodes, ApplyLayoutAction, Events, setCursorStyle, CursorStyle, DragEvents, filterByOnlyDescendants, AddNodeAction, generalClosedPath, DIAGRAM_FIELD_DEFAULTS, getLeftMargin, getTopMargin, Type, Property, isObject, equals, Keys, DagaImporter, DagaExporter } from '@metadev/daga';
2
2
  export { ACTION_STACK_SIZE, ActionStack, AddConnectionAction, AddNodeAction, AdjacencyLayout, ApplyLayoutAction, BreadthAdjacencyLayout, BreadthLayout, ClosedShape, CollabClient, Corner, DagaExporter, DagaImporter, DiagramActionMethod, DiagramActions, DiagramCanvas, DiagramConnection, DiagramConnectionSet, DiagramConnectionType, DiagramDecorator, DiagramDecoratorSet, DiagramDoubleClickEvent, DiagramElement, DiagramElementSet, DiagramEntitySet, DiagramEvent, DiagramEvents, DiagramField, DiagramFieldSet, DiagramModel, DiagramNode, DiagramNodeSet, DiagramNodeType, DiagramObject, DiagramObjectSet, DiagramPort, DiagramPortSet, DiagramSecondaryClickEvent, DiagramSection, DiagramSectionSet, EditFieldAction, ForceLayout, HorizontalAlign, HorizontalLayout, LineShape, LineStyle, MoveAction, PasteAction, PriorityLayout, Property, PropertySet, RemoveAction, SetGeometryAction, SetParentAction, Side, TreeLayout, Type, UpdateValuesAction, ValueSet, VerticalAlign, VerticalLayout, getLocationsOfNodes, layouts } from '@metadev/daga';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import * as i0 from '@angular/core';
6
- import { ElementRef, Component, Input, Injectable, ViewChild, EventEmitter, Output, NgModule } from '@angular/core';
6
+ import { ElementRef, Component, Input, Injectable, ChangeDetectionStrategy, ViewChild, EventEmitter, Output, NgModule } from '@angular/core';
7
7
  import * as d3 from 'd3';
8
8
  import * as i2 from '@angular/forms';
9
9
  import { FormsModule } from '@angular/forms';
10
- import { merge, delay, map } from 'rxjs';
10
+ import { ReplaySubject, merge, delay, map, skip } from 'rxjs';
11
11
 
12
12
  /**
13
13
  * Button used to collapse components that implement it.
@@ -121,27 +121,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
121
121
  * @public
122
122
  */
123
123
  class CanvasProviderService {
124
+ constructor() {
125
+ this.canvasSubject$ = new ReplaySubject();
126
+ /**
127
+ * Subject used to track when the canvas has been updated.
128
+ * @public
129
+ */
130
+ this.canvas$ = this.canvasSubject$.asObservable();
131
+ this.viewInitializedSubject$ = new ReplaySubject();
132
+ /**
133
+ * Subject used to track when the view of the canvas has been updated after updating the canvas.
134
+ * @public
135
+ */
136
+ this.viewInitialized$ = this.viewInitializedSubject$.asObservable();
137
+ }
124
138
  /**
125
- * Initialize the diagram canvas object of this context.
139
+ * Initialize the diagram canvas object of this context using the given diagram configuration.
126
140
  * @private
127
141
  * @param parentComponent A diagram editor.
128
142
  * @param config A diagram configuration.
129
143
  */
130
144
  initCanvas(parentComponent, config) {
131
145
  this._canvas = new DiagramCanvas(parentComponent, config);
146
+ this.canvasSubject$.next(this._canvas);
132
147
  }
133
148
  /**
134
- * Attach the canvas of this context to an HTML Element to render it there.
149
+ * Attach the canvas of this context to an HTML element to render it there.
135
150
  * @private
136
- * @param appendTo An HTML Element.
151
+ * @param appendTo An HTML element.
137
152
  */
138
153
  initCanvasView(appendTo) {
139
154
  this._canvas.initView(appendTo);
155
+ this.viewInitializedSubject$.next(this._canvas);
140
156
  }
141
157
  /**
142
- * Get the diagram canvas of this context. Should only be called after the view of the {@link DiagramComponent} context has been initialized.
158
+ * Get the current canvas of this context.
143
159
  * @public
144
- * @returns A diagram canvas.
160
+ * @returns A canvas.
145
161
  */
146
162
  getCanvas() {
147
163
  return this._canvas;
@@ -153,6 +169,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
153
169
  type: Injectable
154
170
  }] });
155
171
 
172
+ /**
173
+ * A provider for the {@link DiagramConfig} associated with a {@link DiagramComponent} context.
174
+ * @public
175
+ */
176
+ class DagaConfigurationService {
177
+ constructor() {
178
+ this.configSubject$ = new ReplaySubject();
179
+ /**
180
+ * Subject used to track when the diagram configuration has been updated.
181
+ * @public
182
+ */
183
+ this.config$ = this.configSubject$.asObservable();
184
+ }
185
+ /**
186
+ * Set the diagram configuration of this context.
187
+ * @private
188
+ * @param config A diagram configuration.
189
+ */
190
+ init(config) {
191
+ this._config = config;
192
+ this.configSubject$.next(config);
193
+ }
194
+ /**
195
+ * Get the current diagram configuration of this context.
196
+ * @public
197
+ * @returns A diagram configuration.
198
+ */
199
+ getConfig() {
200
+ return this._config;
201
+ }
202
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DagaConfigurationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
203
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DagaConfigurationService }); }
204
+ }
205
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DagaConfigurationService, decorators: [{
206
+ type: Injectable
207
+ }] });
208
+
156
209
  /**
157
210
  * Buttons used to trigger diagram functionalities by the user.
158
211
  * @private
@@ -161,8 +214,9 @@ class DiagramButtonsComponent {
161
214
  get canvas() {
162
215
  return this.canvasProvider.getCanvas();
163
216
  }
164
- constructor(canvasProvider) {
217
+ constructor(canvasProvider, configService) {
165
218
  this.canvasProvider = canvasProvider;
219
+ this.configService = configService;
166
220
  this.enableAction = false;
167
221
  this.enableFilter = false;
168
222
  this.enableLayout = false;
@@ -173,7 +227,28 @@ class DiagramButtonsComponent {
173
227
  this.animationOngoing = false;
174
228
  this.DiagramActions = DiagramActions;
175
229
  }
230
+ ngOnInit() {
231
+ this.sub = this.configService.config$.subscribe((c) => {
232
+ this.init(c);
233
+ });
234
+ }
176
235
  ngAfterViewInit() {
236
+ this.recalculateSizeOfButtons();
237
+ }
238
+ ngOnDestroy() {
239
+ this.sub?.unsubscribe();
240
+ }
241
+ init(config) {
242
+ this.filterOn = false;
243
+ this.collapsed = true;
244
+ this.animationOngoing = false;
245
+ this.location = config.components?.buttons?.location || Corner.BottomRight;
246
+ this.direction = config.components?.buttons?.direction || Side.Top;
247
+ this.enableAction = config.components?.buttons?.enableAction === true;
248
+ this.enableFilter = config.components?.buttons?.enableFilter === true;
249
+ this.enableLayout = config.components?.buttons?.enableLayout === true;
250
+ this.enableSelection = config.components?.buttons?.enableSelection === true;
251
+ this.enableZoom = config.components?.buttons?.enableZoom !== false;
177
252
  switch (this.direction) {
178
253
  case Side.Bottom:
179
254
  this.sizeAttribute = 'height';
@@ -200,16 +275,25 @@ class DiagramButtonsComponent {
200
275
  this.marginSide = 'right';
201
276
  break;
202
277
  }
203
- const numberOfCollapsableButtons = d3
204
- .select(this.collapsableButtons.nativeElement)
205
- .selectChildren()
206
- .size();
207
- this.collapsableButtonsSize = `${4 * numberOfCollapsableButtons}rem`;
208
- d3.select(this.collapsableButtons.nativeElement)
209
- .style(`margin-${this.marginSide}`, '-1rem')
210
- .style(this.sizeAttribute, '0rem')
211
- .style('transform', `${this.transformFunction}(0)`)
212
- .style('transform-origin', this.transformOrigin);
278
+ this.recalculateSizeOfButtons();
279
+ }
280
+ recalculateSizeOfButtons() {
281
+ if (this.collapsableButtons) {
282
+ const numberOfCollapsableButtons = (this.enableZoom &&
283
+ this.canvas.canUserPerformAction(DiagramActions.Zoom)
284
+ ? 1
285
+ : 0) +
286
+ (this.enableAction ? 2 : 0) +
287
+ (this.enableSelection ? 5 : 0) +
288
+ (this.enableLayout ? 1 : 0) +
289
+ (this.enableFilter ? 1 : 0);
290
+ this.collapsableButtonsSize = `${4 * numberOfCollapsableButtons}rem`;
291
+ d3.select(this.collapsableButtons.nativeElement)
292
+ .style(`margin-${this.marginSide}`, '-1rem')
293
+ .style(this.sizeAttribute, '0rem')
294
+ .style('transform', `${this.transformFunction}(0)`)
295
+ .style('transform-origin', this.transformOrigin);
296
+ }
213
297
  }
214
298
  // Collapse functions
215
299
  async toggleCollapse() {
@@ -289,13 +373,13 @@ class DiagramButtonsComponent {
289
373
  startMultipleSelection() {
290
374
  this.canvas.multipleSelectionOn = true;
291
375
  }
292
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DiagramButtonsComponent, deps: [{ token: CanvasProviderService }], target: i0.ɵɵFactoryTarget.Component }); }
293
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: DiagramButtonsComponent, isStandalone: true, selector: "daga-diagram-buttons", inputs: { location: "location", direction: "direction", enableAction: "enableAction", enableFilter: "enableFilter", enableLayout: "enableLayout", enableSelection: "enableSelection", enableZoom: "enableZoom" }, viewQueries: [{ propertyName: "collapsableButtons", first: true, predicate: ["collapsableButtons"], descendants: true }], ngImport: i0, template: "<div class=\"daga-diagram-buttons daga-{{ location }} daga-{{ direction }}\">\r\n <button\r\n *ngIf=\"enableZoom && canvas.canUserPerformAction(DiagramActions.Zoom)\"\r\n class=\"daga-zoom-in\"\r\n (click)=\"zoomIn()\"\r\n >\r\n <span class=\"daga-tooltip\">Zoom in</span>\r\n </button>\r\n <button\r\n *ngIf=\"enableZoom && canvas.canUserPerformAction(DiagramActions.Zoom)\"\r\n class=\"daga-zoom-out\"\r\n (click)=\"zoomOut()\"\r\n >\r\n <span class=\"daga-tooltip\">Zoom out</span>\r\n </button>\r\n <div #collapsableButtons class=\"daga-collapsable-buttons daga-collapsed\">\r\n <button\r\n *ngIf=\"enableZoom && canvas.canUserPerformAction(DiagramActions.Zoom)\"\r\n class=\"daga-center\"\r\n (click)=\"center()\"\r\n >\r\n <span class=\"daga-tooltip\">Fit diagram to screen</span>\r\n </button>\r\n <button *ngIf=\"enableAction\" class=\"daga-undo\" (click)=\"undo()\">\r\n <span class=\"daga-tooltip\">Undo</span>\r\n </button>\r\n <button *ngIf=\"enableAction\" class=\"daga-redo\" (click)=\"redo()\">\r\n <span class=\"daga-tooltip\">Redo</span>\r\n </button>\r\n <button *ngIf=\"enableSelection\" class=\"daga-copy\" (click)=\"copySelection()\">\r\n <span class=\"daga-tooltip\">Copy</span>\r\n </button>\r\n <button *ngIf=\"enableSelection\" class=\"daga-cut\" (click)=\"cutSelection()\">\r\n <span class=\"daga-tooltip\">Cut</span>\r\n </button>\r\n <button\r\n *ngIf=\"enableSelection\"\r\n class=\"daga-multiple-selection\"\r\n [class]=\"canvas.multipleSelectionOn ? 'daga-on' : 'daga-off'\"\r\n (click)=\"startMultipleSelection()\"\r\n >\r\n <span class=\"daga-tooltip\">Multiple selection</span>\r\n </button>\r\n <button\r\n *ngIf=\"enableSelection\"\r\n class=\"daga-paste\"\r\n (click)=\"pasteSelection()\"\r\n >\r\n <span class=\"daga-tooltip\">Paste</span>\r\n </button>\r\n <button\r\n *ngIf=\"enableSelection\"\r\n class=\"daga-delete\"\r\n (click)=\"deleteSelection()\"\r\n >\r\n <span class=\"daga-tooltip\">Delete</span>\r\n </button>\r\n <button\r\n *ngIf=\"enableLayout && canvas.layoutFormat\"\r\n class=\"daga-layout\"\r\n (click)=\"layout()\"\r\n >\r\n <span class=\"daga-tooltip\">Apply layout</span>\r\n </button>\r\n <button\r\n *ngIf=\"enableFilter\"\r\n class=\"daga-filter\"\r\n [class]=\"filterOn ? 'daga-on' : 'daga-off'\"\r\n (click)=\"filter()\"\r\n >\r\n <span class=\"daga-tooltip\">Apply filter</span>\r\n </button>\r\n </div>\r\n <button class=\"daga-more-options\" (click)=\"toggleCollapse()\">\r\n <span *ngIf=\"!collapsed\" class=\"daga-tooltip\">Less options</span>\r\n <span *ngIf=\"collapsed\" class=\"daga-tooltip\">More options</span>\r\n </button>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
376
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DiagramButtonsComponent, deps: [{ token: CanvasProviderService }, { token: DagaConfigurationService }], target: i0.ɵɵFactoryTarget.Component }); }
377
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: DiagramButtonsComponent, isStandalone: true, selector: "daga-diagram-buttons", inputs: { location: "location", direction: "direction", enableAction: "enableAction", enableFilter: "enableFilter", enableLayout: "enableLayout", enableSelection: "enableSelection", enableZoom: "enableZoom" }, viewQueries: [{ propertyName: "collapsableButtons", first: true, predicate: ["collapsableButtons"], descendants: true }], ngImport: i0, template: "<div class=\"daga-diagram-buttons daga-{{ location }} daga-{{ direction }}\">\r\n <button\r\n *ngIf=\"enableZoom && canvas.canUserPerformAction(DiagramActions.Zoom)\"\r\n class=\"daga-zoom-in\"\r\n (click)=\"zoomIn()\"\r\n >\r\n <span class=\"daga-tooltip\">Zoom in</span>\r\n </button>\r\n <button\r\n *ngIf=\"enableZoom && canvas.canUserPerformAction(DiagramActions.Zoom)\"\r\n class=\"daga-zoom-out\"\r\n (click)=\"zoomOut()\"\r\n >\r\n <span class=\"daga-tooltip\">Zoom out</span>\r\n </button>\r\n <div #collapsableButtons class=\"daga-collapsable-buttons daga-collapsed\">\r\n <button\r\n *ngIf=\"enableZoom && canvas.canUserPerformAction(DiagramActions.Zoom)\"\r\n class=\"daga-center\"\r\n (click)=\"center()\"\r\n >\r\n <span class=\"daga-tooltip\">Fit diagram to screen</span>\r\n </button>\r\n <button *ngIf=\"enableAction\" class=\"daga-undo\" (click)=\"undo()\">\r\n <span class=\"daga-tooltip\">Undo</span>\r\n </button>\r\n <button *ngIf=\"enableAction\" class=\"daga-redo\" (click)=\"redo()\">\r\n <span class=\"daga-tooltip\">Redo</span>\r\n </button>\r\n <button *ngIf=\"enableSelection\" class=\"daga-copy\" (click)=\"copySelection()\">\r\n <span class=\"daga-tooltip\">Copy</span>\r\n </button>\r\n <button *ngIf=\"enableSelection\" class=\"daga-cut\" (click)=\"cutSelection()\">\r\n <span class=\"daga-tooltip\">Cut</span>\r\n </button>\r\n <button\r\n *ngIf=\"enableSelection\"\r\n class=\"daga-multiple-selection\"\r\n [class]=\"canvas.multipleSelectionOn ? 'daga-on' : 'daga-off'\"\r\n (click)=\"startMultipleSelection()\"\r\n >\r\n <span class=\"daga-tooltip\">Multiple selection</span>\r\n </button>\r\n <button\r\n *ngIf=\"enableSelection\"\r\n class=\"daga-paste\"\r\n (click)=\"pasteSelection()\"\r\n >\r\n <span class=\"daga-tooltip\">Paste</span>\r\n </button>\r\n <button\r\n *ngIf=\"enableSelection\"\r\n class=\"daga-delete\"\r\n (click)=\"deleteSelection()\"\r\n >\r\n <span class=\"daga-tooltip\">Delete</span>\r\n </button>\r\n <button *ngIf=\"enableLayout\" class=\"daga-layout\" (click)=\"layout()\">\r\n <span class=\"daga-tooltip\">Apply layout</span>\r\n </button>\r\n <button\r\n *ngIf=\"enableFilter\"\r\n class=\"daga-filter\"\r\n [class]=\"filterOn ? 'daga-on' : 'daga-off'\"\r\n (click)=\"filter()\"\r\n >\r\n <span class=\"daga-tooltip\">Apply filter</span>\r\n </button>\r\n </div>\r\n <button class=\"daga-more-options\" (click)=\"toggleCollapse()\">\r\n <span *ngIf=\"!collapsed\" class=\"daga-tooltip\">Less options</span>\r\n <span *ngIf=\"collapsed\" class=\"daga-tooltip\">More options</span>\r\n </button>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
294
378
  }
295
379
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DiagramButtonsComponent, decorators: [{
296
380
  type: Component,
297
- args: [{ selector: 'daga-diagram-buttons', imports: [CommonModule], template: "<div class=\"daga-diagram-buttons daga-{{ location }} daga-{{ direction }}\">\r\n <button\r\n *ngIf=\"enableZoom && canvas.canUserPerformAction(DiagramActions.Zoom)\"\r\n class=\"daga-zoom-in\"\r\n (click)=\"zoomIn()\"\r\n >\r\n <span class=\"daga-tooltip\">Zoom in</span>\r\n </button>\r\n <button\r\n *ngIf=\"enableZoom && canvas.canUserPerformAction(DiagramActions.Zoom)\"\r\n class=\"daga-zoom-out\"\r\n (click)=\"zoomOut()\"\r\n >\r\n <span class=\"daga-tooltip\">Zoom out</span>\r\n </button>\r\n <div #collapsableButtons class=\"daga-collapsable-buttons daga-collapsed\">\r\n <button\r\n *ngIf=\"enableZoom && canvas.canUserPerformAction(DiagramActions.Zoom)\"\r\n class=\"daga-center\"\r\n (click)=\"center()\"\r\n >\r\n <span class=\"daga-tooltip\">Fit diagram to screen</span>\r\n </button>\r\n <button *ngIf=\"enableAction\" class=\"daga-undo\" (click)=\"undo()\">\r\n <span class=\"daga-tooltip\">Undo</span>\r\n </button>\r\n <button *ngIf=\"enableAction\" class=\"daga-redo\" (click)=\"redo()\">\r\n <span class=\"daga-tooltip\">Redo</span>\r\n </button>\r\n <button *ngIf=\"enableSelection\" class=\"daga-copy\" (click)=\"copySelection()\">\r\n <span class=\"daga-tooltip\">Copy</span>\r\n </button>\r\n <button *ngIf=\"enableSelection\" class=\"daga-cut\" (click)=\"cutSelection()\">\r\n <span class=\"daga-tooltip\">Cut</span>\r\n </button>\r\n <button\r\n *ngIf=\"enableSelection\"\r\n class=\"daga-multiple-selection\"\r\n [class]=\"canvas.multipleSelectionOn ? 'daga-on' : 'daga-off'\"\r\n (click)=\"startMultipleSelection()\"\r\n >\r\n <span class=\"daga-tooltip\">Multiple selection</span>\r\n </button>\r\n <button\r\n *ngIf=\"enableSelection\"\r\n class=\"daga-paste\"\r\n (click)=\"pasteSelection()\"\r\n >\r\n <span class=\"daga-tooltip\">Paste</span>\r\n </button>\r\n <button\r\n *ngIf=\"enableSelection\"\r\n class=\"daga-delete\"\r\n (click)=\"deleteSelection()\"\r\n >\r\n <span class=\"daga-tooltip\">Delete</span>\r\n </button>\r\n <button\r\n *ngIf=\"enableLayout && canvas.layoutFormat\"\r\n class=\"daga-layout\"\r\n (click)=\"layout()\"\r\n >\r\n <span class=\"daga-tooltip\">Apply layout</span>\r\n </button>\r\n <button\r\n *ngIf=\"enableFilter\"\r\n class=\"daga-filter\"\r\n [class]=\"filterOn ? 'daga-on' : 'daga-off'\"\r\n (click)=\"filter()\"\r\n >\r\n <span class=\"daga-tooltip\">Apply filter</span>\r\n </button>\r\n </div>\r\n <button class=\"daga-more-options\" (click)=\"toggleCollapse()\">\r\n <span *ngIf=\"!collapsed\" class=\"daga-tooltip\">Less options</span>\r\n <span *ngIf=\"collapsed\" class=\"daga-tooltip\">More options</span>\r\n </button>\r\n</div>\r\n" }]
298
- }], ctorParameters: () => [{ type: CanvasProviderService }], propDecorators: { collapsableButtons: [{
381
+ args: [{ selector: 'daga-diagram-buttons', imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"daga-diagram-buttons daga-{{ location }} daga-{{ direction }}\">\r\n <button\r\n *ngIf=\"enableZoom && canvas.canUserPerformAction(DiagramActions.Zoom)\"\r\n class=\"daga-zoom-in\"\r\n (click)=\"zoomIn()\"\r\n >\r\n <span class=\"daga-tooltip\">Zoom in</span>\r\n </button>\r\n <button\r\n *ngIf=\"enableZoom && canvas.canUserPerformAction(DiagramActions.Zoom)\"\r\n class=\"daga-zoom-out\"\r\n (click)=\"zoomOut()\"\r\n >\r\n <span class=\"daga-tooltip\">Zoom out</span>\r\n </button>\r\n <div #collapsableButtons class=\"daga-collapsable-buttons daga-collapsed\">\r\n <button\r\n *ngIf=\"enableZoom && canvas.canUserPerformAction(DiagramActions.Zoom)\"\r\n class=\"daga-center\"\r\n (click)=\"center()\"\r\n >\r\n <span class=\"daga-tooltip\">Fit diagram to screen</span>\r\n </button>\r\n <button *ngIf=\"enableAction\" class=\"daga-undo\" (click)=\"undo()\">\r\n <span class=\"daga-tooltip\">Undo</span>\r\n </button>\r\n <button *ngIf=\"enableAction\" class=\"daga-redo\" (click)=\"redo()\">\r\n <span class=\"daga-tooltip\">Redo</span>\r\n </button>\r\n <button *ngIf=\"enableSelection\" class=\"daga-copy\" (click)=\"copySelection()\">\r\n <span class=\"daga-tooltip\">Copy</span>\r\n </button>\r\n <button *ngIf=\"enableSelection\" class=\"daga-cut\" (click)=\"cutSelection()\">\r\n <span class=\"daga-tooltip\">Cut</span>\r\n </button>\r\n <button\r\n *ngIf=\"enableSelection\"\r\n class=\"daga-multiple-selection\"\r\n [class]=\"canvas.multipleSelectionOn ? 'daga-on' : 'daga-off'\"\r\n (click)=\"startMultipleSelection()\"\r\n >\r\n <span class=\"daga-tooltip\">Multiple selection</span>\r\n </button>\r\n <button\r\n *ngIf=\"enableSelection\"\r\n class=\"daga-paste\"\r\n (click)=\"pasteSelection()\"\r\n >\r\n <span class=\"daga-tooltip\">Paste</span>\r\n </button>\r\n <button\r\n *ngIf=\"enableSelection\"\r\n class=\"daga-delete\"\r\n (click)=\"deleteSelection()\"\r\n >\r\n <span class=\"daga-tooltip\">Delete</span>\r\n </button>\r\n <button *ngIf=\"enableLayout\" class=\"daga-layout\" (click)=\"layout()\">\r\n <span class=\"daga-tooltip\">Apply layout</span>\r\n </button>\r\n <button\r\n *ngIf=\"enableFilter\"\r\n class=\"daga-filter\"\r\n [class]=\"filterOn ? 'daga-on' : 'daga-off'\"\r\n (click)=\"filter()\"\r\n >\r\n <span class=\"daga-tooltip\">Apply filter</span>\r\n </button>\r\n </div>\r\n <button class=\"daga-more-options\" (click)=\"toggleCollapse()\">\r\n <span *ngIf=\"!collapsed\" class=\"daga-tooltip\">Less options</span>\r\n <span *ngIf=\"collapsed\" class=\"daga-tooltip\">More options</span>\r\n </button>\r\n</div>\r\n" }]
382
+ }], ctorParameters: () => [{ type: CanvasProviderService }, { type: DagaConfigurationService }], propDecorators: { collapsableButtons: [{
299
383
  type: ViewChild,
300
384
  args: ['collapsableButtons']
301
385
  }], location: [{
@@ -323,29 +407,42 @@ class ErrorsComponent {
323
407
  get canvas() {
324
408
  return this.canvasProvider.getCanvas();
325
409
  }
326
- constructor(canvasProvider) {
410
+ constructor(canvasProvider, cdf) {
327
411
  this.canvasProvider = canvasProvider;
412
+ this.cdf = cdf;
328
413
  this.errors = [];
329
414
  this.Side = Side;
330
415
  }
331
416
  ngAfterViewInit() {
332
- merge(this.canvas.validatorChange$, this.canvas.diagramChange$)
333
- .pipe(
334
- // delay to avoid errors of variables changing right after checking
335
- delay(1), map(() => this.validate()))
336
- .subscribe();
417
+ this.canvasSub = this.canvasProvider.canvas$.subscribe((c) => {
418
+ this.updateCanvas(c);
419
+ });
420
+ }
421
+ ngOnDestroy() {
422
+ this.canvasSub?.unsubscribe();
423
+ this.validationSub?.unsubscribe();
337
424
  }
338
425
  selectPanel() {
339
426
  return d3
340
427
  .select(this.errorsContainer.nativeElement)
341
428
  .select('.daga-error-panel');
342
429
  }
430
+ updateCanvas(canvas) {
431
+ this.validationSub?.unsubscribe();
432
+ this.validationSub = merge(canvas.validatorChange$, canvas.diagramChange$)
433
+ .pipe(
434
+ // delay to avoid errors of variables changing right after checking
435
+ delay(1), map(() => this.validate()))
436
+ .subscribe();
437
+ }
343
438
  validate() {
344
439
  this.errors = [];
345
440
  for (const validator of this.canvas.validators) {
346
441
  const newErrors = validator.validate(this.canvas.model);
347
442
  this.errors = [...this.errors, ...newErrors];
348
443
  }
444
+ // need to force detection changes here for some reason...
445
+ this.cdf.detectChanges();
349
446
  }
350
447
  showError(error) {
351
448
  if (error.elementId &&
@@ -375,13 +472,13 @@ class ErrorsComponent {
375
472
  this.canvas.parentComponent?.propertyEditor?.highlightProperty(...error.propertyNames);
376
473
  }
377
474
  }
378
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ErrorsComponent, deps: [{ token: CanvasProviderService }], target: i0.ɵɵFactoryTarget.Component }); }
379
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: ErrorsComponent, isStandalone: true, selector: "daga-errors", viewQueries: [{ propertyName: "errorsContainer", first: true, predicate: ["errors"], descendants: true }], ngImport: i0, template: "<div #errorsContainer class=\"daga-errors\">\r\n <div\r\n *ngIf=\"errors.length === 0\"\r\n class=\"daga-errors-summary daga-no-errors daga-prevent-user-select\"\r\n >\r\n <span>No errors found</span>\r\n </div>\r\n <div\r\n *ngIf=\"errors.length > 0\"\r\n class=\"daga-errors-summary daga-with-errors daga-prevent-user-select\"\r\n >\r\n <span>{{ errors.length }} errors found</span>\r\n <div class=\"daga-collapse-button-container\">\r\n <daga-collapse-button\r\n [collapsableSelector]=\"errorsContainer\"\r\n [collapsableAdditionalSelector]=\"'.daga-error-panel'\"\r\n [direction]=\"Side.Top\"\r\n [rule]=\"'display'\"\r\n [collapsedValue]=\"'none'\"\r\n [visibleValue]=\"'block'\"\r\n />\r\n </div>\r\n </div>\r\n <div *ngIf=\"errors.length > 0\" class=\"daga-error-panel\">\r\n <ol>\r\n <li\r\n *ngFor=\"let error of errors; index as i\"\r\n (click)=\"showError(error)\"\r\n [innerHTML]=\"error.message\"\r\n ></li>\r\n </ol>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CollapseButtonComponent, selector: "daga-collapse-button", inputs: ["collapsableSelector", "collapsableAdditionalSelector", "collapsed", "disabled", "direction", "rule", "collapsedValue", "visibleValue"] }] }); }
475
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ErrorsComponent, deps: [{ token: CanvasProviderService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
476
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: ErrorsComponent, isStandalone: true, selector: "daga-errors", viewQueries: [{ propertyName: "errorsContainer", first: true, predicate: ["errors"], descendants: true }], ngImport: i0, template: "<div #errorsContainer class=\"daga-errors\">\r\n <div\r\n *ngIf=\"errors.length === 0\"\r\n class=\"daga-errors-summary daga-no-errors daga-prevent-user-select\"\r\n >\r\n <span>No errors found</span>\r\n </div>\r\n <div\r\n *ngIf=\"errors.length > 0\"\r\n class=\"daga-errors-summary daga-with-errors daga-prevent-user-select\"\r\n >\r\n <span>{{ errors.length }} errors found</span>\r\n <div class=\"daga-collapse-button-container\">\r\n <daga-collapse-button\r\n [collapsableSelector]=\"errorsContainer\"\r\n [collapsableAdditionalSelector]=\"'.daga-error-panel'\"\r\n [direction]=\"Side.Top\"\r\n [rule]=\"'display'\"\r\n [collapsedValue]=\"'none'\"\r\n [visibleValue]=\"'block'\"\r\n />\r\n </div>\r\n </div>\r\n <div *ngIf=\"errors.length > 0\" class=\"daga-error-panel\">\r\n <ol>\r\n <li\r\n *ngFor=\"let error of errors; index as i\"\r\n (click)=\"showError(error)\"\r\n [innerHTML]=\"error.message\"\r\n ></li>\r\n </ol>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CollapseButtonComponent, selector: "daga-collapse-button", inputs: ["collapsableSelector", "collapsableAdditionalSelector", "collapsed", "disabled", "direction", "rule", "collapsedValue", "visibleValue"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
380
477
  }
381
478
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ErrorsComponent, decorators: [{
382
479
  type: Component,
383
- args: [{ selector: 'daga-errors', imports: [CommonModule, CollapseButtonComponent], template: "<div #errorsContainer class=\"daga-errors\">\r\n <div\r\n *ngIf=\"errors.length === 0\"\r\n class=\"daga-errors-summary daga-no-errors daga-prevent-user-select\"\r\n >\r\n <span>No errors found</span>\r\n </div>\r\n <div\r\n *ngIf=\"errors.length > 0\"\r\n class=\"daga-errors-summary daga-with-errors daga-prevent-user-select\"\r\n >\r\n <span>{{ errors.length }} errors found</span>\r\n <div class=\"daga-collapse-button-container\">\r\n <daga-collapse-button\r\n [collapsableSelector]=\"errorsContainer\"\r\n [collapsableAdditionalSelector]=\"'.daga-error-panel'\"\r\n [direction]=\"Side.Top\"\r\n [rule]=\"'display'\"\r\n [collapsedValue]=\"'none'\"\r\n [visibleValue]=\"'block'\"\r\n />\r\n </div>\r\n </div>\r\n <div *ngIf=\"errors.length > 0\" class=\"daga-error-panel\">\r\n <ol>\r\n <li\r\n *ngFor=\"let error of errors; index as i\"\r\n (click)=\"showError(error)\"\r\n [innerHTML]=\"error.message\"\r\n ></li>\r\n </ol>\r\n </div>\r\n</div>\r\n" }]
384
- }], ctorParameters: () => [{ type: CanvasProviderService }], propDecorators: { errorsContainer: [{
480
+ args: [{ selector: 'daga-errors', imports: [CommonModule, CollapseButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div #errorsContainer class=\"daga-errors\">\r\n <div\r\n *ngIf=\"errors.length === 0\"\r\n class=\"daga-errors-summary daga-no-errors daga-prevent-user-select\"\r\n >\r\n <span>No errors found</span>\r\n </div>\r\n <div\r\n *ngIf=\"errors.length > 0\"\r\n class=\"daga-errors-summary daga-with-errors daga-prevent-user-select\"\r\n >\r\n <span>{{ errors.length }} errors found</span>\r\n <div class=\"daga-collapse-button-container\">\r\n <daga-collapse-button\r\n [collapsableSelector]=\"errorsContainer\"\r\n [collapsableAdditionalSelector]=\"'.daga-error-panel'\"\r\n [direction]=\"Side.Top\"\r\n [rule]=\"'display'\"\r\n [collapsedValue]=\"'none'\"\r\n [visibleValue]=\"'block'\"\r\n />\r\n </div>\r\n </div>\r\n <div *ngIf=\"errors.length > 0\" class=\"daga-error-panel\">\r\n <ol>\r\n <li\r\n *ngFor=\"let error of errors; index as i\"\r\n (click)=\"showError(error)\"\r\n [innerHTML]=\"error.message\"\r\n ></li>\r\n </ol>\r\n </div>\r\n</div>\r\n" }]
481
+ }], ctorParameters: () => [{ type: CanvasProviderService }, { type: i0.ChangeDetectorRef }], propDecorators: { errorsContainer: [{
385
482
  type: ViewChild,
386
483
  args: ['errors']
387
484
  }] } });
@@ -396,14 +493,19 @@ class PaletteComponent {
396
493
  get canvas() {
397
494
  return this.canvasProvider.getCanvas();
398
495
  }
399
- constructor(canvasProvider) {
496
+ constructor(canvasProvider, configService) {
400
497
  this.canvasProvider = canvasProvider;
498
+ this.configService = configService;
401
499
  this.currentCategory = '';
402
500
  }
403
- ngAfterContentInit() {
404
- // we initialize the currentPalette variable if it hasn't been initalized with a proper value
405
- // doing this in ngAfterViewInit() would cause an ExpressionChangedAfterItHasBeenCheckedError
406
- this.currentPalette = this.currentPalette || this.palettes[0];
501
+ ngOnInit() {
502
+ /*
503
+ reload using the canvas observable instead of the config one
504
+ because we're getting the type info from the model, not the configuration
505
+ */
506
+ this.sub = this.canvasProvider.canvas$.subscribe(() => {
507
+ this.init(this.configService.getConfig());
508
+ });
407
509
  }
408
510
  ngAfterViewInit() {
409
511
  this.refreshPalette();
@@ -429,19 +531,33 @@ class PaletteComponent {
429
531
  .style('justify-content', 'center')
430
532
  .style('gap', this.gap);
431
533
  }
534
+ ngOnDestroy() {
535
+ this.sub?.unsubscribe();
536
+ }
537
+ init(config) {
538
+ this.location = config.components?.palette?.location || Corner.TopLeft;
539
+ this.direction = config.components?.palette?.direction || Side.Bottom;
540
+ this.width = config.components?.palette?.width || '12rem';
541
+ this.gap = config.components?.palette?.gap || '1rem';
542
+ this.palettes = config.components?.palette?.sections || [];
543
+ this.currentPalette = this.palettes[0];
544
+ this.refreshPalette();
545
+ }
432
546
  refreshPalette() {
433
547
  this.switchPalette(this.currentPalette);
434
548
  }
435
549
  switchPalette(palette) {
436
550
  this.currentPalette = palette;
437
- this.selectPalette().selectAll('*').remove();
438
- this.priorityThreshold = this.canvas.getPriorityThreshold();
439
- if (palette.categories) {
440
- this.appendCategories(palette.categories);
441
- }
442
- if (palette.templates) {
443
- for (const template of palette.templates) {
444
- this.appendTemplate(template);
551
+ if (this.panel !== undefined) {
552
+ this.selectPalette().selectAll('*').remove();
553
+ this.priorityThreshold = this.canvas.getPriorityThreshold();
554
+ if (palette.categories) {
555
+ this.appendCategories(palette.categories);
556
+ }
557
+ if (palette.templates) {
558
+ for (const template of palette.templates) {
559
+ this.appendTemplate(template);
560
+ }
445
561
  }
446
562
  }
447
563
  }
@@ -815,13 +931,13 @@ class PaletteComponent {
815
931
  .text(templateConfig.label);
816
932
  }
817
933
  }
818
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: PaletteComponent, deps: [{ token: CanvasProviderService }], target: i0.ɵɵFactoryTarget.Component }); }
819
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: PaletteComponent, isStandalone: true, selector: "daga-palette", inputs: { palettes: "palettes", currentPalette: "currentPalette", currentCategory: "currentCategory", location: "location", direction: "direction", width: "width", gap: "gap" }, viewQueries: [{ propertyName: "panel", first: true, predicate: ["panel"], descendants: true }], ngImport: i0, template: "<div #panel class=\"daga-panel daga-{{ location }} daga-{{ direction }}\">\r\n <daga-collapse-button\r\n #collapseButton\r\n [direction]=\"direction\"\r\n [collapsableSelector]=\"panel\"\r\n collapsableAdditionalSelector=\".daga-panel-content\"\r\n rule=\"display\"\r\n collapsedValue=\"none\"\r\n visibleValue=\"block\"\r\n />\r\n <div class=\"daga-panel-content\">\r\n <div *ngIf=\"palettes.length > 1\" class=\"daga-panel-tabs\">\r\n <div\r\n *ngFor=\"let palette of palettes\"\r\n class=\"daga-panel-tab\"\r\n [class]=\"palette === currentPalette ? 'daga-current-tab' : ''\"\r\n (click)=\"switchPalette(palette)\"\r\n >\r\n {{ palette.name }}\r\n </div>\r\n </div>\r\n <div class=\"daga-palette-view\"></div>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CollapseButtonComponent, selector: "daga-collapse-button", inputs: ["collapsableSelector", "collapsableAdditionalSelector", "collapsed", "disabled", "direction", "rule", "collapsedValue", "visibleValue"] }] }); }
934
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: PaletteComponent, deps: [{ token: CanvasProviderService }, { token: DagaConfigurationService }], target: i0.ɵɵFactoryTarget.Component }); }
935
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: PaletteComponent, isStandalone: true, selector: "daga-palette", inputs: { palettes: "palettes", currentPalette: "currentPalette", currentCategory: "currentCategory", location: "location", direction: "direction", width: "width", gap: "gap" }, viewQueries: [{ propertyName: "panel", first: true, predicate: ["panel"], descendants: true }], ngImport: i0, template: "<div #panel class=\"daga-panel daga-{{ location }} daga-{{ direction }}\">\r\n <daga-collapse-button\r\n #collapseButton\r\n [direction]=\"direction\"\r\n [collapsableSelector]=\"panel\"\r\n collapsableAdditionalSelector=\".daga-panel-content\"\r\n rule=\"display\"\r\n collapsedValue=\"none\"\r\n visibleValue=\"block\"\r\n />\r\n <div class=\"daga-panel-content\">\r\n <div *ngIf=\"palettes.length > 1\" class=\"daga-panel-tabs\">\r\n <div\r\n *ngFor=\"let palette of palettes\"\r\n class=\"daga-panel-tab\"\r\n [class]=\"palette === currentPalette ? 'daga-current-tab' : ''\"\r\n (click)=\"switchPalette(palette)\"\r\n >\r\n {{ palette.name }}\r\n </div>\r\n </div>\r\n <div class=\"daga-palette-view\"></div>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CollapseButtonComponent, selector: "daga-collapse-button", inputs: ["collapsableSelector", "collapsableAdditionalSelector", "collapsed", "disabled", "direction", "rule", "collapsedValue", "visibleValue"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
820
936
  }
821
937
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: PaletteComponent, decorators: [{
822
938
  type: Component,
823
- args: [{ selector: 'daga-palette', imports: [CommonModule, CollapseButtonComponent], template: "<div #panel class=\"daga-panel daga-{{ location }} daga-{{ direction }}\">\r\n <daga-collapse-button\r\n #collapseButton\r\n [direction]=\"direction\"\r\n [collapsableSelector]=\"panel\"\r\n collapsableAdditionalSelector=\".daga-panel-content\"\r\n rule=\"display\"\r\n collapsedValue=\"none\"\r\n visibleValue=\"block\"\r\n />\r\n <div class=\"daga-panel-content\">\r\n <div *ngIf=\"palettes.length > 1\" class=\"daga-panel-tabs\">\r\n <div\r\n *ngFor=\"let palette of palettes\"\r\n class=\"daga-panel-tab\"\r\n [class]=\"palette === currentPalette ? 'daga-current-tab' : ''\"\r\n (click)=\"switchPalette(palette)\"\r\n >\r\n {{ palette.name }}\r\n </div>\r\n </div>\r\n <div class=\"daga-palette-view\"></div>\r\n </div>\r\n</div>\r\n" }]
824
- }], ctorParameters: () => [{ type: CanvasProviderService }], propDecorators: { panel: [{
939
+ args: [{ selector: 'daga-palette', imports: [CommonModule, CollapseButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div #panel class=\"daga-panel daga-{{ location }} daga-{{ direction }}\">\r\n <daga-collapse-button\r\n #collapseButton\r\n [direction]=\"direction\"\r\n [collapsableSelector]=\"panel\"\r\n collapsableAdditionalSelector=\".daga-panel-content\"\r\n rule=\"display\"\r\n collapsedValue=\"none\"\r\n visibleValue=\"block\"\r\n />\r\n <div class=\"daga-panel-content\">\r\n <div *ngIf=\"palettes.length > 1\" class=\"daga-panel-tabs\">\r\n <div\r\n *ngFor=\"let palette of palettes\"\r\n class=\"daga-panel-tab\"\r\n [class]=\"palette === currentPalette ? 'daga-current-tab' : ''\"\r\n (click)=\"switchPalette(palette)\"\r\n >\r\n {{ palette.name }}\r\n </div>\r\n </div>\r\n <div class=\"daga-palette-view\"></div>\r\n </div>\r\n</div>\r\n" }]
940
+ }], ctorParameters: () => [{ type: CanvasProviderService }, { type: DagaConfigurationService }], propDecorators: { panel: [{
825
941
  type: ViewChild,
826
942
  args: ['panel']
827
943
  }], palettes: [{
@@ -1022,11 +1138,11 @@ class PropertySettingsComponent {
1022
1138
  this.addListeners();
1023
1139
  }
1024
1140
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: PropertySettingsComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: CanvasProviderService }], target: i0.ɵɵFactoryTarget.Component }); }
1025
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: PropertySettingsComponent, isStandalone: true, selector: "daga-property-settings", inputs: { valueSet: "valueSet", depth: "depth" }, ngImport: i0, template: "<div\r\n class=\"daga-dropbar\"\r\n [class]=\"'daga-index-' + 0 + ' daga-depth-' + depth\"\r\n></div>\r\n<div\r\n *ngFor=\"let property of valueSet?.displayedProperties || []; index as i\"\r\n class=\"daga-property-and-dropbar\"\r\n [class]=\"getStyleClassName(property.name) + ' daga-depth-' + depth\"\r\n>\r\n <div\r\n class=\"daga-property\"\r\n [class]=\"getStyleClassName(property.name) + ' daga-depth-' + depth\"\r\n >\r\n <div class=\"daga-property-name\">\r\n <span>{{ property.name }}</span>\r\n <div class=\"daga-buttons\">\r\n <button class=\"daga-property-button daga-move-button\">\r\n <div class=\"daga-icon daga-move-icon\"></div>\r\n </button>\r\n <button\r\n class=\"daga-property-button daga-hide-button\"\r\n (click)=\"hideProperty(property.name)\"\r\n >\r\n <div class=\"daga-icon daga-hide-icon\"></div>\r\n </button>\r\n </div>\r\n </div>\r\n <div *ngIf=\"property.type !== Type.Object\" class=\"daga-property-value\">\r\n {{ asString(valueSet?.getValue(property.name)) }}\r\n </div>\r\n <div *ngIf=\"property.type === Type.Object\">\r\n <daga-property-settings\r\n [valueSet]=\"valueSet?.getSubValueSet(property.name)\"\r\n [depth]=\"depth + 1\"\r\n ></daga-property-settings>\r\n </div>\r\n </div>\r\n <div\r\n class=\"daga-dropbar\"\r\n [class]=\"'daga-index-' + (i + 1) + ' daga-depth-' + depth\"\r\n ></div>\r\n</div>\r\n<div\r\n class=\"daga-property\"\r\n *ngIf=\"valueSet && valueSet.hiddenProperties.length > 0\"\r\n>\r\n <p class=\"daga-property-name\">Add property:</p>\r\n <select (change)=\"displayProperty($event)\">\r\n <option value=\"\">Select a property</option>\r\n <option\r\n *ngFor=\"let property of valueSet?.hiddenProperties || []\"\r\n [value]=\"property.name\"\r\n >\r\n {{ property.name }}\r\n </option>\r\n </select>\r\n</div>\r\n", dependencies: [{ kind: "component", type: PropertySettingsComponent, selector: "daga-property-settings", inputs: ["valueSet", "depth"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }] }); }
1141
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: PropertySettingsComponent, isStandalone: true, selector: "daga-property-settings", inputs: { valueSet: "valueSet", depth: "depth" }, ngImport: i0, template: "<div\r\n class=\"daga-dropbar\"\r\n [class]=\"'daga-index-' + 0 + ' daga-depth-' + depth\"\r\n></div>\r\n<div\r\n *ngFor=\"let property of valueSet?.displayedProperties || []; index as i\"\r\n class=\"daga-property-and-dropbar\"\r\n [class]=\"getStyleClassName(property.name) + ' daga-depth-' + depth\"\r\n>\r\n <div\r\n class=\"daga-property\"\r\n [class]=\"getStyleClassName(property.name) + ' daga-depth-' + depth\"\r\n >\r\n <div class=\"daga-property-name\">\r\n <span>{{ property.name }}</span>\r\n <div class=\"daga-buttons\">\r\n <button class=\"daga-property-button daga-move-button\">\r\n <div class=\"daga-icon daga-move-icon\"></div>\r\n </button>\r\n <button\r\n class=\"daga-property-button daga-hide-button\"\r\n (click)=\"hideProperty(property.name)\"\r\n >\r\n <div class=\"daga-icon daga-hide-icon\"></div>\r\n </button>\r\n </div>\r\n </div>\r\n <div *ngIf=\"property.type !== Type.Object\" class=\"daga-property-value\">\r\n {{ asString(valueSet?.getValue(property.name)) }}\r\n </div>\r\n <div *ngIf=\"property.type === Type.Object\">\r\n <daga-property-settings\r\n [valueSet]=\"valueSet?.getSubValueSet(property.name)\"\r\n [depth]=\"depth + 1\"\r\n ></daga-property-settings>\r\n </div>\r\n </div>\r\n <div\r\n class=\"daga-dropbar\"\r\n [class]=\"'daga-index-' + (i + 1) + ' daga-depth-' + depth\"\r\n ></div>\r\n</div>\r\n<div\r\n class=\"daga-property\"\r\n *ngIf=\"valueSet && valueSet.hiddenProperties.length > 0\"\r\n>\r\n <p class=\"daga-property-name\">Add property:</p>\r\n <select (change)=\"displayProperty($event)\">\r\n <option value=\"\">Select a property</option>\r\n <option\r\n *ngFor=\"let property of valueSet?.hiddenProperties || []\"\r\n [value]=\"property.name\"\r\n >\r\n {{ property.name }}\r\n </option>\r\n </select>\r\n</div>\r\n", dependencies: [{ kind: "component", type: PropertySettingsComponent, selector: "daga-property-settings", inputs: ["valueSet", "depth"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1026
1142
  }
1027
1143
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: PropertySettingsComponent, decorators: [{
1028
1144
  type: Component,
1029
- args: [{ selector: 'daga-property-settings', imports: [CommonModule, FormsModule], template: "<div\r\n class=\"daga-dropbar\"\r\n [class]=\"'daga-index-' + 0 + ' daga-depth-' + depth\"\r\n></div>\r\n<div\r\n *ngFor=\"let property of valueSet?.displayedProperties || []; index as i\"\r\n class=\"daga-property-and-dropbar\"\r\n [class]=\"getStyleClassName(property.name) + ' daga-depth-' + depth\"\r\n>\r\n <div\r\n class=\"daga-property\"\r\n [class]=\"getStyleClassName(property.name) + ' daga-depth-' + depth\"\r\n >\r\n <div class=\"daga-property-name\">\r\n <span>{{ property.name }}</span>\r\n <div class=\"daga-buttons\">\r\n <button class=\"daga-property-button daga-move-button\">\r\n <div class=\"daga-icon daga-move-icon\"></div>\r\n </button>\r\n <button\r\n class=\"daga-property-button daga-hide-button\"\r\n (click)=\"hideProperty(property.name)\"\r\n >\r\n <div class=\"daga-icon daga-hide-icon\"></div>\r\n </button>\r\n </div>\r\n </div>\r\n <div *ngIf=\"property.type !== Type.Object\" class=\"daga-property-value\">\r\n {{ asString(valueSet?.getValue(property.name)) }}\r\n </div>\r\n <div *ngIf=\"property.type === Type.Object\">\r\n <daga-property-settings\r\n [valueSet]=\"valueSet?.getSubValueSet(property.name)\"\r\n [depth]=\"depth + 1\"\r\n ></daga-property-settings>\r\n </div>\r\n </div>\r\n <div\r\n class=\"daga-dropbar\"\r\n [class]=\"'daga-index-' + (i + 1) + ' daga-depth-' + depth\"\r\n ></div>\r\n</div>\r\n<div\r\n class=\"daga-property\"\r\n *ngIf=\"valueSet && valueSet.hiddenProperties.length > 0\"\r\n>\r\n <p class=\"daga-property-name\">Add property:</p>\r\n <select (change)=\"displayProperty($event)\">\r\n <option value=\"\">Select a property</option>\r\n <option\r\n *ngFor=\"let property of valueSet?.hiddenProperties || []\"\r\n [value]=\"property.name\"\r\n >\r\n {{ property.name }}\r\n </option>\r\n </select>\r\n</div>\r\n" }]
1145
+ args: [{ selector: 'daga-property-settings', imports: [CommonModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n class=\"daga-dropbar\"\r\n [class]=\"'daga-index-' + 0 + ' daga-depth-' + depth\"\r\n></div>\r\n<div\r\n *ngFor=\"let property of valueSet?.displayedProperties || []; index as i\"\r\n class=\"daga-property-and-dropbar\"\r\n [class]=\"getStyleClassName(property.name) + ' daga-depth-' + depth\"\r\n>\r\n <div\r\n class=\"daga-property\"\r\n [class]=\"getStyleClassName(property.name) + ' daga-depth-' + depth\"\r\n >\r\n <div class=\"daga-property-name\">\r\n <span>{{ property.name }}</span>\r\n <div class=\"daga-buttons\">\r\n <button class=\"daga-property-button daga-move-button\">\r\n <div class=\"daga-icon daga-move-icon\"></div>\r\n </button>\r\n <button\r\n class=\"daga-property-button daga-hide-button\"\r\n (click)=\"hideProperty(property.name)\"\r\n >\r\n <div class=\"daga-icon daga-hide-icon\"></div>\r\n </button>\r\n </div>\r\n </div>\r\n <div *ngIf=\"property.type !== Type.Object\" class=\"daga-property-value\">\r\n {{ asString(valueSet?.getValue(property.name)) }}\r\n </div>\r\n <div *ngIf=\"property.type === Type.Object\">\r\n <daga-property-settings\r\n [valueSet]=\"valueSet?.getSubValueSet(property.name)\"\r\n [depth]=\"depth + 1\"\r\n ></daga-property-settings>\r\n </div>\r\n </div>\r\n <div\r\n class=\"daga-dropbar\"\r\n [class]=\"'daga-index-' + (i + 1) + ' daga-depth-' + depth\"\r\n ></div>\r\n</div>\r\n<div\r\n class=\"daga-property\"\r\n *ngIf=\"valueSet && valueSet.hiddenProperties.length > 0\"\r\n>\r\n <p class=\"daga-property-name\">Add property:</p>\r\n <select (change)=\"displayProperty($event)\">\r\n <option value=\"\">Select a property</option>\r\n <option\r\n *ngFor=\"let property of valueSet?.hiddenProperties || []\"\r\n [value]=\"property.name\"\r\n >\r\n {{ property.name }}\r\n </option>\r\n </select>\r\n</div>\r\n" }]
1030
1146
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: CanvasProviderService }], propDecorators: { valueSet: [{
1031
1147
  type: Input
1032
1148
  }], depth: [{
@@ -1212,11 +1328,11 @@ class AutocompleteComponent {
1212
1328
  }
1213
1329
  }
1214
1330
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: AutocompleteComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1215
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: AutocompleteComponent, isStandalone: true, selector: "daga-autocomplete", inputs: { value: "value", valueInput: "valueInput", options: "options", disabled: "disabled" }, outputs: { valueChange: "valueChange" }, viewQueries: [{ propertyName: "mainElement", first: true, predicate: ["main"], descendants: true, static: true }], ngImport: i0, template: "<div\r\n #main\r\n class=\"daga-autocomplete\"\r\n [class]=\"showOptions ? 'daga-showing-options' : ''\"\r\n (blur)=\"closeOptions()\"\r\n>\r\n <div class=\"daga-autocomplete-input\">\r\n <input\r\n [(ngModel)]=\"valueInput\"\r\n [disabled]=\"disabled\"\r\n (keyup)=\"onKeyup($event)\"\r\n (focus)=\"openOptions()\"\r\n (blur)=\"onLostFocus()\"\r\n />\r\n <button\r\n *ngIf=\"valueInput !== ''\"\r\n class=\"daga-clear\"\r\n (click)=\"clearInput()\"\r\n ></button>\r\n </div>\r\n <div class=\"daga-autocomplete-options\">\r\n <ul class=\"daga-autocomplete-option-list\">\r\n <li\r\n *ngIf=\"(currentOptions?.length || 0) === 0\"\r\n class=\"daga-autocomplete-option no-options\"\r\n >\r\n (No options)\r\n </li>\r\n <li\r\n *ngFor=\"let option of currentOptions; let index = index\"\r\n class=\"daga-autocomplete-option\"\r\n [class]=\"index === focusIndex ? 'daga-focused' : ''\"\r\n (mousemove)=\"focusOnOption(index)\"\r\n (click)=\"complete(option)\"\r\n >\r\n <span>{{ currentLabelStarts[index] }}</span>\r\n <span class=\"daga-match\">{{ currentLabelMatches[index] }}</span>\r\n <span>{{ currentLabelEnds[index] }}</span>\r\n </li>\r\n </ul>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
1331
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: AutocompleteComponent, isStandalone: true, selector: "daga-autocomplete", inputs: { value: "value", valueInput: "valueInput", options: "options", disabled: "disabled" }, outputs: { valueChange: "valueChange" }, viewQueries: [{ propertyName: "mainElement", first: true, predicate: ["main"], descendants: true, static: true }], ngImport: i0, template: "<div\r\n #main\r\n class=\"daga-autocomplete\"\r\n [class]=\"showOptions ? 'daga-showing-options' : ''\"\r\n (blur)=\"closeOptions()\"\r\n>\r\n <div class=\"daga-autocomplete-input\">\r\n <input\r\n [(ngModel)]=\"valueInput\"\r\n [disabled]=\"disabled\"\r\n (keyup)=\"onKeyup($event)\"\r\n (focus)=\"openOptions()\"\r\n (blur)=\"onLostFocus()\"\r\n />\r\n <button\r\n *ngIf=\"valueInput !== ''\"\r\n class=\"daga-clear\"\r\n (click)=\"clearInput()\"\r\n ></button>\r\n </div>\r\n <div class=\"daga-autocomplete-options\">\r\n <ul class=\"daga-autocomplete-option-list\">\r\n <li\r\n *ngIf=\"(currentOptions?.length || 0) === 0\"\r\n class=\"daga-autocomplete-option no-options\"\r\n >\r\n (No options)\r\n </li>\r\n <li\r\n *ngFor=\"let option of currentOptions; let index = index\"\r\n class=\"daga-autocomplete-option\"\r\n [class]=\"index === focusIndex ? 'daga-focused' : ''\"\r\n (mousemove)=\"focusOnOption(index)\"\r\n (click)=\"complete(option)\"\r\n >\r\n <span>{{ currentLabelStarts[index] }}</span>\r\n <span class=\"daga-match\">{{ currentLabelMatches[index] }}</span>\r\n <span>{{ currentLabelEnds[index] }}</span>\r\n </li>\r\n </ul>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1216
1332
  }
1217
1333
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: AutocompleteComponent, decorators: [{
1218
1334
  type: Component,
1219
- args: [{ selector: 'daga-autocomplete', imports: [CommonModule, FormsModule], template: "<div\r\n #main\r\n class=\"daga-autocomplete\"\r\n [class]=\"showOptions ? 'daga-showing-options' : ''\"\r\n (blur)=\"closeOptions()\"\r\n>\r\n <div class=\"daga-autocomplete-input\">\r\n <input\r\n [(ngModel)]=\"valueInput\"\r\n [disabled]=\"disabled\"\r\n (keyup)=\"onKeyup($event)\"\r\n (focus)=\"openOptions()\"\r\n (blur)=\"onLostFocus()\"\r\n />\r\n <button\r\n *ngIf=\"valueInput !== ''\"\r\n class=\"daga-clear\"\r\n (click)=\"clearInput()\"\r\n ></button>\r\n </div>\r\n <div class=\"daga-autocomplete-options\">\r\n <ul class=\"daga-autocomplete-option-list\">\r\n <li\r\n *ngIf=\"(currentOptions?.length || 0) === 0\"\r\n class=\"daga-autocomplete-option no-options\"\r\n >\r\n (No options)\r\n </li>\r\n <li\r\n *ngFor=\"let option of currentOptions; let index = index\"\r\n class=\"daga-autocomplete-option\"\r\n [class]=\"index === focusIndex ? 'daga-focused' : ''\"\r\n (mousemove)=\"focusOnOption(index)\"\r\n (click)=\"complete(option)\"\r\n >\r\n <span>{{ currentLabelStarts[index] }}</span>\r\n <span class=\"daga-match\">{{ currentLabelMatches[index] }}</span>\r\n <span>{{ currentLabelEnds[index] }}</span>\r\n </li>\r\n </ul>\r\n </div>\r\n</div>\r\n" }]
1335
+ args: [{ selector: 'daga-autocomplete', imports: [CommonModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n #main\r\n class=\"daga-autocomplete\"\r\n [class]=\"showOptions ? 'daga-showing-options' : ''\"\r\n (blur)=\"closeOptions()\"\r\n>\r\n <div class=\"daga-autocomplete-input\">\r\n <input\r\n [(ngModel)]=\"valueInput\"\r\n [disabled]=\"disabled\"\r\n (keyup)=\"onKeyup($event)\"\r\n (focus)=\"openOptions()\"\r\n (blur)=\"onLostFocus()\"\r\n />\r\n <button\r\n *ngIf=\"valueInput !== ''\"\r\n class=\"daga-clear\"\r\n (click)=\"clearInput()\"\r\n ></button>\r\n </div>\r\n <div class=\"daga-autocomplete-options\">\r\n <ul class=\"daga-autocomplete-option-list\">\r\n <li\r\n *ngIf=\"(currentOptions?.length || 0) === 0\"\r\n class=\"daga-autocomplete-option no-options\"\r\n >\r\n (No options)\r\n </li>\r\n <li\r\n *ngFor=\"let option of currentOptions; let index = index\"\r\n class=\"daga-autocomplete-option\"\r\n [class]=\"index === focusIndex ? 'daga-focused' : ''\"\r\n (mousemove)=\"focusOnOption(index)\"\r\n (click)=\"complete(option)\"\r\n >\r\n <span>{{ currentLabelStarts[index] }}</span>\r\n <span class=\"daga-match\">{{ currentLabelMatches[index] }}</span>\r\n <span>{{ currentLabelEnds[index] }}</span>\r\n </li>\r\n </ul>\r\n </div>\r\n</div>\r\n" }]
1220
1336
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { mainElement: [{
1221
1337
  type: ViewChild,
1222
1338
  args: ['main', { static: true }]
@@ -1329,11 +1445,11 @@ class OptionListEditorComponent {
1329
1445
  }
1330
1446
  }
1331
1447
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: OptionListEditorComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1332
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: OptionListEditorComponent, isStandalone: true, selector: "daga-option-list-editor", inputs: { value: "value", options: "options", valueInput: "valueInput", allowRepeats: "allowRepeats", optionsNotPresentInValue: "optionsNotPresentInValue", disabled: "disabled" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<div\r\n *ngFor=\"let item of value; let index = index\"\r\n class=\"daga-value-item-element\"\r\n>\r\n <span class=\"daga-input\">{{ labelsOfValue[index] }}</span>\r\n <button\r\n *ngIf=\"!disabled\"\r\n class=\"daga-property-button\"\r\n (click)=\"removeFromValue(index)\"\r\n >\r\n <div class=\"daga-icon daga-close-icon\"></div>\r\n </button>\r\n</div>\r\n<div *ngIf=\"!disabled\" class=\"daga-value-item-input\">\r\n <div class=\"daga-input daga-relatively-positioned\">\r\n <daga-autocomplete\r\n [disabled]=\"disabled\"\r\n [options]=\"allowRepeats ? options || [] : optionsNotPresentInValue || []\"\r\n [(value)]=\"valueInput\"\r\n />\r\n </div>\r\n <button class=\"daga-property-button\" (click)=\"addToValue()\">\r\n <div class=\"daga-icon daga-add-icon\"></div>\r\n </button>\r\n</div>\r\n", dependencies: [{ kind: "component", type: AutocompleteComponent, selector: "daga-autocomplete", inputs: ["value", "valueInput", "options", "disabled"], outputs: ["valueChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }] }); }
1448
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: OptionListEditorComponent, isStandalone: true, selector: "daga-option-list-editor", inputs: { value: "value", options: "options", valueInput: "valueInput", allowRepeats: "allowRepeats", optionsNotPresentInValue: "optionsNotPresentInValue", disabled: "disabled" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<div\r\n *ngFor=\"let item of value; let index = index\"\r\n class=\"daga-value-item-element\"\r\n>\r\n <span class=\"daga-input\">{{ labelsOfValue[index] }}</span>\r\n <button\r\n *ngIf=\"!disabled\"\r\n class=\"daga-property-button\"\r\n (click)=\"removeFromValue(index)\"\r\n >\r\n <div class=\"daga-icon daga-close-icon\"></div>\r\n </button>\r\n</div>\r\n<div *ngIf=\"!disabled\" class=\"daga-value-item-input\">\r\n <div class=\"daga-input daga-relatively-positioned\">\r\n <daga-autocomplete\r\n [disabled]=\"disabled\"\r\n [options]=\"allowRepeats ? options || [] : optionsNotPresentInValue || []\"\r\n [(value)]=\"valueInput\"\r\n />\r\n </div>\r\n <button class=\"daga-property-button\" (click)=\"addToValue()\">\r\n <div class=\"daga-icon daga-add-icon\"></div>\r\n </button>\r\n</div>\r\n", dependencies: [{ kind: "component", type: AutocompleteComponent, selector: "daga-autocomplete", inputs: ["value", "valueInput", "options", "disabled"], outputs: ["valueChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1333
1449
  }
1334
1450
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: OptionListEditorComponent, decorators: [{
1335
1451
  type: Component,
1336
- args: [{ selector: 'daga-option-list-editor', imports: [AutocompleteComponent, CommonModule, FormsModule], template: "<div\r\n *ngFor=\"let item of value; let index = index\"\r\n class=\"daga-value-item-element\"\r\n>\r\n <span class=\"daga-input\">{{ labelsOfValue[index] }}</span>\r\n <button\r\n *ngIf=\"!disabled\"\r\n class=\"daga-property-button\"\r\n (click)=\"removeFromValue(index)\"\r\n >\r\n <div class=\"daga-icon daga-close-icon\"></div>\r\n </button>\r\n</div>\r\n<div *ngIf=\"!disabled\" class=\"daga-value-item-input\">\r\n <div class=\"daga-input daga-relatively-positioned\">\r\n <daga-autocomplete\r\n [disabled]=\"disabled\"\r\n [options]=\"allowRepeats ? options || [] : optionsNotPresentInValue || []\"\r\n [(value)]=\"valueInput\"\r\n />\r\n </div>\r\n <button class=\"daga-property-button\" (click)=\"addToValue()\">\r\n <div class=\"daga-icon daga-add-icon\"></div>\r\n </button>\r\n</div>\r\n" }]
1452
+ args: [{ selector: 'daga-option-list-editor', imports: [AutocompleteComponent, CommonModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n *ngFor=\"let item of value; let index = index\"\r\n class=\"daga-value-item-element\"\r\n>\r\n <span class=\"daga-input\">{{ labelsOfValue[index] }}</span>\r\n <button\r\n *ngIf=\"!disabled\"\r\n class=\"daga-property-button\"\r\n (click)=\"removeFromValue(index)\"\r\n >\r\n <div class=\"daga-icon daga-close-icon\"></div>\r\n </button>\r\n</div>\r\n<div *ngIf=\"!disabled\" class=\"daga-value-item-input\">\r\n <div class=\"daga-input daga-relatively-positioned\">\r\n <daga-autocomplete\r\n [disabled]=\"disabled\"\r\n [options]=\"allowRepeats ? options || [] : optionsNotPresentInValue || []\"\r\n [(value)]=\"valueInput\"\r\n />\r\n </div>\r\n <button class=\"daga-property-button\" (click)=\"addToValue()\">\r\n <div class=\"daga-icon daga-add-icon\"></div>\r\n </button>\r\n</div>\r\n" }]
1337
1453
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { value: [{
1338
1454
  type: Input
1339
1455
  }], options: [{
@@ -1424,11 +1540,11 @@ class TextListEditorComponent {
1424
1540
  }
1425
1541
  }
1426
1542
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TextListEditorComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1427
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: TextListEditorComponent, isStandalone: true, selector: "daga-text-list-editor", inputs: { value: "value", valueInput: "valueInput", allowRepeats: "allowRepeats", disabled: "disabled" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<div\r\n *ngFor=\"let item of value; let index = index\"\r\n class=\"daga-value-item-element\"\r\n>\r\n <input\r\n class=\"daga-input\"\r\n type=\"text\"\r\n [disabled]=\"disabled\"\r\n [value]=\"item\"\r\n (focusout)=\"editFromValue(getValueFromEvent($event), index)\"\r\n />\r\n <button\r\n *ngIf=\"!disabled\"\r\n class=\"daga-property-button\"\r\n (click)=\"removeFromValue(index)\"\r\n >\r\n <div class=\"icon close-icon\"></div>\r\n </button>\r\n</div>\r\n<div *ngIf=\"!disabled\" class=\"daga-value-item-input\">\r\n <div class=\"daga-input daga-relatively-positioned\">\r\n <input type=\"text\" (keyup)=\"onKeyUp($event)\" [(ngModel)]=\"valueInput\" />\r\n <button\r\n *ngIf=\"valueInput !== ''\"\r\n class=\"daga-clear\"\r\n (click)=\"clearInput()\"\r\n ></button>\r\n </div>\r\n <button class=\"daga-property-button\" (click)=\"addToValue()\">\r\n <div class=\"daga-icon daga-add-icon\"></div>\r\n </button>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
1543
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: TextListEditorComponent, isStandalone: true, selector: "daga-text-list-editor", inputs: { value: "value", valueInput: "valueInput", allowRepeats: "allowRepeats", disabled: "disabled" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<div\r\n *ngFor=\"let item of value; let index = index\"\r\n class=\"daga-value-item-element\"\r\n>\r\n <input\r\n class=\"daga-input\"\r\n type=\"text\"\r\n [disabled]=\"disabled\"\r\n [value]=\"item\"\r\n (focusout)=\"editFromValue(getValueFromEvent($event), index)\"\r\n />\r\n <button\r\n *ngIf=\"!disabled\"\r\n class=\"daga-property-button\"\r\n (click)=\"removeFromValue(index)\"\r\n >\r\n <div class=\"icon close-icon\"></div>\r\n </button>\r\n</div>\r\n<div *ngIf=\"!disabled\" class=\"daga-value-item-input\">\r\n <div class=\"daga-input daga-relatively-positioned\">\r\n <input type=\"text\" (keyup)=\"onKeyUp($event)\" [(ngModel)]=\"valueInput\" />\r\n <button\r\n *ngIf=\"valueInput !== ''\"\r\n class=\"daga-clear\"\r\n (click)=\"clearInput()\"\r\n ></button>\r\n </div>\r\n <button class=\"daga-property-button\" (click)=\"addToValue()\">\r\n <div class=\"daga-icon daga-add-icon\"></div>\r\n </button>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1428
1544
  }
1429
1545
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TextListEditorComponent, decorators: [{
1430
1546
  type: Component,
1431
- args: [{ selector: 'daga-text-list-editor', imports: [CommonModule, FormsModule], template: "<div\r\n *ngFor=\"let item of value; let index = index\"\r\n class=\"daga-value-item-element\"\r\n>\r\n <input\r\n class=\"daga-input\"\r\n type=\"text\"\r\n [disabled]=\"disabled\"\r\n [value]=\"item\"\r\n (focusout)=\"editFromValue(getValueFromEvent($event), index)\"\r\n />\r\n <button\r\n *ngIf=\"!disabled\"\r\n class=\"daga-property-button\"\r\n (click)=\"removeFromValue(index)\"\r\n >\r\n <div class=\"icon close-icon\"></div>\r\n </button>\r\n</div>\r\n<div *ngIf=\"!disabled\" class=\"daga-value-item-input\">\r\n <div class=\"daga-input daga-relatively-positioned\">\r\n <input type=\"text\" (keyup)=\"onKeyUp($event)\" [(ngModel)]=\"valueInput\" />\r\n <button\r\n *ngIf=\"valueInput !== ''\"\r\n class=\"daga-clear\"\r\n (click)=\"clearInput()\"\r\n ></button>\r\n </div>\r\n <button class=\"daga-property-button\" (click)=\"addToValue()\">\r\n <div class=\"daga-icon daga-add-icon\"></div>\r\n </button>\r\n</div>\r\n" }]
1547
+ args: [{ selector: 'daga-text-list-editor', imports: [CommonModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n *ngFor=\"let item of value; let index = index\"\r\n class=\"daga-value-item-element\"\r\n>\r\n <input\r\n class=\"daga-input\"\r\n type=\"text\"\r\n [disabled]=\"disabled\"\r\n [value]=\"item\"\r\n (focusout)=\"editFromValue(getValueFromEvent($event), index)\"\r\n />\r\n <button\r\n *ngIf=\"!disabled\"\r\n class=\"daga-property-button\"\r\n (click)=\"removeFromValue(index)\"\r\n >\r\n <div class=\"icon close-icon\"></div>\r\n </button>\r\n</div>\r\n<div *ngIf=\"!disabled\" class=\"daga-value-item-input\">\r\n <div class=\"daga-input daga-relatively-positioned\">\r\n <input type=\"text\" (keyup)=\"onKeyUp($event)\" [(ngModel)]=\"valueInput\" />\r\n <button\r\n *ngIf=\"valueInput !== ''\"\r\n class=\"daga-clear\"\r\n (click)=\"clearInput()\"\r\n ></button>\r\n </div>\r\n <button class=\"daga-property-button\" (click)=\"addToValue()\">\r\n <div class=\"daga-icon daga-add-icon\"></div>\r\n </button>\r\n</div>\r\n" }]
1432
1548
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { value: [{
1433
1549
  type: Input
1434
1550
  }], valueInput: [{
@@ -1515,11 +1631,11 @@ class TextMapEditorComponent {
1515
1631
  }
1516
1632
  }
1517
1633
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TextMapEditorComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1518
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: TextMapEditorComponent, isStandalone: true, selector: "daga-text-map-editor", inputs: { value: "value", keyInput: "keyInput", valueInput: "valueInput", disabled: "disabled" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<div *ngFor=\"let item of value | keyvalue\" class=\"daga-value-item-element\">\r\n <input\r\n class=\"daga-input\"\r\n type=\"text\"\r\n [disabled]=\"disabled\"\r\n [value]=\"item.key\"\r\n (focusout)=\"editKey(item.key, getValueFromEvent($event))\"\r\n />\r\n <input\r\n class=\"daga-input\"\r\n type=\"text\"\r\n [disabled]=\"disabled\"\r\n [value]=\"item.value\"\r\n (focusout)=\"editValue(item.key, getValueFromEvent($event))\"\r\n />\r\n <button\r\n *ngIf=\"!disabled\"\r\n class=\"daga-property-button\"\r\n (click)=\"removeFromValue(item.key)\"\r\n >\r\n <div class=\"icon close-icon\"></div>\r\n </button>\r\n</div>\r\n<div *ngIf=\"!disabled\" class=\"daga-value-item-input\">\r\n <div class=\"daga-input daga-relatively-positioned\">\r\n <input type=\"text\" (keyup)=\"onKeyUp($event)\" [(ngModel)]=\"keyInput\" />\r\n <button\r\n *ngIf=\"keyInput !== ''\"\r\n class=\"daga-clear\"\r\n (click)=\"clearKeyInput()\"\r\n ></button>\r\n </div>\r\n <div class=\"daga-input daga-relatively-positioned\">\r\n <input type=\"text\" (keyup)=\"onKeyUp($event)\" [(ngModel)]=\"valueInput\" />\r\n <button\r\n *ngIf=\"valueInput !== ''\"\r\n class=\"daga-clear\"\r\n (click)=\"clearValueInput()\"\r\n ></button>\r\n </div>\r\n <button class=\"daga-property-button\" (click)=\"addToValue()\">\r\n <div class=\"daga-icon daga-add-icon\"></div>\r\n </button>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.KeyValuePipe, name: "keyvalue" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
1634
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: TextMapEditorComponent, isStandalone: true, selector: "daga-text-map-editor", inputs: { value: "value", keyInput: "keyInput", valueInput: "valueInput", disabled: "disabled" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<div *ngFor=\"let item of value | keyvalue\" class=\"daga-value-item-element\">\r\n <input\r\n class=\"daga-input\"\r\n type=\"text\"\r\n [disabled]=\"disabled\"\r\n [value]=\"item.key\"\r\n (focusout)=\"editKey(item.key, getValueFromEvent($event))\"\r\n />\r\n <input\r\n class=\"daga-input\"\r\n type=\"text\"\r\n [disabled]=\"disabled\"\r\n [value]=\"item.value\"\r\n (focusout)=\"editValue(item.key, getValueFromEvent($event))\"\r\n />\r\n <button\r\n *ngIf=\"!disabled\"\r\n class=\"daga-property-button\"\r\n (click)=\"removeFromValue(item.key)\"\r\n >\r\n <div class=\"icon close-icon\"></div>\r\n </button>\r\n</div>\r\n<div *ngIf=\"!disabled\" class=\"daga-value-item-input\">\r\n <div class=\"daga-input daga-relatively-positioned\">\r\n <input type=\"text\" (keyup)=\"onKeyUp($event)\" [(ngModel)]=\"keyInput\" />\r\n <button\r\n *ngIf=\"keyInput !== ''\"\r\n class=\"daga-clear\"\r\n (click)=\"clearKeyInput()\"\r\n ></button>\r\n </div>\r\n <div class=\"daga-input daga-relatively-positioned\">\r\n <input type=\"text\" (keyup)=\"onKeyUp($event)\" [(ngModel)]=\"valueInput\" />\r\n <button\r\n *ngIf=\"valueInput !== ''\"\r\n class=\"daga-clear\"\r\n (click)=\"clearValueInput()\"\r\n ></button>\r\n </div>\r\n <button class=\"daga-property-button\" (click)=\"addToValue()\">\r\n <div class=\"daga-icon daga-add-icon\"></div>\r\n </button>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.KeyValuePipe, name: "keyvalue" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1519
1635
  }
1520
1636
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TextMapEditorComponent, decorators: [{
1521
1637
  type: Component,
1522
- args: [{ selector: 'daga-text-map-editor', imports: [CommonModule, FormsModule], template: "<div *ngFor=\"let item of value | keyvalue\" class=\"daga-value-item-element\">\r\n <input\r\n class=\"daga-input\"\r\n type=\"text\"\r\n [disabled]=\"disabled\"\r\n [value]=\"item.key\"\r\n (focusout)=\"editKey(item.key, getValueFromEvent($event))\"\r\n />\r\n <input\r\n class=\"daga-input\"\r\n type=\"text\"\r\n [disabled]=\"disabled\"\r\n [value]=\"item.value\"\r\n (focusout)=\"editValue(item.key, getValueFromEvent($event))\"\r\n />\r\n <button\r\n *ngIf=\"!disabled\"\r\n class=\"daga-property-button\"\r\n (click)=\"removeFromValue(item.key)\"\r\n >\r\n <div class=\"icon close-icon\"></div>\r\n </button>\r\n</div>\r\n<div *ngIf=\"!disabled\" class=\"daga-value-item-input\">\r\n <div class=\"daga-input daga-relatively-positioned\">\r\n <input type=\"text\" (keyup)=\"onKeyUp($event)\" [(ngModel)]=\"keyInput\" />\r\n <button\r\n *ngIf=\"keyInput !== ''\"\r\n class=\"daga-clear\"\r\n (click)=\"clearKeyInput()\"\r\n ></button>\r\n </div>\r\n <div class=\"daga-input daga-relatively-positioned\">\r\n <input type=\"text\" (keyup)=\"onKeyUp($event)\" [(ngModel)]=\"valueInput\" />\r\n <button\r\n *ngIf=\"valueInput !== ''\"\r\n class=\"daga-clear\"\r\n (click)=\"clearValueInput()\"\r\n ></button>\r\n </div>\r\n <button class=\"daga-property-button\" (click)=\"addToValue()\">\r\n <div class=\"daga-icon daga-add-icon\"></div>\r\n </button>\r\n</div>\r\n" }]
1638
+ args: [{ selector: 'daga-text-map-editor', imports: [CommonModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngFor=\"let item of value | keyvalue\" class=\"daga-value-item-element\">\r\n <input\r\n class=\"daga-input\"\r\n type=\"text\"\r\n [disabled]=\"disabled\"\r\n [value]=\"item.key\"\r\n (focusout)=\"editKey(item.key, getValueFromEvent($event))\"\r\n />\r\n <input\r\n class=\"daga-input\"\r\n type=\"text\"\r\n [disabled]=\"disabled\"\r\n [value]=\"item.value\"\r\n (focusout)=\"editValue(item.key, getValueFromEvent($event))\"\r\n />\r\n <button\r\n *ngIf=\"!disabled\"\r\n class=\"daga-property-button\"\r\n (click)=\"removeFromValue(item.key)\"\r\n >\r\n <div class=\"icon close-icon\"></div>\r\n </button>\r\n</div>\r\n<div *ngIf=\"!disabled\" class=\"daga-value-item-input\">\r\n <div class=\"daga-input daga-relatively-positioned\">\r\n <input type=\"text\" (keyup)=\"onKeyUp($event)\" [(ngModel)]=\"keyInput\" />\r\n <button\r\n *ngIf=\"keyInput !== ''\"\r\n class=\"daga-clear\"\r\n (click)=\"clearKeyInput()\"\r\n ></button>\r\n </div>\r\n <div class=\"daga-input daga-relatively-positioned\">\r\n <input type=\"text\" (keyup)=\"onKeyUp($event)\" [(ngModel)]=\"valueInput\" />\r\n <button\r\n *ngIf=\"valueInput !== ''\"\r\n class=\"daga-clear\"\r\n (click)=\"clearValueInput()\"\r\n ></button>\r\n </div>\r\n <button class=\"daga-property-button\" (click)=\"addToValue()\">\r\n <div class=\"daga-icon daga-add-icon\"></div>\r\n </button>\r\n</div>\r\n" }]
1523
1639
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { value: [{
1524
1640
  type: Input
1525
1641
  }], keyInput: [{
@@ -1593,7 +1709,7 @@ class ObjectEditorComponent {
1593
1709
  return new Date(string);
1594
1710
  }
1595
1711
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ObjectEditorComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: CanvasProviderService }], target: i0.ɵɵFactoryTarget.Component }); }
1596
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: ObjectEditorComponent, isStandalone: true, selector: "daga-object-editor", inputs: { valueSet: "valueSet", depth: "depth" }, ngImport: i0, template: "<div\r\n *ngFor=\"let property of valueSet?.displayedProperties || []\"\r\n class=\"daga-property\"\r\n [class]=\"getStyleClassName(property.name) + ' daga-depth-' + depth\"\r\n>\r\n <p class=\"daga-property-name\">\r\n {{ property.name }}\r\n </p>\r\n\r\n <input\r\n *ngIf=\"property.type === Type.Text\"\r\n type=\"daga-text\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"valueSet?.getValue(property.name)\"\r\n (ngModelChange)=\"setValue(property, $event)\"\r\n />\r\n <textarea\r\n *ngIf=\"property.type === Type.TextArea\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"valueSet?.getValue(property.name)\"\r\n (ngModelChange)=\"setValue(property, $event)\"\r\n ></textarea>\r\n <input\r\n *ngIf=\"property.type === Type.Number\"\r\n type=\"number\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"valueSet?.getValue(property.name)\"\r\n (ngModelChange)=\"setValue(property, $event)\"\r\n />\r\n <input\r\n *ngIf=\"property.type === Type.Color\"\r\n type=\"text\"\r\n pattern=\"#\\d{6}\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"valueSet?.getValue(property.name)\"\r\n (ngModelChange)=\"setValue(property, $event)\"\r\n />\r\n <input\r\n *ngIf=\"property.type === Type.Datetime\"\r\n type=\"datetime-local\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"dateToLocalDatetimeString(valueSet?.getValue(property.name))\"\r\n (ngModelChange)=\"setValue(property, localDatetimeStringToDate($event))\"\r\n />\r\n <input\r\n *ngIf=\"property.type === Type.Date\"\r\n type=\"date\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"valueSet?.getValue(property.name)\"\r\n (ngModelChange)=\"setValue(property, $event)\"\r\n />\r\n <input\r\n *ngIf=\"property.type === Type.Time\"\r\n type=\"time\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"valueSet?.getValue(property.name)\"\r\n (ngModelChange)=\"setValue(property, $event)\"\r\n />\r\n <input\r\n *ngIf=\"property.type === Type.Url\"\r\n type=\"url\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"valueSet?.getValue(property.name)\"\r\n (ngModelChange)=\"setValue(property, $event)\"\r\n />\r\n <div class=\"daga-radio\" *ngIf=\"property.type === Type.Boolean\">\r\n <label\r\n class=\"daga-radio-item daga-radio-start\"\r\n [class]=\"\r\n valueSet?.getValue(property.name) === false ? 'daga-checked' : ''\r\n \"\r\n >\r\n <input\r\n type=\"radio\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [name]=\"property.name\"\r\n value=\"false\"\r\n (change)=\"setValue(property, false)\"\r\n />\r\n No\r\n </label>\r\n <label\r\n class=\"daga-radio-item daga-radio-end\"\r\n [class]=\"valueSet?.getValue(property.name) === true ? 'daga-checked' : ''\"\r\n >\r\n <input\r\n type=\"radio\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [name]=\"property.name\"\r\n value=\"true\"\r\n (change)=\"setValue(property, true)\"\r\n />\r\n Yes\r\n </label>\r\n </div>\r\n <div class=\"daga-relatively-positioned\" *ngIf=\"property.type === Type.Option\">\r\n <daga-autocomplete\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [options]=\"property.options || []\"\r\n [value]=\"valueSet?.getValue(property.name)\"\r\n (valueChange)=\"setValue(property, $event)\"\r\n />\r\n </div>\r\n <daga-option-list-editor\r\n *ngIf=\"\r\n property.type === Type.OptionList || property.type === Type.OptionSet\r\n \"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [allowRepeats]=\"property.type === Type.OptionList\"\r\n [options]=\"property.options || []\"\r\n [value]=\"valueSet?.getValue(property.name)\"\r\n (valueChange)=\"setValue(property, $event)\"\r\n ></daga-option-list-editor>\r\n <daga-text-list-editor\r\n *ngIf=\"property.type === Type.TextList || property.type === Type.TextSet\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [allowRepeats]=\"property.type === Type.TextList\"\r\n [value]=\"valueSet?.getValue(property.name)\"\r\n (valueChange)=\"setValue(property, $event)\"\r\n ></daga-text-list-editor>\r\n <daga-text-map-editor\r\n *ngIf=\"property.type === Type.TextMap\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [value]=\"valueSet?.getValue(property.name)\"\r\n (valueChange)=\"setValue(property, $event)\"\r\n ></daga-text-map-editor>\r\n <div *ngIf=\"property.type === Type.Object\" class=\"daga-left-bar\">\r\n <daga-object-editor\r\n [valueSet]=\"valueSet?.getSubValueSet(property.name)\"\r\n [depth]=\"depth + 1\"\r\n ></daga-object-editor>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "component", type: ObjectEditorComponent, selector: "daga-object-editor", inputs: ["valueSet", "depth"] }, { kind: "component", type: AutocompleteComponent, selector: "daga-autocomplete", inputs: ["value", "valueInput", "options", "disabled"], outputs: ["valueChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.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: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: OptionListEditorComponent, selector: "daga-option-list-editor", inputs: ["value", "options", "valueInput", "allowRepeats", "optionsNotPresentInValue", "disabled"], outputs: ["valueChange"] }, { kind: "component", type: TextListEditorComponent, selector: "daga-text-list-editor", inputs: ["value", "valueInput", "allowRepeats", "disabled"], outputs: ["valueChange"] }, { kind: "component", type: TextMapEditorComponent, selector: "daga-text-map-editor", inputs: ["value", "keyInput", "valueInput", "disabled"], outputs: ["valueChange"] }] }); }
1712
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: ObjectEditorComponent, isStandalone: true, selector: "daga-object-editor", inputs: { valueSet: "valueSet", depth: "depth" }, ngImport: i0, template: "<div\r\n *ngFor=\"let property of valueSet?.displayedProperties || []\"\r\n class=\"daga-property\"\r\n [class]=\"getStyleClassName(property.name) + ' daga-depth-' + depth\"\r\n>\r\n <p class=\"daga-property-name\">\r\n {{ property.name }}\r\n </p>\r\n\r\n <input\r\n *ngIf=\"property.type === Type.Text\"\r\n type=\"daga-text\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"valueSet?.getValue(property.name)\"\r\n (ngModelChange)=\"setValue(property, $event)\"\r\n />\r\n <textarea\r\n *ngIf=\"property.type === Type.TextArea\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"valueSet?.getValue(property.name)\"\r\n (ngModelChange)=\"setValue(property, $event)\"\r\n ></textarea>\r\n <input\r\n *ngIf=\"property.type === Type.Number\"\r\n type=\"number\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"valueSet?.getValue(property.name)\"\r\n (ngModelChange)=\"setValue(property, $event)\"\r\n />\r\n <input\r\n *ngIf=\"property.type === Type.Color\"\r\n type=\"text\"\r\n pattern=\"#\\d{6}\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"valueSet?.getValue(property.name)\"\r\n (ngModelChange)=\"setValue(property, $event)\"\r\n />\r\n <input\r\n *ngIf=\"property.type === Type.Datetime\"\r\n type=\"datetime-local\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"dateToLocalDatetimeString(valueSet?.getValue(property.name))\"\r\n (ngModelChange)=\"setValue(property, localDatetimeStringToDate($event))\"\r\n />\r\n <input\r\n *ngIf=\"property.type === Type.Date\"\r\n type=\"date\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"valueSet?.getValue(property.name)\"\r\n (ngModelChange)=\"setValue(property, $event)\"\r\n />\r\n <input\r\n *ngIf=\"property.type === Type.Time\"\r\n type=\"time\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"valueSet?.getValue(property.name)\"\r\n (ngModelChange)=\"setValue(property, $event)\"\r\n />\r\n <input\r\n *ngIf=\"property.type === Type.Url\"\r\n type=\"url\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"valueSet?.getValue(property.name)\"\r\n (ngModelChange)=\"setValue(property, $event)\"\r\n />\r\n <div class=\"daga-radio\" *ngIf=\"property.type === Type.Boolean\">\r\n <label\r\n class=\"daga-radio-item daga-radio-start\"\r\n [class]=\"\r\n valueSet?.getValue(property.name) === false ? 'daga-checked' : ''\r\n \"\r\n >\r\n <input\r\n type=\"radio\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [name]=\"property.name\"\r\n value=\"false\"\r\n (change)=\"setValue(property, false)\"\r\n />\r\n No\r\n </label>\r\n <label\r\n class=\"daga-radio-item daga-radio-end\"\r\n [class]=\"valueSet?.getValue(property.name) === true ? 'daga-checked' : ''\"\r\n >\r\n <input\r\n type=\"radio\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [name]=\"property.name\"\r\n value=\"true\"\r\n (change)=\"setValue(property, true)\"\r\n />\r\n Yes\r\n </label>\r\n </div>\r\n <div class=\"daga-relatively-positioned\" *ngIf=\"property.type === Type.Option\">\r\n <daga-autocomplete\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [options]=\"property.options || []\"\r\n [value]=\"valueSet?.getValue(property.name)\"\r\n (valueChange)=\"setValue(property, $event)\"\r\n />\r\n </div>\r\n <daga-option-list-editor\r\n *ngIf=\"\r\n property.type === Type.OptionList || property.type === Type.OptionSet\r\n \"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [allowRepeats]=\"property.type === Type.OptionList\"\r\n [options]=\"property.options || []\"\r\n [value]=\"valueSet?.getValue(property.name)\"\r\n (valueChange)=\"setValue(property, $event)\"\r\n ></daga-option-list-editor>\r\n <daga-text-list-editor\r\n *ngIf=\"property.type === Type.TextList || property.type === Type.TextSet\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [allowRepeats]=\"property.type === Type.TextList\"\r\n [value]=\"valueSet?.getValue(property.name)\"\r\n (valueChange)=\"setValue(property, $event)\"\r\n ></daga-text-list-editor>\r\n <daga-text-map-editor\r\n *ngIf=\"property.type === Type.TextMap\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [value]=\"valueSet?.getValue(property.name)\"\r\n (valueChange)=\"setValue(property, $event)\"\r\n ></daga-text-map-editor>\r\n <div *ngIf=\"property.type === Type.Object\" class=\"daga-left-bar\">\r\n <daga-object-editor\r\n [valueSet]=\"valueSet?.getSubValueSet(property.name)\"\r\n [depth]=\"depth + 1\"\r\n ></daga-object-editor>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "component", type: ObjectEditorComponent, selector: "daga-object-editor", inputs: ["valueSet", "depth"] }, { kind: "component", type: AutocompleteComponent, selector: "daga-autocomplete", inputs: ["value", "valueInput", "options", "disabled"], outputs: ["valueChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.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: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: OptionListEditorComponent, selector: "daga-option-list-editor", inputs: ["value", "options", "valueInput", "allowRepeats", "optionsNotPresentInValue", "disabled"], outputs: ["valueChange"] }, { kind: "component", type: TextListEditorComponent, selector: "daga-text-list-editor", inputs: ["value", "valueInput", "allowRepeats", "disabled"], outputs: ["valueChange"] }, { kind: "component", type: TextMapEditorComponent, selector: "daga-text-map-editor", inputs: ["value", "keyInput", "valueInput", "disabled"], outputs: ["valueChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1597
1713
  }
1598
1714
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ObjectEditorComponent, decorators: [{
1599
1715
  type: Component,
@@ -1604,7 +1720,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
1604
1720
  OptionListEditorComponent,
1605
1721
  TextListEditorComponent,
1606
1722
  TextMapEditorComponent
1607
- ], template: "<div\r\n *ngFor=\"let property of valueSet?.displayedProperties || []\"\r\n class=\"daga-property\"\r\n [class]=\"getStyleClassName(property.name) + ' daga-depth-' + depth\"\r\n>\r\n <p class=\"daga-property-name\">\r\n {{ property.name }}\r\n </p>\r\n\r\n <input\r\n *ngIf=\"property.type === Type.Text\"\r\n type=\"daga-text\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"valueSet?.getValue(property.name)\"\r\n (ngModelChange)=\"setValue(property, $event)\"\r\n />\r\n <textarea\r\n *ngIf=\"property.type === Type.TextArea\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"valueSet?.getValue(property.name)\"\r\n (ngModelChange)=\"setValue(property, $event)\"\r\n ></textarea>\r\n <input\r\n *ngIf=\"property.type === Type.Number\"\r\n type=\"number\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"valueSet?.getValue(property.name)\"\r\n (ngModelChange)=\"setValue(property, $event)\"\r\n />\r\n <input\r\n *ngIf=\"property.type === Type.Color\"\r\n type=\"text\"\r\n pattern=\"#\\d{6}\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"valueSet?.getValue(property.name)\"\r\n (ngModelChange)=\"setValue(property, $event)\"\r\n />\r\n <input\r\n *ngIf=\"property.type === Type.Datetime\"\r\n type=\"datetime-local\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"dateToLocalDatetimeString(valueSet?.getValue(property.name))\"\r\n (ngModelChange)=\"setValue(property, localDatetimeStringToDate($event))\"\r\n />\r\n <input\r\n *ngIf=\"property.type === Type.Date\"\r\n type=\"date\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"valueSet?.getValue(property.name)\"\r\n (ngModelChange)=\"setValue(property, $event)\"\r\n />\r\n <input\r\n *ngIf=\"property.type === Type.Time\"\r\n type=\"time\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"valueSet?.getValue(property.name)\"\r\n (ngModelChange)=\"setValue(property, $event)\"\r\n />\r\n <input\r\n *ngIf=\"property.type === Type.Url\"\r\n type=\"url\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"valueSet?.getValue(property.name)\"\r\n (ngModelChange)=\"setValue(property, $event)\"\r\n />\r\n <div class=\"daga-radio\" *ngIf=\"property.type === Type.Boolean\">\r\n <label\r\n class=\"daga-radio-item daga-radio-start\"\r\n [class]=\"\r\n valueSet?.getValue(property.name) === false ? 'daga-checked' : ''\r\n \"\r\n >\r\n <input\r\n type=\"radio\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [name]=\"property.name\"\r\n value=\"false\"\r\n (change)=\"setValue(property, false)\"\r\n />\r\n No\r\n </label>\r\n <label\r\n class=\"daga-radio-item daga-radio-end\"\r\n [class]=\"valueSet?.getValue(property.name) === true ? 'daga-checked' : ''\"\r\n >\r\n <input\r\n type=\"radio\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [name]=\"property.name\"\r\n value=\"true\"\r\n (change)=\"setValue(property, true)\"\r\n />\r\n Yes\r\n </label>\r\n </div>\r\n <div class=\"daga-relatively-positioned\" *ngIf=\"property.type === Type.Option\">\r\n <daga-autocomplete\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [options]=\"property.options || []\"\r\n [value]=\"valueSet?.getValue(property.name)\"\r\n (valueChange)=\"setValue(property, $event)\"\r\n />\r\n </div>\r\n <daga-option-list-editor\r\n *ngIf=\"\r\n property.type === Type.OptionList || property.type === Type.OptionSet\r\n \"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [allowRepeats]=\"property.type === Type.OptionList\"\r\n [options]=\"property.options || []\"\r\n [value]=\"valueSet?.getValue(property.name)\"\r\n (valueChange)=\"setValue(property, $event)\"\r\n ></daga-option-list-editor>\r\n <daga-text-list-editor\r\n *ngIf=\"property.type === Type.TextList || property.type === Type.TextSet\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [allowRepeats]=\"property.type === Type.TextList\"\r\n [value]=\"valueSet?.getValue(property.name)\"\r\n (valueChange)=\"setValue(property, $event)\"\r\n ></daga-text-list-editor>\r\n <daga-text-map-editor\r\n *ngIf=\"property.type === Type.TextMap\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [value]=\"valueSet?.getValue(property.name)\"\r\n (valueChange)=\"setValue(property, $event)\"\r\n ></daga-text-map-editor>\r\n <div *ngIf=\"property.type === Type.Object\" class=\"daga-left-bar\">\r\n <daga-object-editor\r\n [valueSet]=\"valueSet?.getSubValueSet(property.name)\"\r\n [depth]=\"depth + 1\"\r\n ></daga-object-editor>\r\n </div>\r\n</div>\r\n" }]
1723
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n *ngFor=\"let property of valueSet?.displayedProperties || []\"\r\n class=\"daga-property\"\r\n [class]=\"getStyleClassName(property.name) + ' daga-depth-' + depth\"\r\n>\r\n <p class=\"daga-property-name\">\r\n {{ property.name }}\r\n </p>\r\n\r\n <input\r\n *ngIf=\"property.type === Type.Text\"\r\n type=\"daga-text\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"valueSet?.getValue(property.name)\"\r\n (ngModelChange)=\"setValue(property, $event)\"\r\n />\r\n <textarea\r\n *ngIf=\"property.type === Type.TextArea\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"valueSet?.getValue(property.name)\"\r\n (ngModelChange)=\"setValue(property, $event)\"\r\n ></textarea>\r\n <input\r\n *ngIf=\"property.type === Type.Number\"\r\n type=\"number\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"valueSet?.getValue(property.name)\"\r\n (ngModelChange)=\"setValue(property, $event)\"\r\n />\r\n <input\r\n *ngIf=\"property.type === Type.Color\"\r\n type=\"text\"\r\n pattern=\"#\\d{6}\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"valueSet?.getValue(property.name)\"\r\n (ngModelChange)=\"setValue(property, $event)\"\r\n />\r\n <input\r\n *ngIf=\"property.type === Type.Datetime\"\r\n type=\"datetime-local\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"dateToLocalDatetimeString(valueSet?.getValue(property.name))\"\r\n (ngModelChange)=\"setValue(property, localDatetimeStringToDate($event))\"\r\n />\r\n <input\r\n *ngIf=\"property.type === Type.Date\"\r\n type=\"date\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"valueSet?.getValue(property.name)\"\r\n (ngModelChange)=\"setValue(property, $event)\"\r\n />\r\n <input\r\n *ngIf=\"property.type === Type.Time\"\r\n type=\"time\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"valueSet?.getValue(property.name)\"\r\n (ngModelChange)=\"setValue(property, $event)\"\r\n />\r\n <input\r\n *ngIf=\"property.type === Type.Url\"\r\n type=\"url\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [ngModel]=\"valueSet?.getValue(property.name)\"\r\n (ngModelChange)=\"setValue(property, $event)\"\r\n />\r\n <div class=\"daga-radio\" *ngIf=\"property.type === Type.Boolean\">\r\n <label\r\n class=\"daga-radio-item daga-radio-start\"\r\n [class]=\"\r\n valueSet?.getValue(property.name) === false ? 'daga-checked' : ''\r\n \"\r\n >\r\n <input\r\n type=\"radio\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [name]=\"property.name\"\r\n value=\"false\"\r\n (change)=\"setValue(property, false)\"\r\n />\r\n No\r\n </label>\r\n <label\r\n class=\"daga-radio-item daga-radio-end\"\r\n [class]=\"valueSet?.getValue(property.name) === true ? 'daga-checked' : ''\"\r\n >\r\n <input\r\n type=\"radio\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [name]=\"property.name\"\r\n value=\"true\"\r\n (change)=\"setValue(property, true)\"\r\n />\r\n Yes\r\n </label>\r\n </div>\r\n <div class=\"daga-relatively-positioned\" *ngIf=\"property.type === Type.Option\">\r\n <daga-autocomplete\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [options]=\"property.options || []\"\r\n [value]=\"valueSet?.getValue(property.name)\"\r\n (valueChange)=\"setValue(property, $event)\"\r\n />\r\n </div>\r\n <daga-option-list-editor\r\n *ngIf=\"\r\n property.type === Type.OptionList || property.type === Type.OptionSet\r\n \"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [allowRepeats]=\"property.type === Type.OptionList\"\r\n [options]=\"property.options || []\"\r\n [value]=\"valueSet?.getValue(property.name)\"\r\n (valueChange)=\"setValue(property, $event)\"\r\n ></daga-option-list-editor>\r\n <daga-text-list-editor\r\n *ngIf=\"property.type === Type.TextList || property.type === Type.TextSet\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [allowRepeats]=\"property.type === Type.TextList\"\r\n [value]=\"valueSet?.getValue(property.name)\"\r\n (valueChange)=\"setValue(property, $event)\"\r\n ></daga-text-list-editor>\r\n <daga-text-map-editor\r\n *ngIf=\"property.type === Type.TextMap\"\r\n [disabled]=\"!property.editable || !userCanEdit\"\r\n [value]=\"valueSet?.getValue(property.name)\"\r\n (valueChange)=\"setValue(property, $event)\"\r\n ></daga-text-map-editor>\r\n <div *ngIf=\"property.type === Type.Object\" class=\"daga-left-bar\">\r\n <daga-object-editor\r\n [valueSet]=\"valueSet?.getSubValueSet(property.name)\"\r\n [depth]=\"depth + 1\"\r\n ></daga-object-editor>\r\n </div>\r\n</div>\r\n" }]
1608
1724
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: CanvasProviderService }], propDecorators: { valueSet: [{
1609
1725
  type: Input
1610
1726
  }], depth: [{
@@ -1632,19 +1748,43 @@ class PropertyEditorComponent {
1632
1748
  this.cdr.detectChanges();
1633
1749
  }
1634
1750
  }
1635
- constructor(cdr) {
1751
+ constructor(cdr, configService) {
1636
1752
  this.cdr = cdr;
1753
+ this.configService = configService;
1754
+ }
1755
+ ngOnInit() {
1756
+ this.sub = this.configService.config$.subscribe((c) => {
1757
+ this.init(c);
1758
+ });
1637
1759
  }
1638
1760
  ngAfterViewInit() {
1639
- switch (this.direction) {
1640
- case Side.Bottom:
1641
- case Side.Top:
1642
- this.selectPanel().style('width', this.width);
1643
- break;
1644
- case Side.Left:
1645
- case Side.Right:
1646
- this.selectPanel().style('height', this.width);
1647
- break;
1761
+ this.setPanelWidth();
1762
+ }
1763
+ ngOnDestroy() {
1764
+ this.sub?.unsubscribe();
1765
+ }
1766
+ init(config) {
1767
+ this.location =
1768
+ config.components?.propertyEditor?.location || Corner.TopRight;
1769
+ this.direction =
1770
+ config.components?.propertyEditor?.direction || Side.Bottom;
1771
+ this.width = config.components?.propertyEditor?.width || '24rem';
1772
+ this.title = undefined;
1773
+ this.valueSet = undefined;
1774
+ this.setPanelWidth();
1775
+ }
1776
+ setPanelWidth() {
1777
+ if (this.panel !== undefined) {
1778
+ switch (this.direction) {
1779
+ case Side.Bottom:
1780
+ case Side.Top:
1781
+ this.selectPanel().style('width', this.width);
1782
+ break;
1783
+ case Side.Left:
1784
+ case Side.Right:
1785
+ this.selectPanel().style('height', this.width);
1786
+ break;
1787
+ }
1648
1788
  }
1649
1789
  }
1650
1790
  selectPanel() {
@@ -1669,8 +1809,8 @@ class PropertyEditorComponent {
1669
1809
  });
1670
1810
  }
1671
1811
  }
1672
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: PropertyEditorComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1673
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: PropertyEditorComponent, isStandalone: true, selector: "daga-property-editor", inputs: { location: "location", direction: "direction", width: "width", valueSet: "valueSet" }, viewQueries: [{ propertyName: "panel", first: true, predicate: ["panel"], descendants: true }], ngImport: i0, template: "<div\r\n #panel\r\n class=\"daga-panel daga-bottom daga-{{ location }} daga-{{ direction }}\"\r\n>\r\n <daga-collapse-button\r\n #collapse\r\n [disabled]=\"\r\n !valueSet ||\r\n !valueSet.propertySet ||\r\n !valueSet.propertySet.hasProperties()\r\n \"\r\n [direction]=\"direction\"\r\n [collapsableSelector]=\"panel\"\r\n collapsableAdditionalSelector=\".daga-panel-content\"\r\n rule=\"display\"\r\n collapsedValue=\"none\"\r\n visibleValue=\"block\"\r\n />\r\n <div\r\n *ngIf=\"\r\n valueSet &&\r\n valueSet.propertySet &&\r\n valueSet.propertySet.hasProperties() &&\r\n !collapse.collapsed\r\n \"\r\n class=\"daga-panel-content\"\r\n >\r\n <p *ngIf=\"title\" class=\"daga-title\">\r\n {{ title }}\r\n <button class=\"daga-property-button\" (click)=\"settings = !settings\">\r\n <div\r\n class=\"daga-icon daga-settings-icon\"\r\n [class]=\"\r\n settings === undefined\r\n ? ''\r\n : settings\r\n ? 'daga-unrotate'\r\n : 'daga-rotate'\r\n \"\r\n ></div>\r\n </button>\r\n </p>\r\n <daga-object-editor *ngIf=\"!settings\" [valueSet]=\"valueSet\" />\r\n <daga-property-settings *ngIf=\"settings\" [valueSet]=\"valueSet\" />\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CollapseButtonComponent, selector: "daga-collapse-button", inputs: ["collapsableSelector", "collapsableAdditionalSelector", "collapsed", "disabled", "direction", "rule", "collapsedValue", "visibleValue"] }, { kind: "component", type: ObjectEditorComponent, selector: "daga-object-editor", inputs: ["valueSet", "depth"] }, { kind: "component", type: PropertySettingsComponent, selector: "daga-property-settings", inputs: ["valueSet", "depth"] }] }); }
1812
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: PropertyEditorComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: DagaConfigurationService }], target: i0.ɵɵFactoryTarget.Component }); }
1813
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: PropertyEditorComponent, isStandalone: true, selector: "daga-property-editor", inputs: { valueSet: "valueSet" }, viewQueries: [{ propertyName: "panel", first: true, predicate: ["panel"], descendants: true }], ngImport: i0, template: "<div\r\n #panel\r\n class=\"daga-panel daga-bottom daga-{{ location }} daga-{{ direction }}\"\r\n>\r\n <daga-collapse-button\r\n #collapse\r\n [disabled]=\"\r\n !valueSet ||\r\n !valueSet.propertySet ||\r\n !valueSet.propertySet.hasProperties()\r\n \"\r\n [direction]=\"direction\"\r\n [collapsableSelector]=\"panel\"\r\n collapsableAdditionalSelector=\".daga-panel-content\"\r\n rule=\"display\"\r\n collapsedValue=\"none\"\r\n visibleValue=\"block\"\r\n />\r\n <div\r\n *ngIf=\"\r\n valueSet &&\r\n valueSet.propertySet &&\r\n valueSet.propertySet.hasProperties() &&\r\n !collapse.collapsed\r\n \"\r\n class=\"daga-panel-content\"\r\n >\r\n <p *ngIf=\"title\" class=\"daga-title\">\r\n {{ title }}\r\n <button class=\"daga-property-button\" (click)=\"settings = !settings\">\r\n <div\r\n class=\"daga-icon daga-settings-icon\"\r\n [class]=\"\r\n settings === undefined\r\n ? ''\r\n : settings\r\n ? 'daga-unrotate'\r\n : 'daga-rotate'\r\n \"\r\n ></div>\r\n </button>\r\n </p>\r\n <daga-object-editor *ngIf=\"!settings\" [valueSet]=\"valueSet\" />\r\n <daga-property-settings *ngIf=\"settings\" [valueSet]=\"valueSet\" />\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CollapseButtonComponent, selector: "daga-collapse-button", inputs: ["collapsableSelector", "collapsableAdditionalSelector", "collapsed", "disabled", "direction", "rule", "collapsedValue", "visibleValue"] }, { kind: "component", type: ObjectEditorComponent, selector: "daga-object-editor", inputs: ["valueSet", "depth"] }, { kind: "component", type: PropertySettingsComponent, selector: "daga-property-settings", inputs: ["valueSet", "depth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1674
1814
  }
1675
1815
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: PropertyEditorComponent, decorators: [{
1676
1816
  type: Component,
@@ -1679,16 +1819,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
1679
1819
  CollapseButtonComponent,
1680
1820
  ObjectEditorComponent,
1681
1821
  PropertySettingsComponent
1682
- ], template: "<div\r\n #panel\r\n class=\"daga-panel daga-bottom daga-{{ location }} daga-{{ direction }}\"\r\n>\r\n <daga-collapse-button\r\n #collapse\r\n [disabled]=\"\r\n !valueSet ||\r\n !valueSet.propertySet ||\r\n !valueSet.propertySet.hasProperties()\r\n \"\r\n [direction]=\"direction\"\r\n [collapsableSelector]=\"panel\"\r\n collapsableAdditionalSelector=\".daga-panel-content\"\r\n rule=\"display\"\r\n collapsedValue=\"none\"\r\n visibleValue=\"block\"\r\n />\r\n <div\r\n *ngIf=\"\r\n valueSet &&\r\n valueSet.propertySet &&\r\n valueSet.propertySet.hasProperties() &&\r\n !collapse.collapsed\r\n \"\r\n class=\"daga-panel-content\"\r\n >\r\n <p *ngIf=\"title\" class=\"daga-title\">\r\n {{ title }}\r\n <button class=\"daga-property-button\" (click)=\"settings = !settings\">\r\n <div\r\n class=\"daga-icon daga-settings-icon\"\r\n [class]=\"\r\n settings === undefined\r\n ? ''\r\n : settings\r\n ? 'daga-unrotate'\r\n : 'daga-rotate'\r\n \"\r\n ></div>\r\n </button>\r\n </p>\r\n <daga-object-editor *ngIf=\"!settings\" [valueSet]=\"valueSet\" />\r\n <daga-property-settings *ngIf=\"settings\" [valueSet]=\"valueSet\" />\r\n </div>\r\n</div>\r\n" }]
1683
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { panel: [{
1822
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n #panel\r\n class=\"daga-panel daga-bottom daga-{{ location }} daga-{{ direction }}\"\r\n>\r\n <daga-collapse-button\r\n #collapse\r\n [disabled]=\"\r\n !valueSet ||\r\n !valueSet.propertySet ||\r\n !valueSet.propertySet.hasProperties()\r\n \"\r\n [direction]=\"direction\"\r\n [collapsableSelector]=\"panel\"\r\n collapsableAdditionalSelector=\".daga-panel-content\"\r\n rule=\"display\"\r\n collapsedValue=\"none\"\r\n visibleValue=\"block\"\r\n />\r\n <div\r\n *ngIf=\"\r\n valueSet &&\r\n valueSet.propertySet &&\r\n valueSet.propertySet.hasProperties() &&\r\n !collapse.collapsed\r\n \"\r\n class=\"daga-panel-content\"\r\n >\r\n <p *ngIf=\"title\" class=\"daga-title\">\r\n {{ title }}\r\n <button class=\"daga-property-button\" (click)=\"settings = !settings\">\r\n <div\r\n class=\"daga-icon daga-settings-icon\"\r\n [class]=\"\r\n settings === undefined\r\n ? ''\r\n : settings\r\n ? 'daga-unrotate'\r\n : 'daga-rotate'\r\n \"\r\n ></div>\r\n </button>\r\n </p>\r\n <daga-object-editor *ngIf=\"!settings\" [valueSet]=\"valueSet\" />\r\n <daga-property-settings *ngIf=\"settings\" [valueSet]=\"valueSet\" />\r\n </div>\r\n</div>\r\n" }]
1823
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: DagaConfigurationService }], propDecorators: { panel: [{
1684
1824
  type: ViewChild,
1685
1825
  args: ['panel']
1686
- }], location: [{
1687
- type: Input
1688
- }], direction: [{
1689
- type: Input
1690
- }], width: [{
1691
- type: Input
1692
1826
  }], valueSet: [{
1693
1827
  type: Input
1694
1828
  }] } });
@@ -1697,88 +1831,34 @@ const getStyleClassName = (s) => {
1697
1831
  };
1698
1832
 
1699
1833
  /**
1700
- * A provider for the {@link DiagramConfig} associated with a {@link DiagramComponent} context.
1834
+ * The context of a diagram. Every separate diagram must be contained within its own {@link DiagramComponent} and every {@link DiagramComponent} must contain its own {@link DiagramEditorComponent}.
1835
+ * This component defines a {@link DagaConfigurationService} and a {@link CanvasProviderService}, which is shared by all the components within and allows accessing the configuration and the canvas of this component's diagram, respectively.
1701
1836
  * @public
1702
1837
  */
1703
- class DagaConfigurationService {
1704
- /**
1705
- * Set the diagram configuration of this context.
1706
- * @private
1707
- * @param config A diagram configuration.
1708
- */
1709
- init(config) {
1710
- this._config = config;
1711
- }
1838
+ class DiagramComponent {
1712
1839
  /**
1713
- * Get the diagram configuration of this context. Should only be called after the {@link DiagramComponent} context has been initialized.
1840
+ * Getter for the configuration of this diagram.
1714
1841
  * @public
1715
- * @returns A diagram configuration.
1716
1842
  */
1717
- getConfig() {
1718
- return this._config;
1719
- }
1720
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DagaConfigurationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1721
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DagaConfigurationService }); }
1722
- }
1723
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DagaConfigurationService, decorators: [{
1724
- type: Injectable
1725
- }] });
1726
-
1727
- /**
1728
- * A diagram's user interface editor.
1729
- * @private
1730
- */
1731
- class DiagramEditorComponent {
1732
1843
  get config() {
1733
1844
  return this.configurationService.getConfig();
1734
1845
  }
1735
- get canvas() {
1736
- return this.canvasProvider.getCanvas();
1737
- }
1738
- constructor(configurationService, canvasProvider) {
1739
- this.configurationService = configurationService;
1740
- this.canvasProvider = canvasProvider;
1741
- this.Corner = Corner;
1742
- this.Side = Side;
1743
- }
1744
- ngOnInit() {
1745
- this.canvasProvider.initCanvas(this, this.config);
1846
+ /**
1847
+ * Setter for the configuration for the diagram.
1848
+ * @public
1849
+ */
1850
+ set config(config) {
1851
+ if (this.configurationService.getConfig() !== config) {
1852
+ this.configurationService.init(config);
1853
+ }
1746
1854
  }
1747
- ngAfterViewInit() {
1748
- this.canvasProvider.initCanvasView(this.appendTo.nativeElement);
1855
+ /**
1856
+ * Subject used to track when the diagram configuration has been updated.
1857
+ * @public
1858
+ */
1859
+ get config$() {
1860
+ return this.configurationService.config$;
1749
1861
  }
1750
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DiagramEditorComponent, deps: [{ token: DagaConfigurationService }, { token: CanvasProviderService }], target: i0.ɵɵFactoryTarget.Component }); }
1751
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: DiagramEditorComponent, isStandalone: true, selector: "daga-diagram-editor", viewQueries: [{ propertyName: "appendTo", first: true, predicate: ["appendTo"], descendants: true }, { propertyName: "diagramButtons", first: true, predicate: ["diagramButtons"], descendants: true }, { propertyName: "palette", first: true, predicate: ["palette"], descendants: true }, { propertyName: "propertyEditor", first: true, predicate: ["propertyEditor"], descendants: true }], ngImport: i0, template: "<div class=\"daga-append-to\" #appendTo></div>\r\n<daga-diagram-buttons\r\n *ngIf=\"\r\n config.components?.buttons !== undefined &&\r\n config.components?.buttons?.enabled !== false\r\n \"\r\n #diagramButtons\r\n [location]=\"config.components?.buttons?.location || Corner.BottomRight\"\r\n [direction]=\"config.components?.buttons?.direction || Side.Top\"\r\n [enableAction]=\"config.components?.buttons?.enableAction === true\"\r\n [enableFilter]=\"config.components?.buttons?.enableFilter === true\"\r\n [enableLayout]=\"config.components?.buttons?.enableLayout === true\"\r\n [enableSelection]=\"config.components?.buttons?.enableSelection === true\"\r\n [enableZoom]=\"config.components?.buttons?.enableZoom !== false\"\r\n/>\r\n<daga-palette\r\n *ngIf=\"\r\n config.components?.palette !== undefined &&\r\n config.components?.palette?.enabled !== false &&\r\n config.components?.palette?.sections &&\r\n (config.components?.palette?.sections?.length || 0) > 0\r\n \"\r\n #palette\r\n [location]=\"config.components?.palette?.location || Corner.TopLeft\"\r\n [direction]=\"config.components?.palette?.direction || Side.Bottom\"\r\n [width]=\"config.components?.palette?.width || '12rem'\"\r\n [gap]=\"config.components?.palette?.gap || '1rem'\"\r\n [palettes]=\"config.components?.palette?.sections || []\"\r\n/>\r\n<daga-property-editor\r\n *ngIf=\"\r\n config.components?.propertyEditor !== undefined &&\r\n config.components?.propertyEditor?.enabled !== false\r\n \"\r\n #propertyEditor\r\n [location]=\"config.components?.propertyEditor?.location || Corner.TopRight\"\r\n [direction]=\"config.components?.propertyEditor?.direction || Side.Bottom\"\r\n [width]=\"config.components?.propertyEditor?.width || '24rem'\"\r\n/>\r\n<daga-errors\r\n *ngIf=\"\r\n config.components?.errors !== undefined &&\r\n config.components?.errors?.enabled !== false\r\n \"\r\n/>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: DiagramButtonsComponent, selector: "daga-diagram-buttons", inputs: ["location", "direction", "enableAction", "enableFilter", "enableLayout", "enableSelection", "enableZoom"] }, { kind: "component", type: PaletteComponent, selector: "daga-palette", inputs: ["palettes", "currentPalette", "currentCategory", "location", "direction", "width", "gap"] }, { kind: "component", type: PropertyEditorComponent, selector: "daga-property-editor", inputs: ["location", "direction", "width", "valueSet"] }, { kind: "component", type: ErrorsComponent, selector: "daga-errors" }] }); }
1752
- }
1753
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DiagramEditorComponent, decorators: [{
1754
- type: Component,
1755
- args: [{ selector: 'daga-diagram-editor', imports: [
1756
- CommonModule,
1757
- DiagramButtonsComponent,
1758
- PaletteComponent,
1759
- PropertyEditorComponent,
1760
- ErrorsComponent
1761
- ], template: "<div class=\"daga-append-to\" #appendTo></div>\r\n<daga-diagram-buttons\r\n *ngIf=\"\r\n config.components?.buttons !== undefined &&\r\n config.components?.buttons?.enabled !== false\r\n \"\r\n #diagramButtons\r\n [location]=\"config.components?.buttons?.location || Corner.BottomRight\"\r\n [direction]=\"config.components?.buttons?.direction || Side.Top\"\r\n [enableAction]=\"config.components?.buttons?.enableAction === true\"\r\n [enableFilter]=\"config.components?.buttons?.enableFilter === true\"\r\n [enableLayout]=\"config.components?.buttons?.enableLayout === true\"\r\n [enableSelection]=\"config.components?.buttons?.enableSelection === true\"\r\n [enableZoom]=\"config.components?.buttons?.enableZoom !== false\"\r\n/>\r\n<daga-palette\r\n *ngIf=\"\r\n config.components?.palette !== undefined &&\r\n config.components?.palette?.enabled !== false &&\r\n config.components?.palette?.sections &&\r\n (config.components?.palette?.sections?.length || 0) > 0\r\n \"\r\n #palette\r\n [location]=\"config.components?.palette?.location || Corner.TopLeft\"\r\n [direction]=\"config.components?.palette?.direction || Side.Bottom\"\r\n [width]=\"config.components?.palette?.width || '12rem'\"\r\n [gap]=\"config.components?.palette?.gap || '1rem'\"\r\n [palettes]=\"config.components?.palette?.sections || []\"\r\n/>\r\n<daga-property-editor\r\n *ngIf=\"\r\n config.components?.propertyEditor !== undefined &&\r\n config.components?.propertyEditor?.enabled !== false\r\n \"\r\n #propertyEditor\r\n [location]=\"config.components?.propertyEditor?.location || Corner.TopRight\"\r\n [direction]=\"config.components?.propertyEditor?.direction || Side.Bottom\"\r\n [width]=\"config.components?.propertyEditor?.width || '24rem'\"\r\n/>\r\n<daga-errors\r\n *ngIf=\"\r\n config.components?.errors !== undefined &&\r\n config.components?.errors?.enabled !== false\r\n \"\r\n/>\r\n" }]
1762
- }], ctorParameters: () => [{ type: DagaConfigurationService }, { type: CanvasProviderService }], propDecorators: { appendTo: [{
1763
- type: ViewChild,
1764
- args: ['appendTo']
1765
- }], diagramButtons: [{
1766
- type: ViewChild,
1767
- args: ['diagramButtons']
1768
- }], palette: [{
1769
- type: ViewChild,
1770
- args: ['palette']
1771
- }], propertyEditor: [{
1772
- type: ViewChild,
1773
- args: ['propertyEditor']
1774
- }] } });
1775
-
1776
- /**
1777
- * The context of a diagram. Every separate diagram must be contained within its own {@link DiagramComponent} and every {@link DiagramComponent} must contain its own {@link DiagramEditorComponent}.
1778
- * This component defines a {@link DagaConfigurationService} and a {@link CanvasProviderService}, which is shared by all the components within and allows accessing the configuration and the canvas of this component's diagram, respectively.
1779
- * @public
1780
- */
1781
- class DiagramComponent {
1782
1862
  /**
1783
1863
  * Getter for the canvas of this diagram.
1784
1864
  * @public
@@ -1786,6 +1866,13 @@ class DiagramComponent {
1786
1866
  get canvas() {
1787
1867
  return this.canvasProvider.getCanvas();
1788
1868
  }
1869
+ /**
1870
+ * Subject used to track when the canvas has been updated.
1871
+ * @public
1872
+ */
1873
+ get canvas$() {
1874
+ return this.canvasProvider.canvas$;
1875
+ }
1789
1876
  /**
1790
1877
  * Serialized model for the diagram. Used for data binding to the model.
1791
1878
  * @public
@@ -1806,9 +1893,10 @@ class DiagramComponent {
1806
1893
  }
1807
1894
  }
1808
1895
  }
1809
- constructor(configurationService, canvasProvider) {
1896
+ constructor(configurationService, canvasProvider, cdr) {
1810
1897
  this.configurationService = configurationService;
1811
1898
  this.canvasProvider = canvasProvider;
1899
+ this.cdr = cdr;
1812
1900
  this.importer = new DagaImporter();
1813
1901
  this.exporter = new DagaExporter();
1814
1902
  /**
@@ -1821,15 +1909,39 @@ class DiagramComponent {
1821
1909
  * @public
1822
1910
  */
1823
1911
  this.diagramEvent = new EventEmitter();
1912
+ this.Corner = Corner;
1913
+ this.Side = Side;
1824
1914
  }
1825
1915
  ngOnInit() {
1826
- this.configurationService.init(this.config);
1916
+ this.canvasProvider.initCanvas(this, this.config);
1917
+ this.setUpCanvas(this.canvasProvider.getCanvas());
1827
1918
  }
1828
1919
  ngAfterViewInit() {
1829
- const canvas = this.canvas;
1830
- if (this.model) {
1831
- this.importer.import(canvas.model, this.model);
1832
- }
1920
+ this.canvasProvider.initCanvasView(this.appendTo.nativeElement);
1921
+ this.canvasSub = this.canvasProvider.canvas$
1922
+ // we skip the first one as the subscribe() underneath is
1923
+ // for when the canvas is reloaded, not initially loaded
1924
+ .pipe(skip(1))
1925
+ .subscribe((c) => {
1926
+ // reset model of the old canvas
1927
+ this.model = this.exporter.export(c.model);
1928
+ this.setUpCanvas(c);
1929
+ });
1930
+ this.configurationSub = this.configurationService.config$
1931
+ // we skip the first one as the subscribe() underneath is
1932
+ // for when the config is reloaded, not initially loaded
1933
+ .pipe(skip(1))
1934
+ .subscribe((c) => {
1935
+ this.canvasProvider.initCanvas(this, c);
1936
+ this.canvasProvider.initCanvasView(this.appendTo.nativeElement);
1937
+ this.cdr.detectChanges();
1938
+ });
1939
+ }
1940
+ ngOnDestroy() {
1941
+ this.configurationSub?.unsubscribe();
1942
+ this.canvasSub?.unsubscribe();
1943
+ }
1944
+ setUpCanvas(canvas) {
1833
1945
  canvas.diagramEvent$.subscribe((e) => {
1834
1946
  this.diagramEvent.emit(e);
1835
1947
  });
@@ -1838,22 +1950,34 @@ class DiagramComponent {
1838
1950
  this._model = exportedModel;
1839
1951
  this.modelChange.emit(exportedModel);
1840
1952
  });
1953
+ if (this.model) {
1954
+ this.importer.import(canvas.model, this.model);
1955
+ }
1841
1956
  }
1842
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DiagramComponent, deps: [{ token: DagaConfigurationService }, { token: CanvasProviderService }], target: i0.ɵɵFactoryTarget.Component }); }
1843
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: DiagramComponent, isStandalone: true, selector: "daga-diagram", inputs: { config: "config", model: "model" }, outputs: { modelChange: "modelChange", diagramEvent: "diagramEvent" }, providers: [CanvasProviderService, DagaConfigurationService], viewQueries: [{ propertyName: "editor", first: true, predicate: DiagramEditorComponent, descendants: true }], ngImport: i0, template: `<daga-diagram-editor /><ng-content />`, isInline: true, dependencies: [{ kind: "component", type: DiagramEditorComponent, selector: "daga-diagram-editor" }] }); }
1957
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DiagramComponent, deps: [{ token: DagaConfigurationService }, { token: CanvasProviderService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1958
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: DiagramComponent, isStandalone: true, selector: "daga-diagram", inputs: { config: "config", model: "model" }, outputs: { modelChange: "modelChange", diagramEvent: "diagramEvent" }, providers: [CanvasProviderService, DagaConfigurationService], viewQueries: [{ propertyName: "appendTo", first: true, predicate: ["appendTo"], descendants: true }, { propertyName: "diagramButtons", first: true, predicate: ["diagramButtons"], descendants: true }, { propertyName: "palette", first: true, predicate: ["palette"], descendants: true }, { propertyName: "propertyEditor", first: true, predicate: ["propertyEditor"], descendants: true }], ngImport: i0, template: "<div class=\"daga-append-to\" #appendTo></div>\r\n<daga-diagram-buttons\r\n *ngIf=\"\r\n config.components?.buttons !== undefined &&\r\n config.components?.buttons?.enabled !== false\r\n \"\r\n #diagramButtons\r\n/>\r\n<daga-palette\r\n *ngIf=\"\r\n config.components?.palette !== undefined &&\r\n config.components?.palette?.enabled !== false &&\r\n config.components?.palette?.sections &&\r\n (config.components?.palette?.sections?.length || 0) > 0\r\n \"\r\n #palette\r\n/>\r\n<daga-property-editor\r\n *ngIf=\"\r\n config.components?.propertyEditor !== undefined &&\r\n config.components?.propertyEditor?.enabled !== false\r\n \"\r\n #propertyEditor\r\n/>\r\n<daga-errors\r\n *ngIf=\"\r\n config.components?.errors !== undefined &&\r\n config.components?.errors?.enabled !== false\r\n \"\r\n/>\r\n<ng-content />\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: DiagramButtonsComponent, selector: "daga-diagram-buttons", inputs: ["location", "direction", "enableAction", "enableFilter", "enableLayout", "enableSelection", "enableZoom"] }, { kind: "component", type: PaletteComponent, selector: "daga-palette", inputs: ["palettes", "currentPalette", "currentCategory", "location", "direction", "width", "gap"] }, { kind: "component", type: PropertyEditorComponent, selector: "daga-property-editor", inputs: ["valueSet"] }, { kind: "component", type: ErrorsComponent, selector: "daga-errors" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1844
1959
  }
1845
1960
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DiagramComponent, decorators: [{
1846
1961
  type: Component,
1847
- args: [{
1848
- standalone: true,
1849
- selector: 'daga-diagram',
1850
- template: `<daga-diagram-editor /><ng-content />`,
1851
- providers: [CanvasProviderService, DagaConfigurationService],
1852
- imports: [DiagramEditorComponent]
1853
- }]
1854
- }], ctorParameters: () => [{ type: DagaConfigurationService }, { type: CanvasProviderService }], propDecorators: { editor: [{
1962
+ args: [{ standalone: true, selector: 'daga-diagram', providers: [CanvasProviderService, DagaConfigurationService], imports: [
1963
+ CommonModule,
1964
+ DiagramButtonsComponent,
1965
+ PaletteComponent,
1966
+ PropertyEditorComponent,
1967
+ ErrorsComponent
1968
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"daga-append-to\" #appendTo></div>\r\n<daga-diagram-buttons\r\n *ngIf=\"\r\n config.components?.buttons !== undefined &&\r\n config.components?.buttons?.enabled !== false\r\n \"\r\n #diagramButtons\r\n/>\r\n<daga-palette\r\n *ngIf=\"\r\n config.components?.palette !== undefined &&\r\n config.components?.palette?.enabled !== false &&\r\n config.components?.palette?.sections &&\r\n (config.components?.palette?.sections?.length || 0) > 0\r\n \"\r\n #palette\r\n/>\r\n<daga-property-editor\r\n *ngIf=\"\r\n config.components?.propertyEditor !== undefined &&\r\n config.components?.propertyEditor?.enabled !== false\r\n \"\r\n #propertyEditor\r\n/>\r\n<daga-errors\r\n *ngIf=\"\r\n config.components?.errors !== undefined &&\r\n config.components?.errors?.enabled !== false\r\n \"\r\n/>\r\n<ng-content />\r\n" }]
1969
+ }], ctorParameters: () => [{ type: DagaConfigurationService }, { type: CanvasProviderService }, { type: i0.ChangeDetectorRef }], propDecorators: { appendTo: [{
1970
+ type: ViewChild,
1971
+ args: ['appendTo']
1972
+ }], diagramButtons: [{
1973
+ type: ViewChild,
1974
+ args: ['diagramButtons']
1975
+ }], palette: [{
1976
+ type: ViewChild,
1977
+ args: ['palette']
1978
+ }], propertyEditor: [{
1855
1979
  type: ViewChild,
1856
- args: [DiagramEditorComponent]
1980
+ args: ['propertyEditor']
1857
1981
  }], config: [{
1858
1982
  type: Input
1859
1983
  }], model: [{
@@ -1869,7 +1993,6 @@ class DagaModule {
1869
1993
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: DagaModule, imports: [CollapseButtonComponent,
1870
1994
  DiagramButtonsComponent,
1871
1995
  DiagramComponent,
1872
- DiagramEditorComponent,
1873
1996
  ErrorsComponent,
1874
1997
  ObjectEditorComponent,
1875
1998
  PaletteComponent,
@@ -1877,11 +2000,10 @@ class DagaModule {
1877
2000
  TextMapEditorComponent,
1878
2001
  PropertyEditorComponent,
1879
2002
  CommonModule,
1880
- FormsModule], exports: [DiagramComponent, DiagramEditorComponent] }); }
2003
+ FormsModule], exports: [DiagramComponent] }); }
1881
2004
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DagaModule, providers: [DagaConfigurationService, CanvasProviderService], imports: [CollapseButtonComponent,
1882
2005
  DiagramButtonsComponent,
1883
2006
  DiagramComponent,
1884
- DiagramEditorComponent,
1885
2007
  ErrorsComponent,
1886
2008
  ObjectEditorComponent,
1887
2009
  PaletteComponent,
@@ -1899,7 +2021,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
1899
2021
  CollapseButtonComponent,
1900
2022
  DiagramButtonsComponent,
1901
2023
  DiagramComponent,
1902
- DiagramEditorComponent,
1903
2024
  ErrorsComponent,
1904
2025
  ObjectEditorComponent,
1905
2026
  PaletteComponent,
@@ -1909,7 +2030,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
1909
2030
  CommonModule,
1910
2031
  FormsModule
1911
2032
  ],
1912
- exports: [DiagramComponent, DiagramEditorComponent],
2033
+ exports: [DiagramComponent],
1913
2034
  providers: [DagaConfigurationService, CanvasProviderService]
1914
2035
  }]
1915
2036
  }] });
@@ -1918,5 +2039,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
1918
2039
  * Generated bundle index. Do not edit.
1919
2040
  */
1920
2041
 
1921
- export { CanvasProviderService, CollapseButtonComponent, DagaConfigurationService, DagaModule, DiagramButtonsComponent, DiagramComponent, DiagramEditorComponent, ErrorsComponent, ObjectEditorComponent, PaletteComponent, PropertyEditorComponent, TextListEditorComponent, TextMapEditorComponent };
2042
+ export { CanvasProviderService, CollapseButtonComponent, DagaConfigurationService, DagaModule, DiagramButtonsComponent, DiagramComponent, ErrorsComponent, ObjectEditorComponent, PaletteComponent, PropertyEditorComponent, TextListEditorComponent, TextMapEditorComponent };
1922
2043
  //# sourceMappingURL=metadev-daga-angular.mjs.map