@formio/js 5.1.0-dev.6137.25c880e → 5.1.0-dev.6143.de7b851
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 +2 -2
- 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/utils/index.d.ts +0 -6
- package/lib/cjs/utils/index.js +1 -10
- package/lib/cjs/widgets/CalendarWidget.js +1 -3
- package/lib/mjs/utils/index.d.ts +0 -6
- package/lib/mjs/utils/index.js +1 -7
- package/lib/mjs/widgets/CalendarWidget.js +1 -3
- package/package.json +1 -1
package/lib/cjs/utils/index.d.ts
CHANGED
@@ -4,11 +4,6 @@ export default FormioUtils;
|
|
4
4
|
declare const FormioUtils: {
|
5
5
|
Evaluator: import("./Evaluator").DefaultEvaluator;
|
6
6
|
interpolate: (rawTemplate: any, data: any, _options: any) => any;
|
7
|
-
ConditionOperators: {
|
8
|
-
[x: string]: typeof import("./conditionOperators/IsEqualTo").default | typeof import("./conditionOperators/DateGreaterThan").default;
|
9
|
-
};
|
10
|
-
_: any;
|
11
|
-
moment: typeof moment;
|
12
7
|
flattenComponents: typeof import("@formio/core/lib/utils/formUtil").flattenComponents;
|
13
8
|
guid: typeof import("@formio/core/lib/utils/formUtil").guid;
|
14
9
|
uniqueName: typeof import("@formio/core/lib/utils/formUtil").uniqueName;
|
@@ -165,5 +160,4 @@ declare const FormioUtils: {
|
|
165
160
|
};
|
166
161
|
import { Evaluator } from './Evaluator';
|
167
162
|
import { registerEvaluator } from './Evaluator';
|
168
|
-
import moment from 'moment';
|
169
163
|
export { FormioUtils as Utils, Evaluator, registerEvaluator };
|
package/lib/cjs/utils/index.js
CHANGED
@@ -25,9 +25,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
25
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
26
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
27
27
|
};
|
28
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
29
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
30
|
-
};
|
31
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
32
29
|
exports.registerEvaluator = exports.Evaluator = exports.Utils = void 0;
|
33
30
|
const utils = __importStar(require("./utils"));
|
@@ -35,14 +32,8 @@ const formUtils = __importStar(require("./formUtils"));
|
|
35
32
|
const Evaluator_1 = require("./Evaluator");
|
36
33
|
Object.defineProperty(exports, "Evaluator", { enumerable: true, get: function () { return Evaluator_1.Evaluator; } });
|
37
34
|
Object.defineProperty(exports, "registerEvaluator", { enumerable: true, get: function () { return Evaluator_1.registerEvaluator; } });
|
38
|
-
const conditionOperators_1 = __importDefault(require("./conditionOperators"));
|
39
|
-
const lodash_1 = __importDefault(require("lodash"));
|
40
|
-
const moment_1 = __importDefault(require("moment"));
|
41
35
|
const FormioUtils = Object.assign(Object.assign(Object.assign({}, utils), formUtils), { Evaluator: Evaluator_1.Evaluator,
|
42
|
-
interpolate: Evaluator_1.interpolate
|
43
|
-
ConditionOperators: conditionOperators_1.default,
|
44
|
-
_: lodash_1.default,
|
45
|
-
moment: moment_1.default });
|
36
|
+
interpolate: Evaluator_1.interpolate });
|
46
37
|
exports.Utils = FormioUtils;
|
47
38
|
if (typeof global === 'object') {
|
48
39
|
global.FormioUtils = FormioUtils;
|
@@ -265,9 +265,7 @@ class CalendarWidget extends InputWidget_1.default {
|
|
265
265
|
}
|
266
266
|
// If the component is a textfield that does not have timezone information included in the string value then skip
|
267
267
|
// the timezone offset
|
268
|
-
|
269
|
-
this.settings.skipOffset = true;
|
270
|
-
}
|
268
|
+
this.settings.skipOffset = this.component.type === 'textfield' && !(0, utils_1.hasEncodedTimezone)(value);
|
271
269
|
if (value) {
|
272
270
|
if (!saveAsText && this.settings.readOnly) {
|
273
271
|
this.calendar.setDate((0, utils_1.dayjsDate)(value, this.valueFormat, this.timezone).format(), false);
|
package/lib/mjs/utils/index.d.ts
CHANGED
@@ -4,11 +4,6 @@ export default FormioUtils;
|
|
4
4
|
declare const FormioUtils: {
|
5
5
|
Evaluator: import("./Evaluator").DefaultEvaluator;
|
6
6
|
interpolate: (rawTemplate: any, data: any, _options: any) => any;
|
7
|
-
ConditionOperators: {
|
8
|
-
[x: string]: typeof import("./conditionOperators/IsEqualTo").default | typeof import("./conditionOperators/DateGreaterThan").default;
|
9
|
-
};
|
10
|
-
_: any;
|
11
|
-
moment: typeof moment;
|
12
7
|
flattenComponents: typeof import("@formio/core/lib/utils/formUtil").flattenComponents;
|
13
8
|
guid: typeof import("@formio/core/lib/utils/formUtil").guid;
|
14
9
|
uniqueName: typeof import("@formio/core/lib/utils/formUtil").uniqueName;
|
@@ -165,5 +160,4 @@ declare const FormioUtils: {
|
|
165
160
|
};
|
166
161
|
import { Evaluator } from './Evaluator';
|
167
162
|
import { registerEvaluator } from './Evaluator';
|
168
|
-
import moment from 'moment';
|
169
163
|
export { FormioUtils as Utils, Evaluator, registerEvaluator };
|
package/lib/mjs/utils/index.js
CHANGED
@@ -1,17 +1,11 @@
|
|
1
1
|
import * as utils from './utils';
|
2
2
|
import * as formUtils from './formUtils';
|
3
3
|
import { Evaluator, registerEvaluator, interpolate } from './Evaluator';
|
4
|
-
import ConditionOperators from './conditionOperators';
|
5
|
-
import _ from 'lodash';
|
6
|
-
import moment from 'moment';
|
7
4
|
const FormioUtils = {
|
8
5
|
...utils,
|
9
6
|
...formUtils,
|
10
7
|
Evaluator,
|
11
|
-
interpolate
|
12
|
-
ConditionOperators,
|
13
|
-
_,
|
14
|
-
moment
|
8
|
+
interpolate
|
15
9
|
};
|
16
10
|
if (typeof global === 'object') {
|
17
11
|
global.FormioUtils = FormioUtils;
|
@@ -257,9 +257,7 @@ export default class CalendarWidget extends InputWidget {
|
|
257
257
|
}
|
258
258
|
// If the component is a textfield that does not have timezone information included in the string value then skip
|
259
259
|
// the timezone offset
|
260
|
-
|
261
|
-
this.settings.skipOffset = true;
|
262
|
-
}
|
260
|
+
this.settings.skipOffset = this.component.type === 'textfield' && !hasEncodedTimezone(value);
|
263
261
|
if (value) {
|
264
262
|
if (!saveAsText && this.settings.readOnly) {
|
265
263
|
this.calendar.setDate(dayjsDate(value, this.valueFormat, this.timezone).format(), false);
|