@metadev/daga 1.4.2 → 1.5.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/Changelog.md +16 -1
- package/assets/icon/property/add.svg +23 -3
- package/assets/icon/property/gear.svg +3 -0
- package/assets/icon/property/move.svg +35 -0
- package/assets/styles/_property-editor.scss +161 -101
- package/assets/styles/daga.scss +1 -1
- package/fesm2022/metadev-daga.mjs +1276 -651
- package/fesm2022/metadev-daga.mjs.map +1 -1
- package/index.d.ts +4 -4
- package/lib/diagram-editor/diagram/collab/collab-action.d.ts +144 -22
- package/lib/diagram-editor/diagram/collab/primitives.d.ts +9 -2
- package/lib/diagram-editor/diagram/converters/daga-exporter.d.ts +1 -1
- package/lib/diagram-editor/diagram/converters/daga-model.d.ts +57 -3
- package/lib/diagram-editor/diagram/diagram-action.d.ts +23 -51
- package/lib/diagram-editor/diagram/diagram-connection.d.ts +20 -3
- package/lib/diagram-editor/diagram/diagram-element.d.ts +24 -2
- package/lib/diagram-editor/diagram/diagram-field.d.ts +9 -2
- package/lib/diagram-editor/diagram/diagram-node.d.ts +25 -6
- package/lib/diagram-editor/diagram/diagram-port.d.ts +3 -2
- package/lib/diagram-editor/diagram/diagram-property.d.ts +60 -8
- package/lib/diagram-editor/diagram/diagram-section.d.ts +18 -2
- package/lib/property-editor/object-editor/object-editor.component.d.ts +2 -3
- package/lib/property-editor/option-list-editor/option-list-editor.component.d.ts +5 -1
- package/lib/property-editor/property-editor.component.d.ts +2 -0
- package/lib/property-editor/property-settings/property-settings.component.d.ts +35 -0
- package/lib/property-editor/text-list-editor/text-list-editor.component.d.ts +3 -1
- package/package.json +5 -5
package/Changelog.md
CHANGED
|
@@ -4,7 +4,18 @@ List of releases and changes.
|
|
|
4
4
|
|
|
5
5
|

|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## v. 1.5.0
|
|
8
|
+
|
|
9
|
+
- Ported to Angular 18, nx 19, node 20
|
|
10
|
+
|
|
11
|
+
## v. 1.4.3
|
|
12
|
+
|
|
13
|
+
- Add property editor settings page [#113](https://github.com/metadevpro/daga/issues/113) [#119](https://github.com/metadevpro/daga/pull/119) [#120](https://github.com/metadevpro/daga/pull/120)
|
|
14
|
+
- Add `TextSet` and `OptionSet` property types [#121](https://github.com/metadevpro/daga/pull/121)
|
|
15
|
+
- Don't allow adding empty values in `TextList`, `TextSet` and `TextMap` property types [#121](https://github.com/metadevpro/daga/pull/121)
|
|
16
|
+
- Prevent overlapping connections [#122](https://github.com/metadevpro/daga/pull/122)
|
|
17
|
+
- Highlight a port when the pointer is close to the port while drawing a connection [#138](https://github.com/metadevpro/daga/pull/138)
|
|
18
|
+
- Adding support for collaborative actions.
|
|
8
19
|
|
|
9
20
|
## v. 1.4.2
|
|
10
21
|
|
|
@@ -25,11 +36,15 @@ Date: _2024-04-11_
|
|
|
25
36
|
|
|
26
37
|
## v. 1.4.1
|
|
27
38
|
|
|
39
|
+
Date: _2024-03-08_
|
|
40
|
+
|
|
28
41
|
- Fix bug with diagram changes not triggering validation [#91](https://github.com/metadevpro/daga/pull/91)
|
|
29
42
|
- Compensate for scroll when getting cursor position relative to screen [#92](https://github.com/metadevpro/daga/pull/92)
|
|
30
43
|
|
|
31
44
|
## v. 1.4.0 Tizona
|
|
32
45
|
|
|
46
|
+
Date: _2024-03-08_
|
|
47
|
+
|
|
33
48
|
- Enable configuring which components are present in a diagram [#66](https://github.com/metadevpro/daga/pull/66)
|
|
34
49
|
- Add `zoom` configurable user action and enable configuring whether zooming and panning is enabled [#66](https://github.com/metadevpro/daga/pull/66)
|
|
35
50
|
- 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)
|
|
@@ -1,3 +1,23 @@
|
|
|
1
|
-
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path
|
|
3
|
-
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path
|
|
3
|
+
fill-rule="evenodd"
|
|
4
|
+
clip-rule="evenodd"
|
|
5
|
+
fill="#233154"
|
|
6
|
+
d="
|
|
7
|
+
M 13 11
|
|
8
|
+
L 21 11
|
|
9
|
+
V 13
|
|
10
|
+
L 13 13
|
|
11
|
+
L 13 21
|
|
12
|
+
L 11 21
|
|
13
|
+
V 13
|
|
14
|
+
L 3 13
|
|
15
|
+
L 3 11
|
|
16
|
+
L 11 11
|
|
17
|
+
L 11 3
|
|
18
|
+
L 13 3
|
|
19
|
+
V 11
|
|
20
|
+
Z
|
|
21
|
+
"
|
|
22
|
+
/>
|
|
23
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.49998 0H9.49998L10.0939 2.37548C10.7276 2.6115 11.3107 2.95155 11.8223 3.37488L14.1782 2.70096L15.6782 5.29904L13.9173 7.00166C13.9717 7.32634 14 7.65987 14 8C14 8.34013 13.9717 8.67366 13.9173 8.99834L15.6782 10.701L14.1782 13.299L11.8223 12.6251C11.3107 13.0484 10.7276 13.3885 10.0939 13.6245L9.49998 16H6.49998L5.90611 13.6245C5.27238 13.3885 4.68931 13.0484 4.17765 12.6251L1.82178 13.299L0.321777 10.701L2.08266 8.99834C2.02828 8.67366 1.99998 8.34013 1.99998 8C1.99998 7.65987 2.02828 7.32634 2.08266 7.00166L0.321777 5.29904L1.82178 2.70096L4.17764 3.37488C4.68931 2.95155 5.27238 2.6115 5.90611 2.37548L6.49998 0ZM7.99998 10C9.10455 10 9.99998 9.10457 9.99998 8C9.99998 6.89543 9.10455 6 7.99998 6C6.89541 6 5.99998 6.89543 5.99998 8C5.99998 9.10457 6.89541 10 7.99998 10Z" fill="#5F789E"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path
|
|
3
|
+
fill-rule="evenodd"
|
|
4
|
+
clip-rule="evenodd"
|
|
5
|
+
fill="#233154"
|
|
6
|
+
d="
|
|
7
|
+
M 11 11
|
|
8
|
+
V 6
|
|
9
|
+
H 8
|
|
10
|
+
L 12 2
|
|
11
|
+
L 16 6
|
|
12
|
+
H 13
|
|
13
|
+
V 11
|
|
14
|
+
H 18
|
|
15
|
+
V 8
|
|
16
|
+
L 22 12
|
|
17
|
+
L 18 16
|
|
18
|
+
V 13
|
|
19
|
+
H 13
|
|
20
|
+
V 18
|
|
21
|
+
H 16
|
|
22
|
+
L 12 22
|
|
23
|
+
L 8 18
|
|
24
|
+
H 11
|
|
25
|
+
V 13
|
|
26
|
+
H 6
|
|
27
|
+
V 16
|
|
28
|
+
L 2 12
|
|
29
|
+
L 6 8
|
|
30
|
+
V 11
|
|
31
|
+
L 11
|
|
32
|
+
Z
|
|
33
|
+
"
|
|
34
|
+
/>
|
|
35
|
+
</svg>
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
daga-property-editor {
|
|
2
2
|
.title {
|
|
3
|
+
display: flex;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
align-items: center;
|
|
3
6
|
margin: 0;
|
|
4
7
|
width: 100%;
|
|
5
8
|
font-size: 1rem;
|
|
@@ -10,20 +13,41 @@ daga-property-editor {
|
|
|
10
13
|
}
|
|
11
14
|
.property {
|
|
12
15
|
color: var(--daga-font-color);
|
|
16
|
+
background-color: var(--daga-panel-background-color);
|
|
17
|
+
padding-top: 0.5rem;
|
|
18
|
+
padding-bottom: 0.5rem;
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
.property-name {
|
|
21
|
+
button {
|
|
22
|
+
margin-left: 0.25rem;
|
|
23
|
+
}
|
|
24
|
+
display: flex;
|
|
25
|
+
justify-content: space-between;
|
|
26
|
+
align-items: center;
|
|
27
|
+
height: 1.5rem;
|
|
28
|
+
padding-bottom: 0.5rem;
|
|
29
|
+
margin: 0;
|
|
30
|
+
width: 100%;
|
|
31
|
+
font-size: 0.75rem;
|
|
32
|
+
font-weight: 500;
|
|
33
|
+
}
|
|
13
34
|
:disabled,
|
|
14
35
|
.disabled {
|
|
15
36
|
color: var(--daga-font-color-disabled);
|
|
16
37
|
}
|
|
38
|
+
.input,
|
|
17
39
|
input,
|
|
18
|
-
select
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
background-color: var(--daga-property-background-color);
|
|
23
|
-
border: 1px solid var(--daga-property-border-color);
|
|
24
|
-
font-weight: 500;
|
|
25
|
-
font-size: 0.8rem;
|
|
40
|
+
select {
|
|
41
|
+
height: 1.5rem;
|
|
42
|
+
flex-grow: 1;
|
|
43
|
+
flex-basis: 0;
|
|
26
44
|
}
|
|
45
|
+
.property-value,
|
|
46
|
+
input,
|
|
47
|
+
select {
|
|
48
|
+
padding: var(--daga-property-input-padding);
|
|
49
|
+
}
|
|
50
|
+
.property-value,
|
|
27
51
|
input,
|
|
28
52
|
select,
|
|
29
53
|
textarea {
|
|
@@ -32,19 +56,30 @@ daga-property-editor {
|
|
|
32
56
|
font-family: var(--daga-monospace-font-family);
|
|
33
57
|
width: 100%;
|
|
34
58
|
}
|
|
35
|
-
input,
|
|
36
|
-
select {
|
|
37
|
-
height: 1.5rem;
|
|
38
|
-
}
|
|
39
|
-
select {
|
|
40
|
-
padding: var(--daga-property-input-padding);
|
|
41
|
-
}
|
|
42
59
|
textarea {
|
|
43
60
|
height: 5rem;
|
|
44
61
|
padding: var(--daga-property-input-padding);
|
|
45
62
|
resize: none;
|
|
46
63
|
}
|
|
64
|
+
.property-value,
|
|
65
|
+
input,
|
|
66
|
+
select,
|
|
67
|
+
textarea,
|
|
68
|
+
button,
|
|
69
|
+
.radio-item {
|
|
70
|
+
background-color: var(--daga-property-background-color);
|
|
71
|
+
border: 1px solid var(--daga-property-border-color);
|
|
72
|
+
font-weight: 500;
|
|
73
|
+
font-size: 0.8rem;
|
|
74
|
+
}
|
|
47
75
|
.radio {
|
|
76
|
+
@extend .input;
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-direction: row;
|
|
79
|
+
input {
|
|
80
|
+
margin: 0;
|
|
81
|
+
height: 100%;
|
|
82
|
+
}
|
|
48
83
|
.radio-item {
|
|
49
84
|
text-align: center;
|
|
50
85
|
padding: 0.2rem;
|
|
@@ -67,73 +102,87 @@ daga-property-editor {
|
|
|
67
102
|
border-top-right-radius: var(--daga-property-border-radius);
|
|
68
103
|
}
|
|
69
104
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
.property {
|
|
78
|
-
padding-top: 0.5rem;
|
|
79
|
-
padding-bottom: 0.5rem;
|
|
80
|
-
.property-name {
|
|
105
|
+
p.value-item {
|
|
106
|
+
@extend .input;
|
|
107
|
+
margin: 0;
|
|
108
|
+
overflow: hidden;
|
|
109
|
+
text-overflow: ellipsis;
|
|
110
|
+
}
|
|
111
|
+
.value-item-input {
|
|
81
112
|
display: flex;
|
|
82
|
-
|
|
83
|
-
|
|
113
|
+
align-items: stretch;
|
|
114
|
+
flex-direction: row;
|
|
84
115
|
height: 1.5rem;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
text-transform: uppercase;
|
|
116
|
+
gap: 0.5rem;
|
|
117
|
+
}
|
|
118
|
+
.value-item-element {
|
|
119
|
+
@extend .value-item-input;
|
|
120
|
+
margin-bottom: 0.5rem;
|
|
91
121
|
}
|
|
92
122
|
}
|
|
93
123
|
|
|
94
|
-
.
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
124
|
+
.autocomplete {
|
|
125
|
+
.autocomplete-input {
|
|
126
|
+
position: relative;
|
|
127
|
+
}
|
|
128
|
+
.autocomplete-options {
|
|
129
|
+
visibility: hidden;
|
|
130
|
+
.autocomplete-option-list {
|
|
131
|
+
position: absolute;
|
|
132
|
+
width: 100%;
|
|
133
|
+
z-index: 2;
|
|
134
|
+
background-color: #ffffff;
|
|
135
|
+
border: 1px solid var(--daga-property-border-color);
|
|
136
|
+
border-radius: 0 0 var(--daga-property-border-radius)
|
|
137
|
+
var(--daga-property-border-radius);
|
|
138
|
+
max-height: 10rem;
|
|
139
|
+
box-sizing: border-box;
|
|
140
|
+
overflow: auto;
|
|
141
|
+
list-style-type: none;
|
|
142
|
+
padding: 0;
|
|
143
|
+
margin: 0;
|
|
144
|
+
.autocomplete-option {
|
|
145
|
+
.match {
|
|
146
|
+
font-weight: bold;
|
|
147
|
+
}
|
|
148
|
+
padding: var(--daga-property-input-padding);
|
|
149
|
+
cursor: pointer;
|
|
150
|
+
}
|
|
151
|
+
.autocomplete-option.focused {
|
|
152
|
+
background-color: var(--daga-property-background-color);
|
|
153
|
+
}
|
|
154
|
+
.autocomplete-option.no-options {
|
|
155
|
+
font-style: italic;
|
|
156
|
+
color: var(--daga-font-color-disabled);
|
|
157
|
+
cursor: default;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
100
161
|
}
|
|
101
|
-
.
|
|
102
|
-
|
|
103
|
-
|
|
162
|
+
.autocomplete.showing-options {
|
|
163
|
+
input {
|
|
164
|
+
border-radius: var(--daga-property-border-radius)
|
|
165
|
+
var(--daga-property-border-radius) 0 0;
|
|
166
|
+
}
|
|
167
|
+
.autocomplete-options {
|
|
168
|
+
visibility: visible;
|
|
169
|
+
}
|
|
104
170
|
}
|
|
171
|
+
|
|
105
172
|
.left-bar {
|
|
106
173
|
padding-left: 1rem;
|
|
107
174
|
border-left: 0.25rem solid var(--daga-property-background-color);
|
|
108
175
|
}
|
|
109
176
|
|
|
110
|
-
.
|
|
177
|
+
.property-value {
|
|
111
178
|
height: 1.5rem;
|
|
112
|
-
flex-grow: 1;
|
|
113
|
-
flex-basis: 0;
|
|
114
|
-
}
|
|
115
|
-
input {
|
|
116
|
-
@extend .input;
|
|
117
|
-
padding: var(--daga-property-input-padding);
|
|
118
|
-
}
|
|
119
|
-
.radio {
|
|
120
|
-
@extend .input;
|
|
121
|
-
display: flex;
|
|
122
|
-
flex-direction: row;
|
|
123
|
-
input {
|
|
124
|
-
margin: 0;
|
|
125
|
-
height: 100%;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
p.value-item {
|
|
129
|
-
@extend .input;
|
|
130
|
-
margin: 0;
|
|
131
179
|
overflow: hidden;
|
|
132
180
|
text-overflow: ellipsis;
|
|
181
|
+
white-space: nowrap;
|
|
182
|
+
cursor: default;
|
|
183
|
+
user-select: none;
|
|
133
184
|
}
|
|
134
|
-
|
|
135
|
-
position: relative;
|
|
136
|
-
}
|
|
185
|
+
|
|
137
186
|
button.property-button {
|
|
138
187
|
.icon {
|
|
139
188
|
background-size: contain;
|
|
@@ -141,6 +190,9 @@ daga-autocomplete {
|
|
|
141
190
|
width: 1rem;
|
|
142
191
|
height: 1rem;
|
|
143
192
|
}
|
|
193
|
+
.move-icon {
|
|
194
|
+
background-image: url(../icon/property/move.svg);
|
|
195
|
+
}
|
|
144
196
|
.hide-icon {
|
|
145
197
|
background-image: url(../icon/property/hide.svg);
|
|
146
198
|
}
|
|
@@ -150,6 +202,9 @@ daga-autocomplete {
|
|
|
150
202
|
.add-icon {
|
|
151
203
|
background-image: url(../icon/property/add.svg);
|
|
152
204
|
}
|
|
205
|
+
.settings-icon {
|
|
206
|
+
background-image: url(../icon/property/gear.svg);
|
|
207
|
+
}
|
|
153
208
|
min-width: 1.5rem;
|
|
154
209
|
min-height: 1.5rem;
|
|
155
210
|
width: 1.5rem;
|
|
@@ -181,45 +236,50 @@ daga-autocomplete {
|
|
|
181
236
|
z-index: 1;
|
|
182
237
|
}
|
|
183
238
|
|
|
184
|
-
.
|
|
185
|
-
|
|
186
|
-
|
|
239
|
+
.relatively-positioned {
|
|
240
|
+
position: relative;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.rotate {
|
|
244
|
+
transform: rotate(0deg);
|
|
245
|
+
animation-name: rotate-animation;
|
|
246
|
+
animation-duration: 0.5s;
|
|
247
|
+
}
|
|
248
|
+
.unrotate {
|
|
249
|
+
transform: rotate(30deg);
|
|
250
|
+
animation-name: unrotate-animation;
|
|
251
|
+
animation-duration: 0.5s;
|
|
252
|
+
}
|
|
253
|
+
@keyframes rotate-animation {
|
|
254
|
+
from {
|
|
255
|
+
transform: rotate(30deg);
|
|
187
256
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
.autocomplete-option-list {
|
|
191
|
-
position: absolute;
|
|
192
|
-
width: 100%;
|
|
193
|
-
background-color: #ffffff;
|
|
194
|
-
border: 1px solid var(--daga-property-border-color);
|
|
195
|
-
border-radius: 0 0 var(--daga-property-border-radius)
|
|
196
|
-
var(--daga-property-border-radius);
|
|
197
|
-
max-height: 10rem;
|
|
198
|
-
box-sizing: border-box;
|
|
199
|
-
overflow: auto;
|
|
200
|
-
list-style-type: none;
|
|
201
|
-
padding: 0;
|
|
202
|
-
margin: 0;
|
|
203
|
-
.autocomplete-option {
|
|
204
|
-
.match {
|
|
205
|
-
font-weight: bold;
|
|
206
|
-
}
|
|
207
|
-
padding: var(--daga-property-input-padding);
|
|
208
|
-
cursor: pointer;
|
|
209
|
-
}
|
|
210
|
-
.autocomplete-option.focused {
|
|
211
|
-
background-color: var(--daga-property-background-color);
|
|
212
|
-
}
|
|
213
|
-
}
|
|
257
|
+
to {
|
|
258
|
+
transform: rotate(0deg);
|
|
214
259
|
}
|
|
215
260
|
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
var(--daga-property-border-radius) 0 0;
|
|
261
|
+
@keyframes unrotate-animation {
|
|
262
|
+
from {
|
|
263
|
+
transform: rotate(0deg);
|
|
220
264
|
}
|
|
221
|
-
|
|
222
|
-
|
|
265
|
+
to {
|
|
266
|
+
transform: rotate(30deg);
|
|
223
267
|
}
|
|
224
268
|
}
|
|
225
269
|
}
|
|
270
|
+
|
|
271
|
+
daga-property-settings {
|
|
272
|
+
.property {
|
|
273
|
+
padding: 0.5rem;
|
|
274
|
+
margin: 0.5rem 0;
|
|
275
|
+
border-radius: 0.5rem;
|
|
276
|
+
border: 1px solid var(--daga-property-border-color);
|
|
277
|
+
}
|
|
278
|
+
.dropbar {
|
|
279
|
+
visibility: collapse;
|
|
280
|
+
width: 100%;
|
|
281
|
+
border-radius: 0.125rem;
|
|
282
|
+
background-color: var(--daga-property-border-color);
|
|
283
|
+
margin: 0.5rem 0;
|
|
284
|
+
}
|
|
285
|
+
}
|
package/assets/styles/daga.scss
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
--daga-property-selected-background-color: #0095f9;
|
|
18
18
|
--daga-property-disabled-color: var(--daga-property-background-color);
|
|
19
19
|
--daga-property-border-radius: 0.25rem;
|
|
20
|
-
--daga-property-input-padding: 0 0.5rem;
|
|
20
|
+
--daga-property-input-padding: 0.2rem 0.5rem;
|
|
21
21
|
--daga-error-color: #ff6363;
|
|
22
22
|
|
|
23
23
|
--daga-primary-font-family: 'WonderUnitSans', sans-serif;
|