@formio/js 5.0.0-rc.64 → 5.0.0-rc.66
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.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 +943 -87
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +1 -1
- package/dist/formio.full.js +472 -12
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +1 -1
- package/dist/formio.js +3 -3
- package/dist/formio.min.js +1 -1
- package/dist/formio.min.js.LICENSE.txt +1 -1
- package/dist/formio.utils.js +815 -25
- package/dist/formio.utils.min.js +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +1 -1
- package/lib/cjs/Webform.js +2 -0
- package/lib/cjs/components/_classes/component/editForm/Component.edit.display.js +8 -0
- package/lib/cjs/components/datagrid/fixtures/comp9.d.ts +41 -0
- package/lib/cjs/components/datagrid/fixtures/comp9.js +44 -0
- package/lib/cjs/components/datagrid/fixtures/index.d.ts +2 -1
- package/lib/cjs/components/datagrid/fixtures/index.js +3 -1
- package/lib/mjs/Webform.js +2 -0
- package/lib/mjs/components/_classes/component/editForm/Component.edit.display.js +8 -0
- package/lib/mjs/components/datagrid/fixtures/comp9.d.ts +41 -0
- package/lib/mjs/components/datagrid/fixtures/comp9.js +42 -0
- package/lib/mjs/components/datagrid/fixtures/index.d.ts +2 -1
- package/lib/mjs/components/datagrid/fixtures/index.js +2 -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.66 | https://unpkg.com/formiojs@5.0.0-rc.66/LICENSE.txt */
|
24
24
|
|
25
25
|
/**
|
26
26
|
* @license
|
package/lib/cjs/Webform.js
CHANGED
@@ -13,6 +13,7 @@ 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
|
+
const dragula_1 = __importDefault(require("dragula"));
|
16
17
|
// Initialize the available forms.
|
17
18
|
Formio_1.Formio.forms = {};
|
18
19
|
// Allow people to register components.
|
@@ -309,6 +310,7 @@ class Webform extends NestedDataComponent_1.default {
|
|
309
310
|
// Ensure the root is set to this component.
|
310
311
|
this.root = this;
|
311
312
|
this.localRoot = this;
|
313
|
+
this.root.dragulaLib = dragula_1.default;
|
312
314
|
}
|
313
315
|
/* eslint-enable max-statements */
|
314
316
|
get language() {
|
@@ -190,5 +190,13 @@ exports.default = [
|
|
190
190
|
key: 'tableView',
|
191
191
|
input: true
|
192
192
|
},
|
193
|
+
{
|
194
|
+
weight: 1600,
|
195
|
+
type: 'checkbox',
|
196
|
+
label: 'Modal Edit',
|
197
|
+
tooltip: 'Opens up a modal to edit the value of this component.',
|
198
|
+
key: 'modalEdit',
|
199
|
+
input: true
|
200
|
+
}
|
193
201
|
];
|
194
202
|
/* eslint-enable max-len */
|
@@ -0,0 +1,41 @@
|
|
1
|
+
declare namespace _default {
|
2
|
+
let components: {
|
3
|
+
label: string;
|
4
|
+
reorder: boolean;
|
5
|
+
addAnotherPosition: string;
|
6
|
+
layoutFixed: boolean;
|
7
|
+
enableRowGroups: boolean;
|
8
|
+
initEmpty: boolean;
|
9
|
+
tableView: boolean;
|
10
|
+
defaultValue: {}[];
|
11
|
+
key: string;
|
12
|
+
type: string;
|
13
|
+
input: boolean;
|
14
|
+
components: ({
|
15
|
+
label: string;
|
16
|
+
applyMaskOn: string;
|
17
|
+
tableView: boolean;
|
18
|
+
key: string;
|
19
|
+
type: string;
|
20
|
+
input: boolean;
|
21
|
+
mask?: undefined;
|
22
|
+
delimiter?: undefined;
|
23
|
+
requireDecimal?: undefined;
|
24
|
+
inputFormat?: undefined;
|
25
|
+
truncateMultipleSpaces?: undefined;
|
26
|
+
} | {
|
27
|
+
label: string;
|
28
|
+
applyMaskOn: string;
|
29
|
+
mask: boolean;
|
30
|
+
tableView: boolean;
|
31
|
+
delimiter: boolean;
|
32
|
+
requireDecimal: boolean;
|
33
|
+
inputFormat: string;
|
34
|
+
truncateMultipleSpaces: boolean;
|
35
|
+
key: string;
|
36
|
+
type: string;
|
37
|
+
input: boolean;
|
38
|
+
})[];
|
39
|
+
}[];
|
40
|
+
}
|
41
|
+
export default _default;
|
@@ -0,0 +1,44 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.default = {
|
4
|
+
"components": [
|
5
|
+
{
|
6
|
+
"label": "Data Grid",
|
7
|
+
"reorder": true,
|
8
|
+
"addAnotherPosition": "bottom",
|
9
|
+
"layoutFixed": false,
|
10
|
+
"enableRowGroups": false,
|
11
|
+
"initEmpty": false,
|
12
|
+
"tableView": false,
|
13
|
+
"defaultValue": [
|
14
|
+
{}
|
15
|
+
],
|
16
|
+
"key": "dataGrid",
|
17
|
+
"type": "datagrid",
|
18
|
+
"input": true,
|
19
|
+
"components": [
|
20
|
+
{
|
21
|
+
"label": "Text Field",
|
22
|
+
"applyMaskOn": "change",
|
23
|
+
"tableView": true,
|
24
|
+
"key": "textField",
|
25
|
+
"type": "textfield",
|
26
|
+
"input": true
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"label": "Number",
|
30
|
+
"applyMaskOn": "change",
|
31
|
+
"mask": false,
|
32
|
+
"tableView": false,
|
33
|
+
"delimiter": false,
|
34
|
+
"requireDecimal": false,
|
35
|
+
"inputFormat": "plain",
|
36
|
+
"truncateMultipleSpaces": false,
|
37
|
+
"key": "number",
|
38
|
+
"type": "number",
|
39
|
+
"input": true
|
40
|
+
}
|
41
|
+
]
|
42
|
+
}
|
43
|
+
]
|
44
|
+
};
|
@@ -6,6 +6,7 @@ import comp5 from './comp5';
|
|
6
6
|
import comp6 from './comp6';
|
7
7
|
import comp7 from './comp7';
|
8
8
|
import comp8 from './comp8';
|
9
|
+
import comp9 from './comp9';
|
9
10
|
import withCollapsibleRowGroups from './comp-with-collapsible-groups';
|
10
11
|
import withConditionalFieldsAndValidations from './comp-with-conditional-components-and-validations';
|
11
12
|
import withDefValue from './comp-with-def-value';
|
@@ -15,4 +16,4 @@ import modalWithRequiredFields from './comp-modal-with-required-fields';
|
|
15
16
|
import withAllowCalculateOverride from './comp-with-allow-calculate-override';
|
16
17
|
import twoWithAllowCalculatedOverride from './two-comp-with-allow-calculate-override';
|
17
18
|
import withCheckboxes from './comp-with-checkboxes';
|
18
|
-
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride, withCheckboxes };
|
19
|
+
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride, withCheckboxes };
|
@@ -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.withCheckboxes = exports.twoWithAllowCalculatedOverride = exports.withAllowCalculateOverride = exports.modalWithRequiredFields = exports.withRowGroupsAndDefValue = exports.withLogic = exports.withDefValue = exports.withConditionalFieldsAndValidations = exports.withCollapsibleRowGroups = exports.comp8 = exports.comp7 = exports.comp6 = exports.comp5 = exports.comp4 = exports.comp3 = exports.comp2 = exports.comp1 = void 0;
|
6
|
+
exports.withCheckboxes = exports.twoWithAllowCalculatedOverride = exports.withAllowCalculateOverride = exports.modalWithRequiredFields = exports.withRowGroupsAndDefValue = exports.withLogic = exports.withDefValue = exports.withConditionalFieldsAndValidations = exports.withCollapsibleRowGroups = exports.comp9 = 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"));
|
@@ -20,6 +20,8 @@ const comp7_1 = __importDefault(require("./comp7"));
|
|
20
20
|
exports.comp7 = comp7_1.default;
|
21
21
|
const comp8_1 = __importDefault(require("./comp8"));
|
22
22
|
exports.comp8 = comp8_1.default;
|
23
|
+
const comp9_1 = __importDefault(require("./comp9"));
|
24
|
+
exports.comp9 = comp9_1.default;
|
23
25
|
const comp_with_def_value_1 = __importDefault(require("./comp-with-def-value"));
|
24
26
|
exports.withDefValue = comp_with_def_value_1.default;
|
25
27
|
const comp_row_groups_with_def_value_1 = __importDefault(require("./comp-row-groups-with-def-value"));
|
package/lib/mjs/Webform.js
CHANGED
@@ -8,6 +8,7 @@ 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
|
+
import dragula from "dragula";
|
11
12
|
// Initialize the available forms.
|
12
13
|
Formio.forms = {};
|
13
14
|
// Allow people to register components.
|
@@ -281,6 +282,7 @@ export default class Webform extends NestedDataComponent {
|
|
281
282
|
// Ensure the root is set to this component.
|
282
283
|
this.root = this;
|
283
284
|
this.localRoot = this;
|
285
|
+
this.root.dragulaLib = dragula;
|
284
286
|
}
|
285
287
|
/* eslint-enable max-statements */
|
286
288
|
get language() {
|
@@ -187,5 +187,13 @@ export default [
|
|
187
187
|
key: 'tableView',
|
188
188
|
input: true
|
189
189
|
},
|
190
|
+
{
|
191
|
+
weight: 1600,
|
192
|
+
type: 'checkbox',
|
193
|
+
label: 'Modal Edit',
|
194
|
+
tooltip: 'Opens up a modal to edit the value of this component.',
|
195
|
+
key: 'modalEdit',
|
196
|
+
input: true
|
197
|
+
}
|
190
198
|
];
|
191
199
|
/* eslint-enable max-len */
|
@@ -0,0 +1,41 @@
|
|
1
|
+
declare namespace _default {
|
2
|
+
let components: {
|
3
|
+
label: string;
|
4
|
+
reorder: boolean;
|
5
|
+
addAnotherPosition: string;
|
6
|
+
layoutFixed: boolean;
|
7
|
+
enableRowGroups: boolean;
|
8
|
+
initEmpty: boolean;
|
9
|
+
tableView: boolean;
|
10
|
+
defaultValue: {}[];
|
11
|
+
key: string;
|
12
|
+
type: string;
|
13
|
+
input: boolean;
|
14
|
+
components: ({
|
15
|
+
label: string;
|
16
|
+
applyMaskOn: string;
|
17
|
+
tableView: boolean;
|
18
|
+
key: string;
|
19
|
+
type: string;
|
20
|
+
input: boolean;
|
21
|
+
mask?: undefined;
|
22
|
+
delimiter?: undefined;
|
23
|
+
requireDecimal?: undefined;
|
24
|
+
inputFormat?: undefined;
|
25
|
+
truncateMultipleSpaces?: undefined;
|
26
|
+
} | {
|
27
|
+
label: string;
|
28
|
+
applyMaskOn: string;
|
29
|
+
mask: boolean;
|
30
|
+
tableView: boolean;
|
31
|
+
delimiter: boolean;
|
32
|
+
requireDecimal: boolean;
|
33
|
+
inputFormat: string;
|
34
|
+
truncateMultipleSpaces: boolean;
|
35
|
+
key: string;
|
36
|
+
type: string;
|
37
|
+
input: boolean;
|
38
|
+
})[];
|
39
|
+
}[];
|
40
|
+
}
|
41
|
+
export default _default;
|
@@ -0,0 +1,42 @@
|
|
1
|
+
export default {
|
2
|
+
"components": [
|
3
|
+
{
|
4
|
+
"label": "Data Grid",
|
5
|
+
"reorder": true,
|
6
|
+
"addAnotherPosition": "bottom",
|
7
|
+
"layoutFixed": false,
|
8
|
+
"enableRowGroups": false,
|
9
|
+
"initEmpty": false,
|
10
|
+
"tableView": false,
|
11
|
+
"defaultValue": [
|
12
|
+
{}
|
13
|
+
],
|
14
|
+
"key": "dataGrid",
|
15
|
+
"type": "datagrid",
|
16
|
+
"input": true,
|
17
|
+
"components": [
|
18
|
+
{
|
19
|
+
"label": "Text Field",
|
20
|
+
"applyMaskOn": "change",
|
21
|
+
"tableView": true,
|
22
|
+
"key": "textField",
|
23
|
+
"type": "textfield",
|
24
|
+
"input": true
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"label": "Number",
|
28
|
+
"applyMaskOn": "change",
|
29
|
+
"mask": false,
|
30
|
+
"tableView": false,
|
31
|
+
"delimiter": false,
|
32
|
+
"requireDecimal": false,
|
33
|
+
"inputFormat": "plain",
|
34
|
+
"truncateMultipleSpaces": false,
|
35
|
+
"key": "number",
|
36
|
+
"type": "number",
|
37
|
+
"input": true
|
38
|
+
}
|
39
|
+
]
|
40
|
+
}
|
41
|
+
]
|
42
|
+
};
|
@@ -6,6 +6,7 @@ import comp5 from './comp5';
|
|
6
6
|
import comp6 from './comp6';
|
7
7
|
import comp7 from './comp7';
|
8
8
|
import comp8 from './comp8';
|
9
|
+
import comp9 from './comp9';
|
9
10
|
import withCollapsibleRowGroups from './comp-with-collapsible-groups';
|
10
11
|
import withConditionalFieldsAndValidations from './comp-with-conditional-components-and-validations';
|
11
12
|
import withDefValue from './comp-with-def-value';
|
@@ -15,4 +16,4 @@ import modalWithRequiredFields from './comp-modal-with-required-fields';
|
|
15
16
|
import withAllowCalculateOverride from './comp-with-allow-calculate-override';
|
16
17
|
import twoWithAllowCalculatedOverride from './two-comp-with-allow-calculate-override';
|
17
18
|
import withCheckboxes from './comp-with-checkboxes';
|
18
|
-
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride, withCheckboxes };
|
19
|
+
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride, withCheckboxes };
|
@@ -6,6 +6,7 @@ import comp5 from './comp5';
|
|
6
6
|
import comp6 from './comp6';
|
7
7
|
import comp7 from './comp7';
|
8
8
|
import comp8 from './comp8';
|
9
|
+
import comp9 from './comp9';
|
9
10
|
import withDefValue from './comp-with-def-value';
|
10
11
|
import withRowGroupsAndDefValue from './comp-row-groups-with-def-value';
|
11
12
|
import modalWithRequiredFields from './comp-modal-with-required-fields';
|
@@ -15,4 +16,4 @@ import withCollapsibleRowGroups from './comp-with-collapsible-groups';
|
|
15
16
|
import withAllowCalculateOverride from './comp-with-allow-calculate-override';
|
16
17
|
import twoWithAllowCalculatedOverride from './two-comp-with-allow-calculate-override';
|
17
18
|
import withCheckboxes from './comp-with-checkboxes';
|
18
|
-
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride, withCheckboxes };
|
19
|
+
export { comp1, comp2, comp3, comp4, comp5, comp6, comp7, comp8, comp9, withCollapsibleRowGroups, withConditionalFieldsAndValidations, withDefValue, withLogic, withRowGroupsAndDefValue, modalWithRequiredFields, withAllowCalculateOverride, twoWithAllowCalculatedOverride, withCheckboxes };
|
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.66",
|
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.
|
84
|
+
"@formio/core": "2.2.0-rc.4",
|
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",
|