@formio/js 5.0.0-dev.5661.22d0f16 → 5.0.0-dev.5664.50b8944

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 (100) hide show
  1. package/Changelog.md +21 -2
  2. package/dist/formio.form.js +111 -15
  3. package/dist/formio.form.min.js +1 -1
  4. package/dist/formio.full.js +15 -15
  5. package/dist/formio.full.min.js +1 -1
  6. package/dist/formio.js +2 -2
  7. package/dist/formio.min.js +1 -1
  8. package/dist/formio.utils.js +1 -1
  9. package/dist/formio.utils.min.js +1 -1
  10. package/lib/cjs/Formio.js +1 -0
  11. package/lib/cjs/Webform.d.ts +7 -0
  12. package/lib/cjs/Webform.js +18 -5
  13. package/lib/cjs/components/_classes/component/Component.d.ts +13 -0
  14. package/lib/cjs/components/_classes/component/Component.js +27 -13
  15. package/lib/cjs/components/_classes/component/editForm/Component.edit.display.js +8 -0
  16. package/lib/cjs/components/_classes/component/fixtures/comp7.d.ts +84 -0
  17. package/lib/cjs/components/_classes/component/fixtures/comp7.js +86 -0
  18. package/lib/cjs/components/_classes/component/fixtures/index.d.ts +2 -1
  19. package/lib/cjs/components/_classes/component/fixtures/index.js +3 -1
  20. package/lib/cjs/components/_classes/input/Input.js +23 -1
  21. package/lib/cjs/components/_classes/multivalue/Multivalue.d.ts +1 -1
  22. package/lib/cjs/components/_classes/multivalue/Multivalue.js +8 -1
  23. package/lib/cjs/components/datagrid/DataGrid.d.ts +9 -0
  24. package/lib/cjs/components/datagrid/DataGrid.js +50 -32
  25. package/lib/cjs/components/datagrid/fixtures/comp-with-reorder.d.ts +100 -0
  26. package/lib/cjs/components/datagrid/fixtures/comp-with-reorder.js +139 -0
  27. package/lib/cjs/components/datagrid/fixtures/comp9.d.ts +41 -0
  28. package/lib/cjs/components/datagrid/fixtures/comp9.js +44 -0
  29. package/lib/cjs/components/datagrid/fixtures/index.d.ts +3 -1
  30. package/lib/cjs/components/datagrid/fixtures/index.js +5 -1
  31. package/lib/cjs/components/day/Day.d.ts +1 -1
  32. package/lib/cjs/components/day/Day.js +1 -1
  33. package/lib/cjs/components/day/fixtures/comp7.d.ts +109 -0
  34. package/lib/cjs/components/day/fixtures/comp7.js +109 -0
  35. package/lib/cjs/components/day/fixtures/index.d.ts +2 -1
  36. package/lib/cjs/components/day/fixtures/index.js +3 -1
  37. package/lib/cjs/components/editgrid/EditGrid.js +2 -2
  38. package/lib/cjs/components/form/Form.d.ts +7 -0
  39. package/lib/cjs/components/form/Form.js +10 -1
  40. package/lib/cjs/components/number/Number.js +1 -1
  41. package/lib/cjs/components/number/fixtures/comp8.d.ts +32 -0
  42. package/lib/cjs/components/number/fixtures/comp8.js +28 -0
  43. package/lib/cjs/components/number/fixtures/index.d.ts +2 -1
  44. package/lib/cjs/components/number/fixtures/index.js +3 -1
  45. package/lib/cjs/components/phonenumber/fixtures/comp2.d.ts +16 -0
  46. package/lib/cjs/components/phonenumber/fixtures/comp2.js +25 -0
  47. package/lib/cjs/components/phonenumber/fixtures/index.d.ts +2 -1
  48. package/lib/cjs/components/phonenumber/fixtures/index.js +3 -1
  49. package/lib/cjs/components/select/Select.js +1 -2
  50. package/lib/cjs/components/signature/Signature.d.ts +0 -1
  51. package/lib/cjs/components/signature/Signature.js +1 -1
  52. package/lib/cjs/providers/address/GoogleAddressProvider.d.ts +5 -0
  53. package/lib/cjs/providers/address/GoogleAddressProvider.js +23 -1
  54. package/lib/cjs/utils/utils.js +0 -4
  55. package/lib/mjs/Formio.js +1 -0
  56. package/lib/mjs/Webform.d.ts +7 -0
  57. package/lib/mjs/Webform.js +18 -5
  58. package/lib/mjs/components/_classes/component/Component.d.ts +13 -0
  59. package/lib/mjs/components/_classes/component/Component.js +35 -13
  60. package/lib/mjs/components/_classes/component/editForm/Component.edit.display.js +8 -0
  61. package/lib/mjs/components/_classes/component/fixtures/comp7.d.ts +84 -0
  62. package/lib/mjs/components/_classes/component/fixtures/comp7.js +84 -0
  63. package/lib/mjs/components/_classes/component/fixtures/index.d.ts +2 -1
  64. package/lib/mjs/components/_classes/component/fixtures/index.js +2 -1
  65. package/lib/mjs/components/_classes/input/Input.js +22 -1
  66. package/lib/mjs/components/_classes/multivalue/Multivalue.d.ts +1 -1
  67. package/lib/mjs/components/_classes/multivalue/Multivalue.js +8 -1
  68. package/lib/mjs/components/datagrid/DataGrid.d.ts +9 -0
  69. package/lib/mjs/components/datagrid/DataGrid.js +50 -32
  70. package/lib/mjs/components/datagrid/fixtures/comp-with-reorder.d.ts +100 -0
  71. package/lib/mjs/components/datagrid/fixtures/comp-with-reorder.js +137 -0
  72. package/lib/mjs/components/datagrid/fixtures/comp9.d.ts +41 -0
  73. package/lib/mjs/components/datagrid/fixtures/comp9.js +42 -0
  74. package/lib/mjs/components/datagrid/fixtures/index.d.ts +3 -1
  75. package/lib/mjs/components/datagrid/fixtures/index.js +3 -1
  76. package/lib/mjs/components/day/Day.d.ts +1 -1
  77. package/lib/mjs/components/day/Day.js +1 -1
  78. package/lib/mjs/components/day/fixtures/comp7.d.ts +109 -0
  79. package/lib/mjs/components/day/fixtures/comp7.js +107 -0
  80. package/lib/mjs/components/day/fixtures/index.d.ts +2 -1
  81. package/lib/mjs/components/day/fixtures/index.js +2 -1
  82. package/lib/mjs/components/editgrid/EditGrid.js +2 -2
  83. package/lib/mjs/components/form/Form.d.ts +7 -0
  84. package/lib/mjs/components/form/Form.js +10 -1
  85. package/lib/mjs/components/number/Number.js +1 -1
  86. package/lib/mjs/components/number/fixtures/comp8.d.ts +32 -0
  87. package/lib/mjs/components/number/fixtures/comp8.js +26 -0
  88. package/lib/mjs/components/number/fixtures/index.d.ts +2 -1
  89. package/lib/mjs/components/number/fixtures/index.js +2 -1
  90. package/lib/mjs/components/phonenumber/fixtures/comp2.d.ts +16 -0
  91. package/lib/mjs/components/phonenumber/fixtures/comp2.js +23 -0
  92. package/lib/mjs/components/phonenumber/fixtures/index.d.ts +2 -1
  93. package/lib/mjs/components/phonenumber/fixtures/index.js +2 -1
  94. package/lib/mjs/components/select/Select.js +1 -2
  95. package/lib/mjs/components/signature/Signature.d.ts +0 -1
  96. package/lib/mjs/components/signature/Signature.js +1 -1
  97. package/lib/mjs/providers/address/GoogleAddressProvider.d.ts +5 -0
  98. package/lib/mjs/providers/address/GoogleAddressProvider.js +22 -1
  99. package/lib/mjs/utils/utils.js +0 -4
  100. package/package.json +1 -2
@@ -0,0 +1,107 @@
1
+ export default {
2
+ components: [
3
+ {
4
+ type: 'textfield',
5
+ key: 'firstName',
6
+ label: 'First Name',
7
+ placeholder: 'Enter your first name',
8
+ input: true
9
+ }, {
10
+ "label": "Day",
11
+ "placeholder": "Day",
12
+ "applyMaskOn": "change",
13
+ "tableView": true,
14
+ "key": "day2",
15
+ "type": "textfield",
16
+ "input": true
17
+ }, {
18
+ "label": "Month",
19
+ "placeholder": "Month",
20
+ "applyMaskOn": "change",
21
+ "tableView": true,
22
+ "key": "month2",
23
+ "type": "textfield",
24
+ "input": true
25
+ }, {
26
+ "label": "Year",
27
+ "placeholder": "Year",
28
+ "applyMaskOn": "change",
29
+ "tableView": true,
30
+ "key": "year2",
31
+ "type": "textfield",
32
+ "input": true
33
+ },
34
+ {
35
+ "label": "Day",
36
+ "hideInputLabels": false,
37
+ "inputsLabelPosition": "top",
38
+ "useLocaleSettings": false,
39
+ "tableView": false,
40
+ "fields": {
41
+ "day": {
42
+ "placeholder": "Day",
43
+ "hide": false
44
+ },
45
+ "month": {
46
+ "type": "number",
47
+ "placeholder": "Month",
48
+ "hide": false
49
+ },
50
+ "year": {
51
+ "placeholder": "Year",
52
+ "hide": false
53
+ }
54
+ },
55
+ "key": "day",
56
+ "type": "day",
57
+ "input": true,
58
+ "defaultValue": "00/00/0000"
59
+ },
60
+ {
61
+ type: 'textfield',
62
+ key: 'lastName',
63
+ label: 'Last Name',
64
+ placeholder: 'Enter your last name',
65
+ input: true
66
+ },
67
+ {
68
+ type: 'survey',
69
+ key: 'questions',
70
+ label: 'Survey',
71
+ values: [
72
+ {
73
+ label: 'Great',
74
+ value: 'great'
75
+ },
76
+ {
77
+ label: 'Good',
78
+ value: 'good'
79
+ },
80
+ {
81
+ label: 'Poor',
82
+ value: 'poor'
83
+ }
84
+ ],
85
+ questions: [
86
+ {
87
+ label: 'How would you rate the Form.io platform?',
88
+ value: 'howWouldYouRateTheFormIoPlatform'
89
+ },
90
+ {
91
+ label: 'How was Customer Support?',
92
+ value: 'howWasCustomerSupport'
93
+ },
94
+ {
95
+ label: 'Overall Experience?',
96
+ value: 'overallExperience'
97
+ }
98
+ ]
99
+ },
100
+ {
101
+ type: 'button',
102
+ action: 'submit',
103
+ label: 'Submit',
104
+ theme: 'primary'
105
+ }
106
+ ]
107
+ };
@@ -4,4 +4,5 @@ import comp3 from './comp3';
4
4
  import comp4 from './comp4';
5
5
  import comp5 from './comp5';
6
6
  import comp6 from './comp6';
7
- export { comp1, comp2, comp3, comp4, comp5, comp6 };
7
+ import comp7 from './comp7';
8
+ export { comp1, comp2, comp3, comp4, comp5, comp6, comp7 };
@@ -4,4 +4,5 @@ import comp3 from './comp3';
4
4
  import comp4 from './comp4';
5
5
  import comp5 from './comp5';
6
6
  import comp6 from './comp6';
7
- export { comp1, comp2, comp3, comp4, comp5, comp6 };
7
+ import comp7 from './comp7';
8
+ export { comp1, comp2, comp3, comp4, comp5, comp6, comp7 };
@@ -83,7 +83,7 @@ export default class EditGridComponent extends NestedArrayComponent {
83
83
  {% if (!instance.options.readOnly && !instance.disabled) { %}
84
84
  <div class="col-sm-2">
85
85
  <div class="btn-group pull-right">
86
- <button class="btn btn-default btn-light btn-sm editRow"><i class="{{ iconClass('pen-fill') }}"></i></button>
86
+ <button class="btn btn-default btn-light btn-sm editRow"><i class="{{ iconClass('edit') }}"></i></button>
87
87
  {% if (!instance.hasRemoveButtons || instance.hasRemoveButtons()) { %}
88
88
  <button class="btn btn-danger btn-sm removeRow"><i class="{{ iconClass('trash') }}"></i></button>
89
89
  {% } %}
@@ -104,7 +104,7 @@ export default class EditGridComponent extends NestedArrayComponent {
104
104
  {% if (!instance.options.readOnly && !instance.disabled) { %}
105
105
  <td class="editgrid-table-column">
106
106
  <div class="btn-group">
107
- <button class="btn btn-default btn-light btn-sm editRow" aria-label="{{ t('Edit row') }}"><i class="{{ iconClass('pen-fill') }}"></i></button>
107
+ <button class="btn btn-default btn-light btn-sm editRow" aria-label="{{ t('Edit row') }}"><i class="{{ iconClass('edit') }}"></i></button>
108
108
  {% if (!instance.hasRemoveButtons || instance.hasRemoveButtons()) { %}
109
109
  <button class="btn btn-danger btn-sm removeRow" aria-label="{{ t('Remove row') }}"><i class="{{ iconClass('trash') }}"></i></button>
110
110
  {% } %}
@@ -90,6 +90,13 @@ export default class FormComponent extends Component {
90
90
  isHidden(): boolean;
91
91
  setValue(submission: any, flags?: {}): boolean;
92
92
  setSubFormValue(submission: any, flags: any): void;
93
+ /**
94
+ * Sets the subform value
95
+ * @param {object|null|undefined} submission - The submission to set.
96
+ * @param {object|null|undefined} flags - Any flags to apply when setting the submission.
97
+ * @returns {void}
98
+ */
99
+ onSetSubFormValue(submission: object | null | undefined, flags: object | null | undefined): void;
93
100
  areAllComponentsEmpty(data: any): boolean;
94
101
  updateSubFormVisibility(): void;
95
102
  /**
@@ -639,9 +639,18 @@ export default class FormComponent extends Component {
639
639
  });
640
640
  }
641
641
  else {
642
- this.subForm.setValue(submission, flags);
642
+ this.onSetSubFormValue(submission, flags);
643
643
  }
644
644
  }
645
+ /**
646
+ * Sets the subform value
647
+ * @param {object|null|undefined} submission - The submission to set.
648
+ * @param {object|null|undefined} flags - Any flags to apply when setting the submission.
649
+ * @returns {void}
650
+ */
651
+ onSetSubFormValue(submission, flags) {
652
+ this.subForm.setValue(submission, flags);
653
+ }
645
654
  isEmpty(value = this.dataValue) {
646
655
  return value === null || _.isEqual(value, this.emptyValue) || (this.areAllComponentsEmpty(value?.data) && !value?._id);
647
656
  }
@@ -46,7 +46,7 @@ export default class NumberComponent extends Input {
46
46
  constructor(...args) {
47
47
  super(...args);
48
48
  const separators = getNumberSeparators(this.options.language || navigator.language);
49
- this.decimalSeparator = this.options.decimalSeparator = this.options.decimalSeparator
49
+ this.decimalSeparator = this.options.decimalSeparator = this.component.decimalSymbol || this.options.decimalSeparator
50
50
  || this.options.properties?.decimalSeparator
51
51
  || separators.decimalSeparator;
52
52
  if (this.component.delimiter) {
@@ -0,0 +1,32 @@
1
+ declare namespace _default {
2
+ let components: ({
3
+ label: string;
4
+ applyMaskOn: string;
5
+ mask: boolean;
6
+ tableView: boolean;
7
+ delimiter: boolean;
8
+ requireDecimal: boolean;
9
+ inputFormat: string;
10
+ truncateMultipleSpaces: boolean;
11
+ key: string;
12
+ type: string;
13
+ input: boolean;
14
+ decimalSymbol: string;
15
+ disableOnInvalid?: undefined;
16
+ } | {
17
+ type: string;
18
+ label: string;
19
+ key: string;
20
+ disableOnInvalid: boolean;
21
+ input: boolean;
22
+ tableView: boolean;
23
+ applyMaskOn?: undefined;
24
+ mask?: undefined;
25
+ delimiter?: undefined;
26
+ requireDecimal?: undefined;
27
+ inputFormat?: undefined;
28
+ truncateMultipleSpaces?: undefined;
29
+ decimalSymbol?: undefined;
30
+ })[];
31
+ }
32
+ export default _default;
@@ -0,0 +1,26 @@
1
+ export default {
2
+ components: [
3
+ {
4
+ "label": "Number",
5
+ "applyMaskOn": "change",
6
+ "mask": false,
7
+ "tableView": false,
8
+ "delimiter": false,
9
+ "requireDecimal": false,
10
+ "inputFormat": "plain",
11
+ "truncateMultipleSpaces": false,
12
+ "key": "number",
13
+ "type": "number",
14
+ "input": true,
15
+ "decimalSymbol": "-"
16
+ },
17
+ {
18
+ "type": "button",
19
+ "label": "Submit",
20
+ "key": "submit",
21
+ "disableOnInvalid": true,
22
+ "input": true,
23
+ "tableView": false
24
+ }
25
+ ]
26
+ };
@@ -5,4 +5,5 @@ import comp4 from './comp4';
5
5
  import comp5 from './comp5';
6
6
  import comp6 from './comp6';
7
7
  import comp7 from './comp7';
8
- export { comp1, comp2, comp3, comp4, comp5, comp6, comp7 };
8
+ import comp8 from './comp8';
9
+ export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8 };
@@ -5,4 +5,5 @@ import comp4 from './comp4';
5
5
  import comp5 from './comp5';
6
6
  import comp6 from './comp6';
7
7
  import comp7 from './comp7';
8
- export { comp1, comp2, comp3, comp4, comp5, comp6, comp7 };
8
+ import comp8 from './comp8';
9
+ export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8 };
@@ -0,0 +1,16 @@
1
+ declare namespace _default {
2
+ let components: {
3
+ label: string;
4
+ applyMaskOn: string;
5
+ allowMultipleMasks: boolean;
6
+ tableView: boolean;
7
+ key: string;
8
+ type: string;
9
+ inputMasks: {
10
+ label: string;
11
+ mask: string;
12
+ }[];
13
+ input: boolean;
14
+ }[];
15
+ }
16
+ export default _default;
@@ -0,0 +1,23 @@
1
+ export default {
2
+ components: [
3
+ {
4
+ "label": "Phone Number",
5
+ "applyMaskOn": "change",
6
+ "allowMultipleMasks": true,
7
+ "tableView": true,
8
+ "key": "phoneNumber",
9
+ "type": "phoneNumber",
10
+ "inputMasks": [
11
+ {
12
+ "label": "Canada",
13
+ "mask": "(999) 999-9999"
14
+ },
15
+ {
16
+ "label": "Other",
17
+ "mask": ""
18
+ }
19
+ ],
20
+ "input": true
21
+ }
22
+ ]
23
+ };
@@ -1,2 +1,3 @@
1
- export { comp1 };
2
1
  import comp1 from './comp1';
2
+ import comp2 from './comp2';
3
+ export { comp1, comp2 };
@@ -1,2 +1,3 @@
1
1
  import comp1 from './comp1';
2
- export { comp1 };
2
+ import comp2 from './comp2';
3
+ export { comp1, comp2 };
@@ -1,7 +1,6 @@
1
1
  import _ from 'lodash';
2
2
  import { Formio } from '../../Formio';
3
3
  import ListComponent from '../_classes/list/ListComponent';
4
- import Input from '../_classes/input/Input';
5
4
  import Form from '../../Form';
6
5
  import { getRandomComponentId, boolValue, isPromise, componentValueTypes, getComponentSavedTypes, isSelectResourceWithObjectValue, removeHTML } from '../../utils/utils';
7
6
  import Choices from '../../utils/ChoicesWrapper';
@@ -863,7 +862,7 @@ export default class SelectComponent extends ListComponent {
863
862
  this.choices.containerOuter.element.setAttribute('tabIndex', '-1');
864
863
  this.addEventListener(this.choices.containerOuter.element, 'focus', () => this.focusableElement.focus());
865
864
  }
866
- Input.prototype.addFocusBlurEvents.call(this, this.focusableElement);
865
+ this.addFocusBlurEvents(this.choices.input.element);
867
866
  if (this.itemsFromUrl && !this.component.noRefreshOnScroll) {
868
867
  this.scrollList = this.choices.choiceList.element;
869
868
  this.addEventListener(this.scrollList, 'scroll', () => this.onScroll());
@@ -22,7 +22,6 @@ export default class SignatureComponent extends Input {
22
22
  showCanvas(show: any): void;
23
23
  onDisabled(): void;
24
24
  checkSize(force: any, scale: any): void;
25
- getModalPreviewTemplate(): any;
26
25
  signaturePad: SignaturePad | null | undefined;
27
26
  observer: any;
28
27
  getValueAsString(value: any): "" | "Yes" | "No";
@@ -169,7 +169,7 @@ export default class SignatureComponent extends Input {
169
169
  return false;
170
170
  }
171
171
  getModalPreviewTemplate() {
172
- return this.renderTemplate('modalPreview', {
172
+ return this.renderModalPreview({
173
173
  previewText: this.dataValue ?
174
174
  `<img src=${this.dataValue} ${this._referenceAttributeName}='openModal' style="width: 100%;height: 100%;" />` :
175
175
  this.t('Click to Sign')
@@ -82,6 +82,11 @@ export class GoogleAddressProvider extends AddressProvider {
82
82
  search(): Promise<void>;
83
83
  makeRequest(): Promise<void>;
84
84
  getDisplayValue(address: any): any;
85
+ /**
86
+ * Tries to remove the library if api key for loaded script is different.
87
+ * @param {ProviderOptions} options - The options for the provider.
88
+ */
89
+ tryRemoveLibrary(options?: ProviderOptions): void;
85
90
  }
86
91
  export type AutocompleteOptions = {
87
92
  /**
@@ -2,6 +2,9 @@
2
2
  import { Formio } from '../../Formio';
3
3
  import _ from 'lodash';
4
4
  import { AddressProvider } from './AddressProvider';
5
+ const GOOGLE_MAPS_BASE_URL = 'https://maps.googleapis.com';
6
+ const GOOGLE_MAPS_JS_URL = `${GOOGLE_MAPS_BASE_URL}/maps/api/js`;
7
+ const GOOGLE_MAPS_JS_WITH_PARAMS_URL = `${GOOGLE_MAPS_JS_URL}?v=quarterly&libraries=places&loading=async&callback=googleMapsCallback`;
5
8
  /**
6
9
  * @typedef {object} AutocompleteOptions
7
10
  * @property {string[]} fields - The fields to include in the autocomplete response.
@@ -48,10 +51,11 @@ export class GoogleAddressProvider extends AddressProvider {
48
51
  constructor(options = {}) {
49
52
  super(options);
50
53
  this.setAutocompleteOptions();
51
- let src = 'https://maps.googleapis.com/maps/api/js?v=quarterly&libraries=places&loading=async&callback=googleMapsCallback';
54
+ let src = GOOGLE_MAPS_JS_WITH_PARAMS_URL;
52
55
  if (options.params?.key) {
53
56
  src += `&key=${options.params.key}`;
54
57
  }
58
+ this.tryRemoveLibrary(options);
55
59
  Formio.requireLibrary(this.getLibraryName(), 'google.maps.places', src);
56
60
  }
57
61
  /**
@@ -178,4 +182,21 @@ export class GoogleAddressProvider extends AddressProvider {
178
182
  : this.alternativeDisplayValueProperty;
179
183
  return _.get(address, displayedProperty, '');
180
184
  }
185
+ /**
186
+ * Tries to remove the library if api key for loaded script is different.
187
+ * @param {ProviderOptions} options - The options for the provider.
188
+ */
189
+ tryRemoveLibrary(options = {}) {
190
+ if (!Formio.libraries[this.getLibraryName()]) {
191
+ return;
192
+ }
193
+ const existingScript = document.querySelector(`script[src^="${GOOGLE_MAPS_JS_URL}"]`);
194
+ if (existingScript && options.params?.key && !existingScript.attributes.src.value.endsWith(options.params.key)) {
195
+ const googleMapsScripts = document.querySelectorAll(`script[src^="${GOOGLE_MAPS_BASE_URL}"]`) ?? [];
196
+ googleMapsScripts.forEach(script => script.parentNode.removeChild(script));
197
+ delete Formio.libraries[this.getLibraryName()];
198
+ delete global?.google?.maps;
199
+ delete global[`${this.getLibraryName()}Callback`];
200
+ }
201
+ }
181
202
  }
@@ -1,6 +1,5 @@
1
1
  /* global jQuery */
2
2
  import _ from 'lodash';
3
- import fetchPonyfill from 'fetch-ponyfill';
4
3
  import jsonLogic from 'json-logic-js';
5
4
  import moment from 'moment-timezone/moment-timezone';
6
5
  import jtz from 'jstimezonedetect';
@@ -10,9 +9,6 @@ import { getValue } from './formUtils';
10
9
  import { Evaluator } from './Evaluator';
11
10
  import ConditionOperators from './conditionOperators';
12
11
  const interpolate = Evaluator.interpolate;
13
- const { fetch } = fetchPonyfill({
14
- Promise: Promise
15
- });
16
12
  export * from './formUtils';
17
13
  // Configure JsonLogic
18
14
  lodashOperators.forEach((name) => jsonLogic.add_operation(`_${name}`, _[name]));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.0.0-dev.5661.22d0f16",
3
+ "version": "5.0.0-dev.5664.50b8944",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {
@@ -99,7 +99,6 @@
99
99
  "eventemitter3": "^5.0.1",
100
100
  "fast-deep-equal": "^3.1.3",
101
101
  "fast-json-patch": "^3.1.1",
102
- "fetch-ponyfill": "^7.1.0",
103
102
  "idb": "^7.1.1",
104
103
  "inputmask": "^5.0.8",
105
104
  "ismobilejs": "^1.1.1",