@formio/js 5.1.0-dev.6143.de7b851 → 5.1.0-dev.6145.1538310
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/lib/cjs/components/datamap/DataMap.d.ts +1 -1
- package/lib/cjs/components/datamap/DataMap.js +4 -4
- package/lib/cjs/widgets/CalendarWidget.js +3 -1
- package/lib/mjs/components/datamap/DataMap.d.ts +1 -1
- package/lib/mjs/components/datamap/DataMap.js +1 -1
- package/lib/mjs/widgets/CalendarWidget.js +3 -1
- package/package.json +1 -1
@@ -7,7 +7,7 @@ const Component_1 = __importDefault(require("../_classes/component/Component"));
|
|
7
7
|
const DataGrid_1 = __importDefault(require("../datagrid/DataGrid"));
|
8
8
|
const lodash_1 = __importDefault(require("lodash"));
|
9
9
|
const eventemitter3_1 = __importDefault(require("eventemitter3"));
|
10
|
-
const
|
10
|
+
const utils_1 = require("../../utils/utils");
|
11
11
|
class DataMapComponent extends DataGrid_1.default {
|
12
12
|
static schema(...extend) {
|
13
13
|
return Component_1.default.schema({
|
@@ -50,7 +50,7 @@ class DataMapComponent extends DataGrid_1.default {
|
|
50
50
|
return lodash_1.default.omit(schema, 'components');
|
51
51
|
}
|
52
52
|
static savedValueTypes(schema) {
|
53
|
-
return (0,
|
53
|
+
return (0, utils_1.getComponentSavedTypes)(schema) || [utils_1.componentValueTypes.object];
|
54
54
|
}
|
55
55
|
constructor(component, options, data) {
|
56
56
|
super(component, options, data);
|
@@ -149,7 +149,7 @@ class DataMapComponent extends DataGrid_1.default {
|
|
149
149
|
getRowKey(rowIndex) {
|
150
150
|
const keys = Object.keys(this.dataValue);
|
151
151
|
if (!keys[rowIndex]) {
|
152
|
-
keys[rowIndex] = (0,
|
152
|
+
keys[rowIndex] = (0, utils_1.uniqueKey)(this.dataValue, this.defaultRowKey);
|
153
153
|
}
|
154
154
|
return keys[rowIndex];
|
155
155
|
}
|
@@ -232,7 +232,7 @@ class DataMapComponent extends DataGrid_1.default {
|
|
232
232
|
components['__key'] = this.createComponent(this.keySchema, options, { __key: this.builderMode ? this.defaultRowKey : key });
|
233
233
|
components['__key'].on('componentChange', (event) => {
|
234
234
|
const dataValue = this.dataValue;
|
235
|
-
const newKey = (0,
|
235
|
+
const newKey = (0, utils_1.uniqueKey)(dataValue, event.value);
|
236
236
|
dataValue[newKey] = dataValue[key];
|
237
237
|
delete dataValue[key];
|
238
238
|
const comp = components[this.valueKey];
|
@@ -265,7 +265,9 @@ 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
|
-
|
268
|
+
if (this.component.type === 'textfield' && !(0, utils_1.hasEncodedTimezone)(value)) {
|
269
|
+
this.settings.skipOffset = true;
|
270
|
+
}
|
269
271
|
if (value) {
|
270
272
|
if (!saveAsText && this.settings.readOnly) {
|
271
273
|
this.calendar.setDate((0, utils_1.dayjsDate)(value, this.valueFormat, this.timezone).format(), false);
|
@@ -2,7 +2,7 @@ import Component from '../_classes/component/Component';
|
|
2
2
|
import DataGridComponent from '../datagrid/DataGrid';
|
3
3
|
import _ from 'lodash';
|
4
4
|
import EventEmitter from 'eventemitter3';
|
5
|
-
import { componentValueTypes, getComponentSavedTypes, uniqueKey } from '../../utils/
|
5
|
+
import { componentValueTypes, getComponentSavedTypes, uniqueKey } from '../../utils/utils';
|
6
6
|
export default class DataMapComponent extends DataGridComponent {
|
7
7
|
static schema(...extend) {
|
8
8
|
return Component.schema({
|
@@ -257,7 +257,9 @@ 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
|
-
|
260
|
+
if (this.component.type === 'textfield' && !hasEncodedTimezone(value)) {
|
261
|
+
this.settings.skipOffset = true;
|
262
|
+
}
|
261
263
|
if (value) {
|
262
264
|
if (!saveAsText && this.settings.readOnly) {
|
263
265
|
this.calendar.setDate(dayjsDate(value, this.valueFormat, this.timezone).format(), false);
|