@stigg/react-sdk 5.9.0 → 5.10.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/components/StiggProvider.d.ts +2 -0
- package/dist/react-sdk.cjs.development.js +11 -2
- package/dist/react-sdk.cjs.development.js.map +1 -1
- package/dist/react-sdk.cjs.production.min.js +1 -1
- package/dist/react-sdk.cjs.production.min.js.map +1 -1
- package/dist/react-sdk.esm.js +11 -2
- package/dist/react-sdk.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/StiggProvider.tsx +7 -0
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "5.
|
|
2
|
+
"version": "5.10.0",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"@emotion/react": "^11.10.5",
|
|
113
113
|
"@emotion/styled": "^11.10.5",
|
|
114
114
|
"@mui/material": "^5.12.0",
|
|
115
|
-
"@stigg/js-client-sdk": "3.
|
|
115
|
+
"@stigg/js-client-sdk": "3.3.0",
|
|
116
116
|
"@stripe/react-stripe-js": "^2.1.1",
|
|
117
117
|
"@stripe/stripe-js": "^1.54.1",
|
|
118
118
|
"@types/styled-components": "^5.1.26",
|
|
@@ -4,6 +4,7 @@ import Stigg, { EntitlementsFallback } from '@stigg/js-client-sdk';
|
|
|
4
4
|
import { SkeletonTheme } from 'react-loading-skeleton';
|
|
5
5
|
import { CustomizedTheme } from '../theme/Theme';
|
|
6
6
|
import logger from '../services/logger';
|
|
7
|
+
import { name as CLIENT_NAME, version as CLIENT_VERSION } from '../../package.json';
|
|
7
8
|
|
|
8
9
|
export interface StiggContextValue {
|
|
9
10
|
stigg: StiggJs.StiggClient;
|
|
@@ -32,6 +33,8 @@ export type StiggProviderProps = {
|
|
|
32
33
|
useEntitlementPolling?: boolean;
|
|
33
34
|
entitlementPollingInterval?: number;
|
|
34
35
|
stiggClient?: StiggJs.StiggClient;
|
|
36
|
+
clientName?: string;
|
|
37
|
+
clientVersion?: string;
|
|
35
38
|
};
|
|
36
39
|
|
|
37
40
|
const DEFAULT_LOCALE = 'en-US';
|
|
@@ -51,6 +54,8 @@ export const StiggProvider: React.FC<PropsWithChildren<StiggProviderProps>> = ({
|
|
|
51
54
|
entitlementsFallback,
|
|
52
55
|
stiggClient,
|
|
53
56
|
children,
|
|
57
|
+
clientName = CLIENT_NAME,
|
|
58
|
+
clientVersion = CLIENT_VERSION,
|
|
54
59
|
}) => {
|
|
55
60
|
const currentApiKey = useRef(apiKey);
|
|
56
61
|
const initializeParams = {
|
|
@@ -64,6 +69,8 @@ export const StiggProvider: React.FC<PropsWithChildren<StiggProviderProps>> = ({
|
|
|
64
69
|
entitlementsFallback,
|
|
65
70
|
useEntitlementPolling,
|
|
66
71
|
entitlementPollingInterval,
|
|
72
|
+
clientName,
|
|
73
|
+
clientVersion,
|
|
67
74
|
};
|
|
68
75
|
const [ctx, setContext] = useState<StiggContextValue>(() => ({
|
|
69
76
|
stigg:
|