rb-document-form-constructor 0.8.64 → 0.8.66

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,16 +1,40 @@
1
- 'use strict';var Vue$1=require('vue'),crypto=require('crypto');function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}}var Vue__default=/*#__PURE__*/_interopDefaultLegacy(Vue$1);var crypto__default=/*#__PURE__*/_interopDefaultLegacy(crypto);function ownKeys(object, enumerableOnly) {
1
+ 'use strict';var Vue$1=require('vue');function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}}var Vue__default=/*#__PURE__*/_interopDefaultLegacy(Vue$1);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) {
2
29
  var keys = Object.keys(object);
3
-
4
30
  if (Object.getOwnPropertySymbols) {
5
31
  var symbols = Object.getOwnPropertySymbols(object);
6
32
  enumerableOnly && (symbols = symbols.filter(function (sym) {
7
33
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
8
34
  })), keys.push.apply(keys, symbols);
9
35
  }
10
-
11
36
  return keys;
12
37
  }
13
-
14
38
  function _objectSpread2(target) {
15
39
  for (var i = 1; i < arguments.length; i++) {
16
40
  var source = null != arguments[i] ? arguments[i] : {};
@@ -20,11 +44,10 @@ function _objectSpread2(target) {
20
44
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
21
45
  });
22
46
  }
23
-
24
47
  return target;
25
48
  }
26
-
27
49
  function _defineProperty$1(obj, key, value) {
50
+ key = _toPropertyKey(key);
28
51
  if (key in obj) {
29
52
  Object.defineProperty(obj, key, {
30
53
  value: value,
@@ -35,48 +58,14 @@ function _defineProperty$1(obj, key, value) {
35
58
  } else {
36
59
  obj[key] = value;
37
60
  }
38
-
39
61
  return obj;
40
62
  }
41
-
42
63
  function _slicedToArray(arr, i) {
43
64
  return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
44
65
  }
45
-
46
66
  function _arrayWithHoles(arr) {
47
67
  if (Array.isArray(arr)) return arr;
48
68
  }
49
-
50
- function _iterableToArrayLimit(arr, i) {
51
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
52
-
53
- if (_i == null) return;
54
- var _arr = [];
55
- var _n = true;
56
- var _d = false;
57
-
58
- var _s, _e;
59
-
60
- try {
61
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
62
- _arr.push(_s.value);
63
-
64
- if (i && _arr.length === i) break;
65
- }
66
- } catch (err) {
67
- _d = true;
68
- _e = err;
69
- } finally {
70
- try {
71
- if (!_n && _i["return"] != null) _i["return"]();
72
- } finally {
73
- if (_d) throw _e;
74
- }
75
- }
76
-
77
- return _arr;
78
- }
79
-
80
69
  function _unsupportedIterableToArray(o, minLen) {
81
70
  if (!o) return;
82
71
  if (typeof o === "string") return _arrayLikeToArray(o, minLen);
@@ -85,23 +74,32 @@ function _unsupportedIterableToArray(o, minLen) {
85
74
  if (n === "Map" || n === "Set") return Array.from(o);
86
75
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
87
76
  }
88
-
89
77
  function _arrayLikeToArray(arr, len) {
90
78
  if (len == null || len > arr.length) len = arr.length;
91
-
92
79
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
93
-
94
80
  return arr2;
95
81
  }
96
-
97
82
  function _nonIterableRest() {
98
83
  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);
99
98
  }var UtFormConfig = {
100
99
  findField: function findField(fieldName, formConfig) {
101
100
  if (!formConfig || !formConfig.sections) {
102
101
  return null;
103
102
  }
104
-
105
103
  var found = null;
106
104
  formConfig.sections.every(function (r) {
107
105
  if (r.columns) {
@@ -111,13 +109,11 @@ function _nonIterableRest() {
111
109
  found = f;
112
110
  }
113
111
  });
114
-
115
112
  if (found) {
116
113
  return false;
117
114
  }
118
115
  });
119
116
  }
120
-
121
117
  if (found) {
122
118
  return false;
123
119
  }
@@ -128,7 +124,6 @@ function _nonIterableRest() {
128
124
  if (!formConfig || !formConfig.sections) {
129
125
  return null;
130
126
  }
131
-
132
127
  var found = null;
133
128
  formConfig.sections.every(function (s) {
134
129
  if (s.columns) {
@@ -141,18 +136,15 @@ function _nonIterableRest() {
141
136
  }
142
137
  });
143
138
  }
144
-
145
139
  if (found) {
146
140
  return false;
147
141
  }
148
142
  });
149
-
150
143
  if (found) {
151
144
  return false;
152
145
  }
153
146
  });
154
147
  }
155
-
156
148
  if (found) {
157
149
  return false;
158
150
  }
@@ -4874,27 +4866,19 @@ notevil.FunctionFactory = FunctionFactory_1;
4874
4866
  notevil.Function = _Function;var __clone = function __clone(data) {
4875
4867
  return JSON.parse(JSON.stringify(data));
4876
4868
  };
4877
-
4878
4869
  var _assign = function __assign() {
4879
4870
  _assign = Object.assign || function __assign(t) {
4880
4871
  for (var s, i = 1, n = arguments.length; i < n; i++) {
4881
4872
  s = arguments[i];
4882
-
4883
- for (var p in s) {
4884
- if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
4885
- }
4873
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
4886
4874
  }
4887
-
4888
4875
  return t;
4889
4876
  };
4890
-
4891
4877
  return _assign.apply(this, arguments);
4892
4878
  };
4893
-
4894
4879
  var __mergeInputInMapOfArrays = function __mergeInputInMapOfArrays(inputs, formConfigInputs) {
4895
4880
  for (var dataType in formConfigInputs) {
4896
4881
  var foundInputs = inputs[dataType];
4897
-
4898
4882
  if (foundInputs) {
4899
4883
  __mergeInputsInArray(foundInputs, formConfigInputs[dataType]);
4900
4884
  } else {
@@ -4902,19 +4886,16 @@ var __mergeInputInMapOfArrays = function __mergeInputInMapOfArrays(inputs, formC
4902
4886
  }
4903
4887
  }
4904
4888
  };
4905
-
4906
4889
  var __mergeInputsInMap = function __mergeInputsInMap(inputs, formConfigInputs) {
4907
4890
  for (var name in formConfigInputs) {
4908
4891
  inputs[name] = _assign(inputs[name] ? inputs[name] : {}, formConfigInputs[name] ? formConfigInputs[name] : {});
4909
4892
  }
4910
4893
  };
4911
-
4912
4894
  var __mergeInputsInArray = function __mergeInputsInArray(inputs, formConfigInputs) {
4913
4895
  formConfigInputs.forEach(function (input) {
4914
4896
  var index = inputs.findIndex(function (item) {
4915
4897
  return item.name === input.name;
4916
4898
  });
4917
-
4918
4899
  if (index >= 0) {
4919
4900
  inputs[index] = input;
4920
4901
  } else {
@@ -4922,16 +4903,13 @@ var __mergeInputsInArray = function __mergeInputsInArray(inputs, formConfigInput
4922
4903
  }
4923
4904
  });
4924
4905
  };
4925
-
4926
4906
  var __applyDefaultProps = function __applyDefaultProps(input, field) {
4927
4907
  for (var propName in input.props) {
4928
4908
  if (field) {
4929
4909
  if (field.input.propsData[propName]) {
4930
- var _input$propsData, _input$props, _input$props$type;
4931
-
4910
+ var _input$propsData, _input$props;
4932
4911
  input.propsData[propName] = field.input.propsData[propName];
4933
-
4934
- 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) {
4912
+ 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) {
4935
4913
  input.propsData.type = input.props.type.default;
4936
4914
  }
4937
4915
  }
@@ -4940,7 +4918,6 @@ var __applyDefaultProps = function __applyDefaultProps(input, field) {
4940
4918
  }
4941
4919
  }
4942
4920
  };
4943
-
4944
4921
  var __applyRefProps = function __applyRefProps(input, refConfig) {
4945
4922
  if (refConfig !== null && refConfig !== void 0 && refConfig.propsData) {
4946
4923
  for (var propName in refConfig.propsData) {
@@ -4948,13 +4925,11 @@ var __applyRefProps = function __applyRefProps(input, refConfig) {
4948
4925
  }
4949
4926
  }
4950
4927
  };
4951
-
4952
4928
  var __filterInputsByMultiple = function __filterInputsByMultiple(inputs, multiple) {
4953
4929
  return inputs.filter(function (i) {
4954
4930
  return i.multiple && multiple || !i.multiple && !multiple;
4955
4931
  });
4956
4932
  };
4957
-
4958
4933
  var fcInputs = {
4959
4934
  string: {
4960
4935
  text: 'Текст',
@@ -5158,36 +5133,28 @@ var UtFormConstructor = {
5158
5133
  config: {},
5159
5134
  init: function init(formConfig) {
5160
5135
  this.config = __clone(baseConfig);
5161
-
5162
5136
  if (formConfig) {
5163
5137
  if (formConfig.inputs) {
5164
5138
  __mergeInputsInMap(this.config.inputs, formConfig.inputs);
5165
5139
  }
5166
-
5167
5140
  if (formConfig.primitiveInputs) {
5168
5141
  __mergeInputInMapOfArrays(this.config.primitiveInputs, formConfig.primitiveInputs);
5169
5142
  }
5170
-
5171
5143
  if (formConfig.dictInputs) {
5172
5144
  __mergeInputsInArray(this.config.dictInputs, formConfig.dictInputs);
5173
5145
  }
5174
-
5175
5146
  if (formConfig.refInputs) {
5176
5147
  __mergeInputInMapOfArrays(this.config.refInputs, formConfig.refInputs);
5177
5148
  }
5178
-
5179
5149
  if (formConfig.refInputConfigs) {
5180
5150
  this.config.refInputConfigs = formConfig.refInputConfigs;
5181
5151
  }
5182
-
5183
5152
  if (formConfig.icons) {
5184
5153
  this.config.icons = _assign(this.config.icons, formConfig.icons);
5185
5154
  }
5186
-
5187
5155
  if (formConfig.rules) {
5188
5156
  this.config.rules = formConfig.rules;
5189
5157
  }
5190
-
5191
5158
  if (formConfig.ruleContext) {
5192
5159
  this.config.ruleContext = formConfig.ruleContext;
5193
5160
  }
@@ -5195,11 +5162,9 @@ var UtFormConstructor = {
5195
5162
  },
5196
5163
  getInputTypes: function getInputTypes(field) {
5197
5164
  var inputs = [];
5198
-
5199
5165
  if (!field) {
5200
5166
  return inputs;
5201
5167
  }
5202
-
5203
5168
  if (field.dict && !this.config.refInputs[field.ref]) {
5204
5169
  inputs = __filterInputsByMultiple(this.config.dictInputs, field.multiple);
5205
5170
  } else if (field.ref) {
@@ -5207,7 +5172,6 @@ var UtFormConstructor = {
5207
5172
  } else {
5208
5173
  inputs = __filterInputsByMultiple(this.config.primitiveInputs[field.type], field.multiple);
5209
5174
  }
5210
-
5211
5175
  return inputs;
5212
5176
  },
5213
5177
  hasMultipleInputTypes: function hasMultipleInputTypes(field) {
@@ -5219,49 +5183,38 @@ var UtFormConstructor = {
5219
5183
  getDefaultInput: function getDefaultInput(field) {
5220
5184
  var input = null;
5221
5185
  var inputs = this.getInputTypes(field);
5222
-
5223
5186
  if (!inputs) {
5224
5187
  input = this.primitiveInputs[0];
5225
5188
  }
5226
-
5227
5189
  if (field.ref && this.config.refInputs[field.ref]) {
5228
5190
  input = __clone(inputs[0]);
5229
-
5230
5191
  __applyDefaultProps(input);
5231
-
5232
5192
  if (this.config.refInputConfigs[field.ref] && this.config.refInputConfigs[field.ref][input.name]) {
5233
5193
  __applyRefProps(input, this.config.refInputConfigs[field.ref][input.name]);
5234
5194
  }
5235
5195
  } else if (field.dict) {
5236
5196
  input = __clone(inputs[0]);
5237
5197
  input.props.dict.default = field.ref;
5238
-
5239
5198
  __applyDefaultProps(input);
5240
5199
  } else {
5241
5200
  input = __clone(inputs[0]);
5242
-
5243
5201
  __applyDefaultProps(input);
5244
5202
  }
5245
-
5246
5203
  return input;
5247
5204
  },
5248
5205
  getInputTypeByName: function getInputTypeByName(name, field) {
5249
5206
  var input = __clone(this.config.inputs[name]);
5250
-
5251
5207
  if (field.ref && this.config.refInputs[field.ref]) {
5252
5208
  __applyDefaultProps(input);
5253
-
5254
5209
  if (this.config.refInputConfigs[field.ref] && this.config.refInputConfigs[field.ref][input.name]) {
5255
5210
  __applyRefProps(input, this.config.refInputConfigs[field.ref][input.name]);
5256
5211
  }
5257
5212
  } else if (field.dict) {
5258
5213
  input.props.dict.default = field.ref;
5259
-
5260
5214
  __applyDefaultProps(input);
5261
5215
  } else {
5262
5216
  __applyDefaultProps(input, field);
5263
5217
  }
5264
-
5265
5218
  input.propsData['ref'] = field.name;
5266
5219
  return input;
5267
5220
  },
@@ -5278,11 +5231,9 @@ var UtFormConstructor = {
5278
5231
  context['console'] = console;
5279
5232
  context['Date'] = Date;
5280
5233
  context['Math'] = Math;
5281
-
5282
5234
  var func = function func(script) {
5283
5235
  return notevil(script, context);
5284
5236
  };
5285
-
5286
5237
  func.call(context, script);
5287
5238
  }
5288
5239
  };/*!
@@ -7537,6 +7488,7 @@ var i18n = new VueI18n$1({
7537
7488
  //
7538
7489
  //
7539
7490
  //
7491
+
7540
7492
  var script$5 = {
7541
7493
  name: 'DocTemplateSectionModal',
7542
7494
  props: {
@@ -7571,13 +7523,10 @@ var script$5 = {
7571
7523
  methods: {
7572
7524
  onOk: function onOk() {
7573
7525
  var _this = this;
7574
-
7575
7526
  this.section = this.label;
7576
-
7577
7527
  if (this.onAfterOk) {
7578
7528
  this.onAfterOk();
7579
7529
  }
7580
-
7581
7530
  this.$nextTick(function () {
7582
7531
  _this.$bvModal.hide(_this.id);
7583
7532
  });
@@ -7663,15 +7612,12 @@ var script$5 = {
7663
7612
  return script;
7664
7613
  }/* script */
7665
7614
  var __vue_script__$5 = script$5;
7666
- /* template */
7667
7615
 
7616
+ /* template */
7668
7617
  var __vue_render__$5 = function __vue_render__() {
7669
7618
  var _vm = this;
7670
-
7671
7619
  var _h = _vm.$createElement;
7672
-
7673
7620
  var _c = _vm._self._c || _h;
7674
-
7675
7621
  return _c('b-modal', {
7676
7622
  attrs: {
7677
7623
  "id": "rb-doc-template-section-modal",
@@ -7712,19 +7658,15 @@ var __vue_render__$5 = function __vue_render__() {
7712
7658
  }
7713
7659
  })], 1)], 1)], 1)], 1)], 1);
7714
7660
  };
7715
-
7716
7661
  var __vue_staticRenderFns__$5 = [];
7717
- /* style */
7718
7662
 
7663
+ /* style */
7719
7664
  var __vue_inject_styles__$5 = undefined;
7720
7665
  /* scoped */
7721
-
7722
7666
  var __vue_scope_id__$5 = undefined;
7723
7667
  /* module identifier */
7724
-
7725
7668
  var __vue_module_identifier__$5 = "data-v-4f837662";
7726
7669
  /* functional template */
7727
-
7728
7670
  var __vue_is_functional_template__$5 = false;
7729
7671
  /* style inject */
7730
7672
 
@@ -7736,7 +7678,6 @@ var __vue_component__$6 = /*#__PURE__*/normalizeComponent({
7736
7678
  render: __vue_render__$5,
7737
7679
  staticRenderFns: __vue_staticRenderFns__$5
7738
7680
  }, __vue_inject_styles__$5, __vue_script__$5, __vue_scope_id__$5, __vue_is_functional_template__$5, __vue_module_identifier__$5, false, undefined, undefined, undefined);
7739
-
7740
7681
  var DocTemplateSectionModal = __vue_component__$6;/**!
7741
7682
  * Sortable 1.10.2
7742
7683
  * @author RubaXa <trash@rubaxa.org>
@@ -13152,21 +13093,17 @@ if (typeof window !== "undefined" && "Vue" in window) {
13152
13093
  },
13153
13094
  findInFacets: function findInFacets(str) {
13154
13095
  str = str.toLowerCase();
13155
-
13156
13096
  if (!str || str.length === 0) {
13157
13097
  this.innerFacets = this.allFacets;
13158
13098
  }
13159
-
13160
13099
  var facets = JSON.parse(JSON.stringify(this.allFacets));
13161
13100
  facets = facets.filter(function (facet) {
13162
13101
  var facetFound = false;
13163
13102
  facet.fields = facet.fields.filter(function (field) {
13164
13103
  var fieldFound = field.labelRu.toLowerCase().indexOf(str) >= 0;
13165
-
13166
13104
  if (fieldFound) {
13167
13105
  facetFound = true;
13168
13106
  }
13169
-
13170
13107
  return fieldFound;
13171
13108
  });
13172
13109
  return facetFound;
@@ -13179,7 +13116,6 @@ if (typeof window !== "undefined" && "Vue" in window) {
13179
13116
  expanded: false
13180
13117
  });
13181
13118
  });
13182
-
13183
13119
  if (innerFacets) {
13184
13120
  innerFacets.forEach(function (facet) {
13185
13121
  facet.fields = facet.fields.filter(function (field) {
@@ -13187,7 +13123,6 @@ if (typeof window !== "undefined" && "Vue" in window) {
13187
13123
  });
13188
13124
  });
13189
13125
  }
13190
-
13191
13126
  this.innerFacets = JSON.parse(JSON.stringify(innerFacets));
13192
13127
  this.allFacets = JSON.parse(JSON.stringify(innerFacets));
13193
13128
  }
@@ -13197,15 +13132,12 @@ if (typeof window !== "undefined" && "Vue" in window) {
13197
13132
  }
13198
13133
  };/* script */
13199
13134
  var __vue_script__$4 = script$4;
13200
- /* template */
13201
13135
 
13136
+ /* template */
13202
13137
  var __vue_render__$4 = function __vue_render__() {
13203
13138
  var _vm = this;
13204
-
13205
13139
  var _h = _vm.$createElement;
13206
-
13207
13140
  var _c = _vm._self._c || _h;
13208
-
13209
13141
  return _c('div', {
13210
13142
  staticClass: "rb-facets-sidebar"
13211
13143
  }, [_vm._ssrNode("<h4>Компоненты</h4> "), _c('b-form', [_c('b-form-row', [_c('b-col', {
@@ -13264,19 +13196,15 @@ var __vue_render__$4 = function __vue_render__() {
13264
13196
  }), 1)], 1) : _vm._e()], 2) : _vm._e();
13265
13197
  }), 0)], 2);
13266
13198
  };
13267
-
13268
13199
  var __vue_staticRenderFns__$4 = [];
13269
- /* style */
13270
13200
 
13201
+ /* style */
13271
13202
  var __vue_inject_styles__$4 = undefined;
13272
13203
  /* scoped */
13273
-
13274
13204
  var __vue_scope_id__$4 = undefined;
13275
13205
  /* module identifier */
13276
-
13277
13206
  var __vue_module_identifier__$4 = "data-v-12095172";
13278
13207
  /* functional template */
13279
-
13280
13208
  var __vue_is_functional_template__$4 = false;
13281
13209
  /* style inject */
13282
13210
 
@@ -13288,57 +13216,7 @@ var __vue_component__$5 = /*#__PURE__*/normalizeComponent({
13288
13216
  render: __vue_render__$4,
13289
13217
  staticRenderFns: __vue_staticRenderFns__$4
13290
13218
  }, __vue_inject_styles__$4, __vue_script__$4, __vue_scope_id__$4, __vue_is_functional_template__$4, __vue_module_identifier__$4, false, undefined, undefined, undefined);
13291
-
13292
- var DocTemplateFacetList = __vue_component__$5;const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate
13293
-
13294
- let poolPtr = rnds8Pool.length;
13295
- function rng() {
13296
- if (poolPtr > rnds8Pool.length - 16) {
13297
- crypto__default["default"].randomFillSync(rnds8Pool);
13298
- poolPtr = 0;
13299
- }
13300
-
13301
- return rnds8Pool.slice(poolPtr, poolPtr += 16);
13302
- }/**
13303
- * Convert array of 16 byte values to UUID string format of the form:
13304
- * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
13305
- */
13306
-
13307
- const byteToHex = [];
13308
-
13309
- for (let i = 0; i < 256; ++i) {
13310
- byteToHex.push((i + 0x100).toString(16).slice(1));
13311
- }
13312
-
13313
- function unsafeStringify(arr, offset = 0) {
13314
- // Note: Be careful editing this code! It's been tuned for performance
13315
- // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
13316
- return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
13317
- }var native = {
13318
- randomUUID: crypto__default["default"].randomUUID
13319
- };function v4(options, buf, offset) {
13320
- if (native.randomUUID && !buf && !options) {
13321
- return native.randomUUID();
13322
- }
13323
-
13324
- options = options || {};
13325
- const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
13326
-
13327
- rnds[6] = rnds[6] & 0x0f | 0x40;
13328
- rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
13329
-
13330
- if (buf) {
13331
- offset = offset || 0;
13332
-
13333
- for (let i = 0; i < 16; ++i) {
13334
- buf[offset + i] = rnds[i];
13335
- }
13336
-
13337
- return buf;
13338
- }
13339
-
13340
- return unsafeStringify(rnds);
13341
- }var toString = Object.prototype.toString;
13219
+ var DocTemplateFacetList = __vue_component__$5;var toString = Object.prototype.toString;
13342
13220
 
13343
13221
  var _typeof = function(object) {
13344
13222
  var type = typeof object;
@@ -13354,7 +13232,9 @@ var _typeof = function(object) {
13354
13232
  }
13355
13233
 
13356
13234
  return type.toLowerCase();
13357
- };var script$3 = {
13235
+ };// import safeEval from "notevil";
13236
+
13237
+ var script$3 = {
13358
13238
  name: 'DocForm',
13359
13239
  props: {
13360
13240
  formConfig: Object,
@@ -13402,7 +13282,6 @@ var _typeof = function(object) {
13402
13282
  if ((field.dict || field.ref) && !field.multiple) {
13403
13283
  return field.name.substring(0, field.name.length - 2);
13404
13284
  }
13405
-
13406
13285
  return field.name;
13407
13286
  },
13408
13287
  getResolveValue: function getResolveValue(field) {
@@ -13410,7 +13289,7 @@ var _typeof = function(object) {
13410
13289
  },
13411
13290
  setResolveValue: function setResolveValue(_ref) {
13412
13291
  var field = _ref.field;
13413
- _ref.multiple;
13292
+ _ref.multiple;
13414
13293
  this.getResolveValue(field);
13415
13294
  },
13416
13295
  getDisplayField: function getDisplayField(value) {
@@ -13422,19 +13301,15 @@ var _typeof = function(object) {
13422
13301
  },
13423
13302
  onEventFired: function onEventFired(eventName, event, field) {
13424
13303
  var _this = this;
13425
-
13426
13304
  if (eventName === 'input' && field.ref && !field.multiple) {
13427
13305
  var dataField = null;
13428
-
13429
13306
  if (field.name.lastIndexOf(this.refSuffix) >= 0) {
13430
13307
  dataField = field.name.substring(0, field.name.lastIndexOf(this.refSuffix));
13431
13308
  }
13432
-
13433
13309
  if (dataField && dataField.length > 0) {
13434
13310
  this.doc[dataField] = null;
13435
13311
  }
13436
13312
  }
13437
-
13438
13313
  if (field.rules) {
13439
13314
  field.rules.forEach(function (rule) {
13440
13315
  if (rule.event === eventName && rule.script) {
@@ -13448,7 +13323,6 @@ var _typeof = function(object) {
13448
13323
  },
13449
13324
  onGlobalEventFired: function onGlobalEventFired(eventName, event) {
13450
13325
  var _this2 = this;
13451
-
13452
13326
  var fields = UtFormConfig.getFields(this.formConfig);
13453
13327
  fields.forEach(function (f) {
13454
13328
  if (f.rules) {
@@ -13474,73 +13348,58 @@ var _typeof = function(object) {
13474
13348
  },
13475
13349
  isValueEmpty: function isValueEmpty(fieldName) {
13476
13350
  var _this$doc$fieldName;
13477
-
13478
13351
  if (this.doc[fieldName] == null) {
13479
13352
  return true;
13480
13353
  }
13481
-
13482
13354
  if (Array.isArray(this.doc[fieldName]) && !((_this$doc$fieldName = this.doc[fieldName]) !== null && _this$doc$fieldName !== void 0 && _this$doc$fieldName.length)) {
13483
13355
  return true;
13484
13356
  }
13485
-
13486
13357
  if (_typeof(this.doc[fieldName] === 'string') && this.doc[fieldName] === '') {
13487
13358
  return true;
13488
13359
  }
13489
-
13490
13360
  return false;
13491
13361
  },
13492
13362
  isValueLessThanMax: function isValueLessThanMax(fieldname, max) {
13493
13363
  if (this.doc[fieldname] && max) {
13494
13364
  var _this$doc$fieldname;
13495
-
13496
13365
  return ((_this$doc$fieldname = this.doc[fieldname]) === null || _this$doc$fieldname === void 0 ? void 0 : _this$doc$fieldname.length) > parseInt(max);
13497
13366
  }
13498
-
13499
13367
  return false;
13500
13368
  },
13501
13369
  isValueLessThanMin: function isValueLessThanMin(fieldname, min) {
13502
13370
  if (this.doc[fieldname] && min) {
13503
13371
  return parseInt(this.doc[fieldname]) < parseInt(min);
13504
13372
  }
13505
-
13506
13373
  return false;
13507
13374
  },
13508
13375
  validate: function validate() {
13509
13376
  var _this3 = this;
13510
-
13511
13377
  this.formConfig.sections.forEach(function (s) {
13512
13378
  s.columns.forEach(function (c) {
13513
13379
  c.fields.forEach(function (f) {
13514
13380
  var _f$input$propsData;
13515
-
13516
13381
  var feedback = '';
13517
-
13518
13382
  if (f.required && _this3.isValueEmpty(f.name)) {
13519
13383
  feedback += i18n.t('validate.required', {
13520
13384
  field: _this3.getDisplayField(f)
13521
13385
  });
13522
13386
  }
13523
-
13524
13387
  if (f.type === 'integer' && _this3.isValueLessThanMin(f.name, f.input.propsData.min)) {
13525
13388
  feedback += "\n".concat(i18n.t('validate.min', {
13526
13389
  min: f.input.propsData.min
13527
13390
  }));
13528
- } // TODO: Костыль так как на бэке нету типа memo
13529
-
13530
-
13391
+ }
13392
+ // TODO: Костыль так как на бэке нету типа memo
13531
13393
  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)) {
13532
13394
  var _f$input$propsData2;
13533
-
13534
13395
  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);
13535
13396
  }
13536
-
13537
13397
  if (feedback) {
13538
13398
  Vue__default["default"].set(_this3.validationState, f.name, false);
13539
13399
  Vue__default["default"].set(_this3.validationState, "".concat(f.name, "__feedback"), feedback);
13540
13400
  } else {
13541
13401
  Vue__default["default"].set(_this3.validationState, f.name, null);
13542
13402
  }
13543
-
13544
13403
  _this3.onEventFired('validate', {
13545
13404
  validationState: _this3.validationState,
13546
13405
  doc: _this3.doc
@@ -13548,41 +13407,34 @@ var _typeof = function(object) {
13548
13407
  });
13549
13408
  });
13550
13409
  });
13551
-
13552
13410
  for (var fieldName in this.validationState) {
13553
13411
  if (this.validationState[fieldName] === false) {
13554
13412
  return false;
13555
13413
  }
13556
13414
  }
13557
-
13558
13415
  return true;
13559
13416
  },
13560
13417
  getColumnSize: function getColumnSize(section) {
13561
13418
  var MAX_COLUMN_SIZE = 12;
13562
-
13563
13419
  if (!section || !section.columnCount) {
13564
13420
  return MAX_COLUMN_SIZE;
13565
13421
  }
13566
-
13567
13422
  var colSize = Math.floor(MAX_COLUMN_SIZE / section.columnCount);
13568
13423
  return colSize;
13569
13424
  },
13570
13425
  execApplyDefaultValues: function execApplyDefaultValues() {
13571
13426
  var _this4 = this;
13572
-
13573
13427
  if (this.applyDefaultValues) {
13574
13428
  this.formConfig.sections.forEach(function (r) {
13575
13429
  r.columns.forEach(function (c) {
13576
13430
  c.fields.forEach(function (f) {
13577
13431
  if (f.defaultValue) {
13578
13432
  var defValue;
13579
-
13580
13433
  if (_this4.defaultValue && _typeof(f.defaultValue) === 'function') {
13581
13434
  defValue = f.defaultValue();
13582
13435
  } else {
13583
13436
  defValue = f.defaultValue == null ? null : f.defaultValue;
13584
13437
  }
13585
-
13586
13438
  _this4.$set(_this4.doc, f.name, f.defaultValue = defValue);
13587
13439
  }
13588
13440
  });
@@ -13592,7 +13444,6 @@ var _typeof = function(object) {
13592
13444
  },
13593
13445
  execApplyDefaultValRule: function execApplyDefaultValRule() {
13594
13446
  var _this5 = this;
13595
-
13596
13447
  this.formConfig.sections.forEach(function (el) {
13597
13448
  el.columns.forEach(function (c) {
13598
13449
  c.fields.forEach(function (f) {
@@ -13601,7 +13452,6 @@ var _typeof = function(object) {
13601
13452
  var rule = f.rules.find(function (rule) {
13602
13453
  return rule.event === 'defaultValue';
13603
13454
  });
13604
-
13605
13455
  if (rule && !_this5.doc[f.name]) {
13606
13456
  _this5.$set(_this5.doc, f.name, f.defaultValue = eval(rule.script));
13607
13457
  }
@@ -13624,15 +13474,12 @@ var _typeof = function(object) {
13624
13474
  }
13625
13475
  };/* script */
13626
13476
  var __vue_script__$3 = script$3;
13627
- /* template */
13628
13477
 
13478
+ /* template */
13629
13479
  var __vue_render__$3 = function __vue_render__() {
13630
13480
  var _vm = this;
13631
-
13632
13481
  var _h = _vm.$createElement;
13633
-
13634
13482
  var _c = _vm._self._c || _h;
13635
-
13636
13483
  return _vm.formConfig && _vm.formConfig.sections ? _c('b-form', {
13637
13484
  staticClass: "rb-doc-form",
13638
13485
  on: {
@@ -13730,19 +13577,15 @@ var __vue_render__$3 = function __vue_render__() {
13730
13577
  })], 2)], 1);
13731
13578
  }), 1) : _vm._e();
13732
13579
  };
13733
-
13734
13580
  var __vue_staticRenderFns__$3 = [];
13735
- /* style */
13736
13581
 
13582
+ /* style */
13737
13583
  var __vue_inject_styles__$3 = undefined;
13738
13584
  /* scoped */
13739
-
13740
13585
  var __vue_scope_id__$3 = undefined;
13741
13586
  /* module identifier */
13742
-
13743
13587
  var __vue_module_identifier__$3 = "data-v-44384cd9";
13744
13588
  /* functional template */
13745
-
13746
13589
  var __vue_is_functional_template__$3 = false;
13747
13590
  /* style inject */
13748
13591
 
@@ -13754,8 +13597,20 @@ var __vue_component__$4 = /*#__PURE__*/normalizeComponent({
13754
13597
  render: __vue_render__$3,
13755
13598
  staticRenderFns: __vue_staticRenderFns__$3
13756
13599
  }, __vue_inject_styles__$3, __vue_script__$3, __vue_scope_id__$3, __vue_is_functional_template__$3, __vue_module_identifier__$3, false, undefined, undefined, undefined);
13757
-
13758
- var DocForm = __vue_component__$4;//
13600
+ var DocForm = __vue_component__$4;var generateRandomString = function generateRandomString(length) {
13601
+ var result = '';
13602
+ var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
13603
+ var charactersLength = characters.length;
13604
+ for (var i = 0; i < length; i++) {
13605
+ result += characters.charAt(Math.floor(Math.random() * charactersLength));
13606
+ }
13607
+ return result;
13608
+ };
13609
+ var UtRandom = {
13610
+ getRandomString: function getRandomString(length) {
13611
+ return generateRandomString(length);
13612
+ }
13613
+ };//
13759
13614
  var script$2 = {
13760
13615
  name: 'FieldRuleFormModal',
13761
13616
  components: {
@@ -13805,7 +13660,6 @@ var script$2 = {
13805
13660
  methods: {
13806
13661
  validateFields: function validateFields(fieldName) {
13807
13662
  var _this = this;
13808
-
13809
13663
  var fields = fieldName ? [fieldName] : ['name', 'event', 'script'];
13810
13664
  fields.forEach(function (field) {
13811
13665
  if (!_this.innerRule[field]) {
@@ -13823,10 +13677,8 @@ var script$2 = {
13823
13677
  applyRuleToInnerFormConfig: function applyRuleToInnerFormConfig() {
13824
13678
  if (this.innerFormConfig) {
13825
13679
  var foundRule = UtFormConfig.findRule(this.innerRule.id, this.innerFormConfig);
13826
-
13827
13680
  if (!foundRule) {
13828
13681
  var foundField = UtFormConfig.findField(this.field.name, this.innerFormConfig);
13829
-
13830
13682
  if (foundField) {
13831
13683
  foundField.rules = foundField.rules ? foundField.rules : [];
13832
13684
  foundField.rules.push(this.rule);
@@ -13851,7 +13703,7 @@ var script$2 = {
13851
13703
  },
13852
13704
  getDefaultRule: function getDefaultRule() {
13853
13705
  return {
13854
- id: v4(),
13706
+ id: UtRandom.getRandomString(10),
13855
13707
  name: null,
13856
13708
  event: null,
13857
13709
  script: null
@@ -13884,7 +13736,6 @@ var script$2 = {
13884
13736
  var rule = this.rulePresets.find(function (rule) {
13885
13737
  return rule.name === ruleName;
13886
13738
  });
13887
-
13888
13739
  if (rule) {
13889
13740
  Object.assign(this.innerRule, rule);
13890
13741
  this.innerRule.script = this.innerRule.script.trim();
@@ -13892,17 +13743,13 @@ var script$2 = {
13892
13743
  },
13893
13744
  onOk: function onOk() {
13894
13745
  var _this2 = this;
13895
-
13896
13746
  this.validateFields();
13897
-
13898
13747
  if (this.state.name && this.state.script) {
13899
13748
  if (this.onAfterOk) {
13900
13749
  this.onAfterOk(this.innerRule);
13901
13750
  }
13902
-
13903
13751
  this.$nextTick(function () {
13904
13752
  _this2.resetModal();
13905
-
13906
13753
  _this2.$bvModal.hide(_this2.id);
13907
13754
  });
13908
13755
  }
@@ -13913,15 +13760,12 @@ var script$2 = {
13913
13760
  }
13914
13761
  };/* script */
13915
13762
  var __vue_script__$2 = script$2;
13916
- /* template */
13917
13763
 
13764
+ /* template */
13918
13765
  var __vue_render__$2 = function __vue_render__() {
13919
13766
  var _vm = this;
13920
-
13921
13767
  var _h = _vm.$createElement;
13922
-
13923
13768
  var _c = _vm._self._c || _h;
13924
-
13925
13769
  return _c('b-modal', {
13926
13770
  attrs: {
13927
13771
  "id": _vm.id,
@@ -14174,19 +14018,15 @@ var __vue_render__$2 = function __vue_render__() {
14174
14018
  }
14175
14019
  })], 1) : _vm._e()], 1)], 1)], 1);
14176
14020
  };
14177
-
14178
14021
  var __vue_staticRenderFns__$2 = [];
14179
- /* style */
14180
14022
 
14023
+ /* style */
14181
14024
  var __vue_inject_styles__$2 = undefined;
14182
14025
  /* scoped */
14183
-
14184
14026
  var __vue_scope_id__$2 = undefined;
14185
14027
  /* module identifier */
14186
-
14187
- var __vue_module_identifier__$2 = "data-v-4391e2c5";
14028
+ var __vue_module_identifier__$2 = "data-v-cc4d6922";
14188
14029
  /* functional template */
14189
-
14190
14030
  var __vue_is_functional_template__$2 = false;
14191
14031
  /* style inject */
14192
14032
 
@@ -14198,7 +14038,6 @@ var __vue_component__$3 = /*#__PURE__*/normalizeComponent({
14198
14038
  render: __vue_render__$2,
14199
14039
  staticRenderFns: __vue_staticRenderFns__$2
14200
14040
  }, __vue_inject_styles__$2, __vue_script__$2, __vue_scope_id__$2, __vue_is_functional_template__$2, __vue_module_identifier__$2, false, undefined, undefined, undefined);
14201
-
14202
14041
  var FieldRuleFormModal = __vue_component__$3;var script$1 = {
14203
14042
  name: 'DocTemplateFieldSidebar',
14204
14043
  components: {
@@ -14225,7 +14064,7 @@ var FieldRuleFormModal = __vue_component__$3;var script$1 = {
14225
14064
  rule: {},
14226
14065
  mode: 'ins'
14227
14066
  },
14228
- rulesHash: v4()
14067
+ rulesHash: UtRandom.getRandomString(10)
14229
14068
  };
14230
14069
  },
14231
14070
  computed: {
@@ -14257,7 +14096,6 @@ var FieldRuleFormModal = __vue_component__$3;var script$1 = {
14257
14096
  },
14258
14097
  value: function value() {
14259
14098
  this.field = this.value;
14260
-
14261
14099
  if (this.field && this.field.input) {
14262
14100
  this.currentInputName = this.field.input.name;
14263
14101
  }
@@ -14274,7 +14112,6 @@ var FieldRuleFormModal = __vue_component__$3;var script$1 = {
14274
14112
  },
14275
14113
  multiple: function multiple() {
14276
14114
  var input = UtFormConstructor.getDefaultInput(this.field);
14277
-
14278
14115
  if (this.field.multiple) {
14279
14116
  this.currentInputName = input.name;
14280
14117
  }
@@ -14309,7 +14146,6 @@ var FieldRuleFormModal = __vue_component__$3;var script$1 = {
14309
14146
  },
14310
14147
  addRule: function addRule() {
14311
14148
  var _this = this;
14312
-
14313
14149
  this.ruleModalCfg = {
14314
14150
  mode: 'ins',
14315
14151
  rule: {
@@ -14318,10 +14154,8 @@ var FieldRuleFormModal = __vue_component__$3;var script$1 = {
14318
14154
  },
14319
14155
  onAfterOk: function onAfterOk(rule) {
14320
14156
  _this.field.rules = _this.field.rules ? _this.field.rules : [];
14321
-
14322
14157
  _this.field.rules.push(_objectSpread2({}, rule));
14323
-
14324
- _this.rulesHash = v4();
14158
+ _this.rulesHash = UtRandom.getRandomString(10);
14325
14159
  }
14326
14160
  };
14327
14161
  this.$bvModal.show(this.modalId);
@@ -14330,7 +14164,6 @@ var FieldRuleFormModal = __vue_component__$3;var script$1 = {
14330
14164
  if (event.target.classList && event.target.classList.contains('rb-remove-rule')) {
14331
14165
  return;
14332
14166
  }
14333
-
14334
14167
  this.ruleModalCfg = {
14335
14168
  mode: 'upd',
14336
14169
  rule: _objectSpread2({}, rule),
@@ -14344,19 +14177,16 @@ var FieldRuleFormModal = __vue_component__$3;var script$1 = {
14344
14177
  var index = this.field.rules.findIndex(function (r) {
14345
14178
  return r.id === rule.id;
14346
14179
  });
14347
-
14348
14180
  if (index >= 0) {
14349
14181
  this.field.rules.splice(index, 1);
14350
14182
  }
14351
-
14352
- this.rulesHash = v4();
14183
+ this.rulesHash = UtRandom.getRandomString(10);
14353
14184
  }
14354
14185
  },
14355
14186
  created: function created() {
14356
14187
  if (this.value) {
14357
14188
  this.innerVisible = this.visible;
14358
14189
  this.field = this.value;
14359
-
14360
14190
  if (this.field && this.field.input) {
14361
14191
  this.currentInputName = this.field.input.name;
14362
14192
  }
@@ -14364,15 +14194,12 @@ var FieldRuleFormModal = __vue_component__$3;var script$1 = {
14364
14194
  }
14365
14195
  };/* script */
14366
14196
  var __vue_script__$1 = script$1;
14367
- /* template */
14368
14197
 
14198
+ /* template */
14369
14199
  var __vue_render__$1 = function __vue_render__() {
14370
14200
  var _vm = this;
14371
-
14372
14201
  var _h = _vm.$createElement;
14373
-
14374
14202
  var _c = _vm._self._c || _h;
14375
-
14376
14203
  return _c('b-sidebar', {
14377
14204
  staticClass: "rb-doc-template-field-sidebar",
14378
14205
  attrs: {
@@ -14610,19 +14437,15 @@ var __vue_render__$1 = function __vue_render__() {
14610
14437
  }
14611
14438
  })], 1);
14612
14439
  };
14613
-
14614
14440
  var __vue_staticRenderFns__$1 = [];
14615
- /* style */
14616
14441
 
14442
+ /* style */
14617
14443
  var __vue_inject_styles__$1 = undefined;
14618
14444
  /* scoped */
14619
-
14620
14445
  var __vue_scope_id__$1 = undefined;
14621
14446
  /* module identifier */
14622
-
14623
- var __vue_module_identifier__$1 = "data-v-d1baa99a";
14447
+ var __vue_module_identifier__$1 = "data-v-44fffe29";
14624
14448
  /* functional template */
14625
-
14626
14449
  var __vue_is_functional_template__$1 = false;
14627
14450
  /* style inject */
14628
14451
 
@@ -14634,7 +14457,6 @@ var __vue_component__$2 = /*#__PURE__*/normalizeComponent({
14634
14457
  render: __vue_render__$1,
14635
14458
  staticRenderFns: __vue_staticRenderFns__$1
14636
14459
  }, __vue_inject_styles__$1, __vue_script__$1, __vue_scope_id__$1, __vue_is_functional_template__$1, __vue_module_identifier__$1, false, undefined, undefined, undefined);
14637
-
14638
14460
  var DocTemplateFieldSidebar = __vue_component__$2;var script = {
14639
14461
  name: 'DocTemplateConstructor',
14640
14462
  components: {
@@ -14692,41 +14514,33 @@ var DocTemplateFieldSidebar = __vue_component__$2;var script = {
14692
14514
  if (event.target.classList && event.target.classList.contains('rb-remove-field')) {
14693
14515
  return;
14694
14516
  }
14695
-
14696
14517
  this.sidebarVisible = true;
14697
14518
  this.sidebarField = field;
14698
14519
  },
14699
14520
  addSection: function addSection(columnCount) {
14700
14521
  var _this = this;
14701
-
14702
14522
  var section = {
14703
14523
  labelRu: null,
14704
14524
  columnCount: columnCount
14705
14525
  };
14706
14526
  this.sectionModalCfg.mode = 'ins';
14707
14527
  this.sectionModalCfg.section = section;
14708
-
14709
14528
  this.sectionModalCfg.onAfterOk = function () {
14710
14529
  section.columns = [];
14711
-
14712
14530
  for (var i = 0; i < columnCount; i++) {
14713
14531
  section.columns.push({
14714
14532
  index: i,
14715
14533
  fields: []
14716
14534
  });
14717
14535
  }
14718
-
14719
14536
  _this.formConfig.sections.push(section);
14720
14537
  };
14721
-
14722
14538
  this.$bvModal.show(this.sectionModalCfg.id);
14723
14539
  },
14724
14540
  editSection: function editSection(section) {
14725
14541
  this.sectionModalCfg.mode = 'update';
14726
14542
  this.sectionModalCfg.section = section;
14727
-
14728
14543
  this.sectionModalCfg.onAfterOk = function () {};
14729
-
14730
14544
  this.$bvModal.show(this.sectionModalCfg.id);
14731
14545
  },
14732
14546
  removeSection: function removeSection(section, index) {
@@ -14753,13 +14567,11 @@ var DocTemplateFieldSidebar = __vue_component__$2;var script = {
14753
14567
  },
14754
14568
  removeFieldFromColumn: function removeFieldFromColumn(field, column, newIndex) {
14755
14569
  var index = newIndex != null ? newIndex : -1;
14756
-
14757
14570
  if (index < 0) {
14758
14571
  index = column.fields.findIndex(function (f) {
14759
14572
  return field.name === f.name;
14760
14573
  });
14761
14574
  }
14762
-
14763
14575
  if (index >= 0) {
14764
14576
  column.fields.splice(index, 1);
14765
14577
  }
@@ -14774,13 +14586,10 @@ var DocTemplateFieldSidebar = __vue_component__$2;var script = {
14774
14586
  onFieldMoveEnd: function onFieldMoveEnd(event) {
14775
14587
  var newIndex = event.newIndex;
14776
14588
  var field = event.item._underlying_vm_;
14777
-
14778
14589
  if (!field.hasOwnProperty('defaultValue')) {
14779
14590
  this.$set(field, 'defaultValue', undefined);
14780
14591
  }
14781
-
14782
14592
  var found = this.multipleFieldAreOnFormConfig(field);
14783
-
14784
14593
  if (found) {
14785
14594
  this.removeFieldFromColumn(field, this.columnTo, newIndex);
14786
14595
  this.resetDragVariables();
@@ -14794,7 +14603,6 @@ var DocTemplateFieldSidebar = __vue_component__$2;var script = {
14794
14603
  noCloseOnEsc: true
14795
14604
  });
14796
14605
  }
14797
-
14798
14606
  this.resetDragVariables();
14799
14607
  this.hash = (Math.random() + 1).toString(36).substring(7);
14800
14608
  },
@@ -14810,15 +14618,12 @@ var DocTemplateFieldSidebar = __vue_component__$2;var script = {
14810
14618
  }
14811
14619
  };/* script */
14812
14620
  var __vue_script__ = script;
14813
- /* template */
14814
14621
 
14622
+ /* template */
14815
14623
  var __vue_render__ = function __vue_render__() {
14816
14624
  var _vm = this;
14817
-
14818
14625
  var _h = _vm.$createElement;
14819
-
14820
14626
  var _c = _vm._self._c || _h;
14821
-
14822
14627
  return _c('div', {
14823
14628
  staticClass: "rb-doc-template-constructor d-flex"
14824
14629
  }, [_c('doc-template-facet-list', {
@@ -15035,19 +14840,15 @@ var __vue_render__ = function __vue_render__() {
15035
14840
  }
15036
14841
  })], 2)], 2);
15037
14842
  };
15038
-
15039
14843
  var __vue_staticRenderFns__ = [];
15040
- /* style */
15041
14844
 
14845
+ /* style */
15042
14846
  var __vue_inject_styles__ = undefined;
15043
14847
  /* scoped */
15044
-
15045
14848
  var __vue_scope_id__ = undefined;
15046
14849
  /* module identifier */
15047
-
15048
14850
  var __vue_module_identifier__ = "data-v-1d0e94ea";
15049
14851
  /* functional template */
15050
-
15051
14852
  var __vue_is_functional_template__ = false;
15052
14853
  /* style inject */
15053
14854
 
@@ -15059,24 +14860,21 @@ var __vue_component__ = /*#__PURE__*/normalizeComponent({
15059
14860
  render: __vue_render__,
15060
14861
  staticRenderFns: __vue_staticRenderFns__
15061
14862
  }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
15062
-
15063
- var __vue_component__$1 = __vue_component__;/* eslint-disable import/prefer-default-export */var components$1=/*#__PURE__*/Object.freeze({__proto__:null,UtFormConfig:UtFormConfig,UtFormConstructor:UtFormConstructor,i18n:i18n,DocTemplateSectionModal:DocTemplateSectionModal,DocTemplateFacetList:DocTemplateFacetList,DocTemplateFieldSidebar:DocTemplateFieldSidebar,DocTemplateConstructor:__vue_component__$1,FieldRuleFormModal:FieldRuleFormModal,DocForm:DocForm});var install = function installRbDocumentFormConstructor(Vue) {
14863
+ var __vue_component__$1 = __vue_component__;/* eslint-disable import/prefer-default-export */var components$1=/*#__PURE__*/Object.freeze({__proto__:null,UtFormConfig:UtFormConfig,UtFormConstructor:UtFormConstructor,i18n:i18n,DocTemplateSectionModal:DocTemplateSectionModal,DocTemplateFacetList:DocTemplateFacetList,DocTemplateFieldSidebar:DocTemplateFieldSidebar,DocTemplateConstructor:__vue_component__$1,FieldRuleFormModal:FieldRuleFormModal,DocForm:DocForm});// install function executed by Vue.use()
14864
+ var install = function installRbDocumentFormConstructor(Vue) {
15064
14865
  Object.entries(components$1).forEach(function (_ref) {
15065
14866
  var _ref2 = _slicedToArray(_ref, 2),
15066
- componentName = _ref2[0],
15067
- component = _ref2[1];
15068
-
14867
+ componentName = _ref2[0],
14868
+ component = _ref2[1];
15069
14869
  Vue.component(componentName, component);
15070
14870
  });
15071
- }; // Create module definition for Vue.use()
15072
- var components=/*#__PURE__*/Object.freeze({__proto__:null,'default':install,UtFormConfig:UtFormConfig,UtFormConstructor:UtFormConstructor,i18n:i18n,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
14871
+ };var components=/*#__PURE__*/Object.freeze({__proto__:null,'default':install,UtFormConfig:UtFormConfig,UtFormConstructor:UtFormConstructor,i18n:i18n,DocTemplateSectionModal:DocTemplateSectionModal,DocTemplateFacetList:DocTemplateFacetList,DocTemplateFieldSidebar:DocTemplateFieldSidebar,DocTemplateConstructor:__vue_component__$1,FieldRuleFormModal:FieldRuleFormModal,DocForm:DocForm});// Attach named exports directly to plugin. IIFE/CJS will
14872
+ // only expose one global var, with component exports exposed as properties of
15073
14873
  // that global var (eg. plugin.component)
15074
-
15075
14874
  Object.entries(components).forEach(function (_ref) {
15076
14875
  var _ref2 = _slicedToArray(_ref, 2),
15077
- componentName = _ref2[0],
15078
- component = _ref2[1];
15079
-
14876
+ componentName = _ref2[0],
14877
+ component = _ref2[1];
15080
14878
  if (componentName !== 'default') {
15081
14879
  install[componentName] = component;
15082
14880
  }