@ninetailed/experience.js-plugin-preview 1.0.1-beta.16
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 +7 -0
- package/index.d.ts +1 -0
- package/index.esm.js +1892 -0
- package/index.umd.js +1953 -0
- package/lib/plugin/index.d.ts +2 -0
- package/lib/plugin/plugin.d.ts +18 -0
- package/lib/plugin/previewSdk.d.ts +4 -0
- package/lib/plugin/redux/audiences/actions.d.ts +8 -0
- package/lib/plugin/redux/audiences/handlers.d.ts +4 -0
- package/lib/plugin/redux/audiences/reducer.d.ts +7 -0
- package/lib/plugin/redux/drawer/actions.d.ts +6 -0
- package/lib/plugin/redux/drawer/handlers.d.ts +3 -0
- package/lib/plugin/redux/drawer/reducer.d.ts +5 -0
- package/lib/plugin/redux/store.d.ts +19 -0
- package/lib/plugin/types.d.ts +25 -0
- package/package.json +18 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AnalyticsPlugin } from 'analytics';
|
|
2
|
+
import { Credentials } from './types';
|
|
3
|
+
declare global {
|
|
4
|
+
interface Window {
|
|
5
|
+
ninetailed?: any;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export declare const NINETAILED_PREVIEW_EVENTS: {
|
|
9
|
+
previewAudiences: string;
|
|
10
|
+
previewTraits: string;
|
|
11
|
+
};
|
|
12
|
+
declare type NinetailedPreviewPluginOptions = Credentials & {
|
|
13
|
+
url?: string;
|
|
14
|
+
environment?: string;
|
|
15
|
+
hideSidebarOpener?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare const NinetailedPreviewPlugin: ({ clientId, secret, url, environment, hideSidebarOpener, }: NinetailedPreviewPluginOptions) => AnalyticsPlugin;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const SET_ACTIVE_AUDIENCES = "audiences/set-active-audiences";
|
|
2
|
+
export declare const FORCE_ACTIVATE_AUDIENCE = "audiences/force-activate-audience";
|
|
3
|
+
export declare const FORCE_DEACTIVATE_AUDIENCE = "audiences/force-deactivate-audience";
|
|
4
|
+
export declare const RESET_AUDIENCES = "audiences/reset-audiences";
|
|
5
|
+
export declare const setActiveAudiences: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string[], string>;
|
|
6
|
+
export declare const forceActivateAudience: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string, string>;
|
|
7
|
+
export declare const forceDeactivateAudience: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string, string>;
|
|
8
|
+
export declare const resetAudiences: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"audiences/reset-audiences">;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const setActiveAudiences: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string[], string>;
|
|
2
|
+
export declare const forceActivateAudience: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string, string>;
|
|
3
|
+
export declare const forceDeactivateAudience: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string, string>;
|
|
4
|
+
export declare const resetAudiences: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"audiences/reset-audiences">;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const DRAWER_OPEN = "drawer/open";
|
|
2
|
+
export declare const DRAWER_CLOSE = "drawer/close";
|
|
3
|
+
export declare const DRAWER_TOGGLE = "drawer/toggle";
|
|
4
|
+
export declare const openDrawer: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"drawer/open">;
|
|
5
|
+
export declare const closeDrawer: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"drawer/close">;
|
|
6
|
+
export declare const toggleDrawer: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"drawer/toggle">;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const openDrawer: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"drawer/open">;
|
|
2
|
+
export declare const closeDrawer: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"drawer/close">;
|
|
3
|
+
export declare const toggleDrawer: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"drawer/toggle">;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
|
|
2
|
+
drawer: {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
};
|
|
5
|
+
audiences: {
|
|
6
|
+
active: string[];
|
|
7
|
+
forced: string[];
|
|
8
|
+
deactivatedForced: string[];
|
|
9
|
+
};
|
|
10
|
+
}, import("redux").AnyAction, [import("redux-thunk").ThunkMiddleware<{
|
|
11
|
+
drawer: {
|
|
12
|
+
isOpen: boolean;
|
|
13
|
+
};
|
|
14
|
+
audiences: {
|
|
15
|
+
active: string[];
|
|
16
|
+
forced: string[];
|
|
17
|
+
deactivatedForced: string[];
|
|
18
|
+
};
|
|
19
|
+
}, import("redux").AnyAction, undefined>]>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { forceActivateAudience, resetAudiences } from './redux/audiences/handlers';
|
|
2
|
+
export declare type Credentials = {
|
|
3
|
+
clientId: string;
|
|
4
|
+
secret: string;
|
|
5
|
+
};
|
|
6
|
+
export declare type Connection = {
|
|
7
|
+
environment?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare type PreviewSdk = {
|
|
10
|
+
version: string;
|
|
11
|
+
credentials: Credentials;
|
|
12
|
+
connection: Connection;
|
|
13
|
+
audiences: {
|
|
14
|
+
active: string[];
|
|
15
|
+
forced: string[];
|
|
16
|
+
forceActivateAudience: typeof forceActivateAudience;
|
|
17
|
+
resetAudiences: typeof resetAudiences;
|
|
18
|
+
};
|
|
19
|
+
drawer: {
|
|
20
|
+
isOpen: boolean;
|
|
21
|
+
open: () => void;
|
|
22
|
+
close: () => void;
|
|
23
|
+
toggle: () => void;
|
|
24
|
+
};
|
|
25
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ninetailed/experience.js-plugin-preview",
|
|
3
|
+
"version": "1.0.1-beta.16",
|
|
4
|
+
"main": "./index.umd.js",
|
|
5
|
+
"module": "./index.esm.js",
|
|
6
|
+
"typings": "./index.d.ts",
|
|
7
|
+
"dependencies": {},
|
|
8
|
+
"peerDependencies": {
|
|
9
|
+
"analytics": "^0.8.0",
|
|
10
|
+
"@ninetailed/experience.js-shared": "1.0.1-beta.16",
|
|
11
|
+
"uuid": "^8.3.2",
|
|
12
|
+
"ts-toolbelt": "^9.6.0",
|
|
13
|
+
"locale-enum": "^1.1.1",
|
|
14
|
+
"i18n-iso-countries": "^7.3.0",
|
|
15
|
+
"lodash": "^4.17.21",
|
|
16
|
+
"@reduxjs/toolkit": "^1.8.0"
|
|
17
|
+
}
|
|
18
|
+
}
|