@linzjs/windows 3.1.0 → 3.2.1
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.
|
@@ -178,14 +178,17 @@ export const useLuiModalPrefab = () => {
|
|
|
178
178
|
const { showModal, modalOwnerRef } = useShowAsyncModal();
|
|
179
179
|
|
|
180
180
|
const showPrefabModal = useCallback(
|
|
181
|
-
<RT extends any = string>(props: PropsWithChildren<useLuiModalPrefabProps<RT>>) => {
|
|
181
|
+
<RT extends any = string>(props: PropsWithChildren<useLuiModalPrefabProps<RT>>): PromiseWithResolve<RT> => {
|
|
182
182
|
if (typeof props.children === "string") {
|
|
183
183
|
// Convert \n to <br/>
|
|
184
184
|
const split = props.children.split("\n");
|
|
185
185
|
props.children = flatMap(split.map((part, i) => (i !== split.length - 1 ? [part, <br key={i} />] : part)));
|
|
186
186
|
}
|
|
187
187
|
if (props.dontShowAgainSessionKey && LuiModalDontShowSessionCheck(props.dontShowAgainSessionKey)) {
|
|
188
|
-
|
|
188
|
+
// Add resolve method to make the signature of showPrefabModal consistent
|
|
189
|
+
const prom = Promise.resolve(undefined) as PromiseWithResolve<RT>;
|
|
190
|
+
prom.resolve = (_val: RT | undefined) => {};
|
|
191
|
+
return prom;
|
|
189
192
|
}
|
|
190
193
|
return showModal(LuiModalPrefab, props, { showOnAllWindows: props.showOnAllWindows }) as PromiseWithResolve<RT>;
|
|
191
194
|
},
|
package/dist/panel/Panel.tsx
CHANGED
|
@@ -17,12 +17,20 @@ export interface PanelProps {
|
|
|
17
17
|
size?: PanelSize;
|
|
18
18
|
className?: string;
|
|
19
19
|
children: ReactNode;
|
|
20
|
+
maxHeight?: number;
|
|
21
|
+
maxWidth?: number;
|
|
22
|
+
minHeight?: number;
|
|
23
|
+
minWidth?: number;
|
|
20
24
|
}
|
|
21
25
|
|
|
22
26
|
export const Panel = ({
|
|
23
27
|
title,
|
|
24
28
|
position,
|
|
25
29
|
size = { width: 320, height: 200 },
|
|
30
|
+
maxHeight,
|
|
31
|
+
maxWidth,
|
|
32
|
+
minHeight = 100,
|
|
33
|
+
minWidth = 100,
|
|
26
34
|
className,
|
|
27
35
|
children,
|
|
28
36
|
}: PanelProps): ReactElement => {
|
|
@@ -69,8 +77,10 @@ export const Panel = ({
|
|
|
69
77
|
<Rnd
|
|
70
78
|
className={clsx("WindowPanel", className)}
|
|
71
79
|
dragHandleClassName={"draggable-handle"}
|
|
72
|
-
|
|
73
|
-
|
|
80
|
+
maxHeight={maxHeight}
|
|
81
|
+
maxWidth={maxWidth}
|
|
82
|
+
minWidth={minWidth}
|
|
83
|
+
minHeight={minHeight}
|
|
74
84
|
position={panelPosition}
|
|
75
85
|
size={panelSize}
|
|
76
86
|
style={{ zIndex }}
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"popout"
|
|
14
14
|
],
|
|
15
15
|
"main": "./dist/index.ts",
|
|
16
|
-
"version": "3.1
|
|
16
|
+
"version": "3.2.1",
|
|
17
17
|
"peerDependencies": {
|
|
18
18
|
"@linzjs/lui": "^21",
|
|
19
19
|
"lodash-es": ">=4",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"build": "run-s clean stylelint lint lint-circular-deps bundle",
|
|
35
|
-
"yalc": "run-s clean
|
|
35
|
+
"yalc": "run-s clean bundle && yalc publish",
|
|
36
36
|
"clean": "rimraf dist && mkdirp ./dist",
|
|
37
37
|
"bundle": "rollup -c",
|
|
38
38
|
"test": "jest",
|
|
@@ -52,51 +52,51 @@
|
|
|
52
52
|
"lodash-es": ">=4",
|
|
53
53
|
"react-rnd": "^10.4.11",
|
|
54
54
|
"usehooks-ts": "^3.1.0",
|
|
55
|
-
"uuid": "^
|
|
55
|
+
"uuid": "^10.0.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@chromatic-com/storybook": "^1.
|
|
58
|
+
"@chromatic-com/storybook": "^1.6.1",
|
|
59
59
|
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
|
60
60
|
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
|
61
|
-
"@linzjs/lui": "^21.
|
|
62
|
-
"@linzjs/step-ag-grid": "^21.1
|
|
63
|
-
"@rollup/plugin-commonjs": "^
|
|
61
|
+
"@linzjs/lui": "^21.39.1",
|
|
62
|
+
"@linzjs/step-ag-grid": "^21.2.1",
|
|
63
|
+
"@rollup/plugin-commonjs": "^26.0.1",
|
|
64
64
|
"@rollup/plugin-json": "^6.1.0",
|
|
65
65
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
66
|
-
"@storybook/addon-docs": "^8.1.
|
|
67
|
-
"@storybook/addon-essentials": "^8.1.
|
|
68
|
-
"@storybook/addon-interactions": "^8.1.
|
|
69
|
-
"@storybook/addon-links": "^8.1.
|
|
70
|
-
"@storybook/addon-mdx-gfm": "^8.1.
|
|
71
|
-
"@storybook/blocks": "^8.1.
|
|
72
|
-
"@storybook/react": "^8.1.
|
|
73
|
-
"@storybook/react-vite": "^8.1.
|
|
74
|
-
"@storybook/test": "^8.1.
|
|
75
|
-
"@storybook/test-runner": "^0.
|
|
76
|
-
"@testing-library/jest-dom": "^6.
|
|
66
|
+
"@storybook/addon-docs": "^8.1.11",
|
|
67
|
+
"@storybook/addon-essentials": "^8.1.11",
|
|
68
|
+
"@storybook/addon-interactions": "^8.1.11",
|
|
69
|
+
"@storybook/addon-links": "^8.1.11",
|
|
70
|
+
"@storybook/addon-mdx-gfm": "^8.1.11",
|
|
71
|
+
"@storybook/blocks": "^8.1.11",
|
|
72
|
+
"@storybook/react": "^8.1.11",
|
|
73
|
+
"@storybook/react-vite": "^8.1.11",
|
|
74
|
+
"@storybook/test": "^8.1.11",
|
|
75
|
+
"@storybook/test-runner": "^0.19.0",
|
|
76
|
+
"@testing-library/jest-dom": "^6.4.6",
|
|
77
77
|
"@testing-library/react": "^16.0.0",
|
|
78
|
-
"@testing-library/user-event": "^14.5.
|
|
78
|
+
"@testing-library/user-event": "^14.5.2",
|
|
79
79
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
80
80
|
"@types/jest": "^29.5.12",
|
|
81
81
|
"@types/lodash-es": "^4.17.12",
|
|
82
|
-
"@types/node": "^20.14.
|
|
82
|
+
"@types/node": "^20.14.10",
|
|
83
83
|
"@types/react": "^18.3.3",
|
|
84
84
|
"@types/react-dom": "^18.3.0",
|
|
85
|
-
"@types/uuid": "^
|
|
86
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
87
|
-
"@typescript-eslint/parser": "^7.
|
|
85
|
+
"@types/uuid": "^10.0.0",
|
|
86
|
+
"@typescript-eslint/eslint-plugin": "^7.16.0",
|
|
87
|
+
"@typescript-eslint/parser": "^7.16.0",
|
|
88
88
|
"ag-grid-community": "^31.3.2",
|
|
89
89
|
"ag-grid-react": "^31.3.2",
|
|
90
|
-
"esbuild": "^0.
|
|
90
|
+
"esbuild": "^0.23.0",
|
|
91
91
|
"eslint": "^8.57.0",
|
|
92
92
|
"eslint-config-prettier": "^9.1.0",
|
|
93
93
|
"eslint-config-react-app": "^7.0.1",
|
|
94
94
|
"eslint-plugin-deprecation": "^3.0.0",
|
|
95
95
|
"eslint-plugin-import": "^2.29.1",
|
|
96
|
-
"eslint-plugin-jest": "^28.
|
|
97
|
-
"eslint-plugin-jsx-a11y": "^6.
|
|
96
|
+
"eslint-plugin-jest": "^28.6.0",
|
|
97
|
+
"eslint-plugin-jsx-a11y": "^6.9.0",
|
|
98
98
|
"eslint-plugin-prettier": "^5.1.3",
|
|
99
|
-
"eslint-plugin-react": "^7.34.
|
|
99
|
+
"eslint-plugin-react": "^7.34.3",
|
|
100
100
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
101
101
|
"eslint-plugin-storybook": "^0.8.0",
|
|
102
102
|
"eslint-plugin-testing-library": "^6.2.2",
|
|
@@ -106,26 +106,25 @@
|
|
|
106
106
|
"jest-expect-message": "^1.1.3",
|
|
107
107
|
"mkdirp": "^3.0.1",
|
|
108
108
|
"npm-run-all": "^4.1.5",
|
|
109
|
-
"prettier": "^3.3.
|
|
110
|
-
"prop-types": "^15.8.1",
|
|
109
|
+
"prettier": "^3.3.2",
|
|
111
110
|
"react": "^18.3.1",
|
|
112
111
|
"react-app-polyfill": "^3.0.0",
|
|
113
112
|
"react-dom": "^18.3.1",
|
|
114
|
-
"rollup": "^4.18.
|
|
113
|
+
"rollup": "^4.18.1",
|
|
115
114
|
"rollup-plugin-copy": "^3.5.0",
|
|
116
|
-
"sass": "^1.77.
|
|
115
|
+
"sass": "^1.77.6",
|
|
117
116
|
"sass-loader": "^14.2.1",
|
|
118
117
|
"semantic-release": "^22.0.12",
|
|
119
|
-
"storybook": "^8.1.
|
|
118
|
+
"storybook": "^8.1.11",
|
|
120
119
|
"style-loader": "^4.0.0",
|
|
121
120
|
"stylelint": "^16.6.1",
|
|
122
|
-
"stylelint-config-recommended": "^14.0.
|
|
121
|
+
"stylelint-config-recommended": "^14.0.1",
|
|
123
122
|
"stylelint-config-recommended-scss": "^14.0.0",
|
|
124
|
-
"stylelint-config-standard": "^36.0.
|
|
123
|
+
"stylelint-config-standard": "^36.0.1",
|
|
125
124
|
"stylelint-prettier": "5.0.0",
|
|
126
|
-
"stylelint-scss": "6.3.
|
|
125
|
+
"stylelint-scss": "6.3.2",
|
|
127
126
|
"typescript": "^5.4.5",
|
|
128
|
-
"vite": "^5.
|
|
127
|
+
"vite": "^5.3.3"
|
|
129
128
|
},
|
|
130
129
|
"eslintConfig": {
|
|
131
130
|
"extends": [
|