zh-web-sdk 2.7.3 → 2.9.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/dist/iframe-container/AppContainer.d.ts +4 -2
- package/dist/index.d.ts +8 -3
- package/dist/index.js +7 -7
- package/dist/index.js.map +4 -4
- package/dist/redux/reducers/constants.d.ts +1 -0
- package/dist/redux/reducers/index.d.ts +2 -1
- package/dist/redux/reducers/onboarding.d.ts +3 -0
- package/dist/redux/reducers/profile.d.ts +13 -0
- package/dist/redux/store/index.d.ts +2 -1
- package/dist/types.d.ts +41 -2
- package/package.json +1 -1
- package/src/iframe-container/AppContainer.tsx +42 -4
- package/src/index.tsx +31 -3
- package/src/redux/reducers/constants.ts +2 -1
- package/src/redux/reducers/index.ts +2 -0
- package/src/redux/reducers/onboarding.ts +12 -2
- package/src/redux/reducers/profile.ts +63 -0
- package/src/types.ts +317 -276
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { AppIdentifier, Filters } from "../types";
|
|
2
|
+
import { AppIdentifier, Filters, Page } from "../types";
|
|
3
3
|
interface AppContainerProps {
|
|
4
4
|
isAppActive?: boolean;
|
|
5
5
|
isAppLoaded?: boolean;
|
|
@@ -7,14 +7,16 @@ interface AppContainerProps {
|
|
|
7
7
|
zeroHashAppURL: string;
|
|
8
8
|
appIdentifier: AppIdentifier;
|
|
9
9
|
filters?: Filters;
|
|
10
|
+
navigate?: Page;
|
|
10
11
|
}
|
|
11
|
-
declare const _default: import("react-redux").ConnectedComponent<({ isAppActive, isAppLoaded, jwt, zeroHashAppURL, appIdentifier, }: AppContainerProps) => import("react/jsx-runtime").JSX.Element, {
|
|
12
|
+
declare const _default: import("react-redux").ConnectedComponent<({ isAppActive, isAppLoaded, jwt, zeroHashAppURL, appIdentifier, navigate, }: AppContainerProps) => import("react/jsx-runtime").JSX.Element, {
|
|
12
13
|
zeroHashAppURL: string;
|
|
13
14
|
appIdentifier: AppIdentifier;
|
|
14
15
|
isAppActive?: boolean | undefined;
|
|
15
16
|
isAppLoaded?: boolean | undefined;
|
|
16
17
|
jwt?: string | undefined;
|
|
17
18
|
filters?: Filters | undefined;
|
|
19
|
+
navigate?: import("../types").EditAddress | undefined;
|
|
18
20
|
context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").AnyAction>> | undefined;
|
|
19
21
|
store?: import("redux").Store<any, import("redux").AnyAction> | undefined;
|
|
20
22
|
}>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppIdentifier, IInitializeParameters, IOpenModalParameters, IOpenOnboardingModalParameters, ISetFiltersParameters, ISetJWTParameters, ISetUserOnboardingJWTParameters, IZeroHashSDK } from "./types";
|
|
1
|
+
import { AppIdentifier, IInitializeParameters, IOpenModalParameters, IOpenOnboardingModalParameters, ISetFiltersParameters, ISetJWTParameters, ISetNavigateParameters, ISetUserOnboardingJWTParameters, IZeroHashSDK } from "./types";
|
|
2
2
|
export declare class ZeroHashSDK implements IZeroHashSDK {
|
|
3
3
|
private rootQuerySelector;
|
|
4
4
|
private onboardingInitialized;
|
|
@@ -12,7 +12,7 @@ export declare class ZeroHashSDK implements IZeroHashSDK {
|
|
|
12
12
|
*
|
|
13
13
|
* For more information, see {@code IInitializeParameters}
|
|
14
14
|
*/
|
|
15
|
-
constructor({ zeroHashOnboardingURL, rootQuerySelector, userOnboardingJWT, cryptoWithdrawalsJWT, fiatDepositsJWT, fiatWithdrawalsJWT, cryptoBuyJWT, cryptoSellJWT, fundJWT, zeroHashAppsURL, }: IInitializeParameters);
|
|
15
|
+
constructor({ zeroHashOnboardingURL, rootQuerySelector, userOnboardingJWT, cryptoWithdrawalsJWT, fiatDepositsJWT, fiatWithdrawalsJWT, cryptoBuyJWT, cryptoSellJWT, fundJWT, profileJWT, zeroHashAppsURL, }: IInitializeParameters);
|
|
16
16
|
/**
|
|
17
17
|
* setJWT sets the JWT for the appIdentifier provided.
|
|
18
18
|
* The JWT should be the JWT provided by ZeroHash via the platform
|
|
@@ -26,6 +26,11 @@ export declare class ZeroHashSDK implements IZeroHashSDK {
|
|
|
26
26
|
*/
|
|
27
27
|
setJWT({ jwt, appIdentifier }: ISetJWTParameters): void;
|
|
28
28
|
setFilters({ filters, appIdentifier }: ISetFiltersParameters): void;
|
|
29
|
+
/**
|
|
30
|
+
* Sets the navigate field for the appIdentifier provided. Currently this is
|
|
31
|
+
* specific to Onboarding and is used to navigate to a specific page within the App.
|
|
32
|
+
*/
|
|
33
|
+
setNavigate({ appIdentifier, navigate }: ISetNavigateParameters): void;
|
|
29
34
|
/**
|
|
30
35
|
* setUserOnboardingJWT sets the JWT to be whatever value is provided.
|
|
31
36
|
* The JWT should be the UserJWT provided by ZeroHash via the platform
|
|
@@ -57,7 +62,7 @@ export declare class ZeroHashSDK implements IZeroHashSDK {
|
|
|
57
62
|
/**
|
|
58
63
|
* openModal opens the modal for the appIdentifier provided.
|
|
59
64
|
*/
|
|
60
|
-
openModal({ jwt, appIdentifier, filters }: IOpenModalParameters): void;
|
|
65
|
+
openModal({ jwt, appIdentifier, filters, navigate }: IOpenModalParameters): void;
|
|
61
66
|
/**
|
|
62
67
|
* openOnboardingModal opens the onboarding modal
|
|
63
68
|
* @deprecated in favor of openModal({appIdentifier: "onboarding", jwt: <userOnboardingJWT>})
|