@formio/js 5.1.0-dev.6154.73887de → 5.1.0-dev.6155.76252ef

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.
Files changed (39) hide show
  1. package/dist/formio.builder.css +1 -0
  2. package/dist/formio.builder.min.css +1 -1
  3. package/dist/formio.form.css +1 -0
  4. package/dist/formio.form.js +8 -8
  5. package/dist/formio.form.min.css +1 -1
  6. package/dist/formio.form.min.js +1 -1
  7. package/dist/formio.full.css +1 -0
  8. package/dist/formio.full.js +10 -10
  9. package/dist/formio.full.min.css +1 -1
  10. package/dist/formio.full.min.js +1 -1
  11. package/dist/formio.js +4 -4
  12. package/dist/formio.min.js +1 -1
  13. package/dist/formio.utils.js +5 -5
  14. package/dist/formio.utils.min.js +1 -1
  15. package/lib/cjs/PDFBuilder.d.ts +1 -0
  16. package/lib/cjs/PDFBuilder.js +8 -8
  17. package/lib/cjs/WebformBuilder.d.ts +1 -1
  18. package/lib/cjs/WebformBuilder.js +36 -11
  19. package/lib/cjs/components/radio/Radio.d.ts +8 -0
  20. package/lib/cjs/components/radio/Radio.js +15 -5
  21. package/lib/cjs/components/select/Select.d.ts +1 -0
  22. package/lib/cjs/components/select/Select.js +18 -2
  23. package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +6 -0
  24. package/lib/cjs/translations/en.d.ts +1 -0
  25. package/lib/cjs/translations/en.js +1 -1
  26. package/lib/cjs/utils/utils.js +10 -3
  27. package/lib/mjs/PDFBuilder.d.ts +1 -0
  28. package/lib/mjs/PDFBuilder.js +8 -8
  29. package/lib/mjs/WebformBuilder.d.ts +1 -1
  30. package/lib/mjs/WebformBuilder.js +36 -12
  31. package/lib/mjs/components/radio/Radio.d.ts +8 -0
  32. package/lib/mjs/components/radio/Radio.js +15 -5
  33. package/lib/mjs/components/select/Select.d.ts +1 -0
  34. package/lib/mjs/components/select/Select.js +18 -2
  35. package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +6 -0
  36. package/lib/mjs/translations/en.d.ts +1 -0
  37. package/lib/mjs/translations/en.js +1 -0
  38. package/lib/mjs/utils/utils.js +10 -2
  39. package/package.json +2 -2
@@ -199,7 +199,15 @@ export function checkSimpleConditional(component, condition, row, data, instance
199
199
  return true;
200
200
  }
201
201
  const splittedConditionPath = conditionComponentPath.split('.');
202
- const conditionalPaths = instance?.parent?.type === 'datagrid' || instance?.parent?.type === 'editgrid' ? [] : getConditionalPathsRecursive(splittedConditionPath, data);
202
+ const checkParentTypeInTree = (instance, componentType) => {
203
+ if (!instance?.parent) {
204
+ return false;
205
+ }
206
+ return instance?.parent.type === componentType || checkParentTypeInTree(instance.parent, componentType);
207
+ };
208
+ const conditionalPaths = checkParentTypeInTree(instance, 'datagrid') || checkParentTypeInTree(instance, 'editgrid')
209
+ ? []
210
+ : getConditionalPathsRecursive(splittedConditionPath, data);
203
211
  if (conditionalPaths.length > 0) {
204
212
  return conditionalPaths.map((path) => {
205
213
  const value = getComponentActualValue(path, data, row);
@@ -313,7 +321,7 @@ function getRow(component, row, instance, conditional) {
313
321
  }
314
322
  const dataParent = getDataParentComponent(instance);
315
323
  if (dataParent) {
316
- const parentPath = dataParent.paths?.localDataPath;
324
+ const parentPath = dataParent.paths?.localPath;
317
325
  const isTriggerCondtionComponentPath = condition.when || !condition.conditions
318
326
  ? condition.when?.startsWith(dataParent.paths?.localPath)
319
327
  : _.some(condition.conditions, cond => cond.component.startsWith(dataParent.paths?.localPath));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.1.0-dev.6154.73887de",
3
+ "version": "5.1.0-dev.6155.76252ef",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {
@@ -81,7 +81,7 @@
81
81
  "homepage": "https://github.com/formio/formio.js#readme",
82
82
  "dependencies": {
83
83
  "@formio/bootstrap": "v3.0.0-dev.121.085d187",
84
- "@formio/core": "2.4.0-dev.245.326cac7",
84
+ "@formio/core": "v2.4.0-dev.255.7fab6ff",
85
85
  "@formio/text-mask-addons": "3.8.0-formio.4",
86
86
  "@formio/vanilla-text-mask": "^5.1.1-formio.1",
87
87
  "abortcontroller-polyfill": "^1.7.5",