@healthya-team/pharmacy-analytics 1.0.0 → 1.0.1
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/client/index.d.mts +5 -4
- package/dist/client/index.d.ts +5 -4
- package/dist/client/index.js +1 -0
- package/dist/client/index.mjs +2 -0
- package/dist/index.d.mts +217 -3
- package/dist/index.d.ts +217 -3
- package/dist/index.js +0 -9373
- package/dist/index.mjs +0 -9359
- package/dist/server/index.d.mts +7 -5
- package/dist/server/index.d.ts +7 -5
- package/dist/server/index.js +30 -1
- package/dist/server/index.mjs +29 -1
- package/dist/studio/index.d.mts +29 -27
- package/dist/studio/index.d.ts +29 -27
- package/dist/studio/index.js +393 -231
- package/dist/studio/index.mjs +340 -178
- package/package.json +3 -3
package/dist/server/index.d.mts
CHANGED
|
@@ -12,10 +12,12 @@ interface AnalyticsServerConfig {
|
|
|
12
12
|
* and Google Search Console.
|
|
13
13
|
*/
|
|
14
14
|
declare function createAnalyticsApiHandler(config?: AnalyticsServerConfig): {
|
|
15
|
-
GET: (
|
|
16
|
-
POST: (
|
|
15
|
+
GET: (req: Request) => Promise<Response>;
|
|
16
|
+
POST: (req: Request) => Promise<Response>;
|
|
17
|
+
OPTIONS: () => Promise<Response>;
|
|
17
18
|
};
|
|
18
|
-
declare const GET: (
|
|
19
|
-
declare const POST: (
|
|
19
|
+
declare const GET: (req: Request) => Promise<Response>;
|
|
20
|
+
declare const POST: (req: Request) => Promise<Response>;
|
|
21
|
+
declare const OPTIONS: () => Promise<Response>;
|
|
20
22
|
|
|
21
|
-
export { type AnalyticsServerConfig, GET, POST, createAnalyticsApiHandler };
|
|
23
|
+
export { type AnalyticsServerConfig, GET, OPTIONS, POST, createAnalyticsApiHandler };
|
package/dist/server/index.d.ts
CHANGED
|
@@ -12,10 +12,12 @@ interface AnalyticsServerConfig {
|
|
|
12
12
|
* and Google Search Console.
|
|
13
13
|
*/
|
|
14
14
|
declare function createAnalyticsApiHandler(config?: AnalyticsServerConfig): {
|
|
15
|
-
GET: (
|
|
16
|
-
POST: (
|
|
15
|
+
GET: (req: Request) => Promise<Response>;
|
|
16
|
+
POST: (req: Request) => Promise<Response>;
|
|
17
|
+
OPTIONS: () => Promise<Response>;
|
|
17
18
|
};
|
|
18
|
-
declare const GET: (
|
|
19
|
-
declare const POST: (
|
|
19
|
+
declare const GET: (req: Request) => Promise<Response>;
|
|
20
|
+
declare const POST: (req: Request) => Promise<Response>;
|
|
21
|
+
declare const OPTIONS: () => Promise<Response>;
|
|
20
22
|
|
|
21
|
-
export { type AnalyticsServerConfig, GET, POST, createAnalyticsApiHandler };
|
|
23
|
+
export { type AnalyticsServerConfig, GET, OPTIONS, POST, createAnalyticsApiHandler };
|
package/dist/server/index.js
CHANGED
|
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var server_exports = {};
|
|
22
22
|
__export(server_exports, {
|
|
23
23
|
GET: () => GET,
|
|
24
|
+
OPTIONS: () => OPTIONS,
|
|
24
25
|
POST: () => POST,
|
|
25
26
|
createAnalyticsApiHandler: () => createAnalyticsApiHandler
|
|
26
27
|
});
|
|
@@ -998,14 +999,42 @@ function createAnalyticsApiHandler(config) {
|
|
|
998
999
|
return Response.json({ error: msg }, { status: 500 });
|
|
999
1000
|
}
|
|
1000
1001
|
};
|
|
1001
|
-
|
|
1002
|
+
const corsHeaders = () => config?.corsOrigin ? {
|
|
1003
|
+
"Access-Control-Allow-Origin": config.corsOrigin,
|
|
1004
|
+
"Access-Control-Allow-Methods": "GET, POST, OPTIONS",
|
|
1005
|
+
"Access-Control-Allow-Headers": "Content-Type, Authorization",
|
|
1006
|
+
"Access-Control-Max-Age": "86400",
|
|
1007
|
+
Vary: "Origin"
|
|
1008
|
+
} : {};
|
|
1009
|
+
const optionsHandler = async () => new Response(null, { status: 204, headers: corsHeaders() });
|
|
1010
|
+
const withCors = (handler) => async (req) => {
|
|
1011
|
+
let res;
|
|
1012
|
+
try {
|
|
1013
|
+
res = await handler(req);
|
|
1014
|
+
} catch (err) {
|
|
1015
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
1016
|
+
res = Response.json({ error: msg }, { status: 500 });
|
|
1017
|
+
}
|
|
1018
|
+
const extra = corsHeaders();
|
|
1019
|
+
if (!Object.keys(extra).length) return res;
|
|
1020
|
+
const headers = new Headers(res.headers);
|
|
1021
|
+
for (const [k, v] of Object.entries(extra)) headers.set(k, v);
|
|
1022
|
+
return new Response(res.body, { status: res.status, statusText: res.statusText, headers });
|
|
1023
|
+
};
|
|
1024
|
+
return {
|
|
1025
|
+
GET: withCors(getHandler),
|
|
1026
|
+
POST: withCors(postHandler),
|
|
1027
|
+
OPTIONS: optionsHandler
|
|
1028
|
+
};
|
|
1002
1029
|
}
|
|
1003
1030
|
var defaultHandlers = createAnalyticsApiHandler();
|
|
1004
1031
|
var GET = defaultHandlers.GET;
|
|
1005
1032
|
var POST = defaultHandlers.POST;
|
|
1033
|
+
var OPTIONS = defaultHandlers.OPTIONS;
|
|
1006
1034
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1007
1035
|
0 && (module.exports = {
|
|
1008
1036
|
GET,
|
|
1037
|
+
OPTIONS,
|
|
1009
1038
|
POST,
|
|
1010
1039
|
createAnalyticsApiHandler
|
|
1011
1040
|
});
|
package/dist/server/index.mjs
CHANGED
|
@@ -972,13 +972,41 @@ function createAnalyticsApiHandler(config) {
|
|
|
972
972
|
return Response.json({ error: msg }, { status: 500 });
|
|
973
973
|
}
|
|
974
974
|
};
|
|
975
|
-
|
|
975
|
+
const corsHeaders = () => config?.corsOrigin ? {
|
|
976
|
+
"Access-Control-Allow-Origin": config.corsOrigin,
|
|
977
|
+
"Access-Control-Allow-Methods": "GET, POST, OPTIONS",
|
|
978
|
+
"Access-Control-Allow-Headers": "Content-Type, Authorization",
|
|
979
|
+
"Access-Control-Max-Age": "86400",
|
|
980
|
+
Vary: "Origin"
|
|
981
|
+
} : {};
|
|
982
|
+
const optionsHandler = async () => new Response(null, { status: 204, headers: corsHeaders() });
|
|
983
|
+
const withCors = (handler) => async (req) => {
|
|
984
|
+
let res;
|
|
985
|
+
try {
|
|
986
|
+
res = await handler(req);
|
|
987
|
+
} catch (err) {
|
|
988
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
989
|
+
res = Response.json({ error: msg }, { status: 500 });
|
|
990
|
+
}
|
|
991
|
+
const extra = corsHeaders();
|
|
992
|
+
if (!Object.keys(extra).length) return res;
|
|
993
|
+
const headers = new Headers(res.headers);
|
|
994
|
+
for (const [k, v] of Object.entries(extra)) headers.set(k, v);
|
|
995
|
+
return new Response(res.body, { status: res.status, statusText: res.statusText, headers });
|
|
996
|
+
};
|
|
997
|
+
return {
|
|
998
|
+
GET: withCors(getHandler),
|
|
999
|
+
POST: withCors(postHandler),
|
|
1000
|
+
OPTIONS: optionsHandler
|
|
1001
|
+
};
|
|
976
1002
|
}
|
|
977
1003
|
var defaultHandlers = createAnalyticsApiHandler();
|
|
978
1004
|
var GET = defaultHandlers.GET;
|
|
979
1005
|
var POST = defaultHandlers.POST;
|
|
1006
|
+
var OPTIONS = defaultHandlers.OPTIONS;
|
|
980
1007
|
export {
|
|
981
1008
|
GET,
|
|
1009
|
+
OPTIONS,
|
|
982
1010
|
POST,
|
|
983
1011
|
createAnalyticsApiHandler
|
|
984
1012
|
};
|
package/dist/studio/index.d.mts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import * as sanity from 'sanity';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
3
|
import * as lucide_react from 'lucide-react';
|
|
3
|
-
import
|
|
4
|
-
import react__default, { ReactNode, CSSProperties } from 'react';
|
|
4
|
+
import React, { ReactNode, CSSProperties } from 'react';
|
|
5
5
|
|
|
6
6
|
type MainSection = 'all' | 'analytics' | 'custom' | 'search-console';
|
|
7
7
|
type UnifiedTabId = 'all-overview' | 'overview' | 'traffic' | 'content' | 'audience' | 'geography' | 'events' | 'acquisition' | 'conditions-products' | 'funnel' | 'pm-funnel' | 'sc-overview' | 'sc-queries' | 'sc-pages' | 'sc-countries' | 'sc-devices' | 'sc-appearance' | 'sc-sitemaps';
|
|
8
8
|
interface UnifiedDashboardProps {
|
|
9
9
|
apiUrl?: string;
|
|
10
10
|
scApiUrl?: string;
|
|
11
|
+
mixpanelApiUrl?: string;
|
|
11
12
|
brandName?: string;
|
|
12
13
|
}
|
|
13
|
-
declare function UnifiedDashboard({ apiUrl, scApiUrl, brandName, }: UnifiedDashboardProps):
|
|
14
|
+
declare function UnifiedDashboard({ apiUrl, scApiUrl, mixpanelApiUrl, brandName, }: UnifiedDashboardProps): react_jsx_runtime.JSX.Element;
|
|
14
15
|
|
|
15
16
|
type ScDateRange = "7" | "28" | "90" | "180";
|
|
16
17
|
interface ScRow {
|
|
@@ -73,33 +74,33 @@ type Tab = 'overview' | 'queries' | 'pages' | 'countries' | 'devices' | 'appeara
|
|
|
73
74
|
declare function ScOverviewTab({ data, loading }: {
|
|
74
75
|
data: SearchConsoleData;
|
|
75
76
|
loading?: boolean;
|
|
76
|
-
}):
|
|
77
|
+
}): react_jsx_runtime.JSX.Element;
|
|
77
78
|
declare function ScQueriesTab({ data, loading }: {
|
|
78
79
|
data: SearchConsoleData;
|
|
79
80
|
loading?: boolean;
|
|
80
|
-
}):
|
|
81
|
+
}): react_jsx_runtime.JSX.Element;
|
|
81
82
|
declare function ScPagesTab({ data, loading }: {
|
|
82
83
|
data: SearchConsoleData;
|
|
83
84
|
loading?: boolean;
|
|
84
|
-
}):
|
|
85
|
+
}): react_jsx_runtime.JSX.Element;
|
|
85
86
|
declare function ScCountriesTab({ data, loading }: {
|
|
86
87
|
data: SearchConsoleData;
|
|
87
88
|
loading?: boolean;
|
|
88
|
-
}):
|
|
89
|
+
}): react_jsx_runtime.JSX.Element;
|
|
89
90
|
declare function ScDevicesTab({ data, loading }: {
|
|
90
91
|
data: SearchConsoleData;
|
|
91
92
|
loading?: boolean;
|
|
92
|
-
}):
|
|
93
|
+
}): react_jsx_runtime.JSX.Element;
|
|
93
94
|
declare function ScAppearanceTab({ data, loading }: {
|
|
94
95
|
data: SearchConsoleData;
|
|
95
96
|
loading?: boolean;
|
|
96
|
-
}):
|
|
97
|
+
}): react_jsx_runtime.JSX.Element;
|
|
97
98
|
declare function ScSitemapsTab({ data, apiUrl, onRefreshData, loading, }: {
|
|
98
99
|
data: SearchConsoleData;
|
|
99
100
|
apiUrl: string;
|
|
100
101
|
onRefreshData: () => void;
|
|
101
102
|
loading?: boolean;
|
|
102
|
-
}):
|
|
103
|
+
}): react_jsx_runtime.JSX.Element;
|
|
103
104
|
declare const OverviewTab: typeof ScOverviewTab;
|
|
104
105
|
declare const QueriesTab: typeof ScQueriesTab;
|
|
105
106
|
declare const PagesTab: typeof ScPagesTab;
|
|
@@ -109,7 +110,7 @@ declare const AppearanceTab: typeof ScAppearanceTab;
|
|
|
109
110
|
declare const SitemapsTab: typeof ScSitemapsTab;
|
|
110
111
|
declare function SearchConsoleTool({ apiUrl }: {
|
|
111
112
|
apiUrl?: string;
|
|
112
|
-
}):
|
|
113
|
+
}): react_jsx_runtime.JSX.Element;
|
|
113
114
|
type ScTab = Tab;
|
|
114
115
|
type SearchConsoleTab = Tab;
|
|
115
116
|
declare function SearchConsoleDashboard({ apiUrl, initialTab, activeTab: controlledTab, onTabChange, }: {
|
|
@@ -117,7 +118,7 @@ declare function SearchConsoleDashboard({ apiUrl, initialTab, activeTab: control
|
|
|
117
118
|
initialTab?: ScTab;
|
|
118
119
|
activeTab?: ScTab;
|
|
119
120
|
onTabChange?: (tab: ScTab) => void;
|
|
120
|
-
}):
|
|
121
|
+
}): react_jsx_runtime.JSX.Element | null;
|
|
121
122
|
|
|
122
123
|
declare const GA_ACCENT: {
|
|
123
124
|
primary: string;
|
|
@@ -158,27 +159,27 @@ declare function DashboardShell<T extends string, R extends string>({ title, sub
|
|
|
158
159
|
children: ReactNode;
|
|
159
160
|
accent: typeof GA_ACCENT;
|
|
160
161
|
pharmacySelector?: ReactNode;
|
|
161
|
-
}):
|
|
162
|
+
}): react_jsx_runtime.JSX.Element;
|
|
162
163
|
declare function InitialLoading({ label, accent, }: {
|
|
163
164
|
label: string;
|
|
164
165
|
accent: typeof GA_ACCENT;
|
|
165
|
-
}):
|
|
166
|
+
}): react_jsx_runtime.JSX.Element;
|
|
166
167
|
declare function ErrorState({ title, error, onRetry, accent, }: {
|
|
167
168
|
title: string;
|
|
168
169
|
error: string;
|
|
169
170
|
onRetry: () => void;
|
|
170
171
|
accent: typeof GA_ACCENT;
|
|
171
|
-
}):
|
|
172
|
+
}): react_jsx_runtime.JSX.Element;
|
|
172
173
|
declare function Panel({ title, info, children, style, }: {
|
|
173
174
|
title?: string;
|
|
174
175
|
info?: string;
|
|
175
176
|
children: ReactNode;
|
|
176
177
|
style?: CSSProperties;
|
|
177
|
-
}):
|
|
178
|
+
}): react_jsx_runtime.JSX.Element;
|
|
178
179
|
declare function MetricGrid({ children, style }: {
|
|
179
180
|
children: ReactNode;
|
|
180
181
|
style?: CSSProperties;
|
|
181
|
-
}):
|
|
182
|
+
}): react_jsx_runtime.JSX.Element;
|
|
182
183
|
declare function MetricCard({ label, value, sub, color, info, loading, }: {
|
|
183
184
|
label: string;
|
|
184
185
|
value: string;
|
|
@@ -186,7 +187,7 @@ declare function MetricCard({ label, value, sub, color, info, loading, }: {
|
|
|
186
187
|
color?: string;
|
|
187
188
|
info?: string;
|
|
188
189
|
loading?: boolean;
|
|
189
|
-
}):
|
|
190
|
+
}): react_jsx_runtime.JSX.Element;
|
|
190
191
|
declare function DataTable({ headers, rows, empty, loading, skeletonRows, }: {
|
|
191
192
|
headers: {
|
|
192
193
|
label: string;
|
|
@@ -197,15 +198,15 @@ declare function DataTable({ headers, rows, empty, loading, skeletonRows, }: {
|
|
|
197
198
|
empty?: string;
|
|
198
199
|
loading?: boolean;
|
|
199
200
|
skeletonRows?: number;
|
|
200
|
-
}):
|
|
201
|
+
}): react_jsx_runtime.JSX.Element;
|
|
201
202
|
declare function PathCell({ path }: {
|
|
202
203
|
path: string;
|
|
203
|
-
}):
|
|
204
|
+
}): react_jsx_runtime.JSX.Element;
|
|
204
205
|
declare function HorizontalBar({ value, max, color, }: {
|
|
205
206
|
value: number;
|
|
206
207
|
max: number;
|
|
207
208
|
color: string;
|
|
208
|
-
}):
|
|
209
|
+
}): react_jsx_runtime.JSX.Element;
|
|
209
210
|
declare function Donut({ data, colors, loading, formatter, info, }: {
|
|
210
211
|
data: {
|
|
211
212
|
name: string;
|
|
@@ -216,14 +217,14 @@ declare function Donut({ data, colors, loading, formatter, info, }: {
|
|
|
216
217
|
loading?: boolean;
|
|
217
218
|
formatter: (value: number) => string;
|
|
218
219
|
info?: string;
|
|
219
|
-
}):
|
|
220
|
+
}): react_jsx_runtime.JSX.Element;
|
|
220
221
|
declare function SkeletonChart({ height }: {
|
|
221
222
|
height: number;
|
|
222
|
-
}):
|
|
223
|
+
}): react_jsx_runtime.JSX.Element;
|
|
223
224
|
declare function StatusPill({ tone, children, }: {
|
|
224
225
|
tone: 'success' | 'warning' | 'danger' | 'neutral';
|
|
225
226
|
children: ReactNode;
|
|
226
|
-
}):
|
|
227
|
+
}): react_jsx_runtime.JSX.Element;
|
|
227
228
|
|
|
228
229
|
type DateRange = "7" | "14" | "30" | "90";
|
|
229
230
|
interface OverviewMetrics {
|
|
@@ -341,9 +342,10 @@ interface AnalyticsData {
|
|
|
341
342
|
interface PharmacyAnalyticsPluginConfig {
|
|
342
343
|
apiUrl?: string;
|
|
343
344
|
scApiUrl?: string;
|
|
345
|
+
mixpanelApiUrl?: string;
|
|
344
346
|
title?: string;
|
|
345
347
|
name?: string;
|
|
346
|
-
icon?:
|
|
348
|
+
icon?: React.ComponentType;
|
|
347
349
|
}
|
|
348
350
|
/**
|
|
349
351
|
* Sanity Studio plugin that registers the Unified Pharmacy Analytics tool.
|
|
@@ -367,8 +369,8 @@ declare function pharmacyAnalyticsPlugin(config?: PharmacyAnalyticsPluginConfig)
|
|
|
367
369
|
tools: {
|
|
368
370
|
name: string;
|
|
369
371
|
title: string;
|
|
370
|
-
icon:
|
|
371
|
-
component: () =>
|
|
372
|
+
icon: React.ComponentType<{}> | React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
373
|
+
component: () => react_jsx_runtime.JSX.Element;
|
|
372
374
|
}[];
|
|
373
375
|
};
|
|
374
376
|
/**
|
package/dist/studio/index.d.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import * as sanity from 'sanity';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
3
|
import * as lucide_react from 'lucide-react';
|
|
3
|
-
import
|
|
4
|
-
import react__default, { ReactNode, CSSProperties } from 'react';
|
|
4
|
+
import React, { ReactNode, CSSProperties } from 'react';
|
|
5
5
|
|
|
6
6
|
type MainSection = 'all' | 'analytics' | 'custom' | 'search-console';
|
|
7
7
|
type UnifiedTabId = 'all-overview' | 'overview' | 'traffic' | 'content' | 'audience' | 'geography' | 'events' | 'acquisition' | 'conditions-products' | 'funnel' | 'pm-funnel' | 'sc-overview' | 'sc-queries' | 'sc-pages' | 'sc-countries' | 'sc-devices' | 'sc-appearance' | 'sc-sitemaps';
|
|
8
8
|
interface UnifiedDashboardProps {
|
|
9
9
|
apiUrl?: string;
|
|
10
10
|
scApiUrl?: string;
|
|
11
|
+
mixpanelApiUrl?: string;
|
|
11
12
|
brandName?: string;
|
|
12
13
|
}
|
|
13
|
-
declare function UnifiedDashboard({ apiUrl, scApiUrl, brandName, }: UnifiedDashboardProps):
|
|
14
|
+
declare function UnifiedDashboard({ apiUrl, scApiUrl, mixpanelApiUrl, brandName, }: UnifiedDashboardProps): react_jsx_runtime.JSX.Element;
|
|
14
15
|
|
|
15
16
|
type ScDateRange = "7" | "28" | "90" | "180";
|
|
16
17
|
interface ScRow {
|
|
@@ -73,33 +74,33 @@ type Tab = 'overview' | 'queries' | 'pages' | 'countries' | 'devices' | 'appeara
|
|
|
73
74
|
declare function ScOverviewTab({ data, loading }: {
|
|
74
75
|
data: SearchConsoleData;
|
|
75
76
|
loading?: boolean;
|
|
76
|
-
}):
|
|
77
|
+
}): react_jsx_runtime.JSX.Element;
|
|
77
78
|
declare function ScQueriesTab({ data, loading }: {
|
|
78
79
|
data: SearchConsoleData;
|
|
79
80
|
loading?: boolean;
|
|
80
|
-
}):
|
|
81
|
+
}): react_jsx_runtime.JSX.Element;
|
|
81
82
|
declare function ScPagesTab({ data, loading }: {
|
|
82
83
|
data: SearchConsoleData;
|
|
83
84
|
loading?: boolean;
|
|
84
|
-
}):
|
|
85
|
+
}): react_jsx_runtime.JSX.Element;
|
|
85
86
|
declare function ScCountriesTab({ data, loading }: {
|
|
86
87
|
data: SearchConsoleData;
|
|
87
88
|
loading?: boolean;
|
|
88
|
-
}):
|
|
89
|
+
}): react_jsx_runtime.JSX.Element;
|
|
89
90
|
declare function ScDevicesTab({ data, loading }: {
|
|
90
91
|
data: SearchConsoleData;
|
|
91
92
|
loading?: boolean;
|
|
92
|
-
}):
|
|
93
|
+
}): react_jsx_runtime.JSX.Element;
|
|
93
94
|
declare function ScAppearanceTab({ data, loading }: {
|
|
94
95
|
data: SearchConsoleData;
|
|
95
96
|
loading?: boolean;
|
|
96
|
-
}):
|
|
97
|
+
}): react_jsx_runtime.JSX.Element;
|
|
97
98
|
declare function ScSitemapsTab({ data, apiUrl, onRefreshData, loading, }: {
|
|
98
99
|
data: SearchConsoleData;
|
|
99
100
|
apiUrl: string;
|
|
100
101
|
onRefreshData: () => void;
|
|
101
102
|
loading?: boolean;
|
|
102
|
-
}):
|
|
103
|
+
}): react_jsx_runtime.JSX.Element;
|
|
103
104
|
declare const OverviewTab: typeof ScOverviewTab;
|
|
104
105
|
declare const QueriesTab: typeof ScQueriesTab;
|
|
105
106
|
declare const PagesTab: typeof ScPagesTab;
|
|
@@ -109,7 +110,7 @@ declare const AppearanceTab: typeof ScAppearanceTab;
|
|
|
109
110
|
declare const SitemapsTab: typeof ScSitemapsTab;
|
|
110
111
|
declare function SearchConsoleTool({ apiUrl }: {
|
|
111
112
|
apiUrl?: string;
|
|
112
|
-
}):
|
|
113
|
+
}): react_jsx_runtime.JSX.Element;
|
|
113
114
|
type ScTab = Tab;
|
|
114
115
|
type SearchConsoleTab = Tab;
|
|
115
116
|
declare function SearchConsoleDashboard({ apiUrl, initialTab, activeTab: controlledTab, onTabChange, }: {
|
|
@@ -117,7 +118,7 @@ declare function SearchConsoleDashboard({ apiUrl, initialTab, activeTab: control
|
|
|
117
118
|
initialTab?: ScTab;
|
|
118
119
|
activeTab?: ScTab;
|
|
119
120
|
onTabChange?: (tab: ScTab) => void;
|
|
120
|
-
}):
|
|
121
|
+
}): react_jsx_runtime.JSX.Element | null;
|
|
121
122
|
|
|
122
123
|
declare const GA_ACCENT: {
|
|
123
124
|
primary: string;
|
|
@@ -158,27 +159,27 @@ declare function DashboardShell<T extends string, R extends string>({ title, sub
|
|
|
158
159
|
children: ReactNode;
|
|
159
160
|
accent: typeof GA_ACCENT;
|
|
160
161
|
pharmacySelector?: ReactNode;
|
|
161
|
-
}):
|
|
162
|
+
}): react_jsx_runtime.JSX.Element;
|
|
162
163
|
declare function InitialLoading({ label, accent, }: {
|
|
163
164
|
label: string;
|
|
164
165
|
accent: typeof GA_ACCENT;
|
|
165
|
-
}):
|
|
166
|
+
}): react_jsx_runtime.JSX.Element;
|
|
166
167
|
declare function ErrorState({ title, error, onRetry, accent, }: {
|
|
167
168
|
title: string;
|
|
168
169
|
error: string;
|
|
169
170
|
onRetry: () => void;
|
|
170
171
|
accent: typeof GA_ACCENT;
|
|
171
|
-
}):
|
|
172
|
+
}): react_jsx_runtime.JSX.Element;
|
|
172
173
|
declare function Panel({ title, info, children, style, }: {
|
|
173
174
|
title?: string;
|
|
174
175
|
info?: string;
|
|
175
176
|
children: ReactNode;
|
|
176
177
|
style?: CSSProperties;
|
|
177
|
-
}):
|
|
178
|
+
}): react_jsx_runtime.JSX.Element;
|
|
178
179
|
declare function MetricGrid({ children, style }: {
|
|
179
180
|
children: ReactNode;
|
|
180
181
|
style?: CSSProperties;
|
|
181
|
-
}):
|
|
182
|
+
}): react_jsx_runtime.JSX.Element;
|
|
182
183
|
declare function MetricCard({ label, value, sub, color, info, loading, }: {
|
|
183
184
|
label: string;
|
|
184
185
|
value: string;
|
|
@@ -186,7 +187,7 @@ declare function MetricCard({ label, value, sub, color, info, loading, }: {
|
|
|
186
187
|
color?: string;
|
|
187
188
|
info?: string;
|
|
188
189
|
loading?: boolean;
|
|
189
|
-
}):
|
|
190
|
+
}): react_jsx_runtime.JSX.Element;
|
|
190
191
|
declare function DataTable({ headers, rows, empty, loading, skeletonRows, }: {
|
|
191
192
|
headers: {
|
|
192
193
|
label: string;
|
|
@@ -197,15 +198,15 @@ declare function DataTable({ headers, rows, empty, loading, skeletonRows, }: {
|
|
|
197
198
|
empty?: string;
|
|
198
199
|
loading?: boolean;
|
|
199
200
|
skeletonRows?: number;
|
|
200
|
-
}):
|
|
201
|
+
}): react_jsx_runtime.JSX.Element;
|
|
201
202
|
declare function PathCell({ path }: {
|
|
202
203
|
path: string;
|
|
203
|
-
}):
|
|
204
|
+
}): react_jsx_runtime.JSX.Element;
|
|
204
205
|
declare function HorizontalBar({ value, max, color, }: {
|
|
205
206
|
value: number;
|
|
206
207
|
max: number;
|
|
207
208
|
color: string;
|
|
208
|
-
}):
|
|
209
|
+
}): react_jsx_runtime.JSX.Element;
|
|
209
210
|
declare function Donut({ data, colors, loading, formatter, info, }: {
|
|
210
211
|
data: {
|
|
211
212
|
name: string;
|
|
@@ -216,14 +217,14 @@ declare function Donut({ data, colors, loading, formatter, info, }: {
|
|
|
216
217
|
loading?: boolean;
|
|
217
218
|
formatter: (value: number) => string;
|
|
218
219
|
info?: string;
|
|
219
|
-
}):
|
|
220
|
+
}): react_jsx_runtime.JSX.Element;
|
|
220
221
|
declare function SkeletonChart({ height }: {
|
|
221
222
|
height: number;
|
|
222
|
-
}):
|
|
223
|
+
}): react_jsx_runtime.JSX.Element;
|
|
223
224
|
declare function StatusPill({ tone, children, }: {
|
|
224
225
|
tone: 'success' | 'warning' | 'danger' | 'neutral';
|
|
225
226
|
children: ReactNode;
|
|
226
|
-
}):
|
|
227
|
+
}): react_jsx_runtime.JSX.Element;
|
|
227
228
|
|
|
228
229
|
type DateRange = "7" | "14" | "30" | "90";
|
|
229
230
|
interface OverviewMetrics {
|
|
@@ -341,9 +342,10 @@ interface AnalyticsData {
|
|
|
341
342
|
interface PharmacyAnalyticsPluginConfig {
|
|
342
343
|
apiUrl?: string;
|
|
343
344
|
scApiUrl?: string;
|
|
345
|
+
mixpanelApiUrl?: string;
|
|
344
346
|
title?: string;
|
|
345
347
|
name?: string;
|
|
346
|
-
icon?:
|
|
348
|
+
icon?: React.ComponentType;
|
|
347
349
|
}
|
|
348
350
|
/**
|
|
349
351
|
* Sanity Studio plugin that registers the Unified Pharmacy Analytics tool.
|
|
@@ -367,8 +369,8 @@ declare function pharmacyAnalyticsPlugin(config?: PharmacyAnalyticsPluginConfig)
|
|
|
367
369
|
tools: {
|
|
368
370
|
name: string;
|
|
369
371
|
title: string;
|
|
370
|
-
icon:
|
|
371
|
-
component: () =>
|
|
372
|
+
icon: React.ComponentType<{}> | React.ForwardRefExoticComponent<Omit<lucide_react.LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
373
|
+
component: () => react_jsx_runtime.JSX.Element;
|
|
372
374
|
}[];
|
|
373
375
|
};
|
|
374
376
|
/**
|