@formio/js 5.0.0-rc.73 → 5.0.0-rc.74

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 (40) hide show
  1. package/dist/formio.embed.js +1 -1
  2. package/dist/formio.embed.min.js +1 -1
  3. package/dist/formio.embed.min.js.LICENSE.txt +1 -1
  4. package/dist/formio.form.js +8 -8
  5. package/dist/formio.form.min.js +1 -1
  6. package/dist/formio.form.min.js.LICENSE.txt +1 -1
  7. package/dist/formio.full.js +9 -9
  8. package/dist/formio.full.min.js +1 -1
  9. package/dist/formio.full.min.js.LICENSE.txt +1 -1
  10. package/dist/formio.js +4 -4
  11. package/dist/formio.min.js +1 -1
  12. package/dist/formio.min.js.LICENSE.txt +1 -1
  13. package/dist/formio.utils.js +1 -1
  14. package/dist/formio.utils.min.js +1 -1
  15. package/dist/formio.utils.min.js.LICENSE.txt +1 -1
  16. package/lib/cjs/CDN.js +1 -2
  17. package/lib/cjs/Form.js +2 -2
  18. package/lib/cjs/Wizard.js +1 -1
  19. package/lib/cjs/components/day/Day.d.ts +2 -2
  20. package/lib/cjs/components/day/Day.js +3 -3
  21. package/lib/cjs/components/form/fixtures/index.d.ts +2 -1
  22. package/lib/cjs/components/form/fixtures/index.js +3 -1
  23. package/lib/cjs/components/form/fixtures/nestedWizardForm.d.ts +771 -0
  24. package/lib/cjs/components/form/fixtures/nestedWizardForm.js +765 -0
  25. package/lib/cjs/components/time/Time.form.js +2 -2
  26. package/lib/cjs/translations/en.d.ts +1 -0
  27. package/lib/cjs/translations/en.js +1 -0
  28. package/lib/mjs/CDN.js +1 -2
  29. package/lib/mjs/Form.js +2 -2
  30. package/lib/mjs/Wizard.js +1 -1
  31. package/lib/mjs/components/day/Day.d.ts +2 -2
  32. package/lib/mjs/components/day/Day.js +3 -3
  33. package/lib/mjs/components/form/fixtures/index.d.ts +2 -1
  34. package/lib/mjs/components/form/fixtures/index.js +2 -1
  35. package/lib/mjs/components/form/fixtures/nestedWizardForm.d.ts +771 -0
  36. package/lib/mjs/components/form/fixtures/nestedWizardForm.js +763 -0
  37. package/lib/mjs/components/time/Time.form.js +2 -2
  38. package/lib/mjs/translations/en.d.ts +1 -0
  39. package/lib/mjs/translations/en.js +1 -0
  40. package/package.json +2 -2
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const Component_form_1 = __importDefault(require("../_classes/component/Component.form"));
6
+ const Components_1 = __importDefault(require("../Components"));
7
7
  const Time_edit_data_1 = __importDefault(require("./editForm/Time.edit.data"));
8
8
  const Time_edit_display_1 = __importDefault(require("./editForm/Time.edit.display"));
9
9
  /**
@@ -12,7 +12,7 @@ const Time_edit_display_1 = __importDefault(require("./editForm/Time.edit.displa
12
12
  * @returns {import('@formio/core').Component[]} - The edit form components.
13
13
  */
14
14
  function default_1(...extend) {
15
- return (0, Component_form_1.default)([
15
+ return Components_1.default.baseEditForm([
16
16
  {
17
17
  key: 'data',
18
18
  components: Time_edit_data_1.default,
@@ -75,6 +75,7 @@ declare namespace _default {
75
75
  let typeRemaining: string;
76
76
  let typeCount: string;
77
77
  let requiredDayField: string;
78
+ let requiredDayEmpty: string;
78
79
  let requiredMonthField: string;
79
80
  let requiredYearField: string;
80
81
  }
@@ -77,6 +77,7 @@ exports.default = {
77
77
  typeRemaining: '{{ remaining }} {{ type }} remaining.',
78
78
  typeCount: '{{ count }} {{ type }}',
79
79
  requiredDayField: '{{ field }} is required',
80
+ requiredDayEmpty: '{{ field }} is required',
80
81
  requiredMonthField: '{{ field }} is required',
81
82
  requiredYearField: '{{ field }} is required'
82
83
  };
package/lib/mjs/CDN.js CHANGED
@@ -62,8 +62,7 @@ class CDN {
62
62
  url += `/${lib}`;
63
63
  }
64
64
  // Only attach the version if this is the hosted cdn.
65
- if (cdnUrl.includes('form.io') &&
66
- version && version !== 'latest') {
65
+ if (cdnUrl.match(/cdn\.(test-)?form.io/) && version && version !== 'latest') {
67
66
  url += `/${version}`;
68
67
  }
69
68
  return url;
package/lib/mjs/Form.js CHANGED
@@ -134,13 +134,13 @@ export default class Form extends Element {
134
134
  else {
135
135
  this.element = null;
136
136
  }
137
+ this.options = formOptions;
138
+ this.options.events = this.events;
137
139
  if (form) {
138
140
  this.setForm(form)
139
141
  .then(() => this.readyResolve(this.instance))
140
142
  .catch(this.readyReject);
141
143
  }
142
- this.options = formOptions;
143
- this.options.events = this.events;
144
144
  this.display = '';
145
145
  }
146
146
  createElement(tag, attrs, children) {
package/lib/mjs/Wizard.js CHANGED
@@ -13,7 +13,7 @@ export default class Wizard extends Webform {
13
13
  */
14
14
  constructor(elementOrOptions = undefined, _options = undefined) {
15
15
  let element, options;
16
- if (elementOrOptions instanceof HTMLElement || options) {
16
+ if (elementOrOptions instanceof HTMLElement || _options) {
17
17
  element = elementOrOptions;
18
18
  options = _options || {};
19
19
  }
@@ -17,9 +17,9 @@ export default class DayComponent extends Field {
17
17
  constructor(component: any, options: any, data: any);
18
18
  /**
19
19
  * The empty value for day component.
20
- * @returns {'00/00/0000'} - The empty value of the day component.
20
+ * @returns {''} - The empty value of the day component.
21
21
  */
22
- get emptyValue(): "00/00/0000";
22
+ get emptyValue(): "";
23
23
  get valueMask(): RegExp;
24
24
  get dayRequired(): any;
25
25
  get showDay(): boolean;
@@ -62,10 +62,10 @@ export default class DayComponent extends Field {
62
62
  }
63
63
  /**
64
64
  * The empty value for day component.
65
- * @returns {'00/00/0000'} - The empty value of the day component.
65
+ * @returns {''} - The empty value of the day component.
66
66
  */
67
67
  get emptyValue() {
68
- return '00/00/0000';
68
+ return '';
69
69
  }
70
70
  get valueMask() {
71
71
  return /^\d{2}\/\d{2}\/\d{4}$/;
@@ -361,7 +361,7 @@ export default class DayComponent extends Field {
361
361
  setValueAt(index, value) {
362
362
  // temporary solution to avoid input reset
363
363
  // on invalid date.
364
- if (!value || value === 'Invalid date') {
364
+ if (value === 'Invalid date') {
365
365
  return null;
366
366
  }
367
367
  const parts = value.split('/');
@@ -7,4 +7,5 @@ import comp5 from './comp5';
7
7
  import comp6 from './comp6';
8
8
  import comp7 from './comp7';
9
9
  import comp8 from './comp8';
10
- export { formModalEdit, comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8 };
10
+ import nestedWizardForm from './nestedWizardForm';
11
+ export { formModalEdit, comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, nestedWizardForm };
@@ -7,4 +7,5 @@ import comp5 from './comp5';
7
7
  import comp6 from './comp6';
8
8
  import comp7 from './comp7';
9
9
  import comp8 from './comp8';
10
- export { formModalEdit, comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8 };
10
+ import nestedWizardForm from './nestedWizardForm';
11
+ export { formModalEdit, comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, nestedWizardForm };