@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
|
@@ -30,6 +30,7 @@ declare const _default: React.ComponentType<{
|
|
|
30
30
|
width?: number | string;
|
|
31
31
|
height?: number | string;
|
|
32
32
|
className?: string;
|
|
33
|
+
class?: string;
|
|
33
34
|
conditionalstyle?: React.CSSProperties;
|
|
34
35
|
conditionalclass?: string;
|
|
35
36
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -29,6 +29,7 @@ declare const _default: React.ComponentType<{
|
|
|
29
29
|
width?: number | string;
|
|
30
30
|
height?: number | string;
|
|
31
31
|
className?: string;
|
|
32
|
+
class?: string;
|
|
32
33
|
conditionalstyle?: React.CSSProperties;
|
|
33
34
|
conditionalclass?: string;
|
|
34
35
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -33,6 +33,7 @@ declare const _default: React.ComponentType<{
|
|
|
33
33
|
width?: number | string;
|
|
34
34
|
height?: number | string;
|
|
35
35
|
className?: string;
|
|
36
|
+
class?: string;
|
|
36
37
|
conditionalstyle?: React.CSSProperties;
|
|
37
38
|
conditionalclass?: string;
|
|
38
39
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -25,6 +25,7 @@ declare const _default: React.ComponentType<{
|
|
|
25
25
|
width?: number | string;
|
|
26
26
|
height?: number | string;
|
|
27
27
|
className?: string;
|
|
28
|
+
class?: string;
|
|
28
29
|
conditionalstyle?: React.CSSProperties;
|
|
29
30
|
conditionalclass?: string;
|
|
30
31
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -40,6 +40,7 @@ declare const _default: import("react").ComponentType<{
|
|
|
40
40
|
width?: number | string;
|
|
41
41
|
height?: number | string;
|
|
42
42
|
className?: string;
|
|
43
|
+
class?: string;
|
|
43
44
|
conditionalstyle?: import("react").CSSProperties;
|
|
44
45
|
conditionalclass?: string;
|
|
45
46
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -107,7 +107,7 @@ const WmAnchor = (props) => {
|
|
|
107
107
|
}, [onClick, path]);
|
|
108
108
|
const processedHyperlink = useMemo(() => {
|
|
109
109
|
if (!hyperlink) return "#";
|
|
110
|
-
let processedLink = hyperlink;
|
|
110
|
+
let processedLink = String(hyperlink);
|
|
111
111
|
if (encodeurl === "true") {
|
|
112
112
|
processedLink = encodeURIComponent(processedLink);
|
|
113
113
|
}
|
|
@@ -118,7 +118,7 @@ const WmAnchor = (props) => {
|
|
|
118
118
|
}, [hyperlink, encodeurl]);
|
|
119
119
|
const doesHyperlinkMatchCurrentPath = useMemo(() => {
|
|
120
120
|
if (!hyperlink) return false;
|
|
121
|
-
let processedLink = hyperlink;
|
|
121
|
+
let processedLink = String(hyperlink);
|
|
122
122
|
if (processedLink.startsWith("www.")) {
|
|
123
123
|
processedLink = `//${processedLink}`;
|
|
124
124
|
}
|
|
@@ -200,9 +200,7 @@ const WmAnchor = (props) => {
|
|
|
200
200
|
className: clsx(DEFAULT_CLASS, "wm-anchor-link", {
|
|
201
201
|
[className || ""]: Boolean(className),
|
|
202
202
|
active: isActive,
|
|
203
|
-
"wm-anchor-icon-
|
|
204
|
-
"wm-anchor-icon-top": iconposition === "top",
|
|
205
|
-
"wm-anchor-icon-right": iconposition === "right"
|
|
203
|
+
"wm-anchor-icon-top": iconposition === "top"
|
|
206
204
|
}),
|
|
207
205
|
onContextMenu: handleContextMenu,
|
|
208
206
|
accessKey: shortcutkey,
|
|
@@ -30,6 +30,7 @@ declare const _default: React.ComponentType<{
|
|
|
30
30
|
width?: number | string;
|
|
31
31
|
height?: number | string;
|
|
32
32
|
className?: string;
|
|
33
|
+
class?: string;
|
|
33
34
|
conditionalstyle?: React.CSSProperties;
|
|
34
35
|
conditionalclass?: string;
|
|
35
36
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -26,6 +26,7 @@ declare const _default: React.ComponentType<{
|
|
|
26
26
|
width?: number | string;
|
|
27
27
|
height?: number | string;
|
|
28
28
|
className?: string;
|
|
29
|
+
class?: string;
|
|
29
30
|
conditionalstyle?: React.CSSProperties;
|
|
30
31
|
conditionalclass?: string;
|
|
31
32
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -27,6 +27,7 @@ declare const _default: React.ComponentType<{
|
|
|
27
27
|
width?: number | string;
|
|
28
28
|
height?: number | string;
|
|
29
29
|
className?: string;
|
|
30
|
+
class?: string;
|
|
30
31
|
conditionalstyle?: React.CSSProperties;
|
|
31
32
|
conditionalclass?: string;
|
|
32
33
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -23,6 +23,7 @@ declare const _default: React.ComponentType<{
|
|
|
23
23
|
width?: number | string;
|
|
24
24
|
height?: number | string;
|
|
25
25
|
className?: string;
|
|
26
|
+
class?: string;
|
|
26
27
|
conditionalstyle?: React.CSSProperties;
|
|
27
28
|
conditionalclass?: string;
|
|
28
29
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -29,6 +29,7 @@ declare const _default: React.ComponentType<{
|
|
|
29
29
|
width?: number | string;
|
|
30
30
|
height?: number | string;
|
|
31
31
|
className?: string;
|
|
32
|
+
class?: string;
|
|
32
33
|
conditionalstyle?: React.CSSProperties;
|
|
33
34
|
conditionalclass?: string;
|
|
34
35
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -30,6 +30,7 @@ declare const _default: React.ComponentType<{
|
|
|
30
30
|
width?: number | string;
|
|
31
31
|
height?: number | string;
|
|
32
32
|
className?: string;
|
|
33
|
+
class?: string;
|
|
33
34
|
conditionalstyle?: React.CSSProperties;
|
|
34
35
|
conditionalclass?: string;
|
|
35
36
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -35,6 +35,7 @@ declare const _default: React.ComponentType<{
|
|
|
35
35
|
width?: number | string;
|
|
36
36
|
height?: number | string;
|
|
37
37
|
className?: string;
|
|
38
|
+
class?: string;
|
|
38
39
|
conditionalstyle?: React.CSSProperties;
|
|
39
40
|
conditionalclass?: string;
|
|
40
41
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -18,6 +18,7 @@ declare const WmRichTextEditorStandalone: React.ComponentType<import("../../data
|
|
|
18
18
|
width?: number | string;
|
|
19
19
|
height?: number | string;
|
|
20
20
|
className?: string;
|
|
21
|
+
class?: string;
|
|
21
22
|
conditionalstyle?: React.CSSProperties;
|
|
22
23
|
conditionalclass?: string;
|
|
23
24
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -107,6 +108,7 @@ declare const _default: React.ComponentType<{
|
|
|
107
108
|
width?: number | string;
|
|
108
109
|
height?: number | string;
|
|
109
110
|
className?: string;
|
|
111
|
+
class?: string;
|
|
110
112
|
conditionalstyle?: React.CSSProperties;
|
|
111
113
|
conditionalclass?: string;
|
|
112
114
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -32,6 +32,7 @@ declare const _default: React.ComponentType<{
|
|
|
32
32
|
width?: number | string;
|
|
33
33
|
height?: number | string;
|
|
34
34
|
className?: string;
|
|
35
|
+
class?: string;
|
|
35
36
|
conditionalstyle?: React.CSSProperties;
|
|
36
37
|
conditionalclass?: string;
|
|
37
38
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -25,6 +25,7 @@ declare const _default: React.ComponentType<{
|
|
|
25
25
|
width?: number | string;
|
|
26
26
|
height?: number | string;
|
|
27
27
|
className?: string;
|
|
28
|
+
class?: string;
|
|
28
29
|
conditionalstyle?: React.CSSProperties;
|
|
29
30
|
conditionalclass?: string;
|
|
30
31
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -40,6 +40,7 @@ declare const _default: React.ComponentType<{
|
|
|
40
40
|
width?: number | string;
|
|
41
41
|
height?: number | string;
|
|
42
42
|
className?: string;
|
|
43
|
+
class?: string;
|
|
43
44
|
conditionalstyle?: React.CSSProperties;
|
|
44
45
|
conditionalclass?: string;
|
|
45
46
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -37,6 +37,7 @@ declare const _default: React.ComponentType<{
|
|
|
37
37
|
width?: number | string;
|
|
38
38
|
height?: number | string;
|
|
39
39
|
className?: string;
|
|
40
|
+
class?: string;
|
|
40
41
|
conditionalstyle?: React.CSSProperties;
|
|
41
42
|
conditionalclass?: string;
|
|
42
43
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -40,6 +40,7 @@ declare const _default: React.ComponentType<{
|
|
|
40
40
|
width?: number | string;
|
|
41
41
|
height?: number | string;
|
|
42
42
|
className?: string;
|
|
43
|
+
class?: string;
|
|
43
44
|
conditionalstyle?: React.CSSProperties;
|
|
44
45
|
conditionalclass?: string;
|
|
45
46
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -35,6 +35,7 @@ declare const _default: React.ComponentType<{
|
|
|
35
35
|
width?: number | string;
|
|
36
36
|
height?: number | string;
|
|
37
37
|
className?: string;
|
|
38
|
+
class?: string;
|
|
38
39
|
conditionalstyle?: React.CSSProperties;
|
|
39
40
|
conditionalclass?: string;
|
|
40
41
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { WmContainerProps } from "./props";
|
|
3
|
+
export declare const WmContainerContext: React.Context<{
|
|
4
|
+
registerPartial: (partialName: string, widget: any) => void;
|
|
5
|
+
}>;
|
|
3
6
|
export declare const WmContainer: {
|
|
4
7
|
(props: WmContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
5
8
|
displayName: string;
|
|
@@ -31,6 +34,7 @@ declare const _default: React.ComponentType<{
|
|
|
31
34
|
layoutClassName?: string;
|
|
32
35
|
layoutWidth?: string;
|
|
33
36
|
layoutHeight?: string;
|
|
37
|
+
class?: string;
|
|
34
38
|
standalone?: boolean;
|
|
35
39
|
ref?: React.RefObject<HTMLElement> | React.RefObject<null>;
|
|
36
40
|
animation?: string;
|
|
@@ -35,14 +35,17 @@ import {
|
|
|
35
35
|
useRef,
|
|
36
36
|
useMemo,
|
|
37
37
|
useCallback,
|
|
38
|
-
useState
|
|
38
|
+
useState,
|
|
39
|
+
createContext
|
|
39
40
|
} from "react";
|
|
40
41
|
import { clsx } from "clsx";
|
|
41
42
|
import { withBaseWrapper } from "../../higherOrder/withBaseWrapper";
|
|
42
43
|
import { useLayoutSize } from "../../hooks/useLayoutSize";
|
|
43
44
|
import { removeInvalidAttributes } from "../../utils/attr";
|
|
44
45
|
import { normalizeBackgroundImage } from "../../utils/style-utils";
|
|
46
|
+
import { publishPartialNamespaces, toHostWidgetProps } from "../../utils/partial-host-util";
|
|
45
47
|
const DEFAULT_CLASS = "app-container";
|
|
48
|
+
const WmContainerContext = createContext(void 0);
|
|
46
49
|
const WmContainer = (props) => {
|
|
47
50
|
var _c, _d, _e;
|
|
48
51
|
const _a = props, { listener } = _a, restPartialProps = __objRest(_a, ["listener"]);
|
|
@@ -97,7 +100,8 @@ const WmContainer = (props) => {
|
|
|
97
100
|
content,
|
|
98
101
|
overflow,
|
|
99
102
|
display,
|
|
100
|
-
layoutClassName
|
|
103
|
+
layoutClassName,
|
|
104
|
+
class: classOverride
|
|
101
105
|
} = _b, rest = __objRest(_b, [
|
|
102
106
|
"className",
|
|
103
107
|
"styles",
|
|
@@ -149,7 +153,8 @@ const WmContainer = (props) => {
|
|
|
149
153
|
"content",
|
|
150
154
|
"overflow",
|
|
151
155
|
"display",
|
|
152
|
-
"layoutClassName"
|
|
156
|
+
"layoutClassName",
|
|
157
|
+
"class"
|
|
153
158
|
]);
|
|
154
159
|
const isLoaded = useRef(false);
|
|
155
160
|
const widget_instance = (_c = listener == null ? void 0 : listener.Widgets) == null ? void 0 : _c[name];
|
|
@@ -157,6 +162,7 @@ const WmContainer = (props) => {
|
|
|
157
162
|
const [partialHostKey, setPartialHostKey] = useState(void 0);
|
|
158
163
|
const hostWidgetState = partialHostKey ? (_d = listener == null ? void 0 : listener.Widgets) == null ? void 0 : _d[partialHostKey] : void 0;
|
|
159
164
|
const hostShouldHide = ((_e = hostWidgetState == null ? void 0 : hostWidgetState.show) == null ? void 0 : _e.toString()) === "false";
|
|
165
|
+
const registeredPartialRef = useRef(false);
|
|
160
166
|
const containerStyles = useMemo(() => {
|
|
161
167
|
if (!(styles == null ? void 0 : styles.backgroundImage)) {
|
|
162
168
|
return styles;
|
|
@@ -206,7 +212,15 @@ const WmContainer = (props) => {
|
|
|
206
212
|
const handleOnLoad = useCallback(
|
|
207
213
|
(widget, partialName) => {
|
|
208
214
|
if (viewParent && viewParent.Widgets && !isLoaded.current) {
|
|
209
|
-
|
|
215
|
+
const hostKey = props.name || partialName;
|
|
216
|
+
if (!widget || prefab) {
|
|
217
|
+
viewParent.Widgets[hostKey] = widget || props;
|
|
218
|
+
} else {
|
|
219
|
+
if (!props.name) {
|
|
220
|
+
viewParent.Widgets[hostKey] = toHostWidgetProps(props);
|
|
221
|
+
}
|
|
222
|
+
publishPartialNamespaces(viewParent.Widgets[hostKey], widget);
|
|
223
|
+
}
|
|
210
224
|
isLoaded.current = true;
|
|
211
225
|
onLoad == null ? void 0 : onLoad(widget || props);
|
|
212
226
|
if (!props.name && partialName) {
|
|
@@ -214,20 +228,29 @@ const WmContainer = (props) => {
|
|
|
214
228
|
}
|
|
215
229
|
}
|
|
216
230
|
},
|
|
217
|
-
[onLoad, props.name]
|
|
231
|
+
[onLoad, props.name, prefab]
|
|
218
232
|
);
|
|
219
233
|
useEffect(() => {
|
|
220
234
|
if (!content && onLoad && !isLoaded.current) {
|
|
221
235
|
handleOnLoad(widget_instance || props);
|
|
222
236
|
}
|
|
223
237
|
}, []);
|
|
224
|
-
const classNames = (className == null ? void 0 : className.split(" ")) || [];
|
|
225
|
-
|
|
238
|
+
const classNames = classOverride || (className == null ? void 0 : className.split(" ")) || [];
|
|
239
|
+
const handleRegisterPartial = useCallback(
|
|
240
|
+
(partialName, widget) => {
|
|
241
|
+
if (viewParent && viewParent.Widgets && !registeredPartialRef.current) {
|
|
242
|
+
viewParent.Widgets[partialName] = widget || props;
|
|
243
|
+
registeredPartialRef.current = true;
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
[viewParent]
|
|
247
|
+
);
|
|
248
|
+
return /* @__PURE__ */ jsx(WmContainerContext.Provider, { value: { registerPartial: handleRegisterPartial }, children: /* @__PURE__ */ jsx(
|
|
226
249
|
"div",
|
|
227
250
|
__spreadProps(__spreadValues(__spreadProps(__spreadValues(__spreadValues(__spreadValues({
|
|
228
251
|
className: clsx(
|
|
229
252
|
{
|
|
230
|
-
[className || ""]: Boolean(className),
|
|
253
|
+
[classOverride || className || ""]: Boolean(className),
|
|
231
254
|
[DEFAULT_CLASS]: !["form-elements", "dynamic-form-container"].some(
|
|
232
255
|
(cls) => classNames == null ? void 0 : classNames.includes(cls)
|
|
233
256
|
)
|
|
@@ -243,11 +266,12 @@ const WmContainer = (props) => {
|
|
|
243
266
|
}), direction ? { direction } : {}), {
|
|
244
267
|
children: renderPartial ? renderPartial(restPartialProps, handleOnLoad) : children
|
|
245
268
|
})
|
|
246
|
-
);
|
|
269
|
+
) });
|
|
247
270
|
};
|
|
248
271
|
WmContainer.displayName = "WmContainer";
|
|
249
272
|
var container_default = withBaseWrapper(WmContainer);
|
|
250
273
|
export {
|
|
251
274
|
WmContainer,
|
|
275
|
+
WmContainerContext,
|
|
252
276
|
container_default as default
|
|
253
277
|
};
|
|
@@ -26,6 +26,7 @@ declare const _default: import("react").ComponentType<{
|
|
|
26
26
|
width?: number | string;
|
|
27
27
|
height?: number | string;
|
|
28
28
|
className?: string;
|
|
29
|
+
class?: string;
|
|
29
30
|
conditionalstyle?: import("react").CSSProperties;
|
|
30
31
|
conditionalclass?: string;
|
|
31
32
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -22,6 +22,7 @@ declare const _default: import("react").ComponentType<{
|
|
|
22
22
|
width?: number | string;
|
|
23
23
|
height?: number | string;
|
|
24
24
|
className?: string;
|
|
25
|
+
class?: string;
|
|
25
26
|
conditionalstyle?: import("react").CSSProperties;
|
|
26
27
|
conditionalclass?: string;
|
|
27
28
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -24,6 +24,7 @@ declare const _default: React.ComponentType<{
|
|
|
24
24
|
width?: number | string;
|
|
25
25
|
height?: number | string;
|
|
26
26
|
className?: string;
|
|
27
|
+
class?: string;
|
|
27
28
|
conditionalstyle?: React.CSSProperties;
|
|
28
29
|
conditionalclass?: string;
|
|
29
30
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -41,7 +41,7 @@ const WmLayoutgrid = (props) => {
|
|
|
41
41
|
Container,
|
|
42
42
|
__spreadProps(__spreadValues({
|
|
43
43
|
style: styles,
|
|
44
|
-
className: clsx(DEFAULT_CLASS,
|
|
44
|
+
className: clsx(DEFAULT_CLASS, className)
|
|
45
45
|
}, removeInvalidAttributes(restProps)), {
|
|
46
46
|
maxWidth: false,
|
|
47
47
|
children
|
|
@@ -23,6 +23,7 @@ declare const _default: React.ComponentType<{
|
|
|
23
23
|
width?: number | string;
|
|
24
24
|
height?: number | string;
|
|
25
25
|
className?: string;
|
|
26
|
+
class?: string;
|
|
26
27
|
conditionalstyle?: React.CSSProperties;
|
|
27
28
|
conditionalclass?: string;
|
|
28
29
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -20,6 +20,7 @@ declare const _default: React.ComponentType<{
|
|
|
20
20
|
width?: number | string;
|
|
21
21
|
height?: number | string;
|
|
22
22
|
className?: string;
|
|
23
|
+
class?: string;
|
|
23
24
|
conditionalstyle?: React.CSSProperties;
|
|
24
25
|
conditionalclass?: string;
|
|
25
26
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -74,6 +74,7 @@ declare const _default: React.ComponentType<{
|
|
|
74
74
|
margin?: string;
|
|
75
75
|
width?: number | string;
|
|
76
76
|
className?: string;
|
|
77
|
+
class?: string;
|
|
77
78
|
conditionalstyle?: React.CSSProperties;
|
|
78
79
|
conditionalclass?: string;
|
|
79
80
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -18,6 +18,7 @@ declare const _default: import("react").ComponentType<{
|
|
|
18
18
|
width?: number | string;
|
|
19
19
|
height?: number | string;
|
|
20
20
|
className?: string;
|
|
21
|
+
class?: string;
|
|
21
22
|
conditionalstyle?: import("react").CSSProperties;
|
|
22
23
|
conditionalclass?: string;
|
|
23
24
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -43,6 +43,7 @@ declare const _default: React.ComponentType<{
|
|
|
43
43
|
width?: number | string;
|
|
44
44
|
height?: number | string;
|
|
45
45
|
className?: string;
|
|
46
|
+
class?: string;
|
|
46
47
|
conditionalstyle?: React.CSSProperties;
|
|
47
48
|
conditionalclass?: string;
|
|
48
49
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -165,7 +165,7 @@ const WmTabs = memo(
|
|
|
165
165
|
return newSet;
|
|
166
166
|
});
|
|
167
167
|
}
|
|
168
|
-
}, [selectedIndex, type, dataset]);
|
|
168
|
+
}, [selectedIndex, type, dataset, dataset == null ? void 0 : dataset.length]);
|
|
169
169
|
const changeTab = (newIndex) => {
|
|
170
170
|
if (newIndex >= 0 && newIndex < panesCount.current && newIndex !== currentSelectedIndex.current) {
|
|
171
171
|
prevSelectedIndex.current = currentSelectedIndex.current;
|
|
@@ -304,7 +304,7 @@ const WmTabs = memo(
|
|
|
304
304
|
item.onHeaderclick(e, Widgets == null ? void 0 : Widgets[name], index);
|
|
305
305
|
}
|
|
306
306
|
},
|
|
307
|
-
[
|
|
307
|
+
[name]
|
|
308
308
|
);
|
|
309
309
|
const renderTabHeader = React.useCallback(
|
|
310
310
|
(item, index) => /* @__PURE__ */ createElement(
|
|
@@ -370,7 +370,7 @@ const WmTabs = memo(
|
|
|
370
370
|
const headers = [];
|
|
371
371
|
let tabIndex = 0;
|
|
372
372
|
const addTabHeader = (itemProps) => {
|
|
373
|
-
const paneName = itemProps
|
|
373
|
+
const paneName = itemProps["item-id"] || itemProps.name;
|
|
374
374
|
const latestWidgetState = paneName ? (Widgets == null ? void 0 : Widgets[paneName]) || {} : {};
|
|
375
375
|
const headerOverrides = paneName ? paneHeaderOverrides[paneName] || {} : {};
|
|
376
376
|
const resolvedItemProps = __spreadValues(__spreadValues(__spreadValues({}, itemProps), latestWidgetState), headerOverrides);
|
|
@@ -395,7 +395,7 @@ const WmTabs = memo(
|
|
|
395
395
|
});
|
|
396
396
|
panesCount.current = tabIndex;
|
|
397
397
|
return headers;
|
|
398
|
-
}, [dataset,
|
|
398
|
+
}, [dataset, paneHeaderOverrides]);
|
|
399
399
|
const renderStaticTabs = React.useCallback(() => {
|
|
400
400
|
const visibleChildren = filterVisibleChildren(children, hiddenTabNames);
|
|
401
401
|
panesCount.current = visibleChildren.length;
|
|
@@ -468,7 +468,10 @@ const WmTabs = memo(
|
|
|
468
468
|
setSelectedIndex(newIndex);
|
|
469
469
|
saveStateToStorage(newIndex);
|
|
470
470
|
updateListener(newIndex);
|
|
471
|
-
|
|
471
|
+
setTimeout(
|
|
472
|
+
() => onChange == null ? void 0 : onChange(null, getLatestTabsWidget(newIndex), newIndex, oldIndex),
|
|
473
|
+
0
|
|
474
|
+
);
|
|
472
475
|
},
|
|
473
476
|
orientation,
|
|
474
477
|
className: clsx("app-tabs clearfix", className, {
|
|
@@ -542,7 +545,6 @@ const WmTabs = memo(
|
|
|
542
545
|
"transition",
|
|
543
546
|
"type",
|
|
544
547
|
"iconposition",
|
|
545
|
-
"render",
|
|
546
548
|
"selectedindex",
|
|
547
549
|
"children",
|
|
548
550
|
"loading",
|
|
@@ -49,6 +49,7 @@ declare const _default: React.ComponentType<{
|
|
|
49
49
|
width?: number | string;
|
|
50
50
|
height?: number | string;
|
|
51
51
|
className?: string;
|
|
52
|
+
class?: string;
|
|
52
53
|
conditionalstyle?: React.CSSProperties;
|
|
53
54
|
conditionalclass?: string;
|
|
54
55
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -47,7 +47,7 @@ const WmTabpane = (props) => {
|
|
|
47
47
|
listener.onChange(tabsContainerName, { activeTab: widgetInstance });
|
|
48
48
|
}
|
|
49
49
|
if (isActive) {
|
|
50
|
-
if (!loadedRef.current) {
|
|
50
|
+
if (!loadedRef.current && !renderPartial) {
|
|
51
51
|
(_c = props == null ? void 0 : props.onLoad) == null ? void 0 : _c.call(props, null, widgetInstance);
|
|
52
52
|
loadedRef.current = true;
|
|
53
53
|
}
|
|
@@ -95,7 +95,7 @@ const WmTabpane = (props) => {
|
|
|
95
95
|
return;
|
|
96
96
|
}
|
|
97
97
|
updatePaneHeader(name, headerProps);
|
|
98
|
-
}, [name,
|
|
98
|
+
}, [name, updatePaneHeader]);
|
|
99
99
|
return /* @__PURE__ */ jsx(
|
|
100
100
|
Tabs.Panel,
|
|
101
101
|
__spreadProps(__spreadValues(__spreadValues({
|
|
@@ -38,6 +38,7 @@ declare const WmWizardStandalone: React.ComponentType<{
|
|
|
38
38
|
padding?: string;
|
|
39
39
|
margin?: string;
|
|
40
40
|
className?: string;
|
|
41
|
+
class?: string;
|
|
41
42
|
conditionalstyle?: React.CSSProperties;
|
|
42
43
|
conditionalclass?: string;
|
|
43
44
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|
|
@@ -130,6 +131,7 @@ declare const _default: React.ComponentType<{
|
|
|
130
131
|
padding?: string;
|
|
131
132
|
margin?: string;
|
|
132
133
|
className?: string;
|
|
134
|
+
class?: string;
|
|
133
135
|
conditionalstyle?: React.CSSProperties;
|
|
134
136
|
conditionalclass?: string;
|
|
135
137
|
showindevice?: ("xs" | "sm" | "md" | "lg" | "all")[];
|