@metadev/daga 1.3.1 → 1.4.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.
Files changed (38) hide show
  1. package/Changelog.md +31 -0
  2. package/assets/styles/_diagram-buttons.scss +71 -37
  3. package/assets/styles/_palette.scss +12 -4
  4. package/assets/styles/_property-editor.scss +0 -3
  5. package/assets/styles/daga.scss +9 -5
  6. package/fesm2022/metadev-daga.mjs +3069 -2588
  7. package/fesm2022/metadev-daga.mjs.map +1 -1
  8. package/index.d.ts +1 -1
  9. package/lib/diagram/diagram.component.d.ts +28 -3
  10. package/lib/diagram-buttons/diagram-buttons.component.d.ts +14 -3
  11. package/lib/diagram-editor/diagram/converters/daga-model.d.ts +5 -0
  12. package/lib/diagram-editor/diagram/diagram-action.d.ts +61 -10
  13. package/lib/diagram-editor/diagram/diagram-canvas.d.ts +26 -7
  14. package/lib/diagram-editor/diagram/diagram-config.d.ts +199 -41
  15. package/lib/diagram-editor/diagram/diagram-connection.d.ts +1 -0
  16. package/lib/diagram-editor/diagram/diagram-element.d.ts +10 -0
  17. package/lib/diagram-editor/diagram/diagram-field.d.ts +11 -4
  18. package/lib/diagram-editor/diagram/diagram-model.d.ts +0 -16
  19. package/lib/diagram-editor/diagram/diagram-node.d.ts +5 -4
  20. package/lib/diagram-editor/diagram/diagram-port.d.ts +1 -0
  21. package/lib/diagram-editor/diagram/diagram-section.d.ts +40 -8
  22. package/lib/diagram-editor/diagram-editor.component.d.ts +2 -1
  23. package/lib/interfaces/canvas.d.ts +48 -17
  24. package/lib/palette/palette.component.d.ts +8 -6
  25. package/lib/property-editor/property-editor.component.d.ts +9 -4
  26. package/lib/services/canvas-provider.service.d.ts +1 -1
  27. package/lib/services/daga-configuration.service.d.ts +1 -1
  28. package/lib/util/events.d.ts +5 -1
  29. package/lib/util/style.d.ts +13 -0
  30. package/lib/util/text-util.d.ts +2 -0
  31. package/package.json +1 -1
  32. package/assets/config/generic-diagram.json +0 -94
  33. package/assets/icon/connection/arrow.svg +0 -23
  34. package/assets/icon/connection/empty-arrow.svg +0 -19
  35. package/assets/icon/connection/empty-diamond.svg +0 -20
  36. package/assets/icon/connection/filled-arrow.svg +0 -19
  37. package/assets/icon/connection/filled-diamond.svg +0 -20
  38. package/assets/icon/connection/line.svg +0 -9
package/Changelog.md CHANGED
@@ -4,6 +4,37 @@ List of releases and changes.
4
4
 
5
5
  ![Daga logo](https://metadev.pro/icons/daga-logo-header.svg)
6
6
 
7
+ ## Next release Colada
8
+
9
+ ## v. 1.4.1
10
+
11
+ - Fix bug with diagram changes not triggering validation [#91](https://github.com/metadevpro/daga/pull/91)
12
+ - Compensate for scroll when getting cursor position relative to screen [#92](https://github.com/metadevpro/daga/pull/92)
13
+
14
+ ## v. 1.4.0 Tizona
15
+
16
+ - Enable configuring which components are present in a diagram [#66](https://github.com/metadevpro/daga/pull/66)
17
+ - Add `zoom` configurable user action and enable configuring whether zooming and panning is enabled [#66](https://github.com/metadevpro/daga/pull/66)
18
+ - Rename `color` configuration property of diagram to `backgroundColor` and `color` configuration property of node to `fillColor` [#65](https://github.com/metadevpro/daga/issues/65) [#69](https://github.com/metadevpro/daga/pull/69)
19
+ - Remove `generic-diagram.json` file and add testing diagram configuration in `test-util` file instead [#69](https://github.com/metadevpro/daga/pull/69)
20
+ - Fix bug with connections with zero priority not being displayed [#70](https://github.com/metadevpro/daga/pull/70)
21
+ - Organize the configuration for each diagram component in the diagram configuration interface [#71](https://github.com/metadevpro/daga/pull/71)
22
+ - Enable configuring the location of diagram components [#71](https://github.com/metadevpro/daga/pull/71)
23
+ - Enable configuring the presence of specific buttons in the diagram buttons [#71](https://github.com/metadevpro/daga/pull/71)
24
+ - Generalize the expansion and collapse animation of the diagram buttons to an arbitrary number of buttons [#71](https://github.com/metadevpro/daga/pull/71)
25
+ - Add `fit` option to `FieldConfig` interface. Resize nodes and sections when that option is true and the size of their labels changes. [#35](https://github.com/metadevpro/daga/pull/35)
26
+ - Fix [#39](https://github.com/metadevpro/daga/issues/39) Allow delete with `backspace` key for Mac (no delete key on Mac).
27
+ - Fix [#75](https://github.com/metadevpro/daga/issues/75) Blur event in input field. Also implement autoselect all text.
28
+ - Reorganize configuration of diagram sections such that each section can be configured individually [#81](https://github.com/metadevpro/daga/pull/81)
29
+ - Resize nodes when filtering their sections [#83](https://github.com/metadevpro/daga/pull/83)
30
+ - Add methods to more easily get the priority of diagram elements and get and set the priority threshold of a canvas [#83](https://github.com/metadevpro/daga/pull/83)
31
+ - Use `not-allowed` cursor style when the user attempts to do an action that is not allowed [#41](https://github.com/metadevpro/daga/issues/41) [#85](https://github.com/metadevpro/daga/pull/85)
32
+ - Group up diagram elements by their type in the dom to ensure order of drawing of diagram elements [#84](https://github.com/metadevpro/daga/issues/84) [#86](https://github.com/metadevpro/daga/pull/86)
33
+ - Enable two way diagram model databinding [#73](https://github.com/metadevpro/daga/issues/73) [#87](https://github.com/metadevpro/daga/pull/87)
34
+ - Enable making changes to the diagram in the view without broadcasting changes to the model [#87](https://github.com/metadevpro/daga/pull/87)
35
+ - Move example-specific assets to their example asset folder [#87](https://github.com/metadevpro/daga/pull/87)
36
+ - Add a diagram's ValueSet to the DagaModel and serialize and deserialize a diagram's ValueSet when exporting and importing a diagram using the default daga exporter/importer [#87](https://github.com/metadevpro/daga/pull/87)
37
+
7
38
  ## v. 1.3.1
8
39
 
9
40
  Date: _2024.02.13_
@@ -1,23 +1,26 @@
1
1
  daga-diagram-buttons {
2
2
  .diagram-buttons {
3
- position: absolute;
4
- right: 1rem;
5
- bottom: 1rem;
3
+ margin: 1rem;
4
+ display: flex;
5
+ gap: 1rem;
6
+ .collapsable-buttons {
7
+ display: flex;
8
+ gap: 1rem;
9
+ }
6
10
  button {
7
11
  position: relative;
8
12
  display: block;
13
+ min-height: 3rem;
9
14
  height: 3rem;
15
+ min-width: 3rem;
10
16
  width: 3rem;
11
17
  padding: 0;
12
18
  border: 0;
13
- margin-bottom: 1rem;
14
19
  background-color: transparent;
15
20
  .tooltip {
16
21
  visibility: hidden;
17
22
  z-index: 1;
18
23
  position: absolute;
19
- top: 0.5rem;
20
- right: 3.5rem;
21
24
  height: 2rem;
22
25
  padding: 0.6rem;
23
26
  border-radius: 0.25rem;
@@ -89,44 +92,75 @@ daga-diagram-buttons {
89
92
  button.more-options:hover {
90
93
  background-image: url(../icon/buttons/ellipsis-hover.svg);
91
94
  }
92
- .collapsable-buttons.collapsing {
93
- animation-name: collapse-animation;
94
- animation-duration: 1s;
95
- animation-fill-mode: forwards;
95
+ }
96
+ .diagram-buttons.bottom-right.bottom,
97
+ .diagram-buttons.bottom-right.top,
98
+ .diagram-buttons.top-right.bottom,
99
+ .diagram-buttons.top-right.top {
100
+ .tooltip {
101
+ top: 0.5rem;
102
+ right: 3.5rem;
96
103
  }
97
- .collapsable-buttons.expanding {
98
- animation-name: expand-animation;
99
- animation-duration: 1s;
100
- animation-fill-mode: forwards;
104
+ }
105
+ .diagram-buttons.bottom-left.bottom,
106
+ .diagram-buttons.bottom-left.top,
107
+ .diagram-buttons.top-left.bottom,
108
+ .diagram-buttons.top-left.top {
109
+ .tooltip {
110
+ top: 0.5rem;
111
+ left: 3.5rem;
101
112
  }
102
- .collapsable-buttons.collapsed {
103
- transform: scale(1, 0);
104
- height: 0;
113
+ }
114
+ .diagram-buttons.bottom-left.left,
115
+ .diagram-buttons.bottom-left.right {
116
+ .tooltip {
117
+ bottom: 3.5rem;
118
+ left: 0rem;
105
119
  }
106
120
  }
107
-
108
- @keyframes collapse-animation {
109
- from {
110
- transform: scale(1, 1);
111
- transform-origin: 0% 0%;
112
- height: 12rem;
113
- }
114
- to {
115
- transform: scale(1, 0);
116
- transform-origin: 0% 0%;
117
- height: 0;
121
+ .diagram-buttons.bottom-right.left,
122
+ .diagram-buttons.bottom-right.right {
123
+ .tooltip {
124
+ bottom: 3.5rem;
125
+ right: 0rem;
118
126
  }
119
127
  }
120
- @keyframes expand-animation {
121
- from {
122
- transform: scale(1, 0);
123
- transform-origin: 0% 0%;
124
- height: 0;
128
+ .diagram-buttons.top-left.left,
129
+ .diagram-buttons.top-left.right {
130
+ .tooltip {
131
+ top: 3.5rem;
132
+ left: 0rem;
125
133
  }
126
- to {
127
- transform: scale(1, 1);
128
- transform-origin: 0% 0%;
129
- height: 12rem;
134
+ }
135
+ .diagram-buttons.top-right.left,
136
+ .diagram-buttons.top-right.right {
137
+ .tooltip {
138
+ top: 3.5rem;
139
+ right: 0rem;
140
+ }
141
+ }
142
+ .diagram-buttons.bottom {
143
+ .collapsable-buttons {
144
+ flex-direction: column;
145
+ }
146
+ flex-direction: column;
147
+ }
148
+ .diagram-buttons.top {
149
+ .collapsable-buttons {
150
+ flex-direction: column-reverse;
151
+ }
152
+ flex-direction: column-reverse;
153
+ }
154
+ .diagram-buttons.right {
155
+ .collapsable-buttons {
156
+ flex-direction: row;
157
+ }
158
+ flex-direction: row;
159
+ }
160
+ .diagram-buttons.left {
161
+ .collapsable-buttons {
162
+ flex-direction: row-reverse;
130
163
  }
164
+ flex-direction: row-reverse;
131
165
  }
132
166
  }
@@ -1,12 +1,20 @@
1
1
  daga-palette {
2
- .panel {
3
- width: 12rem;
4
- }
5
2
  .palette-view {
6
3
  display: flex;
7
- flex-direction: column;
8
4
  align-items: center;
9
5
  gap: 1rem;
10
6
  padding: 1rem;
11
7
  }
8
+ .panel.bottom .palette-view {
9
+ flex-direction: column;
10
+ }
11
+ .panel.top .palette-view {
12
+ flex-direction: column-reverse;
13
+ }
14
+ .panel.right .palette-view {
15
+ flex-direction: row;
16
+ }
17
+ .panel.left .palette-view {
18
+ flex-direction: row-reverse;
19
+ }
12
20
  }
@@ -1,7 +1,4 @@
1
1
  daga-property-editor {
2
- .panel {
3
- width: 24rem;
4
- }
5
2
  .title {
6
3
  margin: 0;
7
4
  width: 100%;
@@ -72,21 +72,26 @@ daga-diagram {
72
72
  }
73
73
 
74
74
  .top-left {
75
+ position: absolute;
75
76
  left: 0;
76
77
  top: 0;
77
78
  }
78
79
  .top-right {
80
+ position: absolute;
79
81
  right: 0;
80
82
  top: 0;
81
83
  }
82
84
  .bottom-left {
85
+ position: absolute;
83
86
  bottom: 0;
84
87
  left: 0;
85
88
  }
86
89
  .bottom-right {
90
+ position: absolute;
87
91
  bottom: 0;
88
92
  right: 0;
89
93
  }
94
+
90
95
  .panel {
91
96
  background-color: var(--daga-panel-secondary-color);
92
97
  border: 1px solid var(--daga-panel-border-color);
@@ -97,7 +102,6 @@ daga-diagram {
97
102
  margin: 1rem;
98
103
  max-height: calc(100% - 2rem);
99
104
  max-width: calc(100% - 2rem);
100
- position: absolute;
101
105
  .collapse-button.bottom {
102
106
  border-radius: 0.75rem 0.75rem 0 0;
103
107
  }
@@ -138,15 +142,15 @@ daga-diagram {
138
142
  }
139
143
  }
140
144
  .panel.bottom {
141
- flex-flow: column;
145
+ flex-direction: column;
142
146
  }
143
147
  .panel.top {
144
- flex-flow: column-reverse;
148
+ flex-direction: column-reverse;
145
149
  }
146
150
  .panel.right {
147
- flex-flow: row;
151
+ flex-direction: row;
148
152
  }
149
153
  .panel.left {
150
- flex-flow: row-reverse;
154
+ flex-direction: row-reverse;
151
155
  }
152
156
  }