rb-document-form-constructor 0.8.72 → 0.8.75

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,4 +1,4 @@
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) {
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 _iterableToArrayLimit(arr, i) {
2
2
  var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
3
3
  if (null != _i) {
4
4
  var _s,
@@ -13216,7 +13216,173 @@ var __vue_component__$5 = /*#__PURE__*/normalizeComponent({
13216
13216
  render: __vue_render__$4,
13217
13217
  staticRenderFns: __vue_staticRenderFns__$4
13218
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);
13219
- var DocTemplateFacetList = __vue_component__$5;var toString = Object.prototype.toString;
13219
+ var DocTemplateFacetList = __vue_component__$5;// Unique ID creation requires a high quality random # generator. In node.js
13220
+ // this is pretty straight-forward - we use the crypto API.
13221
+
13222
+
13223
+
13224
+ var rng = function nodeRNG() {
13225
+ return crypto__default["default"].randomBytes(16);
13226
+ };/**
13227
+ * Convert array of 16 byte values to UUID string format of the form:
13228
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
13229
+ */
13230
+ var byteToHex = [];
13231
+ for (var i = 0; i < 256; ++i) {
13232
+ byteToHex[i] = (i + 0x100).toString(16).substr(1);
13233
+ }
13234
+
13235
+ function bytesToUuid(buf, offset) {
13236
+ var i = offset || 0;
13237
+ var bth = byteToHex;
13238
+ // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
13239
+ return ([
13240
+ bth[buf[i++]], bth[buf[i++]],
13241
+ bth[buf[i++]], bth[buf[i++]], '-',
13242
+ bth[buf[i++]], bth[buf[i++]], '-',
13243
+ bth[buf[i++]], bth[buf[i++]], '-',
13244
+ bth[buf[i++]], bth[buf[i++]], '-',
13245
+ bth[buf[i++]], bth[buf[i++]],
13246
+ bth[buf[i++]], bth[buf[i++]],
13247
+ bth[buf[i++]], bth[buf[i++]]
13248
+ ]).join('');
13249
+ }
13250
+
13251
+ var bytesToUuid_1 = bytesToUuid;// **`v1()` - Generate time-based UUID**
13252
+ //
13253
+ // Inspired by https://github.com/LiosK/UUID.js
13254
+ // and http://docs.python.org/library/uuid.html
13255
+
13256
+ var _nodeId;
13257
+ var _clockseq;
13258
+
13259
+ // Previous uuid creation time
13260
+ var _lastMSecs = 0;
13261
+ var _lastNSecs = 0;
13262
+
13263
+ // See https://github.com/uuidjs/uuid for API details
13264
+ function v1(options, buf, offset) {
13265
+ var i = buf && offset || 0;
13266
+ var b = buf || [];
13267
+
13268
+ options = options || {};
13269
+ var node = options.node || _nodeId;
13270
+ var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
13271
+
13272
+ // node and clockseq need to be initialized to random values if they're not
13273
+ // specified. We do this lazily to minimize issues related to insufficient
13274
+ // system entropy. See #189
13275
+ if (node == null || clockseq == null) {
13276
+ var seedBytes = rng();
13277
+ if (node == null) {
13278
+ // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
13279
+ node = _nodeId = [
13280
+ seedBytes[0] | 0x01,
13281
+ seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]
13282
+ ];
13283
+ }
13284
+ if (clockseq == null) {
13285
+ // Per 4.2.2, randomize (14 bit) clockseq
13286
+ clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
13287
+ }
13288
+ }
13289
+
13290
+ // UUID timestamps are 100 nano-second units since the Gregorian epoch,
13291
+ // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
13292
+ // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
13293
+ // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
13294
+ var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();
13295
+
13296
+ // Per 4.2.1.2, use count of uuid's generated during the current clock
13297
+ // cycle to simulate higher resolution clock
13298
+ var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
13299
+
13300
+ // Time since last uuid creation (in msecs)
13301
+ var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
13302
+
13303
+ // Per 4.2.1.2, Bump clockseq on clock regression
13304
+ if (dt < 0 && options.clockseq === undefined) {
13305
+ clockseq = clockseq + 1 & 0x3fff;
13306
+ }
13307
+
13308
+ // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
13309
+ // time interval
13310
+ if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
13311
+ nsecs = 0;
13312
+ }
13313
+
13314
+ // Per 4.2.1.2 Throw error if too many uuids are requested
13315
+ if (nsecs >= 10000) {
13316
+ throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
13317
+ }
13318
+
13319
+ _lastMSecs = msecs;
13320
+ _lastNSecs = nsecs;
13321
+ _clockseq = clockseq;
13322
+
13323
+ // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
13324
+ msecs += 12219292800000;
13325
+
13326
+ // `time_low`
13327
+ var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
13328
+ b[i++] = tl >>> 24 & 0xff;
13329
+ b[i++] = tl >>> 16 & 0xff;
13330
+ b[i++] = tl >>> 8 & 0xff;
13331
+ b[i++] = tl & 0xff;
13332
+
13333
+ // `time_mid`
13334
+ var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
13335
+ b[i++] = tmh >>> 8 & 0xff;
13336
+ b[i++] = tmh & 0xff;
13337
+
13338
+ // `time_high_and_version`
13339
+ b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
13340
+ b[i++] = tmh >>> 16 & 0xff;
13341
+
13342
+ // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
13343
+ b[i++] = clockseq >>> 8 | 0x80;
13344
+
13345
+ // `clock_seq_low`
13346
+ b[i++] = clockseq & 0xff;
13347
+
13348
+ // `node`
13349
+ for (var n = 0; n < 6; ++n) {
13350
+ b[i + n] = node[n];
13351
+ }
13352
+
13353
+ return buf ? buf : bytesToUuid_1(b);
13354
+ }
13355
+
13356
+ var v1_1 = v1;function v4(options, buf, offset) {
13357
+ var i = buf && offset || 0;
13358
+
13359
+ if (typeof(options) == 'string') {
13360
+ buf = options === 'binary' ? new Array(16) : null;
13361
+ options = null;
13362
+ }
13363
+ options = options || {};
13364
+
13365
+ var rnds = options.random || (options.rng || rng)();
13366
+
13367
+ // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
13368
+ rnds[6] = (rnds[6] & 0x0f) | 0x40;
13369
+ rnds[8] = (rnds[8] & 0x3f) | 0x80;
13370
+
13371
+ // Copy bytes to buffer, if provided
13372
+ if (buf) {
13373
+ for (var ii = 0; ii < 16; ++ii) {
13374
+ buf[i + ii] = rnds[ii];
13375
+ }
13376
+ }
13377
+
13378
+ return buf || bytesToUuid_1(rnds);
13379
+ }
13380
+
13381
+ var v4_1 = v4;var uuid = v4_1;
13382
+ uuid.v1 = v1_1;
13383
+ uuid.v4 = v4_1;
13384
+
13385
+ var uuid_1 = uuid;var toString = Object.prototype.toString;
13220
13386
 
13221
13387
  var _typeof = function(object) {
13222
13388
  var type = typeof object;
@@ -13597,20 +13763,7 @@ var __vue_component__$4 = /*#__PURE__*/normalizeComponent({
13597
13763
  render: __vue_render__$3,
13598
13764
  staticRenderFns: __vue_staticRenderFns__$3
13599
13765
  }, __vue_inject_styles__$3, __vue_script__$3, __vue_scope_id__$3, __vue_is_functional_template__$3, __vue_module_identifier__$3, false, undefined, undefined, undefined);
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
- };//
13766
+ var DocForm = __vue_component__$4;//
13614
13767
  var script$2 = {
13615
13768
  name: 'FieldRuleFormModal',
13616
13769
  components: {
@@ -13703,7 +13856,7 @@ var script$2 = {
13703
13856
  },
13704
13857
  getDefaultRule: function getDefaultRule() {
13705
13858
  return {
13706
- id: UtRandom.getRandomString(10),
13859
+ id: uuid_1.v4(),
13707
13860
  name: null,
13708
13861
  event: null,
13709
13862
  script: null
@@ -14025,7 +14178,7 @@ var __vue_inject_styles__$2 = undefined;
14025
14178
  /* scoped */
14026
14179
  var __vue_scope_id__$2 = undefined;
14027
14180
  /* module identifier */
14028
- var __vue_module_identifier__$2 = "data-v-cc4d6922";
14181
+ var __vue_module_identifier__$2 = "data-v-4391e2c5";
14029
14182
  /* functional template */
14030
14183
  var __vue_is_functional_template__$2 = false;
14031
14184
  /* style inject */
@@ -14064,7 +14217,7 @@ var FieldRuleFormModal = __vue_component__$3;var script$1 = {
14064
14217
  rule: {},
14065
14218
  mode: 'ins'
14066
14219
  },
14067
- rulesHash: UtRandom.getRandomString(10)
14220
+ rulesHash: uuid_1.v4()
14068
14221
  };
14069
14222
  },
14070
14223
  computed: {
@@ -14155,7 +14308,7 @@ var FieldRuleFormModal = __vue_component__$3;var script$1 = {
14155
14308
  onAfterOk: function onAfterOk(rule) {
14156
14309
  _this.field.rules = _this.field.rules ? _this.field.rules : [];
14157
14310
  _this.field.rules.push(_objectSpread2({}, rule));
14158
- _this.rulesHash = UtRandom.getRandomString(10);
14311
+ _this.rulesHash = uuid_1.v4();
14159
14312
  }
14160
14313
  };
14161
14314
  this.$bvModal.show(this.modalId);
@@ -14180,7 +14333,7 @@ var FieldRuleFormModal = __vue_component__$3;var script$1 = {
14180
14333
  if (index >= 0) {
14181
14334
  this.field.rules.splice(index, 1);
14182
14335
  }
14183
- this.rulesHash = UtRandom.getRandomString(10);
14336
+ this.rulesHash = uuid_1.v4();
14184
14337
  }
14185
14338
  },
14186
14339
  created: function created() {
@@ -14444,7 +14597,7 @@ var __vue_inject_styles__$1 = undefined;
14444
14597
  /* scoped */
14445
14598
  var __vue_scope_id__$1 = undefined;
14446
14599
  /* module identifier */
14447
- var __vue_module_identifier__$1 = "data-v-44fffe29";
14600
+ var __vue_module_identifier__$1 = "data-v-d1baa99a";
14448
14601
  /* functional template */
14449
14602
  var __vue_is_functional_template__$1 = false;
14450
14603
  /* style inject */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rb-document-form-constructor",
3
- "version": "0.8.72",
3
+ "version": "0.8.75",
4
4
  "description": "",
5
5
  "main": "dist/rb-document-form-constructor.ssr.js",
6
6
  "browser": "dist/rb-document-form-constructor.esm.js",
@@ -22,9 +22,13 @@
22
22
  "dependencies": {
23
23
  "bootstrap": "^4.5.0",
24
24
  "bootstrap-vue": "^2.15.0",
25
+ "debounce": "^1.2.1",
26
+ "jquery": "^3.6.0",
25
27
  "notevil": "^1.3.3",
26
- "rb-bv-components": "^2.5.51",
28
+ "sass": "^1.32.0",
29
+ "sass-loader": "^10.1.0",
27
30
  "typeof": "^1.0.0",
31
+ "uuid": "^8.3.2",
28
32
  "vuedraggable": "^2.24.3"
29
33
  },
30
34
  "devDependencies": {
@@ -40,6 +44,7 @@
40
44
  "@vue/cli-service": "^4.5.13",
41
45
  "cross-env": "^7.0.3",
42
46
  "minimist": "^1.2.5",
47
+ "rb-bv-components": "^2.5.26",
43
48
  "rimraf": "^3.0.2",
44
49
  "rollup": "^2.52.8",
45
50
  "rollup-plugin-copy-assets": "^2.0.3",
@@ -48,8 +53,6 @@
48
53
  "rollup-plugin-visualizer": "^5.9.2",
49
54
  "rollup-plugin-vue": "^5.1.9",
50
55
  "rubles": "^0.2.0",
51
- "sass": "^1.32.0",
52
- "sass-loader": "^10.1.0",
53
56
  "vue": "^2.6.14",
54
57
  "vue-i18n": "^8.28.2",
55
58
  "vue-template-compiler": "^2.6.14"
@@ -133,8 +133,8 @@
133
133
 
134
134
  <script>
135
135
  import FieldRuleFormModal from "./FieldRuleFormModal";
136
+ import {v4 as uuidv4} from 'uuid';
136
137
  import {UtFormConstructor} from "../utils/UtFormConstructor";
137
- import {UtRandom} from "@/utils/UtRandom.js";
138
138
 
139
139
  export default {
140
140
  name: 'DocTemplateFieldSidebar',
@@ -160,7 +160,7 @@
160
160
  rule: {},
161
161
  mode: 'ins',
162
162
  },
163
- rulesHash: UtRandom.getRandomString(10),
163
+ rulesHash: uuidv4(),
164
164
  }
165
165
  },
166
166
  computed: {
@@ -252,7 +252,7 @@
252
252
  this.field.rules.push({
253
253
  ...rule
254
254
  });
255
- this.rulesHash = UtRandom.getRandomString(10);
255
+ this.rulesHash = uuidv4();
256
256
  }
257
257
  }
258
258
  this.$bvModal.show(this.modalId);
@@ -277,7 +277,7 @@
277
277
  if (index >= 0) {
278
278
  this.field.rules.splice(index, 1);
279
279
  }
280
- this.rulesHash = UtRandom.getRandomString(10);
280
+ this.rulesHash = uuidv4();
281
281
  }
282
282
  },
283
283
  created() {
@@ -135,9 +135,9 @@
135
135
 
136
136
  <script>
137
137
  import {UtFormConfig} from "../utils/UtFormConfig";
138
+ import {v4 as uuidv4} from 'uuid';
138
139
  import {UtFormConstructor} from "../utils/UtFormConstructor";
139
140
  import DocForm from "./DocForm";
140
- import {UtRandom} from "@/utils/UtRandom.js";
141
141
 
142
142
  export default {
143
143
  name: 'FieldRuleFormModal',
@@ -230,7 +230,7 @@ export default {
230
230
  },
231
231
  getDefaultRule() {
232
232
  return {
233
- id: UtRandom.getRandomString(10),
233
+ id: uuidv4(),
234
234
  name: null,
235
235
  event: null,
236
236
  script: null,