@formio/js 5.1.0-dev.6214.89da41f → 5.1.0-dev.6215.61ce056
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 +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/Element.js +2 -2
- package/lib/cjs/WebformBuilder.js +1 -0
- package/lib/cjs/utils/index.d.ts +1 -3
- package/lib/cjs/utils/index.js +1 -2
- package/lib/mjs/Element.js +2 -2
- package/lib/mjs/WebformBuilder.js +1 -0
- package/lib/mjs/utils/index.d.ts +1 -3
- package/lib/mjs/utils/index.js +1 -2
- package/package.json +1 -1
package/lib/cjs/Element.js
CHANGED
@@ -533,9 +533,9 @@ class Element {
|
|
533
533
|
if (this.component.filter === string && !this.options.building) {
|
534
534
|
const evalContext = this.evalContext(data);
|
535
535
|
evalContext.data = lodash_1.default.mapValues(evalContext.data, (val) => lodash_1.default.isString(val) ? encodeURIComponent(val) : val);
|
536
|
-
return utils_1.default.interpolate(string, evalContext, options);
|
536
|
+
return utils_1.default.Evaluator.interpolate(string, evalContext, options);
|
537
537
|
}
|
538
|
-
return utils_1.default.interpolate(string, this.evalContext(data), options);
|
538
|
+
return utils_1.default.Evaluator.interpolate(string, this.evalContext(data), options);
|
539
539
|
}
|
540
540
|
/**
|
541
541
|
* Performs an evaluation using the evaluation context of this component.
|
@@ -1206,6 +1206,7 @@ class WebformBuilder extends Component_1.default {
|
|
1206
1206
|
submissionData = submissionData.componentJson || submissionData;
|
1207
1207
|
if (submissionData.components && this.originalDefaultValue) {
|
1208
1208
|
submissionData.components = this.originalDefaultValue.components;
|
1209
|
+
this.originalDefaultValue = null;
|
1209
1210
|
}
|
1210
1211
|
const fieldsToRemoveDoubleQuotes = ['label', 'tooltip'];
|
1211
1212
|
this.replaceDoubleQuotes(submissionData, fieldsToRemoveDoubleQuotes);
|
package/lib/cjs/utils/index.d.ts
CHANGED
@@ -2,8 +2,7 @@ export * from "./utils";
|
|
2
2
|
export * from "./formUtils";
|
3
3
|
export default FormioUtils;
|
4
4
|
declare const FormioUtils: {
|
5
|
-
|
6
|
-
Evaluator: DefaultEvaluator;
|
5
|
+
Evaluator: import("./Evaluator").DefaultEvaluator;
|
7
6
|
interpolate: typeof interpolate;
|
8
7
|
ConditionOperators: {
|
9
8
|
[x: string]: typeof import("./conditionOperators/IsEqualTo").default | typeof import("./conditionOperators/DateGreaterThan").default;
|
@@ -166,7 +165,6 @@ declare const FormioUtils: {
|
|
166
165
|
};
|
167
166
|
import { Evaluator } from './Evaluator';
|
168
167
|
import { registerEvaluator } from './Evaluator';
|
169
|
-
import { DefaultEvaluator } from './Evaluator';
|
170
168
|
import { interpolate } from './Evaluator';
|
171
169
|
import moment from 'moment';
|
172
170
|
export { FormioUtils as Utils, Evaluator, registerEvaluator };
|
package/lib/cjs/utils/index.js
CHANGED
@@ -38,8 +38,7 @@ Object.defineProperty(exports, "registerEvaluator", { enumerable: true, get: fun
|
|
38
38
|
const conditionOperators_1 = __importDefault(require("./conditionOperators"));
|
39
39
|
const lodash_1 = __importDefault(require("lodash"));
|
40
40
|
const moment_1 = __importDefault(require("moment"));
|
41
|
-
const FormioUtils = Object.assign(Object.assign(Object.assign({}, utils), formUtils), {
|
42
|
-
Evaluator: Evaluator_1.Evaluator,
|
41
|
+
const FormioUtils = Object.assign(Object.assign(Object.assign({}, utils), formUtils), { Evaluator: Evaluator_1.Evaluator,
|
43
42
|
interpolate: Evaluator_1.interpolate,
|
44
43
|
ConditionOperators: conditionOperators_1.default,
|
45
44
|
_: lodash_1.default,
|
package/lib/mjs/Element.js
CHANGED
@@ -525,9 +525,9 @@ export default class Element {
|
|
525
525
|
if (this.component.filter === string && !this.options.building) {
|
526
526
|
const evalContext = this.evalContext(data);
|
527
527
|
evalContext.data = _.mapValues(evalContext.data, (val) => _.isString(val) ? encodeURIComponent(val) : val);
|
528
|
-
return FormioUtils.interpolate(string, evalContext, options);
|
528
|
+
return FormioUtils.Evaluator.interpolate(string, evalContext, options);
|
529
529
|
}
|
530
|
-
return FormioUtils.interpolate(string, this.evalContext(data), options);
|
530
|
+
return FormioUtils.Evaluator.interpolate(string, this.evalContext(data), options);
|
531
531
|
}
|
532
532
|
/**
|
533
533
|
* Performs an evaluation using the evaluation context of this component.
|
@@ -1188,6 +1188,7 @@ export default class WebformBuilder extends Component {
|
|
1188
1188
|
submissionData = submissionData.componentJson || submissionData;
|
1189
1189
|
if (submissionData.components && this.originalDefaultValue) {
|
1190
1190
|
submissionData.components = this.originalDefaultValue.components;
|
1191
|
+
this.originalDefaultValue = null;
|
1191
1192
|
}
|
1192
1193
|
const fieldsToRemoveDoubleQuotes = ['label', 'tooltip'];
|
1193
1194
|
this.replaceDoubleQuotes(submissionData, fieldsToRemoveDoubleQuotes);
|
package/lib/mjs/utils/index.d.ts
CHANGED
@@ -2,8 +2,7 @@ export * from "./utils";
|
|
2
2
|
export * from "./formUtils";
|
3
3
|
export default FormioUtils;
|
4
4
|
declare const FormioUtils: {
|
5
|
-
|
6
|
-
Evaluator: DefaultEvaluator;
|
5
|
+
Evaluator: import("./Evaluator").DefaultEvaluator;
|
7
6
|
interpolate: typeof interpolate;
|
8
7
|
ConditionOperators: {
|
9
8
|
[x: string]: typeof import("./conditionOperators/IsEqualTo").default | typeof import("./conditionOperators/DateGreaterThan").default;
|
@@ -166,7 +165,6 @@ declare const FormioUtils: {
|
|
166
165
|
};
|
167
166
|
import { Evaluator } from './Evaluator';
|
168
167
|
import { registerEvaluator } from './Evaluator';
|
169
|
-
import { DefaultEvaluator } from './Evaluator';
|
170
168
|
import { interpolate } from './Evaluator';
|
171
169
|
import moment from 'moment';
|
172
170
|
export { FormioUtils as Utils, Evaluator, registerEvaluator };
|
package/lib/mjs/utils/index.js
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
import * as utils from './utils';
|
2
2
|
import * as formUtils from './formUtils';
|
3
|
-
import { Evaluator, registerEvaluator, interpolate
|
3
|
+
import { Evaluator, registerEvaluator, interpolate } from './Evaluator';
|
4
4
|
import ConditionOperators from './conditionOperators';
|
5
5
|
import _ from 'lodash';
|
6
6
|
import moment from 'moment';
|
7
7
|
const FormioUtils = {
|
8
8
|
...utils,
|
9
9
|
...formUtils,
|
10
|
-
DefaultEvaluator,
|
11
10
|
Evaluator,
|
12
11
|
interpolate,
|
13
12
|
ConditionOperators,
|