@remkoj/optimizely-one-nextjs 2.0.4 → 2.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/dist/api/profile-api-service.d.ts +12 -8
- package/dist/api/profile-api-service.js +18 -11
- package/dist/api/profile-api-service.js.map +1 -1
- package/dist/components/optimizely-one-gadget/audiences-panel.js +5 -5
- package/dist/components/optimizely-one-gadget/audiences-panel.js.map +1 -1
- package/dist/components/optimizely-one-gadget/index.js +3 -2
- package/dist/components/optimizely-one-gadget/index.js.map +1 -1
- package/dist/components/optimizely-one-gadget/profile-panel.d.ts +7 -0
- package/dist/components/optimizely-one-gadget/profile-panel.js +20 -0
- package/dist/components/optimizely-one-gadget/profile-panel.js.map +1 -0
- package/dist/products/data-platform/api.d.ts +36 -0
- package/dist/products/data-platform/api.js +62 -8
- package/dist/products/data-platform/api.js.map +1 -1
- package/dist/products/data-platform/index.d.ts +1 -1
- package/dist/products/data-platform/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +11 -11
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ApiService } from './types';
|
|
2
|
+
import { DataPlatform } from '../products';
|
|
2
3
|
export declare const ProfileApiService: ApiService<ProfileApiResponse>;
|
|
3
4
|
export default ProfileApiService;
|
|
4
5
|
export type ProfileApiResponse = {
|
|
@@ -9,13 +10,16 @@ export type ProfileApiResponse = {
|
|
|
9
10
|
webExperimentation: string;
|
|
10
11
|
};
|
|
11
12
|
contentTopics: string[];
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
rts: {
|
|
14
|
+
audiences: {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
}[];
|
|
18
|
+
audiencesPageCount: number;
|
|
19
|
+
audiencesCount: number;
|
|
20
|
+
pageSize: number;
|
|
21
|
+
pageNumber: number;
|
|
22
|
+
};
|
|
23
|
+
profile: DataPlatform.Profile | null;
|
|
20
24
|
duration?: string;
|
|
21
25
|
};
|
|
@@ -16,6 +16,7 @@ export const ProfileApiService = {
|
|
|
16
16
|
const scopes = query.get('scope')?.toLowerCase()?.split(',')?.map(x => x.trim());
|
|
17
17
|
const fetchContentTopics = !scopes || scopes.includes('topics');
|
|
18
18
|
const fetchODPAudiences = !scopes || scopes.includes('audiences');
|
|
19
|
+
const fetchProfileCard = !scopes || scopes.includes('profile');
|
|
19
20
|
// Read all IDs
|
|
20
21
|
const odpId = DataPlatform.Tools.getVisitorID(cookies);
|
|
21
22
|
const crId = ContentRecs.Tools.getVisitorID(cookies);
|
|
@@ -28,8 +29,8 @@ export const ProfileApiService = {
|
|
|
28
29
|
let audiencesCount = 0;
|
|
29
30
|
// Determine audiences if needed
|
|
30
31
|
let audiences = [];
|
|
32
|
+
const odp = new DataPlatform.Client();
|
|
31
33
|
if (fetchODPAudiences && odpId) {
|
|
32
|
-
const odp = new DataPlatform.Client();
|
|
33
34
|
const allAudiences = await odp.getAllAudiences();
|
|
34
35
|
audiencesCount = allAudiences.length;
|
|
35
36
|
// Split the list into manageable groups
|
|
@@ -45,27 +46,33 @@ export const ProfileApiService = {
|
|
|
45
46
|
(await Promise.all(chunks.map(chunk => odp.filterAudiences(odpId, chunk)))).flat() :*/ await odp.filterAudiences(odpId, chunks[pageNumber]);
|
|
46
47
|
audiences = allAudiences.filter(a => userAudienceIds.includes(a.id));
|
|
47
48
|
}
|
|
49
|
+
// Fetch the profile if needed
|
|
50
|
+
const profile = fetchProfileCard && odpId ? await odp.getProfileInfo(odpId) : undefined;
|
|
48
51
|
// Determine topics if needed
|
|
49
52
|
let topics = [];
|
|
50
53
|
if (fetchContentTopics && crId) {
|
|
51
54
|
const contentRecs = new ContentRecs.Client();
|
|
52
55
|
topics = await contentRecs.getContentTopics(crId);
|
|
53
56
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
const responseData = {
|
|
58
|
+
ids: {
|
|
59
|
+
dataPlatform: odpId || NO_ID,
|
|
60
|
+
frontend: frontendId || NO_ID,
|
|
61
|
+
contentIntelligence: crId || NO_ID,
|
|
62
|
+
webExperimentation: webExId || NO_ID
|
|
63
|
+
},
|
|
64
|
+
rts: {
|
|
61
65
|
pageSize,
|
|
62
66
|
pageNumber,
|
|
63
67
|
audiences: audiences,
|
|
64
68
|
audiencesPageCount,
|
|
65
69
|
audiencesCount,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
70
|
+
},
|
|
71
|
+
profile: profile ?? null,
|
|
72
|
+
contentTopics: topics,
|
|
73
|
+
duration: `${Date.now() - start}ms`
|
|
74
|
+
};
|
|
75
|
+
return [responseData, 200];
|
|
69
76
|
}
|
|
70
77
|
};
|
|
71
78
|
export default ProfileApiService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-api-service.js","sourceRoot":"","sources":["../../src/api/profile-api-service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,cAAc,CAAA;AACxC,OAAO,OAAO,MAAM,aAAa,CAAA;AACjC,OAAO,KAAK,SAAS,MAAM,aAAa,CAAA;AACxC,OAAO,OAAO,MAAM,kBAAkB,CAAA;AAEtC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAE3E,MAAM,KAAK,GAAG,KAAK,CAAA;AACnB,MAAM,CAAC,MAAM,iBAAiB,GAAoC;IAC9D,GAAG,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE;IAC/B,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;QAC9B,kCAAkC;QAClC,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,OAAO,CAAC,aAAa,EAAE,KAAK,CAAC;YAC1D,OAAO,SA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,GAAG,MAAM,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAA;QACrD,CAAC;QAED,MAAM,YAAY,GAAwB;YACtC,GAAG,EAAE;gBACD,YAAY,EAAE,KAAK,IAAI,KAAK;gBAC5B,QAAQ,EAAE,UAAU,IAAI,KAAK;gBAC7B,mBAAmB,EAAE,IAAI,IAAI,KAAK;gBAClC,kBAAkB,EAAE,OAAO,IAAI,KAAK;aACvC;YACD,GAAG,EAAE;gBACD,QAAQ;gBACR,UAAU;gBACV,SAAS,EAAE,SAAS;gBACpB,kBAAkB;gBAClB,cAAc;aACjB;YACD,OAAO,EAAE,OAAO,IAAI,IAAI;YACxB,aAAa,EAAE,MAAM;YACrB,QAAQ,EAAE,GAAI,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI;SACvC,CAAA;QACD,OAAO,CAAC,YAAY,EAAE,GAAG,CAAC,CAAA;IAC9B,CAAC;CACJ,CAAA;AAID,eAAe,iBAAiB,CAAA;AAqBhC,SAAS,WAAW,CAAC,KAAgC,EAAE,YAAoB;IAEvE,IAAI,CAAC;QACD,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,IAAI,YAAY,CAAC,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAA;QACpE,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAA;IAChD,CAAC;IAAC,MAAM,CAAC,CAAA,CAAC;IACV,OAAO,YAAY,CAAA;AACvB,CAAC"}
|
|
@@ -5,7 +5,7 @@ import useSWRInfinite from 'swr/infinite';
|
|
|
5
5
|
const buildGetKey = (servicePrefix, pageSize) => {
|
|
6
6
|
const serviceURL = `${servicePrefix}?scope=audiences&limit=${pageSize}`;
|
|
7
7
|
const getKey = (pageIndex, previousPageData) => {
|
|
8
|
-
if (previousPageData && previousPageData.audiencesPageCount < pageIndex)
|
|
8
|
+
if (previousPageData && previousPageData.rts.audiencesPageCount < pageIndex)
|
|
9
9
|
return null;
|
|
10
10
|
return `${serviceURL}&page=${pageIndex}`;
|
|
11
11
|
};
|
|
@@ -32,12 +32,12 @@ export const AudiencesPanel = ({ servicePrefix = '/api/me', refreshInterval = 0
|
|
|
32
32
|
// Fetch results
|
|
33
33
|
const { data: profiles, isLoading, isValidating, error, size, setSize } = useSWRInfinite(getKey, config);
|
|
34
34
|
// Post-process the received values
|
|
35
|
-
const audiencePages = !profiles ? 1 : (profiles[0]?.audiencesPageCount || 1);
|
|
36
|
-
const audienceCount = !profiles ? 0 : (profiles[0]?.audiencesCount || 0);
|
|
35
|
+
const audiencePages = !profiles ? 1 : (profiles[0]?.rts.audiencesPageCount || 1);
|
|
36
|
+
const audienceCount = !profiles ? 0 : (profiles[0]?.rts.audiencesCount || 0);
|
|
37
37
|
const hasMore = size < audiencePages;
|
|
38
38
|
// Automatically correct to the correct size, based upon the response
|
|
39
39
|
useEffect(() => {
|
|
40
|
-
let newSize = !profiles ? -1 : (profiles[0]?.audiencesPageCount || -1);
|
|
40
|
+
let newSize = !profiles ? -1 : (profiles[0]?.rts.audiencesPageCount || -1);
|
|
41
41
|
if (newSize >= 1 && size != newSize)
|
|
42
42
|
setSize(newSize);
|
|
43
43
|
}, [size, profiles]);
|
|
@@ -45,7 +45,7 @@ export const AudiencesPanel = ({ servicePrefix = '/api/me', refreshInterval = 0
|
|
|
45
45
|
if (error)
|
|
46
46
|
return _jsx("p", { className: 'oo-m-2 md:oo-m-4 oo-rounded-md oo-bg-amber-200 oo-border oo-border-amber-800 oo-text-amber-800 oo-p-1 md:oo-p-2', children: "There was an error loading your profile information" });
|
|
47
47
|
// Show list
|
|
48
|
-
return _jsxs(_Fragment, { children: [hasMore && _jsxs("p", { className: 'oo-text-[14px] oo-border oo-border-amber-800 oo-bg-amber-200 oo-text-amber-800 oo-p-1 oo-my-1 oo-rounded-md', children: ["Showing results for the first ", size * pageSize, " audiences of ", audienceCount, ", ", _jsx("span", { onClick: () => setSize(size + 1), className: "oo-cursor-pointer oo-underline oo-text-blue-800", children: "load more" })] }), _jsx("ul", { className: 'oo-text-[14px] oo-grid oo-grid-cols-1 oo-divide-y oo-divide-slate-200', children: (profiles || []).map(profile => (profile?.audiences ?? []).map(a => {
|
|
48
|
+
return _jsxs(_Fragment, { children: [hasMore && _jsxs("p", { className: 'oo-text-[14px] oo-border oo-border-amber-800 oo-bg-amber-200 oo-text-amber-800 oo-p-1 oo-my-1 oo-rounded-md', children: ["Showing results for the first ", size * pageSize, " audiences of ", audienceCount, ", ", _jsx("span", { onClick: () => setSize(size + 1), className: "oo-cursor-pointer oo-underline oo-text-blue-800", children: "load more" })] }), _jsx("ul", { className: 'oo-text-[14px] oo-grid oo-grid-cols-1 oo-divide-y oo-divide-slate-200', children: (profiles || []).map(profile => (profile?.rts.audiences ?? []).map(a => {
|
|
49
49
|
return _jsxs("li", { className: 'oo-py-1', children: [_jsx(UserGroupIcon, { className: 'oo-inline-block oo-h-4 oo-w-4 oo-mr-2' }), a.name] }, "audience-" + a.id);
|
|
50
50
|
})).flat() }), _jsx("p", { className: 'oo-text-[12px]', children: "Powered by: Optimizely Data Platform" }), hasMore && _jsx("p", { onClick: () => setSize(size + 1), className: 'oo-text-center oo-inline-block oo-cursor-pointer oo-px-2 oo-py-1 oo-border oo-border-b-0 oo-border-slate-300 oo-rounded-md oo-bg-blue-500 oo-text-white', children: "Load more" }), isLoading && _jsxs("p", { className: 'oo-m-2 md:oo-m-4 oo-rounded-md oo-bg-amber-200 oo-border oo-border-amber-800 oo-text-amber-800 oo-p-1 md:oo-p-2', children: [_jsx(ArrowPathIcon, { className: 'oo-inline-block oo-h-4 oo-w-4 oo-mr-2 oo-animate-spin' }), "Loading the audiences..."] }), (isValidating && !isLoading) && _jsxs("p", { className: 'oo-text-[14px] oo-m-2 md:oo-m-4 oo-rounded-md oo-bg-amber-200 oo-border oo-border-amber-800 oo-text-amber-800 oo-p-1 md:oo-p-2', children: [_jsx(ArrowPathIcon, { className: 'oo-inline-block oo-h-4 oo-w-4 oo-ml-2 oo-animate-spin' }), " Refreshing audiences"] }), _jsxs("p", { className: 'oo-text-[12px] oo-m-2 oo-mt-3 oo-p-1 md:oo-p-2 oo-rounded-md oo-bg-amber-200 oo-border oo-border-amber-800 oo-text-amber-800', children: [_jsx("span", { className: 'oo-font-bold', children: "Please note:" }), " Interest based audiences are updated once per hour"] })] });
|
|
51
51
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audiences-panel.js","sourceRoot":"","sources":["../../../src/components/optimizely-one-gadget/audiences-panel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAA0B,MAAM,OAAO,CAAA;AACzD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACxE,OAAO,cAA4E,MAAM,cAAc,CAAA;AAQvG,MAAM,WAAW,GAAmF,CAAC,aAAa,EAAE,QAAQ,EAAE,EAAE;IAC5H,MAAM,UAAU,GAAG,GAAI,aAAc,0BAA2B,QAAS,EAAE,CAAA;IAC3E,MAAM,MAAM,GAAsC,CAAC,SAAS,EAAE,gBAAgB,EAAE,EAAE;QAC9E,IAAI,gBAAgB,IAAI,gBAAgB,CAAC,kBAAkB,GAAG,SAAS;YAAE,OAAO,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"audiences-panel.js","sourceRoot":"","sources":["../../../src/components/optimizely-one-gadget/audiences-panel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAA0B,MAAM,OAAO,CAAA;AACzD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACxE,OAAO,cAA4E,MAAM,cAAc,CAAA;AAQvG,MAAM,WAAW,GAAmF,CAAC,aAAa,EAAE,QAAQ,EAAE,EAAE;IAC5H,MAAM,UAAU,GAAG,GAAI,aAAc,0BAA2B,QAAS,EAAE,CAAA;IAC3E,MAAM,MAAM,GAAsC,CAAC,SAAS,EAAE,gBAAgB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,GAAG,CAAC,CAAC,CAAC,EAAE;oBACrE,OAAO,cAAI,SAAS,EAAC,SAAS,aAAwB,KAAC,aAAa,IAAC,SAAS,EAAC,uCAAuC,GAAG,EAAE,CAAC,CAAC,IAAI,KAA7F,WAAW,GAAC,CAAC,CAAC,EAAE,CAAoF,CAAA;gBAC5I,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,GACT,EACL,YAAG,SAAS,EAAC,gBAAgB,qDAAyC,EACpE,OAAO,IAAI,YAAG,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC,CAAC,EAAE,SAAS,EAAC,yJAAyJ,0BAAc,EACjO,SAAS,IAAI,aAAG,SAAS,EAAC,iHAAiH,aAAC,KAAC,aAAa,IAAC,SAAS,EAAC,uDAAuD,GAAG,gCAA4B,EAC3P,CAAC,YAAY,IAAI,CAAC,SAAS,CAAC,IAAI,aAAG,SAAS,EAAC,gIAAgI,aAAC,KAAC,aAAa,IAAC,SAAS,EAAC,uDAAuD,GAAG,6BAAyB,EAC5R,aAAG,SAAS,EAAC,8HAA8H,aAAC,eAAM,SAAS,EAAC,cAAc,6BAAoB,2DAAuD,IACtP,CAAA;AACP,CAAC,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -3,7 +3,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
3
3
|
import { Fragment, useLayoutEffect, useCallback } from 'react';
|
|
4
4
|
import useCookie from '../use-cookie';
|
|
5
5
|
import { Popover, PopoverButton, PopoverPanel, Tab, TabGroup, TabList, TabPanels, TabPanel } from '@headlessui/react';
|
|
6
|
-
import { ChevronUpIcon, UserGroupIcon, TagIcon, RocketLaunchIcon, IdentificationIcon, Square3Stack3DIcon, TrophyIcon } from '@heroicons/react/20/solid';
|
|
6
|
+
import { ChevronUpIcon, UserGroupIcon, TagIcon, RocketLaunchIcon, IdentificationIcon, Square3Stack3DIcon, TrophyIcon, FingerPrintIcon } from '@heroicons/react/20/solid';
|
|
7
7
|
import OptiLogo from './logo';
|
|
8
8
|
import { useIsInTestMode } from '../use-test-mode';
|
|
9
9
|
import { useSearchParams, usePathname } from 'next/navigation';
|
|
@@ -12,6 +12,7 @@ import '../../styles.css';
|
|
|
12
12
|
// Prepare panel imports
|
|
13
13
|
import dynamic from 'next/dynamic';
|
|
14
14
|
const Panels = {
|
|
15
|
+
Profile: dynamic(() => import('./profile-panel'), { ssr: false }),
|
|
15
16
|
Ids: dynamic(() => import('./ids-panel'), { ssr: false }),
|
|
16
17
|
Experiments: dynamic(() => import('./exp-panel'), { ssr: false }),
|
|
17
18
|
Interests: dynamic(() => import('./interests-panel'), { ssr: false }),
|
|
@@ -63,7 +64,7 @@ export const OptimizelyOneGadget = ({ servicePrefix = "/api/me", refreshInterval
|
|
|
63
64
|
console.log(`Optimizely One Demo API: ${servicePrefix}`);
|
|
64
65
|
console.log(`Refresh interval: ${refreshInterval == 0 ? 'DISABLED' : refreshInterval + 'ms'}`);
|
|
65
66
|
console.groupEnd();
|
|
66
|
-
return _jsxs(Popover, { className: "oo-gadget md:oo-fixed md:oo-bottom-0 oo-z-[500]", children: [_jsxs(PopoverButton, { className: 'oo-fixed oo-bottom-0 oo-right-0 oo-w-full oo-h-[50px] oo-flex oo-flex-row oo-justify-between oo-p-2 oo-border-t oo-border-slate-500 oo-bg-slate-100 oo-text-slate-800 md:oo-w-[350px] md:oo-right-4 md:oo-rounded-t-md md:oo-border-x oo-z-[500] oo-p-[10px] dark:oo-text-slate-800', children: [_jsx(OptiLogo, { className: 'oo-w-auto oo-h-full' }), _jsx(ChevronUpIcon, { className: "oo-ui-open:oo-rotate-180 oo-ui-open:oo-transform oo-h-full oo-w-auto oo-inline-block" })] }), _jsxs(PopoverPanel, { className: "oo-fixed oo-bottom-[50px] oo-right-0 oo-w-full oo-top-0 md:oo-border md:oo-border-slate-300 oo-bg-white md:oo-right-4 md:oo-bottom-[55px] md:oo-w-[
|
|
67
|
+
return _jsxs(Popover, { className: "oo-gadget md:oo-fixed md:oo-bottom-0 oo-z-[500]", children: [_jsxs(PopoverButton, { className: 'oo-fixed oo-bottom-0 oo-right-0 oo-w-full oo-h-[50px] oo-flex oo-flex-row oo-justify-between oo-p-2 oo-border-t oo-border-slate-500 oo-bg-slate-100 oo-text-slate-800 md:oo-w-[350px] md:oo-right-4 md:oo-rounded-t-md md:oo-border-x oo-z-[500] oo-p-[10px] dark:oo-text-slate-800', children: [_jsx(OptiLogo, { className: 'oo-w-auto oo-h-full' }), _jsx(ChevronUpIcon, { className: "oo-ui-open:oo-rotate-180 oo-ui-open:oo-transform oo-h-full oo-w-auto oo-inline-block" })] }), _jsxs(PopoverPanel, { className: "oo-fixed oo-bottom-[50px] oo-right-0 oo-w-full oo-top-0 md:oo-border md:oo-border-slate-300 oo-bg-white md:oo-right-4 md:oo-bottom-[55px] md:oo-w-[675px] oo-z-[501] oo-max-w-full oo-flex oo-flex-col oo-justify-stretch md:oo-h-[350px] md:oo-top-auto md:oo-rounded-md md:oo-shadow-xl md:oo-overflow-hidden oo-text-slate-800 dark:oo-text-slate-800", children: [_jsxs("div", { className: "oo-border-b oo-border-slate-300 oo-bg-slate-100 oo-text-slate-800 oo-text-[18px] oo-font-bold oo-p-1 oo-flex-none md:oo-p-2", children: [_jsx(IdentificationIcon, { className: 'oo-inline-block oo-h-[24px] oo-w-[24px] oo-mr-2 oo-text-blue-500' }), "My Profile"] }), _jsxs(TabGroup, { as: Fragment, children: [_jsxs(TabList, { className: "oo-flex-none oo-flex oo-justify-between md:oo-justify-start oo-gap-2 oo-p-1 md:oo-p-2 oo-pb-0 md:oo-pb-0 oo-border-b oo-border-slate-300 oo-text-[14px]", children: [_jsxs(Tab, { as: "div", className: 'oo-text-center oo-inline-block oo-cursor-pointer oo-px-2 oo-py-1 oo-border oo-border-b-0 oo-border-slate-300 oo-rounded-t-md oo-ui-selected:oo-bg-blue-500 oo-ui-selected:oo-text-white', children: [_jsx(IdentificationIcon, { className: 'oo-inline-block oo-h-[18px] oo-w-[18px] oo-mr-2' }), "Profile"] }), _jsxs(Tab, { as: "div", className: 'oo-text-center oo-inline-block oo-cursor-pointer oo-px-2 oo-py-1 oo-border oo-border-b-0 oo-border-slate-300 oo-rounded-t-md oo-ui-selected:oo-bg-blue-500 oo-ui-selected:oo-text-white', children: [_jsx(TagIcon, { className: 'oo-inline-block oo-h-[18px] oo-w-[18px] oo-mr-2' }), "Interests"] }), _jsxs(Tab, { as: "div", className: 'oo-text-center oo-inline-block oo-cursor-pointer oo-px-2 oo-py-1 oo-border oo-border-b-0 oo-border-slate-300 oo-rounded-t-md oo-ui-selected:oo-bg-blue-500 oo-ui-selected:oo-text-white', children: [_jsx(TrophyIcon, { className: 'oo-inline-block oo-h-[18px] oo-w-[18px] oo-mr-2' }), "Goals"] }), _jsxs(Tab, { as: "div", className: 'oo-text-center oo-inline-block oo-cursor-pointer oo-px-2 oo-py-1 oo-border oo-border-b-0 oo-border-slate-300 oo-rounded-t-md oo-ui-selected:oo-bg-blue-500 oo-ui-selected:oo-text-white', children: [_jsx(UserGroupIcon, { className: 'oo-inline-block oo-h-[18px] oo-w-[18px] oo-mr-2' }), "Audiences"] }), _jsxs(Tab, { as: "div", className: 'oo-text-center oo-inline-block oo-cursor-pointer oo-px-2 oo-py-1 oo-border oo-border-b-0 oo-border-slate-300 oo-rounded-t-md oo-ui-selected:oo-bg-blue-500 oo-ui-selected:oo-text-white', children: [_jsx(RocketLaunchIcon, { className: 'oo-inline-block oo-h-[18px] oo-w-[18px] oo-mr-2' }), "Experiments"] }), _jsxs(Tab, { as: "div", className: 'oo-text-center oo-inline-block oo-cursor-pointer oo-px-2 oo-py-1 oo-border oo-border-b-0 oo-border-slate-300 oo-rounded-t-md oo-ui-selected:oo-bg-blue-500 oo-ui-selected:oo-text-white', children: [_jsx(FingerPrintIcon, { className: 'oo-inline-block oo-h-[18px] oo-w-[18px] oo-mr-2' }), "Identifiers"] }), _jsxs(Tab, { as: "div", className: 'oo-text-center oo-inline-block oo-cursor-pointer oo-px-2 oo-py-1 oo-border oo-border-b-0 oo-border-slate-300 oo-rounded-t-md oo-ui-selected:oo-bg-blue-500 oo-ui-selected:oo-text-white', children: [_jsx(Square3Stack3DIcon, { className: 'oo-inline-block oo-h-[18px] oo-w-[18px] oo-mr-2' }), "Graph"] })] }), _jsxs(TabPanels, { className: "oo-flex-1 md:oo-h-24 oo-overscroll-contain oo-overflow-y-auto", children: [_jsx(TabPanel, { as: "div", className: 'oo-p-1 md:oo-p-2', children: _jsx(Panels.Profile, { servicePrefix: servicePrefix, refreshInterval: refreshInterval }) }), _jsx(TabPanel, { as: "div", className: 'oo-p-1 md:oo-p-2', children: _jsx(Panels.Interests, { servicePrefix: servicePrefix, refreshInterval: refreshInterval }) }), _jsx(TabPanel, { as: "div", className: 'oo-p-1 md:oo-p-2', children: _jsx(Panels.Goals, { servicePrefix: servicePrefix, refreshInterval: refreshInterval }) }), _jsx(TabPanel, { as: "div", className: 'oo-p-1 md:oo-p-2', children: _jsx(Panels.Audiences, { servicePrefix: servicePrefix, refreshInterval: refreshInterval }) }), _jsx(TabPanel, { as: "div", className: 'oo-p-1 md:oo-p-2', children: _jsx(Panels.Experiments, {}) }), _jsx(TabPanel, { as: "div", className: 'oo-p-1 md:oo-p-2', children: _jsx(Panels.Ids, { servicePrefix: servicePrefix, refreshInterval: refreshInterval }) }), _jsx(TabPanel, { as: "div", className: 'oo-p-1 md:oo-p-2', children: _jsx(Panels.Graph, { servicePrefix: servicePrefix }) })] })] })] })] });
|
|
67
68
|
};
|
|
68
69
|
export default OptimizelyOneGadget;
|
|
69
70
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/optimizely-one-gadget/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AACZ,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,WAAW,EAA0B,MAAM,OAAO,CAAA;AACtF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AC,aAAa,EAAG,aAAa,EAAG,eAAe,EAAG,eAAe,GAAK,GAC3E,EACX,KAAC,QAAQ,IAAC,EAAE,EAAC,KAAK,EAAC,SAAS,EAAC,kBAAkB,YAC3C,KAAC,MAAM,CAAC,KAAK,IAAC,aAAa,EAAG,aAAa,GAAK,GACzC,IACH,IACL,IACA,IACT,CAAA;AACd,CAAC,CAAA;AAED,eAAe,mBAAmB,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { ArrowPathIcon, UserCircleIcon } from '@heroicons/react/20/solid';
|
|
3
|
+
import useSWR from 'swr';
|
|
4
|
+
export const ProfilePanel = ({ servicePrefix = '/api/me', refreshInterval = 2000 }) => {
|
|
5
|
+
const topics = `${servicePrefix}?scope=profile`;
|
|
6
|
+
const { data: profile, isLoading, isValidating, error } = useSWR(topics, {
|
|
7
|
+
revalidateOnMount: true,
|
|
8
|
+
fetcher: () => fetch(topics).then(r => {
|
|
9
|
+
if (!r.ok)
|
|
10
|
+
throw new Error(`${r.status}: ${r.statusText}`);
|
|
11
|
+
return r.json();
|
|
12
|
+
}),
|
|
13
|
+
refreshInterval
|
|
14
|
+
});
|
|
15
|
+
if (error)
|
|
16
|
+
return _jsx("p", { className: 'oo-m-2 md:oo-m-4 oo-rounded-md oo-bg-amber-200 oo-border oo-border-amber-800 oo-text-amber-800 oo-p-1 md:oo-p-2', children: "There was an error loading your profile information" });
|
|
17
|
+
return _jsxs(_Fragment, { children: [profile && !profile.profile && _jsx("p", { className: 'oo-m-2 md:oo-m-4 oo-rounded-md oo-bg-amber-200 oo-border oo-border-amber-800 oo-text-amber-800 oo-p-1 md:oo-p-2', children: "Anonymous session" }), profile && profile.profile && _jsxs("div", { className: 'oo-w-full oo-flex oo-flex-row oo-gap-4 oo-mb-2', children: [_jsx("div", { className: 'oo-flex-none oo-w-[100px]', children: profile.profile.image_url ? _jsx("img", { src: profile.profile.image_url, alt: profile.profile.name ?? '', className: 'oo-w-full oo-aspect-square oo-rounded-[15px]' }) : _jsx(UserCircleIcon, { className: 'oo-w-full oo-aspect-square oo-rounded-[15px]' }) }), _jsxs("div", { className: 'oo-flex-grow', children: [_jsxs("dl", { className: 'oo-grid oo-grid-cols-3 oo-gap-x-4 oo-gap-y-1', children: [_jsx("dt", { className: 'oo-font-bold', children: "Name:" }), _jsx("dd", { className: 'oo-col-span-2', children: profile.profile.name ? profile.profile.name : `${profile.profile.first_name ?? ''} ${profile.profile.last_name}`.trim() }), _jsx("dt", { className: 'oo-font-bold', children: "City:" }), _jsx("dd", { className: 'oo-col-span-2', children: profile.profile.city ?? '' }), _jsx("dt", { className: 'oo-font-bold', children: "E-Mail:" }), _jsx("dd", { className: 'oo-col-span-2', children: profile.profile.email ?? '' }), _jsx("dt", { className: 'oo-font-bold', children: "Phone:" }), _jsx("dd", { className: 'oo-col-span-2', children: profile.profile.phone ?? '' }), _jsx("dt", { className: 'oo-font-bold', children: "Age:" }), _jsx("dd", { className: 'oo-col-span-2', children: profile.profile.observations.computed_age_years ?? 'n/a' }), _jsx("dt", { className: 'oo-font-bold', children: "Number of visits:" }), _jsx("dd", { className: 'oo-col-span-2', children: profile.profile.observations.session_count }), _jsx("dt", { className: 'oo-font-bold', children: "Likelyhood of still alive:" }), _jsx("dd", { className: 'oo-col-span-2', children: `${(profile.profile.insights.probability_alive ?? 0) * 100}%` })] }), _jsx("pre", { className: 'oo-hidden', children: JSON.stringify(profile.profile, undefined, 4) })] })] }), _jsx("p", { className: 'oo-text-[12px]', children: "Powered by: Optimizely Data Platform" }), isLoading && _jsxs("p", { className: 'oo-m-2 md:oo-m-4 oo-rounded-md oo-bg-amber-200 oo-border oo-border-amber-800 oo-text-amber-800 oo-p-1 md:oo-p-2', children: [_jsx(ArrowPathIcon, { className: 'oo-inline-block oo-h-4 oo-w-4 oo-mr-2 oo-animate-spin' }), " Loading profile"] })] });
|
|
18
|
+
};
|
|
19
|
+
export default ProfilePanel;
|
|
20
|
+
//# sourceMappingURL=profile-panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile-panel.js","sourceRoot":"","sources":["../../../src/components/optimizely-one-gadget/profile-panel.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AACzE,OAAO,MAAM,MAAM,KAAK,CAAA;AASxB,MAAM,CAAC,MAAM,YAAY,GAA0C,CAAC,EAAE,aAAa,GAAG,SAAS,EAAE,eAAe,GAAG,IAAI,EAAE,EAAE,EAAE;IAEzH,MAAM,MAAM,GAAG,GAAI,aAAc,gBAAgB,CAAA;IACjD,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,MAAM,CAAa,MAAM,EAAE;QACjF,iBAAiB,EAAE,IAAI;QACvB,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;YAClC,IAAI,CAAC,CAAC,CAAC,EAAE;gBACL,MAAM,IAAI,KAAK,CAAC,GAAI,CAAC,CAAC,MAAO,KAAM,CAAC,CAAC,UAAW,EAAE,CAAC,CAAA;YACvD,OAAO,CAAC,CAAC,IAAI,EAAE,CAAA;QACnB,CAAC,CAAC;QACF,eAAe;KAClB,CAAC,CAAA;IAEF,IAAI,KAAK;QACL,OAAO,YAAG,SAAS,EAAC,iHAAiH,oEAAwD,CAAA;IAEjM,OAAO,8BACD,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,YAAG,SAAS,EAAC,iHAAiH,kCAAsB,EACnL,OAAO,IAAI,OAAO,CAAC,OAAO,IAAI,eAAK,SAAS,EAAC,gDAAgD,aAC3F,cAAK,SAAS,EAAC,2BAA2B,YACpC,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,cAAK,GAAG,EA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Ae,YAAG,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,IAAI,CAAC,CAAC,GAAC,GAAG,GAAG,GAAO,IACjG,EACL,cAAK,SAAS,EAAC,WAAW,YAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,GAAO,IAC9E,IACJ,EACN,YAAG,SAAS,EAAC,gBAAgB,qDAAyC,EAEpE,SAAS,IAAI,aAAG,SAAS,EAAC,iHAAiH,aAAC,KAAC,aAAa,IAAC,SAAS,EAAC,uDAAuD,GAAG,wBAAoB,IACtP,CAAA;AACP,CAAC,CAAA;AAED,eAAe,YAAY,CAAA"}
|
|
@@ -30,6 +30,7 @@ export declare class DataPlatformClient {
|
|
|
30
30
|
getAllAudiences(throwOnError?: boolean): Promise<DataPlatformAudienceList>;
|
|
31
31
|
filterAudiences(vuid: string, audiences: string[]): Promise<string[]>;
|
|
32
32
|
getLastSearchTerms(vuid: string): Promise<string[]>;
|
|
33
|
+
getProfileInfo(vuid: string): Promise<DataPlatformProfile | undefined>;
|
|
33
34
|
protected privateQuery(graphQuery: string, variables?: Record<string, any>): Promise<Response>;
|
|
34
35
|
query(graphQuery: string, variables?: Record<string, any>): Promise<Response>;
|
|
35
36
|
}
|
|
@@ -39,3 +40,38 @@ export declare class DataPlatformError extends Error {
|
|
|
39
40
|
constructor(message?: string, trackerId?: string, options?: ErrorOptions);
|
|
40
41
|
}
|
|
41
42
|
export default DataPlatformClient;
|
|
43
|
+
export type DataPlatformProfile = {
|
|
44
|
+
name: string | null;
|
|
45
|
+
first_name: string | null;
|
|
46
|
+
last_name: string | null;
|
|
47
|
+
city: string | null;
|
|
48
|
+
country: string | null;
|
|
49
|
+
dob_day: number | null;
|
|
50
|
+
dob_month: number | null;
|
|
51
|
+
dob_year: number | null;
|
|
52
|
+
email: string | null;
|
|
53
|
+
observations: {
|
|
54
|
+
order_count: string | null;
|
|
55
|
+
discount_usage: string | null;
|
|
56
|
+
session_count: string | null;
|
|
57
|
+
total_revenue: string | null;
|
|
58
|
+
acquisition_source: string | null;
|
|
59
|
+
computed_age_years: string | null;
|
|
60
|
+
days_until_birthday: string | null;
|
|
61
|
+
};
|
|
62
|
+
state: string | null;
|
|
63
|
+
street1: string | null;
|
|
64
|
+
street2: string | null;
|
|
65
|
+
zip: string | null;
|
|
66
|
+
insights: {
|
|
67
|
+
order_likelihood: string | null;
|
|
68
|
+
ttno_days: string | null;
|
|
69
|
+
winback_type: string | null;
|
|
70
|
+
winback_zone: string | null;
|
|
71
|
+
engagement_rank: number | null;
|
|
72
|
+
probability_alive: number | null;
|
|
73
|
+
};
|
|
74
|
+
phone: string | null;
|
|
75
|
+
timezone: string | null;
|
|
76
|
+
image_url: string | null;
|
|
77
|
+
};
|
|
@@ -62,14 +62,14 @@ export class DataPlatformClient {
|
|
|
62
62
|
throw new DataPlatformError(`Error response from Optimizely Data Platform: ${response.status}: ${response.statusText}`, this.trackerId);
|
|
63
63
|
}
|
|
64
64
|
async getLastSearchTerms(vuid) {
|
|
65
|
-
const query = `query LastSearchTerms ($vuid:String!) {
|
|
66
|
-
events(vuid: $vuid, filter: "event_type='navigation'", order: {field: ts, direction: DESC}) {
|
|
67
|
-
edges {
|
|
68
|
-
node {
|
|
69
|
-
search_term
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
65
|
+
const query = `query LastSearchTerms ($vuid:String!) {
|
|
66
|
+
events(vuid: $vuid, filter: "event_type='navigation'", order: {field: ts, direction: DESC}) {
|
|
67
|
+
edges {
|
|
68
|
+
node {
|
|
69
|
+
search_term
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
73
|
}`;
|
|
74
74
|
const variables = { vuid };
|
|
75
75
|
const responseData = await (await this.privateQuery(query, variables)).json();
|
|
@@ -81,6 +81,60 @@ export class DataPlatformClient {
|
|
|
81
81
|
const terms = (responseData.data?.events?.edges?.map((e) => e.node.search_term) ?? []);
|
|
82
82
|
return terms;
|
|
83
83
|
}
|
|
84
|
+
async getProfileInfo(vuid) {
|
|
85
|
+
const query = `query getProfileInfo($filter: String!) {
|
|
86
|
+
customers(filter: $filter) {
|
|
87
|
+
edges {
|
|
88
|
+
node {
|
|
89
|
+
name
|
|
90
|
+
first_name
|
|
91
|
+
last_name
|
|
92
|
+
city
|
|
93
|
+
country
|
|
94
|
+
dob_day
|
|
95
|
+
dob_month
|
|
96
|
+
dob_year
|
|
97
|
+
email
|
|
98
|
+
observations {
|
|
99
|
+
order_count
|
|
100
|
+
discount_usage
|
|
101
|
+
session_count
|
|
102
|
+
total_revenue
|
|
103
|
+
acquisition_source
|
|
104
|
+
computed_age_years
|
|
105
|
+
days_until_birthday
|
|
106
|
+
}
|
|
107
|
+
state
|
|
108
|
+
street1
|
|
109
|
+
street2
|
|
110
|
+
zip
|
|
111
|
+
insights {
|
|
112
|
+
order_likelihood
|
|
113
|
+
ttno_days
|
|
114
|
+
winback_type
|
|
115
|
+
winback_zone
|
|
116
|
+
engagement_rank
|
|
117
|
+
probability_alive
|
|
118
|
+
}
|
|
119
|
+
phone
|
|
120
|
+
timezone
|
|
121
|
+
image_url
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}`;
|
|
126
|
+
const variables = { filter: `vuid='${vuid}'` };
|
|
127
|
+
const responseData = await (await this.privateQuery(query, variables)).json();
|
|
128
|
+
if (responseData.errors) {
|
|
129
|
+
console.error("Error while fetching latest search terms, please check your keys");
|
|
130
|
+
console.error(responseData.errors.map((e) => e.message).join('; '));
|
|
131
|
+
return undefined;
|
|
132
|
+
}
|
|
133
|
+
const profiles = responseData.data.customers.edges.map(customer => customer.node);
|
|
134
|
+
if (profiles.length == 1)
|
|
135
|
+
return profiles.at(0);
|
|
136
|
+
return undefined;
|
|
137
|
+
}
|
|
84
138
|
async privateQuery(graphQuery, variables) {
|
|
85
139
|
return fetch(new URL('/v3/graphql', this.config.endpoint), {
|
|
86
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PlatformError, type DataPlatformProfile as Profile } from './api';
|
|
2
2
|
export * as Tools from './helpers';
|
|
3
3
|
import { DataPlatformClient as Client, DataPlatformError } from './api';
|
|
4
4
|
import * as Tools from './helpers';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/products/data-platform/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/products/data-platform/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,IAAI,MAAM,EAA+D,MAAM,OAAO,CAAA;AACjH,OAAO,KAAK,KAAK,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,kBAAkB,IAAI,MAAM,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AACvE,OAAO,KAAK,KAAK,MAAM,WAAW,CAAA;AAElC,eAAe;IACX,MAAM;IACN,KAAK;IACL,iBAAiB;CACpB,CAAA"}
|
package/dist/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.oo-fixed{position:fixed!important}.oo-bottom-0{bottom:0!important}.oo-bottom-\[50px\]{bottom:50px!important}.oo-right-0{right:0!important}.oo-top-0{top:0!important}.oo-z-\[500\]{z-index:500!important}.oo-z-\[501\]{z-index:501!important}.oo-m-2{margin:.5rem!important}.oo-my-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.oo-ml-2{margin-left:.5rem!important}.oo-mr-2{margin-right:.5rem!important}.oo-mt-3{margin-top:.75rem!important}.oo-inline-block{display:inline-block!important}.oo-flex{display:flex!important}.oo-grid{display:grid!important}.oo-h-4{height:1rem!important}.oo-h-\[16px\]{height:16px!important}.oo-h-\[18px\]{height:18px!important}.oo-h-\[24px\]{height:24px!important}.oo-h-\[50px\]{height:50px!important}.oo-h-full{height:100%!important}.oo-w-4{width:1rem!important}.oo-w-\[16px\]{width:16px!important}.oo-w-\[18px\]{width:18px!important}.oo-w-\[24px\]{width:24px!important}.oo-w-auto{width:auto!important}.oo-w-full{width:100%!important}.oo-max-w-full{max-width:100%!important}.oo-flex-1{flex:1 1 0%!important}.oo-flex-none{flex:none!important}@keyframes oo-spin{to{transform:rotate(1turn)}}.oo-animate-spin{animation:oo-spin 1s linear infinite!important}.oo-cursor-pointer{cursor:pointer!important}.oo-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))!important}.oo-flex-row{flex-direction:row!important}.oo-flex-col{flex-direction:column!important}.oo-justify-between{justify-content:space-between!important}.oo-justify-stretch{justify-content:stretch!important}.oo-gap-2{gap:.5rem!important}.oo-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0!important;border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))!important;border-bottom-width:calc(1px*var(--tw-divide-y-reverse))!important}.oo-divide-slate-200>:not([hidden])~:not([hidden]){--tw-divide-opacity:1!important;border-color:rgb(226 232 240/var(--tw-divide-opacity))!important}.oo-overflow-y-auto{overflow-y:auto!important}.oo-overscroll-contain{overscroll-behavior:contain!important}.oo-rounded-md{border-radius:.375rem!important}.oo-rounded-t-md{border-top-left-radius:.375rem!important;border-top-right-radius:.375rem!important}.oo-border{border-width:1px!important}.oo-border-b{border-bottom-width:1px!important}.oo-border-b-0{border-bottom-width:0!important}.oo-border-t{border-top-width:1px!important}.oo-border-amber-800{--tw-border-opacity:1!important;border-color:rgb(146 64 14/var(--tw-border-opacity))!important}.oo-border-slate-300{--tw-border-opacity:1!important;border-color:rgb(203 213 225/var(--tw-border-opacity))!important}.oo-border-slate-500{--tw-border-opacity:1!important;border-color:rgb(100 116 139/var(--tw-border-opacity))!important}.oo-bg-amber-200{background-color:rgb(253 230 138/var(--tw-bg-opacity))!important}.oo-bg-amber-200,.oo-bg-blue-500{--tw-bg-opacity:1!important}.oo-bg-blue-500{background-color:rgb(59 130 246/var(--tw-bg-opacity))!important}.oo-bg-slate-100{background-color:rgb(241 245 249/var(--tw-bg-opacity))!important}.oo-bg-slate-100,.oo-bg-white{--tw-bg-opacity:1!important}.oo-bg-white{background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.oo-p-1{padding:.25rem!important}.oo-p-2{padding:.5rem!important}.oo-p-\[10px\]{padding:10px!important}.oo-px-2{padding-left:.5rem!important;padding-right:.5rem!important}.oo-py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.oo-pb-0{padding-bottom:0!important}.oo-pl-2{padding-left:.5rem!important}.oo-pt-1{padding-top:.25rem!important}.oo-pt-4{padding-top:1rem!important}.oo-text-center{text-align:center!important}.oo-text-\[12px\]{font-size:12px!important}.oo-text-\[14px\]{font-size:14px!important}.oo-text-\[18px\]{font-size:18px!important}.oo-font-bold{font-weight:700!important}.oo-text-amber-800{color:rgb(146 64 14/var(--tw-text-opacity))!important}.oo-text-amber-800,.oo-text-blue-500{--tw-text-opacity:1!important}.oo-text-blue-500{color:rgb(59 130 246/var(--tw-text-opacity))!important}.oo-text-blue-800{color:rgb(30 64 175/var(--tw-text-opacity))!important}.oo-text-blue-800,.oo-text-slate-800{--tw-text-opacity:1!important}.oo-text-slate-800{color:rgb(30 41 59/var(--tw-text-opacity))!important}.oo-text-white{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity))!important}.oo-underline{text-decoration-line:underline!important}.oo-ui-open\:oo-rotate-180[data-headlessui-state~=open]{--tw-rotate:180deg!important}.oo-ui-open\:oo-rotate-180[data-headlessui-state~=open],.oo-ui-open\:oo-transform[data-headlessui-state~=open]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}:where([data-headlessui-state~=open]) .oo-ui-open\:oo-rotate-180{--tw-rotate:180deg!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}:where([data-headlessui-state~=open]) .oo-ui-open\:oo-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.oo-ui-selected\:oo-bg-blue-500[data-headlessui-state~=selected]{--tw-bg-opacity:1!important;background-color:rgb(59 130 246/var(--tw-bg-opacity))!important}.oo-ui-selected\:oo-text-white[data-headlessui-state~=selected]{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity))!important}:where([data-headlessui-state~=selected]) .oo-ui-selected\:oo-bg-blue-500{--tw-bg-opacity:1!important;background-color:rgb(59 130 246/var(--tw-bg-opacity))!important}:where([data-headlessui-state~=selected]) .oo-ui-selected\:oo-text-white{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity))!important}@media (min-width:768px){.md\:oo-fixed{position:fixed!important}.md\:oo-bottom-0{bottom:0!important}.md\:oo-bottom-\[55px\]{bottom:55px!important}.md\:oo-right-4{right:1rem!important}.md\:oo-top-auto{top:auto!important}.md\:oo-m-4{margin:1rem!important}.md\:oo-h-24{height:6rem!important}.md\:oo-h-\[350px\]{height:350px!important}.md\:oo-w-\[350px\]{width:350px!important}.md\:oo-w-\[
|
|
1
|
+
.oo-fixed{position:fixed!important}.oo-bottom-0{bottom:0!important}.oo-bottom-\[50px\]{bottom:50px!important}.oo-right-0{right:0!important}.oo-top-0{top:0!important}.oo-z-\[500\]{z-index:500!important}.oo-z-\[501\]{z-index:501!important}.oo-col-span-2{grid-column:span 2/span 2!important}.oo-m-2{margin:.5rem!important}.oo-my-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.oo-mb-2{margin-bottom:.5rem!important}.oo-ml-2{margin-left:.5rem!important}.oo-mr-2{margin-right:.5rem!important}.oo-mt-3{margin-top:.75rem!important}.oo-inline-block{display:inline-block!important}.oo-flex{display:flex!important}.oo-grid{display:grid!important}.oo-hidden{display:none!important}.oo-aspect-square{aspect-ratio:1/1!important}.oo-h-4{height:1rem!important}.oo-h-\[16px\]{height:16px!important}.oo-h-\[18px\]{height:18px!important}.oo-h-\[24px\]{height:24px!important}.oo-h-\[50px\]{height:50px!important}.oo-h-full{height:100%!important}.oo-w-4{width:1rem!important}.oo-w-\[100px\]{width:100px!important}.oo-w-\[16px\]{width:16px!important}.oo-w-\[18px\]{width:18px!important}.oo-w-\[24px\]{width:24px!important}.oo-w-auto{width:auto!important}.oo-w-full{width:100%!important}.oo-max-w-full{max-width:100%!important}.oo-flex-1{flex:1 1 0%!important}.oo-flex-none{flex:none!important}.oo-flex-grow{flex-grow:1!important}@keyframes oo-spin{to{transform:rotate(1turn)}}.oo-animate-spin{animation:oo-spin 1s linear infinite!important}.oo-cursor-pointer{cursor:pointer!important}.oo-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))!important}.oo-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}.oo-flex-row{flex-direction:row!important}.oo-flex-col{flex-direction:column!important}.oo-justify-between{justify-content:space-between!important}.oo-justify-stretch{justify-content:stretch!important}.oo-gap-2{gap:.5rem!important}.oo-gap-4{gap:1rem!important}.oo-gap-x-4{-moz-column-gap:1rem!important;column-gap:1rem!important}.oo-gap-y-1{row-gap:.25rem!important}.oo-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0!important;border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))!important;border-bottom-width:calc(1px*var(--tw-divide-y-reverse))!important}.oo-divide-slate-200>:not([hidden])~:not([hidden]){--tw-divide-opacity:1!important;border-color:rgb(226 232 240/var(--tw-divide-opacity))!important}.oo-overflow-y-auto{overflow-y:auto!important}.oo-overscroll-contain{overscroll-behavior:contain!important}.oo-rounded-\[15px\]{border-radius:15px!important}.oo-rounded-md{border-radius:.375rem!important}.oo-rounded-t-md{border-top-left-radius:.375rem!important;border-top-right-radius:.375rem!important}.oo-border{border-width:1px!important}.oo-border-b{border-bottom-width:1px!important}.oo-border-b-0{border-bottom-width:0!important}.oo-border-t{border-top-width:1px!important}.oo-border-amber-800{--tw-border-opacity:1!important;border-color:rgb(146 64 14/var(--tw-border-opacity))!important}.oo-border-slate-300{--tw-border-opacity:1!important;border-color:rgb(203 213 225/var(--tw-border-opacity))!important}.oo-border-slate-500{--tw-border-opacity:1!important;border-color:rgb(100 116 139/var(--tw-border-opacity))!important}.oo-bg-amber-200{background-color:rgb(253 230 138/var(--tw-bg-opacity))!important}.oo-bg-amber-200,.oo-bg-blue-500{--tw-bg-opacity:1!important}.oo-bg-blue-500{background-color:rgb(59 130 246/var(--tw-bg-opacity))!important}.oo-bg-slate-100{background-color:rgb(241 245 249/var(--tw-bg-opacity))!important}.oo-bg-slate-100,.oo-bg-white{--tw-bg-opacity:1!important}.oo-bg-white{background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.oo-p-1{padding:.25rem!important}.oo-p-2{padding:.5rem!important}.oo-p-\[10px\]{padding:10px!important}.oo-px-2{padding-left:.5rem!important;padding-right:.5rem!important}.oo-py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.oo-pb-0{padding-bottom:0!important}.oo-pl-2{padding-left:.5rem!important}.oo-pt-1{padding-top:.25rem!important}.oo-pt-4{padding-top:1rem!important}.oo-text-center{text-align:center!important}.oo-text-\[12px\]{font-size:12px!important}.oo-text-\[14px\]{font-size:14px!important}.oo-text-\[18px\]{font-size:18px!important}.oo-font-bold{font-weight:700!important}.oo-text-amber-800{color:rgb(146 64 14/var(--tw-text-opacity))!important}.oo-text-amber-800,.oo-text-blue-500{--tw-text-opacity:1!important}.oo-text-blue-500{color:rgb(59 130 246/var(--tw-text-opacity))!important}.oo-text-blue-800{color:rgb(30 64 175/var(--tw-text-opacity))!important}.oo-text-blue-800,.oo-text-slate-800{--tw-text-opacity:1!important}.oo-text-slate-800{color:rgb(30 41 59/var(--tw-text-opacity))!important}.oo-text-white{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity))!important}.oo-underline{text-decoration-line:underline!important}.oo-ui-open\:oo-rotate-180[data-headlessui-state~=open]{--tw-rotate:180deg!important}.oo-ui-open\:oo-rotate-180[data-headlessui-state~=open],.oo-ui-open\:oo-transform[data-headlessui-state~=open]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}:where([data-headlessui-state~=open]) .oo-ui-open\:oo-rotate-180{--tw-rotate:180deg!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}:where([data-headlessui-state~=open]) .oo-ui-open\:oo-transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.oo-ui-selected\:oo-bg-blue-500[data-headlessui-state~=selected]{--tw-bg-opacity:1!important;background-color:rgb(59 130 246/var(--tw-bg-opacity))!important}.oo-ui-selected\:oo-text-white[data-headlessui-state~=selected]{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity))!important}:where([data-headlessui-state~=selected]) .oo-ui-selected\:oo-bg-blue-500{--tw-bg-opacity:1!important;background-color:rgb(59 130 246/var(--tw-bg-opacity))!important}:where([data-headlessui-state~=selected]) .oo-ui-selected\:oo-text-white{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity))!important}@media (min-width:768px){.md\:oo-fixed{position:fixed!important}.md\:oo-bottom-0{bottom:0!important}.md\:oo-bottom-\[55px\]{bottom:55px!important}.md\:oo-right-4{right:1rem!important}.md\:oo-top-auto{top:auto!important}.md\:oo-m-4{margin:1rem!important}.md\:oo-h-24{height:6rem!important}.md\:oo-h-\[350px\]{height:350px!important}.md\:oo-w-\[350px\]{width:350px!important}.md\:oo-w-\[675px\]{width:675px!important}.md\:oo-justify-start{justify-content:flex-start!important}.md\:oo-overflow-hidden{overflow:hidden!important}.md\:oo-rounded-md{border-radius:.375rem!important}.md\:oo-rounded-t-md{border-top-left-radius:.375rem!important;border-top-right-radius:.375rem!important}.md\:oo-border{border-width:1px!important}.md\:oo-border-x{border-left-width:1px!important;border-right-width:1px!important}.md\:oo-border-slate-300{--tw-border-opacity:1!important;border-color:rgb(203 213 225/var(--tw-border-opacity))!important}.md\:oo-p-2{padding:.5rem!important}.md\:oo-pb-0{padding-bottom:0!important}.md\:oo-shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1)!important;--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}}@media (prefers-color-scheme:dark){.dark\:oo-text-slate-800{--tw-text-opacity:1!important;color:rgb(30 41 59/var(--tw-text-opacity))!important}}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remkoj/optimizely-one-nextjs",
|
|
3
3
|
"license": "Apache-2.0",
|
|
4
|
-
"version": "2.0
|
|
4
|
+
"version": "2.1.0",
|
|
5
5
|
"packageManager": "yarn@4.1.1",
|
|
6
6
|
"repository": "https://github.com/remkoj/optimizely-dxp-clients.git",
|
|
7
7
|
"author": "Remko Jantzen <693172+remkoj@users.noreply.github.com>",
|
|
@@ -40,30 +40,30 @@
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@headlessui/react": "^2.1.
|
|
43
|
+
"@headlessui/react": "^2.1.9",
|
|
44
44
|
"@headlessui/tailwindcss": "^0.2.1",
|
|
45
45
|
"@heroicons/react": "^2.1.5",
|
|
46
|
-
"@remkoj/optimizely-graph-client": "^2.0
|
|
47
|
-
"@types/node": "^22.
|
|
48
|
-
"@types/react": "^18.3.
|
|
46
|
+
"@remkoj/optimizely-graph-client": "^2.1.0",
|
|
47
|
+
"@types/node": "^22.7.4",
|
|
48
|
+
"@types/react": "^18.3.11",
|
|
49
49
|
"@types/react-dom": "18.3.0",
|
|
50
50
|
"@types/uuid": "^10.0.0",
|
|
51
|
-
"browserslist": "^4.
|
|
52
|
-
"next": "^14.2.
|
|
51
|
+
"browserslist": "^4.24.0",
|
|
52
|
+
"next": "^14.2.14",
|
|
53
53
|
"prop-types": "^15.8.1",
|
|
54
54
|
"react": "^18.3.1",
|
|
55
55
|
"react-dom": "^18.3.1",
|
|
56
56
|
"scheduler": "^0.23.2",
|
|
57
57
|
"swr": "^2.2.5",
|
|
58
|
-
"tailwindcss": "^3.4.
|
|
59
|
-
"typescript": "^5.
|
|
60
|
-
"update-browserslist-db": "^1.1.
|
|
58
|
+
"tailwindcss": "^3.4.13",
|
|
59
|
+
"typescript": "^5.6.2",
|
|
60
|
+
"update-browserslist-db": "^1.1.1",
|
|
61
61
|
"uuid": "^10.0.0"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"@headlessui/react": "*",
|
|
65
65
|
"@heroicons/react": "*",
|
|
66
|
-
"@remkoj/optimizely-graph-client": "^2.0
|
|
66
|
+
"@remkoj/optimizely-graph-client": "^2.1.0",
|
|
67
67
|
"next": "*",
|
|
68
68
|
"react": "*",
|
|
69
69
|
"react-dom": "*",
|