@wavemaker-ai/react-runtime 1.0.0-rc.330 → 1.0.0-rc.332

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 (50) hide show
  1. package/actions/notification-action.js +3 -3
  2. package/actions/toast.js +2 -1
  3. package/components/basic/message/index.js +1 -0
  4. package/components/basic/search/index.js +9 -11
  5. package/components/basic/search/providers.d.ts +1 -1
  6. package/components/basic/search/providers.js +6 -3
  7. package/components/container/layout-grid/index.js +1 -0
  8. package/components/container/linear-layout/index.js +0 -1
  9. package/components/data/form/base-form/hooks/useFormOperations.js +9 -15
  10. package/components/data/form/base-form/index.js +17 -14
  11. package/components/data/form/base-form/utils.js +5 -4
  12. package/components/data/form/form-action/index.d.ts +2 -2
  13. package/components/data/form/form-action/index.js +2 -2
  14. package/components/data/form/form-context.d.ts +12 -13
  15. package/components/data/form/form-context.js +4 -6
  16. package/components/data/form/form-controller/withFormController.js +4 -4
  17. package/components/data/form/form-field/index.js +6 -5
  18. package/components/data/list/components/ListItems.js +1 -3
  19. package/components/data/list/index.js +2 -2
  20. package/components/data/pagination/hooks/usePagination.js +2 -2
  21. package/components/data/table/components/TableBody.js +2 -1
  22. package/components/data/table/components/TableDataRow.js +1 -1
  23. package/components/data/table/hooks/useRowHandlers.js +2 -2
  24. package/components/data/table/hooks/useRowSelection.js +15 -10
  25. package/components/data/table/hooks/useTableColumns.js +5 -5
  26. package/components/data/table/index.js +2 -2
  27. package/components/data/table/props.d.ts +8 -8
  28. package/components/data/table/utils/buildSelectionColumns.js +30 -30
  29. package/components/data/table/utils/index.js +15 -1
  30. package/components/data/table/utils/selectionUtils.d.ts +2 -0
  31. package/components/data/table/utils/selectionUtils.js +23 -1
  32. package/components/dialogs/dialog-actions/index.js +11 -2
  33. package/components/input/epoch/date/index.js +2 -1
  34. package/components/input/epoch/date/utils.js +4 -2
  35. package/components/input/epoch/datetime/index.js +2 -2
  36. package/components/input/epoch/datetime/props.d.ts +2 -2
  37. package/components/input/epoch/time/utils.d.ts +1 -1
  38. package/components/input/epoch/time/utils.js +2 -2
  39. package/components/input/fileupload/useFileUpload.js +19 -24
  40. package/components/input/select/index.js +6 -3
  41. package/components/navigation/popover/index.d.ts +1 -1
  42. package/components/navigation/popover/index.js +1 -1
  43. package/components/navigation/popover/props.d.ts +1 -1
  44. package/core/proxy-service.d.ts +16 -1
  45. package/core/proxy-service.js +39 -12
  46. package/higherOrder/BaseDateTime.js +8 -1
  47. package/higherOrder/BasePage.js +7 -2
  48. package/higherOrder/withBaseWrapper.js +3 -4
  49. package/package-lock.json +176 -159
  50. package/package.json +3 -3
@@ -274,7 +274,6 @@ const withPageContext = (WrappedComponent, addPageScript, getVariables, componen
274
274
  }
275
275
  isInitializingRef.current = true;
276
276
  const initializeComponent = async () => {
277
- var _a2;
278
277
  try {
279
278
  overriddenPropsRegistryRef.current = createOverriddenPropsRegistry();
280
279
  const pageProxy = createStateProxy(
@@ -304,7 +303,6 @@ const withPageContext = (WrappedComponent, addPageScript, getVariables, componen
304
303
  pageProxy.pageParams = newParams;
305
304
  if ((componentInfo == null ? void 0 : componentInfo.componentType) !== "PAGE") {
306
305
  pageProxy.partialParams = newParams;
307
- (_a2 = props.onLoad) == null ? void 0 : _a2.call(props, pageProxy);
308
306
  }
309
307
  const mergedAppLocale = i18n.appLocale || {};
310
308
  if (!appProxy.appLocale) {
@@ -391,6 +389,9 @@ const withPageContext = (WrappedComponent, addPageScript, getVariables, componen
391
389
  }
392
390
  });
393
391
  subscriptionsRef.current = [];
392
+ if ((componentInfo == null ? void 0 : componentInfo.componentName) && (componentInfo == null ? void 0 : componentInfo.componentType) == "PARTIAL" && appProxy && pageProxyRef.current && appProxy[componentInfo.componentName]) {
393
+ appProxy[componentInfo.componentName] = void 0;
394
+ }
394
395
  };
395
396
  }, [shouldInitialize]);
396
397
  useEffect(() => {
@@ -619,7 +620,11 @@ const withPageContext = (WrappedComponent, addPageScript, getVariables, componen
619
620
  useEffect(() => {
620
621
  if (isInitialized && isPageReady && isMountedRef.current && !onStartupCompletedRef.current && pageProxyRef.current) {
621
622
  const runStartup = async () => {
623
+ var _a2;
622
624
  if (!isMountedRef.current) return;
625
+ if ((componentInfo == null ? void 0 : componentInfo.componentType) !== "PAGE") {
626
+ (_a2 = props.onLoad) == null ? void 0 : _a2.call(props, pageProxyRef.current);
627
+ }
623
628
  if ((securityConfig == null ? void 0 : securityConfig.authenticated) && (appProxy == null ? void 0 : appProxy.executeSessionFailureRequests)) {
624
629
  await appProxy.executeSessionFailureRequests();
625
630
  }
@@ -57,7 +57,6 @@ const withBaseWrapper = (WrappedComponent) => {
57
57
  }
58
58
  }, [name, pageContext == null ? void 0 : pageContext.Widgets, componentWidgetId, props]);
59
59
  const mergedProps = useMemo(() => {
60
- var _a2;
61
60
  if (!name || !(pageContext == null ? void 0 : pageContext.Widgets) || (props == null ? void 0 : props.iswidget) === "false") {
62
61
  return props;
63
62
  }
@@ -73,8 +72,8 @@ const withBaseWrapper = (WrappedComponent) => {
73
72
  const widgetOverrides = registry == null ? void 0 : registry.getWidgetOverrides(name, componentWidgetId || "");
74
73
  if (widgetOverrides) {
75
74
  Object.keys(widgetOverrides).forEach((key) => {
76
- var _a3;
77
- const internalValue = (_a3 = registry == null ? void 0 : registry.getLastInternalValue) == null ? void 0 : _a3.call(registry, name, key);
75
+ var _a2;
76
+ const internalValue = (_a2 = registry == null ? void 0 : registry.getLastInternalValue) == null ? void 0 : _a2.call(registry, name, key);
78
77
  mergedState[key] = internalValue !== void 0 ? internalValue : widgetOverrides[key];
79
78
  if (props.prefab && key !== "inbound" && key !== "outbound" && key !== "show") {
80
79
  const updatedInbound = __spreadProps(__spreadValues({}, props.inbound), {
@@ -95,7 +94,7 @@ const withBaseWrapper = (WrappedComponent) => {
95
94
  });
96
95
  }
97
96
  } else if (shouldMergeFromContext) {
98
- mergedState = __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, widget), props), (props == null ? void 0 : props.formfield) ? { datavalue: props.datavalue } : { datavalue: (_a2 = props.datavalue) != null ? _a2 : widgetDatavalue }), component === "WmFormField" && !props["value"] && { value: datavalue, datavalue });
97
+ mergedState = __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, widget), props), (props == null ? void 0 : props.formfield) ? { datavalue: props.datavalue } : { datavalue: datavalue != null ? datavalue : widgetDatavalue }), component === "WmFormField" && !props["value"] && { value: datavalue, datavalue });
99
98
  } else {
100
99
  mergedState = __spreadValues(__spreadValues({}, props), component === "WmFormField" && !props["value"] && { value: datavalue, datavalue });
101
100
  }