@5minds/node-red-dashboard-2-processcube-dynamic-form 2.0.3-feature-b90ab0-mceo42ir → 2.0.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/nodes/ui-dynamic-form.html +321 -333
- package/nodes/ui-dynamic-form.js +41 -31
- package/package.json +3 -4
- package/resources/ui-dynamic-form.umd.js +2 -2
- package/ui/components/TitleText.vue +37 -66
- package/ui/components/UIDynamicForm.vue +593 -662
- package/ui/stylesheets/ui-dynamic-form.css +106 -117
|
@@ -1,85 +1,56 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-if="title.length > 0">
|
|
3
|
-
<h3 :class="typeSpecificStyling" style="display: flex; gap: 25px; align-items: center
|
|
4
|
-
<svg
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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"/>
|
|
8
12
|
</svg>
|
|
9
|
-
<svg
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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"/>
|
|
13
21
|
</svg>
|
|
14
|
-
<div :style="{
|
|
15
|
-
|
|
16
|
-
display: style === 'default' ? 'block' : 'flex',
|
|
17
|
-
}">
|
|
18
|
-
<img v-if="titleIcon.length > 0" :src="titleIcon" style="padding-right: 16px;" />
|
|
22
|
+
<div :style="{width: 'fit-content', display: style === 'default' ? '' : 'flex'}">
|
|
23
|
+
<img v-if="titleIcon.length > 0" :src="titleIcon" style="padding-right: 16px;">
|
|
19
24
|
<span :style="customStyles">{{ title }}</span>
|
|
20
|
-
<hr v-if="style === 'default'"
|
|
25
|
+
<hr v-if="style === 'default'">
|
|
21
26
|
</div>
|
|
22
27
|
</h3>
|
|
23
28
|
</div>
|
|
24
29
|
</template>
|
|
25
30
|
|
|
26
31
|
<script>
|
|
32
|
+
|
|
27
33
|
export default {
|
|
28
|
-
name:
|
|
34
|
+
name: 'UIDynamicFormTitleText',
|
|
29
35
|
props: {
|
|
30
|
-
style: {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
type: String,
|
|
38
|
-
default() {
|
|
39
|
-
return "";
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
customStyles: {
|
|
43
|
-
type: String,
|
|
44
|
-
default() {
|
|
45
|
-
return "";
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
collapsible: {
|
|
49
|
-
type: Boolean,
|
|
50
|
-
default() {
|
|
51
|
-
return false;
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
collapsed: {
|
|
55
|
-
type: Boolean,
|
|
56
|
-
default() {
|
|
57
|
-
return false;
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
titleIcon: {
|
|
61
|
-
type: String,
|
|
62
|
-
default() {
|
|
63
|
-
return "";
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
toggleCollapse: {
|
|
67
|
-
type: Function,
|
|
68
|
-
default() { },
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
data() {
|
|
72
|
-
return {
|
|
73
|
-
};
|
|
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 () {} }
|
|
74
43
|
},
|
|
75
44
|
computed: {
|
|
76
|
-
typeSpecificStyling() {
|
|
77
|
-
return `ui-dynamic-form-title-${this.style}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
45
|
+
typeSpecificStyling () {
|
|
46
|
+
return `ui-dynamic-form-title-${this.style}`
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
81
51
|
</script>
|
|
82
52
|
|
|
83
53
|
<style>
|
|
84
|
-
|
|
54
|
+
/* CSS is auto scoped, but using named classes is still recommended */
|
|
55
|
+
@import '../stylesheets/ui-dynamic-form.css';
|
|
85
56
|
</style>
|