sequential-workflow-designer 0.14.2 → 0.15.3

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/css/designer.css CHANGED
@@ -1,286 +1,284 @@
1
-
1
+ /* .sqd-designer */
2
2
  .sqd-designer {
3
- position: relative;
4
- display: flex;
5
- width: 100%;
6
- height: 100%;
3
+ position: relative;
4
+ display: flex;
5
+ width: 100%;
6
+ height: 100%;
7
7
  }
8
- .sqd-designer, .sqd-drag, .sqd-context-menu {
9
- font-size: 13px;
10
- line-height: 1em;
8
+
9
+ .sqd-designer,
10
+ .sqd-drag,
11
+ .sqd-context-menu {
12
+ font-size: 13px;
13
+ line-height: 1em;
11
14
  }
15
+
12
16
  .sqd-hidden {
13
- display: none !important;
17
+ display: none !important;
14
18
  }
19
+
15
20
  .sqd-disabled {
16
- opacity: 0.25;
21
+ opacity: 0.25;
17
22
  }
18
23
 
19
24
  /* .sqd-toolbox */
20
-
21
- .sqd-toolbox, .sqd-toolbox-filter {
22
- font-size: 11px;
23
- line-height: 1.2em;
25
+ .sqd-toolbox,
26
+ .sqd-toolbox-filter {
27
+ font-size: 11px;
28
+ line-height: 1.2em;
24
29
  }
30
+
25
31
  .sqd-toolbox {
26
- position: absolute;
27
- top: 10px;
28
- left: 10px;
29
- z-index: 20;
30
- box-sizing: border-box;
31
- border-radius: 10px;
32
- width: 130px;
33
- user-select: none;
32
+ position: absolute;
33
+ top: 10px;
34
+ left: 10px;
35
+ z-index: 20;
36
+ box-sizing: border-box;
37
+ border-radius: 10px;
38
+ width: 130px;
39
+ user-select: none;
34
40
  }
41
+
35
42
  .sqd-toolbox-header {
36
- position: relative;
37
- padding: 15px 10px;
38
- cursor: pointer;
43
+ position: relative;
44
+ padding: 15px 10px;
45
+ cursor: pointer;
39
46
  }
47
+
40
48
  .sqd-toolbox-header-title {
41
- display: block;
42
- font-size: 1.2em;
43
- line-height: 1em;
44
- font-weight: bold;
49
+ display: block;
50
+ font-size: 1.2em;
51
+ line-height: 1em;
52
+ font-weight: bold;
45
53
  }
54
+
46
55
  .sqd-toolbox-toggle-icon {
47
- position: absolute;
48
- top: 50%;
49
- right: 10px;
50
- width: 16px;
51
- height: 16px;
52
- margin: -8px 0 0;
56
+ position: absolute;
57
+ top: 50%;
58
+ right: 10px;
59
+ width: 16px;
60
+ height: 16px;
61
+ margin: -8px 0 0;
53
62
  }
63
+
54
64
  .sqd-toolbox-header:hover .sqd-toolbox-toggle-icon {
55
- opacity: .6;
65
+ opacity: 0.6;
56
66
  }
67
+
57
68
  .sqd-scrollbox {
58
- position: relative;
59
- overflow: hidden;
69
+ position: relative;
70
+ overflow: hidden;
60
71
  }
72
+
61
73
  .sqd-scrollbox-body {
62
- position: absolute;
63
- top: 0;
64
- left: 0;
74
+ position: absolute;
75
+ top: 0;
76
+ left: 0;
65
77
  }
78
+
66
79
  .sqd-toolbox-filter {
67
- display: block;
68
- box-sizing: border-box;
69
- padding: 6px 8px;
70
- outline: none;
71
- width: 110px;
72
- margin: 0 10px 10px;
73
- box-sizing: border-box;
74
- border-radius: 10px;
80
+ display: block;
81
+ box-sizing: border-box;
82
+ padding: 6px 8px;
83
+ outline: none;
84
+ width: 110px;
85
+ margin: 0 10px 10px;
86
+ box-sizing: border-box;
87
+ border-radius: 10px;
75
88
  }
89
+
76
90
  .sqd-toolbox-group-title {
77
- text-align: center;
78
- padding: 5px 0;
79
- margin: 0 10px 10px;
80
- border-radius: 10px;
91
+ text-align: center;
92
+ padding: 5px 0;
93
+ margin: 0 10px 10px;
94
+ border-radius: 10px;
81
95
  }
96
+
82
97
  .sqd-toolbox-item {
83
- position: relative;
84
- border-radius: 5px;
85
- box-sizing: border-box;
86
- margin: 0 10px 10px;
87
- width: 110px;
88
- cursor: move;
98
+ position: relative;
99
+ border-radius: 5px;
100
+ box-sizing: border-box;
101
+ margin: 0 10px 10px;
102
+ width: 110px;
103
+ cursor: move;
89
104
  }
105
+
90
106
  .sqd-toolbox-item-icon {
91
- position: absolute;
92
- top: 50%;
93
- left: 5px;
94
- margin-top: -10px;
95
- width: 20px;
96
- height: 20px;
107
+ position: absolute;
108
+ top: 50%;
109
+ left: 5px;
110
+ margin-top: -10px;
111
+ width: 20px;
112
+ height: 20px;
97
113
  }
114
+
98
115
  .sqd-toolbox-item-icon.sqd-no-icon {
99
- border-radius: 4px;
116
+ border-radius: 4px;
100
117
  }
118
+
101
119
  .sqd-toolbox-item-icon-image {
102
- width: 100%;
103
- height: 100%;
120
+ width: 100%;
121
+ height: 100%;
104
122
  }
123
+
105
124
  .sqd-toolbox-item-text {
106
- position: relative;
107
- display: block;
108
- padding: 10px 10px 10px 30px;
109
- white-space: nowrap;
110
- text-overflow: ellipsis;
111
- overflow: hidden;
125
+ position: relative;
126
+ display: block;
127
+ padding: 10px 10px 10px 30px;
128
+ white-space: nowrap;
129
+ text-overflow: ellipsis;
130
+ overflow: hidden;
112
131
  }
113
132
 
114
133
  .sqd-drag {
115
- position: absolute;
116
- z-index: 9999999;
117
- pointer-events: none;
134
+ position: absolute;
135
+ z-index: 9999999;
136
+ pointer-events: none;
118
137
  }
119
138
 
120
139
  /* .sqd-control-bar */
121
-
122
140
  .sqd-control-bar {
123
- position: absolute;
124
- bottom: 10px;
125
- left: 10px;
126
- z-index: 20;
127
- padding: 8px 0 8px 8px;
128
- border-radius: 10px;
129
- white-space: nowrap;
141
+ position: absolute;
142
+ bottom: 10px;
143
+ left: 10px;
144
+ z-index: 20;
145
+ padding: 8px 0 8px 8px;
146
+ border-radius: 10px;
147
+ white-space: nowrap;
130
148
  }
149
+
131
150
  .sqd-control-bar-button {
132
- display: inline-block;
133
- width: 32px;
134
- height: 32px;
135
- border-radius: 5px;
136
- margin-right: 8px;
137
- cursor: pointer;
138
- box-sizing: border-box;
151
+ display: inline-block;
152
+ width: 32px;
153
+ height: 32px;
154
+ border-radius: 5px;
155
+ margin-right: 8px;
156
+ cursor: pointer;
157
+ box-sizing: border-box;
139
158
  }
140
- .sqd-control-bar-button-icon {
141
- width: 24px;
142
- height: 24px;
143
- margin: 3px 0 0 3px;
144
- }
145
- .sqd-control-bar-button.sqd-disabled .sqd-control-bar-button-icon {
146
- opacity: .2;
147
- }
148
-
149
- /* .sqd-workspace */
150
159
 
151
- .sqd-workspace {
152
- flex: 1;
153
- position: relative;
154
- display: block;
155
- user-select: none;
156
- }
157
- .sqd-workspace-canvas {
158
- position: absolute;
159
- top: 0;
160
- left: 0;
161
- cursor: move;
162
- }
163
- .sqd-grid-path {
164
- stroke-width: 1;
165
- }
166
- .sqd-join {
167
- stroke-width: 2;
160
+ .sqd-control-bar-button-icon {
161
+ width: 24px;
162
+ height: 24px;
163
+ margin: 3px 0 0 3px;
168
164
  }
169
165
 
170
- /* .sqd-context-menu */
171
-
172
- .sqd-context-menu {
173
- position: absolute;
174
- z-index: 2000000000;
175
- border-radius: 4px;
176
- overflow: hidden;
177
- padding: 5px;
178
- }
179
- .sqd-context-menu-group, .sqd-context-menu-item {
180
- width: 130px;
181
- padding: 8px 10px;
182
- white-space: nowrap;
183
- text-overflow: ellipsis;
184
- overflow: hidden;
185
- }
186
- .sqd-context-menu-group {
187
- font-size: 11px;
188
- line-height: 1em;
189
- }
190
- .sqd-context-menu-item {
191
- border-radius: 5px;
192
- cursor: pointer;
193
- transition: background 70ms;
166
+ .sqd-control-bar-button.sqd-disabled .sqd-control-bar-button-icon {
167
+ opacity: 0.2;
194
168
  }
195
169
 
196
170
  /* .sqd-smart-editor */
197
-
198
171
  .sqd-smart-editor-toggle {
199
- position: absolute;
200
- top: 0;
201
- z-index: 29;
202
- width: 36px;
203
- height: 64px;
204
- border-bottom-left-radius: 10px;
205
- cursor: pointer;
172
+ position: absolute;
173
+ top: 0;
174
+ z-index: 29;
175
+ width: 36px;
176
+ height: 64px;
177
+ border-bottom-left-radius: 10px;
178
+ cursor: pointer;
206
179
  }
180
+
207
181
  .sqd-smart-editor-toggle-icon {
208
- position: absolute;
209
- top: 50%;
210
- left: 50%;
211
- width: 24px;
212
- height: 24px;
213
- margin: -12px 0 0 -12px;
182
+ position: absolute;
183
+ top: 50%;
184
+ left: 50%;
185
+ width: 24px;
186
+ height: 24px;
187
+ margin: -12px 0 0 -12px;
214
188
  }
189
+
215
190
  .sqd-smart-editor-toggle:hover .sqd-smart-editor-toggle-icon {
216
- opacity: .6;
191
+ opacity: 0.6;
217
192
  }
193
+
218
194
  .sqd-smart-editor {
219
- z-index: 30;
195
+ z-index: 30;
220
196
  }
197
+
221
198
  .sqd-layout-desktop .sqd-smart-editor {
222
- position: relative;
223
- width: 300px;
199
+ position: relative;
200
+ width: 300px;
224
201
  }
202
+
225
203
  .sqd-layout-desktop .sqd-smart-editor-toggle {
226
- right: 300px;
204
+ right: 300px;
227
205
  }
206
+
228
207
  .sqd-layout-desktop .sqd-smart-editor-toggle.sqd-collapsed {
229
- right: 0;
208
+ right: 0;
230
209
  }
210
+
231
211
  .sqd-layout-mobile .sqd-smart-editor {
232
- position: absolute;
233
- top: 0;
234
- right: 0;
235
- bottom: 0;
236
- left: 41px;
212
+ position: absolute;
213
+ top: 0;
214
+ right: 0;
215
+ bottom: 0;
216
+ left: 41px;
237
217
  }
218
+
238
219
  .sqd-layout-mobile .sqd-smart-editor-toggle {
239
- left: 5px;
220
+ left: 5px;
240
221
  }
222
+
241
223
  .sqd-layout-mobile .sqd-smart-editor-toggle.sqd-collapsed {
242
- left: auto;
243
- right: 0;
224
+ left: auto;
225
+ right: 0;
244
226
  }
245
227
 
246
- /* .sqd-step-task */
247
-
248
- .sqd-step-task-rect {
249
- stroke-width: 1;
250
- }
251
- .sqd-step-task-rect.sqd-selected {
252
- stroke-width: 2;
253
- }
254
- .sqd-step-task-text {
255
- text-anchor: left;
256
- dominant-baseline: central;
228
+ /* .sqd-context-menu */
229
+ .sqd-context-menu {
230
+ position: absolute;
231
+ z-index: 2000000000;
232
+ border-radius: 4px;
233
+ overflow: hidden;
234
+ padding: 5px;
257
235
  }
258
236
 
259
- /* .sqd-input + .sqd-output */
237
+ .sqd-context-menu-group,
238
+ .sqd-context-menu-item {
239
+ width: 130px;
240
+ padding: 8px 10px;
241
+ white-space: nowrap;
242
+ text-overflow: ellipsis;
243
+ overflow: hidden;
244
+ }
260
245
 
261
- .sqd-input {
262
- stroke-width: 2;
246
+ .sqd-context-menu-group {
247
+ font-size: 11px;
248
+ line-height: 1em;
263
249
  }
264
250
 
265
- /* .sqd-region */
251
+ .sqd-context-menu-item {
252
+ border-radius: 5px;
253
+ cursor: pointer;
254
+ transition: background 70ms;
255
+ }
266
256
 
267
- .sqd-region {
268
- stroke-width: 2;
269
- stroke-dasharray: 3;
257
+ /* .sqd-workspace */
258
+ .sqd-workspace {
259
+ flex: 1;
260
+ position: relative;
261
+ display: block;
262
+ user-select: none;
270
263
  }
271
- .sqd-region.sqd-selected {
272
- stroke-width: 2;
273
- stroke-dasharray: 0;
264
+
265
+ .sqd-workspace-canvas {
266
+ position: absolute;
267
+ top: 0;
268
+ left: 0;
269
+ cursor: move;
274
270
  }
271
+
275
272
  .sqd-label-text {
276
- text-anchor: middle;
277
- dominant-baseline: central;
273
+ text-anchor: middle;
274
+ dominant-baseline: central;
278
275
  }
279
276
 
280
- /* .sqd-placeholder */
281
-
282
277
  .sqd-placeholder .sqd-placeholder-rect {
283
- stroke-width: 1;
284
- stroke-dasharray: 3;
285
- transition: fill 100ms;
278
+ transition: fill 100ms;
279
+ }
280
+
281
+ .sqd-step-task-text {
282
+ text-anchor: left;
283
+ dominant-baseline: central;
286
284
  }
package/dist/index.umd.js CHANGED
@@ -4080,7 +4080,7 @@
4080
4080
  class LineGrid {
4081
4081
  static create(size) {
4082
4082
  const path = Dom.svg('path', {
4083
- class: 'sqd-grid-path',
4083
+ class: 'sqd-line-grid-path',
4084
4084
  fill: 'none'
4085
4085
  });
4086
4086
  return new LineGrid(size, path);
package/lib/cjs/index.cjs CHANGED
@@ -3895,7 +3895,7 @@ class DefaultStepComponentViewWrapperExtension {
3895
3895
  class LineGrid {
3896
3896
  static create(size) {
3897
3897
  const path = Dom.svg('path', {
3898
- class: 'sqd-grid-path',
3898
+ class: 'sqd-line-grid-path',
3899
3899
  fill: 'none'
3900
3900
  });
3901
3901
  return new LineGrid(size, path);
package/lib/esm/index.js CHANGED
@@ -3894,7 +3894,7 @@ class DefaultStepComponentViewWrapperExtension {
3894
3894
  class LineGrid {
3895
3895
  static create(size) {
3896
3896
  const path = Dom.svg('path', {
3897
- class: 'sqd-grid-path',
3897
+ class: 'sqd-line-grid-path',
3898
3898
  fill: 'none'
3899
3899
  });
3900
3900
  return new LineGrid(size, path);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sequential-workflow-designer",
3
3
  "description": "Customizable no-code component for building flow-based programming applications.",
4
- "version": "0.14.2",
4
+ "version": "0.15.3",
5
5
  "type": "module",
6
6
  "main": "./lib/esm/index.js",
7
7
  "types": "./lib/index.d.ts",
@@ -24,6 +24,18 @@
24
24
  },
25
25
  "./css/designer-dark.css": {
26
26
  "default": "./css/designer-dark.css"
27
+ },
28
+ "./sass/designer.scss": {
29
+ "default": "./sass/designer.scss"
30
+ },
31
+ "./sass/designer-theme.scss": {
32
+ "default": "./sass/designer-theme.scss"
33
+ },
34
+ "./sass/designer-light.scss": {
35
+ "default": "./sass/designer-light.scss"
36
+ },
37
+ "./sass/designer-dark.scss": {
38
+ "default": "./sass/designer-dark.scss"
27
39
  }
28
40
  },
29
41
  "author": {
@@ -39,7 +51,8 @@
39
51
  "files": [
40
52
  "lib/",
41
53
  "dist/",
42
- "css/"
54
+ "css/",
55
+ "sass/"
43
56
  ],
44
57
  "publishConfig": {
45
58
  "registry": "https://registry.npmjs.org/"
@@ -49,12 +62,14 @@
49
62
  "clean": "rm -rf lib && rm -rf build && rm -rf dist && rm -rf node_modules/.cache/rollup-plugin-typescript2",
50
63
  "start": "rollup -c --watch",
51
64
  "start:clean": "yarn clean && npm run start",
52
- "build": "yarn clean && rollup -c",
65
+ "start:sass": "sass --no-source-map --watch ./sass:./css",
66
+ "build": "yarn clean && yarn build:sass && rollup -c",
67
+ "build:sass": "sass --no-source-map ./sass:./css",
53
68
  "test": "karma start karma.conf.cjs",
54
69
  "test:single": "karma start karma.conf.cjs --single-run",
55
70
  "eslint": "eslint ./src --ext .ts",
56
- "prettier": "prettier --check ./src",
57
- "prettier:fix": "prettier --write ./src"
71
+ "prettier": "prettier --check ./src ./sass",
72
+ "prettier:fix": "prettier --write ./src ./sass"
58
73
  },
59
74
  "dependencies": {
60
75
  "sequential-workflow-model": "^0.2.0"
@@ -78,7 +93,8 @@
78
93
  "rollup": "^3.18.0",
79
94
  "rollup-plugin-dts": "^5.2.0",
80
95
  "rollup-plugin-typescript2": "^0.34.1",
81
- "typescript": "^4.9.5"
96
+ "typescript": "^4.9.5",
97
+ "sass": "^1.66.1"
82
98
  },
83
99
  "keywords": [
84
100
  "workflow",
@@ -0,0 +1,68 @@
1
+ @import './designer-theme.scss';
2
+
3
+ @include sqd-theme-ui-toolbox(
4
+ 'dark',
5
+ $panelBackgroundColor: #3f3f3f,
6
+ $panelBoxShadow: none,
7
+ $headerTextColor: #fff,
8
+ $filterBackground: #242424,
9
+ $filterTextColor: #fff,
10
+ $filterBorder: none,
11
+ $groupTextColor: #fff,
12
+ $groupBackgroundColor: #242424
13
+ );
14
+ @include sqd-theme-ui-toolbox-item(
15
+ 'dark',
16
+ $itemTextColor: #000,
17
+ $itemBackgroundColor: #c6c6c6,
18
+ $itemBorder: none,
19
+ $itemBoxShadow: none,
20
+ $itemBorderHovered: none,
21
+ $itemBackgroundColorHovered: #d3d3d3
22
+ );
23
+ @include sqd-theme-ui-control-bar(
24
+ 'dark',
25
+ $panelBackgroundColor: #3f3f3f,
26
+ $panelBoxShadow: none,
27
+ $buttonBorder: none,
28
+ $buttonBackground: #c6c6c6,
29
+ $buttonBackgroundHovered: #d3d3d3
30
+ );
31
+ @include sqd-theme-ui-editor(
32
+ 'dark',
33
+ $panelBackgroundColor: #3f3f3f,
34
+ $panelBoxShadow: none,
35
+ $toggleBackgroundColor: #6f6f6f,
36
+ $toggleBoxShadow: none
37
+ );
38
+ @include sqd-theme-ui-context-menu(
39
+ 'dark',
40
+ $panelBackgroundColor: #3f3f3f,
41
+ $groupTextColor: #ccc,
42
+ $itemTextColor: #fff,
43
+ $itemBackgroundColorHovered: #525252
44
+ );
45
+
46
+ @include sqd-theme-workspace('dark', $backgroundColor: #1f1f1f);
47
+ @include sqd-theme-line-grid('dark', $strokeColor: #2a2a2a);
48
+ @include sqd-theme-join('dark', $joinStrokeColor: #707070);
49
+ @include sqd-theme-region('dark', $strokeColor: #434343, $strokeColorSelected: #fff);
50
+ @include sqd-theme-placeholder('dark', $rectFillColor: #0e0e0e, $rectStrokeColor: #6a6a6a, $rectFillHovered: #ed4800);
51
+ @include sqd-theme-validation-error-badge('dark', $triangleFillColor: #ffa200, $iconFillColor: #000);
52
+
53
+ @include sqd-theme-start-stop-root-component('dark', $circleFillColor: #2c18df, $iconFillColor: #fff);
54
+
55
+ @include sqd-theme-task-step-component(
56
+ 'dark',
57
+ $rectFillColor: #c6c6c6,
58
+ $rectStrokeColor: none,
59
+ $rectStrokeColorSelected: #fff,
60
+ $rectShadow: 0 1.5px 1.5px rgba(0, 0, 0, 0.15),
61
+ $textColor: #000,
62
+ $emptyIconColor: #c6c6c6,
63
+ $inputStrokeColor: #707070,
64
+ $inputFillColor: #c6c6c6,
65
+ $outputFillColor: #707070
66
+ );
67
+ @include sqd-theme-switch-step-component('dark', $inputStrokeColor: #707070, $inputFillColor: #c6c6c6);
68
+ @include sqd-theme-container-step-component('dark', $inputStrokeColor: #707070, $inputFillColor: #c6c6c6);
@@ -0,0 +1,20 @@
1
+ @import './designer-theme.scss';
2
+
3
+ @include sqd-theme-ui-toolbox('light');
4
+ @include sqd-theme-ui-toolbox-item('light');
5
+ @include sqd-theme-ui-control-bar('light');
6
+ @include sqd-theme-ui-editor('light');
7
+ @include sqd-theme-ui-context-menu('light');
8
+
9
+ @include sqd-theme-workspace('light');
10
+ @include sqd-theme-line-grid('light');
11
+ @include sqd-theme-join('light');
12
+ @include sqd-theme-region('light');
13
+ @include sqd-theme-placeholder('light');
14
+ @include sqd-theme-validation-error-badge('light');
15
+
16
+ @include sqd-theme-start-stop-root-component('light');
17
+
18
+ @include sqd-theme-task-step-component('light');
19
+ @include sqd-theme-switch-step-component('light');
20
+ @include sqd-theme-container-step-component('light');