@formio/js 5.1.0-dev.6102.8eddaab → 5.1.0-dev.6104.98e707b

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.
Files changed (135) hide show
  1. package/dist/formio.form.js +117 -84
  2. package/dist/formio.form.min.js +1 -1
  3. package/dist/formio.full.js +123 -90
  4. package/dist/formio.full.min.js +1 -1
  5. package/dist/formio.js +44 -33
  6. package/dist/formio.min.js +1 -1
  7. package/dist/formio.utils.js +66 -44
  8. package/dist/formio.utils.min.js +1 -1
  9. package/lib/cjs/Element.js +36 -13
  10. package/lib/cjs/EventEmitter.js +25 -2
  11. package/lib/cjs/Form.js +25 -2
  12. package/lib/cjs/PDF.js +1 -1
  13. package/lib/cjs/PDFBuilder.js +5 -4
  14. package/lib/cjs/Webform.js +4 -3
  15. package/lib/cjs/WebformBuilder.js +10 -9
  16. package/lib/cjs/Wizard.js +1 -1
  17. package/lib/cjs/WizardBuilder.js +1 -1
  18. package/lib/cjs/components/_classes/component/Component.d.ts +1 -0
  19. package/lib/cjs/components/_classes/component/Component.js +53 -29
  20. package/lib/cjs/components/_classes/component/editForm/Component.edit.conditional.js +1 -1
  21. package/lib/cjs/components/_classes/component/editForm/Component.edit.logic.js +1 -1
  22. package/lib/cjs/components/_classes/componentModal/ComponentModal.js +1 -1
  23. package/lib/cjs/components/_classes/input/Input.js +1 -1
  24. package/lib/cjs/components/_classes/list/ListComponent.js +1 -1
  25. package/lib/cjs/components/_classes/nested/NestedComponent.js +6 -6
  26. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +1 -1
  27. package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.js +1 -1
  28. package/lib/cjs/components/address/Address.js +1 -1
  29. package/lib/cjs/components/alert/Alert.js +1 -1
  30. package/lib/cjs/components/button/Button.d.ts +2 -2
  31. package/lib/cjs/components/button/Button.js +10 -14
  32. package/lib/cjs/components/checkbox/Checkbox.js +1 -1
  33. package/lib/cjs/components/container/Container.js +1 -1
  34. package/lib/cjs/components/currency/Currency.js +1 -1
  35. package/lib/cjs/components/datagrid/DataGrid.js +1 -1
  36. package/lib/cjs/components/datamap/DataMap.d.ts +1 -1
  37. package/lib/cjs/components/datamap/DataMap.js +4 -4
  38. package/lib/cjs/components/datetime/DateTime.js +1 -1
  39. package/lib/cjs/components/day/Day.js +1 -1
  40. package/lib/cjs/components/editgrid/EditGrid.js +1 -1
  41. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.display.js +1 -1
  42. package/lib/cjs/components/file/File.js +5 -6
  43. package/lib/cjs/components/form/Form.js +1 -1
  44. package/lib/cjs/components/number/Number.js +1 -1
  45. package/lib/cjs/components/panel/Panel.js +1 -1
  46. package/lib/cjs/components/radio/Radio.d.ts +8 -0
  47. package/lib/cjs/components/radio/Radio.js +16 -6
  48. package/lib/cjs/components/recaptcha/editForm/ReCaptcha.edit.display.js +1 -1
  49. package/lib/cjs/components/select/Select.js +1 -1
  50. package/lib/cjs/components/select/editForm/Select.edit.data.js +1 -1
  51. package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +6 -0
  52. package/lib/cjs/components/selectboxes/SelectBoxes.js +1 -1
  53. package/lib/cjs/components/signature/Signature.js +1 -1
  54. package/lib/cjs/components/survey/Survey.js +1 -1
  55. package/lib/cjs/components/tags/Tags.js +1 -1
  56. package/lib/cjs/components/textarea/TextArea.js +3 -3
  57. package/lib/cjs/components/textfield/TextField.js +30 -7
  58. package/lib/cjs/components/time/Time.js +1 -1
  59. package/lib/cjs/formio.form.js +3 -3
  60. package/lib/cjs/i18n.js +1 -1
  61. package/lib/cjs/providers/storage/uploadAdapter.js +3 -3
  62. package/lib/cjs/utils/Evaluator.d.ts +6 -13
  63. package/lib/cjs/utils/Evaluator.js +15 -27
  64. package/lib/cjs/utils/builder.js +5 -5
  65. package/lib/cjs/utils/conditionOperators/IsEqualTo.js +3 -3
  66. package/lib/cjs/utils/i18n.js +3 -3
  67. package/lib/cjs/utils/index.d.ts +2 -160
  68. package/lib/cjs/utils/index.js +2 -12
  69. package/lib/cjs/utils/utils.d.ts +5 -0
  70. package/lib/cjs/utils/utils.js +42 -4
  71. package/lib/cjs/widgets/CalendarWidget.js +1 -1
  72. package/lib/mjs/Element.js +6 -6
  73. package/lib/mjs/EventEmitter.js +2 -2
  74. package/lib/mjs/Form.js +1 -1
  75. package/lib/mjs/PDF.js +1 -1
  76. package/lib/mjs/PDFBuilder.js +2 -1
  77. package/lib/mjs/Webform.js +2 -1
  78. package/lib/mjs/WebformBuilder.js +2 -1
  79. package/lib/mjs/Wizard.js +1 -1
  80. package/lib/mjs/WizardBuilder.js +1 -1
  81. package/lib/mjs/components/_classes/component/Component.d.ts +1 -0
  82. package/lib/mjs/components/_classes/component/Component.js +3 -2
  83. package/lib/mjs/components/_classes/component/editForm/Component.edit.conditional.js +1 -1
  84. package/lib/mjs/components/_classes/component/editForm/Component.edit.logic.js +1 -1
  85. package/lib/mjs/components/_classes/componentModal/ComponentModal.js +1 -1
  86. package/lib/mjs/components/_classes/input/Input.js +1 -1
  87. package/lib/mjs/components/_classes/list/ListComponent.js +1 -1
  88. package/lib/mjs/components/_classes/nested/NestedComponent.js +6 -6
  89. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +1 -1
  90. package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.js +1 -1
  91. package/lib/mjs/components/address/Address.js +1 -1
  92. package/lib/mjs/components/alert/Alert.js +1 -1
  93. package/lib/mjs/components/button/Button.d.ts +2 -2
  94. package/lib/mjs/components/button/Button.js +7 -10
  95. package/lib/mjs/components/checkbox/Checkbox.js +1 -1
  96. package/lib/mjs/components/container/Container.js +1 -1
  97. package/lib/mjs/components/currency/Currency.js +1 -1
  98. package/lib/mjs/components/datagrid/DataGrid.js +1 -1
  99. package/lib/mjs/components/datamap/DataMap.d.ts +1 -1
  100. package/lib/mjs/components/datamap/DataMap.js +1 -1
  101. package/lib/mjs/components/datetime/DateTime.js +1 -1
  102. package/lib/mjs/components/day/Day.js +1 -1
  103. package/lib/mjs/components/editgrid/EditGrid.js +1 -1
  104. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.display.js +1 -1
  105. package/lib/mjs/components/file/File.js +5 -6
  106. package/lib/mjs/components/form/Form.js +1 -1
  107. package/lib/mjs/components/number/Number.js +1 -1
  108. package/lib/mjs/components/panel/Panel.js +1 -1
  109. package/lib/mjs/components/radio/Radio.d.ts +8 -0
  110. package/lib/mjs/components/radio/Radio.js +16 -6
  111. package/lib/mjs/components/recaptcha/editForm/ReCaptcha.edit.display.js +1 -1
  112. package/lib/mjs/components/select/Select.js +1 -1
  113. package/lib/mjs/components/select/editForm/Select.edit.data.js +1 -1
  114. package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +6 -0
  115. package/lib/mjs/components/selectboxes/SelectBoxes.js +1 -1
  116. package/lib/mjs/components/signature/Signature.js +1 -1
  117. package/lib/mjs/components/survey/Survey.js +1 -1
  118. package/lib/mjs/components/tags/Tags.js +1 -1
  119. package/lib/mjs/components/textarea/TextArea.js +3 -3
  120. package/lib/mjs/components/textfield/TextField.js +1 -1
  121. package/lib/mjs/components/time/Time.js +1 -1
  122. package/lib/mjs/formio.form.js +2 -2
  123. package/lib/mjs/i18n.js +1 -1
  124. package/lib/mjs/providers/storage/uploadAdapter.js +3 -3
  125. package/lib/mjs/utils/Evaluator.d.ts +6 -13
  126. package/lib/mjs/utils/Evaluator.js +13 -21
  127. package/lib/mjs/utils/builder.js +1 -1
  128. package/lib/mjs/utils/conditionOperators/IsEqualTo.js +1 -1
  129. package/lib/mjs/utils/i18n.js +1 -1
  130. package/lib/mjs/utils/index.d.ts +2 -160
  131. package/lib/mjs/utils/index.js +1 -11
  132. package/lib/mjs/utils/utils.d.ts +5 -0
  133. package/lib/mjs/utils/utils.js +23 -1
  134. package/lib/mjs/widgets/CalendarWidget.js +1 -1
  135. package/package.json +2 -2
@@ -1,15 +1,38 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
27
  };
5
28
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const lodash_1 = __importDefault(require("lodash"));
7
- const moment_1 = __importDefault(require("moment"));
8
- const vanilla_text_mask_1 = __importDefault(require("@formio/vanilla-text-mask"));
9
29
  const EventEmitter_1 = __importDefault(require("./EventEmitter"));
10
30
  const Formio_1 = require("./Formio");
31
+ const FormioUtils = __importStar(require("./utils/utils"));
11
32
  const i18n_1 = require("./utils/i18n");
12
- const utils_1 = __importDefault(require("./utils"));
33
+ const lodash_1 = __importDefault(require("lodash"));
34
+ const moment_1 = __importDefault(require("moment"));
35
+ const vanilla_text_mask_1 = __importDefault(require("@formio/vanilla-text-mask"));
13
36
  /**
14
37
  * The root component for all elements within the Form.io renderer.
15
38
  */
@@ -33,7 +56,7 @@ class Element {
33
56
  * can also be provided from the component.id value passed into the constructor.
34
57
  * @type {string}
35
58
  */
36
- this.id = utils_1.default.getRandomComponentId();
59
+ this.id = FormioUtils.getRandomComponentId();
37
60
  /**
38
61
  * An array of event handlers so that the destry command can deregister them.
39
62
  * @type {Array}
@@ -362,7 +385,7 @@ class Element {
362
385
  */
363
386
  setInputMask(input, inputMask, usePlaceholder) {
364
387
  if (input && inputMask) {
365
- const mask = utils_1.default.getInputMask(inputMask, this.placeholderChar);
388
+ const mask = FormioUtils.getInputMask(inputMask, this.placeholderChar);
366
389
  this.defaultMask = mask;
367
390
  try {
368
391
  //destroy previous mask
@@ -499,8 +522,8 @@ class Element {
499
522
  var _a;
500
523
  return Object.assign({
501
524
  _: lodash_1.default,
502
- utils: utils_1.default,
503
- util: utils_1.default,
525
+ utils: FormioUtils,
526
+ util: FormioUtils,
504
527
  user: Formio_1.Formio.getUser(),
505
528
  moment: moment_1.default,
506
529
  instance: this,
@@ -525,15 +548,15 @@ class Element {
525
548
  */
526
549
  interpolate(string, data, options = {}) {
527
550
  if (typeof string !== 'function' && (this.component.content || this.component.html)
528
- && !utils_1.default.Evaluator.templateSettings.interpolate.test(string)) {
529
- string = utils_1.default.translateHTMLTemplate(String(string), (value) => this.t(value));
551
+ && !FormioUtils.Evaluator.templateSettings.interpolate.test(string)) {
552
+ string = FormioUtils.translateHTMLTemplate(String(string), (value) => this.t(value));
530
553
  }
531
554
  if (this.component.filter === string && !this.options.building) {
532
555
  const evalContext = this.evalContext(data);
533
556
  evalContext.data = lodash_1.default.mapValues(evalContext.data, (val) => lodash_1.default.isString(val) ? encodeURIComponent(val) : val);
534
- return utils_1.default.Evaluator.interpolate(string, evalContext, options);
557
+ return FormioUtils.interpolate(string, evalContext, options);
535
558
  }
536
- return utils_1.default.Evaluator.interpolate(string, this.evalContext(data), options);
559
+ return FormioUtils.interpolate(string, this.evalContext(data), options);
537
560
  }
538
561
  /**
539
562
  * Performs an evaluation using the evaluation context of this component.
@@ -545,7 +568,7 @@ class Element {
545
568
  * @returns {*} - The result of the evaluation.
546
569
  */
547
570
  evaluate(func, args, ret, interpolate, options = {}) {
548
- return utils_1.default.evaluate(func, this.evalContext(args), ret, interpolate, options);
571
+ return FormioUtils.evaluate(func, this.evalContext(args), ret, interpolate, options);
549
572
  }
550
573
  /**
551
574
  * Allow for options to hook into the functionality of this renderer.
@@ -1,7 +1,30 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  Object.defineProperty(exports, "__esModule", { value: true });
3
26
  const eventemitter3_1 = require("eventemitter3");
4
- const utils_1 = require("./utils");
27
+ const utils = __importStar(require("./utils/utils"));
5
28
  class EventEmitter extends eventemitter3_1.EventEmitter {
6
29
  constructor(conf = {}) {
7
30
  const { loadLimit = 1000, eventsSafeInterval = 300 } = conf;
@@ -15,7 +38,7 @@ class EventEmitter extends eventemitter3_1.EventEmitter {
15
38
  const overloadHandler = () => {
16
39
  console.warn(`There were more than ${loadLimit} events emitted in ${eventsSafeInterval} ms. It might be caused by events' infinite loop`, this.id);
17
40
  };
18
- const dispatch = (0, utils_1.observeOverload)(overloadHandler, {
41
+ const dispatch = utils.observeOverload(overloadHandler, {
19
42
  limit: loadLimit,
20
43
  delay: eventsSafeInterval
21
44
  });
package/lib/cjs/Form.js CHANGED
@@ -1,4 +1,27 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
27
  };
@@ -7,7 +30,7 @@ const Element_1 = __importDefault(require("./Element"));
7
30
  const Formio_1 = require("./Formio");
8
31
  const displays_1 = __importDefault(require("./displays"));
9
32
  const templates_1 = __importDefault(require("./templates"));
10
- const utils_1 = __importDefault(require("./utils"));
33
+ const FormioUtils = __importStar(require("./utils/utils"));
11
34
  class Form extends Element_1.default {
12
35
  constructor(elementOrForm, formOrOptions, options = {}) {
13
36
  let element, form, formOptions;
@@ -301,7 +324,7 @@ class Form extends Element_1.default {
301
324
  if (this.options.sanitize === false && !forceSanitize) {
302
325
  return dirty;
303
326
  }
304
- return utils_1.default.sanitize(dirty, this.options);
327
+ return FormioUtils.sanitize(dirty, this.options);
305
328
  }
306
329
  setContent(element, content, forceSanitize) {
307
330
  if (element instanceof HTMLElement) {
package/lib/cjs/PDF.js CHANGED
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const Formio_1 = require("./Formio");
7
7
  const Webform_1 = __importDefault(require("./Webform"));
8
- const utils_1 = require("./utils");
8
+ const utils_1 = require("./utils/utils");
9
9
  class PDF extends Webform_1.default {
10
10
  constructor(element, options) {
11
11
  options.display = 'pdf';
@@ -6,7 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const lodash_1 = __importDefault(require("lodash"));
7
7
  const Formio_1 = require("./Formio");
8
8
  const WebformBuilder_1 = __importDefault(require("./WebformBuilder"));
9
- const utils_1 = require("./utils");
9
+ const utils_1 = require("./utils/utils");
10
+ const formUtils_1 = require("./utils/formUtils");
10
11
  const builder_1 = __importDefault(require("./utils/builder"));
11
12
  const PDF_1 = __importDefault(require("./PDF"));
12
13
  class PDFBuilder extends WebformBuilder_1.default {
@@ -271,7 +272,7 @@ class PDFBuilder extends WebformBuilder_1.default {
271
272
  getParentContainer(component) {
272
273
  let container = [];
273
274
  let originalComponent = null;
274
- (0, utils_1.eachComponent)(this.webform._form.components, (comp, path, components) => {
275
+ (0, formUtils_1.eachComponent)(this.webform._form.components, (comp, path, components) => {
275
276
  if (comp.id === component.component.id) {
276
277
  container = components;
277
278
  originalComponent = comp;
@@ -454,7 +455,7 @@ class PDFBuilder extends WebformBuilder_1.default {
454
455
  const repeatablePaths = this.findRepeatablePaths();
455
456
  // update elements which path was duplicated if any pathes have been changed
456
457
  if (!lodash_1.default.isEqual(this.repeatablePaths, repeatablePaths)) {
457
- (0, utils_1.eachComponent)(this.webform.getComponents(), (comp, path) => {
458
+ (0, formUtils_1.eachComponent)(this.webform.getComponents(), (comp, path) => {
458
459
  if (this.repeatablePaths.includes(path)) {
459
460
  this.webform.postMessage({ name: 'updateElement', data: comp.component });
460
461
  }
@@ -464,7 +465,7 @@ class PDFBuilder extends WebformBuilder_1.default {
464
465
  if (!repeatablePaths.length) {
465
466
  return;
466
467
  }
467
- (0, utils_1.eachComponent)(this.webform.getComponents(), (comp, path) => {
468
+ (0, formUtils_1.eachComponent)(this.webform.getComponents(), (comp, path) => {
468
469
  if (this.repeatablePaths.includes(path)) {
469
470
  this.webform.postMessage({
470
471
  name: 'showBuilderErrors',
@@ -11,7 +11,8 @@ const i18n_1 = __importDefault(require("./i18n"));
11
11
  const Formio_1 = require("./Formio");
12
12
  const Components_1 = __importDefault(require("./components/Components"));
13
13
  const NestedDataComponent_1 = __importDefault(require("./components/_classes/nesteddata/NestedDataComponent"));
14
- const utils_1 = require("./utils");
14
+ const utils_1 = require("./utils/utils");
15
+ const formUtils_1 = require("./utils/formUtils");
15
16
  // We need this here because dragula pulls in CustomEvent class that requires global to exist.
16
17
  if (typeof window !== 'undefined' && typeof window.global === 'undefined') {
17
18
  window.global = window;
@@ -991,7 +992,7 @@ class Webform extends NestedDataComponent_1.default {
991
992
  }
992
993
  hasRequiredFields() {
993
994
  let result = false;
994
- (0, utils_1.eachComponent)(this.form.components, (component) => {
995
+ (0, formUtils_1.eachComponent)(this.form.components, (component) => {
995
996
  if (component.validate.required) {
996
997
  result = true;
997
998
  return true;
@@ -1537,7 +1538,7 @@ class Webform extends NestedDataComponent_1.default {
1537
1538
  return;
1538
1539
  }
1539
1540
  const captchaComponent = [];
1540
- (0, utils_1.eachComponent)(components || this.components, (component) => {
1541
+ (0, formUtils_1.eachComponent)(components || this.components, (component) => {
1541
1542
  if (/^(re)?captcha$/.test(component.type) && component.component.eventType === 'formLoad') {
1542
1543
  captchaComponent.push(component);
1543
1544
  }
@@ -8,7 +8,8 @@ const Component_1 = __importDefault(require("./components/_classes/component/Com
8
8
  const tippy_js_1 = __importDefault(require("tippy.js"));
9
9
  const Components_1 = __importDefault(require("./components/Components"));
10
10
  const Formio_1 = require("./Formio");
11
- const utils_1 = require("./utils");
11
+ const utils_1 = require("./utils/utils");
12
+ const formUtils_1 = require("./utils/formUtils");
12
13
  const builder_1 = __importDefault(require("./utils/builder"));
13
14
  const lodash_1 = __importDefault(require("lodash"));
14
15
  const dom_autoscroller_1 = __importDefault(require("dom-autoscroller"));
@@ -283,7 +284,7 @@ class WebformBuilder extends Component_1.default {
283
284
  componentOrder: [],
284
285
  default: index === 0,
285
286
  };
286
- (0, utils_1.eachComponent)(resource.components, (component) => {
287
+ (0, formUtils_1.eachComponent)(resource.components, (component) => {
287
288
  if (component.type === 'button')
288
289
  return;
289
290
  if (this.options &&
@@ -449,7 +450,7 @@ class WebformBuilder extends Component_1.default {
449
450
  return [...componentSchema.components, componentSchema];
450
451
  }
451
452
  // Get the namespace component so we have the original object.
452
- const namespaceComponent = (0, utils_1.getComponent)(this.form.components, namespaceKey, true);
453
+ const namespaceComponent = (0, formUtils_1.getComponent)(this.form.components, namespaceKey, true);
453
454
  return namespaceComponent ? namespaceComponent.components : comp.components;
454
455
  }
455
456
  recurseNamespace(component) {
@@ -811,7 +812,7 @@ class WebformBuilder extends Component_1.default {
811
812
  const draggableComponent = ((_a = this.groups[group]) === null || _a === void 0 ? void 0 : _a.components[compKey]) || {};
812
813
  if (draggableComponent.disableSiblings || draggableComponent.uniqueComponent) {
813
814
  let isCompAlreadyExists = false;
814
- (0, utils_1.eachComponent)(this.webform.components, (component) => {
815
+ (0, formUtils_1.eachComponent)(this.webform.components, (component) => {
815
816
  if ((draggableComponent.disableSiblings && component.type === draggableComponent.schema.type) ||
816
817
  (draggableComponent.uniqueComponent && component.component.key === draggableComponent.schema.key)) {
817
818
  isCompAlreadyExists = true;
@@ -946,7 +947,7 @@ class WebformBuilder extends Component_1.default {
946
947
  //populate isEnabled for captcha form settings
947
948
  let isCaptchaEnabled = false;
948
949
  if (this.form.components) {
949
- (0, utils_1.eachComponent)(form.components, component => {
950
+ (0, formUtils_1.eachComponent)(form.components, component => {
950
951
  if (isCaptchaEnabled) {
951
952
  return;
952
953
  }
@@ -1041,7 +1042,7 @@ class WebformBuilder extends Component_1.default {
1041
1042
  }
1042
1043
  }
1043
1044
  // Change the "default value" field to be reflective of this component.
1044
- const defaultValueComponent = (0, utils_1.getComponent)(this.editForm.components, 'defaultValue', true);
1045
+ const defaultValueComponent = (0, formUtils_1.getComponent)(this.editForm.components, 'defaultValue', true);
1045
1046
  if (defaultValueComponent && component.type !== 'hidden') {
1046
1047
  const defaultChanged = changed && ((changed.component && changed.component.key === 'defaultValue')
1047
1048
  || (changed.instance && defaultValueComponent.hasComponent && defaultValueComponent.hasComponent(changed.instance)));
@@ -1073,7 +1074,7 @@ class WebformBuilder extends Component_1.default {
1073
1074
  if (!this.originalDefaultValue) {
1074
1075
  this.originalDefaultValue = (0, utils_1.fastCloneDeep)(defaultValueComponent.component);
1075
1076
  }
1076
- (0, utils_1.eachComponent)(defaultValueComponent.component.components, (comp => {
1077
+ (0, formUtils_1.eachComponent)(defaultValueComponent.component.components, (comp => {
1077
1078
  var _a;
1078
1079
  if ((_a = comp.validate) === null || _a === void 0 ? void 0 : _a.required) {
1079
1080
  comp.validate.required = false;
@@ -1128,7 +1129,7 @@ class WebformBuilder extends Component_1.default {
1128
1129
  findRepeatablePaths() {
1129
1130
  const repeatablePaths = [];
1130
1131
  const keys = new Map();
1131
- (0, utils_1.eachComponent)(this.form.components, (comp, path, components, parent, paths) => {
1132
+ (0, formUtils_1.eachComponent)(this.form.components, (comp, path, components, parent, paths) => {
1132
1133
  if (keys.has(paths.dataPath)) {
1133
1134
  repeatablePaths.push(paths.dataPath);
1134
1135
  }
@@ -1640,7 +1641,7 @@ class WebformBuilder extends Component_1.default {
1640
1641
  if (!Components_1.default.components[type === 'custom' ? 'unknown' : type]) {
1641
1642
  return false;
1642
1643
  }
1643
- const editTabs = (0, utils_1.getComponent)(Components_1.default.components[type === 'custom' ? 'unknown' : type].editForm().components, 'tabs', true).components;
1644
+ const editTabs = (0, formUtils_1.getComponent)(Components_1.default.components[type === 'custom' ? 'unknown' : type].editForm().components, 'tabs', true).components;
1644
1645
  const hiddenEditTabs = lodash_1.default.filter(lodash_1.default.get(this.options, `editForm.${type}`, []), 'ignore');
1645
1646
  return lodash_1.default.intersectionBy(editTabs, hiddenEditTabs, 'key').length !== editTabs.length;
1646
1647
  }
package/lib/cjs/Wizard.js CHANGED
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const lodash_1 = __importDefault(require("lodash"));
7
7
  const Webform_1 = __importDefault(require("./Webform"));
8
8
  const Formio_1 = require("./Formio");
9
- const utils_1 = require("./utils");
9
+ const utils_1 = require("./utils/utils");
10
10
  class Wizard extends Webform_1.default {
11
11
  /**
12
12
  * Constructor for wizard-based forms.
@@ -7,7 +7,7 @@ const WebformBuilder_1 = __importDefault(require("./WebformBuilder"));
7
7
  const Webform_1 = __importDefault(require("./Webform"));
8
8
  const builder_1 = __importDefault(require("./utils/builder"));
9
9
  const lodash_1 = __importDefault(require("lodash"));
10
- const utils_1 = require("./utils");
10
+ const utils_1 = require("./utils/utils");
11
11
  class WizardBuilder extends WebformBuilder_1.default {
12
12
  constructor() {
13
13
  let element, options;
@@ -165,6 +165,7 @@ declare class Component extends Element {
165
165
  get componentsMap(): object;
166
166
  /**
167
167
  * Returns if the parent should conditionally clear.
168
+ *
168
169
  * @returns {boolean} - If the parent should conditionally clear.
169
170
  */
170
171
  parentShouldConditionallyClear(): boolean;
@@ -1,4 +1,27 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
26
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
27
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -19,8 +42,8 @@ const lodash_1 = __importDefault(require("lodash"));
19
42
  const ismobilejs_1 = __importDefault(require("ismobilejs"));
20
43
  const process_1 = require("@formio/core/process");
21
44
  const Formio_1 = require("../../../Formio");
22
- const utils_1 = __importDefault(require("../../../utils"));
23
- const utils_2 = require("../../../utils");
45
+ const FormioUtils = __importStar(require("../../../utils/utils"));
46
+ const utils_1 = require("../../../utils/utils");
24
47
  const Element_1 = __importDefault(require("../../../Element"));
25
48
  const ComponentModal_1 = __importDefault(require("../componentModal/ComponentModal"));
26
49
  const widgets_1 = __importDefault(require("../../../widgets"));
@@ -28,7 +51,7 @@ const addons_1 = __importDefault(require("../../../addons"));
28
51
  const uploadAdapter_1 = require("../../../providers/storage/uploadAdapter");
29
52
  const en_1 = __importDefault(require("../../../translations/en"));
30
53
  const Templates_1 = __importDefault(require("../../../templates/Templates"));
31
- const isIEBrowser = utils_1.default.getBrowserInfo().ie;
54
+ const isIEBrowser = FormioUtils.getBrowserInfo().ie;
32
55
  /**
33
56
  * This is the Component class
34
57
  which all elements within the FormioForm derive from.
@@ -202,7 +225,7 @@ class Component extends Element_1.default {
202
225
  */
203
226
  static savedValueTypes(schema) {
204
227
  schema = schema || {};
205
- return utils_1.default.getComponentSavedTypes(schema) || [utils_1.default.componentValueTypes.any];
228
+ return FormioUtils.getComponentSavedTypes(schema) || [FormioUtils.componentValueTypes.any];
206
229
  }
207
230
  /**
208
231
  * Provides a table view for this component. Override if you wish to do something different than using getView
@@ -269,7 +292,7 @@ class Component extends Element_1.default {
269
292
  this.component.id = this.id;
270
293
  this.afterComponentAssign();
271
294
  // Save off the original component to be used in logic.
272
- this.originalComponent = (0, utils_2.fastCloneDeep)(this.component);
295
+ this.originalComponent = (0, utils_1.fastCloneDeep)(this.component);
273
296
  /**
274
297
  * If the component has been attached
275
298
  */
@@ -302,7 +325,7 @@ class Component extends Element_1.default {
302
325
  * Determines if this component is disabled, or not.
303
326
  * @type {boolean}
304
327
  */
305
- this._disabled = (0, utils_2.boolValue)(this.component.disabled) ? this.component.disabled : false;
328
+ this._disabled = (0, utils_1.boolValue)(this.component.disabled) ? this.component.disabled : false;
306
329
  /**
307
330
  * Points to the root component, usually the FormComponent.
308
331
  * @type {Component}
@@ -323,7 +346,7 @@ class Component extends Element_1.default {
323
346
  * The component paths for this component.
324
347
  * @type {import('@formio/core').ComponentPaths} - The component paths.
325
348
  */
326
- this.paths = utils_1.default.getComponentPaths(this.component, (_a = this.parent) === null || _a === void 0 ? void 0 : _a.component, Object.assign(Object.assign({}, (_b = this.parent) === null || _b === void 0 ? void 0 : _b.paths), { dataIndex: this.options.rowIndex === undefined ? (_d = (_c = this.parent) === null || _c === void 0 ? void 0 : _c.paths) === null || _d === void 0 ? void 0 : _d.dataIndex : this.options.rowIndex }));
349
+ this.paths = FormioUtils.getComponentPaths(this.component, (_a = this.parent) === null || _a === void 0 ? void 0 : _a.component, Object.assign(Object.assign({}, (_b = this.parent) === null || _b === void 0 ? void 0 : _b.paths), { dataIndex: this.options.rowIndex === undefined ? (_d = (_c = this.parent) === null || _c === void 0 ? void 0 : _c.paths) === null || _d === void 0 ? void 0 : _d.dataIndex : this.options.rowIndex }));
327
350
  this.options.name = this.options.name || 'data';
328
351
  this._path = '';
329
352
  // Needs for Nextgen Rules Engine
@@ -437,6 +460,7 @@ class Component extends Element_1.default {
437
460
  }
438
461
  /**
439
462
  * Returns if the parent should conditionally clear.
463
+ *
440
464
  * @returns {boolean} - If the parent should conditionally clear.
441
465
  */
442
466
  parentShouldConditionallyClear() {
@@ -500,7 +524,7 @@ class Component extends Element_1.default {
500
524
  label.labelPosition = this.component.labelPosition;
501
525
  label.tooltipClass = `${this.iconClass('question-sign')} text-muted`;
502
526
  const isPDFReadOnlyMode = this.isPDFReadOnlyMode;
503
- if (this.hasInput && this.component.validate && (0, utils_2.boolValue)(this.component.validate.required) && !isPDFReadOnlyMode) {
527
+ if (this.hasInput && this.component.validate && (0, utils_1.boolValue)(this.component.validate.required) && !isPDFReadOnlyMode) {
504
528
  label.className += ' field-required';
505
529
  }
506
530
  if (label.hidden) {
@@ -533,7 +557,7 @@ class Component extends Element_1.default {
533
557
  */
534
558
  set rowIndex(value) {
535
559
  var _a, _b;
536
- this.paths = utils_1.default.getComponentPaths(this.component, (_a = this.parent) === null || _a === void 0 ? void 0 : _a.component, Object.assign(Object.assign({}, (((_b = this.parent) === null || _b === void 0 ? void 0 : _b.paths) || {})), { dataIndex: value }));
560
+ this.paths = FormioUtils.getComponentPaths(this.component, (_a = this.parent) === null || _a === void 0 ? void 0 : _a.component, Object.assign(Object.assign({}, (((_b = this.parent) === null || _b === void 0 ? void 0 : _b.paths) || {})), { dataIndex: value }));
537
561
  this._rowIndex = value;
538
562
  }
539
563
  afterComponentAssign() {
@@ -853,7 +877,7 @@ class Component extends Element_1.default {
853
877
  * @returns {object} - The JSON schema for this component.
854
878
  */
855
879
  get schema() {
856
- return (0, utils_2.fastCloneDeep)(this.getModifiedSchema(lodash_1.default.omit(this.component, 'id'), this.defaultSchema));
880
+ return (0, utils_1.fastCloneDeep)(this.getModifiedSchema(lodash_1.default.omit(this.component, 'id'), this.defaultSchema));
857
881
  }
858
882
  /**
859
883
  * Returns true if component is inside DataGrid
@@ -1005,7 +1029,7 @@ class Component extends Element_1.default {
1005
1029
  if (!this.shouldSanitizeValue && !forceSanitize) {
1006
1030
  return dirty;
1007
1031
  }
1008
- return utils_1.default.sanitize(dirty, {
1032
+ return FormioUtils.sanitize(dirty, {
1009
1033
  sanitizeConfig: lodash_1.default.merge(((_a = this.options) === null || _a === void 0 ? void 0 : _a.sanitizeConfig) || {}, options || {}),
1010
1034
  });
1011
1035
  }
@@ -1124,7 +1148,7 @@ class Component extends Element_1.default {
1124
1148
  return submissionTimezone;
1125
1149
  }
1126
1150
  // Return current timezone if none are provided.
1127
- return (0, utils_2.currentTimezone)();
1151
+ return (0, utils_1.currentTimezone)();
1128
1152
  }
1129
1153
  /**
1130
1154
  *
@@ -1429,7 +1453,7 @@ class Component extends Element_1.default {
1429
1453
  else {
1430
1454
  this.refreshOnChanged = true;
1431
1455
  }
1432
- this.refreshOnValue = (0, utils_2.fastCloneDeep)(value);
1456
+ this.refreshOnValue = (0, utils_1.fastCloneDeep)(value);
1433
1457
  if (this.refreshOnChanged) {
1434
1458
  if (this.component.clearOnRefresh) {
1435
1459
  this.setValue(null);
@@ -1671,7 +1695,7 @@ class Component extends Element_1.default {
1671
1695
  if (this.component.customClass) {
1672
1696
  className += this.component.customClass;
1673
1697
  }
1674
- if (this.hasInput && this.component.validate && (0, utils_2.boolValue)(this.component.validate.required)) {
1698
+ if (this.hasInput && this.component.validate && (0, utils_1.boolValue)(this.component.validate.required)) {
1675
1699
  className += ' required';
1676
1700
  }
1677
1701
  if (this.labelIsHidden()) {
@@ -1959,7 +1983,7 @@ class Component extends Element_1.default {
1959
1983
  if (this._hasCondition !== null) {
1960
1984
  return this._hasCondition;
1961
1985
  }
1962
- this._hasCondition = utils_1.default.hasCondition(this.component);
1986
+ this._hasCondition = FormioUtils.hasCondition(this.component);
1963
1987
  return this._hasCondition;
1964
1988
  }
1965
1989
  /**
@@ -1986,7 +2010,7 @@ class Component extends Element_1.default {
1986
2010
  * @returns {boolean} - True if the condition applies to this component.
1987
2011
  */
1988
2012
  checkCondition(row, data) {
1989
- return utils_1.default.checkCondition(this.component, row || this.data, data || this.rootValue, this.root ? this.root._form : {}, this);
2013
+ return FormioUtils.checkCondition(this.component, row || this.data, data || this.rootValue, this.root ? this.root._form : {}, this);
1990
2014
  }
1991
2015
  /**
1992
2016
  * Check for conditionals and hide/show the element based on those conditions.
@@ -2042,9 +2066,9 @@ class Component extends Element_1.default {
2042
2066
  if (logics.length === 0) {
2043
2067
  return;
2044
2068
  }
2045
- const newComponent = (0, utils_2.fastCloneDeep)(this.originalComponent);
2069
+ const newComponent = (0, utils_1.fastCloneDeep)(this.originalComponent);
2046
2070
  let changed = logics.reduce((changed, logic) => {
2047
- const result = utils_1.default.checkTrigger(newComponent, logic.trigger, row, data, this.root ? this.root._form : {}, this);
2071
+ const result = FormioUtils.checkTrigger(newComponent, logic.trigger, row, data, this.root ? this.root._form : {}, this);
2048
2072
  return (result ? this.applyActions(newComponent, logic.actions, result, row, data) : false) || changed;
2049
2073
  }, false);
2050
2074
  // If component definition changed, replace and mark as changed.
@@ -2111,7 +2135,7 @@ class Component extends Element_1.default {
2111
2135
  return actions.reduce((changed, action) => {
2112
2136
  switch (action.type) {
2113
2137
  case 'property': {
2114
- utils_1.default.setActionProperty(newComponent, action, result, row, data, this);
2138
+ FormioUtils.setActionProperty(newComponent, action, result, row, data, this);
2115
2139
  const property = action.property.value;
2116
2140
  if (!lodash_1.default.isEqual(lodash_1.default.get(this.component, property), lodash_1.default.get(newComponent, property))) {
2117
2141
  // Advanced Logic can modify the component's hidden property; because we track conditionally hidden state
@@ -2624,7 +2648,7 @@ class Component extends Element_1.default {
2624
2648
  if (this.component.type !== 'textfield') {
2625
2649
  const placeholderChar = this.placeholderChar;
2626
2650
  value = (0, vanilla_text_mask_1.conformToMask)(value, this.defaultMask, { placeholderChar }).conformedValue;
2627
- if (!utils_1.default.matchInputMask(value, this.defaultMask)) {
2651
+ if (!FormioUtils.matchInputMask(value, this.defaultMask)) {
2628
2652
  value = '';
2629
2653
  }
2630
2654
  }
@@ -2942,7 +2966,7 @@ class Component extends Element_1.default {
2942
2966
  }
2943
2967
  if (fromSubmission) {
2944
2968
  // If we set value from submission and it differs from calculated one, set the calculated value to prevent overriding dataValue in the next pass
2945
- this.calculatedValue = (0, utils_2.fastCloneDeep)(calculatedValue);
2969
+ this.calculatedValue = (0, utils_1.fastCloneDeep)(calculatedValue);
2946
2970
  return false;
2947
2971
  }
2948
2972
  // If this is the firstPass, and the dataValue is different than to the calculatedValue.
@@ -2951,7 +2975,7 @@ class Component extends Element_1.default {
2951
2975
  return true;
2952
2976
  }
2953
2977
  }
2954
- this.calculatedValue = (0, utils_2.fastCloneDeep)(calculatedValue);
2978
+ this.calculatedValue = (0, utils_1.fastCloneDeep)(calculatedValue);
2955
2979
  if (changed) {
2956
2980
  if (!flags.noPristineChangeOnModified && this.root.initialized) {
2957
2981
  this.pristine = false;
@@ -3012,7 +3036,7 @@ class Component extends Element_1.default {
3012
3036
  var _a;
3013
3037
  const { local } = options;
3014
3038
  if (!row) {
3015
- row = (0, utils_2.getContextualRowData)(this.component, data, this.paths);
3039
+ row = (0, utils_1.getContextualRowData)(this.component, data, this.paths);
3016
3040
  }
3017
3041
  if (!ignoreCondition && !this.checkCondition(row, data)) {
3018
3042
  return '';
@@ -3041,7 +3065,7 @@ class Component extends Element_1.default {
3041
3065
  ]
3042
3066
  });
3043
3067
  const errors = validationScope.errors;
3044
- const interpolatedErrors = utils_1.default.interpolateErrors(this.component, errors, this.t.bind(this));
3068
+ const interpolatedErrors = FormioUtils.interpolateErrors(this.component, errors, this.t.bind(this));
3045
3069
  return lodash_1.default.map(interpolatedErrors, 'message').join('\n\n');
3046
3070
  }
3047
3071
  /**
@@ -3072,7 +3096,7 @@ class Component extends Element_1.default {
3072
3096
  */
3073
3097
  interpolateErrors(errors) {
3074
3098
  var _a;
3075
- const interpolatedErrors = utils_1.default.interpolateErrors(this.component, errors, this.t.bind(this));
3099
+ const interpolatedErrors = FormioUtils.interpolateErrors(this.component, errors, this.t.bind(this));
3076
3100
  return ((_a = this.serverErrors) === null || _a === void 0 ? void 0 : _a.length) ? [...interpolatedErrors, ...this.serverErrors] : interpolatedErrors;
3077
3101
  }
3078
3102
  /**
@@ -3292,7 +3316,7 @@ class Component extends Element_1.default {
3292
3316
  }
3293
3317
  });
3294
3318
  this.addEventListener(element, 'blur', () => {
3295
- this.root.pendingBlur = utils_1.default.delay(() => {
3319
+ this.root.pendingBlur = FormioUtils.delay(() => {
3296
3320
  this.emit('blur', this);
3297
3321
  if (this.component.validateOn === 'blur') {
3298
3322
  this.root.triggerChange({ fromBlur: true }, {
@@ -3540,7 +3564,7 @@ class Component extends Element_1.default {
3540
3564
  if (logic.trigger.type === 'event') {
3541
3565
  const event = this.interpolate(logic.trigger.event);
3542
3566
  this.on(event, (...args) => {
3543
- const newComponent = (0, utils_2.fastCloneDeep)(this.originalComponent);
3567
+ const newComponent = (0, utils_1.fastCloneDeep)(this.originalComponent);
3544
3568
  if (this.applyActions(newComponent, logic.actions, args)) {
3545
3569
  // If component definition changed, replace it.
3546
3570
  if (!lodash_1.default.isEqual(this.component, newComponent)) {
@@ -3675,7 +3699,7 @@ Component.requireLibrary = function (name, property, src, polling) {
3675
3699
  }.bind(Component.externalLibraries[name]);
3676
3700
  }
3677
3701
  // See if the plugin already exists.
3678
- const plugin = (0, utils_2.getScriptPlugin)(property);
3702
+ const plugin = (0, utils_1.getScriptPlugin)(property);
3679
3703
  if (plugin) {
3680
3704
  Component.externalLibraries[name].resolve(plugin);
3681
3705
  }
@@ -3718,7 +3742,7 @@ Component.requireLibrary = function (name, property, src, polling) {
3718
3742
  // if no callback is provided, then check periodically for the script.
3719
3743
  if (polling) {
3720
3744
  setTimeout(function checkLibrary() {
3721
- const plugin = (0, utils_2.getScriptPlugin)(property);
3745
+ const plugin = (0, utils_1.getScriptPlugin)(property);
3722
3746
  if (plugin) {
3723
3747
  Component.externalLibraries[name].resolve(plugin);
3724
3748
  }