@elliemae/pui-app-sdk 4.13.0 → 4.13.2
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/dist/cjs/view/micro-app/resources/manifest.js +20 -13
- package/dist/cjs/view/wait-message/index.js +14 -5
- package/dist/esm/view/micro-app/resources/manifest.js +20 -13
- package/dist/esm/view/wait-message/index.js +15 -6
- package/dist/types/lib/data/store.d.ts +2 -2
- package/dist/types/lib/utils/testing/render-with-redux.d.ts +2 -2
- package/dist/types/lib/utils/testing/render-with-router-redux.d.ts +2 -2
- package/dist/types/lib/view/breakpoint/index.stories.d.ts +0 -1
- package/dist/types/lib/view/error-boundary/default-error-template.d.ts +0 -1
- package/dist/types/lib/view/error-toast/index.stories.d.ts +0 -1
- package/dist/types/lib/view/fields/check-box/index.d.ts +0 -1
- package/dist/types/lib/view/fields/combo-box/index.d.ts +0 -1
- package/dist/types/lib/view/fields/connect-form.d.ts +0 -1
- package/dist/types/lib/view/fields/date-input/index.d.ts +0 -1
- package/dist/types/lib/view/fields/date-picker/index.d.ts +0 -1
- package/dist/types/lib/view/fields/date-range-picker/index.d.ts +0 -1
- package/dist/types/lib/view/fields/large-text-box/index.d.ts +0 -1
- package/dist/types/lib/view/fields/radio/index.d.ts +0 -1
- package/dist/types/lib/view/fields/radio-group/index.d.ts +0 -1
- package/dist/types/lib/view/fields/text-box/index.d.ts +0 -1
- package/dist/types/lib/view/fields/watch-value.d.ts +0 -1
- package/dist/types/lib/view/form/personal-info-section.d.ts +0 -1
- package/dist/types/lib/view/live-message/index.d.ts +0 -1
- package/dist/types/lib/view/live-message/index.stories.d.ts +0 -1
- package/dist/types/lib/view/session-timeout/index.d.ts +0 -1
- package/dist/types/lib/view/session-timeout/index.stories.d.ts +0 -1
- package/package.json +1 -1
|
@@ -39,20 +39,27 @@ const getAppManifest = async ({
|
|
|
39
39
|
`${manifestPath.replace(/\/?$/, "/")}manifest.json`,
|
|
40
40
|
hostUrl
|
|
41
41
|
);
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
42
|
+
const getUnVersionedManifestJson = () => {
|
|
43
|
+
const unVersionedManifestPath = getUnVersionedManifestPath(manifestPath);
|
|
44
|
+
if (manifestPath !== unVersionedManifestPath) {
|
|
45
|
+
return getAppManifest({
|
|
46
|
+
hostUrl,
|
|
47
|
+
manifestPath: getUnVersionedManifestPath(manifestPath)
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
throw new Error("manifest.json is not available for the application");
|
|
51
|
+
};
|
|
52
|
+
try {
|
|
53
|
+
const response = await (0, import_http_client.getHTTPClient)().get(
|
|
54
|
+
(0, import_url.removeDoubleSlash)(url.href)
|
|
55
|
+
);
|
|
56
|
+
const { headers } = response;
|
|
57
|
+
if (headers["content-type"]?.includes?.("application/json"))
|
|
58
|
+
return response.data;
|
|
59
|
+
return await getUnVersionedManifestJson();
|
|
60
|
+
} catch (err) {
|
|
61
|
+
return getUnVersionedManifestJson();
|
|
54
62
|
}
|
|
55
|
-
throw new Error("manifest.json is not available for the application");
|
|
56
63
|
};
|
|
57
64
|
const getFullFileNameofAssetsFromManifest = (manifest, assetNames = []) => assetNames.reduce((assets, assetName) => {
|
|
58
65
|
const fullFileName = manifest[assetName];
|
|
@@ -33,16 +33,25 @@ const WaitMessage = (0, import_react.memo)(
|
|
|
33
33
|
style = { color: "white", fontSize: "1.25rem" },
|
|
34
34
|
...rest
|
|
35
35
|
}) => {
|
|
36
|
+
const ref = (0, import_react.useRef)(false);
|
|
37
|
+
const [show, setShow] = (0, import_react.useState)(false);
|
|
36
38
|
const isOpen = (0, import_react2.useAppSelector)((state) => state.waitMessage?.isOpen);
|
|
39
|
+
ref.current = isOpen ?? false;
|
|
37
40
|
const message = (0, import_react2.useAppSelector)((state) => state.waitMessage?.message);
|
|
38
41
|
(0, import_react.useEffect)(() => {
|
|
39
|
-
|
|
40
|
-
(
|
|
41
|
-
|
|
42
|
+
setTimeout(() => {
|
|
43
|
+
if (isOpen && ref.current) {
|
|
44
|
+
setShow(true);
|
|
45
|
+
(0, import_user_wait_event.waitStartEvent)();
|
|
46
|
+
}
|
|
47
|
+
}, 1e3);
|
|
48
|
+
if (!isOpen) {
|
|
49
|
+
setShow(false);
|
|
42
50
|
(0, import_user_wait_event.waitEndEvent)();
|
|
51
|
+
}
|
|
43
52
|
}, [isOpen]);
|
|
44
53
|
(0, import_use_html_wait_message.useHTMLWaitMessage)(isOpen !== null);
|
|
45
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
54
|
+
return show ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
46
55
|
import_ds_loading_indicator.DSLoadingIndicator,
|
|
47
56
|
{
|
|
48
57
|
id: "em-loading",
|
|
@@ -52,6 +61,6 @@ const WaitMessage = (0, import_react.memo)(
|
|
|
52
61
|
loading: isOpen,
|
|
53
62
|
message
|
|
54
63
|
}
|
|
55
|
-
);
|
|
64
|
+
) : null;
|
|
56
65
|
}
|
|
57
66
|
);
|
|
@@ -15,20 +15,27 @@ const getAppManifest = async ({
|
|
|
15
15
|
`${manifestPath.replace(/\/?$/, "/")}manifest.json`,
|
|
16
16
|
hostUrl
|
|
17
17
|
);
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
18
|
+
const getUnVersionedManifestJson = () => {
|
|
19
|
+
const unVersionedManifestPath = getUnVersionedManifestPath(manifestPath);
|
|
20
|
+
if (manifestPath !== unVersionedManifestPath) {
|
|
21
|
+
return getAppManifest({
|
|
22
|
+
hostUrl,
|
|
23
|
+
manifestPath: getUnVersionedManifestPath(manifestPath)
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
throw new Error("manifest.json is not available for the application");
|
|
27
|
+
};
|
|
28
|
+
try {
|
|
29
|
+
const response = await getHTTPClient().get(
|
|
30
|
+
removeDoubleSlash(url.href)
|
|
31
|
+
);
|
|
32
|
+
const { headers } = response;
|
|
33
|
+
if (headers["content-type"]?.includes?.("application/json"))
|
|
34
|
+
return response.data;
|
|
35
|
+
return await getUnVersionedManifestJson();
|
|
36
|
+
} catch (err) {
|
|
37
|
+
return getUnVersionedManifestJson();
|
|
30
38
|
}
|
|
31
|
-
throw new Error("manifest.json is not available for the application");
|
|
32
39
|
};
|
|
33
40
|
const getFullFileNameofAssetsFromManifest = (manifest, assetNames = []) => assetNames.reduce((assets, assetName) => {
|
|
34
41
|
const fullFileName = manifest[assetName];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { memo, useEffect } from "react";
|
|
2
|
+
import { memo, useEffect, useRef, useState } from "react";
|
|
3
3
|
import { DSLoadingIndicator } from "@elliemae/ds-loading-indicator";
|
|
4
4
|
import { useAppSelector } from "../../data/react.js";
|
|
5
5
|
import { useHTMLWaitMessage } from "./use-html-wait-message.js";
|
|
@@ -13,16 +13,25 @@ const WaitMessage = memo(
|
|
|
13
13
|
style = { color: "white", fontSize: "1.25rem" },
|
|
14
14
|
...rest
|
|
15
15
|
}) => {
|
|
16
|
+
const ref = useRef(false);
|
|
17
|
+
const [show, setShow] = useState(false);
|
|
16
18
|
const isOpen = useAppSelector((state) => state.waitMessage?.isOpen);
|
|
19
|
+
ref.current = isOpen ?? false;
|
|
17
20
|
const message = useAppSelector((state) => state.waitMessage?.message);
|
|
18
21
|
useEffect(() => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
setTimeout(() => {
|
|
23
|
+
if (isOpen && ref.current) {
|
|
24
|
+
setShow(true);
|
|
25
|
+
waitStartEvent();
|
|
26
|
+
}
|
|
27
|
+
}, 1e3);
|
|
28
|
+
if (!isOpen) {
|
|
29
|
+
setShow(false);
|
|
22
30
|
waitEndEvent();
|
|
31
|
+
}
|
|
23
32
|
}, [isOpen]);
|
|
24
33
|
useHTMLWaitMessage(isOpen !== null);
|
|
25
|
-
return /* @__PURE__ */ jsx(
|
|
34
|
+
return show ? /* @__PURE__ */ jsx(
|
|
26
35
|
DSLoadingIndicator,
|
|
27
36
|
{
|
|
28
37
|
id: "em-loading",
|
|
@@ -32,7 +41,7 @@ const WaitMessage = memo(
|
|
|
32
41
|
loading: isOpen,
|
|
33
42
|
message
|
|
34
43
|
}
|
|
35
|
-
);
|
|
44
|
+
) : null;
|
|
36
45
|
}
|
|
37
46
|
);
|
|
38
47
|
export {
|
|
@@ -23,12 +23,12 @@ export declare const createAppStore: (initialState: import("redux").CombinedStat
|
|
|
23
23
|
error: import("./error/index.js").ErrorState;
|
|
24
24
|
breakpoint: import("./breakpoint/index.js").BreakpointState;
|
|
25
25
|
liveMessage: import("./live-message/index.js").LiveMessageState;
|
|
26
|
-
}> | undefined, history: History, middlewareConfig?: MiddlewareConfig) => import("@reduxjs/toolkit/dist/configureStore.js").ToolkitStore<import("redux").
|
|
26
|
+
}> | undefined, history: History, middlewareConfig?: MiddlewareConfig) => import("@reduxjs/toolkit/dist/configureStore.js").ToolkitStore<import("redux").EmptyObject & {
|
|
27
27
|
waitMessage: import("./wait-message/reducer.js").WaitMessageState;
|
|
28
28
|
error: import("./error/index.js").ErrorState;
|
|
29
29
|
breakpoint: import("./breakpoint/index.js").BreakpointState;
|
|
30
30
|
liveMessage: import("./live-message/index.js").LiveMessageState;
|
|
31
|
-
}
|
|
31
|
+
}, {
|
|
32
32
|
payload: import("./wait-message/reducer.js").WaitMessageState;
|
|
33
33
|
type: string;
|
|
34
34
|
} | import("redux").AnyAction | {
|
|
@@ -5,12 +5,12 @@ interface Args {
|
|
|
5
5
|
store: AppStore;
|
|
6
6
|
}
|
|
7
7
|
export declare const renderWithRedux: (ui: React.ReactElement, { initialState, store, }?: Args) => {
|
|
8
|
-
store: import("@reduxjs/toolkit/dist/configureStore.js").ToolkitStore<import("redux").
|
|
8
|
+
store: import("@reduxjs/toolkit/dist/configureStore.js").ToolkitStore<import("redux").EmptyObject & {
|
|
9
9
|
waitMessage: import("../../data/wait-message/reducer.js").WaitMessageState;
|
|
10
10
|
error: import("../../data/error/index.js").ErrorState;
|
|
11
11
|
breakpoint: import("../../data/breakpoint/index.js").BreakpointState;
|
|
12
12
|
liveMessage: import("../../data/live-message/index.js").LiveMessageState;
|
|
13
|
-
}
|
|
13
|
+
}, {
|
|
14
14
|
payload: import("../../data/wait-message/reducer.js").WaitMessageState;
|
|
15
15
|
type: string;
|
|
16
16
|
} | import("redux").AnyAction | {
|
|
@@ -8,12 +8,12 @@ interface Args {
|
|
|
8
8
|
history: History;
|
|
9
9
|
}
|
|
10
10
|
export declare const renderWithRouterRedux: (ui: React.ReactElement, { route, history, initialState, store, }?: Args) => {
|
|
11
|
-
store: import("@reduxjs/toolkit/dist/configureStore.js").ToolkitStore<import("redux").
|
|
11
|
+
store: import("@reduxjs/toolkit/dist/configureStore.js").ToolkitStore<import("redux").EmptyObject & {
|
|
12
12
|
waitMessage: import("../../data/wait-message/reducer.js").WaitMessageState;
|
|
13
13
|
error: import("../../data/error/index.js").ErrorState;
|
|
14
14
|
breakpoint: import("../../data/breakpoint/index.js").BreakpointState;
|
|
15
15
|
liveMessage: import("../../data/live-message/index.js").LiveMessageState;
|
|
16
|
-
}
|
|
16
|
+
}, {
|
|
17
17
|
payload: import("../../data/wait-message/reducer.js").WaitMessageState;
|
|
18
18
|
type: string;
|
|
19
19
|
} | import("redux").AnyAction | {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { RegisterOptions, FieldValues, FieldPath } from 'react-hook-form';
|
|
3
2
|
export type DateRangePickerProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = {
|
|
4
3
|
name: string;
|