@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.
- package/actions/notification-action.js +3 -3
- package/actions/toast.js +2 -1
- package/components/basic/message/index.js +1 -0
- package/components/basic/search/index.js +9 -11
- package/components/basic/search/providers.d.ts +1 -1
- package/components/basic/search/providers.js +6 -3
- package/components/container/layout-grid/index.js +1 -0
- package/components/container/linear-layout/index.js +0 -1
- package/components/data/form/base-form/hooks/useFormOperations.js +9 -15
- package/components/data/form/base-form/index.js +17 -14
- package/components/data/form/base-form/utils.js +5 -4
- package/components/data/form/form-action/index.d.ts +2 -2
- package/components/data/form/form-action/index.js +2 -2
- package/components/data/form/form-context.d.ts +12 -13
- package/components/data/form/form-context.js +4 -6
- package/components/data/form/form-controller/withFormController.js +4 -4
- package/components/data/form/form-field/index.js +6 -5
- package/components/data/list/components/ListItems.js +1 -3
- package/components/data/list/index.js +2 -2
- package/components/data/pagination/hooks/usePagination.js +2 -2
- package/components/data/table/components/TableBody.js +2 -1
- package/components/data/table/components/TableDataRow.js +1 -1
- package/components/data/table/hooks/useRowHandlers.js +2 -2
- package/components/data/table/hooks/useRowSelection.js +15 -10
- package/components/data/table/hooks/useTableColumns.js +5 -5
- package/components/data/table/index.js +2 -2
- package/components/data/table/props.d.ts +8 -8
- package/components/data/table/utils/buildSelectionColumns.js +30 -30
- package/components/data/table/utils/index.js +15 -1
- package/components/data/table/utils/selectionUtils.d.ts +2 -0
- package/components/data/table/utils/selectionUtils.js +23 -1
- package/components/dialogs/dialog-actions/index.js +11 -2
- package/components/input/epoch/date/index.js +2 -1
- package/components/input/epoch/date/utils.js +4 -2
- package/components/input/epoch/datetime/index.js +2 -2
- package/components/input/epoch/datetime/props.d.ts +2 -2
- package/components/input/epoch/time/utils.d.ts +1 -1
- package/components/input/epoch/time/utils.js +2 -2
- package/components/input/fileupload/useFileUpload.js +19 -24
- package/components/input/select/index.js +6 -3
- package/components/navigation/popover/index.d.ts +1 -1
- package/components/navigation/popover/index.js +1 -1
- package/components/navigation/popover/props.d.ts +1 -1
- package/core/proxy-service.d.ts +16 -1
- package/core/proxy-service.js +39 -12
- package/higherOrder/BaseDateTime.js +8 -1
- package/higherOrder/BasePage.js +7 -2
- package/higherOrder/withBaseWrapper.js +3 -4
- package/package-lock.json +176 -159
- package/package.json +3 -3
package/higherOrder/BasePage.js
CHANGED
|
@@ -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
|
|
77
|
-
const internalValue = (
|
|
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:
|
|
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
|
}
|