@metadev/daga-angular 4.2.10 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@metadev/daga-angular",
3
3
  "description": "Diagramming engine for editing models on the Web. Made by Metadev.",
4
- "version": "4.2.10",
4
+ "version": "5.0.0",
5
5
  "author": "Metadev (https://metadev.pro)",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
7
7
  "repository": "git+https://github.com/metadevpro/daga-tutorial.git",
@@ -18,10 +18,10 @@
18
18
  "angular"
19
19
  ],
20
20
  "peerDependencies": {
21
- "@angular/common": ">= 20.1.3 < 22",
22
- "@angular/core": ">= 20.1.3 < 22",
23
- "@angular/forms": ">= 20.1.3 < 22",
24
- "@metadev/daga": "^4.2.10",
21
+ "@angular/common": ">= 21.0.7 < 23",
22
+ "@angular/core": ">= 21.0.7 < 23",
23
+ "@angular/forms": ">= 21.0.7 < 23",
24
+ "@metadev/daga": "^4.2.9",
25
25
  "d3": "^7.9.0",
26
26
  "rxjs": "~7.8.1"
27
27
  },
@@ -37,13 +37,13 @@
37
37
  "Changelog.md"
38
38
  ],
39
39
  "module": "fesm2022/metadev-daga-angular.mjs",
40
- "typings": "index.d.ts",
40
+ "typings": "types/metadev-daga-angular.d.ts",
41
41
  "exports": {
42
42
  "./package.json": {
43
43
  "default": "./package.json"
44
44
  },
45
45
  ".": {
46
- "types": "./index.d.ts",
46
+ "types": "./types/metadev-daga-angular.d.ts",
47
47
  "default": "./fesm2022/metadev-daga-angular.mjs"
48
48
  }
49
49
  },
package/index.d.ts DELETED
@@ -1,402 +0,0 @@
1
- import { Side, DiagramButtons, Canvas, Corner, DiagramActions, DiagramConfig, Palette, PaletteSectionConfig, PropertyEditor, ValueSet, DiagramEditor, DagaModel, DiagramEvent, DiagramError, Type, Property } from '@metadev/daga';
2
- export { ACTION_STACK_SIZE, ActionStack, AddConnectionAction, AddNodeAction, AdjacencyLayout, ApplyLayoutAction, BreadthAdjacencyLayout, BreadthLayout, ButtonsComponentConfig, Canvas, CanvasConfig, ClosedShape, CollabAction, CollabActionSerialized, CollabClient, CollabTimestamp, CollabTimestampSet, ComponentsConfig, ConnectionLook, ConnectionLookConfig, ConnectionTemplateConfig, ConnectionTypeConfig, Corner, DagaExporter, DagaImporter, DagaModel, DiagramAction, DiagramActionMethod, DiagramActions, DiagramButtons, DiagramCanvas, DiagramConfig, DiagramConnection, DiagramConnectionSet, DiagramConnectionType, DiagramDecorator, DiagramDecoratorSet, DiagramDoubleClickEvent, DiagramEditor, DiagramElement, DiagramElementSet, DiagramEntity, DiagramEntitySet, DiagramError, DiagramEvent, DiagramEvents, DiagramField, DiagramFieldSet, DiagramHighlightedEvent, DiagramLayout, DiagramModel, DiagramModelExporter, DiagramModelImporter, DiagramNode, DiagramNodeGeometry, DiagramNodeSet, DiagramNodeType, DiagramObject, DiagramObjectSet, DiagramPort, DiagramPortSet, DiagramPortType, DiagramSecondaryClickEvent, DiagramSection, DiagramSectionGeometry, DiagramSectionSet, DiagramSelectionEvent, DiagramValidator, EditFieldAction, ErrorsComponentConfig, FieldConfig, ForceLayout, GridConfig, GridStyle, HorizontalAlign, HorizontalLayout, ImageLook, ImageLookConfig, Line, LineShape, LineStyle, Look, LookConfig, MarkerImageLook, MarkerImageLookConfig, MoveAction, NodeTemplateConfig, NodeTypeConfig, Palette, PaletteComponentConfig, PaletteSectionConfig, PasteAction, Point, PortConfig, PortTypeConfig, PriorityLayout, Property, PropertyEditor, PropertyEditorComponentConfig, PropertySet, Rectangle, RemoveAction, SectionConfig, SectionGridConfig, SetGeometryAction, SetParentAction, ShapedLook, ShapedLookConfig, Side, StretchableImageLook, StretchableImageLookConfig, TreeLayout, Type, UpdateValuesAction, UserActionConfig, ValueSet, VerticalAlign, VerticalLayout, getLocationsOfNodes, layouts } from '@metadev/daga';
3
- import * as i0 from '@angular/core';
4
- import { ElementRef, OnInit, AfterViewInit, OnDestroy, EventEmitter } from '@angular/core';
5
- import * as rxjs from 'rxjs';
6
- import { Observable } from 'rxjs';
7
- import * as d3 from 'd3';
8
- import * as i10 from '@angular/common';
9
- import * as i11 from '@angular/forms';
10
-
11
- /**
12
- * Button used to collapse components that implement it.
13
- * @private
14
- */
15
- declare class CollapseButtonComponent {
16
- collapsableSelector: string | ElementRef | HTMLElement;
17
- collapsableAdditionalSelector: string;
18
- collapsed: boolean;
19
- disabled: boolean;
20
- direction: Side;
21
- rule: string;
22
- collapsedValue: string;
23
- visibleValue: string;
24
- Side: typeof Side;
25
- toggleCollapse(): void;
26
- getClass(): string;
27
- static ɵfac: i0.ɵɵFactoryDeclaration<CollapseButtonComponent, never>;
28
- static ɵcmp: i0.ɵɵComponentDeclaration<CollapseButtonComponent, "daga-collapse-button", never, { "collapsableSelector": { "alias": "collapsableSelector"; "required": false; }; "collapsableAdditionalSelector": { "alias": "collapsableAdditionalSelector"; "required": false; }; "collapsed": { "alias": "collapsed"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; "rule": { "alias": "rule"; "required": false; }; "collapsedValue": { "alias": "collapsedValue"; "required": false; }; "visibleValue": { "alias": "visibleValue"; "required": false; }; }, {}, never, never, true, never>;
29
- }
30
-
31
- /**
32
- * Buttons used to trigger diagram functionalities by the user.
33
- * @private
34
- */
35
- declare class DiagramButtonsComponent implements DiagramButtons, OnInit, AfterViewInit, OnDestroy {
36
- #private;
37
- get canvas(): Canvas;
38
- collapsableButtons: ElementRef<HTMLDivElement>;
39
- location: Corner;
40
- direction: Side;
41
- enableAction: boolean;
42
- enableFilter: boolean;
43
- enableLayout: boolean;
44
- enableSelection: boolean;
45
- enableZoom: boolean;
46
- filterOn: boolean;
47
- collapsed: boolean;
48
- animationOngoing: boolean;
49
- private sizeAttribute;
50
- private transformFunction;
51
- private transformOrigin;
52
- private marginSide;
53
- private collapsableButtonsSize;
54
- private sub?;
55
- DiagramActions: typeof DiagramActions;
56
- ngOnInit(): void;
57
- ngAfterViewInit(): void;
58
- ngOnDestroy(): void;
59
- init(config: DiagramConfig): void;
60
- recalculateSizeOfButtons(): void;
61
- toggleCollapse(): Promise<void>;
62
- zoomIn(): void;
63
- zoomOut(): void;
64
- center(): void;
65
- layout(): void;
66
- filter(): void;
67
- undo(): void;
68
- redo(): void;
69
- copySelection(): void;
70
- cutSelection(): void;
71
- pasteSelection(): void;
72
- deleteSelection(): void;
73
- startMultipleSelection(): void;
74
- static ɵfac: i0.ɵɵFactoryDeclaration<DiagramButtonsComponent, never>;
75
- static ɵcmp: i0.ɵɵComponentDeclaration<DiagramButtonsComponent, "daga-diagram-buttons", never, { "location": { "alias": "location"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; "enableAction": { "alias": "enableAction"; "required": false; }; "enableFilter": { "alias": "enableFilter"; "required": false; }; "enableLayout": { "alias": "enableLayout"; "required": false; }; "enableSelection": { "alias": "enableSelection"; "required": false; }; "enableZoom": { "alias": "enableZoom"; "required": false; }; }, {}, never, never, true, never>;
76
- }
77
-
78
- /**
79
- * Palette that the user can drag and drop nodes from.
80
- * @private
81
- * @see DiagramConfig
82
- * @see DiagramNode
83
- */
84
- declare class PaletteComponent implements Palette, OnInit, AfterViewInit, OnDestroy {
85
- #private;
86
- get canvas(): Canvas;
87
- panel: ElementRef<HTMLDivElement>;
88
- palettes: PaletteSectionConfig[];
89
- currentPalette: PaletteSectionConfig;
90
- currentCategory: string;
91
- location: Corner;
92
- direction: Side;
93
- width: string;
94
- height?: string;
95
- gap: string;
96
- private priorityThreshold?;
97
- private sub?;
98
- ngOnInit(): void;
99
- ngAfterViewInit(): void;
100
- ngOnDestroy(): void;
101
- init(config: DiagramConfig): void;
102
- refreshPalette(): void;
103
- switchPalette(palette: PaletteSectionConfig): void;
104
- selectPanel(): d3.Selection<HTMLDivElement, unknown, null, undefined>;
105
- selectPalette(): d3.Selection<HTMLDivElement, unknown, null, undefined>;
106
- private appendCategories;
107
- private appendTemplate;
108
- private appendNodeTemplate;
109
- private appendConnectionTemplate;
110
- static ɵfac: i0.ɵɵFactoryDeclaration<PaletteComponent, never>;
111
- static ɵcmp: i0.ɵɵComponentDeclaration<PaletteComponent, "daga-palette", never, { "palettes": { "alias": "palettes"; "required": false; }; "currentPalette": { "alias": "currentPalette"; "required": false; }; "currentCategory": { "alias": "currentCategory"; "required": false; }; "location": { "alias": "location"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "gap": { "alias": "gap"; "required": false; }; }, {}, never, never, true, never>;
112
- }
113
-
114
- /**
115
- * Editor of the values of a value set.
116
- * @private
117
- * @see ValueSet
118
- */
119
- declare class PropertyEditorComponent implements PropertyEditor, OnInit, AfterViewInit, OnDestroy {
120
- #private;
121
- panel: ElementRef<HTMLDivElement>;
122
- location: Corner;
123
- direction: Side;
124
- width: string;
125
- height?: string;
126
- title?: string;
127
- _valueSet: ValueSet | undefined;
128
- get valueSet(): ValueSet | undefined;
129
- set valueSet(valueSet: ValueSet | undefined);
130
- settings?: boolean;
131
- private sub?;
132
- ngOnInit(): void;
133
- ngAfterViewInit(): void;
134
- ngOnDestroy(): void;
135
- init(config: DiagramConfig): void;
136
- setPanelWidth(): void;
137
- selectPanel(): d3.Selection<HTMLDivElement, unknown, null, undefined>;
138
- highlightProperty(...propertyNames: string[]): void;
139
- static ɵfac: i0.ɵɵFactoryDeclaration<PropertyEditorComponent, never>;
140
- static ɵcmp: i0.ɵɵComponentDeclaration<PropertyEditorComponent, "daga-property-editor", never, { "valueSet": { "alias": "valueSet"; "required": false; }; }, {}, never, never, true, never>;
141
- }
142
-
143
- /**
144
- * 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}.
145
- * 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.
146
- * @public
147
- */
148
- declare class DiagramComponent implements DiagramEditor, OnInit, AfterViewInit, OnDestroy {
149
- #private;
150
- appendTo: ElementRef<HTMLDivElement>;
151
- diagramButtons: DiagramButtonsComponent;
152
- palette: PaletteComponent;
153
- propertyEditor: PropertyEditorComponent;
154
- private importer;
155
- private exporter;
156
- private _model;
157
- /**
158
- * Getter for the configuration of this diagram.
159
- * @public
160
- */
161
- get config(): DiagramConfig;
162
- /**
163
- * Setter for the configuration for the diagram.
164
- * @public
165
- */
166
- set config(config: DiagramConfig);
167
- /**
168
- * Subject used to track when the diagram configuration has been updated.
169
- * @public
170
- */
171
- get config$(): Observable<DiagramConfig>;
172
- /**
173
- * Getter for the canvas of this diagram.
174
- * @public
175
- */
176
- get canvas(): Canvas;
177
- /**
178
- * Subject used to track when the canvas has been updated.
179
- * @public
180
- */
181
- get canvas$(): Observable<Canvas>;
182
- /**
183
- * Subject used to track when the view has been initialized after updating the canvas.
184
- * @public
185
- */
186
- get viewInitialized$(): Observable<Canvas>;
187
- /**
188
- * Serialized model for the diagram. Used for data binding to the model.
189
- * @public
190
- */
191
- get model(): DagaModel;
192
- /**
193
- * Serialized model for the diagram. Used for data binding to the model.
194
- * @public
195
- */
196
- set model(model: DagaModel);
197
- /**
198
- * Output for changes to the diagram's model.
199
- * @public
200
- */
201
- modelChange: EventEmitter<DagaModel>;
202
- /**
203
- * Output for user events on the diagram.
204
- * @public
205
- */
206
- diagramEvent: EventEmitter<DiagramEvent>;
207
- private configurationSub?;
208
- private canvasSub?;
209
- Corner: typeof Corner;
210
- Side: typeof Side;
211
- ngOnInit(): void;
212
- ngAfterViewInit(): void;
213
- ngOnDestroy(): void;
214
- private setUpCanvas;
215
- static ɵfac: i0.ɵɵFactoryDeclaration<DiagramComponent, never>;
216
- static ɵcmp: i0.ɵɵComponentDeclaration<DiagramComponent, "daga-diagram", never, { "config": { "alias": "config"; "required": false; }; "model": { "alias": "model"; "required": false; }; }, { "modelChange": "modelChange"; "diagramEvent": "diagramEvent"; }, never, ["*"], true, never>;
217
- }
218
-
219
- /**
220
- * Displays the errors detected by a diagram's validators.
221
- * @private
222
- * @see DiagramValidator
223
- */
224
- declare class ErrorsComponent implements AfterViewInit, OnDestroy {
225
- #private;
226
- get canvas(): Canvas;
227
- errorsContainer: ElementRef<HTMLDivElement>;
228
- errors: DiagramError[];
229
- private canvasSub?;
230
- private validationSub?;
231
- Side: typeof Side;
232
- ngAfterViewInit(): void;
233
- ngOnDestroy(): void;
234
- selectPanel(): d3.Selection<d3.BaseType, unknown, null, unknown>;
235
- private updateCanvas;
236
- validate(): void;
237
- showError(error: DiagramError): void;
238
- static ɵfac: i0.ɵɵFactoryDeclaration<ErrorsComponent, never>;
239
- static ɵcmp: i0.ɵɵComponentDeclaration<ErrorsComponent, "daga-errors", never, {}, {}, never, never, true, never>;
240
- }
241
-
242
- /**
243
- * Editor of a value set within a property editor.
244
- * @private
245
- * @see PropertyEditor
246
- * @see ValueSet
247
- */
248
- declare class ObjectEditorComponent {
249
- #private;
250
- get canvas(): Canvas;
251
- get userCanEdit(): boolean;
252
- _valueSet?: ValueSet;
253
- get valueSet(): ValueSet | undefined;
254
- set valueSet(valueSet: ValueSet | undefined);
255
- /** How many object-editor elements are parents of this object-editor element. @private */
256
- depth: number;
257
- Type: typeof Type;
258
- getStyleClassName: (s: string) => string;
259
- setValue(property: Property, value: unknown): void;
260
- dateToLocalDatetimeString(date: string | number | Date | null | undefined): string;
261
- localDatetimeStringToDate(string: string): Date;
262
- static ɵfac: i0.ɵɵFactoryDeclaration<ObjectEditorComponent, never>;
263
- static ɵcmp: i0.ɵɵComponentDeclaration<ObjectEditorComponent, "daga-object-editor", never, { "valueSet": { "alias": "valueSet"; "required": false; }; "depth": { "alias": "depth"; "required": false; }; }, {}, never, never, true, never>;
264
- }
265
-
266
- /**
267
- * Editor of a property of text list type within a property editor.
268
- * @private
269
- * @see Type.TextList
270
- * @see PropertyEditor
271
- * @see ValueSet
272
- */
273
- declare class TextListEditorComponent {
274
- #private;
275
- private _value;
276
- set value(value: string[]);
277
- get value(): string[];
278
- valueInput: string;
279
- allowRepeats: boolean;
280
- disabled: boolean;
281
- valueChange: EventEmitter<string[]>;
282
- getValueFromEvent(event: Event): string;
283
- hasValue(value: string): boolean;
284
- removeFromValue(index: number): void;
285
- editFromValue(item: string, index: number): void;
286
- addToValue(): void;
287
- clearInput(): void;
288
- onKeyUp(event: KeyboardEvent): void;
289
- static ɵfac: i0.ɵɵFactoryDeclaration<TextListEditorComponent, never>;
290
- static ɵcmp: i0.ɵɵComponentDeclaration<TextListEditorComponent, "daga-text-list-editor", never, { "value": { "alias": "value"; "required": false; }; "valueInput": { "alias": "valueInput"; "required": false; }; "allowRepeats": { "alias": "allowRepeats"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
291
- }
292
-
293
- /**
294
- * Editor of a property of text map type within a property editor.
295
- * @private
296
- * @see Type.TextMap
297
- * @see PropertyEditor
298
- * @see ValueSet
299
- */
300
- declare class TextMapEditorComponent {
301
- #private;
302
- private _value;
303
- set value(value: {
304
- [name: string]: string;
305
- });
306
- get value(): {
307
- [name: string]: string;
308
- };
309
- keyInput: string;
310
- valueInput: string;
311
- disabled: boolean;
312
- valueChange: EventEmitter<{
313
- [name: string]: string;
314
- }>;
315
- getValueFromEvent(event: Event): string;
316
- removeFromValue(key: string): void;
317
- editKey(oldKey: string, newKey: string): void;
318
- editValue(key: string, value: string): void;
319
- addToValue(): void;
320
- clearKeyInput(): void;
321
- clearValueInput(): void;
322
- onKeyUp(event: KeyboardEvent): void;
323
- static ɵfac: i0.ɵɵFactoryDeclaration<TextMapEditorComponent, never>;
324
- static ɵcmp: i0.ɵɵComponentDeclaration<TextMapEditorComponent, "daga-text-map-editor", never, { "value": { "alias": "value"; "required": false; }; "keyInput": { "alias": "keyInput"; "required": false; }; "valueInput": { "alias": "valueInput"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
325
- }
326
-
327
- declare class DagaModule {
328
- static ɵfac: i0.ɵɵFactoryDeclaration<DagaModule, never>;
329
- static ɵmod: i0.ɵɵNgModuleDeclaration<DagaModule, never, [typeof CollapseButtonComponent, typeof DiagramButtonsComponent, typeof DiagramComponent, typeof ErrorsComponent, typeof ObjectEditorComponent, typeof PaletteComponent, typeof TextListEditorComponent, typeof TextMapEditorComponent, typeof PropertyEditorComponent, typeof i10.CommonModule, typeof i11.FormsModule], [typeof DiagramComponent]>;
330
- static ɵinj: i0.ɵɵInjectorDeclaration<DagaModule>;
331
- }
332
-
333
- /**
334
- * A provider for the {@link Canvas} associated with a {@link DiagramComponent} context.
335
- * @public
336
- */
337
- declare class CanvasProviderService {
338
- private _canvas;
339
- private canvasSubject$;
340
- /**
341
- * Subject used to track when the canvas has been updated.
342
- * @public
343
- */
344
- canvas$: rxjs.Observable<Canvas>;
345
- private viewInitializedSubject$;
346
- /**
347
- * Subject used to track when the view of the canvas has been updated after updating the canvas.
348
- * @public
349
- */
350
- viewInitialized$: rxjs.Observable<Canvas>;
351
- /**
352
- * Initialize the diagram canvas object of this context using the given diagram configuration.
353
- * @private
354
- * @param parentComponent A diagram editor.
355
- * @param config A diagram configuration.
356
- */
357
- initCanvas(parentComponent: DiagramEditor, config: DiagramConfig): void;
358
- /**
359
- * Attach the canvas of this context to an HTML element to render it there.
360
- * @private
361
- * @param appendTo An HTML element.
362
- */
363
- initCanvasView(appendTo: HTMLElement): void;
364
- /**
365
- * Get the current canvas of this context.
366
- * @public
367
- * @returns A canvas.
368
- */
369
- getCanvas(): Canvas;
370
- static ɵfac: i0.ɵɵFactoryDeclaration<CanvasProviderService, never>;
371
- static ɵprov: i0.ɵɵInjectableDeclaration<CanvasProviderService>;
372
- }
373
-
374
- /**
375
- * A provider for the {@link DiagramConfig} associated with a {@link DiagramComponent} context.
376
- * @public
377
- */
378
- declare class DagaConfigurationService {
379
- private _config;
380
- private configSubject$;
381
- /**
382
- * Subject used to track when the diagram configuration has been updated.
383
- * @public
384
- */
385
- config$: rxjs.Observable<DiagramConfig>;
386
- /**
387
- * Set the diagram configuration of this context.
388
- * @private
389
- * @param config A diagram configuration.
390
- */
391
- init(config: DiagramConfig): void;
392
- /**
393
- * Get the current diagram configuration of this context.
394
- * @public
395
- * @returns A diagram configuration.
396
- */
397
- getConfig(): DiagramConfig;
398
- static ɵfac: i0.ɵɵFactoryDeclaration<DagaConfigurationService, never>;
399
- static ɵprov: i0.ɵɵInjectableDeclaration<DagaConfigurationService>;
400
- }
401
-
402
- export { CanvasProviderService, CollapseButtonComponent, DagaConfigurationService, DagaModule, DiagramButtonsComponent, DiagramComponent, ErrorsComponent, ObjectEditorComponent, PaletteComponent, PropertyEditorComponent, TextListEditorComponent, TextMapEditorComponent };