rb-document-form-constructor 0.9.14 → 0.9.16

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.
@@ -1,53 +1,42 @@
1
- 'use strict';var Vue=require('vue');function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}}var Vue__default=/*#__PURE__*/_interopDefaultLegacy(Vue);function _iterableToArrayLimit(arr, i) {
2
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
3
- if (null != _i) {
4
- var _s,
5
- _e,
6
- _x,
7
- _r,
8
- _arr = [],
9
- _n = !0,
10
- _d = !1;
11
- try {
12
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
13
- if (Object(_i) !== _i) return;
14
- _n = !1;
15
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
16
- } catch (err) {
17
- _d = !0, _e = err;
18
- } finally {
19
- try {
20
- if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
21
- } finally {
22
- if (_d) throw _e;
23
- }
24
- }
25
- return _arr;
26
- }
27
- }
28
- function ownKeys(object, enumerableOnly) {
1
+ 'use strict';var Vue=require('vue');function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}}var Vue__default=/*#__PURE__*/_interopDefaultLegacy(Vue);function ownKeys(object, enumerableOnly) {
29
2
  var keys = Object.keys(object);
3
+
30
4
  if (Object.getOwnPropertySymbols) {
31
5
  var symbols = Object.getOwnPropertySymbols(object);
32
- enumerableOnly && (symbols = symbols.filter(function (sym) {
33
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
34
- })), keys.push.apply(keys, symbols);
6
+
7
+ if (enumerableOnly) {
8
+ symbols = symbols.filter(function (sym) {
9
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
10
+ });
11
+ }
12
+
13
+ keys.push.apply(keys, symbols);
35
14
  }
15
+
36
16
  return keys;
37
17
  }
18
+
38
19
  function _objectSpread2(target) {
39
20
  for (var i = 1; i < arguments.length; i++) {
40
- var source = null != arguments[i] ? arguments[i] : {};
41
- i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
42
- _defineProperty$1(target, key, source[key]);
43
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
44
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
45
- });
21
+ var source = arguments[i] != null ? arguments[i] : {};
22
+
23
+ if (i % 2) {
24
+ ownKeys(Object(source), true).forEach(function (key) {
25
+ _defineProperty$1(target, key, source[key]);
26
+ });
27
+ } else if (Object.getOwnPropertyDescriptors) {
28
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
29
+ } else {
30
+ ownKeys(Object(source)).forEach(function (key) {
31
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
32
+ });
33
+ }
46
34
  }
35
+
47
36
  return target;
48
37
  }
38
+
49
39
  function _defineProperty$1(obj, key, value) {
50
- key = _toPropertyKey(key);
51
40
  if (key in obj) {
52
41
  Object.defineProperty(obj, key, {
53
42
  value: value,
@@ -58,14 +47,48 @@ function _defineProperty$1(obj, key, value) {
58
47
  } else {
59
48
  obj[key] = value;
60
49
  }
50
+
61
51
  return obj;
62
52
  }
53
+
63
54
  function _slicedToArray(arr, i) {
64
55
  return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
65
56
  }
57
+
66
58
  function _arrayWithHoles(arr) {
67
59
  if (Array.isArray(arr)) return arr;
68
60
  }
61
+
62
+ function _iterableToArrayLimit(arr, i) {
63
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
64
+
65
+ if (_i == null) return;
66
+ var _arr = [];
67
+ var _n = true;
68
+ var _d = false;
69
+
70
+ var _s, _e;
71
+
72
+ try {
73
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
74
+ _arr.push(_s.value);
75
+
76
+ if (i && _arr.length === i) break;
77
+ }
78
+ } catch (err) {
79
+ _d = true;
80
+ _e = err;
81
+ } finally {
82
+ try {
83
+ if (!_n && _i["return"] != null) _i["return"]();
84
+ } finally {
85
+ if (_d) throw _e;
86
+ }
87
+ }
88
+
89
+ return _arr;
90
+ }
91
+
69
92
  function _unsupportedIterableToArray(o, minLen) {
70
93
  if (!o) return;
71
94
  if (typeof o === "string") return _arrayLikeToArray(o, minLen);
@@ -74,49 +97,38 @@ function _unsupportedIterableToArray(o, minLen) {
74
97
  if (n === "Map" || n === "Set") return Array.from(o);
75
98
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
76
99
  }
100
+
77
101
  function _arrayLikeToArray(arr, len) {
78
102
  if (len == null || len > arr.length) len = arr.length;
103
+
79
104
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
105
+
80
106
  return arr2;
81
107
  }
108
+
82
109
  function _nonIterableRest() {
83
110
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
84
- }
85
- function _toPrimitive(input, hint) {
86
- if (typeof input !== "object" || input === null) return input;
87
- var prim = input[Symbol.toPrimitive];
88
- if (prim !== undefined) {
89
- var res = prim.call(input, hint || "default");
90
- if (typeof res !== "object") return res;
91
- throw new TypeError("@@toPrimitive must return a primitive value.");
92
- }
93
- return (hint === "string" ? String : Number)(input);
94
- }
95
- function _toPropertyKey(arg) {
96
- var key = _toPrimitive(arg, "string");
97
- return typeof key === "symbol" ? key : String(key);
98
111
  }var UtFormConfig = {
99
112
  findField: function findField(fieldName, formConfig) {
100
113
  if (!formConfig || !formConfig.sections) {
101
114
  return null;
102
115
  }
116
+
103
117
  var found = null;
104
- formConfig.sections.every(function (r) {
118
+ formConfig.sections.forEach(function (r) {
119
+ console.info(r);
120
+
105
121
  if (r.columns) {
106
- r.columns.every(function (c) {
122
+ r.columns.forEach(function (c) {
107
123
  c.fields.forEach(function (f) {
124
+ console.info(f.name);
125
+
108
126
  if (f.name === fieldName) {
109
127
  found = f;
110
128
  }
111
129
  });
112
- if (found) {
113
- return false;
114
- }
115
130
  });
116
131
  }
117
- if (found) {
118
- return false;
119
- }
120
132
  });
121
133
  return found;
122
134
  },
@@ -124,6 +136,7 @@ function _toPropertyKey(arg) {
124
136
  if (!formConfig || !formConfig.sections) {
125
137
  return null;
126
138
  }
139
+
127
140
  var found = null;
128
141
  formConfig.sections.every(function (s) {
129
142
  if (s.columns) {
@@ -136,15 +149,18 @@ function _toPropertyKey(arg) {
136
149
  }
137
150
  });
138
151
  }
152
+
139
153
  if (found) {
140
154
  return false;
141
155
  }
142
156
  });
157
+
143
158
  if (found) {
144
159
  return false;
145
160
  }
146
161
  });
147
162
  }
163
+
148
164
  if (found) {
149
165
  return false;
150
166
  }
@@ -182,19 +198,27 @@ function _toPropertyKey(arg) {
182
198
  };var __clone = function __clone(data) {
183
199
  return JSON.parse(JSON.stringify(data));
184
200
  };
201
+
185
202
  var _assign = function __assign() {
186
203
  _assign = Object.assign || function __assign(t) {
187
204
  for (var s, i = 1, n = arguments.length; i < n; i++) {
188
205
  s = arguments[i];
189
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
206
+
207
+ for (var p in s) {
208
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
209
+ }
190
210
  }
211
+
191
212
  return t;
192
213
  };
214
+
193
215
  return _assign.apply(this, arguments);
194
216
  };
217
+
195
218
  var __mergeInputInMapOfArrays = function __mergeInputInMapOfArrays(inputs, formConfigInputs) {
196
219
  for (var dataType in formConfigInputs) {
197
220
  var foundInputs = inputs[dataType];
221
+
198
222
  if (foundInputs) {
199
223
  __mergeInputsInArray(foundInputs, formConfigInputs[dataType]);
200
224
  } else {
@@ -202,16 +226,19 @@ var __mergeInputInMapOfArrays = function __mergeInputInMapOfArrays(inputs, formC
202
226
  }
203
227
  }
204
228
  };
229
+
205
230
  var __mergeInputsInMap = function __mergeInputsInMap(inputs, formConfigInputs) {
206
231
  for (var name in formConfigInputs) {
207
232
  inputs[name] = _assign(inputs[name] ? inputs[name] : {}, formConfigInputs[name] ? formConfigInputs[name] : {});
208
233
  }
209
234
  };
235
+
210
236
  var __mergeInputsInArray = function __mergeInputsInArray(inputs, formConfigInputs) {
211
237
  formConfigInputs.forEach(function (input) {
212
238
  var index = inputs.findIndex(function (item) {
213
239
  return item.name === input.name;
214
240
  });
241
+
215
242
  if (index >= 0) {
216
243
  inputs[index] = input;
217
244
  } else {
@@ -219,13 +246,16 @@ var __mergeInputsInArray = function __mergeInputsInArray(inputs, formConfigInput
219
246
  }
220
247
  });
221
248
  };
249
+
222
250
  var __applyDefaultProps = function __applyDefaultProps(input, field) {
223
251
  for (var propName in input.props) {
224
252
  if (field) {
225
253
  if (field.input.propsData[propName]) {
226
- var _input$propsData, _input$props;
254
+ var _input$propsData, _input$props, _input$props$type;
255
+
227
256
  input.propsData[propName] = field.input.propsData[propName];
228
- if ((_input$propsData = input.propsData) !== null && _input$propsData !== void 0 && _input$propsData.type && (_input$props = input.props) !== null && _input$props !== void 0 && (_input$props = _input$props.type) !== null && _input$props !== void 0 && _input$props.default) {
257
+
258
+ if ((_input$propsData = input.propsData) !== null && _input$propsData !== void 0 && _input$propsData.type && (_input$props = input.props) !== null && _input$props !== void 0 && (_input$props$type = _input$props.type) !== null && _input$props$type !== void 0 && _input$props$type.default) {
229
259
  input.propsData.type = input.props.type.default;
230
260
  }
231
261
  }
@@ -234,6 +264,7 @@ var __applyDefaultProps = function __applyDefaultProps(input, field) {
234
264
  }
235
265
  }
236
266
  };
267
+
237
268
  var __applyRefProps = function __applyRefProps(input, refConfig) {
238
269
  if (refConfig !== null && refConfig !== void 0 && refConfig.propsData) {
239
270
  for (var propName in refConfig.propsData) {
@@ -241,11 +272,13 @@ var __applyRefProps = function __applyRefProps(input, refConfig) {
241
272
  }
242
273
  }
243
274
  };
275
+
244
276
  var __filterInputsByMultiple = function __filterInputsByMultiple(inputs, multiple) {
245
277
  return inputs.filter(function (i) {
246
278
  return i.multiple && multiple || !i.multiple && !multiple;
247
279
  });
248
280
  };
281
+
249
282
  var fcInputs = {
250
283
  string: {
251
284
  text: 'Текст',
@@ -449,28 +482,36 @@ var UtFormConstructor = {
449
482
  config: {},
450
483
  init: function init(formConfig) {
451
484
  this.config = __clone(baseConfig);
485
+
452
486
  if (formConfig) {
453
487
  if (formConfig.inputs) {
454
488
  __mergeInputsInMap(this.config.inputs, formConfig.inputs);
455
489
  }
490
+
456
491
  if (formConfig.primitiveInputs) {
457
492
  __mergeInputInMapOfArrays(this.config.primitiveInputs, formConfig.primitiveInputs);
458
493
  }
494
+
459
495
  if (formConfig.dictInputs) {
460
496
  __mergeInputsInArray(this.config.dictInputs, formConfig.dictInputs);
461
497
  }
498
+
462
499
  if (formConfig.refInputs) {
463
500
  __mergeInputInMapOfArrays(this.config.refInputs, formConfig.refInputs);
464
501
  }
502
+
465
503
  if (formConfig.refInputConfigs) {
466
504
  this.config.refInputConfigs = formConfig.refInputConfigs;
467
505
  }
506
+
468
507
  if (formConfig.icons) {
469
508
  this.config.icons = _assign(this.config.icons, formConfig.icons);
470
509
  }
510
+
471
511
  if (formConfig.rules) {
472
512
  this.config.rules = formConfig.rules;
473
513
  }
514
+
474
515
  if (formConfig.ruleContext) {
475
516
  this.config.ruleContext = formConfig.ruleContext;
476
517
  }
@@ -478,9 +519,11 @@ var UtFormConstructor = {
478
519
  },
479
520
  getInputTypes: function getInputTypes(field) {
480
521
  var inputs = [];
522
+
481
523
  if (!field) {
482
524
  return inputs;
483
525
  }
526
+
484
527
  if (field.dict && !this.config.refInputs[field.ref]) {
485
528
  inputs = __filterInputsByMultiple(this.config.dictInputs, field.multiple);
486
529
  } else if (field.ref) {
@@ -488,6 +531,7 @@ var UtFormConstructor = {
488
531
  } else {
489
532
  inputs = __filterInputsByMultiple(this.config.primitiveInputs[field.type], field.multiple);
490
533
  }
534
+
491
535
  return inputs;
492
536
  },
493
537
  hasMultipleInputTypes: function hasMultipleInputTypes(field) {
@@ -499,38 +543,49 @@ var UtFormConstructor = {
499
543
  getDefaultInput: function getDefaultInput(field) {
500
544
  var input = null;
501
545
  var inputs = this.getInputTypes(field);
546
+
502
547
  if (!inputs) {
503
548
  input = this.primitiveInputs[0];
504
549
  }
550
+
505
551
  if (field.ref && this.config.refInputs[field.ref]) {
506
552
  input = __clone(inputs[0]);
553
+
507
554
  __applyDefaultProps(input);
555
+
508
556
  if (this.config.refInputConfigs[field.ref] && this.config.refInputConfigs[field.ref][input.name]) {
509
557
  __applyRefProps(input, this.config.refInputConfigs[field.ref][input.name]);
510
558
  }
511
559
  } else if (field.dict) {
512
560
  input = __clone(inputs[0]);
513
561
  input.props.dict.default = field.ref;
562
+
514
563
  __applyDefaultProps(input);
515
564
  } else {
516
565
  input = __clone(inputs[0]);
566
+
517
567
  __applyDefaultProps(input);
518
568
  }
569
+
519
570
  return input;
520
571
  },
521
572
  getInputTypeByName: function getInputTypeByName(name, field) {
522
573
  var input = __clone(this.config.inputs[name]);
574
+
523
575
  if (field.ref && this.config.refInputs[field.ref]) {
524
576
  __applyDefaultProps(input);
577
+
525
578
  if (this.config.refInputConfigs[field.ref] && this.config.refInputConfigs[field.ref][input.name]) {
526
579
  __applyRefProps(input, this.config.refInputConfigs[field.ref][input.name]);
527
580
  }
528
581
  } else if (field.dict) {
529
582
  input.props.dict.default = field.ref;
530
- __applyDefaultProps(input);
583
+
584
+ __applyDefaultProps(input, field);
531
585
  } else {
532
586
  __applyDefaultProps(input, field);
533
587
  }
588
+
534
589
  input.propsData['ref'] = field.name;
535
590
  return input;
536
591
  },
@@ -548,13 +603,17 @@ var UtFormConstructor = {
548
603
  context['Date'] = Date;
549
604
  context['Math'] = Math;
550
605
  var appendScript = '';
606
+
551
607
  for (var v in context) {
552
608
  appendScript = appendScript + "var ".concat(v, " = this.").concat(v, ";\n");
553
609
  }
610
+
554
611
  appendScript = appendScript ? appendScript + '\n' : '';
612
+
555
613
  var func = function func(script) {
556
614
  return eval(script);
557
615
  };
616
+
558
617
  func.call(context, appendScript + script);
559
618
  }
560
619
  };//
@@ -576,7 +635,6 @@ var UtFormConstructor = {
576
635
  //
577
636
  //
578
637
  //
579
-
580
638
  var script$5 = {
581
639
  name: 'DocTemplateSectionModal',
582
640
  props: {
@@ -611,10 +669,13 @@ var script$5 = {
611
669
  methods: {
612
670
  onOk: function onOk() {
613
671
  var _this = this;
672
+
614
673
  this.section = this.label;
674
+
615
675
  if (this.onAfterOk) {
616
676
  this.onAfterOk();
617
677
  }
678
+
618
679
  this.$nextTick(function () {
619
680
  _this.$bvModal.hide(_this.id);
620
681
  });
@@ -700,12 +761,15 @@ var script$5 = {
700
761
  return script;
701
762
  }/* script */
702
763
  var __vue_script__$5 = script$5;
703
-
704
764
  /* template */
765
+
705
766
  var __vue_render__$5 = function __vue_render__() {
706
767
  var _vm = this;
768
+
707
769
  var _h = _vm.$createElement;
770
+
708
771
  var _c = _vm._self._c || _h;
772
+
709
773
  return _c('b-modal', {
710
774
  attrs: {
711
775
  "id": "rb-doc-template-section-modal",
@@ -746,15 +810,19 @@ var __vue_render__$5 = function __vue_render__() {
746
810
  }
747
811
  })], 1)], 1)], 1)], 1)], 1);
748
812
  };
749
- var __vue_staticRenderFns__$5 = [];
750
813
 
814
+ var __vue_staticRenderFns__$5 = [];
751
815
  /* style */
816
+
752
817
  var __vue_inject_styles__$5 = undefined;
753
818
  /* scoped */
819
+
754
820
  var __vue_scope_id__$5 = undefined;
755
821
  /* module identifier */
822
+
756
823
  var __vue_module_identifier__$5 = "data-v-4f837662";
757
824
  /* functional template */
825
+
758
826
  var __vue_is_functional_template__$5 = false;
759
827
  /* style inject */
760
828
 
@@ -766,6 +834,7 @@ var __vue_component__$6 = /*#__PURE__*/normalizeComponent({
766
834
  render: __vue_render__$5,
767
835
  staticRenderFns: __vue_staticRenderFns__$5
768
836
  }, __vue_inject_styles__$5, __vue_script__$5, __vue_scope_id__$5, __vue_is_functional_template__$5, __vue_module_identifier__$5, false, undefined, undefined, undefined);
837
+
769
838
  var DocTemplateSectionModal = __vue_component__$6;var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
770
839
 
771
840
  function createCommonjsModule(fn, basedir, module) {
@@ -6195,17 +6264,21 @@ if (typeof window !== "undefined" && "Vue" in window) {
6195
6264
  },
6196
6265
  findInFacets: function findInFacets(str) {
6197
6266
  str = str.toLowerCase();
6267
+
6198
6268
  if (!str || str.length === 0) {
6199
6269
  this.innerFacets = this.allFacets;
6200
6270
  }
6271
+
6201
6272
  var facets = JSON.parse(JSON.stringify(this.allFacets));
6202
6273
  facets = facets.filter(function (facet) {
6203
6274
  var facetFound = false;
6204
6275
  facet.fields = facet.fields.filter(function (field) {
6205
6276
  var fieldFound = field.labelRu.toLowerCase().indexOf(str) >= 0 || field.name.toLowerCase().indexOf(str) >= 0;
6277
+
6206
6278
  if (fieldFound) {
6207
6279
  facetFound = true;
6208
6280
  }
6281
+
6209
6282
  return fieldFound;
6210
6283
  });
6211
6284
  return facetFound;
@@ -6218,6 +6291,7 @@ if (typeof window !== "undefined" && "Vue" in window) {
6218
6291
  expanded: false
6219
6292
  });
6220
6293
  });
6294
+
6221
6295
  if (innerFacets) {
6222
6296
  innerFacets.forEach(function (facet) {
6223
6297
  facet.fields = facet.fields.filter(function (field) {
@@ -6225,6 +6299,7 @@ if (typeof window !== "undefined" && "Vue" in window) {
6225
6299
  });
6226
6300
  });
6227
6301
  }
6302
+
6228
6303
  this.innerFacets = JSON.parse(JSON.stringify(innerFacets));
6229
6304
  this.allFacets = JSON.parse(JSON.stringify(innerFacets));
6230
6305
  }
@@ -6234,12 +6309,15 @@ if (typeof window !== "undefined" && "Vue" in window) {
6234
6309
  }
6235
6310
  };/* script */
6236
6311
  var __vue_script__$4 = script$4;
6237
-
6238
6312
  /* template */
6313
+
6239
6314
  var __vue_render__$4 = function __vue_render__() {
6240
6315
  var _vm = this;
6316
+
6241
6317
  var _h = _vm.$createElement;
6318
+
6242
6319
  var _c = _vm._self._c || _h;
6320
+
6243
6321
  return _c('div', {
6244
6322
  staticClass: "rb-facets-sidebar"
6245
6323
  }, [_vm._ssrNode("<div class=\"d-flex justify-content-between align-items-center\">", "</div>", [_vm._ssrNode("<h4>Компоненты</h4> "), _vm._t("action")], 2), _vm._ssrNode(" "), _c('b-form', [_c('b-form-row', [_c('b-col', {
@@ -6304,15 +6382,19 @@ var __vue_render__$4 = function __vue_render__() {
6304
6382
  }), 1)], 1) : _vm._e()], 2) : _vm._e();
6305
6383
  }), 0)], 2);
6306
6384
  };
6307
- var __vue_staticRenderFns__$4 = [];
6308
6385
 
6386
+ var __vue_staticRenderFns__$4 = [];
6309
6387
  /* style */
6388
+
6310
6389
  var __vue_inject_styles__$4 = undefined;
6311
6390
  /* scoped */
6391
+
6312
6392
  var __vue_scope_id__$4 = undefined;
6313
6393
  /* module identifier */
6394
+
6314
6395
  var __vue_module_identifier__$4 = "data-v-0746865a";
6315
6396
  /* functional template */
6397
+
6316
6398
  var __vue_is_functional_template__$4 = false;
6317
6399
  /* style inject */
6318
6400
 
@@ -6324,6 +6406,7 @@ var __vue_component__$5 = /*#__PURE__*/normalizeComponent({
6324
6406
  render: __vue_render__$4,
6325
6407
  staticRenderFns: __vue_staticRenderFns__$4
6326
6408
  }, __vue_inject_styles__$4, __vue_script__$4, __vue_scope_id__$4, __vue_is_functional_template__$4, __vue_module_identifier__$4, false, undefined, undefined, undefined);
6409
+
6327
6410
  var DocTemplateFacetList = __vue_component__$5;var toString = Object.prototype.toString;
6328
6411
 
6329
6412
  var _typeof = function(object) {
@@ -6402,6 +6485,7 @@ var _typeof = function(object) {
6402
6485
  if ((field.dict || field.ref) && !field.multiple) {
6403
6486
  return field.name.substring(0, field.name.length - 2);
6404
6487
  }
6488
+
6405
6489
  return field.name;
6406
6490
  },
6407
6491
  getResolveValue: function getResolveValue(field) {
@@ -6427,14 +6511,18 @@ var _typeof = function(object) {
6427
6511
  },
6428
6512
  getResolveFieldName: function getResolveFieldName(field) {
6429
6513
  var _resolveFieldName;
6514
+
6430
6515
  var resolveFieldName = field === null || field === void 0 ? void 0 : field.name;
6516
+
6431
6517
  if ((_resolveFieldName = resolveFieldName) !== null && _resolveFieldName !== void 0 && _resolveFieldName.endsWith('Id')) {
6432
6518
  resolveFieldName = field.name.substring(0, field.name.length - 2);
6433
6519
  }
6520
+
6434
6521
  return resolveFieldName;
6435
6522
  },
6436
6523
  onEventFired: function onEventFired(eventName, event, field) {
6437
6524
  var _this = this;
6525
+
6438
6526
  if (field.rules) {
6439
6527
  field.rules.forEach(function (rule) {
6440
6528
  if (rule.event === eventName && rule.script) {
@@ -6448,6 +6536,7 @@ var _typeof = function(object) {
6448
6536
  },
6449
6537
  onGlobalEventFired: function onGlobalEventFired(eventName, event) {
6450
6538
  var _this2 = this;
6539
+
6451
6540
  var fields = UtFormConfig.getFields(this.formConfig);
6452
6541
  fields.forEach(function (f) {
6453
6542
  if (f.rules) {
@@ -6473,52 +6562,67 @@ var _typeof = function(object) {
6473
6562
  },
6474
6563
  isValueEmpty: function isValueEmpty(fieldName) {
6475
6564
  var _this$doc$fieldName;
6565
+
6476
6566
  if (this.doc[fieldName] == null) {
6477
6567
  return true;
6478
6568
  }
6569
+
6479
6570
  if (Array.isArray(this.doc[fieldName]) && !((_this$doc$fieldName = this.doc[fieldName]) !== null && _this$doc$fieldName !== void 0 && _this$doc$fieldName.length)) {
6480
6571
  return true;
6481
6572
  }
6573
+
6482
6574
  if (_typeof(this.doc[fieldName] === 'string') && this.doc[fieldName] === '') {
6483
6575
  return true;
6484
6576
  }
6577
+
6485
6578
  return false;
6486
6579
  },
6487
6580
  isValueLessThanMax: function isValueLessThanMax(fieldname, max) {
6488
6581
  if (this.doc[fieldname] && max) {
6489
6582
  var _this$doc$fieldname;
6583
+
6490
6584
  return ((_this$doc$fieldname = this.doc[fieldname]) === null || _this$doc$fieldname === void 0 ? void 0 : _this$doc$fieldname.length) > parseInt(max);
6491
6585
  }
6586
+
6492
6587
  return false;
6493
6588
  },
6494
6589
  isValueLessThanMin: function isValueLessThanMin(fieldname, min) {
6495
6590
  if (this.doc[fieldname] && min) {
6496
6591
  return parseInt(this.doc[fieldname]) < parseInt(min);
6497
6592
  }
6593
+
6498
6594
  return false;
6499
6595
  },
6500
6596
  validate: function validate() {
6501
6597
  var _this3 = this;
6598
+
6502
6599
  var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {};
6503
6600
  this.formConfig.sections.forEach(function (s) {
6504
6601
  s.columns.forEach(function (c) {
6505
6602
  c.fields.forEach(function (f) {
6506
6603
  var _f$input$propsData, _f$input$propsData3;
6604
+
6507
6605
  var feedback = '';
6606
+
6508
6607
  if (f.required && _this3.isValueEmpty(f.name)) {
6509
6608
  feedback += _this3.getDisplayField(f);
6510
6609
  }
6610
+
6511
6611
  if (f.type === 'integer' && _this3.isValueLessThanMin(f.name, f.input.propsData.min)) {
6512
6612
  feedback += f.input.propsData.min;
6513
- }
6514
- // TODO: Костыль так как на бэке нету типа memo
6613
+ } // TODO: Костыль так как на бэке нету типа memo
6614
+
6615
+
6515
6616
  if (f.input.type === 'b-form-textarea' && _this3.isValueLessThanMax(f.name, (_f$input$propsData = f.input.propsData) === null || _f$input$propsData === void 0 ? void 0 : _f$input$propsData.max)) {
6516
6617
  var _f$input$propsData2;
6618
+
6517
6619
  feedback += "\n\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0434\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u043F\u043E\u043B\u044F ".concat((_f$input$propsData2 = f.input.propsData) === null || _f$input$propsData2 === void 0 ? void 0 : _f$input$propsData2.max);
6518
6620
  }
6621
+
6519
6622
  if (f.required && (_f$input$propsData3 = f.input.propsData) !== null && _f$input$propsData3 !== void 0 && _f$input$propsData3.isInlineTableInput) {
6520
- var _this3$$refs$f$name$, _this3$$refs, _this3$$refs$getIsDir, _UtArray$removeDuplic;
6521
- var findErrors = (_this3$$refs$f$name$ = (_this3$$refs = _this3.$refs) === null || _this3$$refs === void 0 || (_this3$$refs = _this3$$refs[f.name]) === null || _this3$$refs === void 0 || (_this3$$refs = _this3$$refs[0]) === null || _this3$$refs === void 0 || (_this3$$refs$getIsDir = _this3$$refs.getIsDirty) === null || _this3$$refs$getIsDir === void 0 ? void 0 : _this3$$refs$getIsDir.call(_this3$$refs)) !== null && _this3$$refs$f$name$ !== void 0 ? _this3$$refs$f$name$ : [];
6623
+ var _this3$$refs$f$name$, _this3$$refs, _this3$$refs$f$name, _this3$$refs$f$name$2, _this3$$refs$f$name$3, _UtArray$removeDuplic;
6624
+
6625
+ var findErrors = (_this3$$refs$f$name$ = (_this3$$refs = _this3.$refs) === null || _this3$$refs === void 0 ? void 0 : (_this3$$refs$f$name = _this3$$refs[f.name]) === null || _this3$$refs$f$name === void 0 ? void 0 : (_this3$$refs$f$name$2 = _this3$$refs$f$name[0]) === null || _this3$$refs$f$name$2 === void 0 ? void 0 : (_this3$$refs$f$name$3 = _this3$$refs$f$name$2.getIsDirty) === null || _this3$$refs$f$name$3 === void 0 ? void 0 : _this3$$refs$f$name$3.call(_this3$$refs$f$name$2)) !== null && _this3$$refs$f$name$ !== void 0 ? _this3$$refs$f$name$ : [];
6522
6626
  var errors = (_UtArray$removeDuplic = UtArray.removeDuplicate(findErrors, 'field')) === null || _UtArray$removeDuplic === void 0 ? void 0 : _UtArray$removeDuplic.map(function (f) {
6523
6627
  return f === null || f === void 0 ? void 0 : f.label;
6524
6628
  }).join(', ');
@@ -6526,13 +6630,16 @@ var _typeof = function(object) {
6526
6630
  field: errors
6527
6631
  }) : _this3.isValueEmpty(f.name) ? _this3.getDisplayField(f) : '';
6528
6632
  }
6633
+
6529
6634
  if (feedback) {
6530
6635
  Vue__default["default"].set(_this3.validationState, f.name, false);
6531
6636
  Vue__default["default"].set(_this3.validationState, "".concat(f.name, "__feedback"), feedback);
6532
6637
  } else {
6533
6638
  Vue__default["default"].set(_this3.validationState, f.name, null);
6534
6639
  }
6640
+
6535
6641
  callback(feedback, _this3.$refs, f, _this3.doc);
6642
+
6536
6643
  _this3.onEventFired('validate', {
6537
6644
  validationState: _this3.validationState,
6538
6645
  doc: _this3.doc
@@ -6540,18 +6647,22 @@ var _typeof = function(object) {
6540
6647
  });
6541
6648
  });
6542
6649
  });
6650
+
6543
6651
  for (var fieldName in this.validationState) {
6544
6652
  if (this.validationState[fieldName] === false) {
6545
6653
  return false;
6546
6654
  }
6547
6655
  }
6656
+
6548
6657
  return true;
6549
6658
  },
6550
6659
  getColumnSize: function getColumnSize(section) {
6551
6660
  var MAX_COLUMN_SIZE = 12;
6661
+
6552
6662
  if (!section || !section.columnCount) {
6553
6663
  return MAX_COLUMN_SIZE;
6554
6664
  }
6665
+
6555
6666
  var colSize = Math.floor(MAX_COLUMN_SIZE / section.columnCount);
6556
6667
  return colSize;
6557
6668
  },
@@ -6560,17 +6671,20 @@ var _typeof = function(object) {
6560
6671
  },
6561
6672
  execApplyDefaultValues: function execApplyDefaultValues() {
6562
6673
  var _this4 = this;
6674
+
6563
6675
  if (this.applyDefaultValues) {
6564
6676
  this.formConfig.sections.forEach(function (r) {
6565
6677
  r.columns.forEach(function (c) {
6566
6678
  c.fields.forEach(function (f) {
6567
6679
  if (_this4.isNotUndefinedAndNull(f.defaultValue)) {
6568
6680
  var defValue;
6681
+
6569
6682
  if (_this4.defaultValue && _typeof(f.defaultValue) === 'function') {
6570
6683
  defValue = f.defaultValue();
6571
6684
  } else {
6572
6685
  defValue = f.defaultValue == null ? null : f.defaultValue;
6573
6686
  }
6687
+
6574
6688
  _this4.$set(_this4.doc, f.name, f.defaultValue = defValue);
6575
6689
  }
6576
6690
  });
@@ -6580,6 +6694,7 @@ var _typeof = function(object) {
6580
6694
  },
6581
6695
  execApplyDefaultValRule: function execApplyDefaultValRule() {
6582
6696
  var _this5 = this;
6697
+
6583
6698
  this.formConfig.sections.forEach(function (el) {
6584
6699
  el.columns.forEach(function (c) {
6585
6700
  c.fields.forEach(function (f) {
@@ -6588,6 +6703,7 @@ var _typeof = function(object) {
6588
6703
  var rule = f.rules.find(function (rule) {
6589
6704
  return rule.event === 'defaultValue';
6590
6705
  });
6706
+
6591
6707
  if (rule && !_this5.doc[f.name]) {
6592
6708
  _this5.$set(_this5.doc, f.name, f.defaultValue = eval(rule.script));
6593
6709
  }
@@ -6610,12 +6726,15 @@ var _typeof = function(object) {
6610
6726
  }
6611
6727
  };/* script */
6612
6728
  var __vue_script__$3 = script$3;
6613
-
6614
6729
  /* template */
6730
+
6615
6731
  var __vue_render__$3 = function __vue_render__() {
6616
6732
  var _vm = this;
6733
+
6617
6734
  var _h = _vm.$createElement;
6735
+
6618
6736
  var _c = _vm._self._c || _h;
6737
+
6619
6738
  return _vm.formConfig && _vm.formConfig.sections ? _c('b-form', {
6620
6739
  staticClass: "rb-doc-form",
6621
6740
  on: {
@@ -6722,15 +6841,19 @@ var __vue_render__$3 = function __vue_render__() {
6722
6841
  })], 2)], 1);
6723
6842
  }), 0) : _vm._e();
6724
6843
  };
6725
- var __vue_staticRenderFns__$3 = [];
6726
6844
 
6845
+ var __vue_staticRenderFns__$3 = [];
6727
6846
  /* style */
6847
+
6728
6848
  var __vue_inject_styles__$3 = undefined;
6729
6849
  /* scoped */
6850
+
6730
6851
  var __vue_scope_id__$3 = undefined;
6731
6852
  /* module identifier */
6853
+
6732
6854
  var __vue_module_identifier__$3 = "data-v-5e23bff5";
6733
6855
  /* functional template */
6856
+
6734
6857
  var __vue_is_functional_template__$3 = false;
6735
6858
  /* style inject */
6736
6859
 
@@ -6742,15 +6865,19 @@ var __vue_component__$4 = /*#__PURE__*/normalizeComponent({
6742
6865
  render: __vue_render__$3,
6743
6866
  staticRenderFns: __vue_staticRenderFns__$3
6744
6867
  }, __vue_inject_styles__$3, __vue_script__$3, __vue_scope_id__$3, __vue_is_functional_template__$3, __vue_module_identifier__$3, false, undefined, undefined, undefined);
6868
+
6745
6869
  var DocForm = __vue_component__$4;var generateRandomString = function generateRandomString(length) {
6746
6870
  var result = '';
6747
6871
  var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
6748
6872
  var charactersLength = characters.length;
6873
+
6749
6874
  for (var i = 0; i < length; i++) {
6750
6875
  result += characters.charAt(Math.floor(Math.random() * charactersLength));
6751
6876
  }
6877
+
6752
6878
  return result;
6753
6879
  };
6880
+
6754
6881
  var UtRandom = {
6755
6882
  getRandomString: function getRandomString(length) {
6756
6883
  return generateRandomString(length);
@@ -6805,6 +6932,7 @@ var script$2 = {
6805
6932
  methods: {
6806
6933
  validateFields: function validateFields(fieldName) {
6807
6934
  var _this = this;
6935
+
6808
6936
  var fields = fieldName ? [fieldName] : ['name', 'event', 'script'];
6809
6937
  fields.forEach(function (field) {
6810
6938
  if (!_this.innerRule[field]) {
@@ -6822,8 +6950,10 @@ var script$2 = {
6822
6950
  applyRuleToInnerFormConfig: function applyRuleToInnerFormConfig() {
6823
6951
  if (this.innerFormConfig) {
6824
6952
  var foundRule = UtFormConfig.findRule(this.innerRule.id, this.innerFormConfig);
6953
+
6825
6954
  if (!foundRule) {
6826
6955
  var foundField = UtFormConfig.findField(this.field.name, this.innerFormConfig);
6956
+
6827
6957
  if (foundField) {
6828
6958
  foundField.rules = foundField.rules ? foundField.rules : [];
6829
6959
  foundField.rules.push(this.rule);
@@ -6881,6 +7011,7 @@ var script$2 = {
6881
7011
  var rule = this.rulePresets.find(function (rule) {
6882
7012
  return rule.name === ruleName;
6883
7013
  });
7014
+
6884
7015
  if (rule) {
6885
7016
  Object.assign(this.innerRule, rule);
6886
7017
  this.innerRule.script = this.innerRule.script.trim();
@@ -6888,13 +7019,17 @@ var script$2 = {
6888
7019
  },
6889
7020
  onOk: function onOk() {
6890
7021
  var _this2 = this;
7022
+
6891
7023
  this.validateFields();
7024
+
6892
7025
  if (this.state.name && this.state.script) {
6893
7026
  if (this.onAfterOk) {
6894
7027
  this.onAfterOk(this.innerRule);
6895
7028
  }
7029
+
6896
7030
  this.$nextTick(function () {
6897
7031
  _this2.resetModal();
7032
+
6898
7033
  _this2.$bvModal.hide(_this2.id);
6899
7034
  });
6900
7035
  }
@@ -6905,12 +7040,15 @@ var script$2 = {
6905
7040
  }
6906
7041
  };/* script */
6907
7042
  var __vue_script__$2 = script$2;
6908
-
6909
7043
  /* template */
7044
+
6910
7045
  var __vue_render__$2 = function __vue_render__() {
6911
7046
  var _vm = this;
7047
+
6912
7048
  var _h = _vm.$createElement;
7049
+
6913
7050
  var _c = _vm._self._c || _h;
7051
+
6914
7052
  return _c('b-modal', {
6915
7053
  attrs: {
6916
7054
  "id": _vm.id,
@@ -7163,15 +7301,19 @@ var __vue_render__$2 = function __vue_render__() {
7163
7301
  }
7164
7302
  })], 1) : _vm._e()], 1)], 1)], 1);
7165
7303
  };
7166
- var __vue_staticRenderFns__$2 = [];
7167
7304
 
7305
+ var __vue_staticRenderFns__$2 = [];
7168
7306
  /* style */
7307
+
7169
7308
  var __vue_inject_styles__$2 = undefined;
7170
7309
  /* scoped */
7310
+
7171
7311
  var __vue_scope_id__$2 = undefined;
7172
7312
  /* module identifier */
7313
+
7173
7314
  var __vue_module_identifier__$2 = "data-v-cc4d6922";
7174
7315
  /* functional template */
7316
+
7175
7317
  var __vue_is_functional_template__$2 = false;
7176
7318
  /* style inject */
7177
7319
 
@@ -7183,6 +7325,7 @@ var __vue_component__$3 = /*#__PURE__*/normalizeComponent({
7183
7325
  render: __vue_render__$2,
7184
7326
  staticRenderFns: __vue_staticRenderFns__$2
7185
7327
  }, __vue_inject_styles__$2, __vue_script__$2, __vue_scope_id__$2, __vue_is_functional_template__$2, __vue_module_identifier__$2, false, undefined, undefined, undefined);
7328
+
7186
7329
  var FieldRuleFormModal = __vue_component__$3;var script$1 = {
7187
7330
  name: 'DocTemplateFieldSidebar',
7188
7331
  components: {
@@ -7241,6 +7384,7 @@ var FieldRuleFormModal = __vue_component__$3;var script$1 = {
7241
7384
  },
7242
7385
  value: function value() {
7243
7386
  this.field = this.value;
7387
+
7244
7388
  if (this.field && this.field.input) {
7245
7389
  this.currentInputName = this.field.input.name;
7246
7390
  }
@@ -7257,6 +7401,7 @@ var FieldRuleFormModal = __vue_component__$3;var script$1 = {
7257
7401
  },
7258
7402
  multiple: function multiple() {
7259
7403
  var input = UtFormConstructor.getDefaultInput(this.field);
7404
+
7260
7405
  if (this.field.multiple) {
7261
7406
  this.currentInputName = input.name;
7262
7407
  }
@@ -7291,6 +7436,7 @@ var FieldRuleFormModal = __vue_component__$3;var script$1 = {
7291
7436
  },
7292
7437
  addRule: function addRule() {
7293
7438
  var _this = this;
7439
+
7294
7440
  this.ruleModalCfg = {
7295
7441
  mode: 'ins',
7296
7442
  rule: {
@@ -7299,7 +7445,9 @@ var FieldRuleFormModal = __vue_component__$3;var script$1 = {
7299
7445
  },
7300
7446
  onAfterOk: function onAfterOk(rule) {
7301
7447
  _this.field.rules = _this.field.rules ? _this.field.rules : [];
7448
+
7302
7449
  _this.field.rules.push(_objectSpread2({}, rule));
7450
+
7303
7451
  _this.rulesHash = UtRandom.getRandomString(10);
7304
7452
  }
7305
7453
  };
@@ -7309,6 +7457,7 @@ var FieldRuleFormModal = __vue_component__$3;var script$1 = {
7309
7457
  if (event.target.classList && event.target.classList.contains('rb-remove-rule')) {
7310
7458
  return;
7311
7459
  }
7460
+
7312
7461
  this.ruleModalCfg = {
7313
7462
  mode: 'upd',
7314
7463
  rule: _objectSpread2({}, rule),
@@ -7322,9 +7471,11 @@ var FieldRuleFormModal = __vue_component__$3;var script$1 = {
7322
7471
  var index = this.field.rules.findIndex(function (r) {
7323
7472
  return r.id === rule.id;
7324
7473
  });
7474
+
7325
7475
  if (index >= 0) {
7326
7476
  this.field.rules.splice(index, 1);
7327
7477
  }
7478
+
7328
7479
  this.rulesHash = UtRandom.getRandomString(10);
7329
7480
  }
7330
7481
  },
@@ -7332,6 +7483,7 @@ var FieldRuleFormModal = __vue_component__$3;var script$1 = {
7332
7483
  if (this.value) {
7333
7484
  this.innerVisible = this.visible;
7334
7485
  this.field = this.value;
7486
+
7335
7487
  if (this.field && this.field.input) {
7336
7488
  this.currentInputName = this.field.input.name;
7337
7489
  }
@@ -7339,12 +7491,15 @@ var FieldRuleFormModal = __vue_component__$3;var script$1 = {
7339
7491
  }
7340
7492
  };/* script */
7341
7493
  var __vue_script__$1 = script$1;
7342
-
7343
7494
  /* template */
7495
+
7344
7496
  var __vue_render__$1 = function __vue_render__() {
7345
7497
  var _vm = this;
7498
+
7346
7499
  var _h = _vm.$createElement;
7500
+
7347
7501
  var _c = _vm._self._c || _h;
7502
+
7348
7503
  return _c('b-sidebar', {
7349
7504
  staticClass: "rb-doc-template-field-sidebar",
7350
7505
  attrs: {
@@ -7582,15 +7737,19 @@ var __vue_render__$1 = function __vue_render__() {
7582
7737
  }
7583
7738
  })], 1);
7584
7739
  };
7585
- var __vue_staticRenderFns__$1 = [];
7586
7740
 
7741
+ var __vue_staticRenderFns__$1 = [];
7587
7742
  /* style */
7743
+
7588
7744
  var __vue_inject_styles__$1 = undefined;
7589
7745
  /* scoped */
7746
+
7590
7747
  var __vue_scope_id__$1 = undefined;
7591
7748
  /* module identifier */
7749
+
7592
7750
  var __vue_module_identifier__$1 = "data-v-44fffe29";
7593
7751
  /* functional template */
7752
+
7594
7753
  var __vue_is_functional_template__$1 = false;
7595
7754
  /* style inject */
7596
7755
 
@@ -7602,6 +7761,7 @@ var __vue_component__$2 = /*#__PURE__*/normalizeComponent({
7602
7761
  render: __vue_render__$1,
7603
7762
  staticRenderFns: __vue_staticRenderFns__$1
7604
7763
  }, __vue_inject_styles__$1, __vue_script__$1, __vue_scope_id__$1, __vue_is_functional_template__$1, __vue_module_identifier__$1, false, undefined, undefined, undefined);
7764
+
7605
7765
  var DocTemplateFieldSidebar = __vue_component__$2;var script = {
7606
7766
  name: 'DocTemplateConstructor',
7607
7767
  components: {
@@ -7659,33 +7819,41 @@ var DocTemplateFieldSidebar = __vue_component__$2;var script = {
7659
7819
  if (event.target.classList && event.target.classList.contains('rb-remove-field')) {
7660
7820
  return;
7661
7821
  }
7822
+
7662
7823
  this.sidebarVisible = true;
7663
7824
  this.sidebarField = field;
7664
7825
  },
7665
7826
  addSection: function addSection(columnCount) {
7666
7827
  var _this = this;
7828
+
7667
7829
  var section = {
7668
7830
  labelRu: null,
7669
7831
  columnCount: columnCount
7670
7832
  };
7671
7833
  this.sectionModalCfg.mode = 'ins';
7672
7834
  this.sectionModalCfg.section = section;
7835
+
7673
7836
  this.sectionModalCfg.onAfterOk = function () {
7674
7837
  section.columns = [];
7838
+
7675
7839
  for (var i = 0; i < columnCount; i++) {
7676
7840
  section.columns.push({
7677
7841
  index: i,
7678
7842
  fields: []
7679
7843
  });
7680
7844
  }
7845
+
7681
7846
  _this.formConfig.sections.push(section);
7682
7847
  };
7848
+
7683
7849
  this.$bvModal.show(this.sectionModalCfg.id);
7684
7850
  },
7685
7851
  editSection: function editSection(section) {
7686
7852
  this.sectionModalCfg.mode = 'update';
7687
7853
  this.sectionModalCfg.section = section;
7854
+
7688
7855
  this.sectionModalCfg.onAfterOk = function () {};
7856
+
7689
7857
  this.$bvModal.show(this.sectionModalCfg.id);
7690
7858
  },
7691
7859
  removeSection: function removeSection(section, index) {
@@ -7712,11 +7880,13 @@ var DocTemplateFieldSidebar = __vue_component__$2;var script = {
7712
7880
  },
7713
7881
  removeFieldFromColumn: function removeFieldFromColumn(field, column, newIndex) {
7714
7882
  var index = newIndex != null ? newIndex : -1;
7883
+
7715
7884
  if (index < 0) {
7716
7885
  index = column.fields.findIndex(function (f) {
7717
7886
  return field.name === f.name;
7718
7887
  });
7719
7888
  }
7889
+
7720
7890
  if (index >= 0) {
7721
7891
  column.fields.splice(index, 1);
7722
7892
  }
@@ -7731,10 +7901,13 @@ var DocTemplateFieldSidebar = __vue_component__$2;var script = {
7731
7901
  onFieldMoveEnd: function onFieldMoveEnd(event) {
7732
7902
  var newIndex = event.newIndex;
7733
7903
  var field = event.item._underlying_vm_;
7904
+
7734
7905
  if (!field.hasOwnProperty('defaultValue')) {
7735
7906
  this.$set(field, 'defaultValue', undefined);
7736
7907
  }
7908
+
7737
7909
  var found = this.multipleFieldAreOnFormConfig(field);
7910
+
7738
7911
  if (found) {
7739
7912
  this.removeFieldFromColumn(field, this.columnTo, newIndex);
7740
7913
  this.resetDragVariables();
@@ -7748,6 +7921,7 @@ var DocTemplateFieldSidebar = __vue_component__$2;var script = {
7748
7921
  noCloseOnEsc: true
7749
7922
  });
7750
7923
  }
7924
+
7751
7925
  this.resetDragVariables();
7752
7926
  this.hash = (Math.random() + 1).toString(36).substring(7);
7753
7927
  },
@@ -7763,12 +7937,15 @@ var DocTemplateFieldSidebar = __vue_component__$2;var script = {
7763
7937
  }
7764
7938
  };/* script */
7765
7939
  var __vue_script__ = script;
7766
-
7767
7940
  /* template */
7941
+
7768
7942
  var __vue_render__ = function __vue_render__() {
7769
7943
  var _vm = this;
7944
+
7770
7945
  var _h = _vm.$createElement;
7946
+
7771
7947
  var _c = _vm._self._c || _h;
7948
+
7772
7949
  return _c('div', {
7773
7950
  staticClass: "rb-doc-template-constructor d-flex"
7774
7951
  }, [_c('doc-template-facet-list', {
@@ -8000,15 +8177,19 @@ var __vue_render__ = function __vue_render__() {
8000
8177
  }
8001
8178
  })], 2)], 2);
8002
8179
  };
8003
- var __vue_staticRenderFns__ = [];
8004
8180
 
8181
+ var __vue_staticRenderFns__ = [];
8005
8182
  /* style */
8183
+
8006
8184
  var __vue_inject_styles__ = undefined;
8007
8185
  /* scoped */
8186
+
8008
8187
  var __vue_scope_id__ = undefined;
8009
8188
  /* module identifier */
8189
+
8010
8190
  var __vue_module_identifier__ = "data-v-69af8b42";
8011
8191
  /* functional template */
8192
+
8012
8193
  var __vue_is_functional_template__ = false;
8013
8194
  /* style inject */
8014
8195
 
@@ -8020,21 +8201,24 @@ var __vue_component__ = /*#__PURE__*/normalizeComponent({
8020
8201
  render: __vue_render__,
8021
8202
  staticRenderFns: __vue_staticRenderFns__
8022
8203
  }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
8023
- var __vue_component__$1 = __vue_component__;/* eslint-disable import/prefer-default-export */var components$1=/*#__PURE__*/Object.freeze({__proto__:null,UtFormConfig:UtFormConfig,UtFormConstructor:UtFormConstructor,DocTemplateSectionModal:DocTemplateSectionModal,DocTemplateFacetList:DocTemplateFacetList,DocTemplateFieldSidebar:DocTemplateFieldSidebar,DocTemplateConstructor:__vue_component__$1,FieldRuleFormModal:FieldRuleFormModal,DocForm:DocForm});// install function executed by Vue.use()
8024
- var install = function installRbDocumentFormConstructor(Vue) {
8204
+
8205
+ var __vue_component__$1 = __vue_component__;/* eslint-disable import/prefer-default-export */var components$1=/*#__PURE__*/Object.freeze({__proto__:null,UtFormConfig:UtFormConfig,UtFormConstructor:UtFormConstructor,DocTemplateSectionModal:DocTemplateSectionModal,DocTemplateFacetList:DocTemplateFacetList,DocTemplateFieldSidebar:DocTemplateFieldSidebar,DocTemplateConstructor:__vue_component__$1,FieldRuleFormModal:FieldRuleFormModal,DocForm:DocForm});var install = function installRbDocumentFormConstructor(Vue) {
8025
8206
  Object.entries(components$1).forEach(function (_ref) {
8026
8207
  var _ref2 = _slicedToArray(_ref, 2),
8027
- componentName = _ref2[0],
8028
- component = _ref2[1];
8208
+ componentName = _ref2[0],
8209
+ component = _ref2[1];
8210
+
8029
8211
  Vue.component(componentName, component);
8030
8212
  });
8031
- };var components=/*#__PURE__*/Object.freeze({__proto__:null,'default':install,UtFormConfig:UtFormConfig,UtFormConstructor:UtFormConstructor,DocTemplateSectionModal:DocTemplateSectionModal,DocTemplateFacetList:DocTemplateFacetList,DocTemplateFieldSidebar:DocTemplateFieldSidebar,DocTemplateConstructor:__vue_component__$1,FieldRuleFormModal:FieldRuleFormModal,DocForm:DocForm});// Attach named exports directly to plugin. IIFE/CJS will
8032
- // only expose one global var, with component exports exposed as properties of
8213
+ }; // Create module definition for Vue.use()
8214
+ var components=/*#__PURE__*/Object.freeze({__proto__:null,'default':install,UtFormConfig:UtFormConfig,UtFormConstructor:UtFormConstructor,DocTemplateSectionModal:DocTemplateSectionModal,DocTemplateFacetList:DocTemplateFacetList,DocTemplateFieldSidebar:DocTemplateFieldSidebar,DocTemplateConstructor:__vue_component__$1,FieldRuleFormModal:FieldRuleFormModal,DocForm:DocForm});// only expose one global var, with component exports exposed as properties of
8033
8215
  // that global var (eg. plugin.component)
8216
+
8034
8217
  Object.entries(components).forEach(function (_ref) {
8035
8218
  var _ref2 = _slicedToArray(_ref, 2),
8036
- componentName = _ref2[0],
8037
- component = _ref2[1];
8219
+ componentName = _ref2[0],
8220
+ component = _ref2[1];
8221
+
8038
8222
  if (componentName !== 'default') {
8039
8223
  install[componentName] = component;
8040
8224
  }