@5minds/node-red-dashboard-2-processcube-dynamic-form 2.0.8-develop-47efa6-mdho9d9t → 2.0.8-file-preview-eccc05-mdiiszar
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.
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
<div
|
|
2
|
+
<div style="display: flex; justify-content: space-between; width: 100%">
|
|
3
|
+
<div style="display: flex; gap: 8px; flex-wrap: wrap">
|
|
4
4
|
<div v-for="(action, index) in actions" :key="index">
|
|
5
|
-
<v-btn
|
|
6
|
-
|
|
7
|
-
:
|
|
5
|
+
<v-btn
|
|
6
|
+
v-if="action.alignment === 'left' || !action.alignment"
|
|
7
|
+
:key="index"
|
|
8
|
+
style="min-height: 36px"
|
|
9
|
+
:class="getActionButtonClass(action)"
|
|
10
|
+
:disabled="formIsFinished"
|
|
11
|
+
@click="actionCallback(action)"
|
|
12
|
+
>
|
|
8
13
|
{{ action.label }}
|
|
9
14
|
</v-btn>
|
|
10
15
|
</div>
|
|
11
16
|
</div>
|
|
12
|
-
<div
|
|
17
|
+
<div style="display: flex; gap: 8px;">
|
|
13
18
|
<div v-for="(action, index) in actions" :key="index">
|
|
14
|
-
<v-btn
|
|
15
|
-
|
|
19
|
+
<v-btn
|
|
20
|
+
v-if="action.alignment === 'right'"
|
|
21
|
+
:key="index"
|
|
22
|
+
style="min-height: 36px"
|
|
23
|
+
:class="getActionButtonClass(action)"
|
|
24
|
+
:disabled="formIsFinished"
|
|
25
|
+
@click="actionCallback(action)"
|
|
26
|
+
>
|
|
16
27
|
{{ action.label }}
|
|
17
28
|
</v-btn>
|
|
18
29
|
</div>
|
|
@@ -25,12 +36,12 @@
|
|
|
25
36
|
export default {
|
|
26
37
|
name: 'UIDynamicFormFooterAction',
|
|
27
38
|
props: {
|
|
28
|
-
actions: { type: Array, default() { return [] } },
|
|
29
|
-
actionCallback: { type: Function, default(action) {
|
|
30
|
-
formIsFinished: { type: Boolean, default() { return false } }
|
|
39
|
+
actions: { type: Array, default () { return [] } },
|
|
40
|
+
actionCallback: { type: Function, default (action) {} },
|
|
41
|
+
formIsFinished: { type: Boolean, default () { return false } }
|
|
31
42
|
},
|
|
32
43
|
methods: {
|
|
33
|
-
getActionButtonClass(action) {
|
|
44
|
+
getActionButtonClass (action) {
|
|
34
45
|
return action.primary === 'true' ? 'ui-dynamic-form-footer-action-primary' : 'ui-dynamic-form-footer-action-secondary'
|
|
35
46
|
}
|
|
36
47
|
}
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-if="title.length > 0">
|
|
3
|
-
<h3 :class="typeSpecificStyling"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
<h3 :class="typeSpecificStyling" style="display: flex; gap: 25px; align-items: center">
|
|
4
|
+
<svg
|
|
5
|
+
v-if="collapsible && !collapsed"
|
|
6
|
+
style="width: 25px; height: 25px; cursor: pointer;"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
viewBox="0 0 448 512"
|
|
9
|
+
@click="toggleCollapse"
|
|
10
|
+
>
|
|
11
|
+
<path :fill="style === 'default' ? 'white' : 'black'" d="M201.4 374.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 306.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"/>
|
|
9
12
|
</svg>
|
|
10
|
-
<svg
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
<svg
|
|
14
|
+
v-if="collapsible && collapsed"
|
|
15
|
+
style="width: 25px; height: 25px; cursor: pointer;"
|
|
16
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
17
|
+
viewBox="0 0 320 512"
|
|
18
|
+
@click="toggleCollapse"
|
|
19
|
+
>
|
|
20
|
+
<path :fill="style === 'default' ? 'white' : 'black'" d="M278.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-160 160c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L210.7 256 73.4 118.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l160 160z"/>
|
|
14
21
|
</svg>
|
|
15
|
-
<div :style="{
|
|
22
|
+
<div :style="{width: 'fit-content', display: style === 'default' ? '' : 'flex'}">
|
|
16
23
|
<img v-if="titleIcon.length > 0" :src="titleIcon" style="padding-right: 16px;">
|
|
17
24
|
<span :style="customStyles">{{ title }}</span>
|
|
18
25
|
<hr v-if="style === 'default'">
|
|
@@ -26,16 +33,16 @@
|
|
|
26
33
|
export default {
|
|
27
34
|
name: 'UIDynamicFormTitleText',
|
|
28
35
|
props: {
|
|
29
|
-
style: { type: String, default() { return 'default' } },
|
|
30
|
-
title: { type: String, default() { return '' } },
|
|
31
|
-
customStyles: { type: String, default() { return '' } },
|
|
32
|
-
collapsible: { type: Boolean, default() { return false } },
|
|
33
|
-
collapsed: { type: Boolean, default() { return false } },
|
|
34
|
-
titleIcon: { type: String, default() { return '' } },
|
|
35
|
-
toggleCollapse: { type: Function, default() {
|
|
36
|
+
style: { type: String, default () { return 'default' } },
|
|
37
|
+
title: { type: String, default () { return '' } },
|
|
38
|
+
customStyles: { type: String, default () { return '' } },
|
|
39
|
+
collapsible: { type: Boolean, default () { return false } },
|
|
40
|
+
collapsed: { type: Boolean, default () { return false } },
|
|
41
|
+
titleIcon: { type: String, default () { return '' } },
|
|
42
|
+
toggleCollapse: { type: Function, default () {} }
|
|
36
43
|
},
|
|
37
44
|
computed: {
|
|
38
|
-
typeSpecificStyling() {
|
|
45
|
+
typeSpecificStyling () {
|
|
39
46
|
return `ui-dynamic-form-title-${this.style}`
|
|
40
47
|
}
|
|
41
48
|
}
|