@linzjs/windows 5.0.1 → 5.1.0
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/README.md
CHANGED
|
@@ -11,6 +11,7 @@ import { createPortal } from 'react-dom';
|
|
|
11
11
|
import { useInterval } from 'usehooks-ts';
|
|
12
12
|
import { v4 } from 'uuid';
|
|
13
13
|
|
|
14
|
+
import { debugLog } from '../common/debug';
|
|
14
15
|
import {
|
|
15
16
|
ComponentType,
|
|
16
17
|
LuiModalAsyncContext,
|
|
@@ -111,6 +112,9 @@ export const LuiModalAsyncContextProvider = ({ children }: PropsWithChildren<unk
|
|
|
111
112
|
showModalProps?: ShowModalProps,
|
|
112
113
|
): // eslint-disable-next-line
|
|
113
114
|
PromiseWithResolve<any> => {
|
|
115
|
+
if (!('level' in args)) {
|
|
116
|
+
debugLog(`Show generic modal`, args);
|
|
117
|
+
}
|
|
114
118
|
const uuid = v4();
|
|
115
119
|
// eslint-disable-next-line
|
|
116
120
|
let extResolve: PromiseWithResolve<any>['resolve'];
|
|
@@ -137,6 +141,7 @@ export const LuiModalAsyncContextProvider = ({ children }: PropsWithChildren<unk
|
|
|
137
141
|
return;
|
|
138
142
|
}
|
|
139
143
|
}).then((result) => {
|
|
144
|
+
debugLog('Modal resolved result =', JSON.stringify(result));
|
|
140
145
|
return new Promise((resolve) => {
|
|
141
146
|
// Close modal
|
|
142
147
|
setModals((modals) => {
|
|
@@ -6,6 +6,7 @@ import { flatMap } from 'lodash';
|
|
|
6
6
|
import { omit, pick } from 'lodash-es';
|
|
7
7
|
import React, { PropsWithChildren, ReactElement, useCallback, useMemo, useState } from 'react';
|
|
8
8
|
|
|
9
|
+
import { debugLog } from '../common/debug';
|
|
9
10
|
import { LuiModalAsync, LuiModalAsyncProps } from './LuiModalAsync';
|
|
10
11
|
import { LuiModalAsyncButtonGroup } from './LuiModalAsyncButtonGroup';
|
|
11
12
|
import { LuiModalAsyncContent } from './LuiModalAsyncContent';
|
|
@@ -184,6 +185,7 @@ export const useLuiModalPrefab = () => {
|
|
|
184
185
|
|
|
185
186
|
const showPrefabModal = useCallback(
|
|
186
187
|
<RT = string,>(props: PropsWithChildren<useLuiModalPrefabProps<RT>>): PromiseWithResolve<RT> => {
|
|
188
|
+
debugLog(`Show '${props.level}' prefab-modal '${props.title}'`, props);
|
|
187
189
|
if (typeof props.children === 'string') {
|
|
188
190
|
// Convert \n to <br/>
|
|
189
191
|
const split = props.children.split('\n');
|