@formio/js 5.0.0-dev.5893.c6cb848 → 5.0.0-dev.5894.b7db66e

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.
@@ -1239,7 +1239,7 @@ class SelectComponent extends ListComponent_1.default {
1239
1239
  }
1240
1240
  lodash_1.default.set(submission.metadata.selectData, this.path, templateData);
1241
1241
  }
1242
- if (flags.resetValue && ((_b = this.root) === null || _b === void 0 ? void 0 : _b.submission) && !this.options.readOnly) {
1242
+ if (flags.resetValue && ((_b = this.root) === null || _b === void 0 ? void 0 : _b.submission)) {
1243
1243
  const submission = this.root.submission;
1244
1244
  if (!submission.metadata) {
1245
1245
  submission.metadata = {};
@@ -257,6 +257,18 @@ class SelectBoxesComponent extends Radio_1.default {
257
257
  }
258
258
  return super.checkComponentValidity(data, dirty, rowData, options, errors);
259
259
  }
260
+ setCustomValidity(messages, dirty, external) {
261
+ if (this.options.building && lodash_1.default.find(messages, { ruleName: 'invalidValueProperty' })) {
262
+ setTimeout(() => {
263
+ this.root && (0, utils_1.getComponent)(this.root.components, 'valueProperty').setCustomValidity(messages, dirty);
264
+ }, 0);
265
+ return super.setCustomValidity(lodash_1.default.filter(messages, (message) => message.ruleName !== 'invalidValueProperty'), dirty, external);
266
+ }
267
+ else {
268
+ return super.setCustomValidity(messages, dirty, external);
269
+ }
270
+ ;
271
+ }
260
272
  validateValueAvailability(setting, value) {
261
273
  if (!(0, utils_1.boolValue)(setting) || !value) {
262
274
  return true;
@@ -1267,7 +1267,7 @@ export default class SelectComponent extends ListComponent {
1267
1267
  }
1268
1268
  _.set(submission.metadata.selectData, this.path, templateData);
1269
1269
  }
1270
- if (flags.resetValue && this.root?.submission && !this.options.readOnly) {
1270
+ if (flags.resetValue && this.root?.submission) {
1271
1271
  const submission = this.root.submission;
1272
1272
  if (!submission.metadata) {
1273
1273
  submission.metadata = {};
@@ -1,5 +1,5 @@
1
1
  import _ from 'lodash';
2
- import { componentValueTypes, getComponentSavedTypes, boolValue } from '../../utils/utils';
2
+ import { componentValueTypes, getComponentSavedTypes, boolValue, getComponent } from '../../utils/utils';
3
3
  import RadioComponent from '../radio/Radio';
4
4
  export default class SelectBoxesComponent extends RadioComponent {
5
5
  static schema(...extend) {
@@ -258,6 +258,18 @@ export default class SelectBoxesComponent extends RadioComponent {
258
258
  }
259
259
  return super.checkComponentValidity(data, dirty, rowData, options, errors);
260
260
  }
261
+ setCustomValidity(messages, dirty, external) {
262
+ if (this.options.building && _.find(messages, { ruleName: 'invalidValueProperty' })) {
263
+ setTimeout(() => {
264
+ this.root && getComponent(this.root.components, 'valueProperty').setCustomValidity(messages, dirty);
265
+ }, 0);
266
+ return super.setCustomValidity(_.filter(messages, (message) => message.ruleName !== 'invalidValueProperty'), dirty, external);
267
+ }
268
+ else {
269
+ return super.setCustomValidity(messages, dirty, external);
270
+ }
271
+ ;
272
+ }
261
273
  validateValueAvailability(setting, value) {
262
274
  if (!boolValue(setting) || !value) {
263
275
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.0.0-dev.5893.c6cb848",
3
+ "version": "5.0.0-dev.5894.b7db66e",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {