@wavemaker-ai/react-runtime 1.0.0-rc.332 → 1.0.0-rc.334
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/components/advanced/carousel/index.d.ts +1 -0
- package/components/advanced/carousel/template.d.ts +1 -0
- package/components/advanced/login/index.d.ts +1 -0
- package/components/advanced/marquee/index.d.ts +1 -0
- package/components/basic/anchor/index.d.ts +1 -0
- package/components/basic/anchor/index.js +3 -5
- package/components/basic/audio/index.d.ts +1 -0
- package/components/basic/html/index.d.ts +1 -0
- package/components/basic/icon/index.d.ts +1 -0
- package/components/basic/iframe/index.d.ts +1 -0
- package/components/basic/label/index.d.ts +1 -0
- package/components/basic/picture/index.d.ts +1 -0
- package/components/basic/progress-bar/index.d.ts +1 -0
- package/components/basic/progress-circle/index.d.ts +1 -0
- package/components/basic/richtexteditor/index.d.ts +2 -0
- package/components/basic/spinner/index.d.ts +1 -0
- package/components/basic/tile/index.d.ts +1 -0
- package/components/basic/tree/index.d.ts +1 -0
- package/components/basic/video/index.d.ts +1 -0
- package/components/chart/index.d.ts +1 -0
- package/components/container/accordion/accordion-pane/index.d.ts +1 -0
- package/components/container/accordion/index.d.ts +1 -0
- package/components/container/index.d.ts +4 -0
- package/components/container/index.js +33 -9
- package/components/container/layout-grid/grid-column/index.d.ts +1 -0
- package/components/container/layout-grid/grid-row/index.d.ts +1 -0
- package/components/container/layout-grid/index.d.ts +1 -0
- package/components/container/layout-grid/index.js +1 -1
- package/components/container/linear-layout/index.d.ts +1 -0
- package/components/container/linear-layout/linear-layout-item/index.d.ts +1 -0
- package/components/container/panel/index.d.ts +1 -0
- package/components/container/props.d.ts +1 -0
- package/components/container/repeat-template/index.d.ts +1 -0
- package/components/container/repeat-template/index.js +1 -1
- package/components/container/tabs/index.d.ts +1 -0
- package/components/container/tabs/index.js +8 -6
- package/components/container/tabs/tab-pane/index.d.ts +1 -0
- package/components/container/tabs/tab-pane/index.js +2 -2
- package/components/container/wizard/index.d.ts +2 -0
- package/components/container/wizard/index.js +56 -40
- package/components/container/wizard/wizard-step/index.d.ts +1 -0
- package/components/data/card/card-actions/index.d.ts +1 -0
- package/components/data/card/card-content/index.d.ts +1 -0
- package/components/data/card/card-footer/index.d.ts +1 -0
- package/components/data/card/index.d.ts +1 -0
- package/components/data/form/base-form/hooks/useFormOperations.d.ts +1 -1
- package/components/data/form/base-form/hooks/useFormOperations.js +5 -2
- package/components/data/form/base-form/index.js +10 -14
- package/components/data/form/base-form/props.d.ts +1 -0
- package/components/data/form/form-action/index.d.ts +2 -0
- package/components/data/form/form-controller/withFormController.js +16 -3
- package/components/data/form/form-field/index.js +35 -11
- package/components/data/form/form-field/props.d.ts +7 -2
- package/components/data/list/index.d.ts +2 -0
- package/components/data/list/index.js +4 -9
- package/components/data/pagination/hooks/usePagination.js +6 -6
- package/components/data/table/components/RowExpansionButton.js +5 -1
- package/components/data/table/components/TableBody.js +2 -0
- package/components/data/table/components/TableHeader.js +3 -1
- package/components/data/table/hooks/useFormWidget.js +2 -2
- package/components/data/table/hooks/usePanelStructure.js +6 -1
- package/components/data/table/hooks/useResponsiveColumns.d.ts +1 -0
- package/components/data/table/hooks/useRowHandlers.js +1 -1
- package/components/data/table/hooks/useRowSelection.js +7 -3
- package/components/data/table/hooks/useTableData.js +10 -2
- package/components/data/table/index.d.ts +2 -0
- package/components/data/table/index.js +14 -13
- package/components/data/table/live-table/index.d.ts +1 -0
- package/components/data/table/props.d.ts +1 -0
- package/components/data/table/table-action/index.d.ts +1 -0
- package/components/data/table/table-column/index.d.ts +1 -0
- package/components/data/table/table-row/index.d.ts +1 -0
- package/components/data/table/table-row-action/index.d.ts +1 -0
- package/components/data/table/utils/buildSelectionColumns.js +17 -22
- package/components/data/table/utils/crud-handlers.js +3 -1
- package/components/data/table/utils/expansionColumn.js +1 -1
- package/components/data/table/utils/index.d.ts +10 -3
- package/components/data/table/utils/index.js +5 -8
- package/components/data/table/utils/selectionUtils.d.ts +12 -0
- package/components/data/table/utils/selectionUtils.js +10 -0
- package/components/dialogs/alert-dialog/index.d.ts +2 -0
- package/components/dialogs/confirm-dialog/index.d.ts +2 -0
- package/components/dialogs/dialog/index.d.ts +2 -0
- package/components/dialogs/dialog-actions/index.d.ts +1 -0
- package/components/dialogs/dialog-body/index.d.ts +1 -0
- package/components/dialogs/dialog-content/index.d.ts +1 -0
- package/components/dialogs/dialog-header/index.d.ts +1 -0
- package/components/dialogs/iframe-dialog/index.d.ts +2 -0
- package/components/dialogs/login-dialog/index.d.ts +2 -0
- package/components/dialogs/page-dialog/index.d.ts +2 -0
- package/components/dialogs/withDialogWrapper.js +12 -2
- package/components/form/button/index.d.ts +1 -0
- package/components/form/button-group/index.d.ts +1 -0
- package/components/input/calendar/index.d.ts +2 -0
- package/components/input/chips/index.d.ts +2 -0
- package/components/input/color-picker/index.d.ts +2 -0
- package/components/input/composite/index.d.ts +1 -0
- package/components/input/composite/index.js +32 -6
- package/components/input/default/checkbox/index.d.ts +2 -0
- package/components/input/default/checkboxset/index.d.ts +2 -0
- package/components/input/default/radioset/index.d.ts +2 -0
- package/components/input/default/switch/index.d.ts +2 -0
- package/components/input/epoch/date/index.d.ts +1 -0
- package/components/input/epoch/datetime/index.d.ts +1 -0
- package/components/input/epoch/datetime/index.js +3 -1
- package/components/input/epoch/time/index.d.ts +1 -0
- package/components/input/fileupload/index.d.ts +1 -0
- package/components/input/fileupload/index.js +2 -1
- package/components/input/number/index.d.ts +2 -0
- package/components/input/rating/index.d.ts +2 -0
- package/components/input/slider/index.d.ts +2 -0
- package/components/input/text/index.d.ts +2 -0
- package/components/input/text/index.js +9 -2
- package/components/input/textarea/index.d.ts +2 -0
- package/components/input/upload/index.d.ts +2 -0
- package/components/navbar/index.d.ts +1 -0
- package/components/navbar/nav-item/index.d.ts +1 -0
- package/components/navigation/breadcrumb/index.d.ts +1 -0
- package/components/navigation/menu/index.d.ts +1 -0
- package/components/navigation/menu/index.js +13 -9
- package/components/navigation/menu/props.d.ts +1 -0
- package/components/navigation/popover/index.d.ts +1 -0
- package/components/navigation/popover/index.js +15 -3
- package/components/page/partial/index.d.ts +1 -0
- package/context/PopoverContext.d.ts +5 -0
- package/context/PopoverContext.js +5 -0
- package/context/WidgetProvider.js +9 -2
- package/core/proxy-service.d.ts +2 -0
- package/core/proxy-service.js +46 -3
- package/higherOrder/BaseApp.js +2 -1
- package/higherOrder/BasePage.js +2 -9
- package/higherOrder/props.d.ts +1 -0
- package/higherOrder/useActivePageReactivity.js +1 -4
- package/higherOrder/withBaseWrapper.js +3 -2
- package/package-lock.json +168 -167
- package/package.json +3 -3
- package/runtime-dynamic/components/PageWrapper.js +1 -1
- package/runtime-dynamic/components/PrefabPreview.js +1 -1
- package/runtime-dynamic/components/partial-content.js +17 -1
- package/runtime-dynamic/factories/build-base-page-like-component.js +11 -7
- package/runtime-dynamic/factories/dynamic-component.js +1 -7
- package/runtime-dynamic/routes.js +17 -8
- package/utils/page-params-util.js +22 -1
- package/utils/partial-host-util.d.ts +40 -0
- package/utils/partial-host-util.js +41 -0
- package/variables/model-variable.d.ts +2 -0
- package/variables/model-variable.js +14 -0
|
@@ -32,6 +32,7 @@ import debounce from "lodash-es/debounce";
|
|
|
32
32
|
import Popover from "@mui/material/Popover";
|
|
33
33
|
import withBaseWrapper from "../../../higherOrder/withBaseWrapper";
|
|
34
34
|
import { WmAnchor } from "../../basic/anchor";
|
|
35
|
+
import { PopoverContext } from "../../../context/PopoverContext";
|
|
35
36
|
import { DEFAULT_PROPS } from "./props";
|
|
36
37
|
const WmPopover = (Props) => {
|
|
37
38
|
var _a, _b, _c;
|
|
@@ -44,6 +45,7 @@ const WmPopover = (Props) => {
|
|
|
44
45
|
const popoverActionsRef = useRef(null);
|
|
45
46
|
const loadedRef = useRef(false);
|
|
46
47
|
const [open, setOpen] = useState(false);
|
|
48
|
+
const [keepContentMounted, setKeepContentMounted] = useState(false);
|
|
47
49
|
const isOpen = Boolean(anchorEl);
|
|
48
50
|
const openPopover = useCallback(() => {
|
|
49
51
|
var _a2;
|
|
@@ -64,6 +66,16 @@ const WmPopover = (Props) => {
|
|
|
64
66
|
setIsDialogOpen(false);
|
|
65
67
|
(_a2 = props == null ? void 0 : props.onHide) == null ? void 0 : _a2.call(props, {}, __spreadValues({ isOpen: false }, props));
|
|
66
68
|
}, [isOpen]);
|
|
69
|
+
const popoverContext = useMemo(
|
|
70
|
+
() => ({
|
|
71
|
+
closeForDialog: () => {
|
|
72
|
+
setKeepContentMounted(true);
|
|
73
|
+
closePopover();
|
|
74
|
+
},
|
|
75
|
+
onDialogClose: () => setKeepContentMounted(false)
|
|
76
|
+
}),
|
|
77
|
+
[closePopover]
|
|
78
|
+
);
|
|
67
79
|
const togglePopover = useCallback(() => {
|
|
68
80
|
if (isOpen) {
|
|
69
81
|
closePopover();
|
|
@@ -260,7 +272,7 @@ const WmPopover = (Props) => {
|
|
|
260
272
|
)
|
|
261
273
|
})
|
|
262
274
|
),
|
|
263
|
-
/* @__PURE__ */ jsxs(
|
|
275
|
+
/* @__PURE__ */ jsx(PopoverContext.Provider, { value: popoverContext, children: /* @__PURE__ */ jsxs(
|
|
264
276
|
Popover,
|
|
265
277
|
{
|
|
266
278
|
action: popoverActionsRef,
|
|
@@ -274,6 +286,7 @@ const WmPopover = (Props) => {
|
|
|
274
286
|
enter: 0,
|
|
275
287
|
exit: 0
|
|
276
288
|
},
|
|
289
|
+
keepMounted: keepContentMounted,
|
|
277
290
|
disableScrollLock: true,
|
|
278
291
|
disableAutoFocus: true,
|
|
279
292
|
disableEnforceFocus: true,
|
|
@@ -288,7 +301,6 @@ const WmPopover = (Props) => {
|
|
|
288
301
|
},
|
|
289
302
|
className: clsx(
|
|
290
303
|
placement,
|
|
291
|
-
props.className,
|
|
292
304
|
"app-popover in popover",
|
|
293
305
|
props.contentanimation && `animated ${props.contentanimation}`,
|
|
294
306
|
`popover-${placement}`,
|
|
@@ -309,7 +321,7 @@ const WmPopover = (Props) => {
|
|
|
309
321
|
/* @__PURE__ */ jsx("div", { className: "popover-content popover-body", children: props.render && props.content ? /* @__PURE__ */ jsx(Suspense, { fallback: null, children: props.render(props, (widget) => handleLoad(widget)) }) : props.children })
|
|
310
322
|
]
|
|
311
323
|
}
|
|
312
|
-
)
|
|
324
|
+
) })
|
|
313
325
|
] });
|
|
314
326
|
};
|
|
315
327
|
var popover_default = withBaseWrapper(WmPopover);
|
|
@@ -17,6 +17,7 @@ declare const _default: import("react").ComponentType<{
|
|
|
17
17
|
width?: number | string;
|
|
18
18
|
height?: number | string;
|
|
19
19
|
className?: string;
|
|
20
|
+
class?: string;
|
|
20
21
|
conditionalstyle?: import("react").CSSProperties;
|
|
21
22
|
conditionalclass?: string;
|
|
22
23
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -35,6 +35,7 @@ import { HttpProvider } from "../hooks/useHttp";
|
|
|
35
35
|
import { removeWidgetsFromContext } from "../utils/widget-cleanup-util";
|
|
36
36
|
import { EVENTEMITTER_METHODS } from "../core/constants/events";
|
|
37
37
|
import { createWidgetProxy } from "../core/proxy-service";
|
|
38
|
+
import { isPrefabScope, publishPartialNamespaces } from "../utils/partial-host-util";
|
|
38
39
|
import { useLayout } from "./LayoutProvider";
|
|
39
40
|
import isPlainObject from "lodash-es/isPlainObject";
|
|
40
41
|
const WidgetContext = createContext(void 0);
|
|
@@ -176,8 +177,14 @@ const WidgetProvider = ({
|
|
|
176
177
|
var _a2;
|
|
177
178
|
if (!data.pageContext) return;
|
|
178
179
|
if ((_a2 = data.pageContext) == null ? void 0 : _a2.isLayout) return;
|
|
179
|
-
|
|
180
|
-
|
|
180
|
+
const registerHost = (widgets) => {
|
|
181
|
+
if (!widgets) return;
|
|
182
|
+
if (isPrefabScope(data.pageContext) || !publishPartialNamespaces(widgets[data.partialName], data.proxy)) {
|
|
183
|
+
widgets[data.partialName] = data.proxy;
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
registerHost(proxy.Widgets);
|
|
187
|
+
if (isAppWidgetRegisterNeeded) registerHost(proxy.App.Widgets);
|
|
181
188
|
};
|
|
182
189
|
EVENTEMITTER_METHODS.PARTIAL_STATE_SYNC_ON(handlePartialStateSync);
|
|
183
190
|
return () => {
|
package/core/proxy-service.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ import { OverriddenPropsRegistry } from "@wavemaker-ai/react-runtime/core/script
|
|
|
3
3
|
import BaseAppProps from "../higherOrder/BaseAppProps";
|
|
4
4
|
import { FormFieldProps } from "../components/data/form/form-field/props";
|
|
5
5
|
import type { UseFormSetValue } from "react-hook-form";
|
|
6
|
+
/** True when `value` is a built-in that breaks if wrapped in a reactivity Proxy. */
|
|
7
|
+
export declare const isNonProxyableBuiltin: (value: object) => boolean;
|
|
6
8
|
export declare function clearPageWidgetProxyCache(widgetsProxy: object | null | undefined): void;
|
|
7
9
|
export declare const createWidgetProxy: (widget: any, widgetName: string, setPageContext: any, overriddenPropsRegistry?: OverriddenPropsRegistry) => any;
|
|
8
10
|
export declare const createPageProxy: (target: ProxyTarget, setPageContext: React.Dispatch<React.SetStateAction<PageContextState>>, overriddenPropsRegistry?: OverriddenPropsRegistry) => ProxyTarget;
|
package/core/proxy-service.js
CHANGED
|
@@ -27,6 +27,32 @@ import { ServiceVariable } from "../variables/service-variable";
|
|
|
27
27
|
import LiveVariable from "../variables/live-variable";
|
|
28
28
|
import { ModelVariable } from "../variables/model-variable";
|
|
29
29
|
import CrudVariable from "../variables/crud-variable";
|
|
30
|
+
const NON_PROXYABLE_TAGS = /* @__PURE__ */ new Set([
|
|
31
|
+
"[object AbortController]",
|
|
32
|
+
"[object AbortSignal]",
|
|
33
|
+
"[object ArrayBuffer]",
|
|
34
|
+
"[object Blob]",
|
|
35
|
+
"[object Date]",
|
|
36
|
+
"[object Error]",
|
|
37
|
+
"[object File]",
|
|
38
|
+
"[object FileList]",
|
|
39
|
+
"[object FormData]",
|
|
40
|
+
"[object Headers]",
|
|
41
|
+
"[object Map]",
|
|
42
|
+
"[object Promise]",
|
|
43
|
+
"[object RegExp]",
|
|
44
|
+
"[object Request]",
|
|
45
|
+
"[object Response]",
|
|
46
|
+
"[object Set]",
|
|
47
|
+
"[object SharedArrayBuffer]",
|
|
48
|
+
"[object URL]",
|
|
49
|
+
"[object URLSearchParams]",
|
|
50
|
+
"[object WeakMap]",
|
|
51
|
+
"[object WeakRef]",
|
|
52
|
+
"[object WeakSet]"
|
|
53
|
+
]);
|
|
54
|
+
const isNonProxyableBuiltin = (value) => NON_PROXYABLE_TAGS.has(Object.prototype.toString.call(value)) || // Covers every TypedArray flavour plus DataView in one check.
|
|
55
|
+
ArrayBuffer.isView(value);
|
|
30
56
|
const proxyMap = /* @__PURE__ */ new WeakMap();
|
|
31
57
|
const pageWidgetProxyCaches = /* @__PURE__ */ new WeakMap();
|
|
32
58
|
function clearPageWidgetProxyCache(widgetsProxy) {
|
|
@@ -209,6 +235,7 @@ const createWidgetProxy = (widget, widgetName, setPageContext, overriddenPropsRe
|
|
|
209
235
|
widget.__isProxy = true;
|
|
210
236
|
const proxy = new Proxy(widget, {
|
|
211
237
|
set(target, prop, value, receiver) {
|
|
238
|
+
var _a;
|
|
212
239
|
if (typeof prop === "symbol" || prop === "prototype") {
|
|
213
240
|
return Reflect.set(target, prop, value, receiver);
|
|
214
241
|
}
|
|
@@ -224,10 +251,21 @@ const createWidgetProxy = (widget, widgetName, setPageContext, overriddenPropsRe
|
|
|
224
251
|
}
|
|
225
252
|
Reflect.set(target, prop, value, receiver);
|
|
226
253
|
queueBatchedWidgetContextUpdate(widgetName, widget, prop, value, setPageContext);
|
|
254
|
+
if (prop === "className") {
|
|
255
|
+
Reflect.set(target, "class", value);
|
|
256
|
+
(_a = overriddenPropsRegistry == null ? void 0 : overriddenPropsRegistry.trackOverriddenProps) == null ? void 0 : _a.call(
|
|
257
|
+
overriddenPropsRegistry,
|
|
258
|
+
widgetName,
|
|
259
|
+
"class",
|
|
260
|
+
value,
|
|
261
|
+
widget["data-widget-id"]
|
|
262
|
+
);
|
|
263
|
+
queueBatchedWidgetContextUpdate(widgetName, widget, "class", value, setPageContext);
|
|
264
|
+
}
|
|
227
265
|
return true;
|
|
228
266
|
},
|
|
229
267
|
get(target, prop, receiver) {
|
|
230
|
-
var _a;
|
|
268
|
+
var _a, _b, _c, _d;
|
|
231
269
|
if (typeof prop === "symbol" || prop === "prototype") {
|
|
232
270
|
return Reflect.get(target, prop, receiver);
|
|
233
271
|
}
|
|
@@ -302,6 +340,10 @@ const createWidgetProxy = (widget, widgetName, setPageContext, overriddenPropsRe
|
|
|
302
340
|
);
|
|
303
341
|
return internalValue !== void 0 ? internalValue : widgetOverrides[prop];
|
|
304
342
|
}
|
|
343
|
+
if (prop === "class" || prop === "className") {
|
|
344
|
+
const resolved = (_d = (_c = (_b = widgetOverrides == null ? void 0 : widgetOverrides.class) != null ? _b : Reflect.get(target, "class", receiver)) != null ? _c : widgetOverrides == null ? void 0 : widgetOverrides.className) != null ? _d : Reflect.get(target, "className", receiver);
|
|
345
|
+
return resolved != null ? resolved : "";
|
|
346
|
+
}
|
|
305
347
|
if (isDOMElement(value)) {
|
|
306
348
|
return value;
|
|
307
349
|
}
|
|
@@ -487,7 +529,7 @@ const createStateProxy = (obj, path = [], setPageContext, overriddenPropsRegistr
|
|
|
487
529
|
if (isDOMElement(value)) {
|
|
488
530
|
return value;
|
|
489
531
|
}
|
|
490
|
-
if (value
|
|
532
|
+
if (isNonProxyableBuiltin(value)) {
|
|
491
533
|
return value;
|
|
492
534
|
}
|
|
493
535
|
if (Array.isArray(value)) {
|
|
@@ -606,5 +648,6 @@ export {
|
|
|
606
648
|
createWidgetProxy,
|
|
607
649
|
defineFieldAlias,
|
|
608
650
|
getFormFieldEntries,
|
|
609
|
-
getFormFieldList
|
|
651
|
+
getFormFieldList,
|
|
652
|
+
isNonProxyableBuiltin
|
|
610
653
|
};
|
package/higherOrder/BaseApp.js
CHANGED
|
@@ -79,7 +79,8 @@ const BaseApp = (WrappedComponent, addAppScript, getAppVariables, appInfo = {})
|
|
|
79
79
|
subscribe,
|
|
80
80
|
targetPlatform: "WEB",
|
|
81
81
|
hasOwnObjectProperty,
|
|
82
|
-
formatters
|
|
82
|
+
formatters,
|
|
83
|
+
i18nService
|
|
83
84
|
}), appInfo), i18nServiceActions), i18nService));
|
|
84
85
|
const appProxyRef = useRef(null);
|
|
85
86
|
const sessionFailureRequestsRef = useRef([]);
|
package/higherOrder/BasePage.js
CHANGED
|
@@ -259,10 +259,7 @@ const withPageContext = (WrappedComponent, addPageScript, getVariables, componen
|
|
|
259
259
|
pageProxyRef.current.Variables = updatedVariables;
|
|
260
260
|
pageProxyRef.current.Actions = updatedActions;
|
|
261
261
|
return __spreadProps(__spreadValues({}, prev), {
|
|
262
|
-
App:
|
|
263
|
-
Variables: appContext.Variables || {},
|
|
264
|
-
Actions: appContext.Actions || {}
|
|
265
|
-
}),
|
|
262
|
+
App: appProxy != null ? appProxy : prev.App,
|
|
266
263
|
Variables: updatedVariables,
|
|
267
264
|
Actions: updatedActions
|
|
268
265
|
});
|
|
@@ -610,11 +607,7 @@ const withPageContext = (WrappedComponent, addPageScript, getVariables, componen
|
|
|
610
607
|
const pageName = (appProxy == null ? void 0 : appProxy.activePageName) || "";
|
|
611
608
|
useEffect(() => {
|
|
612
609
|
if ((componentInfo == null ? void 0 : componentInfo.componentType) === "PARTIAL" && pageName) {
|
|
613
|
-
setPageContext((prev) =>
|
|
614
|
-
App: __spreadProps(__spreadValues({}, prev.App), {
|
|
615
|
-
activePageName: pageName
|
|
616
|
-
})
|
|
617
|
-
}));
|
|
610
|
+
setPageContext((prev) => __spreadValues({}, prev));
|
|
618
611
|
}
|
|
619
612
|
}, [pageName]);
|
|
620
613
|
useEffect(() => {
|
package/higherOrder/props.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
3
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
5
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -17,7 +15,6 @@ var __spreadValues = (a, b) => {
|
|
|
17
15
|
}
|
|
18
16
|
return a;
|
|
19
17
|
};
|
|
20
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
18
|
import { useEffect, useRef } from "react";
|
|
22
19
|
import { EVENTEMITTER_METHODS } from "../core/constants/events";
|
|
23
20
|
const resolvePath = (root, path) => path.split(".").reduce((obj, key) => obj == null ? void 0 : obj[key], root);
|
|
@@ -41,7 +38,7 @@ const useActivePageReactivity = ({
|
|
|
41
38
|
const next = readValues();
|
|
42
39
|
if (next.some((value, i) => !Object.is(value, snapshotRef.current[i]))) {
|
|
43
40
|
snapshotRef.current = next;
|
|
44
|
-
setPageContext((prev) =>
|
|
41
|
+
setPageContext((prev) => __spreadValues({}, prev));
|
|
45
42
|
}
|
|
46
43
|
};
|
|
47
44
|
EVENTEMITTER_METHODS.ACTIVE_PAGE_SYNC_ON(onActivePageChange);
|
|
@@ -67,7 +67,7 @@ const withBaseWrapper = (WrappedComponent) => {
|
|
|
67
67
|
let mergedState = __spreadValues({}, props);
|
|
68
68
|
const registry = pageContext == null ? void 0 : pageContext.overriddenPropsRegistry;
|
|
69
69
|
const widgetDatavalue = widget.datavalue;
|
|
70
|
-
const datavalue = widgetDatavalue != null ? widgetDatavalue : props.datavalue;
|
|
70
|
+
const datavalue = props["item-id"] ? props.datavalue : widgetDatavalue != null ? widgetDatavalue : props.datavalue;
|
|
71
71
|
if (shouldMergeFromContext && (registry == null ? void 0 : registry.isWidgetOverridden(name, componentWidgetId || "")) && !props.formfield) {
|
|
72
72
|
const widgetOverrides = registry == null ? void 0 : registry.getWidgetOverrides(name, componentWidgetId || "");
|
|
73
73
|
if (widgetOverrides) {
|
|
@@ -141,10 +141,11 @@ const withBaseWrapper = (WrappedComponent) => {
|
|
|
141
141
|
const computedClassName = useMemo(() => {
|
|
142
142
|
return [
|
|
143
143
|
props.className,
|
|
144
|
+
mergedProps.class,
|
|
144
145
|
props.conditionalclass,
|
|
145
146
|
props.animation && `animated ${props.animation}`
|
|
146
147
|
].filter(Boolean).join(" ");
|
|
147
|
-
}, [props.className, props.conditionalclass, props.animation]);
|
|
148
|
+
}, [props.className, mergedProps.class, props.conditionalclass, props.animation]);
|
|
148
149
|
if (isHidden) return null;
|
|
149
150
|
const isDeferLoad = deferload === true;
|
|
150
151
|
const showValue = ((_c = mergedProps == null ? void 0 : mergedProps.show) == null ? void 0 : _c.toString()) !== "false";
|