@5minds/node-red-dashboard-2-processcube-dynamic-form 2.2.1 → 2.3.0-develop-999cb6-mfglqyd6
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/nodes/ui-dynamic-form.html +331 -63
- package/package.json +1 -1
- package/resources/ui-dynamic-form.umd.js +36 -36
- package/ui/components/FooterActions.vue +13 -47
- package/ui/components/UIDynamicForm.vue +554 -113
- package/ui/stylesheets/ui-dynamic-form.css +119 -15
|
@@ -11,26 +11,6 @@
|
|
|
11
11
|
{{ action.label }}
|
|
12
12
|
</v-btn>
|
|
13
13
|
</div>
|
|
14
|
-
<div>
|
|
15
|
-
<v-btn
|
|
16
|
-
class="ui-dynamic-form-footer-action-button ui-dynamic-form-footer-action-secondary"
|
|
17
|
-
:disabled="formIsFinished"
|
|
18
|
-
@click="handleSuspend"
|
|
19
|
-
>
|
|
20
|
-
Suspend
|
|
21
|
-
</v-btn>
|
|
22
|
-
</div>
|
|
23
|
-
<div>
|
|
24
|
-
<v-btn
|
|
25
|
-
class="ui-dynamic-form-footer-action-terminate"
|
|
26
|
-
:disabled="formIsFinished"
|
|
27
|
-
@click="handleTerminate"
|
|
28
|
-
variant="text"
|
|
29
|
-
size="small"
|
|
30
|
-
>
|
|
31
|
-
Terminate
|
|
32
|
-
</v-btn>
|
|
33
|
-
</div>
|
|
34
14
|
</div>
|
|
35
15
|
<div class="ui-dynamic-form-footer-actions-right">
|
|
36
16
|
<div v-for="(action, index) in rightSideActions" :key="`right-${index}`">
|
|
@@ -69,8 +49,8 @@ export default {
|
|
|
69
49
|
leftSideActions() {
|
|
70
50
|
const leftActions = this.actions.filter((action) => action.alignment === 'left' || !action.alignment);
|
|
71
51
|
const sortPrimaryToLeft = (a, b) => {
|
|
72
|
-
const aPrimary = a.primary === '
|
|
73
|
-
const bPrimary = b.primary === '
|
|
52
|
+
const aPrimary = a.primary === 'primary';
|
|
53
|
+
const bPrimary = b.primary === 'primary';
|
|
74
54
|
if (aPrimary && !bPrimary) return -1;
|
|
75
55
|
if (!aPrimary && bPrimary) return 1;
|
|
76
56
|
return 0;
|
|
@@ -81,8 +61,8 @@ export default {
|
|
|
81
61
|
rightSideActions() {
|
|
82
62
|
const rightActions = this.actions.filter((action) => action.alignment === 'right');
|
|
83
63
|
const sortPrimaryToRight = (a, b) => {
|
|
84
|
-
const aPrimary = a.primary === '
|
|
85
|
-
const bPrimary = b.primary === '
|
|
64
|
+
const aPrimary = a.primary === 'primary';
|
|
65
|
+
const bPrimary = b.primary === 'primary';
|
|
86
66
|
if (!aPrimary && bPrimary) return -1;
|
|
87
67
|
if (aPrimary && !bPrimary) return 1;
|
|
88
68
|
return 0;
|
|
@@ -93,29 +73,15 @@ export default {
|
|
|
93
73
|
},
|
|
94
74
|
methods: {
|
|
95
75
|
getActionButtonClass(action) {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
isTerminate: true,
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
this.actionCallback(terminateAction);
|
|
109
|
-
},
|
|
110
|
-
handleSuspend() {
|
|
111
|
-
const suspendAction = {
|
|
112
|
-
label: 'Suspend',
|
|
113
|
-
alignment: 'left',
|
|
114
|
-
primary: 'false',
|
|
115
|
-
isSuspend: true,
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
this.actionCallback(suspendAction);
|
|
76
|
+
switch (action.primary) {
|
|
77
|
+
case 'primary':
|
|
78
|
+
return 'ui-dynamic-form-footer-action-primary';
|
|
79
|
+
case 'destructive':
|
|
80
|
+
return 'ui-dynamic-form-footer-action-terminate';
|
|
81
|
+
case 'secondary':
|
|
82
|
+
default:
|
|
83
|
+
return 'ui-dynamic-form-footer-action-secondary';
|
|
84
|
+
}
|
|
119
85
|
},
|
|
120
86
|
},
|
|
121
87
|
};
|