@metadev/daga 1.5.7 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/Changelog.md +30 -1
  2. package/README.md +67 -30
  3. package/assets/daga-logo.svg +10 -0
  4. package/index.cjs.d.ts +1 -0
  5. package/index.cjs.default.js +1 -0
  6. package/index.cjs.js +8085 -0
  7. package/index.cjs.mjs +2 -0
  8. package/index.esm.d.ts +1 -0
  9. package/index.esm.js +7999 -0
  10. package/package.json +19 -37
  11. package/src/index.d.ts +49 -0
  12. package/src/lib/core.d.ts +1 -0
  13. package/{lib/diagram-editor/diagram → src/lib/diagram/canvas}/diagram-canvas.d.ts +69 -66
  14. package/src/lib/diagram/canvas/diagram-context-menu.d.ts +27 -0
  15. package/src/lib/diagram/canvas/diagram-user-highlight.d.ts +30 -0
  16. package/src/lib/diagram/canvas/diagram-user-selection.d.ts +74 -0
  17. package/{lib/diagram-editor → src/lib}/diagram/collab/collab-action.d.ts +36 -12
  18. package/{lib/diagram-editor → src/lib}/diagram/collab/collab-client.d.ts +1 -1
  19. package/{lib/diagram-editor → src/lib}/diagram/collab/collab-engine.d.ts +1 -1
  20. package/{lib/diagram-editor → src/lib}/diagram/collab/message-types.d.ts +3 -8
  21. package/{lib/diagram-editor → src/lib}/diagram/converters/daga-exporter.d.ts +6 -6
  22. package/{lib/diagram-editor → src/lib}/diagram/converters/daga-importer.d.ts +6 -4
  23. package/{lib/diagram-editor → src/lib}/diagram/converters/daga-model.d.ts +3 -3
  24. package/{lib/diagram-editor → src/lib}/diagram/converters/diagram-model-exporter.d.ts +2 -2
  25. package/{lib/diagram-editor → src/lib}/diagram/converters/diagram-model-importer.d.ts +2 -2
  26. package/{lib/diagram-editor → src/lib}/diagram/diagram-action.d.ts +75 -55
  27. package/{lib/diagram-editor → src/lib}/diagram/diagram-config.d.ts +139 -84
  28. package/{lib/diagram-editor → src/lib}/diagram/diagram-event.d.ts +3 -3
  29. package/{lib/diagram-editor → src/lib}/diagram/layout/adjacency-layout.d.ts +1 -1
  30. package/{lib/diagram-editor → src/lib}/diagram/layout/breadth-adjacency-layout.d.ts +1 -1
  31. package/{lib/diagram-editor → src/lib}/diagram/layout/breadth-layout.d.ts +1 -1
  32. package/{lib/diagram-editor → src/lib}/diagram/layout/diagram-layout.d.ts +1 -1
  33. package/{lib/diagram-editor → src/lib}/diagram/layout/force-layout.d.ts +1 -1
  34. package/{lib/diagram-editor → src/lib}/diagram/layout/horizontal-layout.d.ts +1 -1
  35. package/{lib/diagram-editor → src/lib}/diagram/layout/priority-layout.d.ts +1 -1
  36. package/{lib/diagram-editor → src/lib}/diagram/layout/tree-layout.d.ts +1 -1
  37. package/{lib/diagram-editor → src/lib}/diagram/layout/vertical-layout.d.ts +1 -1
  38. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-connection.d.ts +4 -4
  39. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-element.d.ts +7 -11
  40. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-entity.d.ts +2 -2
  41. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-field.d.ts +4 -4
  42. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-model.d.ts +15 -15
  43. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-node.d.ts +7 -7
  44. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-property.d.ts +46 -31
  45. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-section.d.ts +8 -8
  46. package/{lib → src/lib}/errors/diagram-validator.d.ts +1 -1
  47. package/{lib → src/lib}/interfaces/canvas.d.ts +79 -107
  48. package/{lib → src/lib}/interfaces/diagram-buttons.d.ts +8 -8
  49. package/{lib → src/lib}/interfaces/diagram-editor.d.ts +4 -11
  50. package/{lib → src/lib}/interfaces/palette.d.ts +2 -2
  51. package/{lib → src/lib}/interfaces/property-editor.d.ts +5 -5
  52. package/{lib → src/lib}/util/canvas-util.d.ts +20 -5
  53. package/src/lib/util/device-util.d.ts +5 -0
  54. package/{lib → src/lib}/util/events.d.ts +4 -4
  55. package/{lib → src/lib}/util/style.d.ts +1 -0
  56. package/src/lib/util/test-util.d.ts +11 -0
  57. package/assets/fonts/DMMono-Medium.ttf +0 -0
  58. package/assets/fonts/DMMono-Medium.woff +0 -0
  59. package/assets/fonts/DMMono-Medium.woff2 +0 -0
  60. package/assets/fonts/WonderUnitSans-Medium.ttf +0 -0
  61. package/assets/fonts/WonderUnitSans-Medium.woff +0 -0
  62. package/assets/fonts/WonderUnitSans-Medium.woff2 +0 -0
  63. package/assets/icon/action/drop-down-arrow.svg +0 -8
  64. package/assets/icon/action/drop-horizontal-left.svg +0 -14
  65. package/assets/icon/action/drop-horizontal-none.svg +0 -13
  66. package/assets/icon/action/drop-horizontal-right.svg +0 -14
  67. package/assets/icon/action/drop-vertical-down.svg +0 -14
  68. package/assets/icon/action/drop-vertical-none.svg +0 -13
  69. package/assets/icon/action/drop-vertical-up.svg +0 -14
  70. package/assets/icon/action/filter-clear.png +0 -0
  71. package/assets/icon/buttons/center-hover.svg +0 -10
  72. package/assets/icon/buttons/center.svg +0 -10
  73. package/assets/icon/buttons/ellipsis-hover.svg +0 -7
  74. package/assets/icon/buttons/ellipsis.svg +0 -7
  75. package/assets/icon/buttons/filter-off-hover.svg +0 -5
  76. package/assets/icon/buttons/filter-off.svg +0 -5
  77. package/assets/icon/buttons/filter-on-hover.svg +0 -5
  78. package/assets/icon/buttons/filter-on.svg +0 -5
  79. package/assets/icon/buttons/layout-hover.svg +0 -8
  80. package/assets/icon/buttons/layout.svg +0 -8
  81. package/assets/icon/buttons/redo-hover.svg +0 -5
  82. package/assets/icon/buttons/redo.svg +0 -5
  83. package/assets/icon/buttons/undo-hover.svg +0 -5
  84. package/assets/icon/buttons/undo.svg +0 -5
  85. package/assets/icon/buttons/zoom-in-hover.svg +0 -8
  86. package/assets/icon/buttons/zoom-in.svg +0 -8
  87. package/assets/icon/buttons/zoom-out-hover.svg +0 -7
  88. package/assets/icon/buttons/zoom-out.svg +0 -7
  89. package/assets/icon/context/copy.svg +0 -4
  90. package/assets/icon/context/cross.svg +0 -3
  91. package/assets/icon/context/cut.svg +0 -4
  92. package/assets/icon/context/delete.svg +0 -4
  93. package/assets/icon/context/paste.svg +0 -4
  94. package/assets/icon/property/add.svg +0 -23
  95. package/assets/icon/property/close.svg +0 -3
  96. package/assets/icon/property/ellipsis.svg +0 -5
  97. package/assets/icon/property/gear.svg +0 -3
  98. package/assets/icon/property/hide.svg +0 -10
  99. package/assets/icon/property/move.svg +0 -35
  100. package/assets/styles/_collapse-button.scss +0 -37
  101. package/assets/styles/_context-menu.scss +0 -32
  102. package/assets/styles/_diagram-buttons.scss +0 -166
  103. package/assets/styles/_diagram.scss +0 -15
  104. package/assets/styles/_errors.scss +0 -83
  105. package/assets/styles/_palette.scss +0 -20
  106. package/assets/styles/_property-editor.scss +0 -285
  107. package/assets/styles/daga.scss +0 -150
  108. package/fesm2022/metadev-daga.mjs +0 -10977
  109. package/fesm2022/metadev-daga.mjs.map +0 -1
  110. package/index.d.ts +0 -55
  111. package/lib/collapse-button/collapse-button.component.d.ts +0 -22
  112. package/lib/daga.module.d.ts +0 -18
  113. package/lib/diagram/diagram.component.d.ts +0 -44
  114. package/lib/diagram-buttons/diagram-buttons.component.d.ts +0 -44
  115. package/lib/diagram-editor/diagram-editor.component.d.ts +0 -38
  116. package/lib/errors/errors.component.d.ts +0 -26
  117. package/lib/palette/palette.component.d.ts +0 -39
  118. package/lib/property-editor/autocomplete/autocomplete.component.d.ts +0 -39
  119. package/lib/property-editor/object-editor/object-editor.component.d.ts +0 -30
  120. package/lib/property-editor/option-list-editor/option-list-editor.component.d.ts +0 -33
  121. package/lib/property-editor/property-editor.component.d.ts +0 -34
  122. package/lib/property-editor/property-settings/property-settings.component.d.ts +0 -35
  123. package/lib/property-editor/text-list-editor/text-list-editor.component.d.ts +0 -29
  124. package/lib/property-editor/text-map-editor/text-map-editor.component.d.ts +0 -36
  125. package/lib/services/canvas-provider.service.d.ts +0 -32
  126. package/lib/services/daga-configuration.service.d.ts +0 -23
  127. package/{lib/diagram-editor → src/lib}/diagram/collab/primitives.d.ts +0 -0
  128. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-decorator.d.ts +1 -1
  129. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-object.d.ts +0 -0
  130. package/{lib/diagram-editor/diagram → src/lib/diagram/model}/diagram-port.d.ts +2 -2
  131. package/{lib → src/lib}/errors/diagram-error.d.ts +3 -3
  132. package/{lib → src/lib}/util/grid.d.ts +0 -0
  133. package/{lib → src/lib}/util/line.d.ts +0 -0
  134. package/{lib → src/lib}/util/list-util.d.ts +0 -0
  135. package/{lib → src/lib}/util/shape.d.ts +10 -10
  136. /package/{lib → src/lib}/util/svg-util.d.ts +0 -0
  137. /package/{lib → src/lib}/util/text-util.d.ts +0 -0
package/index.d.ts DELETED
@@ -1,55 +0,0 @@
1
- export { CollapseButtonComponent } from './lib/collapse-button/collapse-button.component';
2
- export { DagaModule } from './lib/daga.module';
3
- export { DiagramButtonsComponent } from './lib/diagram-buttons/diagram-buttons.component';
4
- export { DiagramEditorComponent } from './lib/diagram-editor/diagram-editor.component';
5
- export { CollabClient } from './lib/diagram-editor/diagram/collab/collab-client';
6
- export { CollabTimestamp, CollabTimestampSet } from './lib/diagram-editor/diagram/collab/primitives';
7
- export { DagaExporter } from './lib/diagram-editor/diagram/converters/daga-exporter';
8
- export { DagaImporter } from './lib/diagram-editor/diagram/converters/daga-importer';
9
- export { DagaModel } from './lib/diagram-editor/diagram/converters/daga-model';
10
- export { DiagramModelExporter } from './lib/diagram-editor/diagram/converters/diagram-model-exporter';
11
- export { DiagramModelImporter } from './lib/diagram-editor/diagram/converters/diagram-model-importer';
12
- export { ActionQueue, AddConnectionAction, AddNodeAction, DiagramAction, DiagramActions, EditFieldAction, RemoveAction, SetGeometryAction, UpdateValuesAction } from './lib/diagram-editor/diagram/diagram-action';
13
- export { ACTION_QUEUE_SIZE, DiagramCanvas } from './lib/diagram-editor/diagram/diagram-canvas';
14
- export { ButtonsComponentConfig, ComponentsConfig, ConnectionMarkerLook, ConnectionTemplateConfig, ConnectionTypeConfig, DiagramConfig, ErrorsComponentConfig, FieldConfig, NodeImageLook, NodeShapedLook, NodeStretchableImageLook, NodeTemplateConfig, NodeTypeConfig, PaletteComponentConfig, PaletteSectionConfig, PortConfig, PropertyEditorComponentConfig, SectionConfig, SectionGridConfig, UserActionConfig } from './lib/diagram-editor/diagram/diagram-config';
15
- export { DiagramConnection, DiagramConnectionSet, DiagramConnectionType } from './lib/diagram-editor/diagram/diagram-connection';
16
- export { DiagramDecorator, DiagramDecoratorSet } from './lib/diagram-editor/diagram/diagram-decorator';
17
- export { DiagramElement, DiagramElementSet } from './lib/diagram-editor/diagram/diagram-element';
18
- export { DiagramEntity, DiagramEntitySet } from './lib/diagram-editor/diagram/diagram-entity';
19
- export { DiagramEvent } from './lib/diagram-editor/diagram/diagram-event';
20
- export { DiagramField, DiagramFieldSet } from './lib/diagram-editor/diagram/diagram-field';
21
- export { DiagramModel } from './lib/diagram-editor/diagram/diagram-model';
22
- export { DiagramNode, DiagramNodeGeometry, DiagramNodeSet, DiagramNodeType } from './lib/diagram-editor/diagram/diagram-node';
23
- export { DiagramObject, DiagramObjectSet } from './lib/diagram-editor/diagram/diagram-object';
24
- export { DiagramPort, DiagramPortSet } from './lib/diagram-editor/diagram/diagram-port';
25
- export { Property, PropertySet, Type, ValueSet } from './lib/diagram-editor/diagram/diagram-property';
26
- export { DiagramSection, DiagramSectionGeometry, DiagramSectionSet } from './lib/diagram-editor/diagram/diagram-section';
27
- export { AdjacencyLayout } from './lib/diagram-editor/diagram/layout/adjacency-layout';
28
- export { BreadthAdjacencyLayout } from './lib/diagram-editor/diagram/layout/breadth-adjacency-layout';
29
- export { BreadthLayout } from './lib/diagram-editor/diagram/layout/breadth-layout';
30
- export { DiagramLayout, layouts } from './lib/diagram-editor/diagram/layout/diagram-layout';
31
- export { ForceLayout } from './lib/diagram-editor/diagram/layout/force-layout';
32
- export { HorizontalLayout } from './lib/diagram-editor/diagram/layout/horizontal-layout';
33
- export { PriorityLayout } from './lib/diagram-editor/diagram/layout/priority-layout';
34
- export { TreeLayout } from './lib/diagram-editor/diagram/layout/tree-layout';
35
- export { VerticalLayout } from './lib/diagram-editor/diagram/layout/vertical-layout';
36
- export { DiagramComponent } from './lib/diagram/diagram.component';
37
- export { DiagramError } from './lib/errors/diagram-error';
38
- export { DiagramValidator } from './lib/errors/diagram-validator';
39
- export { ErrorsComponent } from './lib/errors/errors.component';
40
- export { Canvas } from './lib/interfaces/canvas';
41
- export { DiagramButtons } from './lib/interfaces/diagram-buttons';
42
- export { DiagramEditor } from './lib/interfaces/diagram-editor';
43
- export { Palette } from './lib/interfaces/palette';
44
- export { PropertyEditor } from './lib/interfaces/property-editor';
45
- export { PaletteComponent } from './lib/palette/palette.component';
46
- export { ObjectEditorComponent } from './lib/property-editor/object-editor/object-editor.component';
47
- export { PropertyEditorComponent } from './lib/property-editor/property-editor.component';
48
- export { TextListEditorComponent } from './lib/property-editor/text-list-editor/text-list-editor.component';
49
- export { TextMapEditorComponent } from './lib/property-editor/text-map-editor/text-map-editor.component';
50
- export { CanvasProviderService } from './lib/services/canvas-provider.service';
51
- export { DagaConfigurationService } from './lib/services/daga-configuration.service';
52
- export { Line, Point, Rectangle } from './lib/util/canvas-util';
53
- export { LineShape, LineStyle } from './lib/util/line';
54
- export { ClosedShape } from './lib/util/shape';
55
- export { Corner, HorizontalAlign, Side, VerticalAlign } from './lib/util/svg-util';
@@ -1,22 +0,0 @@
1
- import { ElementRef } from '@angular/core';
2
- import { Side } from '../util/svg-util';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * Button used to collapse components that implement it.
6
- * @private
7
- */
8
- export declare class CollapseButtonComponent {
9
- collapsableSelector: string | ElementRef | HTMLElement;
10
- collapsableAdditionalSelector: string;
11
- collapsed: boolean;
12
- disabled: boolean;
13
- direction: Side;
14
- rule: string;
15
- collapsedValue: string;
16
- visibleValue: string;
17
- Side: typeof Side;
18
- toggleCollapse(): void;
19
- getClass(): string;
20
- static ɵfac: i0.ɵɵFactoryDeclaration<CollapseButtonComponent, never>;
21
- 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>;
22
- }
@@ -1,18 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./collapse-button/collapse-button.component";
3
- import * as i2 from "./diagram-buttons/diagram-buttons.component";
4
- import * as i3 from "./diagram/diagram.component";
5
- import * as i4 from "./diagram-editor/diagram-editor.component";
6
- import * as i5 from "./errors/errors.component";
7
- import * as i6 from "./property-editor/object-editor/object-editor.component";
8
- import * as i7 from "./palette/palette.component";
9
- import * as i8 from "./property-editor/text-list-editor/text-list-editor.component";
10
- import * as i9 from "./property-editor/text-map-editor/text-map-editor.component";
11
- import * as i10 from "./property-editor/property-editor.component";
12
- import * as i11 from "@angular/common";
13
- import * as i12 from "@angular/forms";
14
- export declare class DagaModule {
15
- static ɵfac: i0.ɵɵFactoryDeclaration<DagaModule, never>;
16
- static ɵmod: i0.ɵɵNgModuleDeclaration<DagaModule, never, [typeof i1.CollapseButtonComponent, typeof i2.DiagramButtonsComponent, typeof i3.DiagramComponent, typeof i4.DiagramEditorComponent, typeof i5.ErrorsComponent, typeof i6.ObjectEditorComponent, typeof i7.PaletteComponent, typeof i8.TextListEditorComponent, typeof i9.TextMapEditorComponent, typeof i10.PropertyEditorComponent, typeof i11.CommonModule, typeof i12.FormsModule], [typeof i3.DiagramComponent, typeof i4.DiagramEditorComponent]>;
17
- static ɵinj: i0.ɵɵInjectorDeclaration<DagaModule>;
18
- }
@@ -1,44 +0,0 @@
1
- import { AfterContentInit, AfterViewInit, EventEmitter, OnInit } from '@angular/core';
2
- import { DagaModel } from '../diagram-editor/diagram/converters/daga-model';
3
- import { DiagramConfig } from '../diagram-editor/diagram/diagram-config';
4
- import { CanvasProviderService } from '../services/canvas-provider.service';
5
- import { DagaConfigurationService } from '../services/daga-configuration.service';
6
- import * as i0 from "@angular/core";
7
- /**
8
- * 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}.
9
- * 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.
10
- * @public
11
- */
12
- export declare class DiagramComponent implements AfterContentInit, AfterViewInit, OnInit {
13
- private configurationService;
14
- private canvasProvider;
15
- /**
16
- * Configuration for the diagram.
17
- * @public
18
- */
19
- config: DiagramConfig;
20
- private importer;
21
- private exporter;
22
- private _model;
23
- /**
24
- * Serialized model for the diagram. Used for data binding to the model.
25
- * @public
26
- */
27
- get model(): DagaModel;
28
- /**
29
- * Serialized model for the diagram. Used for data binding to the model.
30
- * @public
31
- */
32
- set model(model: DagaModel);
33
- /**
34
- * Output for changes to the diagram's model.
35
- * @public
36
- */
37
- modelChange: EventEmitter<DagaModel>;
38
- constructor(configurationService: DagaConfigurationService, canvasProvider: CanvasProviderService);
39
- ngOnInit(): void;
40
- ngAfterContentInit(): void;
41
- ngAfterViewInit(): void;
42
- static ɵfac: i0.ɵɵFactoryDeclaration<DiagramComponent, never>;
43
- static ɵcmp: i0.ɵɵComponentDeclaration<DiagramComponent, "daga-diagram", never, { "config": { "alias": "config"; "required": false; }; "model": { "alias": "model"; "required": false; }; }, { "modelChange": "modelChange"; }, never, ["*"], true, never>;
44
- }
@@ -1,44 +0,0 @@
1
- import { AfterViewInit, ElementRef } from '@angular/core';
2
- import { DiagramActions } from '../diagram-editor/diagram/diagram-action';
3
- import { Canvas } from '../interfaces/canvas';
4
- import { DiagramButtons } from '../interfaces/diagram-buttons';
5
- import { CanvasProviderService } from '../services/canvas-provider.service';
6
- import { Corner, Side } from '../util/svg-util';
7
- import * as i0 from "@angular/core";
8
- /**
9
- * Buttons used to trigger diagram functionalities by the user.
10
- * @private
11
- */
12
- export declare class DiagramButtonsComponent implements AfterViewInit, DiagramButtons {
13
- private canvasProvider;
14
- get canvas(): Canvas;
15
- collapsableButtons: ElementRef<HTMLDivElement>;
16
- location: Corner;
17
- direction: Side;
18
- enableFilter: boolean;
19
- enableLayout: boolean;
20
- enableUndoRedo: boolean;
21
- enableZoom: boolean;
22
- zoomRate: number;
23
- filterOn: boolean;
24
- collapsed: boolean;
25
- animationOngoing: boolean;
26
- private sizeAttribute;
27
- private transformFunction;
28
- private transformOrigin;
29
- private marginSide;
30
- private collapsableButtonsSize;
31
- DiagramActions: typeof DiagramActions;
32
- constructor(canvasProvider: CanvasProviderService);
33
- ngAfterViewInit(): void;
34
- toggleCollapse(): Promise<void>;
35
- zoomIn(): void;
36
- zoomOut(): void;
37
- center(): void;
38
- layout(): void;
39
- filter(): void;
40
- undo(): void;
41
- redo(): void;
42
- static ɵfac: i0.ɵɵFactoryDeclaration<DiagramButtonsComponent, never>;
43
- static ɵcmp: i0.ɵɵComponentDeclaration<DiagramButtonsComponent, "daga-diagram-buttons", never, { "location": { "alias": "location"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; "enableFilter": { "alias": "enableFilter"; "required": false; }; "enableLayout": { "alias": "enableLayout"; "required": false; }; "enableUndoRedo": { "alias": "enableUndoRedo"; "required": false; }; "enableZoom": { "alias": "enableZoom"; "required": false; }; "zoomRate": { "alias": "zoomRate"; "required": false; }; }, {}, never, never, true, never>;
44
- }
@@ -1,38 +0,0 @@
1
- import { AfterViewInit, ElementRef, EventEmitter, OnInit } from '@angular/core';
2
- import { DiagramButtonsComponent } from '../diagram-buttons/diagram-buttons.component';
3
- import { DiagramConfig } from '../diagram-editor/diagram/diagram-config';
4
- import { Canvas } from '../interfaces/canvas';
5
- import { DiagramEditor } from '../interfaces/diagram-editor';
6
- import { PaletteComponent } from '../palette/palette.component';
7
- import { PropertyEditorComponent } from '../property-editor/property-editor.component';
8
- import { CanvasProviderService } from '../services/canvas-provider.service';
9
- import { DagaConfigurationService } from '../services/daga-configuration.service';
10
- import { Corner, Side } from '../util/svg-util';
11
- import { DiagramEvent } from './diagram/diagram-event';
12
- import * as i0 from "@angular/core";
13
- /**
14
- * A diagram's user interface editor.
15
- * @private
16
- */
17
- export declare class DiagramEditorComponent implements AfterViewInit, DiagramEditor, OnInit {
18
- private configurationService;
19
- private canvasProvider;
20
- appendTo: ElementRef<HTMLDivElement>;
21
- diagramButtons: DiagramButtonsComponent;
22
- palette: PaletteComponent;
23
- propertyEditor: PropertyEditorComponent;
24
- /**
25
- * Output for user events on the diagram's model.
26
- * @public
27
- */
28
- modelEvent: EventEmitter<DiagramEvent>;
29
- get config(): DiagramConfig;
30
- get canvas(): Canvas;
31
- Corner: typeof Corner;
32
- Side: typeof Side;
33
- constructor(configurationService: DagaConfigurationService, canvasProvider: CanvasProviderService);
34
- ngOnInit(): void;
35
- ngAfterViewInit(): void;
36
- static ɵfac: i0.ɵɵFactoryDeclaration<DiagramEditorComponent, never>;
37
- static ɵcmp: i0.ɵɵComponentDeclaration<DiagramEditorComponent, "daga-diagram-editor", never, {}, { "modelEvent": "modelEvent"; }, never, never, true, never>;
38
- }
@@ -1,26 +0,0 @@
1
- import { AfterViewInit, ElementRef } from '@angular/core';
2
- import * as d3 from 'd3';
3
- import { Canvas } from '../interfaces/canvas';
4
- import { CanvasProviderService } from '../services/canvas-provider.service';
5
- import { Side } from '../util/svg-util';
6
- import { DiagramError } from './diagram-error';
7
- import * as i0 from "@angular/core";
8
- /**
9
- * Displays the errors detected by a diagram's validators.
10
- * @see DiagramValidator
11
- * @private
12
- */
13
- export declare class ErrorsComponent implements AfterViewInit {
14
- private canvasProvider;
15
- get canvas(): Canvas;
16
- errorsContainer: ElementRef<HTMLDivElement>;
17
- errors: DiagramError[];
18
- Side: typeof Side;
19
- constructor(canvasProvider: CanvasProviderService);
20
- ngAfterViewInit(): void;
21
- selectPanel(): d3.Selection<d3.BaseType, unknown, null, unknown>;
22
- validate(): void;
23
- showError(error: DiagramError): void;
24
- static ɵfac: i0.ɵɵFactoryDeclaration<ErrorsComponent, never>;
25
- static ɵcmp: i0.ɵɵComponentDeclaration<ErrorsComponent, "daga-errors", never, {}, {}, never, never, true, never>;
26
- }
@@ -1,39 +0,0 @@
1
- import { AfterContentInit, AfterViewInit, ElementRef } from '@angular/core';
2
- import * as d3 from 'd3';
3
- import { PaletteSectionConfig } from '../diagram-editor/diagram/diagram-config';
4
- import { Canvas } from '../interfaces/canvas';
5
- import { Palette } from '../interfaces/palette';
6
- import { CanvasProviderService } from '../services/canvas-provider.service';
7
- import { Corner, Side } from '../util/svg-util';
8
- import * as i0 from "@angular/core";
9
- /**
10
- * Palette that the user can drag and drop nodes from.
11
- * @see DiagramConfig
12
- * @see DiagramNode
13
- * @private
14
- */
15
- export declare class PaletteComponent implements AfterContentInit, AfterViewInit, Palette {
16
- private canvasProvider;
17
- get canvas(): Canvas;
18
- panel: ElementRef<HTMLDivElement>;
19
- palettes: PaletteSectionConfig[];
20
- currentPalette: PaletteSectionConfig;
21
- currentCategory: string;
22
- location: Corner;
23
- direction: Side;
24
- width: string;
25
- private priorityThreshold?;
26
- constructor(canvasProvider: CanvasProviderService);
27
- ngAfterContentInit(): void;
28
- ngAfterViewInit(): void;
29
- refreshPalette(): void;
30
- switchPalette(palette: PaletteSectionConfig): void;
31
- selectPanel(): d3.Selection<HTMLDivElement, unknown, null, undefined>;
32
- selectPalette(): d3.Selection<HTMLDivElement, unknown, null, undefined>;
33
- private appendCategories;
34
- private appendTemplate;
35
- private appendNodeTemplate;
36
- private appendConnectionTemplate;
37
- static ɵfac: i0.ɵɵFactoryDeclaration<PaletteComponent, never>;
38
- 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; }; }, {}, never, never, true, never>;
39
- }
@@ -1,39 +0,0 @@
1
- import { ChangeDetectorRef, ElementRef, EventEmitter } from '@angular/core';
2
- import { Option } from '../../diagram-editor/diagram/diagram-property';
3
- import * as i0 from "@angular/core";
4
- export declare const LOST_FOCUS_TIME_WINDOW_MS = 200;
5
- /**
6
- * Combobox with autocomplete.
7
- * @see PropertyEditor
8
- * @see ValueSet
9
- * @private
10
- */
11
- export declare class AutocompleteComponent {
12
- private cdr;
13
- mainElement: ElementRef;
14
- private _value;
15
- set value(value: unknown);
16
- get value(): unknown;
17
- valueInput: string;
18
- focusIndex?: number;
19
- options: Option<unknown>[];
20
- currentOptions: Option<unknown>[];
21
- currentLabelStarts: string[];
22
- currentLabelMatches: string[];
23
- currentLabelEnds: string[];
24
- disabled: boolean;
25
- showOptions: boolean;
26
- valueChange: EventEmitter<unknown>;
27
- constructor(cdr: ChangeDetectorRef);
28
- getLabelOfValue(value: unknown): string;
29
- onKeyup(event: KeyboardEvent): void;
30
- openOptions(): void;
31
- closeOptions(): void;
32
- focusOnOption(index: number | undefined): void;
33
- onLostFocus(): void;
34
- scrollToOption(index: number): void;
35
- clearInput(): void;
36
- complete(option: Option<unknown>): void;
37
- static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteComponent, never>;
38
- static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteComponent, "daga-autocomplete", never, { "value": { "alias": "value"; "required": false; }; "valueInput": { "alias": "valueInput"; "required": false; }; "options": { "alias": "options"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
39
- }
@@ -1,30 +0,0 @@
1
- import { ChangeDetectorRef } from '@angular/core';
2
- import { Property, Type, ValueSet } from '../../diagram-editor/diagram/diagram-property';
3
- import { Canvas } from '../../interfaces/canvas';
4
- import { CanvasProviderService } from '../../services/canvas-provider.service';
5
- import * as i0 from "@angular/core";
6
- /**
7
- * Editor of a value set within a property editor.
8
- * @see PropertyEditor
9
- * @see ValueSet
10
- * @private
11
- */
12
- export declare class ObjectEditorComponent {
13
- private cdr;
14
- private canvasProvider;
15
- get canvas(): Canvas;
16
- get userCanEdit(): boolean;
17
- _valueSet?: ValueSet;
18
- get valueSet(): ValueSet | undefined;
19
- set valueSet(valueSet: ValueSet | undefined);
20
- /** How many object-editor elements are parents of this object-editor element. @private */
21
- depth: number;
22
- Type: typeof Type;
23
- getStyleClassName: (s: string) => string;
24
- constructor(cdr: ChangeDetectorRef, canvasProvider: CanvasProviderService);
25
- setValue(property: Property, value: unknown): void;
26
- dateToLocalDatetimeString(date: string | number | Date | null | undefined): string;
27
- localDatetimeStringToDate(string: string): Date;
28
- static ɵfac: i0.ɵɵFactoryDeclaration<ObjectEditorComponent, never>;
29
- static ɵcmp: i0.ɵɵComponentDeclaration<ObjectEditorComponent, "daga-object-editor", never, { "valueSet": { "alias": "valueSet"; "required": false; }; "depth": { "alias": "depth"; "required": false; }; }, {}, never, never, true, never>;
30
- }
@@ -1,33 +0,0 @@
1
- import { ChangeDetectorRef, EventEmitter } from '@angular/core';
2
- import { Option } from '../../diagram-editor/diagram/diagram-property';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * Editor of a property of text list type within a property editor.
6
- * @see Type.TextList
7
- * @see PropertyEditor
8
- * @see ValueSet
9
- * @private
10
- */
11
- export declare class OptionListEditorComponent {
12
- private cdr;
13
- private _value;
14
- set value(value: unknown[]);
15
- get value(): unknown[];
16
- labelsOfValue: string[];
17
- options: Option<unknown>[];
18
- valueInput?: unknown;
19
- allowRepeats: boolean;
20
- optionsNotPresentInValue: Option<unknown>[];
21
- disabled: boolean;
22
- valueChange: EventEmitter<unknown[]>;
23
- constructor(cdr: ChangeDetectorRef);
24
- getLabelOfValue(value: unknown): string;
25
- hasValue(value: unknown): boolean;
26
- removeFromValue(index: number): void;
27
- addToValue(): void;
28
- clearInput(): void;
29
- updateOptionsNotPresentInValue(): void;
30
- onKeyUp(event: KeyboardEvent): void;
31
- static ɵfac: i0.ɵɵFactoryDeclaration<OptionListEditorComponent, never>;
32
- static ɵcmp: i0.ɵɵComponentDeclaration<OptionListEditorComponent, "daga-option-list-editor", never, { "value": { "alias": "value"; "required": false; }; "options": { "alias": "options"; "required": false; }; "valueInput": { "alias": "valueInput"; "required": false; }; "allowRepeats": { "alias": "allowRepeats"; "required": false; }; "optionsNotPresentInValue": { "alias": "optionsNotPresentInValue"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
33
- }
@@ -1,34 +0,0 @@
1
- import { AfterViewInit, ChangeDetectorRef, ElementRef } from '@angular/core';
2
- import * as d3 from 'd3';
3
- import { ValueSet } from '../diagram-editor/diagram/diagram-property';
4
- import { PropertyEditor } from '../interfaces/property-editor';
5
- import { Corner, Side } from '../util/svg-util';
6
- import * as i0 from "@angular/core";
7
- /**
8
- * Duration of the highlight property animation in milliseconds.
9
- */
10
- export declare const HIGHLIGHT_ANIMATION_DURATION_MS = 1000;
11
- /**
12
- * Editor of the values of a value set.
13
- * @see ValueSet
14
- * @private
15
- */
16
- export declare class PropertyEditorComponent implements AfterViewInit, PropertyEditor {
17
- private cdr;
18
- panel: ElementRef<HTMLDivElement>;
19
- location: Corner;
20
- direction: Side;
21
- width: string;
22
- title?: string;
23
- _valueSet: ValueSet | undefined;
24
- get valueSet(): ValueSet | undefined;
25
- set valueSet(valueSet: ValueSet | undefined);
26
- settings?: boolean;
27
- constructor(cdr: ChangeDetectorRef);
28
- ngAfterViewInit(): void;
29
- selectPanel(): d3.Selection<HTMLDivElement, unknown, null, undefined>;
30
- highlightProperty(...propertyNames: string[]): void;
31
- static ɵfac: i0.ɵɵFactoryDeclaration<PropertyEditorComponent, never>;
32
- static ɵcmp: i0.ɵɵComponentDeclaration<PropertyEditorComponent, "daga-property-editor", never, { "location": { "alias": "location"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; "width": { "alias": "width"; "required": false; }; "valueSet": { "alias": "valueSet"; "required": false; }; }, {}, never, never, true, never>;
33
- }
34
- export declare const getStyleClassName: (s: string) => string;
@@ -1,35 +0,0 @@
1
- import { AfterViewInit, ChangeDetectorRef, ElementRef } from '@angular/core';
2
- import { Property, Type, ValueSet } from '../../diagram-editor/diagram/diagram-property';
3
- import { Canvas } from '../../interfaces/canvas';
4
- import { CanvasProviderService } from '../../services/canvas-provider.service';
5
- import { Point } from '../../util/canvas-util';
6
- import * as i0 from "@angular/core";
7
- /**
8
- * Editor of the settings of a property editor, such as what properties are displayed and hidden and in what order.
9
- * @see PropertyEditor
10
- * @see ValueSet
11
- * @private
12
- */
13
- export declare class PropertySettingsComponent implements AfterViewInit {
14
- private element;
15
- private cdr;
16
- private canvasProvider;
17
- get canvas(): Canvas;
18
- _valueSet?: ValueSet;
19
- get valueSet(): ValueSet | undefined;
20
- set valueSet(valueSet: ValueSet | undefined);
21
- /** How many property-settings elements are parents of this property-settings element. @private */
22
- depth: number;
23
- Type: typeof Type;
24
- getStyleClassName: (s: string) => string;
25
- asString: (value: unknown) => string;
26
- constructor(element: ElementRef, cdr: ChangeDetectorRef, canvasProvider: CanvasProviderService);
27
- ngAfterViewInit(): void;
28
- private addListeners;
29
- getClosestDropbarIndex(pointerCoords: Point): number;
30
- displayProperty(property: Property | Event | string | undefined): void;
31
- hideProperty(property: Property | Event | string | undefined): void;
32
- static ɵfac: i0.ɵɵFactoryDeclaration<PropertySettingsComponent, never>;
33
- static ɵcmp: i0.ɵɵComponentDeclaration<PropertySettingsComponent, "daga-property-settings", never, { "valueSet": { "alias": "valueSet"; "required": false; }; "depth": { "alias": "depth"; "required": false; }; }, {}, never, never, true, never>;
34
- }
35
- export declare const asString: (value: unknown) => string;
@@ -1,29 +0,0 @@
1
- import { ChangeDetectorRef, EventEmitter } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * Editor of a property of text list type within a property editor.
5
- * @see Type.TextList
6
- * @see PropertyEditor
7
- * @see ValueSet
8
- * @private
9
- */
10
- export declare class TextListEditorComponent {
11
- private cdr;
12
- private _value;
13
- set value(value: string[]);
14
- get value(): string[];
15
- valueInput: string;
16
- allowRepeats: boolean;
17
- disabled: boolean;
18
- valueChange: EventEmitter<string[]>;
19
- constructor(cdr: ChangeDetectorRef);
20
- getValueFromEvent(event: Event): string;
21
- hasValue(value: string): boolean;
22
- removeFromValue(index: number): void;
23
- editFromValue(item: string, index: number): void;
24
- addToValue(): void;
25
- clearInput(): void;
26
- onKeyUp(event: KeyboardEvent): void;
27
- static ɵfac: i0.ɵɵFactoryDeclaration<TextListEditorComponent, never>;
28
- 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>;
29
- }
@@ -1,36 +0,0 @@
1
- import { ChangeDetectorRef, EventEmitter } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * Editor of a property of text map type within a property editor.
5
- * @see Type.TextMap
6
- * @see PropertyEditor
7
- * @see ValueSet
8
- * @private
9
- */
10
- export declare class TextMapEditorComponent {
11
- private cdr;
12
- private _value;
13
- set value(value: {
14
- [name: string]: string;
15
- });
16
- get value(): {
17
- [name: string]: string;
18
- };
19
- keyInput: string;
20
- valueInput: string;
21
- disabled: boolean;
22
- valueChange: EventEmitter<{
23
- [name: string]: string;
24
- }>;
25
- constructor(cdr: ChangeDetectorRef);
26
- getValueFromEvent(event: Event): string;
27
- removeFromValue(key: string): void;
28
- editKey(oldKey: string, newKey: string): void;
29
- editValue(key: string, value: string): void;
30
- addToValue(): void;
31
- clearKeyInput(): void;
32
- clearValueInput(): void;
33
- onKeyUp(event: KeyboardEvent): void;
34
- static ɵfac: i0.ɵɵFactoryDeclaration<TextMapEditorComponent, never>;
35
- 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>;
36
- }
@@ -1,32 +0,0 @@
1
- import { DiagramConfig } from '../diagram-editor/diagram/diagram-config';
2
- import { Canvas } from '../interfaces/canvas';
3
- import { DiagramEditor } from '../interfaces/diagram-editor';
4
- import * as i0 from "@angular/core";
5
- /**
6
- * A provider for the {@link Canvas} associated with a {@link DiagramComponent} context.
7
- * @public
8
- */
9
- export declare class CanvasProviderService {
10
- private _canvas;
11
- /**
12
- * Initialize the diagram canvas object of this context.
13
- * @private
14
- * @param parentComponent A diagram editor.
15
- * @param config A diagram configuration.
16
- */
17
- initCanvas(parentComponent: DiagramEditor, config: DiagramConfig): void;
18
- /**
19
- * Attach the canvas of this context to an HTML Element to render it there.
20
- * @private
21
- * @param appendTo An HTML Element.
22
- */
23
- initCanvasView(appendTo: HTMLElement): void;
24
- /**
25
- * Get the diagram canvas of this context. Should only be called after the view of the {@link DiagramComponent} context has been initialized.
26
- * @public
27
- * @returns A diagram canvas.
28
- */
29
- getCanvas(): Canvas;
30
- static ɵfac: i0.ɵɵFactoryDeclaration<CanvasProviderService, never>;
31
- static ɵprov: i0.ɵɵInjectableDeclaration<CanvasProviderService>;
32
- }
@@ -1,23 +0,0 @@
1
- import { DiagramConfig } from '../diagram-editor/diagram/diagram-config';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * A provider for the {@link DiagramConfig} associated with a {@link DiagramComponent} context.
5
- * @public
6
- */
7
- export declare class DagaConfigurationService {
8
- private _config;
9
- /**
10
- * Set the diagram configuration of this context.
11
- * @private
12
- * @param config A diagram configuration.
13
- */
14
- init(config: DiagramConfig): void;
15
- /**
16
- * Get the diagram configuration of this context. Should only be called after the {@link DiagramComponent} context has been initialized.
17
- * @public
18
- * @returns A diagram configuration.
19
- */
20
- getConfig(): DiagramConfig;
21
- static ɵfac: i0.ɵɵFactoryDeclaration<DagaConfigurationService, never>;
22
- static ɵprov: i0.ɵɵInjectableDeclaration<DagaConfigurationService>;
23
- }
@@ -7,10 +7,10 @@ import { DiagramSection } from './diagram-section';
7
7
  * A foreign object which is inserted with arbitrary html into a diagram.
8
8
  * Similar to a diagram object, but it's part of a node or section and it moves and stretches as its geometry changes.
9
9
  * Diagram decorators are not serialized with other diagram elements.
10
+ * @public
10
11
  * @see DiagramNode
11
12
  * @see DiagramObject
12
13
  * @see DiagramSection
13
- * @public
14
14
  */
15
15
  export declare class DiagramDecorator extends DiagramElement {
16
16
  /**
@@ -8,8 +8,8 @@ import { DiagramNode } from './diagram-node';
8
8
  import { DiagramSection } from './diagram-section';
9
9
  /**
10
10
  * Default values of the parameters of a diagram port.
11
- * @see DiagramPort
12
11
  * @private
12
+ * @see DiagramPort
13
13
  */
14
14
  export declare const DIAGRAM_PORT_DEFAULTS: {
15
15
  radius: number;
@@ -18,10 +18,10 @@ export declare const DIAGRAM_PORT_DEFAULTS: {
18
18
  };
19
19
  /**
20
20
  * A port which is part of a node or section and at which connections can start or end.
21
+ * @public
21
22
  * @see DiagramConnection
22
23
  * @see DiagramNode
23
24
  * @see DiagramSection
24
- * @public
25
25
  */
26
26
  export declare class DiagramPort extends DiagramElement {
27
27
  /**