@5minds/node-red-dashboard-2-processcube-dynamic-form 1.1.1-feature-735e79-m734z5f9 → 1.1.1-feature-77a9de-m79111vs
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 +125 -17
- package/package.json +1 -1
- package/resources/ui-dynamic-form.umd.js +2 -2
- package/ui/components/FooterActions.vue +52 -0
- package/ui/components/TitleText.vue +35 -0
- package/ui/components/UIDynamicForm.vue +710 -735
- package/ui/stylesheets/ui-dynamic-form.css +119 -39
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="display: flex; justify-content: space-between; width: 100%">
|
|
3
|
+
<div style="display: flex; gap: 8px;">
|
|
4
|
+
<div v-for="(action, index) in actions" :key="index">
|
|
5
|
+
<v-btn
|
|
6
|
+
v-if="action.alignment === 'left' || !action.alignment"
|
|
7
|
+
:key="index"
|
|
8
|
+
style="min-height: 36px"
|
|
9
|
+
:class="getActionButtonClass(action)"
|
|
10
|
+
@click="actionCallback(action)"
|
|
11
|
+
>
|
|
12
|
+
{{ action.label }}
|
|
13
|
+
</v-btn>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
<div style="display: flex; gap: 8px;">
|
|
17
|
+
<div v-for="(action, index) in actions" :key="index">
|
|
18
|
+
<v-btn
|
|
19
|
+
v-if="action.alignment === 'right'"
|
|
20
|
+
:key="index"
|
|
21
|
+
style="min-height: 36px"
|
|
22
|
+
:class="getActionButtonClass(action)"
|
|
23
|
+
@click="actionCallback(action)"
|
|
24
|
+
>
|
|
25
|
+
{{ action.label }}
|
|
26
|
+
</v-btn>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<script>
|
|
33
|
+
|
|
34
|
+
export default {
|
|
35
|
+
name: 'UIDynamicFormFooterAction',
|
|
36
|
+
props: {
|
|
37
|
+
actions: { type: Array, default () { return [] } },
|
|
38
|
+
actionCallback: { type: Function, default (action) {} }
|
|
39
|
+
},
|
|
40
|
+
methods: {
|
|
41
|
+
getActionButtonClass (action) {
|
|
42
|
+
return action.primary === 'true' ? 'ui-dynamic-form-footer-action-primary' : 'ui-dynamic-form-footer-action-secondary'
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<style>
|
|
50
|
+
/* CSS is auto scoped, but using named classes is still recommended */
|
|
51
|
+
@import '../stylesheets/ui-dynamic-form.css';
|
|
52
|
+
</style>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="title.length > 0">
|
|
3
|
+
<h3 :class="typeSpecificStyling">
|
|
4
|
+
<div style="width: fit-content">
|
|
5
|
+
<img v-if="titleIcon.length > 0" :src="titleIcon" style="padding-right: 16px;">
|
|
6
|
+
<span :style="customStyles">{{ title }}</span>
|
|
7
|
+
<hr v-if="style === 'default'">
|
|
8
|
+
</div>
|
|
9
|
+
</h3>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script>
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
name: 'UIDynamicFormTitleText',
|
|
17
|
+
props: {
|
|
18
|
+
style: { type: String, default () { return 'default' } },
|
|
19
|
+
title: { type: String, default () { return '' } },
|
|
20
|
+
customStyles: { type: String, default () { return '' } },
|
|
21
|
+
titleIcon: { type: String, default () { return '' } }
|
|
22
|
+
},
|
|
23
|
+
computed: {
|
|
24
|
+
typeSpecificStyling () {
|
|
25
|
+
return `ui-dynamic-form-title-${this.style}`
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<style>
|
|
33
|
+
/* CSS is auto scoped, but using named classes is still recommended */
|
|
34
|
+
@import '../stylesheets/ui-dynamic-form.css';
|
|
35
|
+
</style>
|