@formio/js 5.1.0-dev.6069.caec01d → 5.1.0-dev.6071.625cfbf
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 +527 -538
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +528 -539
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.js +10 -21
- package/dist/formio.min.js +1 -1
- package/dist/formio.utils.js +11 -22
- package/dist/formio.utils.min.js +1 -1
- package/lib/cjs/components/unknown/Unknown.form.d.ts +1 -1
- package/lib/cjs/components/unknown/Unknown.form.js +12 -9
- package/lib/cjs/utils/formUtils.d.ts +2 -2
- package/lib/cjs/utils/utils.js +1 -2
- package/lib/mjs/components/unknown/Unknown.form.d.ts +1 -1
- package/lib/mjs/components/unknown/Unknown.form.js +12 -9
- package/lib/mjs/utils/formUtils.d.ts +2 -2
- package/lib/mjs/utils/utils.js +1 -2
- package/package.json +2 -2
@@ -3,25 +3,28 @@ 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
|
+
const lodash_1 = require("lodash");
|
6
7
|
const Unknown_edit_display_1 = __importDefault(require("./editForm/Unknown.edit.display"));
|
8
|
+
const utils_1 = __importDefault(require("../../components/_classes/component/editForm/utils"));
|
7
9
|
/**
|
8
10
|
* Unknown Component schema.
|
9
11
|
* @returns {object} - The Unknown Component edit form.
|
10
12
|
*/
|
11
|
-
function default_1() {
|
13
|
+
function default_1(...extend) {
|
14
|
+
const components = [
|
15
|
+
{
|
16
|
+
label: 'Custom',
|
17
|
+
key: 'display',
|
18
|
+
weight: 0,
|
19
|
+
components: Unknown_edit_display_1.default
|
20
|
+
}
|
21
|
+
].concat(...extend);
|
12
22
|
return {
|
13
23
|
components: [
|
14
24
|
{
|
15
25
|
type: 'tabs',
|
16
26
|
key: 'tabs',
|
17
|
-
components:
|
18
|
-
{
|
19
|
-
label: 'Custom',
|
20
|
-
key: 'display',
|
21
|
-
weight: 0,
|
22
|
-
components: Unknown_edit_display_1.default
|
23
|
-
}
|
24
|
-
]
|
27
|
+
components: (0, lodash_1.unionWith)(components, utils_1.default.unifyComponents)
|
25
28
|
}
|
26
29
|
]
|
27
30
|
};
|
@@ -26,8 +26,8 @@ export const getBestMatch: typeof Utils.getBestMatch;
|
|
26
26
|
export const getComponentFromPath: typeof Utils.getComponentFromPath;
|
27
27
|
export const getComponentValue: typeof Utils.getComponentValue;
|
28
28
|
export const findComponents: typeof Utils.findComponents;
|
29
|
-
export const eachComponentDataAsync: (components:
|
30
|
-
export const eachComponentData: (components:
|
29
|
+
export const eachComponentDataAsync: (components: Component[], data: DataObject, fn: EachComponentDataAsyncCallback, includeAll?: boolean | undefined, local?: boolean | undefined, parent?: any, parentPaths?: any) => Promise<void>;
|
30
|
+
export const eachComponentData: (components: Component[], data: DataObject, fn: EachComponentDataCallback, includeAll?: boolean | undefined, local?: boolean | undefined, parent?: any, parentPaths?: any) => void;
|
31
31
|
export const getComponentKey: typeof Utils.getComponentKey;
|
32
32
|
export const getContextualRowPath: typeof Utils.getContextualRowPath;
|
33
33
|
export const getContextualRowData: typeof Utils.getContextualRowData;
|
package/lib/cjs/utils/utils.js
CHANGED
@@ -34,7 +34,6 @@ const Evaluator_1 = require("./Evaluator");
|
|
34
34
|
Object.defineProperty(exports, "Evaluator", { enumerable: true, get: function () { return Evaluator_1.Evaluator; } });
|
35
35
|
const conditionOperators_1 = __importDefault(require("./conditionOperators"));
|
36
36
|
exports.ConditionOperators = conditionOperators_1.default;
|
37
|
-
const core_1 = require("@formio/core");
|
38
37
|
const interpolate = Evaluator_1.Evaluator.interpolate;
|
39
38
|
exports.interpolate = interpolate;
|
40
39
|
__exportStar(require("./formUtils"), exports);
|
@@ -272,7 +271,7 @@ function checkSimpleConditional(component, condition, row, data, instance) {
|
|
272
271
|
default:
|
273
272
|
result = lodash_1.default.every(conditionsResult.flat(), res => !!res);
|
274
273
|
}
|
275
|
-
return
|
274
|
+
return show ? result : !result;
|
276
275
|
}
|
277
276
|
}
|
278
277
|
exports.checkSimpleConditional = checkSimpleConditional;
|
@@ -1,22 +1,25 @@
|
|
1
|
+
import { unionWith } from 'lodash';
|
1
2
|
import UnknownEditDisplay from './editForm/Unknown.edit.display';
|
3
|
+
import EditFormUtils from '../../components/_classes/component/editForm/utils';
|
2
4
|
/**
|
3
5
|
* Unknown Component schema.
|
4
6
|
* @returns {object} - The Unknown Component edit form.
|
5
7
|
*/
|
6
|
-
export default function () {
|
8
|
+
export default function (...extend) {
|
9
|
+
const components = [
|
10
|
+
{
|
11
|
+
label: 'Custom',
|
12
|
+
key: 'display',
|
13
|
+
weight: 0,
|
14
|
+
components: UnknownEditDisplay
|
15
|
+
}
|
16
|
+
].concat(...extend);
|
7
17
|
return {
|
8
18
|
components: [
|
9
19
|
{
|
10
20
|
type: 'tabs',
|
11
21
|
key: 'tabs',
|
12
|
-
components:
|
13
|
-
{
|
14
|
-
label: 'Custom',
|
15
|
-
key: 'display',
|
16
|
-
weight: 0,
|
17
|
-
components: UnknownEditDisplay
|
18
|
-
}
|
19
|
-
]
|
22
|
+
components: unionWith(components, EditFormUtils.unifyComponents)
|
20
23
|
}
|
21
24
|
]
|
22
25
|
};
|
@@ -26,8 +26,8 @@ export const getBestMatch: typeof Utils.getBestMatch;
|
|
26
26
|
export const getComponentFromPath: typeof Utils.getComponentFromPath;
|
27
27
|
export const getComponentValue: typeof Utils.getComponentValue;
|
28
28
|
export const findComponents: typeof Utils.findComponents;
|
29
|
-
export const eachComponentDataAsync: (components:
|
30
|
-
export const eachComponentData: (components:
|
29
|
+
export const eachComponentDataAsync: (components: Component[], data: DataObject, fn: EachComponentDataAsyncCallback, includeAll?: boolean | undefined, local?: boolean | undefined, parent?: any, parentPaths?: any) => Promise<void>;
|
30
|
+
export const eachComponentData: (components: Component[], data: DataObject, fn: EachComponentDataCallback, includeAll?: boolean | undefined, local?: boolean | undefined, parent?: any, parentPaths?: any) => void;
|
31
31
|
export const getComponentKey: typeof Utils.getComponentKey;
|
32
32
|
export const getContextualRowPath: typeof Utils.getContextualRowPath;
|
33
33
|
export const getContextualRowData: typeof Utils.getContextualRowData;
|
package/lib/mjs/utils/utils.js
CHANGED
@@ -8,7 +8,6 @@ import dompurify from 'dompurify';
|
|
8
8
|
import { getValue } from './formUtils';
|
9
9
|
import { Evaluator } from './Evaluator';
|
10
10
|
import ConditionOperators from './conditionOperators';
|
11
|
-
import { convertShowToBoolean } from '@formio/core';
|
12
11
|
const interpolate = Evaluator.interpolate;
|
13
12
|
export * from './formUtils';
|
14
13
|
// Configure JsonLogic
|
@@ -237,7 +236,7 @@ export function checkSimpleConditional(component, condition, row, data, instance
|
|
237
236
|
default:
|
238
237
|
result = _.every(conditionsResult.flat(), res => !!res);
|
239
238
|
}
|
240
|
-
return
|
239
|
+
return show ? result : !result;
|
241
240
|
}
|
242
241
|
}
|
243
242
|
/**
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@formio/js",
|
3
|
-
"version": "5.1.0-dev.
|
3
|
+
"version": "5.1.0-dev.6071.625cfbf",
|
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
|
"homepage": "https://github.com/formio/formio.js#readme",
|
82
82
|
"dependencies": {
|
83
83
|
"@formio/bootstrap": "v3.0.0-dev.121.085d187",
|
84
|
-
"@formio/core": "v2.4.0-dev.
|
84
|
+
"@formio/core": "v2.4.0-dev.2",
|
85
85
|
"@formio/text-mask-addons": "3.8.0-formio.4",
|
86
86
|
"@formio/vanilla-text-mask": "^5.1.1-formio.1",
|
87
87
|
"abortcontroller-polyfill": "^1.7.5",
|