@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.
- package/dist/formio.form.js +10 -10
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +10 -10
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.utils.js +3 -3
- package/dist/formio.utils.min.js +1 -1
- package/lib/cjs/Webform.d.ts +1 -1
- package/lib/cjs/Webform.js +4 -2
- package/lib/cjs/components/_classes/component/Component.d.ts +2 -2
- package/lib/cjs/components/_classes/component/Component.js +2 -2
- package/lib/cjs/components/_classes/input/Input.js +23 -1
- package/lib/cjs/components/_classes/multivalue/Multivalue.d.ts +1 -1
- package/lib/cjs/components/_classes/multivalue/Multivalue.js +8 -1
- package/lib/cjs/components/form/Form.d.ts +1 -1
- package/lib/cjs/components/form/Form.js +1 -1
- package/lib/cjs/components/number/Number.js +1 -1
- package/lib/cjs/components/number/fixtures/comp8.d.ts +32 -0
- package/lib/cjs/components/number/fixtures/comp8.js +28 -0
- package/lib/cjs/components/number/fixtures/index.d.ts +2 -1
- package/lib/cjs/components/number/fixtures/index.js +3 -1
- package/lib/cjs/components/phonenumber/fixtures/comp2.d.ts +16 -0
- package/lib/cjs/components/phonenumber/fixtures/comp2.js +25 -0
- package/lib/cjs/components/phonenumber/fixtures/index.d.ts +2 -1
- package/lib/cjs/components/phonenumber/fixtures/index.js +3 -1
- package/lib/cjs/components/select/Select.js +1 -2
- package/lib/cjs/utils/conditionOperators/DateGreaterThan.js +1 -2
- package/lib/cjs/utils/conditionOperators/IsEmptyValue.js +1 -2
- package/lib/cjs/utils/conditionOperators/IsEqualTo.js +3 -3
- package/lib/mjs/Webform.d.ts +1 -1
- package/lib/mjs/Webform.js +4 -2
- package/lib/mjs/components/_classes/component/Component.d.ts +2 -2
- package/lib/mjs/components/_classes/component/Component.js +2 -2
- package/lib/mjs/components/_classes/input/Input.js +22 -1
- package/lib/mjs/components/_classes/multivalue/Multivalue.d.ts +1 -1
- package/lib/mjs/components/_classes/multivalue/Multivalue.js +8 -1
- package/lib/mjs/components/form/Form.d.ts +1 -1
- package/lib/mjs/components/form/Form.js +1 -1
- package/lib/mjs/components/number/Number.js +1 -1
- package/lib/mjs/components/number/fixtures/comp8.d.ts +32 -0
- package/lib/mjs/components/number/fixtures/comp8.js +26 -0
- package/lib/mjs/components/number/fixtures/index.d.ts +2 -1
- package/lib/mjs/components/number/fixtures/index.js +2 -1
- package/lib/mjs/components/phonenumber/fixtures/comp2.d.ts +16 -0
- package/lib/mjs/components/phonenumber/fixtures/comp2.js +23 -0
- package/lib/mjs/components/phonenumber/fixtures/index.d.ts +2 -1
- package/lib/mjs/components/phonenumber/fixtures/index.js +2 -1
- package/lib/mjs/components/select/Select.js +1 -2
- package/lib/mjs/utils/conditionOperators/DateGreaterThan.js +1 -1
- package/lib/mjs/utils/conditionOperators/IsEmptyValue.js +1 -1
- package/lib/mjs/utils/conditionOperators/IsEqualTo.js +1 -1
- 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,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
|
-
|
|
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
|
|
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
|
|
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
|
|
19
|
+
if (instance && instance.root) {
|
|
20
20
|
const conditionTriggerComponent = instance.root.getComponent(conditionComponentPath);
|
|
21
21
|
if (conditionTriggerComponent
|
|
22
22
|
&& isSelectResourceWithObjectValue(conditionTriggerComponent.component)
|