@linzjs/windows 1.4.2 → 1.4.3
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/package.json +2 -1
- package/src/modal/ModalContextProvider.tsx +13 -15
- package/src/modal/PrefabModal.tsx +3 -3
- package/src/stories/panel/ShowPanel/ShowPanel.tsx +3 -2
- package/src/stories/panel/ShowPanelDocking/ShowPanel.tsx +3 -2
- package/src/stories/panel/ShowPanelResizingAgGrid/ShowPanelResizingStepAgGrid.tsx +5 -9
- package/src/stories/panel/ShowTabbedPanel/ShowPanel.tsx +3 -2
- package/index.ts +0 -1
package/package.json
CHANGED
|
@@ -116,21 +116,19 @@ export const ModalContextProvider = ({ children }: { children: ReactElement }):
|
|
|
116
116
|
showModal,
|
|
117
117
|
}}
|
|
118
118
|
>
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
<Fragment key={"children"}>{children}</Fragment>
|
|
133
|
-
</>
|
|
119
|
+
<Fragment key={"modals"}>
|
|
120
|
+
{modals
|
|
121
|
+
.filter(modalHasView)
|
|
122
|
+
.map((modalInstance) =>
|
|
123
|
+
ReactDOM.createPortal(
|
|
124
|
+
<ModalInstanceContext.Provider value={{ close: () => modalInstance.resolve(undefined) }}>
|
|
125
|
+
{modalInstance.componentInstance}
|
|
126
|
+
</ModalInstanceContext.Provider>,
|
|
127
|
+
(modalInstance.ownerElement?.ownerDocument ?? document).body,
|
|
128
|
+
),
|
|
129
|
+
)}
|
|
130
|
+
</Fragment>
|
|
131
|
+
<Fragment key={"children"}>{children}</Fragment>
|
|
134
132
|
</ModalContext.Provider>
|
|
135
133
|
);
|
|
136
134
|
};
|
|
@@ -2,7 +2,7 @@ import { Modal } from "./Modal";
|
|
|
2
2
|
import { ModalCallback } from "./ModalContext";
|
|
3
3
|
import { useShowModal } from "./useShowModal";
|
|
4
4
|
import { isEmpty } from "lodash-es";
|
|
5
|
-
import { ReactElement } from "react";
|
|
5
|
+
import { Fragment, ReactElement } from "react";
|
|
6
6
|
|
|
7
7
|
import { LuiAlertModalButtons, LuiButton, LuiIcon } from "@linzjs/lui";
|
|
8
8
|
import { LuiButtonProps } from "@linzjs/lui/dist/components/LuiButton/LuiButton";
|
|
@@ -92,10 +92,10 @@ export const usePrefabModal = () => {
|
|
|
92
92
|
showModal(PrefabModal, {
|
|
93
93
|
level,
|
|
94
94
|
children: (
|
|
95
|
-
|
|
95
|
+
<Fragment>
|
|
96
96
|
{typeof title === "string" ? <h2>{title}</h2> : title}
|
|
97
97
|
{typeof content === "string" ? <p>{content}</p> : content}
|
|
98
|
-
|
|
98
|
+
</Fragment>
|
|
99
99
|
),
|
|
100
100
|
buttons,
|
|
101
101
|
}) as Promise<RT>,
|
|
@@ -5,6 +5,7 @@ import { OpenPanelButton } from "../../../panel/OpenPanelButton";
|
|
|
5
5
|
import { Panel, PanelContent } from "../../../panel/Panel";
|
|
6
6
|
import { PanelHeader } from "../../../panel/PanelHeader";
|
|
7
7
|
import { PanelsContextProvider } from "../../../panel/PanelsContextProvider";
|
|
8
|
+
import { Fragment } from "react";
|
|
8
9
|
|
|
9
10
|
// #Example: Panel Context Provider
|
|
10
11
|
// Don't forget to add a PanelContextProvider at the root of your project
|
|
@@ -63,9 +64,9 @@ export const PanelContents = () => (
|
|
|
63
64
|
// #Example: Panel Invocation
|
|
64
65
|
export const TestShowPanel = () => {
|
|
65
66
|
return (
|
|
66
|
-
|
|
67
|
+
<Fragment>
|
|
67
68
|
<OpenPanelButton buttonText={"TestPanel 1"} component={() => <ShowPanelComponent data={1} />} />{" "}
|
|
68
69
|
<OpenPanelButton buttonText={"TestPanel 2"} component={() => <ShowPanelComponent data={2} />} />
|
|
69
|
-
|
|
70
|
+
</Fragment>
|
|
70
71
|
);
|
|
71
72
|
};
|
|
@@ -5,6 +5,7 @@ import { OpenPanelButton } from "../../../panel/OpenPanelButton";
|
|
|
5
5
|
import { Panel, PanelContent } from "../../../panel/Panel";
|
|
6
6
|
import { PanelDock } from "../../../panel/PanelDock";
|
|
7
7
|
import { PanelHeader } from "../../../panel/PanelHeader";
|
|
8
|
+
import { Fragment } from "react";
|
|
8
9
|
|
|
9
10
|
// #Example: Panel Component
|
|
10
11
|
export interface ShowPanelComponentProps {
|
|
@@ -56,9 +57,9 @@ export const PanelContents = () => {
|
|
|
56
57
|
// #Example: Panel Invocation
|
|
57
58
|
export const TestShowPanel = () => {
|
|
58
59
|
return (
|
|
59
|
-
|
|
60
|
+
<Fragment>
|
|
60
61
|
<OpenPanelButton buttonText={"TestPanel"} component={() => <ShowPanelComponent data={1} />} />
|
|
61
62
|
<PanelDock id={"leftSide"}>The Panel will dock in here</PanelDock>
|
|
62
|
-
|
|
63
|
+
</Fragment>
|
|
63
64
|
);
|
|
64
65
|
};
|
|
@@ -3,12 +3,8 @@ import "@linzjs/lui/dist/scss/base.scss";
|
|
|
3
3
|
import "@linzjs/step-ag-grid/dist/GridTheme.scss";
|
|
4
4
|
import "@linzjs/step-ag-grid/dist/index.css";
|
|
5
5
|
|
|
6
|
-
import { OpenPanelButton } from "../../../panel
|
|
7
|
-
import {
|
|
8
|
-
import { PanelContext } from "../../../panel/PanelContext";
|
|
9
|
-
import { PanelHeader } from "../../../panel/PanelHeader";
|
|
10
|
-
import { PanelsContextProvider } from "../../../panel/PanelsContextProvider";
|
|
11
|
-
import { useContext, useMemo, useState } from "react";
|
|
6
|
+
import { OpenPanelButton, Panel, PanelContent, PanelContext, PanelHeader, PanelsContextProvider } from "../../../panel";
|
|
7
|
+
import { Fragment, useContext, useMemo, useState } from "react";
|
|
12
8
|
|
|
13
9
|
import {
|
|
14
10
|
ColDefT,
|
|
@@ -48,10 +44,10 @@ export const TestPanelResizing = ({ data }: TestPanelProps) => {
|
|
|
48
44
|
|
|
49
45
|
// #Example: Panel Invocation
|
|
50
46
|
export const TestShowPanelResizingAgGrid = () => (
|
|
51
|
-
|
|
47
|
+
<Fragment>
|
|
52
48
|
<OpenPanelButton buttonText={"TestPanel resizing 1"} component={() => <TestPanelResizing data={1} />} />{" "}
|
|
53
49
|
<OpenPanelButton buttonText={"TestPanel resizing 2"} component={() => <TestPanelResizing data={2} />} />
|
|
54
|
-
|
|
50
|
+
</Fragment>
|
|
55
51
|
);
|
|
56
52
|
|
|
57
53
|
/* exclude */
|
|
@@ -100,7 +96,7 @@ export const PanelContentsWithResize = () => {
|
|
|
100
96
|
GridPopoverMessage(
|
|
101
97
|
{
|
|
102
98
|
headerName: "Popout message",
|
|
103
|
-
cellRenderer: () =>
|
|
99
|
+
cellRenderer: () => <Fragment>Single Click me!</Fragment>,
|
|
104
100
|
exportable: false,
|
|
105
101
|
},
|
|
106
102
|
{
|
|
@@ -5,6 +5,7 @@ import { OpenPanelButton } from "../../../panel/OpenPanelButton";
|
|
|
5
5
|
import { Panel, PanelContent } from "../../../panel/Panel";
|
|
6
6
|
import { PanelHeader } from "../../../panel/PanelHeader";
|
|
7
7
|
import { PanelsContextProvider } from "../../../panel/PanelsContextProvider";
|
|
8
|
+
import { Fragment } from "react";
|
|
8
9
|
|
|
9
10
|
import { LuiTabs, LuiTabsGroup, LuiTabsPanel, LuiTabsPanelSwitch } from "@linzjs/lui";
|
|
10
11
|
|
|
@@ -68,9 +69,9 @@ export const PanelContents = () => (
|
|
|
68
69
|
// #Example: Panel Invocation
|
|
69
70
|
export const TestShowTabbedPanel = () => {
|
|
70
71
|
return (
|
|
71
|
-
|
|
72
|
+
<Fragment>
|
|
72
73
|
<OpenPanelButton buttonText={"TestPanel 1"} component={() => <ShowPanelComponent data={1} />} />{" "}
|
|
73
74
|
<OpenPanelButton buttonText={"TestPanel 2"} component={() => <ShowPanelComponent data={2} />} />
|
|
74
|
-
|
|
75
|
+
</Fragment>
|
|
75
76
|
);
|
|
76
77
|
};
|
package/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./src";
|