@formio/js 5.0.0-dev.5671.e370c98 → 5.0.0-dev.5672.279701a
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 +2 -2
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +2 -2
- package/dist/formio.full.min.js +1 -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/number/Number.js +1 -1
- package/lib/cjs/components/number/fixtures/index.d.ts +1 -2
- package/lib/cjs/components/number/fixtures/index.js +1 -3
- 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/mjs/components/_classes/multivalue/Multivalue.d.ts +1 -1
- package/lib/mjs/components/_classes/multivalue/Multivalue.js +8 -1
- package/lib/mjs/components/number/Number.js +1 -1
- package/lib/mjs/components/number/fixtures/index.d.ts +1 -2
- package/lib/mjs/components/number/fixtures/index.js +1 -2
- 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/package.json +1 -1
- package/lib/cjs/components/number/fixtures/comp8.d.ts +0 -32
- package/lib/cjs/components/number/fixtures/comp8.js +0 -28
- package/lib/mjs/components/number/fixtures/comp8.d.ts +0 -32
- package/lib/mjs/components/number/fixtures/comp8.js +0 -26
|
@@ -44,7 +44,7 @@ export default class Multivalue extends Field {
|
|
|
44
44
|
attachMultiMask(index: number): boolean;
|
|
45
45
|
/**
|
|
46
46
|
* @param {any} input - The input element on which the mask is to be applied.
|
|
47
|
-
* @param {string} mask - The mask pattern to apply to the input element. Exit early if no mask.
|
|
47
|
+
* @param {string} mask - The mask pattern to apply to the input element. Exit early and remove previous mask if no mask.
|
|
48
48
|
*/
|
|
49
49
|
updateMask(input: any, mask: string): void;
|
|
50
50
|
/**
|
|
@@ -237,10 +237,17 @@ class Multivalue extends Field_1.default {
|
|
|
237
237
|
}
|
|
238
238
|
/**
|
|
239
239
|
* @param {any} input - The input element on which the mask is to be applied.
|
|
240
|
-
* @param {string} mask - The mask pattern to apply to the input element. Exit early if no mask.
|
|
240
|
+
* @param {string} mask - The mask pattern to apply to the input element. Exit early and remove previous mask if no mask.
|
|
241
241
|
*/
|
|
242
242
|
updateMask(input, mask) {
|
|
243
243
|
if (!mask) {
|
|
244
|
+
if (input.mask) {
|
|
245
|
+
input.mask.destroy();
|
|
246
|
+
}
|
|
247
|
+
if (!this.component.placeholder) {
|
|
248
|
+
input.removeAttribute('placeholder');
|
|
249
|
+
}
|
|
250
|
+
input.value = '';
|
|
244
251
|
return;
|
|
245
252
|
}
|
|
246
253
|
this.setInputMask(input, mask, !this.component.placeholder);
|
|
@@ -48,7 +48,7 @@ class NumberComponent extends Input_1.default {
|
|
|
48
48
|
var _a, _b;
|
|
49
49
|
super(...args);
|
|
50
50
|
const separators = (0, utils_1.getNumberSeparators)(this.options.language || navigator.language);
|
|
51
|
-
this.decimalSeparator = this.options.decimalSeparator = this.
|
|
51
|
+
this.decimalSeparator = this.options.decimalSeparator = this.options.decimalSeparator
|
|
52
52
|
|| ((_a = this.options.properties) === null || _a === void 0 ? void 0 : _a.decimalSeparator)
|
|
53
53
|
|| separators.decimalSeparator;
|
|
54
54
|
if (this.component.delimiter) {
|
|
@@ -5,5 +5,4 @@ import comp4 from './comp4';
|
|
|
5
5
|
import comp5 from './comp5';
|
|
6
6
|
import comp6 from './comp6';
|
|
7
7
|
import comp7 from './comp7';
|
|
8
|
-
|
|
9
|
-
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8 };
|
|
8
|
+
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7 };
|
|
@@ -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
|
-
exports.
|
|
6
|
+
exports.comp7 = exports.comp6 = exports.comp5 = exports.comp4 = exports.comp3 = exports.comp2 = exports.comp1 = void 0;
|
|
7
7
|
const comp1_1 = __importDefault(require("./comp1"));
|
|
8
8
|
exports.comp1 = comp1_1.default;
|
|
9
9
|
const comp2_1 = __importDefault(require("./comp2"));
|
|
@@ -18,5 +18,3 @@ const comp6_1 = __importDefault(require("./comp6"));
|
|
|
18
18
|
exports.comp6 = comp6_1.default;
|
|
19
19
|
const comp7_1 = __importDefault(require("./comp7"));
|
|
20
20
|
exports.comp7 = comp7_1.default;
|
|
21
|
-
const comp8_1 = __importDefault(require("./comp8"));
|
|
22
|
-
exports.comp8 = comp8_1.default;
|
|
@@ -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,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
components: [
|
|
5
|
+
{
|
|
6
|
+
"label": "Phone Number",
|
|
7
|
+
"applyMaskOn": "change",
|
|
8
|
+
"allowMultipleMasks": true,
|
|
9
|
+
"tableView": true,
|
|
10
|
+
"key": "phoneNumber",
|
|
11
|
+
"type": "phoneNumber",
|
|
12
|
+
"inputMasks": [
|
|
13
|
+
{
|
|
14
|
+
"label": "Canada",
|
|
15
|
+
"mask": "(999) 999-9999"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"label": "Other",
|
|
19
|
+
"mask": ""
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"input": true
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
};
|
|
@@ -3,6 +3,8 @@ 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
|
-
exports.comp1 = void 0;
|
|
6
|
+
exports.comp2 = exports.comp1 = void 0;
|
|
7
7
|
const comp1_1 = __importDefault(require("./comp1"));
|
|
8
8
|
exports.comp1 = comp1_1.default;
|
|
9
|
+
const comp2_1 = __importDefault(require("./comp2"));
|
|
10
|
+
exports.comp2 = comp2_1.default;
|
|
@@ -44,7 +44,7 @@ export default class Multivalue extends Field {
|
|
|
44
44
|
attachMultiMask(index: number): boolean;
|
|
45
45
|
/**
|
|
46
46
|
* @param {any} input - The input element on which the mask is to be applied.
|
|
47
|
-
* @param {string} mask - The mask pattern to apply to the input element. Exit early if no mask.
|
|
47
|
+
* @param {string} mask - The mask pattern to apply to the input element. Exit early and remove previous mask if no mask.
|
|
48
48
|
*/
|
|
49
49
|
updateMask(input: any, mask: string): void;
|
|
50
50
|
/**
|
|
@@ -232,10 +232,17 @@ export default class Multivalue extends Field {
|
|
|
232
232
|
}
|
|
233
233
|
/**
|
|
234
234
|
* @param {any} input - The input element on which the mask is to be applied.
|
|
235
|
-
* @param {string} mask - The mask pattern to apply to the input element. Exit early if no mask.
|
|
235
|
+
* @param {string} mask - The mask pattern to apply to the input element. Exit early and remove previous mask if no mask.
|
|
236
236
|
*/
|
|
237
237
|
updateMask(input, mask) {
|
|
238
238
|
if (!mask) {
|
|
239
|
+
if (input.mask) {
|
|
240
|
+
input.mask.destroy();
|
|
241
|
+
}
|
|
242
|
+
if (!this.component.placeholder) {
|
|
243
|
+
input.removeAttribute('placeholder');
|
|
244
|
+
}
|
|
245
|
+
input.value = '';
|
|
239
246
|
return;
|
|
240
247
|
}
|
|
241
248
|
this.setInputMask(input, mask, !this.component.placeholder);
|
|
@@ -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.
|
|
49
|
+
this.decimalSeparator = this.options.decimalSeparator = this.options.decimalSeparator
|
|
50
50
|
|| this.options.properties?.decimalSeparator
|
|
51
51
|
|| separators.decimalSeparator;
|
|
52
52
|
if (this.component.delimiter) {
|
|
@@ -5,5 +5,4 @@ import comp4 from './comp4';
|
|
|
5
5
|
import comp5 from './comp5';
|
|
6
6
|
import comp6 from './comp6';
|
|
7
7
|
import comp7 from './comp7';
|
|
8
|
-
|
|
9
|
-
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8 };
|
|
8
|
+
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7 };
|
|
@@ -5,5 +5,4 @@ import comp4 from './comp4';
|
|
|
5
5
|
import comp5 from './comp5';
|
|
6
6
|
import comp6 from './comp6';
|
|
7
7
|
import comp7 from './comp7';
|
|
8
|
-
|
|
9
|
-
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8 };
|
|
8
|
+
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7 };
|
|
@@ -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
|
+
};
|
package/package.json
CHANGED
|
@@ -1,32 +0,0 @@
|
|
|
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;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = {
|
|
4
|
-
components: [
|
|
5
|
-
{
|
|
6
|
-
"label": "Number",
|
|
7
|
-
"applyMaskOn": "change",
|
|
8
|
-
"mask": false,
|
|
9
|
-
"tableView": false,
|
|
10
|
-
"delimiter": false,
|
|
11
|
-
"requireDecimal": false,
|
|
12
|
-
"inputFormat": "plain",
|
|
13
|
-
"truncateMultipleSpaces": false,
|
|
14
|
-
"key": "number",
|
|
15
|
-
"type": "number",
|
|
16
|
-
"input": true,
|
|
17
|
-
"decimalSymbol": "-"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"type": "button",
|
|
21
|
-
"label": "Submit",
|
|
22
|
-
"key": "submit",
|
|
23
|
-
"disableOnInvalid": true,
|
|
24
|
-
"input": true,
|
|
25
|
-
"tableView": false
|
|
26
|
-
}
|
|
27
|
-
]
|
|
28
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
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;
|
|
@@ -1,26 +0,0 @@
|
|
|
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
|
-
};
|