@formio/js 5.1.0-dev.6211.5d30602 → 5.1.0-dev.6214.89da41f
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/Element.js +2 -2
- package/lib/cjs/utils/index.d.ts +3 -1
- package/lib/cjs/utils/index.js +2 -1
- package/lib/cjs/widgets/CalendarWidget.js +0 -12
- package/lib/mjs/Element.js +2 -2
- package/lib/mjs/utils/index.d.ts +3 -1
- package/lib/mjs/utils/index.js +2 -1
- package/lib/mjs/widgets/CalendarWidget.js +0 -12
- 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.
|
536
|
+
return utils_1.default.interpolate(string, evalContext, options);
|
537
537
|
}
|
538
|
-
return utils_1.default.
|
538
|
+
return utils_1.default.interpolate(string, this.evalContext(data), options);
|
539
539
|
}
|
540
540
|
/**
|
541
541
|
* Performs an evaluation using the evaluation context of this component.
|
package/lib/cjs/utils/index.d.ts
CHANGED
@@ -2,7 +2,8 @@ export * from "./utils";
|
|
2
2
|
export * from "./formUtils";
|
3
3
|
export default FormioUtils;
|
4
4
|
declare const FormioUtils: {
|
5
|
-
|
5
|
+
DefaultEvaluator: typeof DefaultEvaluator;
|
6
|
+
Evaluator: DefaultEvaluator;
|
6
7
|
interpolate: typeof interpolate;
|
7
8
|
ConditionOperators: {
|
8
9
|
[x: string]: typeof import("./conditionOperators/IsEqualTo").default | typeof import("./conditionOperators/DateGreaterThan").default;
|
@@ -165,6 +166,7 @@ declare const FormioUtils: {
|
|
165
166
|
};
|
166
167
|
import { Evaluator } from './Evaluator';
|
167
168
|
import { registerEvaluator } from './Evaluator';
|
169
|
+
import { DefaultEvaluator } from './Evaluator';
|
168
170
|
import { interpolate } from './Evaluator';
|
169
171
|
import moment from 'moment';
|
170
172
|
export { FormioUtils as Utils, Evaluator, registerEvaluator };
|
package/lib/cjs/utils/index.js
CHANGED
@@ -38,7 +38,8 @@ 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), {
|
41
|
+
const FormioUtils = Object.assign(Object.assign(Object.assign({}, utils), formUtils), { DefaultEvaluator: Evaluator_1.DefaultEvaluator,
|
42
|
+
Evaluator: Evaluator_1.Evaluator,
|
42
43
|
interpolate: Evaluator_1.interpolate,
|
43
44
|
ConditionOperators: conditionOperators_1.default,
|
44
45
|
_: lodash_1.default,
|
@@ -246,9 +246,6 @@ class CalendarWidget extends InputWidget_1.default {
|
|
246
246
|
if (!this.calendar) {
|
247
247
|
return super.getValue();
|
248
248
|
}
|
249
|
-
if (this.settings.isManuallyOverriddenValue) {
|
250
|
-
return this.settings.manualInputValue;
|
251
|
-
}
|
252
249
|
// Get the selected dates from the calendar widget.
|
253
250
|
const dates = this.calendar.selectedDates;
|
254
251
|
if (!dates || !dates.length) {
|
@@ -356,15 +353,6 @@ class CalendarWidget extends InputWidget_1.default {
|
|
356
353
|
this.calendar.updateValue(false);
|
357
354
|
});
|
358
355
|
}
|
359
|
-
// Move input attributes to altInput.
|
360
|
-
const labelledbyIds = this.calendar.input.getAttribute('aria-labelledby');
|
361
|
-
const isRequired = this.calendar.input.getAttribute('aria-required');
|
362
|
-
this.calendar.altInput.id = this._input.id;
|
363
|
-
this.calendar.altInput.setAttribute('aria-labelledby', labelledbyIds);
|
364
|
-
this.calendar.altInput.setAttribute('aria-required', isRequired);
|
365
|
-
this._input.removeAttribute('id');
|
366
|
-
this._input.removeAttribute('aria-labelledby');
|
367
|
-
this._input.removeAttribute('aria-required');
|
368
356
|
const excludedFromMaskFormats = ['MMMM'];
|
369
357
|
if (!this.settings.readOnly && !lodash_1.default.some(excludedFromMaskFormats, format => lodash_1.default.includes(this.settings.format, format))) {
|
370
358
|
// Enforce the input mask of the format.
|
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.
|
528
|
+
return FormioUtils.interpolate(string, evalContext, options);
|
529
529
|
}
|
530
|
-
return FormioUtils.
|
530
|
+
return FormioUtils.interpolate(string, this.evalContext(data), options);
|
531
531
|
}
|
532
532
|
/**
|
533
533
|
* Performs an evaluation using the evaluation context of this component.
|
package/lib/mjs/utils/index.d.ts
CHANGED
@@ -2,7 +2,8 @@ export * from "./utils";
|
|
2
2
|
export * from "./formUtils";
|
3
3
|
export default FormioUtils;
|
4
4
|
declare const FormioUtils: {
|
5
|
-
|
5
|
+
DefaultEvaluator: typeof DefaultEvaluator;
|
6
|
+
Evaluator: DefaultEvaluator;
|
6
7
|
interpolate: typeof interpolate;
|
7
8
|
ConditionOperators: {
|
8
9
|
[x: string]: typeof import("./conditionOperators/IsEqualTo").default | typeof import("./conditionOperators/DateGreaterThan").default;
|
@@ -165,6 +166,7 @@ declare const FormioUtils: {
|
|
165
166
|
};
|
166
167
|
import { Evaluator } from './Evaluator';
|
167
168
|
import { registerEvaluator } from './Evaluator';
|
169
|
+
import { DefaultEvaluator } from './Evaluator';
|
168
170
|
import { interpolate } from './Evaluator';
|
169
171
|
import moment from 'moment';
|
170
172
|
export { FormioUtils as Utils, Evaluator, registerEvaluator };
|
package/lib/mjs/utils/index.js
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
import * as utils from './utils';
|
2
2
|
import * as formUtils from './formUtils';
|
3
|
-
import { Evaluator, registerEvaluator, interpolate } from './Evaluator';
|
3
|
+
import { Evaluator, registerEvaluator, interpolate, DefaultEvaluator } 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,
|
10
11
|
Evaluator,
|
11
12
|
interpolate,
|
12
13
|
ConditionOperators,
|
@@ -238,9 +238,6 @@ export default class CalendarWidget extends InputWidget {
|
|
238
238
|
if (!this.calendar) {
|
239
239
|
return super.getValue();
|
240
240
|
}
|
241
|
-
if (this.settings.isManuallyOverriddenValue) {
|
242
|
-
return this.settings.manualInputValue;
|
243
|
-
}
|
244
241
|
// Get the selected dates from the calendar widget.
|
245
242
|
const dates = this.calendar.selectedDates;
|
246
243
|
if (!dates || !dates.length) {
|
@@ -347,15 +344,6 @@ export default class CalendarWidget extends InputWidget {
|
|
347
344
|
this.calendar.updateValue(false);
|
348
345
|
});
|
349
346
|
}
|
350
|
-
// Move input attributes to altInput.
|
351
|
-
const labelledbyIds = this.calendar.input.getAttribute('aria-labelledby');
|
352
|
-
const isRequired = this.calendar.input.getAttribute('aria-required');
|
353
|
-
this.calendar.altInput.id = this._input.id;
|
354
|
-
this.calendar.altInput.setAttribute('aria-labelledby', labelledbyIds);
|
355
|
-
this.calendar.altInput.setAttribute('aria-required', isRequired);
|
356
|
-
this._input.removeAttribute('id');
|
357
|
-
this._input.removeAttribute('aria-labelledby');
|
358
|
-
this._input.removeAttribute('aria-required');
|
359
347
|
const excludedFromMaskFormats = ['MMMM'];
|
360
348
|
if (!this.settings.readOnly && !_.some(excludedFromMaskFormats, format => _.includes(this.settings.format, format))) {
|
361
349
|
// Enforce the input mask of the format.
|