@formio/js 5.1.0-dev.6145.1538310 → 5.1.0-dev.6147.abe2ba0
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/_classes/component/Component.js +3 -3
- package/lib/cjs/components/datamap/DataMap.d.ts +1 -1
- package/lib/cjs/components/datamap/DataMap.js +4 -4
- package/lib/mjs/components/_classes/component/Component.js +3 -3
- package/lib/mjs/components/datamap/DataMap.d.ts +1 -1
- package/lib/mjs/components/datamap/DataMap.js +1 -1
- package/package.json +1 -1
@@ -3210,6 +3210,9 @@ class Component extends Element_1.default {
|
|
3210
3210
|
data = data || this.rootValue;
|
3211
3211
|
flags = flags || {};
|
3212
3212
|
row = row || this.data;
|
3213
|
+
if (flags.noCheck) {
|
3214
|
+
return true;
|
3215
|
+
}
|
3213
3216
|
// Some components (for legacy reasons) have calls to "checkData" in inappropriate places such
|
3214
3217
|
// as setValue. Historically, this was bypassed by a series of cached states around the data model
|
3215
3218
|
// which caused its own problems. We need to ensure that premium and custom components do not fall into
|
@@ -3224,9 +3227,6 @@ class Component extends Element_1.default {
|
|
3224
3227
|
if (!flags.fromBlur) {
|
3225
3228
|
this.checkRefreshOn(flags.changes, flags);
|
3226
3229
|
}
|
3227
|
-
if (flags.noCheck) {
|
3228
|
-
return true;
|
3229
|
-
}
|
3230
3230
|
this.checkComponentConditions(data, flags, row);
|
3231
3231
|
if (this.id !== flags.triggeredComponentId) {
|
3232
3232
|
this.calculateComponentValue(data, flags, row);
|
@@ -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 formUtils_1 = require("../../utils/formUtils");
|
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, formUtils_1.getComponentSavedTypes)(schema) || [formUtils_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, formUtils_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, formUtils_1.uniqueKey)(dataValue, event.value);
|
236
236
|
dataValue[newKey] = dataValue[key];
|
237
237
|
delete dataValue[key];
|
238
238
|
const comp = components[this.valueKey];
|
@@ -3198,6 +3198,9 @@ export default class Component extends Element {
|
|
3198
3198
|
data = data || this.rootValue;
|
3199
3199
|
flags = flags || {};
|
3200
3200
|
row = row || this.data;
|
3201
|
+
if (flags.noCheck) {
|
3202
|
+
return true;
|
3203
|
+
}
|
3201
3204
|
// Some components (for legacy reasons) have calls to "checkData" in inappropriate places such
|
3202
3205
|
// as setValue. Historically, this was bypassed by a series of cached states around the data model
|
3203
3206
|
// which caused its own problems. We need to ensure that premium and custom components do not fall into
|
@@ -3212,9 +3215,6 @@ export default class Component extends Element {
|
|
3212
3215
|
if (!flags.fromBlur) {
|
3213
3216
|
this.checkRefreshOn(flags.changes, flags);
|
3214
3217
|
}
|
3215
|
-
if (flags.noCheck) {
|
3216
|
-
return true;
|
3217
|
-
}
|
3218
3218
|
this.checkComponentConditions(data, flags, row);
|
3219
3219
|
if (this.id !== flags.triggeredComponentId) {
|
3220
3220
|
this.calculateComponentValue(data, flags, row);
|
@@ -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/formUtils';
|
6
6
|
export default class DataMapComponent extends DataGridComponent {
|
7
7
|
static schema(...extend) {
|
8
8
|
return Component.schema({
|