procode-lowcode-core 1.0.7 → 1.0.9

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/index.esm.js CHANGED
@@ -18559,7 +18559,7 @@ const getParams = (config, actionInvokerProps, selectedValue) => {
18559
18559
  ValueReplacePolicy$1.STATE_SELECTED_DATA) {
18560
18560
  const fields = p.rightOperand.value.split("::");
18561
18561
  let model = getValueFromNestedObject(fields[0], actionInvokerProps.viewModel);
18562
- model = model === null || model === void 0 ? void 0 : model.find((m) => m.id === selectedValue);
18562
+ model = model === null || model === void 0 ? void 0 : model.find((m) => { var _a; return m[(_a = selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.dataItemKey) !== null && _a !== void 0 ? _a : "id"] === (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.value); });
18563
18563
  value = getValueFromNestedObject(fields[1], model);
18564
18564
  }
18565
18565
  else {
@@ -18591,19 +18591,22 @@ const validateUiElementSchema = (uiElement, isSchemaValid, schemaInvalidMessages
18591
18591
  executeMode: ExecuteMode.ONSUBMIT,
18592
18592
  modifiedViewModel: undefined,
18593
18593
  screenDataField: uiElement.screenDataField,
18594
- validations: uiElement.validations
18594
+ validations: uiElement.validations,
18595
18595
  });
18596
18596
  isSchemaValid = isSchemaValid && isComponentValid;
18597
18597
  schemaInvalidMessages = Object.assign(Object.assign({}, schemaInvalidMessages), { [uiElement.screenDataField]: invalidMessages });
18598
18598
  }
18599
- else if (uiElement.uiElementType === ScreenUIType.LAYOUT) {
18599
+ else if (uiElement.uiElementType === ScreenUIType.LAYOUT &&
18600
+ uiElement.visible !== false) {
18600
18601
  uiElement.cells.forEach((cell) => {
18601
18602
  const result = validateUiElementSchema(cell, isSchemaValid, schemaInvalidMessages, executeValidation);
18602
18603
  isSchemaValid = isSchemaValid && result.isSchemaValid;
18603
18604
  schemaInvalidMessages = Object.assign(Object.assign({}, schemaInvalidMessages), result.schemaInvalidMessages);
18604
18605
  });
18605
18606
  }
18606
- else if (uiElement.children && uiElement.children.length > 0) {
18607
+ else if (uiElement.children &&
18608
+ uiElement.children.length > 0 &&
18609
+ uiElement.visible !== false) {
18607
18610
  uiElement.children.forEach((child) => {
18608
18611
  const result = validateUiElementSchema(child, isSchemaValid, schemaInvalidMessages, executeValidation);
18609
18612
  isSchemaValid = isSchemaValid && result.isSchemaValid;
@@ -19137,7 +19140,7 @@ const Widget = ({ schemaElementProps, viewModel, validation, navigate, eventServ
19137
19140
  if (!WidgetComponent) {
19138
19141
  return (jsx(Skeleton, { className: "", skeletonType: (_j = schemaElementProps.skeletonType) !== null && _j !== void 0 ? _j : "", value: "LOADING..." }));
19139
19142
  }
19140
- return jsx(WidgetComponent, Object.assign({}, widgetProps));
19143
+ return (jsx(WidgetComponent, Object.assign({}, widgetProps, { availableValidations: schemaElementProps.validations })));
19141
19144
  };
19142
19145
 
19143
19146
  const WidgetRenderer = (_a) => {