@contentpass/react-native-contentpass-ui 0.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 +28 -0
- package/lib/commonjs/components/ContentpassConsentGate.js +149 -0
- package/lib/commonjs/components/ContentpassConsentGate.js.map +1 -0
- package/lib/commonjs/components/ContentpassLayer.js +176 -0
- package/lib/commonjs/components/ContentpassLayer.js.map +1 -0
- package/lib/commonjs/components/ContentpassLayerEvents.js +2 -0
- package/lib/commonjs/components/ContentpassLayerEvents.js.map +1 -0
- package/lib/commonjs/components/buildFirstLayerUrl.js +35 -0
- package/lib/commonjs/components/buildFirstLayerUrl.js.map +1 -0
- package/lib/commonjs/components/buildFirstLayerUrl.test.js +92 -0
- package/lib/commonjs/components/buildFirstLayerUrl.test.js.map +1 -0
- package/lib/commonjs/index.js +21 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/module/components/ContentpassConsentGate.js +142 -0
- package/lib/module/components/ContentpassConsentGate.js.map +1 -0
- package/lib/module/components/ContentpassLayer.js +171 -0
- package/lib/module/components/ContentpassLayer.js.map +1 -0
- package/lib/module/components/ContentpassLayerEvents.js +2 -0
- package/lib/module/components/ContentpassLayerEvents.js.map +1 -0
- package/lib/module/components/buildFirstLayerUrl.js +31 -0
- package/lib/module/components/buildFirstLayerUrl.js.map +1 -0
- package/lib/module/components/buildFirstLayerUrl.test.js +91 -0
- package/lib/module/components/buildFirstLayerUrl.test.js.map +1 -0
- package/lib/module/index.js +5 -0
- package/lib/module/index.js.map +1 -0
- package/lib/typescript/react-native-contentpass/src/Contentpass.d.ts +41 -0
- package/lib/typescript/react-native-contentpass/src/Contentpass.d.ts.map +1 -0
- package/lib/typescript/react-native-contentpass/src/OidcAuthStateStorage.d.ts +15 -0
- package/lib/typescript/react-native-contentpass/src/OidcAuthStateStorage.d.ts.map +1 -0
- package/lib/typescript/react-native-contentpass/src/consts/oidcConsts.d.ts +4 -0
- package/lib/typescript/react-native-contentpass/src/consts/oidcConsts.d.ts.map +1 -0
- package/lib/typescript/react-native-contentpass/src/contentpassTokenUtils/fetchContentpassToken.d.ts +6 -0
- package/lib/typescript/react-native-contentpass/src/contentpassTokenUtils/fetchContentpassToken.d.ts.map +1 -0
- package/lib/typescript/react-native-contentpass/src/contentpassTokenUtils/parseContentpassToken.d.ts +17 -0
- package/lib/typescript/react-native-contentpass/src/contentpassTokenUtils/parseContentpassToken.d.ts.map +1 -0
- package/lib/typescript/react-native-contentpass/src/contentpassTokenUtils/validateSubscription.d.ts +2 -0
- package/lib/typescript/react-native-contentpass/src/contentpassTokenUtils/validateSubscription.d.ts.map +1 -0
- package/lib/typescript/react-native-contentpass/src/countImpressionUtils/sendPageViewEvent.d.ts +8 -0
- package/lib/typescript/react-native-contentpass/src/countImpressionUtils/sendPageViewEvent.d.ts.map +1 -0
- package/lib/typescript/react-native-contentpass/src/countImpressionUtils/sendStats.d.ts +11 -0
- package/lib/typescript/react-native-contentpass/src/countImpressionUtils/sendStats.d.ts.map +1 -0
- package/lib/typescript/react-native-contentpass/src/index.d.ts +12 -0
- package/lib/typescript/react-native-contentpass/src/index.d.ts.map +1 -0
- package/lib/typescript/react-native-contentpass/src/logger.d.ts +8 -0
- package/lib/typescript/react-native-contentpass/src/logger.d.ts.map +1 -0
- package/lib/typescript/react-native-contentpass/src/sdkContext/ContentpassSdkProvider.d.ts +9 -0
- package/lib/typescript/react-native-contentpass/src/sdkContext/ContentpassSdkProvider.d.ts.map +1 -0
- package/lib/typescript/react-native-contentpass/src/sdkContext/useContentpassSdk.d.ts +3 -0
- package/lib/typescript/react-native-contentpass/src/sdkContext/useContentpassSdk.d.ts.map +1 -0
- package/lib/typescript/react-native-contentpass/src/sentryIntegration.d.ts +11 -0
- package/lib/typescript/react-native-contentpass/src/sentryIntegration.d.ts.map +1 -0
- package/lib/typescript/react-native-contentpass/src/types/CmpAdapter.d.ts +14 -0
- package/lib/typescript/react-native-contentpass/src/types/CmpAdapter.d.ts.map +1 -0
- package/lib/typescript/react-native-contentpass/src/types/ContentpassConfig.d.ts +11 -0
- package/lib/typescript/react-native-contentpass/src/types/ContentpassConfig.d.ts.map +1 -0
- package/lib/typescript/react-native-contentpass/src/types/ContentpassState.d.ts +28 -0
- package/lib/typescript/react-native-contentpass/src/types/ContentpassState.d.ts.map +1 -0
- package/lib/typescript/react-native-contentpass/src/types/RefreshTokenStrategy.d.ts +6 -0
- package/lib/typescript/react-native-contentpass/src/types/RefreshTokenStrategy.d.ts.map +1 -0
- package/lib/typescript/react-native-contentpass-ui/src/components/ContentpassConsentGate.d.ts +12 -0
- package/lib/typescript/react-native-contentpass-ui/src/components/ContentpassConsentGate.d.ts.map +1 -0
- package/lib/typescript/react-native-contentpass-ui/src/components/ContentpassLayer.d.ts +10 -0
- package/lib/typescript/react-native-contentpass-ui/src/components/ContentpassLayer.d.ts.map +1 -0
- package/lib/typescript/react-native-contentpass-ui/src/components/ContentpassLayerEvents.d.ts +7 -0
- package/lib/typescript/react-native-contentpass-ui/src/components/ContentpassLayerEvents.d.ts.map +1 -0
- package/lib/typescript/react-native-contentpass-ui/src/components/buildFirstLayerUrl.d.ts +8 -0
- package/lib/typescript/react-native-contentpass-ui/src/components/buildFirstLayerUrl.d.ts.map +1 -0
- package/lib/typescript/react-native-contentpass-ui/src/index.d.ts +3 -0
- package/lib/typescript/react-native-contentpass-ui/src/index.d.ts.map +1 -0
- package/package.json +90 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ContentpassState, ErrorState, AuthenticatedState, InitialisingState, UnauthenticatedState } from './types/ContentpassState';
|
|
2
|
+
import { ContentpassStateType } from './types/ContentpassState';
|
|
3
|
+
import type { ContentpassConfig } from './types/ContentpassConfig';
|
|
4
|
+
import type { CmpAdapter } from './types/CmpAdapter';
|
|
5
|
+
declare const FOOBAR = 123;
|
|
6
|
+
export { FOOBAR };
|
|
7
|
+
import { type default as Contentpass, type ContentpassObserver } from './Contentpass';
|
|
8
|
+
import { ContentpassSdkProvider } from './sdkContext/ContentpassSdkProvider';
|
|
9
|
+
import { default as useContentpassSdk } from './sdkContext/useContentpassSdk';
|
|
10
|
+
export { ContentpassStateType, ContentpassSdkProvider, useContentpassSdk };
|
|
11
|
+
export type { Contentpass, ContentpassState, ErrorState, AuthenticatedState, InitialisingState, UnauthenticatedState, ContentpassConfig, CmpAdapter, ContentpassObserver, };
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../react-native-contentpass/src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,QAAA,MAAM,MAAM,MAAM,CAAC;AAEnB,OAAO,EAAE,MAAM,EAAE,CAAC;AAElB,OAAO,EACL,KAAK,OAAO,IAAI,WAAW,EAC3B,KAAK,mBAAmB,EACzB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAE7E,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAE9E,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,CAAC;AAC3E,YAAY,EACV,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,UAAU,EACV,mBAAmB,GACpB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { logger, type transportFunctionType } from 'react-native-logs';
|
|
2
|
+
import type { Severity } from './types/ContentpassConfig';
|
|
3
|
+
import type { ConsoleTransportOptions } from 'react-native-logs/dist/transports/consoleTransport';
|
|
4
|
+
type Logger = ReturnType<typeof logger.createLogger<transportFunctionType<ConsoleTransportOptions>>>;
|
|
5
|
+
declare const log: Logger;
|
|
6
|
+
export declare const enableLogger: (severity: Severity) => void;
|
|
7
|
+
export default log;
|
|
8
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../../react-native-contentpass/src/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EACN,KAAK,qBAAqB,EAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oDAAoD,CAAC;AAElG,KAAK,MAAM,GAAG,UAAU,CACtB,OAAO,MAAM,CAAC,YAAY,CAAC,qBAAqB,CAAC,uBAAuB,CAAC,CAAC,CAC3E,CAAC;AAEF,QAAA,MAAM,GAAG,EAAE,MAWT,CAAC;AAEH,eAAO,MAAM,YAAY,GAAI,UAAU,QAAQ,SAK9C,CAAC;AAEF,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ContentpassConfig } from '../types/ContentpassConfig';
|
|
3
|
+
import Contentpass from '../Contentpass';
|
|
4
|
+
export declare const contentpassSdkContext: React.Context<Contentpass | undefined>;
|
|
5
|
+
export declare const ContentpassSdkProvider: ({ children, contentpassConfig, }: {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
contentpassConfig: ContentpassConfig;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
//# sourceMappingURL=ContentpassSdkProvider.d.ts.map
|
package/lib/typescript/react-native-contentpass/src/sdkContext/ContentpassSdkProvider.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentpassSdkProvider.d.ts","sourceRoot":"","sources":["../../../../../../react-native-contentpass/src/sdkContext/ContentpassSdkProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,eAAO,MAAM,qBAAqB,wCAEjC,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,kCAGpC;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,iBAAiB,EAAE,iBAAiB,CAAC;CACtC,mDAoBA,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useContentpassSdk.d.ts","sourceRoot":"","sources":["../../../../../../react-native-contentpass/src/sdkContext/useContentpassSdk.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,iBAAiB,gCAUtB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type InitSentryArgs = {
|
|
2
|
+
propertyId: string;
|
|
3
|
+
};
|
|
4
|
+
export declare const initSentry: (args: InitSentryArgs) => void;
|
|
5
|
+
type ReportErrorOptions = {
|
|
6
|
+
msg?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const reportError: (err: Error, { msg }?: ReportErrorOptions) => void;
|
|
9
|
+
export declare const __internal_reset_sentry_scope: () => void;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=sentryIntegration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sentryIntegration.d.ts","sourceRoot":"","sources":["../../../../../react-native-contentpass/src/sentryIntegration.ts"],"names":[],"mappings":"AAiCA,KAAK,cAAc,GAAG;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAIF,eAAO,MAAM,UAAU,GAAI,MAAM,cAAc,SAqB9C,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,KAAK,KAAK,EAAE,UAAS,kBAAuB,SAevE,CAAC;AAEF,eAAO,MAAM,6BAA6B,YAEzC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type CmpAdapter = {
|
|
2
|
+
acceptAll: () => Promise<void>;
|
|
3
|
+
denyAll: () => Promise<void>;
|
|
4
|
+
getCustomPurposes?: (supportedLanguages: string[]) => Promise<Map<string, string>>;
|
|
5
|
+
getNumberOfVendors: () => Promise<number>;
|
|
6
|
+
getRequiredPurposes: () => Promise<string[]>;
|
|
7
|
+
hasFullConsent: () => Promise<boolean>;
|
|
8
|
+
onConsentStatusChange: (callback: (fullConsent: boolean) => void) => void;
|
|
9
|
+
onAdapterEvent?: (eventName: string, callback: (data?: any) => void) => () => void;
|
|
10
|
+
onEvent?: (callback: (eventName: string, data?: any) => void) => () => void;
|
|
11
|
+
showSecondLayer: (view: 'vendor' | 'purpose') => Promise<void>;
|
|
12
|
+
waitForInit: () => Promise<void>;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=CmpAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CmpAdapter.d.ts","sourceRoot":"","sources":["../../../../../../react-native-contentpass/src/types/CmpAdapter.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IACvB,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,iBAAiB,CAAC,EAAE,CAClB,kBAAkB,EAAE,MAAM,EAAE,KACzB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAClC,kBAAkB,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1C,mBAAmB,EAAE,MAAM,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC7C,cAAc,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IACvC,qBAAqB,EAAE,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,KAAK,IAAI,CAAC;IAC1E,cAAc,CAAC,EAAE,CACf,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,GAAG,KAAK,IAAI,KAC3B,MAAM,IAAI,CAAC;IAChB,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,KAAK,IAAI,KAAK,MAAM,IAAI,CAAC;IAC5E,eAAe,EAAE,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/D,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAClC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type Severity = 'debug' | 'info' | 'warn' | 'error';
|
|
2
|
+
export type ContentpassConfig = {
|
|
3
|
+
propertyId: string;
|
|
4
|
+
planId: string;
|
|
5
|
+
redirectUrl: string;
|
|
6
|
+
issuer: string;
|
|
7
|
+
apiUrl: string;
|
|
8
|
+
samplingRate?: number;
|
|
9
|
+
logLevel?: Severity;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=ContentpassConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentpassConfig.d.ts","sourceRoot":"","sources":["../../../../../../react-native-contentpass/src/types/ContentpassConfig.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare enum ContentpassStateType {
|
|
2
|
+
INITIALISING = "INITIALISING",
|
|
3
|
+
UNAUTHENTICATED = "UNAUTHENTICATED",
|
|
4
|
+
AUTHENTICATED = "AUTHENTICATED",
|
|
5
|
+
ERROR = "ERROR"
|
|
6
|
+
}
|
|
7
|
+
export type InitialisingState = {
|
|
8
|
+
state: ContentpassStateType.INITIALISING;
|
|
9
|
+
hasValidSubscription?: never;
|
|
10
|
+
error?: never;
|
|
11
|
+
};
|
|
12
|
+
export type UnauthenticatedState = {
|
|
13
|
+
state: ContentpassStateType.UNAUTHENTICATED;
|
|
14
|
+
hasValidSubscription: false;
|
|
15
|
+
error?: never;
|
|
16
|
+
};
|
|
17
|
+
export type AuthenticatedState = {
|
|
18
|
+
state: ContentpassStateType.AUTHENTICATED;
|
|
19
|
+
hasValidSubscription: boolean;
|
|
20
|
+
error?: never;
|
|
21
|
+
};
|
|
22
|
+
export type ErrorState = {
|
|
23
|
+
state: ContentpassStateType.ERROR;
|
|
24
|
+
hasValidSubscription?: never;
|
|
25
|
+
error: unknown;
|
|
26
|
+
};
|
|
27
|
+
export type ContentpassState = InitialisingState | UnauthenticatedState | AuthenticatedState | ErrorState;
|
|
28
|
+
//# sourceMappingURL=ContentpassState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentpassState.d.ts","sourceRoot":"","sources":["../../../../../../react-native-contentpass/src/types/ContentpassState.ts"],"names":[],"mappings":"AAEA,oBAAY,oBAAoB;IAC9B,YAAY,iBAAiB;IAC7B,eAAe,oBAAoB;IACnC,aAAa,kBAAkB;IAC/B,KAAK,UAAU;CAChB;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,oBAAoB,CAAC,YAAY,CAAC;IACzC,oBAAoB,CAAC,EAAE,KAAK,CAAC;IAC7B,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,oBAAoB,CAAC,eAAe,CAAC;IAC5C,oBAAoB,EAAE,KAAK,CAAC;IAC5B,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,oBAAoB,CAAC,aAAa,CAAC;IAC1C,oBAAoB,EAAE,OAAO,CAAC;IAC9B,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,oBAAoB,CAAC,KAAK,CAAC;IAClC,oBAAoB,CAAC,EAAE,KAAK,CAAC;IAC7B,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GACxB,iBAAiB,GACjB,oBAAoB,GACpB,kBAAkB,GAClB,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RefreshTokenStrategy.d.ts","sourceRoot":"","sources":["../../../../../../react-native-contentpass/src/types/RefreshTokenStrategy.ts"],"names":[],"mappings":"AAEA,oBAAY,oBAAoB;IAC9B,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,UAAU,eAAe;CAC1B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CmpAdapter, ContentpassConfig } from '@contentpass/react-native-contentpass';
|
|
3
|
+
type ContentpassConsentGateProps = {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
cmpAdapter: CmpAdapter;
|
|
6
|
+
contentpassConfig: ContentpassConfig;
|
|
7
|
+
hideAppWhenVisible?: boolean;
|
|
8
|
+
onVisibilityChange?: (visible: boolean) => void;
|
|
9
|
+
};
|
|
10
|
+
export default function ContentpassConsentGate({ children, cmpAdapter, contentpassConfig, hideAppWhenVisible, onVisibilityChange, }: ContentpassConsentGateProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=ContentpassConsentGate.d.ts.map
|
package/lib/typescript/react-native-contentpass-ui/src/components/ContentpassConsentGate.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentpassConsentGate.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContentpassConsentGate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAM5D,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EAElB,MAAM,uCAAuC,CAAC;AAI/C,KAAK,2BAA2B,GAAG;IACjC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,UAAU,EAAE,UAAU,CAAC;IACvB,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CACjD,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,EAC7C,QAAQ,EACR,UAAU,EACV,iBAAiB,EACjB,kBAAyB,EACzB,kBAAkB,GACnB,EAAE,2BAA2B,2CA0J7B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ContentpassLayerEvents } from './ContentpassLayerEvents';
|
|
2
|
+
export default function ContentpassLayer({ baseUrl, eventHandler, planId, propertyId, purposesList, vendorCount, }: {
|
|
3
|
+
baseUrl: string;
|
|
4
|
+
eventHandler: ContentpassLayerEvents;
|
|
5
|
+
planId: string;
|
|
6
|
+
propertyId: string;
|
|
7
|
+
purposesList: string[];
|
|
8
|
+
vendorCount: number;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=ContentpassLayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentpassLayer.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContentpassLayer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAqDvE,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,OAAO,EACP,YAAY,EACZ,MAAM,EACN,UAAU,EACV,YAAY,EACZ,WAAW,GACZ,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,sBAAsB,CAAC;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;CACrB,2CA6HA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type ContentpassLayerEvents = {
|
|
2
|
+
acceptAll: () => Promise<void>;
|
|
3
|
+
contentpass: (route: 'login' | 'signup') => Promise<void>;
|
|
4
|
+
sendEvent: (eventCategory: string, eventAction: string, eventLabel: string) => void;
|
|
5
|
+
showSecondLayer: (view: 'vendor' | 'purpose') => Promise<void>;
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=ContentpassLayerEvents.d.ts.map
|
package/lib/typescript/react-native-contentpass-ui/src/components/ContentpassLayerEvents.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentpassLayerEvents.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContentpassLayerEvents.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,WAAW,EAAE,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,SAAS,EAAE,CACT,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,KACf,IAAI,CAAC;IACV,eAAe,EAAE,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAChE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export default function buildFirstLayerUrl({ baseUrl, propertyId, planId, purposesList, vendorCount, }: {
|
|
2
|
+
baseUrl: string;
|
|
3
|
+
propertyId: string;
|
|
4
|
+
planId: string;
|
|
5
|
+
purposesList: string[];
|
|
6
|
+
vendorCount: number;
|
|
7
|
+
}): string;
|
|
8
|
+
//# sourceMappingURL=buildFirstLayerUrl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildFirstLayerUrl.d.ts","sourceRoot":"","sources":["../../../../../src/components/buildFirstLayerUrl.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,OAAO,EACP,UAAU,EACV,MAAM,EACN,YAAY,EACZ,WAAW,GACZ,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;CACrB,GAAG,MAAM,CAmBT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,qCAAqC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@contentpass/react-native-contentpass-ui",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Contentpass React Native UI Components",
|
|
5
|
+
"source": "./src/index.tsx",
|
|
6
|
+
"main": "./lib/commonjs/index.js",
|
|
7
|
+
"module": "./lib/module/index.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": {
|
|
11
|
+
"types": "./lib/typescript/react-native-contentpass-ui/src/index.d.ts",
|
|
12
|
+
"default": "./lib/module/index.js"
|
|
13
|
+
},
|
|
14
|
+
"require": {
|
|
15
|
+
"types": "./lib/typescript/react-native-contentpass-ui/src/index.d.ts",
|
|
16
|
+
"default": "./lib/commonjs/index.js"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"types": "./lib/typescript/react-native-contentpass-ui/src/index.d.ts",
|
|
21
|
+
"files": [
|
|
22
|
+
"lib",
|
|
23
|
+
"!**/*.test.ts",
|
|
24
|
+
"!**/*.test.tsx",
|
|
25
|
+
"!**/__tests__",
|
|
26
|
+
"!**/__fixtures__",
|
|
27
|
+
"!**/__mocks__",
|
|
28
|
+
"!**/.*"
|
|
29
|
+
],
|
|
30
|
+
"scripts": {
|
|
31
|
+
"test": "jest --coverage",
|
|
32
|
+
"typecheck": "tsc",
|
|
33
|
+
"prepare": "bob build"
|
|
34
|
+
},
|
|
35
|
+
"keywords": [
|
|
36
|
+
"contentpass",
|
|
37
|
+
"react-native",
|
|
38
|
+
"ui",
|
|
39
|
+
"components"
|
|
40
|
+
],
|
|
41
|
+
"repository": {
|
|
42
|
+
"type": "git",
|
|
43
|
+
"url": "git+https://github.com/contentpass/react-native-contentpass.git"
|
|
44
|
+
},
|
|
45
|
+
"author": "contentpass <dev@contentpass.de> (https://github.com/contentpass)",
|
|
46
|
+
"license": "MIT",
|
|
47
|
+
"bugs": {
|
|
48
|
+
"url": "https://github.com/contentpass/react-native-contentpass/issues"
|
|
49
|
+
},
|
|
50
|
+
"homepage": "https://github.com/contentpass/react-native-contentpass#readme",
|
|
51
|
+
"publishConfig": {
|
|
52
|
+
"registry": "https://registry.npmjs.org/",
|
|
53
|
+
"access": "public"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"@contentpass/react-native-contentpass": "*",
|
|
57
|
+
"react": "*",
|
|
58
|
+
"react-native": "*",
|
|
59
|
+
"react-native-webview": "*"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@contentpass/react-native-contentpass": "workspace:*",
|
|
63
|
+
"@react-native-community/cli": "20.1.1",
|
|
64
|
+
"@react-native/babel-preset": "0.83.1",
|
|
65
|
+
"@types/jest": "^30.0.0",
|
|
66
|
+
"@types/react": "^19.2.10",
|
|
67
|
+
"jest": "^30.2.0",
|
|
68
|
+
"react": "19.2.4",
|
|
69
|
+
"react-native": "0.83.1",
|
|
70
|
+
"react-native-builder-bob": "^0.40.17",
|
|
71
|
+
"react-native-webview": "^13.15.0",
|
|
72
|
+
"react-test-renderer": "19.2.4",
|
|
73
|
+
"typescript": "^5.9.3"
|
|
74
|
+
},
|
|
75
|
+
"react-native-builder-bob": {
|
|
76
|
+
"source": "src",
|
|
77
|
+
"exclude": "**/{__tests__,__fixtures__,__mocks__}/**",
|
|
78
|
+
"output": "lib",
|
|
79
|
+
"targets": [
|
|
80
|
+
"commonjs",
|
|
81
|
+
"module",
|
|
82
|
+
[
|
|
83
|
+
"typescript",
|
|
84
|
+
{
|
|
85
|
+
"project": "tsconfig.build.json"
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
}
|