@formio/js 5.0.0-dev.5684.206e5cd → 5.0.0-dev.5687.fbf1b3d
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 +3 -3
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +3 -3
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.utils.js +1 -1
- package/dist/formio.utils.min.js +1 -1
- package/lib/cjs/components/datagrid/DataGrid.js +0 -3
- 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/translations/en.d.ts +1 -0
- package/lib/cjs/translations/en.js +2 -1
- package/lib/cjs/utils/utils.js +0 -4
- package/lib/mjs/components/datagrid/DataGrid.js +0 -3
- 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/translations/en.d.ts +1 -0
- package/lib/mjs/translations/en.js +2 -1
- package/lib/mjs/utils/utils.js +0 -4
- package/package.json +1 -2
|
@@ -351,9 +351,6 @@ class DataGridComponent extends NestedArrayComponent_1.default {
|
|
|
351
351
|
dataValue.splice(newPosition, 0, draggedRowData);
|
|
352
352
|
//remove element from old position (if was moved above, after insertion it's at +1 index)
|
|
353
353
|
dataValue.splice(movedBelow ? oldPosition : oldPosition + 1, 1);
|
|
354
|
-
// When components are reordered we need to set the dataGrid and form pristine properties to false
|
|
355
|
-
this.root.pristine = false;
|
|
356
|
-
this.pristine = false;
|
|
357
354
|
//need to re-build rows to re-calculate indexes and other indexed fields for component instance (like rows for ex.)
|
|
358
355
|
this.setValue(dataValue, { isReordered: true });
|
|
359
356
|
this.rebuild();
|
|
@@ -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;
|
|
@@ -75,5 +75,6 @@ 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'
|
|
79
80
|
};
|
package/lib/cjs/utils/utils.js
CHANGED
|
@@ -34,7 +34,6 @@ exports.firstNonNil = exports.unfold = exports.bootstrapVersion = exports.unique
|
|
|
34
34
|
exports.isSelectResourceWithObjectValue = exports.getItemTemplateKeys = exports.interpolateErrors = exports.getComponentSavedTypes = exports.componentValueTypes = exports._ = exports.getFocusableElements = exports.isInsideScopingComponent = exports.isPromise = exports.getDataParentComponent = exports.getComponentPath = exports.getComponentPathWithoutIndicies = exports.getBrowserInfo = exports.getIEBrowserVersion = exports.round = exports.getStringFromComponentPath = exports.isChildOf = exports.getArrayFromComponentPath = exports.isInputComponent = exports.interpolate = exports.Evaluator = exports.fastCloneDeep = exports.sanitize = exports.translateHTMLTemplate = exports.getContextButtons = exports.getContextComponents = exports.observeOverload = exports.withSwitch = void 0;
|
|
35
35
|
const lodash_1 = __importDefault(require("lodash"));
|
|
36
36
|
exports._ = lodash_1.default;
|
|
37
|
-
const fetch_ponyfill_1 = __importDefault(require("fetch-ponyfill"));
|
|
38
37
|
const json_logic_js_1 = __importDefault(require("json-logic-js"));
|
|
39
38
|
exports.jsonLogic = json_logic_js_1.default;
|
|
40
39
|
const moment_timezone_1 = __importDefault(require("moment-timezone/moment-timezone"));
|
|
@@ -48,9 +47,6 @@ const conditionOperators_1 = __importDefault(require("./conditionOperators"));
|
|
|
48
47
|
exports.ConditionOperators = conditionOperators_1.default;
|
|
49
48
|
const interpolate = Evaluator_1.Evaluator.interpolate;
|
|
50
49
|
exports.interpolate = interpolate;
|
|
51
|
-
const { fetch } = (0, fetch_ponyfill_1.default)({
|
|
52
|
-
Promise: Promise
|
|
53
|
-
});
|
|
54
50
|
__exportStar(require("./formUtils"), exports);
|
|
55
51
|
// Configure JsonLogic
|
|
56
52
|
operators_1.lodashOperators.forEach((name) => json_logic_js_1.default.add_operation(`_${name}`, lodash_1.default[name]));
|
|
@@ -348,9 +348,6 @@ export default class DataGridComponent extends NestedArrayComponent {
|
|
|
348
348
|
dataValue.splice(newPosition, 0, draggedRowData);
|
|
349
349
|
//remove element from old position (if was moved above, after insertion it's at +1 index)
|
|
350
350
|
dataValue.splice(movedBelow ? oldPosition : oldPosition + 1, 1);
|
|
351
|
-
// When components are reordered we need to set the dataGrid and form pristine properties to false
|
|
352
|
-
this.root.pristine = false;
|
|
353
|
-
this.pristine = false;
|
|
354
351
|
//need to re-build rows to re-calculate indexes and other indexed fields for component instance (like rows for ex.)
|
|
355
352
|
this.setValue(dataValue, { isReordered: true });
|
|
356
353
|
this.rebuild();
|
|
@@ -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 };
|
|
@@ -73,5 +73,6 @@ 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'
|
|
77
78
|
};
|
package/lib/mjs/utils/utils.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/* global jQuery */
|
|
2
2
|
import _ from 'lodash';
|
|
3
|
-
import fetchPonyfill from 'fetch-ponyfill';
|
|
4
3
|
import jsonLogic from 'json-logic-js';
|
|
5
4
|
import moment from 'moment-timezone/moment-timezone';
|
|
6
5
|
import jtz from 'jstimezonedetect';
|
|
@@ -10,9 +9,6 @@ import { getValue } from './formUtils';
|
|
|
10
9
|
import { Evaluator } from './Evaluator';
|
|
11
10
|
import ConditionOperators from './conditionOperators';
|
|
12
11
|
const interpolate = Evaluator.interpolate;
|
|
13
|
-
const { fetch } = fetchPonyfill({
|
|
14
|
-
Promise: Promise
|
|
15
|
-
});
|
|
16
12
|
export * from './formUtils';
|
|
17
13
|
// Configure JsonLogic
|
|
18
14
|
lodashOperators.forEach((name) => jsonLogic.add_operation(`_${name}`, _[name]));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formio/js",
|
|
3
|
-
"version": "5.0.0-dev.
|
|
3
|
+
"version": "5.0.0-dev.5687.fbf1b3d",
|
|
4
4
|
"description": "JavaScript powered Forms with JSON Form Builder",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -99,7 +99,6 @@
|
|
|
99
99
|
"eventemitter3": "^5.0.1",
|
|
100
100
|
"fast-deep-equal": "^3.1.3",
|
|
101
101
|
"fast-json-patch": "^3.1.1",
|
|
102
|
-
"fetch-ponyfill": "^7.1.0",
|
|
103
102
|
"idb": "^7.1.1",
|
|
104
103
|
"inputmask": "^5.0.8",
|
|
105
104
|
"ismobilejs": "^1.1.1",
|