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 / DetailsTableRowValue.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
DetailsTableRowValue.vue
164 lines
1 <template>
2 <ul :class="rootClasses" v-show="! this.withIndent">
3 <li
4 v-for="( itemValue, itemName ) in value"
5 :key="itemName"
6 class="jfb-recursive-details-row"
7 v-if="isHiddenLevel( itemName )"
8 >
9 <template v-if="isSkipLevel( itemName )">
10 <DetailsTableRowValue
11 :value="itemValue"
12 :columns="getChildren( itemName )"
13 />
14 </template>
15 <template v-else>
16 <span :class="itemClasses( true )" v-if="isObject( itemValue )">
17 <span
18 class="jfb-recursive-details-item--heading"
19 @click="toggleNext( itemName )"
20 >
21 {{ getItemLabel( itemName ) }}
22 <span :class="arrowClasses( itemName )"></span>
23 </span>
24 <span class="jfb-recursive-details-item--content">
25 <transition name="fade">
26 <DetailsTableRowValue
27 :value="itemValue"
28 :with-indent="true"
29 v-show="isShow( itemName )"
30 :columns="getChildren( itemName )"
31 />
32 </transition>
33 </span>
34 </span>
35 <span :class="itemClasses( false )" v-else>
36 <span class="jfb-recursive-details-item--heading">{{ getItemLabel( itemName ) }}</span>&nbsp;
37 <span class="jfb-recursive-details-item--content">{{ itemValue }}</span>
38 </span>
39 </template>
40 </li>
41 </ul>
42 </template>
43
44 <script>
45 export default {
46 name: 'DetailsTableRowValue',
47 props: {
48 value: Object,
49 withIndent: {
50 type: Boolean,
51 default: false,
52 },
53 columns: {
54 type: Object,
55 default() {
56 return {};
57 },
58 },
59 },
60 data() {
61 return {
62 showNext: {},
63 };
64 },
65 computed: {
66 rootClasses() {
67 return {
68 'jfb-recursive-details': true,
69 'jfb-recursive-details--indent': this.withIndent,
70 };
71 },
72 },
73 methods: {
74 getChildren( columnName ) {
75 return (
76 this.columns[ columnName ]?.children || []
77 );
78 },
79 getItemLabel( columnName ) {
80 return this.columns[ columnName ] ? this.columns[ columnName ].label : columnName;
81 },
82 isObject( itemValue ) {
83 return 'object' === typeof itemValue;
84 },
85 toggleNext( name ) {
86 const prev = this.showNext[ name ] || false;
87
88 this.$set( this.showNext, name, ! prev );
89 },
90 isShow( name ) {
91 return 'undefined' === this.showNext[ name ] ? true : this.showNext[ name ];
92 },
93 itemClasses( isObject = true ) {
94 return {
95 'jfb-recursive-details-item': true,
96 'jfb-recursive-details-item-with-children': isObject,
97 'jfb-recursive-details-item-without-children': ! isObject,
98 };
99 },
100 arrowClasses( columnName ) {
101 return {
102 dashicons: true,
103 'dashicons-arrow-down-alt2': ! this.isShow( columnName ),
104 'dashicons-arrow-up-alt2': this.isShow( columnName ),
105 };
106 },
107 isSkipLevel( columnName ) {
108 return this.columns[ columnName ]?.skip_level;
109 },
110 isHiddenLevel( columnName ) {
111 return ( ! this.columns[ columnName ]?.hide );
112 },
113 },
114 };
115 </script>
116
117 <style lang="scss" scoped>
118 .fade-enter-active, .fade-leave-active {
119 transition: opacity .5s;
120 }
121
122 .fade-enter, .fade-leave-to /* .fade-leave-active до версии 2.1.8 */
123 {
124 opacity: 0;
125 }
126
127 .jfb-recursive-details {
128 &:not( &--indent ) {
129 margin-top: unset;
130 }
131
132 &--indent {
133 margin-left: 1.5em;
134 margin-top: 0.5em;
135 }
136
137 &-row {
138 &:not( :last-child ) {
139 margin-bottom: 0.5em;
140 padding-bottom: 0.5em;
141 }
142 }
143
144
145 &-item {
146 &--content {
147 border-bottom: 1px solid #ccc;
148 }
149
150 &-without-children > &--heading::after {
151 content: ':';
152 }
153
154 &-with-children > &--heading {
155 cursor: pointer;
156
157 &:hover {
158 color: #2271b1;
159 border-bottom-color: #2271b1;
160 }
161 }
162 }
163 }
164 </style>