@metadev/daga-angular 3.0.0 → 3.1.1

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, Events, setCursorStyle, CursorStyle, DragEvents, AddNodeAction, generalClosedPath, DIAGRAM_FIELD_DEFAULTS, getLeftMargin, getTopMargin, Type, Property, isObject, equals, Keys, Corner, DagaImporter, DagaExporter } from '@metadev/daga';
2
- export { ACTION_STACK_SIZE, ActionStack, AddConnectionAction, AddNodeAction, AdjacencyLayout, BreadthAdjacencyLayout, BreadthLayout, ClosedShape, CollabClient, Corner, DagaExporter, DagaImporter, DiagramActions, DiagramCanvas, DiagramConnection, DiagramConnectionSet, DiagramConnectionType, DiagramDecorator, DiagramDecoratorSet, DiagramElement, DiagramElementSet, DiagramEntitySet, DiagramEvent, DiagramField, DiagramFieldSet, DiagramModel, DiagramNode, DiagramNodeSet, DiagramNodeType, DiagramObject, DiagramObjectSet, DiagramPort, DiagramPortSet, DiagramSection, DiagramSectionSet, EditFieldAction, ForceLayout, HorizontalAlign, HorizontalLayout, LineShape, LineStyle, PriorityLayout, Property, PropertySet, RemoveAction, SetGeometryAction, Side, TreeLayout, Type, UpdateValuesAction, ValueSet, VerticalAlign, VerticalLayout, layouts } 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
+ 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() {
@@ -254,7 +338,11 @@ class DiagramButtonsComponent {
254
338
  }
255
339
  layout() {
256
340
  if (this.canvas.layoutFormat && this.canvas.layoutFormat in layouts) {
341
+ const from = getLocationsOfNodes(this.canvas.model);
257
342
  layouts[this.canvas.layoutFormat].apply(this.canvas.model);
343
+ const to = getLocationsOfNodes(this.canvas.model);
344
+ const action = new ApplyLayoutAction(this.canvas, from, to);
345
+ this.canvas.actionStack.add(action);
258
346
  }
259
347
  }
260
348
  filter() {
@@ -285,13 +373,13 @@ class DiagramButtonsComponent {
285
373
  startMultipleSelection() {
286
374
  this.canvas.multipleSelectionOn = true;
287
375
  }
288
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DiagramButtonsComponent, deps: [{ token: CanvasProviderService }], target: i0.ɵɵFactoryTarget.Component }); }
289
- 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 }); }
290
378
  }
291
379
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DiagramButtonsComponent, decorators: [{
292
380
  type: Component,
293
- 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" }]
294
- }], 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: [{
295
383
  type: ViewChild,
296
384
  args: ['collapsableButtons']
297
385
  }], location: [{
@@ -319,29 +407,42 @@ class ErrorsComponent {
319
407
  get canvas() {
320
408
  return this.canvasProvider.getCanvas();
321
409
  }
322
- constructor(canvasProvider) {
410
+ constructor(canvasProvider, cdf) {
323
411
  this.canvasProvider = canvasProvider;
412
+ this.cdf = cdf;
324
413
  this.errors = [];
325
414
  this.Side = Side;
326
415
  }
327
416
  ngAfterViewInit() {
328
- merge(this.canvas.validatorChange$, this.canvas.diagramChange$)
329
- .pipe(
330
- // delay to avoid errors of variables changing right after checking
331
- delay(1), map(() => this.validate()))
332
- .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();
333
424
  }
334
425
  selectPanel() {
335
426
  return d3
336
427
  .select(this.errorsContainer.nativeElement)
337
428
  .select('.daga-error-panel');
338
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
+ }
339
438
  validate() {
340
439
  this.errors = [];
341
440
  for (const validator of this.canvas.validators) {
342
441
  const newErrors = validator.validate(this.canvas.model);
343
442
  this.errors = [...this.errors, ...newErrors];
344
443
  }
444
+ // need to force detection changes here for some reason...
445
+ this.cdf.detectChanges();
345
446
  }
346
447
  showError(error) {
347
448
  if (error.elementId &&
@@ -371,13 +472,13 @@ class ErrorsComponent {
371
472
  this.canvas.parentComponent?.propertyEditor?.highlightProperty(...error.propertyNames);
372
473
  }
373
474
  }
374
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ErrorsComponent, deps: [{ token: CanvasProviderService }], target: i0.ɵɵFactoryTarget.Component }); }
375
- 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 }); }
376
477
  }
377
478
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ErrorsComponent, decorators: [{
378
479
  type: Component,
379
- 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" }]
380
- }], 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: [{
381
482
  type: ViewChild,
382
483
  args: ['errors']
383
484
  }] } });
@@ -392,14 +493,15 @@ class PaletteComponent {
392
493
  get canvas() {
393
494
  return this.canvasProvider.getCanvas();
394
495
  }
395
- constructor(canvasProvider) {
496
+ constructor(canvasProvider, configService) {
396
497
  this.canvasProvider = canvasProvider;
498
+ this.configService = configService;
397
499
  this.currentCategory = '';
398
500
  }
399
- ngAfterContentInit() {
400
- // we initialize the currentPalette variable if it hasn't been initalized with a proper value
401
- // doing this in ngAfterViewInit() would cause an ExpressionChangedAfterItHasBeenCheckedError
402
- this.currentPalette = this.currentPalette || this.palettes[0];
501
+ ngOnInit() {
502
+ this.sub = this.configService.config$.subscribe((c) => {
503
+ this.init(c);
504
+ });
403
505
  }
404
506
  ngAfterViewInit() {
405
507
  this.refreshPalette();
@@ -425,19 +527,33 @@ class PaletteComponent {
425
527
  .style('justify-content', 'center')
426
528
  .style('gap', this.gap);
427
529
  }
530
+ ngOnDestroy() {
531
+ this.sub?.unsubscribe();
532
+ }
533
+ init(config) {
534
+ this.location = config.components?.palette?.location || Corner.TopLeft;
535
+ this.direction = config.components?.palette?.direction || Side.Bottom;
536
+ this.width = config.components?.palette?.width || '12rem';
537
+ this.gap = config.components?.palette?.gap || '1rem';
538
+ this.palettes = config.components?.palette?.sections || [];
539
+ this.currentPalette = this.palettes[0];
540
+ this.refreshPalette();
541
+ }
428
542
  refreshPalette() {
429
543
  this.switchPalette(this.currentPalette);
430
544
  }
431
545
  switchPalette(palette) {
432
546
  this.currentPalette = palette;
433
- this.selectPalette().selectAll('*').remove();
434
- this.priorityThreshold = this.canvas.getPriorityThreshold();
435
- if (palette.categories) {
436
- this.appendCategories(palette.categories);
437
- }
438
- if (palette.templates) {
439
- for (const template of palette.templates) {
440
- this.appendTemplate(template);
547
+ if (this.panel !== undefined) {
548
+ this.selectPalette().selectAll('*').remove();
549
+ this.priorityThreshold = this.canvas.getPriorityThreshold();
550
+ if (palette.categories) {
551
+ this.appendCategories(palette.categories);
552
+ }
553
+ if (palette.templates) {
554
+ for (const template of palette.templates) {
555
+ this.appendTemplate(template);
556
+ }
441
557
  }
442
558
  }
443
559
  }
@@ -600,8 +716,21 @@ class PaletteComponent {
600
716
  if (this.canvas.snapToGrid) {
601
717
  newNodeCoords = this.canvas.getClosestGridPoint(newNodeCoords);
602
718
  }
603
- const addNodeAction = new AddNodeAction(this.canvas, type, newNodeCoords, templateConfig.label, templateConfig.values);
719
+ // check whether we dropped this node on a potential parent
720
+ const nodesAtLocation = this.canvas.model.nodes.getAtCoordinates(pointerCoords[0], pointerCoords[1]);
721
+ // filter by which nodes can have this type as a child
722
+ const nodesAtLocationWhichCanHaveNodeAsAChild = nodesAtLocation.filter((n) => n.type.childrenTypes.includes(type.id));
723
+ // filter by which nodes don't have descendants in this collection
724
+ const filteredNodesAtLocation = filterByOnlyDescendants(nodesAtLocationWhichCanHaveNodeAsAChild);
725
+ const droppedOn = filteredNodesAtLocation[filteredNodesAtLocation.length - 1];
726
+ if (!type.canBeParentless && droppedOn === undefined) {
727
+ // can't place, node must have a parent and no suitable parent has been found
728
+ return;
729
+ }
730
+ const ancestor = droppedOn?.getLastAncestor();
731
+ const addNodeAction = new AddNodeAction(this.canvas, type, newNodeCoords, droppedOn?.id, ancestor?.id, ancestor?.getGeometry(), undefined, templateConfig.label, templateConfig.values);
604
732
  addNodeAction.do();
733
+ addNodeAction.toAncestorGeometry = ancestor?.getGeometry();
605
734
  this.canvas.actionStack.add(addNodeAction);
606
735
  // reset cursor
607
736
  setCursorStyle();
@@ -614,13 +743,14 @@ class PaletteComponent {
614
743
  .style('top', 0)
615
744
  .style('width', '100%')
616
745
  .style('height', '100%');
617
- switch (type.look.lookType) {
746
+ const nodeLook = templateConfig.look || type.look;
747
+ switch (nodeLook.lookType) {
618
748
  case 'shaped-look':
619
749
  thisComponent
620
750
  .append('path')
621
- .attr('d', generalClosedPath(type.look.shape, 0, 0, type.defaultWidth, type.defaultHeight))
622
- .attr('fill', type.look.fillColor)
623
- .attr('stroke', type.look.borderColor)
751
+ .attr('d', generalClosedPath(nodeLook.shape, 0, 0, type.defaultWidth, type.defaultHeight))
752
+ .attr('fill', nodeLook.fillColor)
753
+ .attr('stroke', nodeLook.borderColor)
624
754
  .attr('stroke-width', '1px');
625
755
  break;
626
756
  case 'image-look':
@@ -630,7 +760,7 @@ class PaletteComponent {
630
760
  .attr('y', 0)
631
761
  .attr('width', type.defaultWidth)
632
762
  .attr('height', type.defaultHeight)
633
- .attr('href', type.look.backgroundImage)
763
+ .attr('href', nodeLook.backgroundImage)
634
764
  .attr('preserveAspectRatio', 'none');
635
765
  break;
636
766
  case 'stretchable-image-look':
@@ -638,73 +768,73 @@ class PaletteComponent {
638
768
  .append('image')
639
769
  .attr('x', 0)
640
770
  .attr('y', 0)
641
- .attr('width', type.look.leftMargin)
642
- .attr('height', type.look.topMargin)
643
- .attr('href', type.look.backgroundImageTopLeft)
771
+ .attr('width', nodeLook.leftMargin)
772
+ .attr('height', nodeLook.topMargin)
773
+ .attr('href', nodeLook.backgroundImageTopLeft)
644
774
  .attr('preserveAspectRatio', 'none');
645
775
  thisComponent
646
776
  .append('image')
647
- .attr('x', type.look.leftMargin)
777
+ .attr('x', nodeLook.leftMargin)
648
778
  .attr('y', 0)
649
- .attr('width', type.defaultWidth - type.look.rightMargin - type.look.leftMargin)
650
- .attr('height', type.look.topMargin)
651
- .attr('href', type.look.backgroundImageTop)
779
+ .attr('width', type.defaultWidth - nodeLook.rightMargin - nodeLook.leftMargin)
780
+ .attr('height', nodeLook.topMargin)
781
+ .attr('href', nodeLook.backgroundImageTop)
652
782
  .attr('preserveAspectRatio', 'none');
653
783
  thisComponent
654
784
  .append('image')
655
- .attr('x', type.defaultWidth - type.look.rightMargin)
785
+ .attr('x', type.defaultWidth - nodeLook.rightMargin)
656
786
  .attr('y', 0)
657
- .attr('width', type.look.rightMargin)
658
- .attr('height', type.look.topMargin)
659
- .attr('href', type.look.backgroundImageTopRight)
787
+ .attr('width', nodeLook.rightMargin)
788
+ .attr('height', nodeLook.topMargin)
789
+ .attr('href', nodeLook.backgroundImageTopRight)
660
790
  .attr('preserveAspectRatio', 'none');
661
791
  thisComponent
662
792
  .append('image')
663
793
  .attr('x', 0)
664
- .attr('y', type.look.topMargin)
665
- .attr('width', type.look.leftMargin)
666
- .attr('height', type.defaultHeight - type.look.bottomMargin - type.look.topMargin)
667
- .attr('href', type.look.backgroundImageLeft)
794
+ .attr('y', nodeLook.topMargin)
795
+ .attr('width', nodeLook.leftMargin)
796
+ .attr('height', type.defaultHeight - nodeLook.bottomMargin - nodeLook.topMargin)
797
+ .attr('href', nodeLook.backgroundImageLeft)
668
798
  .attr('preserveAspectRatio', 'none');
669
799
  thisComponent
670
800
  .append('image')
671
- .attr('x', type.look.leftMargin)
672
- .attr('y', type.look.topMargin)
673
- .attr('width', type.defaultWidth - type.look.rightMargin - type.look.leftMargin)
674
- .attr('height', type.defaultHeight - type.look.bottomMargin - type.look.topMargin)
675
- .attr('href', type.look.backgroundImageCenter)
801
+ .attr('x', nodeLook.leftMargin)
802
+ .attr('y', nodeLook.topMargin)
803
+ .attr('width', type.defaultWidth - nodeLook.rightMargin - nodeLook.leftMargin)
804
+ .attr('height', type.defaultHeight - nodeLook.bottomMargin - nodeLook.topMargin)
805
+ .attr('href', nodeLook.backgroundImageCenter)
676
806
  .attr('preserveAspectRatio', 'none');
677
807
  thisComponent
678
808
  .append('image')
679
- .attr('x', type.defaultWidth - type.look.rightMargin)
680
- .attr('y', type.look.topMargin)
681
- .attr('width', type.look.rightMargin)
682
- .attr('height', type.defaultHeight - type.look.bottomMargin - type.look.topMargin)
683
- .attr('href', type.look.backgroundImageRight)
809
+ .attr('x', type.defaultWidth - nodeLook.rightMargin)
810
+ .attr('y', nodeLook.topMargin)
811
+ .attr('width', nodeLook.rightMargin)
812
+ .attr('height', type.defaultHeight - nodeLook.bottomMargin - nodeLook.topMargin)
813
+ .attr('href', nodeLook.backgroundImageRight)
684
814
  .attr('preserveAspectRatio', 'none');
685
815
  thisComponent
686
816
  .append('image')
687
817
  .attr('x', 0)
688
- .attr('y', type.defaultHeight - type.look.bottomMargin)
689
- .attr('width', type.look.leftMargin)
690
- .attr('height', type.look.bottomMargin)
691
- .attr('href', type.look.backgroundImageBottomLeft)
818
+ .attr('y', type.defaultHeight - nodeLook.bottomMargin)
819
+ .attr('width', nodeLook.leftMargin)
820
+ .attr('height', nodeLook.bottomMargin)
821
+ .attr('href', nodeLook.backgroundImageBottomLeft)
692
822
  .attr('preserveAspectRatio', 'none');
693
823
  thisComponent
694
824
  .append('image')
695
- .attr('x', type.look.leftMargin)
696
- .attr('y', type.defaultHeight - type.look.bottomMargin)
697
- .attr('width', type.defaultWidth - type.look.rightMargin - type.look.leftMargin)
698
- .attr('height', type.look.bottomMargin)
699
- .attr('href', type.look.backgroundImageBottom)
825
+ .attr('x', nodeLook.leftMargin)
826
+ .attr('y', type.defaultHeight - nodeLook.bottomMargin)
827
+ .attr('width', type.defaultWidth - nodeLook.rightMargin - nodeLook.leftMargin)
828
+ .attr('height', nodeLook.bottomMargin)
829
+ .attr('href', nodeLook.backgroundImageBottom)
700
830
  .attr('preserveAspectRatio', 'none');
701
831
  thisComponent
702
832
  .append('image')
703
- .attr('x', type.defaultWidth - type.look.rightMargin)
704
- .attr('y', type.defaultHeight - type.look.bottomMargin)
705
- .attr('width', type.look.rightMargin)
706
- .attr('height', type.look.bottomMargin)
707
- .attr('href', type.look.backgroundImageBottomRight)
833
+ .attr('x', type.defaultWidth - nodeLook.rightMargin)
834
+ .attr('y', type.defaultHeight - nodeLook.bottomMargin)
835
+ .attr('width', nodeLook.rightMargin)
836
+ .attr('height', nodeLook.bottomMargin)
837
+ .attr('href', nodeLook.backgroundImageBottomRight)
708
838
  .attr('preserveAspectRatio', 'none');
709
839
  }
710
840
  if (templateConfig.label) {
@@ -797,13 +927,13 @@ class PaletteComponent {
797
927
  .text(templateConfig.label);
798
928
  }
799
929
  }
800
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: PaletteComponent, deps: [{ token: CanvasProviderService }], target: i0.ɵɵFactoryTarget.Component }); }
801
- 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"] }] }); }
930
+ 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 }); }
931
+ 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 }); }
802
932
  }
803
933
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: PaletteComponent, decorators: [{
804
934
  type: Component,
805
- 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" }]
806
- }], ctorParameters: () => [{ type: CanvasProviderService }], propDecorators: { panel: [{
935
+ 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" }]
936
+ }], ctorParameters: () => [{ type: CanvasProviderService }, { type: DagaConfigurationService }], propDecorators: { panel: [{
807
937
  type: ViewChild,
808
938
  args: ['panel']
809
939
  }], palettes: [{
@@ -1004,11 +1134,11 @@ class PropertySettingsComponent {
1004
1134
  this.addListeners();
1005
1135
  }
1006
1136
  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 }); }
1007
- 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"] }] }); }
1137
+ 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 }); }
1008
1138
  }
1009
1139
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: PropertySettingsComponent, decorators: [{
1010
1140
  type: Component,
1011
- 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" }]
1141
+ 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" }]
1012
1142
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: CanvasProviderService }], propDecorators: { valueSet: [{
1013
1143
  type: Input
1014
1144
  }], depth: [{
@@ -1194,11 +1324,11 @@ class AutocompleteComponent {
1194
1324
  }
1195
1325
  }
1196
1326
  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 }); }
1197
- 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"] }] }); }
1327
+ 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 }); }
1198
1328
  }
1199
1329
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: AutocompleteComponent, decorators: [{
1200
1330
  type: Component,
1201
- 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" }]
1331
+ 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" }]
1202
1332
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { mainElement: [{
1203
1333
  type: ViewChild,
1204
1334
  args: ['main', { static: true }]
@@ -1311,11 +1441,11 @@ class OptionListEditorComponent {
1311
1441
  }
1312
1442
  }
1313
1443
  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 }); }
1314
- 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 }] }); }
1444
+ 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 }); }
1315
1445
  }
1316
1446
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: OptionListEditorComponent, decorators: [{
1317
1447
  type: Component,
1318
- 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" }]
1448
+ 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" }]
1319
1449
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { value: [{
1320
1450
  type: Input
1321
1451
  }], options: [{
@@ -1406,11 +1536,11 @@ class TextListEditorComponent {
1406
1536
  }
1407
1537
  }
1408
1538
  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 }); }
1409
- 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"] }] }); }
1539
+ 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 }); }
1410
1540
  }
1411
1541
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TextListEditorComponent, decorators: [{
1412
1542
  type: Component,
1413
- 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" }]
1543
+ 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" }]
1414
1544
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { value: [{
1415
1545
  type: Input
1416
1546
  }], valueInput: [{
@@ -1497,11 +1627,11 @@ class TextMapEditorComponent {
1497
1627
  }
1498
1628
  }
1499
1629
  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 }); }
1500
- 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"] }] }); }
1630
+ 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 }); }
1501
1631
  }
1502
1632
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TextMapEditorComponent, decorators: [{
1503
1633
  type: Component,
1504
- 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" }]
1634
+ 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" }]
1505
1635
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { value: [{
1506
1636
  type: Input
1507
1637
  }], keyInput: [{
@@ -1554,8 +1684,6 @@ class ObjectEditorComponent {
1554
1684
  if (property.editable) {
1555
1685
  if (!equals(this.valueSet.getValue(property.name), value)) {
1556
1686
  this.valueSet.setValue(property.name, value);
1557
- // register a diagram change when editing a value
1558
- this.canvas.diagramChange$?.next();
1559
1687
  this.canvas.propertyEditorChanges$?.next();
1560
1688
  }
1561
1689
  }
@@ -1577,7 +1705,7 @@ class ObjectEditorComponent {
1577
1705
  return new Date(string);
1578
1706
  }
1579
1707
  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 }); }
1580
- 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"] }] }); }
1708
+ 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 }); }
1581
1709
  }
1582
1710
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: ObjectEditorComponent, decorators: [{
1583
1711
  type: Component,
@@ -1588,7 +1716,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
1588
1716
  OptionListEditorComponent,
1589
1717
  TextListEditorComponent,
1590
1718
  TextMapEditorComponent
1591
- ], 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" }]
1719
+ ], 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" }]
1592
1720
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: CanvasProviderService }], propDecorators: { valueSet: [{
1593
1721
  type: Input
1594
1722
  }], depth: [{
@@ -1616,19 +1744,43 @@ class PropertyEditorComponent {
1616
1744
  this.cdr.detectChanges();
1617
1745
  }
1618
1746
  }
1619
- constructor(cdr) {
1747
+ constructor(cdr, configService) {
1620
1748
  this.cdr = cdr;
1749
+ this.configService = configService;
1750
+ }
1751
+ ngOnInit() {
1752
+ this.sub = this.configService.config$.subscribe((c) => {
1753
+ this.init(c);
1754
+ });
1621
1755
  }
1622
1756
  ngAfterViewInit() {
1623
- switch (this.direction) {
1624
- case Side.Bottom:
1625
- case Side.Top:
1626
- this.selectPanel().style('width', this.width);
1627
- break;
1628
- case Side.Left:
1629
- case Side.Right:
1630
- this.selectPanel().style('height', this.width);
1631
- break;
1757
+ this.setPanelWidth();
1758
+ }
1759
+ ngOnDestroy() {
1760
+ this.sub?.unsubscribe();
1761
+ }
1762
+ init(config) {
1763
+ this.location =
1764
+ config.components?.propertyEditor?.location || Corner.TopRight;
1765
+ this.direction =
1766
+ config.components?.propertyEditor?.direction || Side.Bottom;
1767
+ this.width = config.components?.propertyEditor?.width || '24rem';
1768
+ this.title = undefined;
1769
+ this.valueSet = undefined;
1770
+ this.setPanelWidth();
1771
+ }
1772
+ setPanelWidth() {
1773
+ if (this.panel !== undefined) {
1774
+ switch (this.direction) {
1775
+ case Side.Bottom:
1776
+ case Side.Top:
1777
+ this.selectPanel().style('width', this.width);
1778
+ break;
1779
+ case Side.Left:
1780
+ case Side.Right:
1781
+ this.selectPanel().style('height', this.width);
1782
+ break;
1783
+ }
1632
1784
  }
1633
1785
  }
1634
1786
  selectPanel() {
@@ -1653,8 +1805,8 @@ class PropertyEditorComponent {
1653
1805
  });
1654
1806
  }
1655
1807
  }
1656
- 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 }); }
1657
- 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"] }] }); }
1808
+ 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 }); }
1809
+ 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 }); }
1658
1810
  }
1659
1811
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: PropertyEditorComponent, decorators: [{
1660
1812
  type: Component,
@@ -1663,16 +1815,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
1663
1815
  CollapseButtonComponent,
1664
1816
  ObjectEditorComponent,
1665
1817
  PropertySettingsComponent
1666
- ], 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" }]
1667
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { panel: [{
1818
+ ], 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" }]
1819
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: DagaConfigurationService }], propDecorators: { panel: [{
1668
1820
  type: ViewChild,
1669
1821
  args: ['panel']
1670
- }], location: [{
1671
- type: Input
1672
- }], direction: [{
1673
- type: Input
1674
- }], width: [{
1675
- type: Input
1676
1822
  }], valueSet: [{
1677
1823
  type: Input
1678
1824
  }] } });
@@ -1681,98 +1827,35 @@ const getStyleClassName = (s) => {
1681
1827
  };
1682
1828
 
1683
1829
  /**
1684
- * A provider for the {@link DiagramConfig} associated with a {@link DiagramComponent} context.
1830
+ * 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}.
1831
+ * 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.
1685
1832
  * @public
1686
1833
  */
1687
- class DagaConfigurationService {
1834
+ class DiagramComponent {
1688
1835
  /**
1689
- * Set the diagram configuration of this context.
1690
- * @private
1691
- * @param config A diagram configuration.
1836
+ * Getter for the configuration of this diagram.
1837
+ * @public
1692
1838
  */
1693
- init(config) {
1694
- this._config = config;
1839
+ get config() {
1840
+ return this._config;
1695
1841
  }
1696
1842
  /**
1697
- * Get the diagram configuration of this context. Should only be called after the {@link DiagramComponent} context has been initialized.
1843
+ * Setter for the configuration for the diagram.
1698
1844
  * @public
1699
- * @returns A diagram configuration.
1700
1845
  */
1701
- getConfig() {
1702
- return this._config;
1703
- }
1704
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DagaConfigurationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1705
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DagaConfigurationService }); }
1706
- }
1707
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DagaConfigurationService, decorators: [{
1708
- type: Injectable
1709
- }] });
1710
-
1711
- /**
1712
- * A diagram's user interface editor.
1713
- * @private
1714
- */
1715
- class DiagramEditorComponent {
1716
- get config() {
1717
- return this.configurationService.getConfig();
1846
+ set config(config) {
1847
+ if (this._config !== config) {
1848
+ this._config = config;
1849
+ this.configurationService.init(config);
1850
+ }
1718
1851
  }
1852
+ /**
1853
+ * Getter for the canvas of this diagram.
1854
+ * @public
1855
+ */
1719
1856
  get canvas() {
1720
1857
  return this.canvasProvider.getCanvas();
1721
1858
  }
1722
- constructor(configurationService, canvasProvider) {
1723
- this.configurationService = configurationService;
1724
- this.canvasProvider = canvasProvider;
1725
- /**
1726
- * Output for user events on the diagram's model.
1727
- * @public
1728
- */
1729
- this.modelEvent = new EventEmitter();
1730
- this.Corner = Corner;
1731
- this.Side = Side;
1732
- }
1733
- ngOnInit() {
1734
- this.canvasProvider.initCanvas(this, this.config);
1735
- }
1736
- ngAfterViewInit() {
1737
- this.canvasProvider.initCanvasView(this.appendTo.nativeElement);
1738
- this.canvas.diagramEvent$.subscribe((e) => {
1739
- this.modelEvent.emit(e);
1740
- });
1741
- }
1742
- 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 }); }
1743
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: DiagramEditorComponent, isStandalone: true, selector: "daga-diagram-editor", outputs: { modelEvent: "modelEvent" }, 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" }] }); }
1744
- }
1745
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DiagramEditorComponent, decorators: [{
1746
- type: Component,
1747
- args: [{ selector: 'daga-diagram-editor', imports: [
1748
- CommonModule,
1749
- DiagramButtonsComponent,
1750
- PaletteComponent,
1751
- PropertyEditorComponent,
1752
- ErrorsComponent
1753
- ], 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" }]
1754
- }], ctorParameters: () => [{ type: DagaConfigurationService }, { type: CanvasProviderService }], propDecorators: { appendTo: [{
1755
- type: ViewChild,
1756
- args: ['appendTo']
1757
- }], diagramButtons: [{
1758
- type: ViewChild,
1759
- args: ['diagramButtons']
1760
- }], palette: [{
1761
- type: ViewChild,
1762
- args: ['palette']
1763
- }], propertyEditor: [{
1764
- type: ViewChild,
1765
- args: ['propertyEditor']
1766
- }], modelEvent: [{
1767
- type: Output
1768
- }] } });
1769
-
1770
- /**
1771
- * 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}.
1772
- * 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.
1773
- * @public
1774
- */
1775
- class DiagramComponent {
1776
1859
  /**
1777
1860
  * Serialized model for the diagram. Used for data binding to the model.
1778
1861
  * @public
@@ -1787,15 +1870,16 @@ class DiagramComponent {
1787
1870
  set model(model) {
1788
1871
  if (this._model !== model) {
1789
1872
  this._model = model;
1790
- const canvas = this.canvasProvider.getCanvas();
1873
+ const canvas = this.canvas;
1791
1874
  if (canvas) {
1792
- this.importer.import(this.canvasProvider.getCanvas().model, model);
1875
+ this.importer.import(canvas.model, model);
1793
1876
  }
1794
1877
  }
1795
1878
  }
1796
- constructor(configurationService, canvasProvider) {
1879
+ constructor(configurationService, canvasProvider, cdr) {
1797
1880
  this.configurationService = configurationService;
1798
1881
  this.canvasProvider = canvasProvider;
1882
+ this.cdr = cdr;
1799
1883
  this.importer = new DagaImporter();
1800
1884
  this.exporter = new DagaExporter();
1801
1885
  /**
@@ -1803,44 +1887,88 @@ class DiagramComponent {
1803
1887
  * @public
1804
1888
  */
1805
1889
  this.modelChange = new EventEmitter();
1890
+ /**
1891
+ * Output for user events on the diagram.
1892
+ * @public
1893
+ */
1894
+ this.diagramEvent = new EventEmitter();
1895
+ this.Corner = Corner;
1896
+ this.Side = Side;
1806
1897
  }
1807
1898
  ngOnInit() {
1808
- this.configurationService.init(this.config);
1809
- }
1810
- ngAfterContentInit() {
1811
- this.canvasProvider
1812
- .getCanvas()
1813
- .viewInitialized$.pipe(delay(1))
1814
- .subscribe(() => {
1815
- if (this.model) {
1816
- this.importer.import(this.canvasProvider.getCanvas().model, this.model);
1817
- }
1818
- });
1899
+ this.canvasProvider.initCanvas(this, this.config);
1900
+ this.setUpCanvas(this.canvasProvider.getCanvas());
1819
1901
  }
1820
1902
  ngAfterViewInit() {
1821
- this.canvasProvider.getCanvas().diagramChange$.subscribe(() => {
1822
- const exportedModel = this.exporter.export(this.canvasProvider.getCanvas().model);
1903
+ this.canvasProvider.initCanvasView(this.appendTo.nativeElement);
1904
+ this.canvasSub = this.canvasProvider.canvas$
1905
+ // we skip the first one as the subscribe() underneath is
1906
+ // for when the canvas is reloaded, not initially loaded
1907
+ .pipe(skip(1))
1908
+ .subscribe((c) => {
1909
+ // reset model of the old canvas
1910
+ this.model = this.exporter.export(c.model);
1911
+ this.setUpCanvas(c);
1912
+ });
1913
+ this.configurationSub = this.configurationService.config$
1914
+ // we skip the first one as the subscribe() underneath is
1915
+ // for when the config is reloaded, not initially loaded
1916
+ .pipe(skip(1))
1917
+ .subscribe((c) => {
1918
+ this.canvasProvider.initCanvas(this, c);
1919
+ this.canvasProvider.initCanvasView(this.appendTo.nativeElement);
1920
+ this.cdr.detectChanges();
1921
+ });
1922
+ }
1923
+ ngOnDestroy() {
1924
+ this.configurationSub?.unsubscribe();
1925
+ this.canvasSub?.unsubscribe();
1926
+ }
1927
+ setUpCanvas(canvas) {
1928
+ canvas.diagramEvent$.subscribe((e) => {
1929
+ this.diagramEvent.emit(e);
1930
+ });
1931
+ canvas.diagramChange$.subscribe(() => {
1932
+ const exportedModel = this.exporter.export(this.canvas.model);
1823
1933
  this._model = exportedModel;
1824
1934
  this.modelChange.emit(exportedModel);
1825
1935
  });
1936
+ if (this.model) {
1937
+ this.importer.import(canvas.model, this.model);
1938
+ }
1826
1939
  }
1827
- 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 }); }
1828
- 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" }, providers: [CanvasProviderService, DagaConfigurationService], ngImport: i0, template: `<ng-content />`, isInline: true }); }
1940
+ 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 }); }
1941
+ 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 }); }
1829
1942
  }
1830
1943
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DiagramComponent, decorators: [{
1831
1944
  type: Component,
1832
- args: [{
1833
- standalone: true,
1834
- selector: 'daga-diagram',
1835
- template: `<ng-content />`,
1836
- providers: [CanvasProviderService, DagaConfigurationService]
1837
- }]
1838
- }], ctorParameters: () => [{ type: DagaConfigurationService }, { type: CanvasProviderService }], propDecorators: { config: [{
1945
+ args: [{ standalone: true, selector: 'daga-diagram', providers: [CanvasProviderService, DagaConfigurationService], imports: [
1946
+ CommonModule,
1947
+ DiagramButtonsComponent,
1948
+ PaletteComponent,
1949
+ PropertyEditorComponent,
1950
+ ErrorsComponent
1951
+ ], 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" }]
1952
+ }], ctorParameters: () => [{ type: DagaConfigurationService }, { type: CanvasProviderService }, { type: i0.ChangeDetectorRef }], propDecorators: { appendTo: [{
1953
+ type: ViewChild,
1954
+ args: ['appendTo']
1955
+ }], diagramButtons: [{
1956
+ type: ViewChild,
1957
+ args: ['diagramButtons']
1958
+ }], palette: [{
1959
+ type: ViewChild,
1960
+ args: ['palette']
1961
+ }], propertyEditor: [{
1962
+ type: ViewChild,
1963
+ args: ['propertyEditor']
1964
+ }], config: [{
1839
1965
  type: Input
1840
1966
  }], model: [{
1841
1967
  type: Input
1842
1968
  }], modelChange: [{
1843
1969
  type: Output
1970
+ }], diagramEvent: [{
1971
+ type: Output
1844
1972
  }] } });
1845
1973
 
1846
1974
  class DagaModule {
@@ -1848,7 +1976,6 @@ class DagaModule {
1848
1976
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.5", ngImport: i0, type: DagaModule, imports: [CollapseButtonComponent,
1849
1977
  DiagramButtonsComponent,
1850
1978
  DiagramComponent,
1851
- DiagramEditorComponent,
1852
1979
  ErrorsComponent,
1853
1980
  ObjectEditorComponent,
1854
1981
  PaletteComponent,
@@ -1856,10 +1983,10 @@ class DagaModule {
1856
1983
  TextMapEditorComponent,
1857
1984
  PropertyEditorComponent,
1858
1985
  CommonModule,
1859
- FormsModule], exports: [DiagramComponent, DiagramEditorComponent] }); }
1986
+ FormsModule], exports: [DiagramComponent] }); }
1860
1987
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DagaModule, providers: [DagaConfigurationService, CanvasProviderService], imports: [CollapseButtonComponent,
1861
1988
  DiagramButtonsComponent,
1862
- DiagramEditorComponent,
1989
+ DiagramComponent,
1863
1990
  ErrorsComponent,
1864
1991
  ObjectEditorComponent,
1865
1992
  PaletteComponent,
@@ -1877,7 +2004,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
1877
2004
  CollapseButtonComponent,
1878
2005
  DiagramButtonsComponent,
1879
2006
  DiagramComponent,
1880
- DiagramEditorComponent,
1881
2007
  ErrorsComponent,
1882
2008
  ObjectEditorComponent,
1883
2009
  PaletteComponent,
@@ -1887,7 +2013,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
1887
2013
  CommonModule,
1888
2014
  FormsModule
1889
2015
  ],
1890
- exports: [DiagramComponent, DiagramEditorComponent],
2016
+ exports: [DiagramComponent],
1891
2017
  providers: [DagaConfigurationService, CanvasProviderService]
1892
2018
  }]
1893
2019
  }] });
@@ -1896,5 +2022,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
1896
2022
  * Generated bundle index. Do not edit.
1897
2023
  */
1898
2024
 
1899
- export { CanvasProviderService, CollapseButtonComponent, DagaConfigurationService, DagaModule, DiagramButtonsComponent, DiagramComponent, DiagramEditorComponent, ErrorsComponent, ObjectEditorComponent, PaletteComponent, PropertyEditorComponent, TextListEditorComponent, TextMapEditorComponent };
2025
+ export { CanvasProviderService, CollapseButtonComponent, DagaConfigurationService, DagaModule, DiagramButtonsComponent, DiagramComponent, ErrorsComponent, ObjectEditorComponent, PaletteComponent, PropertyEditorComponent, TextListEditorComponent, TextMapEditorComponent };
1900
2026
  //# sourceMappingURL=metadev-daga-angular.mjs.map