rb-document-form-constructor 0.5.1 → 0.5.4
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/dist/rb-document-form-constructor.esm.js +33 -16
- package/dist/rb-document-form-constructor.min.js +2 -2
- package/dist/rb-document-form-constructor.ssr.js +35 -19
- package/package.json +1 -1
- package/src/components/DocForm.vue +52 -39
- package/src/components/DocTemplateConstructor.vue +3 -2
- package/src/components/DocTemplateFacetList.vue +4 -3
|
@@ -10933,7 +10933,10 @@ var __vue_render__$4 = function () {
|
|
|
10933
10933
|
}, _vm._l(facet.fields, function (field) {
|
|
10934
10934
|
return _c('b-list-group-item', {
|
|
10935
10935
|
key: field.name,
|
|
10936
|
-
staticClass: "cursor-pointer"
|
|
10936
|
+
staticClass: "cursor-pointer",
|
|
10937
|
+
attrs: {
|
|
10938
|
+
"id": field.name + 'Sidebar'
|
|
10939
|
+
}
|
|
10937
10940
|
}, [_c('rb-text', [_vm._v(_vm._s(field.labelRu))])], 1);
|
|
10938
10941
|
}), 1)], 1) : _vm._e()], 1) : _vm._e();
|
|
10939
10942
|
}), 0)], 1);
|
|
@@ -11116,19 +11119,14 @@ var script$3 = {
|
|
|
11116
11119
|
},
|
|
11117
11120
|
|
|
11118
11121
|
isValueEmpty(fieldName) {
|
|
11119
|
-
console.info('isValueEmpty', fieldName, this.doc[fieldName]);
|
|
11120
|
-
|
|
11121
11122
|
if (this.doc[fieldName] == null) {
|
|
11122
|
-
console.info(`${fieldName} is empty`);
|
|
11123
11123
|
return true;
|
|
11124
11124
|
}
|
|
11125
11125
|
|
|
11126
11126
|
if (_typeof(this.doc[fieldName] === 'string') && this.doc[fieldName] === '') {
|
|
11127
|
-
console.info(`${fieldName} is empty`);
|
|
11128
11127
|
return true;
|
|
11129
11128
|
}
|
|
11130
11129
|
|
|
11131
|
-
console.info(`${fieldName} is not empty`);
|
|
11132
11130
|
return false;
|
|
11133
11131
|
},
|
|
11134
11132
|
|
|
@@ -11158,6 +11156,18 @@ var script$3 = {
|
|
|
11158
11156
|
}
|
|
11159
11157
|
|
|
11160
11158
|
return true;
|
|
11159
|
+
},
|
|
11160
|
+
|
|
11161
|
+
getColumnSize(section) {
|
|
11162
|
+
const MAX_COLUMN_SIZE = 12;
|
|
11163
|
+
|
|
11164
|
+
if (!section || !section.columnCount) {
|
|
11165
|
+
return MAX_COLUMN_SIZE;
|
|
11166
|
+
}
|
|
11167
|
+
|
|
11168
|
+
let colSize = Math.floor(MAX_COLUMN_SIZE / section.columnCount);
|
|
11169
|
+
console.info("colSize", colSize);
|
|
11170
|
+
return colSize;
|
|
11161
11171
|
}
|
|
11162
11172
|
|
|
11163
11173
|
},
|
|
@@ -11198,15 +11208,20 @@ var __vue_render__$3 = function () {
|
|
|
11198
11208
|
return _vm.formConfig ? _c('b-form', {
|
|
11199
11209
|
staticClass: "rb-doc-form"
|
|
11200
11210
|
}, _vm._l(_vm.formConfig.sections, function (section) {
|
|
11201
|
-
return _vm.formConfig && _vm.formConfig.sections ? _c('
|
|
11211
|
+
return _vm.formConfig && _vm.formConfig.sections ? _c('b-container', {
|
|
11202
11212
|
key: section.labelRu,
|
|
11203
11213
|
staticClass: "rb-form-section"
|
|
11204
|
-
}, [_c('
|
|
11205
|
-
|
|
11206
|
-
|
|
11207
|
-
|
|
11214
|
+
}, [_c('b-row', [_c('b-col', {
|
|
11215
|
+
attrs: {
|
|
11216
|
+
"lg": "12"
|
|
11217
|
+
}
|
|
11218
|
+
}, [_c('h4', [_vm._v(_vm._s(section.labelRu))])]), _vm._v(" "), _vm._l(section.columns, function (column) {
|
|
11219
|
+
return [_c('b-col', {
|
|
11208
11220
|
key: column.index,
|
|
11209
|
-
|
|
11221
|
+
attrs: {
|
|
11222
|
+
"lg": _vm.getColumnSize(section),
|
|
11223
|
+
"sm": 12
|
|
11224
|
+
}
|
|
11210
11225
|
}, [_vm._l(column.fields, function (field) {
|
|
11211
11226
|
return [field.visible ? _c('b-form-row', {
|
|
11212
11227
|
key: field.name
|
|
@@ -11224,7 +11239,7 @@ var __vue_render__$3 = function () {
|
|
|
11224
11239
|
scopedSlots: _vm._u([{
|
|
11225
11240
|
key: "label",
|
|
11226
11241
|
fn: function () {
|
|
11227
|
-
return [_vm._v("\n
|
|
11242
|
+
return [_vm._v("\n " + _vm._s(field.labelRu) + " "), _vm.showRequiredInLabel && field.required ? _c('span', {
|
|
11228
11243
|
staticClass: "text-danger"
|
|
11229
11244
|
}, [_vm._v("*")]) : _vm._e()];
|
|
11230
11245
|
},
|
|
@@ -11236,6 +11251,7 @@ var __vue_render__$3 = function () {
|
|
|
11236
11251
|
tag: "component",
|
|
11237
11252
|
attrs: {
|
|
11238
11253
|
"disabled": !_vm.editable || !field.editable,
|
|
11254
|
+
"id": field.name,
|
|
11239
11255
|
"state": _vm.validationState[field.name]
|
|
11240
11256
|
},
|
|
11241
11257
|
on: {
|
|
@@ -11257,9 +11273,9 @@ var __vue_render__$3 = function () {
|
|
|
11257
11273
|
expression: "doc[field.name]"
|
|
11258
11274
|
}
|
|
11259
11275
|
}, 'component', field.input.propsData, false))], 1)], 1)], 1) : _vm._e()];
|
|
11260
|
-
})], 2);
|
|
11261
|
-
}),
|
|
11262
|
-
}),
|
|
11276
|
+
})], 2)];
|
|
11277
|
+
})], 2)], 1) : _vm._e();
|
|
11278
|
+
}), 1) : _vm._e();
|
|
11263
11279
|
};
|
|
11264
11280
|
|
|
11265
11281
|
var __vue_staticRenderFns__$3 = [];
|
|
@@ -12578,6 +12594,7 @@ var __vue_render__ = function () {
|
|
|
12578
12594
|
tag: "component",
|
|
12579
12595
|
staticClass: "cursor-pointer",
|
|
12580
12596
|
attrs: {
|
|
12597
|
+
"id": field.name,
|
|
12581
12598
|
"disabled": ""
|
|
12582
12599
|
}
|
|
12583
12600
|
}, 'component', _vm.getFieldExtendedPropsData(field), false)) : _vm._e()], 1)], 1)], 1);
|