PluginProbe ʕ •ᴥ•ʔ
JetFormBuilder — Dynamic Blocks Form Builder / 3.1.1
JetFormBuilder — Dynamic Blocks Form Builder v3.1.1
3.6.3.1 3.6.3 3.6.2.2 3.6.2.1 3.6.2 3.6.1.1 3.6.1 3.6.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.1.0 2.1.1 2.1.10 2.1.11 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 3.0.0 3.0.0.1 3.0.0.2 3.0.0.3 3.0.1 3.0.1.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.0.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.2 3.2.3 3.3.0 3.3.1 3.3.2 3.3.3 3.3.3.1 3.3.4 3.3.4.1 3.3.4.2 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.5.1 3.4.5.2 3.4.6 3.4.7 3.4.7.1 3.5.0 3.5.1 3.5.1.1 3.5.1.2 3.5.2 3.5.2.1 3.5.3 3.5.4 3.5.5 3.5.6 3.5.6.1 3.5.6.2 3.5.6.3 3.6.0
jetformbuilder / assets / src / admin-package / components / RowWrapper.vue
jetformbuilder / assets / src / admin-package / components Last commit date
ColumnWrapper.vue 2 years ago CxVuiCollapseMini.vue 2 years ago CxVuiDate.vue 2 years ago CxVuiFSelect.vue 2 years ago CxVuiPopup.vue 2 years ago CxVuiSelect.vue 2 years ago CxVuiTabs.vue 2 years ago CxVuiTabsPanel.vue 2 years ago Delimiter.vue 2 years ago DetailsTable.vue 2 years ago DetailsTableRow.vue 2 years ago DetailsTableRowValue.vue 2 years ago ExternalLink.vue 2 years ago ListComponents.vue 2 years ago PrintButton.vue 2 years ago RowWrapper.vue 2 years ago Tooltip.vue 2 years ago
RowWrapper.vue
139 lines
1 <template>
2 <div :class="className">
3 <div
4 v-if="$slots.meta"
5 class="cx-vui-component__meta"
6 >
7 <slot name="meta"></slot>
8 </div>
9 <div
10 v-else-if="$slots.label || $slots.description"
11 class="cx-vui-component__meta"
12 >
13 <label
14 class="cx-vui-component__label"
15 v-if="$slots.label"
16 :for="elementIdData"
17 >
18 <template v-if="stateType">
19 <Tooltip
20 :icon="stateType"
21 :position="'top-right'"
22 >
23 <template #help>{{ stateHelp }}</template>
24 <template #default>
25 <slot name="label"></slot>
26 </template>
27 </Tooltip>
28 </template>
29 <template v-else>
30 <slot name="label"></slot>
31 </template>
32 </label>
33 <div
34 class="cx-vui-component__desc"
35 v-if="$slots.description"
36 >
37 <slot name="description"></slot>
38 </div>
39 </div>
40 <div class="cx-vui-component__control">
41 <slot></slot>
42 <div
43 v-if="$slots.actions"
44 class="cx-vui-component__control-actions"
45 >
46 <slot name="actions"></slot>
47 </div>
48 </div>
49 </div>
50 </template>
51
52 <script>
53
54 import Tooltip from './Tooltip';
55
56 const isCorrectType = value => [ 'warning-danger', 'warning', 'loading', '' ].includes( value );
57
58 export default {
59 name: 'RowWrapper',
60 components: { Tooltip },
61 props: {
62 elementId: {
63 type: String,
64 },
65 state: {
66 type: [ String, Object ],
67 validator( value ) {
68 if ( 'string' === typeof value ) {
69 return isCorrectType( value );
70 }
71 return isCorrectType( value.type );
72 },
73 default: '',
74 },
75 /**
76 * Possible values:
77 * 'size--1-x-2': true,
78 * 'padding-side-unset': true,
79 */
80 classNames: {
81 type: Object,
82 default: () => (
83 { 'cx-vui-component--equalwidth': true }
84 ),
85 },
86 },
87 data() {
88 return {
89 elementIdData: `cx_${ this.elementId }`,
90 };
91 },
92 computed: {
93 className() {
94 return {
95 'cx-vui-component': true,
96 [ 'cx-vui-component--is-' + this.stateType ]: this.stateType,
97 ...this.classNames,
98 };
99 },
100 stateType() {
101 return 'string' === typeof this.state ? this.state : this.state.type;
102 },
103 stateHelp() {
104 return 'string' === typeof this.state ? '' : this.state.message;
105 },
106 },
107 provide() {
108 return {
109 elementId: this.elementIdData,
110 stateType: () => this.stateType,
111 };
112 },
113 };
114 </script>
115
116 <style lang="scss" scoped>
117
118 .size--1-x-2 {
119 .cx-vui-component__meta {
120 flex: 1;
121 }
122
123 .cx-vui-component__control {
124 flex: 2;
125 }
126 }
127
128 .padding-side-unset.cx-vui-component {
129 padding-left: unset;
130 padding-right: unset;
131 }
132
133 .cx-vui-component__control-actions {
134 display: flex;
135 justify-content: flex-end;
136 gap: 1em;
137 margin-top: 0.5em;
138 }
139 </style>