@formio/js 5.0.0-dev.5673.3d062b9 → 5.0.0-dev.5675.508790e

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 (51) hide show
  1. package/dist/formio.form.js +10 -10
  2. package/dist/formio.form.min.js +1 -1
  3. package/dist/formio.full.js +10 -10
  4. package/dist/formio.full.min.js +1 -1
  5. package/dist/formio.utils.js +3 -3
  6. package/dist/formio.utils.min.js +1 -1
  7. package/lib/cjs/Webform.d.ts +1 -1
  8. package/lib/cjs/Webform.js +4 -2
  9. package/lib/cjs/components/_classes/component/Component.d.ts +2 -2
  10. package/lib/cjs/components/_classes/component/Component.js +2 -2
  11. package/lib/cjs/components/_classes/input/Input.js +23 -1
  12. package/lib/cjs/components/_classes/multivalue/Multivalue.d.ts +1 -1
  13. package/lib/cjs/components/_classes/multivalue/Multivalue.js +8 -1
  14. package/lib/cjs/components/form/Form.d.ts +1 -1
  15. package/lib/cjs/components/form/Form.js +1 -1
  16. package/lib/cjs/components/number/Number.js +1 -1
  17. package/lib/cjs/components/number/fixtures/comp8.d.ts +32 -0
  18. package/lib/cjs/components/number/fixtures/comp8.js +28 -0
  19. package/lib/cjs/components/number/fixtures/index.d.ts +2 -1
  20. package/lib/cjs/components/number/fixtures/index.js +3 -1
  21. package/lib/cjs/components/phonenumber/fixtures/comp2.d.ts +16 -0
  22. package/lib/cjs/components/phonenumber/fixtures/comp2.js +25 -0
  23. package/lib/cjs/components/phonenumber/fixtures/index.d.ts +2 -1
  24. package/lib/cjs/components/phonenumber/fixtures/index.js +3 -1
  25. package/lib/cjs/components/select/Select.js +1 -2
  26. package/lib/cjs/utils/conditionOperators/DateGreaterThan.js +1 -2
  27. package/lib/cjs/utils/conditionOperators/IsEmptyValue.js +1 -2
  28. package/lib/cjs/utils/conditionOperators/IsEqualTo.js +3 -3
  29. package/lib/mjs/Webform.d.ts +1 -1
  30. package/lib/mjs/Webform.js +4 -2
  31. package/lib/mjs/components/_classes/component/Component.d.ts +2 -2
  32. package/lib/mjs/components/_classes/component/Component.js +2 -2
  33. package/lib/mjs/components/_classes/input/Input.js +22 -1
  34. package/lib/mjs/components/_classes/multivalue/Multivalue.d.ts +1 -1
  35. package/lib/mjs/components/_classes/multivalue/Multivalue.js +8 -1
  36. package/lib/mjs/components/form/Form.d.ts +1 -1
  37. package/lib/mjs/components/form/Form.js +1 -1
  38. package/lib/mjs/components/number/Number.js +1 -1
  39. package/lib/mjs/components/number/fixtures/comp8.d.ts +32 -0
  40. package/lib/mjs/components/number/fixtures/comp8.js +26 -0
  41. package/lib/mjs/components/number/fixtures/index.d.ts +2 -1
  42. package/lib/mjs/components/number/fixtures/index.js +2 -1
  43. package/lib/mjs/components/phonenumber/fixtures/comp2.d.ts +16 -0
  44. package/lib/mjs/components/phonenumber/fixtures/comp2.js +23 -0
  45. package/lib/mjs/components/phonenumber/fixtures/index.d.ts +2 -1
  46. package/lib/mjs/components/phonenumber/fixtures/index.js +2 -1
  47. package/lib/mjs/components/select/Select.js +1 -2
  48. package/lib/mjs/utils/conditionOperators/DateGreaterThan.js +1 -1
  49. package/lib/mjs/utils/conditionOperators/IsEmptyValue.js +1 -1
  50. package/lib/mjs/utils/conditionOperators/IsEqualTo.js +1 -1
  51. package/package.json +1 -1
@@ -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());
@@ -19,7 +19,7 @@ export default class DateGeaterThan extends ConditionOperator {
19
19
  return false;
20
20
  }
21
21
  let conditionTriggerComponent = null;
22
- if (instance?.root?.getComponent) {
22
+ if (instance && instance.root) {
23
23
  conditionTriggerComponent = instance.root.getComponent(conditionComponentPath);
24
24
  }
25
25
  if (conditionTriggerComponent && conditionTriggerComponent.isPartialDay && conditionTriggerComponent.isPartialDay(value)) {
@@ -12,7 +12,7 @@ export default class IsEmptyValue extends ConditionOperator {
12
12
  }
13
13
  execute({ value, instance, conditionComponentPath }) {
14
14
  const isEmptyValue = _.isEmpty(value);
15
- if (instance?.root?.getComponent) {
15
+ if (instance && instance.root) {
16
16
  const conditionTriggerComponent = instance.root.getComponent(conditionComponentPath);
17
17
  return conditionTriggerComponent ? conditionTriggerComponent.isEmpty() : isEmptyValue;
18
18
  }
@@ -16,7 +16,7 @@ export default class IsEqualTo extends ConditionOperator {
16
16
  // eslint-disable-next-line no-empty
17
17
  catch (e) { }
18
18
  }
19
- if (instance?.root?.getComponent) {
19
+ if (instance && instance.root) {
20
20
  const conditionTriggerComponent = instance.root.getComponent(conditionComponentPath);
21
21
  if (conditionTriggerComponent
22
22
  && isSelectResourceWithObjectValue(conditionTriggerComponent.component)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.0.0-dev.5673.3d062b9",
3
+ "version": "5.0.0-dev.5675.508790e",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {