@formio/js 5.0.0-rc.66 → 5.0.0-rc.67
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/formio.embed.js +1 -1
- package/dist/formio.embed.min.js +1 -1
- package/dist/formio.embed.min.js.LICENSE.txt +1 -1
- package/dist/formio.form.js +9 -9
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +1 -1
- package/dist/formio.full.js +10 -10
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +1 -1
- package/dist/formio.js +2 -2
- package/dist/formio.min.js +1 -1
- package/dist/formio.min.js.LICENSE.txt +1 -1
- package/dist/formio.utils.js +3 -3
- package/dist/formio.utils.min.js +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +1 -1
- package/lib/cjs/Webform.js +4 -0
- package/lib/cjs/components/address/Address.js +4 -0
- package/lib/cjs/components/address/editForm/Address.edit.provider.js +1 -1
- package/lib/cjs/components/day/fixtures/comp8.d.ts +41 -0
- package/lib/cjs/components/day/fixtures/comp8.js +40 -0
- package/lib/cjs/components/day/fixtures/index.d.ts +2 -1
- package/lib/cjs/components/day/fixtures/index.js +3 -1
- package/lib/cjs/components/editgrid/EditGrid.js +2 -2
- package/lib/cjs/translations/en.d.ts +3 -0
- package/lib/cjs/translations/en.js +4 -1
- package/lib/mjs/Webform.js +4 -0
- package/lib/mjs/components/address/Address.js +4 -0
- package/lib/mjs/components/address/editForm/Address.edit.provider.js +1 -1
- package/lib/mjs/components/day/fixtures/comp8.d.ts +41 -0
- package/lib/mjs/components/day/fixtures/comp8.js +38 -0
- package/lib/mjs/components/day/fixtures/index.d.ts +2 -1
- package/lib/mjs/components/day/fixtures/index.js +2 -1
- package/lib/mjs/components/editgrid/EditGrid.js +2 -2
- package/lib/mjs/translations/en.d.ts +3 -0
- package/lib/mjs/translations/en.js +4 -1
- package/package.json +2 -2
@@ -20,7 +20,7 @@
|
|
20
20
|
|
21
21
|
/*! @license DOMPurify 3.1.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.5/LICENSE */
|
22
22
|
|
23
|
-
/*! formiojs v5.0.0-rc.
|
23
|
+
/*! formiojs v5.0.0-rc.67 | https://unpkg.com/formiojs@5.0.0-rc.67/LICENSE.txt */
|
24
24
|
|
25
25
|
/**
|
26
26
|
* @license
|
package/lib/cjs/Webform.js
CHANGED
@@ -13,6 +13,10 @@ const Components_1 = __importDefault(require("./components/Components"));
|
|
13
13
|
const NestedDataComponent_1 = __importDefault(require("./components/_classes/nesteddata/NestedDataComponent"));
|
14
14
|
const utils_1 = require("./utils/utils");
|
15
15
|
const formUtils_1 = require("./utils/formUtils");
|
16
|
+
// We need this here because dragula pulls in CustomEvent class that requires global to exist.
|
17
|
+
if (typeof window !== 'undefined' && typeof window.global === 'undefined') {
|
18
|
+
window.global = window;
|
19
|
+
}
|
16
20
|
const dragula_1 = __importDefault(require("dragula"));
|
17
21
|
// Initialize the available forms.
|
18
22
|
Formio_1.Formio.forms = {};
|
@@ -113,6 +113,10 @@ class AddressComponent extends Container_1.default {
|
|
113
113
|
if (!this.builderMode) {
|
114
114
|
if (this.component.provider) {
|
115
115
|
const { provider, providerOptions, } = this.component;
|
116
|
+
if (lodash_1.default.get(providerOptions, 'params.subscriptionKey')) {
|
117
|
+
lodash_1.default.set(providerOptions, "params['subscription-key']", lodash_1.default.get(providerOptions, 'params.subscriptionKey'));
|
118
|
+
lodash_1.default.unset(providerOptions, 'params.subscriptionKey');
|
119
|
+
}
|
116
120
|
this.provider = this.initializeProvider(provider, providerOptions);
|
117
121
|
}
|
118
122
|
else if (this.component.map) {
|
@@ -0,0 +1,41 @@
|
|
1
|
+
declare namespace _default {
|
2
|
+
let components: ({
|
3
|
+
label: string;
|
4
|
+
hideInputLabels: boolean;
|
5
|
+
inputsLabelPosition: string;
|
6
|
+
useLocaleSettings: boolean;
|
7
|
+
alwaysEnabled: boolean;
|
8
|
+
tableView: boolean;
|
9
|
+
fields: {
|
10
|
+
day: {
|
11
|
+
hide: boolean;
|
12
|
+
required: boolean;
|
13
|
+
};
|
14
|
+
month: {
|
15
|
+
hide: boolean;
|
16
|
+
required: boolean;
|
17
|
+
};
|
18
|
+
year: {
|
19
|
+
hide: boolean;
|
20
|
+
required: boolean;
|
21
|
+
};
|
22
|
+
};
|
23
|
+
key: string;
|
24
|
+
type: string;
|
25
|
+
input: boolean;
|
26
|
+
showValidations?: undefined;
|
27
|
+
} | {
|
28
|
+
label: string;
|
29
|
+
showValidations: boolean;
|
30
|
+
alwaysEnabled: boolean;
|
31
|
+
tableView: boolean;
|
32
|
+
key: string;
|
33
|
+
type: string;
|
34
|
+
input: boolean;
|
35
|
+
hideInputLabels?: undefined;
|
36
|
+
inputsLabelPosition?: undefined;
|
37
|
+
useLocaleSettings?: undefined;
|
38
|
+
fields?: undefined;
|
39
|
+
})[];
|
40
|
+
}
|
41
|
+
export default _default;
|
@@ -0,0 +1,40 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.default = {
|
4
|
+
"components": [
|
5
|
+
{
|
6
|
+
"label": "Day - Table",
|
7
|
+
"hideInputLabels": false,
|
8
|
+
"inputsLabelPosition": "top",
|
9
|
+
"useLocaleSettings": false,
|
10
|
+
"alwaysEnabled": false,
|
11
|
+
"tableView": false,
|
12
|
+
"fields": {
|
13
|
+
"day": {
|
14
|
+
"hide": false,
|
15
|
+
"required": true
|
16
|
+
},
|
17
|
+
"month": {
|
18
|
+
"hide": false,
|
19
|
+
"required": true
|
20
|
+
},
|
21
|
+
"year": {
|
22
|
+
"hide": false,
|
23
|
+
"required": true
|
24
|
+
}
|
25
|
+
},
|
26
|
+
"key": "dayTable",
|
27
|
+
"type": "day",
|
28
|
+
"input": true
|
29
|
+
},
|
30
|
+
{
|
31
|
+
"label": "Submit",
|
32
|
+
"showValidations": false,
|
33
|
+
"alwaysEnabled": false,
|
34
|
+
"tableView": false,
|
35
|
+
"key": "submit",
|
36
|
+
"type": "button",
|
37
|
+
"input": true
|
38
|
+
}
|
39
|
+
]
|
40
|
+
};
|
@@ -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
|
-
|
8
|
+
import comp8 from './comp8';
|
9
|
+
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8 };
|
@@ -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.comp7 = exports.comp6 = exports.comp5 = exports.comp4 = exports.comp3 = exports.comp2 = exports.comp1 = void 0;
|
6
|
+
exports.comp8 = 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,3 +18,5 @@ 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;
|
@@ -88,7 +88,7 @@ class EditGridComponent extends NestedArrayComponent_1.default {
|
|
88
88
|
{% if (!instance.options.readOnly && !instance.disabled) { %}
|
89
89
|
<div class="col-sm-2">
|
90
90
|
<div class="btn-group pull-right">
|
91
|
-
<button class="btn btn-default btn-light btn-sm editRow"><i class="{{ iconClass('
|
91
|
+
<button class="btn btn-default btn-light btn-sm editRow"><i class="{{ iconClass('edit') }}"></i></button>
|
92
92
|
{% if (!instance.hasRemoveButtons || instance.hasRemoveButtons()) { %}
|
93
93
|
<button class="btn btn-danger btn-sm removeRow"><i class="{{ iconClass('trash') }}"></i></button>
|
94
94
|
{% } %}
|
@@ -109,7 +109,7 @@ class EditGridComponent extends NestedArrayComponent_1.default {
|
|
109
109
|
{% if (!instance.options.readOnly && !instance.disabled) { %}
|
110
110
|
<td class="editgrid-table-column">
|
111
111
|
<div class="btn-group">
|
112
|
-
<button class="btn btn-default btn-light btn-sm editRow" aria-label="{{ t('Edit row') }}"><i class="{{ iconClass('
|
112
|
+
<button class="btn btn-default btn-light btn-sm editRow" aria-label="{{ t('Edit row') }}"><i class="{{ iconClass('edit') }}"></i></button>
|
113
113
|
{% if (!instance.hasRemoveButtons || instance.hasRemoveButtons()) { %}
|
114
114
|
<button class="btn btn-danger btn-sm removeRow" aria-label="{{ t('Remove row') }}"><i class="{{ iconClass('trash') }}"></i></button>
|
115
115
|
{% } %}
|
@@ -75,5 +75,8 @@ exports.default = {
|
|
75
75
|
reCaptchaTokenNotSpecifiedError: 'ReCAPTCHA: Token is not specified in submission',
|
76
76
|
apiKey: 'API Key is not unique: {{key}}',
|
77
77
|
typeRemaining: '{{ remaining }} {{ type }} remaining.',
|
78
|
-
typeCount: '{{ count }} {{ type }}'
|
78
|
+
typeCount: '{{ count }} {{ type }}',
|
79
|
+
requiredDayField: '{{ field }} is required',
|
80
|
+
requiredMonthField: '{{ field }} is required',
|
81
|
+
requiredYearField: '{{ field }} is required'
|
79
82
|
};
|
package/lib/mjs/Webform.js
CHANGED
@@ -8,6 +8,10 @@ import Components from "./components/Components";
|
|
8
8
|
import NestedDataComponent from "./components/_classes/nesteddata/NestedDataComponent";
|
9
9
|
import { fastCloneDeep, currentTimezone, unescapeHTML, getStringFromComponentPath, convertStringToHTMLElement, getArrayFromComponentPath, } from "./utils/utils";
|
10
10
|
import { eachComponent } from "./utils/formUtils";
|
11
|
+
// We need this here because dragula pulls in CustomEvent class that requires global to exist.
|
12
|
+
if (typeof window !== 'undefined' && typeof window.global === 'undefined') {
|
13
|
+
window.global = window;
|
14
|
+
}
|
11
15
|
import dragula from "dragula";
|
12
16
|
// Initialize the available forms.
|
13
17
|
Formio.forms = {};
|
@@ -107,6 +107,10 @@ export default class AddressComponent extends ContainerComponent {
|
|
107
107
|
if (!this.builderMode) {
|
108
108
|
if (this.component.provider) {
|
109
109
|
const { provider, providerOptions, } = this.component;
|
110
|
+
if (_.get(providerOptions, 'params.subscriptionKey')) {
|
111
|
+
_.set(providerOptions, "params['subscription-key']", _.get(providerOptions, 'params.subscriptionKey'));
|
112
|
+
_.unset(providerOptions, 'params.subscriptionKey');
|
113
|
+
}
|
110
114
|
this.provider = this.initializeProvider(provider, providerOptions);
|
111
115
|
}
|
112
116
|
else if (this.component.map) {
|
@@ -0,0 +1,41 @@
|
|
1
|
+
declare namespace _default {
|
2
|
+
let components: ({
|
3
|
+
label: string;
|
4
|
+
hideInputLabels: boolean;
|
5
|
+
inputsLabelPosition: string;
|
6
|
+
useLocaleSettings: boolean;
|
7
|
+
alwaysEnabled: boolean;
|
8
|
+
tableView: boolean;
|
9
|
+
fields: {
|
10
|
+
day: {
|
11
|
+
hide: boolean;
|
12
|
+
required: boolean;
|
13
|
+
};
|
14
|
+
month: {
|
15
|
+
hide: boolean;
|
16
|
+
required: boolean;
|
17
|
+
};
|
18
|
+
year: {
|
19
|
+
hide: boolean;
|
20
|
+
required: boolean;
|
21
|
+
};
|
22
|
+
};
|
23
|
+
key: string;
|
24
|
+
type: string;
|
25
|
+
input: boolean;
|
26
|
+
showValidations?: undefined;
|
27
|
+
} | {
|
28
|
+
label: string;
|
29
|
+
showValidations: boolean;
|
30
|
+
alwaysEnabled: boolean;
|
31
|
+
tableView: boolean;
|
32
|
+
key: string;
|
33
|
+
type: string;
|
34
|
+
input: boolean;
|
35
|
+
hideInputLabels?: undefined;
|
36
|
+
inputsLabelPosition?: undefined;
|
37
|
+
useLocaleSettings?: undefined;
|
38
|
+
fields?: undefined;
|
39
|
+
})[];
|
40
|
+
}
|
41
|
+
export default _default;
|
@@ -0,0 +1,38 @@
|
|
1
|
+
export default {
|
2
|
+
"components": [
|
3
|
+
{
|
4
|
+
"label": "Day - Table",
|
5
|
+
"hideInputLabels": false,
|
6
|
+
"inputsLabelPosition": "top",
|
7
|
+
"useLocaleSettings": false,
|
8
|
+
"alwaysEnabled": false,
|
9
|
+
"tableView": false,
|
10
|
+
"fields": {
|
11
|
+
"day": {
|
12
|
+
"hide": false,
|
13
|
+
"required": true
|
14
|
+
},
|
15
|
+
"month": {
|
16
|
+
"hide": false,
|
17
|
+
"required": true
|
18
|
+
},
|
19
|
+
"year": {
|
20
|
+
"hide": false,
|
21
|
+
"required": true
|
22
|
+
}
|
23
|
+
},
|
24
|
+
"key": "dayTable",
|
25
|
+
"type": "day",
|
26
|
+
"input": true
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"label": "Submit",
|
30
|
+
"showValidations": false,
|
31
|
+
"alwaysEnabled": false,
|
32
|
+
"tableView": false,
|
33
|
+
"key": "submit",
|
34
|
+
"type": "button",
|
35
|
+
"input": true
|
36
|
+
}
|
37
|
+
]
|
38
|
+
};
|
@@ -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
|
-
|
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
|
-
|
8
|
+
import comp8 from './comp8';
|
9
|
+
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8 };
|
@@ -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('
|
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('
|
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
|
{% } %}
|
@@ -73,5 +73,8 @@ export default {
|
|
73
73
|
reCaptchaTokenNotSpecifiedError: 'ReCAPTCHA: Token is not specified in submission',
|
74
74
|
apiKey: 'API Key is not unique: {{key}}',
|
75
75
|
typeRemaining: '{{ remaining }} {{ type }} remaining.',
|
76
|
-
typeCount: '{{ count }} {{ type }}'
|
76
|
+
typeCount: '{{ count }} {{ type }}',
|
77
|
+
requiredDayField: '{{ field }} is required',
|
78
|
+
requiredMonthField: '{{ field }} is required',
|
79
|
+
requiredYearField: '{{ field }} is required'
|
77
80
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@formio/js",
|
3
|
-
"version": "5.0.0-rc.
|
3
|
+
"version": "5.0.0-rc.67",
|
4
4
|
"description": "JavaScript powered Forms with JSON Form Builder",
|
5
5
|
"main": "lib/cjs/index.js",
|
6
6
|
"exports": {
|
@@ -81,7 +81,7 @@
|
|
81
81
|
"dependencies": {
|
82
82
|
"@formio/bootstrap": "3.0.0-rc.36",
|
83
83
|
"@formio/choices.js": "^10.2.1",
|
84
|
-
"@formio/core": "2.2.0-rc.
|
84
|
+
"@formio/core": "2.2.0-rc.5",
|
85
85
|
"@formio/text-mask-addons": "^3.8.0-formio.2",
|
86
86
|
"@formio/vanilla-text-mask": "^5.1.1-formio.1",
|
87
87
|
"abortcontroller-polyfill": "^1.7.5",
|