@verifiedinc-public/shared-ui-elements 4.0.4-beta.1 → 4.0.4-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/BrandFilterInput/BrandFilterInput.hook.d.ts +3 -6
- package/dist/components/BrandFilterInput/index.d.ts +8 -6
- package/dist/components/BrandFilterInput/types.d.ts +54 -0
- package/dist/components/chart/MonthlySignupsOverviewTable/MonthlySignupsOverviewTable.d.ts +15 -0
- package/dist/components/chart/{monthly-billable-signups/monthlyBillableSignupsDataMapper.d.ts → MonthlySignupsOverviewTable/MonthlySignupsOverviewTableDataMapper.d.ts} +2 -2
- package/dist/components/chart/MonthlySignupsOverviewTable/index.d.ts +2 -0
- package/dist/components/chart/SeriesChart/index.d.ts +1 -0
- package/dist/components/chart/SeriesChartLegend/index.d.ts +5 -1
- package/dist/components/chart/SignupBigNumbers/SignupBigNumbers.d.ts +7 -0
- package/dist/components/chart/SignupBigNumbers/SignupBigNumbersMapper.d.ts +23 -0
- package/dist/components/chart/SignupBigNumbers/index.d.ts +1 -0
- package/dist/components/chart/index.d.ts +3 -2
- package/dist/components/chart/index.mjs +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.mjs +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/shared/SignupBigNumbers-K1v6XoXN.mjs +21 -0
- package/dist/shared/{index-DFAvYi1Z.mjs → index-9gHtH_UR.mjs} +10 -10
- package/dist/shared/useCopyToClipboard-_Ur9Q8Gv.mjs +1 -0
- package/dist/utils/number/formatters.d.ts +3 -0
- package/package.json +1 -1
- package/dist/components/chart/monthly-billable-signups/MonthlyBillableSignupsTable.d.ts +0 -15
- package/dist/components/chart/monthly-billable-signups/index.d.ts +0 -2
- package/dist/shared/index-Cbzc-ZBt.mjs +0 -21
- package/dist/shared/useCopyToClipboard-BALOSYVW.mjs +0 -1
- package/dist/shared/usePrevious-DyvR1iCQ.mjs +0 -1
- package/dist/shared/uuidColor-Dw38-aYm.mjs +0 -1
- /package/dist/components/chart/{one-click-time-series → OneClickOverTimeChart}/OneClickOverTimeChart.d.ts +0 -0
- /package/dist/components/chart/{one-click-time-series → OneClickOverTimeChart}/OneClickTimeSeriesDataMapper.d.ts +0 -0
- /package/dist/components/chart/{one-click-time-series → OneClickOverTimeChart}/index.d.ts +0 -0
@@ -8,18 +8,15 @@ interface UseBrandFilterInputProps {
|
|
8
8
|
value: BrandFilter | BrandFilter[] | undefined;
|
9
9
|
multiple?: boolean;
|
10
10
|
onChange?: (brands: BrandFilter | BrandFilter[]) => void;
|
11
|
-
|
12
|
-
data?: Brands[];
|
13
|
-
isFetching: boolean;
|
14
|
-
};
|
11
|
+
brands?: Brands[];
|
15
12
|
maximumSelectedBrands?: number;
|
13
|
+
defaultBrandUuids?: string[];
|
16
14
|
}
|
17
|
-
export declare function useBrandFilterInput({ value, multiple, onChange,
|
15
|
+
export declare function useBrandFilterInput({ value, multiple, onChange, brands, maximumSelectedBrands, defaultBrandUuids, }: UseBrandFilterInputProps): {
|
18
16
|
brandOptions: {
|
19
17
|
name: string;
|
20
18
|
value: string;
|
21
19
|
_raw: Brands;
|
22
20
|
}[];
|
23
|
-
isFetching: boolean;
|
24
21
|
};
|
25
22
|
export {};
|
@@ -1,16 +1,18 @@
|
|
1
|
-
import { BrandFilter } from './types';
|
1
|
+
import { BrandFilter, BrandGroupConfig } from './types';
|
2
2
|
export type Value = BrandFilter;
|
3
3
|
interface BrandFilterInputProps {
|
4
4
|
label: string;
|
5
5
|
multiple?: boolean;
|
6
6
|
value: Value | Value[] | undefined;
|
7
7
|
onChange: (value: Value | Value[] | null) => void;
|
8
|
-
|
9
|
-
|
10
|
-
isFetching: boolean;
|
11
|
-
};
|
8
|
+
brands?: any[];
|
9
|
+
isLoading: boolean;
|
12
10
|
maximumSelectedBrands?: number;
|
11
|
+
/** Configuration for how to group the brands. If null, no grouping will be applied */
|
12
|
+
groupConfig?: BrandGroupConfig;
|
13
|
+
/** Array of brand UUIDs to use as default values when no selection is made */
|
14
|
+
defaultBrandUuids?: string[];
|
13
15
|
}
|
14
|
-
export declare function BrandFilterInput({ label, multiple, value, onChange,
|
16
|
+
export declare function BrandFilterInput({ label, multiple, value, onChange, brands, isLoading, maximumSelectedBrands, groupConfig, defaultBrandUuids, }: Readonly<BrandFilterInputProps>): import("react").JSX.Element;
|
15
17
|
export * from './types';
|
16
18
|
export * from './BrandFilterInput.hook';
|
@@ -6,6 +6,7 @@ export interface Brands {
|
|
6
6
|
oneClickCreated?: number;
|
7
7
|
oneClickSuccess?: number;
|
8
8
|
isLiveBrand?: boolean;
|
9
|
+
isApproved?: boolean;
|
9
10
|
additionalData?: any;
|
10
11
|
}
|
11
12
|
export type BrandFilter = {
|
@@ -13,3 +14,56 @@ export type BrandFilter = {
|
|
13
14
|
value: string;
|
14
15
|
_raw: Brands;
|
15
16
|
};
|
17
|
+
/**
|
18
|
+
* Type representing the display value for a group in the dropdown.
|
19
|
+
* This is what users will see as the group header.
|
20
|
+
*/
|
21
|
+
export type GroupDisplayValue = string;
|
22
|
+
/**
|
23
|
+
* Configuration for grouping brands in the dropdown.
|
24
|
+
*
|
25
|
+
* @template K - The specific key from the Brands type that we want to group by.
|
26
|
+
* TypeScript will ensure type safety based on this key.
|
27
|
+
*
|
28
|
+
* @example
|
29
|
+
* // Group by live status
|
30
|
+
* const liveConfig: BrandGroupConfig<'isLiveBrand'> = {
|
31
|
+
* key: 'isLiveBrand',
|
32
|
+
* transform: (value) => value ? 'Live Brands' : 'Not Live',
|
33
|
+
* sortGroups: (a, b) => a === 'Live Brands' ? -1 : 1
|
34
|
+
* };
|
35
|
+
*
|
36
|
+
* // Group by integration type
|
37
|
+
* const integrationConfig: BrandGroupConfig<'integrationType'> = {
|
38
|
+
* key: 'integrationType',
|
39
|
+
* transform: (value) => `${value} Integration`
|
40
|
+
* };
|
41
|
+
*
|
42
|
+
* // No grouping
|
43
|
+
* const noGrouping: BrandGroupConfig = null;
|
44
|
+
*/
|
45
|
+
export type BrandGroupConfig<K extends keyof Brands = keyof Brands> = {
|
46
|
+
/**
|
47
|
+
* The key from the Brands object to group by.
|
48
|
+
* TypeScript will ensure this is a valid key from the Brands type.
|
49
|
+
*/
|
50
|
+
key: K;
|
51
|
+
/**
|
52
|
+
* Optional function to transform the raw brand value into a display string.
|
53
|
+
* The input type is automatically inferred from the key.
|
54
|
+
* For example, if key is 'isLiveBrand', value will be boolean | undefined.
|
55
|
+
*
|
56
|
+
* If not provided, the raw value will be converted to a string.
|
57
|
+
*/
|
58
|
+
transform?: (value: Brands[K]) => GroupDisplayValue;
|
59
|
+
/**
|
60
|
+
* Optional function to customize the order of groups in the dropdown.
|
61
|
+
* Takes two group display values and returns:
|
62
|
+
* - Negative number if a should come before b
|
63
|
+
* - Positive number if b should come before a
|
64
|
+
* - Zero if the order doesn't matter
|
65
|
+
*
|
66
|
+
* If not provided, groups will be ordered alphabetically.
|
67
|
+
*/
|
68
|
+
sortGroups?: (a: GroupDisplayValue, b: GroupDisplayValue) => number;
|
69
|
+
} | null;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { default as React } from 'react';
|
2
|
+
export type MonthlySignupsOverviewTableData = {
|
3
|
+
month: string;
|
4
|
+
brand: string;
|
5
|
+
integrationType: string;
|
6
|
+
total: number;
|
7
|
+
finished: number;
|
8
|
+
totalCost?: string;
|
9
|
+
};
|
10
|
+
export type MonthlySignupsOverviewTableProps = {
|
11
|
+
data: MonthlySignupsOverviewTableData[];
|
12
|
+
isLoading: boolean;
|
13
|
+
showTotalCost?: boolean;
|
14
|
+
};
|
15
|
+
export declare const MonthlySignupsOverviewTable: React.FC<MonthlySignupsOverviewTableProps>;
|
@@ -18,11 +18,11 @@ type ChartData = {
|
|
18
18
|
totalCost: string;
|
19
19
|
};
|
20
20
|
};
|
21
|
-
type
|
21
|
+
type MapMonthlySignupsOverviewTableDataParams = {
|
22
22
|
data: ChartData[];
|
23
23
|
brands: Brand[];
|
24
24
|
};
|
25
|
-
export declare const
|
25
|
+
export declare const mapMonthlySignupsOverviewTableData: ({ data, brands, }: MapMonthlySignupsOverviewTableDataParams) => {
|
26
26
|
month: string;
|
27
27
|
brand: string;
|
28
28
|
integrationType: string;
|
@@ -1,3 +1,7 @@
|
|
1
1
|
import { ReactElement } from 'react';
|
2
2
|
import { LegendProps } from 'recharts';
|
3
|
-
|
3
|
+
interface SeriesChartLegendProps extends LegendProps {
|
4
|
+
showUuid?: boolean;
|
5
|
+
}
|
6
|
+
export declare function SeriesChartLegend(props: SeriesChartLegendProps): ReactElement;
|
7
|
+
export {};
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { SignupBigNumbersChartData } from './SignupBigNumbersMapper';
|
2
|
+
export interface SignupBigNumbersProps {
|
3
|
+
chartData: SignupBigNumbersChartData[];
|
4
|
+
isLoading: boolean;
|
5
|
+
hideTotalCost?: boolean;
|
6
|
+
}
|
7
|
+
export declare function SignupBigNumbers({ chartData, isLoading, hideTotalCost, }: Readonly<SignupBigNumbersProps>): React.ReactNode;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
export interface SignupMetrics {
|
2
|
+
totalSignups: number;
|
3
|
+
totalSuccess: number;
|
4
|
+
totalCost: number;
|
5
|
+
successRate: number;
|
6
|
+
}
|
7
|
+
export declare const defaultMetrics: SignupMetrics;
|
8
|
+
export interface SignupBigNumbersChartData {
|
9
|
+
interval?: Array<{
|
10
|
+
oneClickCreated: number;
|
11
|
+
oneClickSuccess: number;
|
12
|
+
date: number;
|
13
|
+
totalCost?: string;
|
14
|
+
}>;
|
15
|
+
brandUuid: string;
|
16
|
+
brandName: string;
|
17
|
+
overall: {
|
18
|
+
oneClickCreated: number;
|
19
|
+
oneClickSuccess: number;
|
20
|
+
totalCost?: string;
|
21
|
+
};
|
22
|
+
}
|
23
|
+
export declare function calculateSignupMetrics(data: SignupBigNumbersChartData[]): SignupMetrics;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './SignupBigNumbers';
|
@@ -10,8 +10,9 @@ export * from './RiskScorePieChart';
|
|
10
10
|
export * from './RiskScoreBarChart';
|
11
11
|
export * from './SimpleLegend';
|
12
12
|
export * from './OneClickPercentageChart';
|
13
|
-
export * from './
|
14
|
-
export * from './
|
13
|
+
export * from './OneClickOverTimeChart';
|
14
|
+
export * from './MonthlySignupsOverviewTable';
|
15
15
|
export * from './LoadingChartSection';
|
16
16
|
export * from './EmptyChartSection';
|
17
17
|
export * from './MetricLastUpdated';
|
18
|
+
export * from './SignupBigNumbers';
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";import{j as a}from"../../shared/jsx-runtime-DHlBLioN.mjs";import*as B from"react";import{useCallback as oe,useMemo as ie,createElement as He,useState as Z,useRef as Xe,useEffect as je}from"react";import{Box as V,Stack as z,Typography as I,useTheme as G,Paper as we,TableContainer as Ye,Table as Je,TableHead as Qe,TableRow as ke,TableCell as N,TableBody as et}from"@mui/material";import{ResponsiveContainer as H,LineChart as tt,CartesianGrid as se,XAxis as le,YAxis as ce,Label as de,Tooltip as ue,Legend as Se,Line as nt,AreaChart as at,Area as rt,ComposedChart as ot,ReferenceLine as Oe,ReferenceArea as Te,Bar as it,Sector as Ce,PieChart as st,Pie as lt,Cell as ct}from"recharts";import{b as $e,c as Ae,u as dt}from"../../shared/uuidColor-Dw38-aYm.mjs";import X,{Decimal as pe}from"decimal.js";import{AnimatePresence as ut}from"framer-motion";import{u as pt}from"../../shared/useCopyToClipboard-BALOSYVW.mjs";import"qrcode";import{u as me}from"../../shared/usePrevious-DyvR1iCQ.mjs";import{a as mt,C as Re}from"../../shared/motions-BBPeWBPV.mjs";import{c as Le,i as ht,_ as Y,s as ft,a as T,d as xt,e as gt,f as yt,h as vt,j as bt,k as jt,l as wt,m as kt,n as St,o as Ot,p as Tt,u as Ct,q as $t,r as At}from"../../shared/index-Cbzc-ZBt.mjs";import{u as Rt}from"../../shared/useCounter-BV32zXDQ.mjs";import{k as De}from"../../shared/formatKebabToPretty-Du43TgPC.mjs";const Lt=["ownerState"],Dt=["variants"],Et=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function Nt(e){return Object.keys(e).length===0}function _t(e){return typeof e=="string"&&e.charCodeAt(0)>96}function he(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Mt=Le(),Ft=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function J({defaultTheme:e,theme:t,themeId:n}){return Nt(t)?e:t[n]||t}function It(e){return e?(t,n)=>n[e]:null}function Q(e,t){let{ownerState:n}=t,r=Y(t,Lt);const i=typeof e=="function"?e(T({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(s=>Q(s,T({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:s=[]}=i;let o=Y(i,Dt);return s.forEach(l=>{let c=!0;typeof l.props=="function"?c=l.props(T({ownerState:n},r,n)):Object.keys(l.props).forEach(u=>{n?.[u]!==l.props[u]&&r[u]!==l.props[u]&&(c=!1)}),c&&(Array.isArray(o)||(o=[o]),o.push(typeof l.style=="function"?l.style(T({ownerState:n},r,n)):l.style))}),o}return i}function Gt(e={}){const{themeId:t,defaultTheme:n=Mt,rootShouldForwardProp:r=he,slotShouldForwardProp:i=he}=e,s=o=>xt(T({},o,{theme:J(T({},o,{defaultTheme:n,themeId:t}))}));return s.__mui_systemSx=!0,(o,l={})=>{ht(o,g=>g.filter(k=>!(k!=null&&k.__mui_systemSx)));const{name:c,slot:u,skipVariantsResolver:m,skipSx:h,overridesResolver:p=It(Ft(u))}=l,f=Y(l,Et),O=m!==void 0?m:u&&u!=="Root"&&u!=="root"||!1,y=h||!1;let j,v=he;u==="Root"||u==="root"?v=r:u?v=i:_t(o)&&(v=void 0);const b=ft(o,T({shouldForwardProp:v,label:j},f)),w=g=>typeof g=="function"&&g.__emotion_real!==g||gt(g)?k=>Q(g,T({},k,{theme:J({theme:k.theme,defaultTheme:n,themeId:t})})):g,$=(g,...k)=>{let E=w(g);const C=k?k.map(w):[];c&&p&&C.push(d=>{const x=J(T({},d,{defaultTheme:n,themeId:t}));if(!x.components||!x.components[c]||!x.components[c].styleOverrides)return null;const S=x.components[c].styleOverrides,F={};return Object.entries(S).forEach(([_,L])=>{F[_]=Q(L,T({},d,{theme:x}))}),p(d,F)}),c&&!O&&C.push(d=>{var x;const S=J(T({},d,{defaultTheme:n,themeId:t})),F=S==null||(x=S.components)==null||(x=x[c])==null?void 0:x.variants;return Q({variants:F},T({},d,{theme:S}))}),y||C.push(s);const R=C.length-k.length;if(Array.isArray(g)&&R>0){const d=new Array(R).fill("");E=[...g,...d],E.raw=[...g.raw,...d]}const A=b(E,...C);return o.muiName&&(A.muiName=o.muiName),A};return b.withConfig&&($.withConfig=b.withConfig),$}}const Pt=Gt(),Wt=(e,t)=>e.filter(n=>t.includes(n)),U=(e,t,n)=>{const r=e.keys[0];Array.isArray(t)?t.forEach((i,s)=>{n((o,l)=>{s<=e.keys.length-1&&(s===0?Object.assign(o,l):o[e.up(e.keys[s])]=l)},i)}):t&&typeof t=="object"?(Object.keys(t).length>e.keys.length?e.keys:Wt(e.keys,Object.keys(t))).forEach(i=>{if(e.keys.indexOf(i)!==-1){const s=t[i];s!==void 0&&n((o,l)=>{r===i?Object.assign(o,l):o[e.up(i)]=l},s)}}):(typeof t=="number"||typeof t=="string")&&n((i,s)=>{Object.assign(i,s)},t)};function P(e){return e?`Level${e}`:""}function K(e){return e.unstable_level>0&&e.container}function Ee(e){return function(t){return`var(--Grid-${t}Spacing${P(e.unstable_level)})`}}function fe(e){return function(t){return e.unstable_level===0?`var(--Grid-${t}Spacing)`:`var(--Grid-${t}Spacing${P(e.unstable_level-1)})`}}function xe(e){return e.unstable_level===0?"var(--Grid-columns)":`var(--Grid-columns${P(e.unstable_level-1)})`}const Bt=({theme:e,ownerState:t})=>{const n=Ee(t),r={};return U(e.breakpoints,t.gridSize,(i,s)=>{let o={};s===!0&&(o={flexBasis:0,flexGrow:1,maxWidth:"100%"}),s==="auto"&&(o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),typeof s=="number"&&(o={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${s} / ${xe(t)}${K(t)?` + ${n("column")}`:""})`}),i(r,o)}),r},Vt=({theme:e,ownerState:t})=>{const n={};return U(e.breakpoints,t.gridOffset,(r,i)=>{let s={};i==="auto"&&(s={marginLeft:"auto"}),typeof i=="number"&&(s={marginLeft:i===0?"0px":`calc(100% * ${i} / ${xe(t)})`}),r(n,s)}),n},zt=({theme:e,ownerState:t})=>{if(!t.container)return{};const n=K(t)?{[`--Grid-columns${P(t.unstable_level)}`]:xe(t)}:{"--Grid-columns":12};return U(e.breakpoints,t.columns,(r,i)=>{r(n,{[`--Grid-columns${P(t.unstable_level)}`]:i})}),n},Ut=({theme:e,ownerState:t})=>{if(!t.container)return{};const n=fe(t),r=K(t)?{[`--Grid-rowSpacing${P(t.unstable_level)}`]:n("row")}:{};return U(e.breakpoints,t.rowSpacing,(i,s)=>{var o;i(r,{[`--Grid-rowSpacing${P(t.unstable_level)}`]:typeof s=="string"?s:(o=e.spacing)==null?void 0:o.call(e,s)})}),r},qt=({theme:e,ownerState:t})=>{if(!t.container)return{};const n=fe(t),r=K(t)?{[`--Grid-columnSpacing${P(t.unstable_level)}`]:n("column")}:{};return U(e.breakpoints,t.columnSpacing,(i,s)=>{var o;i(r,{[`--Grid-columnSpacing${P(t.unstable_level)}`]:typeof s=="string"?s:(o=e.spacing)==null?void 0:o.call(e,s)})}),r},Kt=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return U(e.breakpoints,t.direction,(r,i)=>{r(n,{flexDirection:i})}),n},Zt=({ownerState:e})=>{const t=Ee(e),n=fe(e);return T({minWidth:0,boxSizing:"border-box"},e.container&&T({display:"flex",flexWrap:"wrap"},e.wrap&&e.wrap!=="wrap"&&{flexWrap:e.wrap},{margin:`calc(${t("row")} / -2) calc(${t("column")} / -2)`},e.disableEqualOverflow&&{margin:`calc(${t("row")} * -1) 0px 0px calc(${t("column")} * -1)`}),(!e.container||K(e))&&T({padding:`calc(${n("row")} / 2) calc(${n("column")} / 2)`},(e.disableEqualOverflow||e.parentDisableEqualOverflow)&&{padding:`${n("row")} 0px 0px ${n("column")}`}))},Ht=e=>{const t=[];return Object.entries(e).forEach(([n,r])=>{r!==!1&&r!==void 0&&t.push(`grid-${n}-${String(r)}`)}),t},Xt=(e,t="xs")=>{function n(r){return r===void 0?!1:typeof r=="string"&&!Number.isNaN(Number(r))||typeof r=="number"&&r>0}if(n(e))return[`spacing-${t}-${String(e)}`];if(typeof e=="object"&&!Array.isArray(e)){const r=[];return Object.entries(e).forEach(([i,s])=>{n(s)&&r.push(`spacing-${i}-${String(s)}`)}),r}return[]},Yt=e=>e===void 0?[]:typeof e=="object"?Object.entries(e).map(([t,n])=>`direction-${t}-${n}`):[`direction-xs-${String(e)}`],Jt=["className","children","columns","container","component","direction","wrap","spacing","rowSpacing","columnSpacing","disableEqualOverflow","unstable_level"],Qt=Le(),en=Pt("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function tn(e){return wt({props:e,name:"MuiGrid",defaultTheme:Qt})}function nn(e={}){const{createStyledComponent:t=en,useThemeProps:n=tn,componentName:r="MuiGrid"}=e,i=B.createContext(void 0),s=(c,u)=>{const{container:m,direction:h,spacing:p,wrap:f,gridSize:O}=c,y={root:["root",m&&"container",f!=="wrap"&&`wrap-xs-${String(f)}`,...Yt(h),...Ht(O),...m?Xt(p,u.breakpoints.keys[0]):[]]};return kt(y,j=>St(r,j),{})},o=t(zt,qt,Ut,Bt,Kt,Zt,Vt),l=B.forwardRef(function(c,u){var m,h,p,f,O,y,j,v;const b=yt(),w=n(c),$=vt(w),g=B.useContext(i),{className:k,children:E,columns:C=12,container:R=!1,component:A="div",direction:d="row",wrap:x="wrap",spacing:S=0,rowSpacing:F=S,columnSpacing:_=S,disableEqualOverflow:L,unstable_level:D=0}=$,ae=Y($,Jt);let q=L;D&&L!==void 0&&(q=c.disableEqualOverflow);const ge={},ye={},ve={};Object.entries(ae).forEach(([M,W])=>{b.breakpoints.values[M]!==void 0?ge[M]=W:b.breakpoints.values[M.replace("Offset","")]!==void 0?ye[M.replace("Offset","")]=W:ve[M]=W});const ze=(m=c.columns)!=null?m:D?void 0:C,Ue=(h=c.spacing)!=null?h:D?void 0:S,qe=(p=(f=c.rowSpacing)!=null?f:c.spacing)!=null?p:D?void 0:F,Ke=(O=(y=c.columnSpacing)!=null?y:c.spacing)!=null?O:D?void 0:_,be=T({},$,{level:D,columns:ze,container:R,direction:d,wrap:x,spacing:Ue,rowSpacing:qe,columnSpacing:Ke,gridSize:ge,gridOffset:ye,disableEqualOverflow:(j=(v=q)!=null?v:g)!=null?j:!1,parentDisableEqualOverflow:g}),Ze=s(be,b);let re=a.jsx(o,T({ref:u,as:A,ownerState:be,className:bt(Ze.root,k)},ve,{children:B.Children.map(E,M=>{if(B.isValidElement(M)&&jt(M,["Grid"])){var W;return B.cloneElement(M,{unstable_level:(W=M.props.unstable_level)!=null?W:D+1})}return M})}));return q!==void 0&&q!==(g??!1)&&(re=a.jsx(i.Provider,{value:q,children:re})),re});return l.muiName="Grid",l}const Ne=nn({createStyledComponent:Ot("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(e,t)=>t.root}),componentName:"MuiGrid2",useThemeProps:e=>Tt({props:e,name:"MuiGrid2"})});function an({entry:e,payload:t}){const n=oe(h=>{var p,f,O;return(O=(f=(p=h.payload)==null?void 0:p.data)==null?void 0:f.reduce)==null?void 0:O.call(f,(y,j)=>y+j.value,0)},[]),r=oe(h=>{const p=new pe(n(h)||0),f=t?.reduce((j,v)=>j+n(v),0)||0,O=new pe(f),y=Number(p.div(O).times(100).toFixed(2,pe.ROUND_DOWN));return isNaN(y)||!isFinite(y)?0:y},[n,t]),i=ie(()=>n(e),[e,n]),s=me(i),o=ie(()=>Number(r(e)),[e,r]),l=me(o),c=oe(h=>Math.floor(h).toLocaleString(),[]),u=pt({type:"text/plain"}),m=Ct();return a.jsxs(mt,{component:"li",direction:"row",spacing:1,sx:{color:e.color},layout:"position",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:[a.jsx(V,{sx:{width:"3px",height:"100%",backgroundColor:e.color,borderRadius:3}}),a.jsxs(z,{children:[a.jsxs(I,{component:"p",variant:"caption",children:[a.jsx(z,{component:"span",display:"inline-flex",mr:.5,children:a.jsx(Re,{from:s??0,to:i,map:c,children:"0"})}),a.jsxs(z,{component:"span",direction:"row",display:"inline-flex",children:["(",a.jsx(Re,{from:l??0,to:o,map:c,children:"0"}),"%)"]})]}),a.jsx(I,{variant:"body1",children:e.value}),e.payload.integrationType&&a.jsx(I,{variant:"body2",children:e.payload.integrationType}),e.payload.uuid&&a.jsxs(I,{variant:"body2",sx:{cursor:"pointer","&:hover":{textDecoration:"underline"}},onClick:()=>{u.copy(e.payload.uuid).catch(()=>{}),m.enqueueSnackbar("UUID copied to clipboard","success")},children:[e.payload.uuid.slice(0,5),"..."]})]})]})}function _e(e){const{payload:t}=e;return a.jsx(Ne,{container:!0,direction:"row",component:"ul",gap:2,sx:{mt:2,justifyContent:"flex-start",alignItem:"center",flexWrap:"wrap"},children:a.jsx(ut,{children:t?.map(n=>a.jsx(Ne,{children:a.jsx(an,{entry:n,payload:t})},`item-${n.value}`))})})}function Me(e){const t=G();return a.jsx(V,{sx:{width:"100%",height:"100%",...e.sx},children:a.jsx(H,{children:a.jsxs(tt,{width:500,height:300,margin:{top:5,right:60,left:20,bottom:5},children:[a.jsx(se,{vertical:!1}),a.jsx(le,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:n=>$e(n,{timeZone:e.filter.timezone,hour12:!1,hour:"numeric"}),allowDuplicatedCategory:!1,tickLine:!1,fontSize:12,tickMargin:12}),a.jsx(ce,{textAnchor:"end",dataKey:"value",tickLine:!1,tickFormatter:n=>Number(n).toLocaleString(),allowDecimals:!1,domain:[1,"dataMax"],children:e.label&&a.jsx(de,{value:e.label,angle:-90,position:"insideLeft",style:{textAnchor:"middle"}})}),a.jsx(ue,{cursor:{stroke:t.palette.neutral.main,strokeWidth:1},formatter:n=>Number(n).toLocaleString(),labelFormatter:n=>Ae(n,{timeZone:e.filter.timezone,hour12:!1})}),a.jsx(Se,{content:a.jsx(_e,{})}),e.data.map(n=>He(nt,{uuid:n.uuid,integrationType:n.integrationType,key:n.uuid,name:n.name,dataKey:"value",data:n.chartData,type:"monotone",stroke:n.color,strokeWidth:2}))]})})})}const rn=(e,t)=>{const n=new Map;return e.forEach(r=>{r.chartData.forEach(i=>{const s=new Date(i.date).getTime().toString();if(!n.has(s)){const o={date:s,total:0,diff:0,totalKey:"",originalTotal:0};t.forEach(({key:l})=>{o[l]=0,o[`${l}_absolute`]=0}),n.set(s,o)}t.forEach(({key:o})=>{const l=n.get(s),c=i[o],u=typeof c=="string"?c.trim()===""?0:parseInt(c,10):typeof c=="number"?c:0;l[`${o}_absolute`]=u,l[o]=0})})}),Array.from(n.values()).map(r=>{var i;const s=(i=t.find(c=>c.isTotal))==null?void 0:i.key,o=t.filter(c=>!c.isTotal).map(c=>c.key);if(!s||o.length===0)return r;const l=r[`${s}_absolute`];return r.originalTotal=l,r.total=l,r[s]=100,o.forEach(c=>{const u=r[`${c}_absolute`],m=l>0?new X(u.toString()).div(l).mul(100).toFixed(2,X.ROUND_DOWN):"0.00";r[c]=parseFloat(m)}),{...r,totalKey:s}}).sort((r,i)=>parseInt(r.date)-parseInt(i.date))};function Fe(e){const t=G(),n=ie(()=>e.data?rn(e.data,e.keyValues):[],[e.data,e.keyValues]);return a.jsx(V,{sx:{width:"100%",height:"100%",...e.sx},children:a.jsx(H,{width:"100%",height:"100%",children:a.jsxs(at,{data:n,width:500,height:300,margin:{top:5,right:60,left:20,bottom:5},children:[a.jsx(se,{strokeDasharray:"3 3"}),a.jsx(le,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:r=>$e(r,{timeZone:e.filter.timezone,hour12:!1,hour:"numeric"}),allowDuplicatedCategory:!1,tickLine:!1,fontSize:12,tickMargin:12}),a.jsx(ce,{textAnchor:"end",tickLine:!1,tickFormatter:r=>`${r.toFixed(2)}%`}),a.jsx(ue,{cursor:{stroke:t.palette.neutral.main,strokeWidth:1},labelFormatter:r=>Ae(r,{timeZone:e.filter.timezone,hour12:!1}),formatter:(r,i,s)=>{const o=s.payload.totalKey,l=s.dataKey,c=l===o,u=s.payload[`${l}_absolute`],m=s.payload.originalTotal,h=c?null:m===0?"0.00":new X(u.toString()).div(m).mul(100).toFixed(2,X.ROUND_DOWN);return[h?`${u.toLocaleString()} (${h}%)`:`${u.toLocaleString()} (TOTAL)`,i]}}),e.keyValues.sort((r,i)=>r.isTotal?-1:i.isTotal?1:0).map(r=>a.jsx(rt,{type:"monotone",dataKey:r.key,name:r.name,stroke:r.color,fill:r.color,strokeWidth:2,fillOpacity:.6},r.key))]})})})}function on(e){const t=me(e.value),{ref:n}=Rt({from:t??0,to:e.value,duration:1,map:e.map});return a.jsx(we,{sx:{p:3,flex:1,...e.sx},children:a.jsxs(z,{spacing:1,alignItems:"center",children:[a.jsx(I,{ref:n,variant:"h4",fontWeight:"bold",children:e.initialValue}),a.jsx(I,{color:"text.secondary",children:e.label})]})})}const Ie={margin:{top:5,right:30,left:20,bottom:5}},sn={tickLine:!1,fontSize:12,tickMargin:12},ln={textAnchor:"end",tickLine:!1};function ee({data:e,series:t,xAxis:n,yAxis:r,tooltip:i,bar:s,referenceLines:o,referenceAreas:l,sx:c}){const u=G(),m=p=>!p.isFront,h=p=>!!p.isFront;return a.jsx(V,{sx:{width:"100%",height:"100%",...c},children:a.jsx(H,{children:a.jsxs(ot,{data:e,...Ie,children:[a.jsx(se,{strokeDasharray:"3 3",vertical:!1}),a.jsx(le,{...sn,...n}),a.jsx(ce,{...ln,...r}),a.jsx(ue,{cursor:{stroke:u.palette.neutral.main,strokeWidth:1},...i}),o?.filter(m).map((p,f)=>a.jsx(Oe,{...p},p.label??f)),l?.filter(m).map((p,f)=>a.jsx(Te,{...p},p.label??f)),t.map(p=>a.jsx(it,{name:p.key,dataKey:p.dataKey,fill:p.color,stackId:"stack",isAnimationActive:!1,...s},p.key)),o?.filter(h).map((p,f)=>a.jsx(Oe,{...p},p.label??f)),l?.filter(h).map((p,f)=>a.jsx(Te,{...p},p.label??f))]})})})}function cn({data:e,threshold:t=100,sx:n}){const r=G(),i=Object.entries(e??{}).map(([o,l])=>({key:o,[o]:l})),s=i.map(({key:o})=>({key:o,dataKey:o,color:r.palette.error.light}));return a.jsx(ee,{sx:n,data:i,series:s,xAxis:{tickLine:!1,dataKey:"key"},yAxis:{tickLine:!1,domain:[0,`dataMax + ${t}`]},tooltip:{labelFormatter:o=>"Total"},referenceLines:[{y:t,stroke:r.palette.error.dark,strokeDasharray:"3 3",label:a.jsx(de,{value:"Unhealthy threshold",position:"insideBottomRight"}),isFront:!0}]})}function dn({data:e,threshold:t=100,sx:n}){const r=G(),i=Object.entries(e??{}).map(([o,l])=>({key:o,[o]:l})),s=i.map(({key:o})=>({key:o,dataKey:o,color:r.palette.warning.light}));return a.jsx(ee,{sx:n,data:i,series:s,xAxis:{tickLine:!1,dataKey:"key"},yAxis:{tickLine:!1,domain:[0,`dataMax + ${t}`]},tooltip:{labelFormatter:o=>"Total"},referenceLines:[{y:t,stroke:r.palette.error.dark,strokeDasharray:"3 3",label:a.jsx(de,{value:"Unhealthy threshold",position:"insideBottomRight"}),isFront:!0}]})}function Ge({payload:e=[],hiddenItems:t,onToggle:n,legendLabel:r}){return a.jsx(V,{sx:{display:"flex",justifyContent:"center",gap:"20px",paddingTop:"20px"},children:e.map((i,s)=>{const o=t.has(i.payload.name);return a.jsxs("div",{style:{display:"flex",alignItems:"center",cursor:"pointer",opacity:o?.4:1},onClick:()=>{n?.(i.payload)},children:[a.jsx("div",{style:{width:"12px",height:"12px",backgroundColor:i.color,marginRight:"8px",borderRadius:"2px"}}),a.jsx("span",{style:{color:i.color},children:r?`${r}: ${i.value}`:i.value})]},`legend-${s}`)})})}const un=e=>{const t=Math.PI/180,{cx:n,cy:r,midAngle:i,innerRadius:s,outerRadius:o,startAngle:l,endAngle:c,fill:u,payload:m,percent:h,value:p,valueText:f,valuePercentage:O,needleVisible:y,customText:j,allActive:v}=e,b=Math.sin(-t*i),w=Math.cos(-t*i),$=n+(o+5)*w,g=r+(o+5)*b,k=n+(o+15)*w,E=r+(o+15)*b,C=k+(w>=0?1:-1)*22,R=E,A=w>=0?"start":"end",d=p.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0}),x=()=>y||v?null:a.jsx("text",{x:n,y:r,dy:8,textAnchor:"middle",fill:"#333",fontSize:14,children:m.name});return a.jsxs("g",{children:[x(),a.jsx(Ce,{cx:n,cy:r,innerRadius:s,outerRadius:o,startAngle:l,endAngle:c,fill:u}),a.jsx(Ce,{cx:n,cy:r,startAngle:l,endAngle:c,innerRadius:o+2,outerRadius:o+6,fill:u}),a.jsx("path",{d:`M${$},${g}L${k},${E}L${C},${R}`,stroke:u,fill:"none"}),a.jsx("circle",{cx:C,cy:R,r:2,fill:u,stroke:"none"}),a.jsx("text",{x:C+(w>=0?1:-1)*12,y:R,textAnchor:A,fill:"#333",fontSize:12,children:j||(f?`${f} ${d}`:d)}),O&&a.jsxs("text",{x:C+(w>=0?1:-1)*12,y:R,dy:16,textAnchor:A,fill:"#999",fontSize:11,children:[`${(h*100).toFixed(2)}%`," (",d,")"]})]})},pn=e=>{const{value:t,data:n,color:r,innerRadius:i,outerRadius:s,boxDimensions:o,legendDimensions:l,valueText:c}=e,u=Math.PI/180;let m=0;n.forEach(x=>{m+=x.value});const h=o?o.width/2:150,p=(o?o.height/2:200)-l.height/2,f=180*(1-Math.max(0,Math.min(1,t/m))),O=(Number(i)+2*Number(s))/3,y=Math.sin(-u*f),j=Math.cos(-u*f),v=5,b=h-v,w=p,$=b+v*y,g=w-v*j,k=b-v*y,E=w+v*j,C=b+O*j,R=w+O*y,A=t.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0}),d=c??A;return a.jsxs(a.Fragment,{children:[a.jsx("circle",{cx:b,cy:w,r:v,fill:r,stroke:"none",style:{pointerEvents:"none"}},"needle-circle"),a.jsx("path",{d:`M${$} ${g}L${k} ${E} L${C} ${R} L${$} ${g}`,stroke:"none",fill:r,style:{pointerEvents:"none"}},"needle-path"),a.jsx("text",{x:b+v,y:w+26,textAnchor:"middle",fill:"#333",fontSize:12,children:d},"needle-value")]})},mn=(e,t)=>({Allow:t.palette.success.main,Flag:t.palette.warning.main,Block:t.palette.error.main})[e]??t.palette.primary.main;function Pe({data:e,sx:t,legendLabel:n,legendToggle:r=!1,valueText:i="",valuePercentage:s=!0,pie:o,needleVisible:l=!1,needleValue:c,needleColor:u="#aaa",allActive:m=!1}){const{innerRadius:h=60,outerRadius:p=100}=o??{},f=G(),[O,y]=Z(void 0),[j,v]=Z(new Set),b=Xe(null),[w,$]=Z(null),[g,k]=Z(null),E=(d,x)=>{m||y(x)},C=()=>{m||y(void 0)},R=d=>{r&&d&&v(x=>{const S=new Set(x);return S.has(d.name)?S.delete(d.name):S.size<e.length-1&&S.add(d.name),S})},A=e.map((d,x)=>({...d,index:x,value:j.has(d.name)?0:d.value}));return je(()=>{const d=b.current;if(!d)return;const x=new ResizeObserver(F=>{var _;const L=(_=F[0])==null?void 0:_.contentRect;L&&$(L)});x.observe(d);const S=d.getBoundingClientRect();return $(S),()=>{x.disconnect()}},[]),je(()=>{var d;const x=(d=b.current)==null?void 0:d.querySelector(".recharts-legend-wrapper");if(!x){const _=setInterval(()=>{var L;const D=(L=b.current)==null?void 0:L.querySelector(".recharts-legend-wrapper");if(D){const ae=D.getBoundingClientRect();k(ae),clearInterval(_)}},100);return()=>{clearInterval(_)}}const S=new ResizeObserver(_=>{var L;const D=(L=_[0])==null?void 0:L.contentRect;D&&k(D)});S.observe(x);const F=x.getBoundingClientRect();return k(F),()=>{S.disconnect()}},[]),a.jsx(V,{ref:b,sx:{width:"100%",height:"100%","& g":{outline:"none"},...t},children:a.jsx(H,{children:a.jsxs(st,{...Ie,children:[a.jsx(lt,{data:A,nameKey:"name",dataKey:"value",innerRadius:h,outerRadius:p,activeIndex:m?A.filter(d=>d.value>0).map(d=>d.index):O,activeShape:d=>un({...d,valueText:i,valuePercentage:s,needleVisible:l,allActive:m}),paddingAngle:0,onMouseEnter:E,onMouseLeave:C,...o,children:A.map(d=>a.jsx(ct,{fill:d.color??mn(d.name,f),opacity:j.has(d.name)?.5:1,stroke:"none"},d.name))}),a.jsx(Se,{content:a.jsx(Ge,{legendLabel:n,hiddenItems:j,onToggle:R})}),l&&c!==void 0&&w&&g&&pn({data:A,value:c,color:u,innerRadius:h,outerRadius:p,boxDimensions:w,legendDimensions:g,valueText:i})]})})})}function hn({sx:e,data:t,score:n=200,legendLabel:r}){const i=G(),s=[{name:"Allow",customText:"0-299",value:t[0].value,color:i.palette.primary.main},{name:"Flag",customText:"300-599",value:t[1].value,color:i.palette.warning.main},{name:"Block",customText:"Over 600",value:t[2].value,color:i.palette.error.main}];return a.jsx(Pe,{data:s,legendToggle:!0,needleValue:n,legendLabel:r,allActive:!0,sx:e})}function fn({data:e,sx:t}){const n=G(),r=(s=>{const o={};return s.forEach(l=>{Object.entries(l).forEach(([c,u])=>{const m=parseInt(c);m<=1e3&&(o[m]=(o[m]||0)+u)})}),Array.from({length:1001},(l,c)=>({key:c.toString(),value:o[c]||0}))})(e),i=[{key:"Risk Score",dataKey:"value",color:n.palette.error.main}];return a.jsx(ee,{data:r,series:i,sx:t,yAxis:{label:{value:"Count",angle:-90,position:"insideLeft"},domain:[0,"dataMax + 10"]},xAxis:{domain:[0,"dataMax"],interval:"preserveStartEnd"},tooltip:{labelFormatter:()=>"Risk Score",formatter:(s,o,l)=>[s,l.payload.key]},referenceAreas:[{x1:0,x2:299,fill:"#ffffff00",isFront:!1,label:"Allow"},{x1:300,x2:600,fill:n.palette.warning.light,isFront:!1,label:"Flag"},{x1:600,fill:n.palette.error.light,isFront:!1,label:"Block"}]})}const We=()=>({regularChartWrapper:{justifyContent:"center",alignItems:"center",width:"100%",height:500},smallChartWrapper:{justifyContent:"center",alignItems:"center",width:"100%",height:300}});function Be(e){return a.jsx(I,{variant:"h6",fontWeight:"900",...e})}function Ve(e){return a.jsx(I,{variant:"h6",fontWeight:"400",...e})}function te(){const e=We();return a.jsxs(z,{sx:e.smallChartWrapper,children:[a.jsx(Be,{children:"No data available for the selected period and brands"}),a.jsx(Ve,{children:"Please select a different period or brand"})]})}function ne(){const e=We();return a.jsxs(z,{sx:e.smallChartWrapper,children:[a.jsx(Be,{children:"Loading..."}),a.jsx(Ve,{children:"Preparing your chart data"})]})}function xn({data:e,isLoading:t,isFetching:n,isSuccess:r,filter:i,sx:s}){var o,l;const c=G(),u={oneClickCreated:{key:"oneClickCreated",name:"Started",color:c.palette.neutral.main,isTotal:!0},oneClickSuccess:{key:"oneClickSuccess",name:"Finished",color:c.palette.primary.main}};return t?a.jsx(ne,{}):!e.length||!((l=(o=e[0])==null?void 0:o.chartData)!=null&&l.length)||!r?a.jsx(te,{}):a.jsx(Fe,{data:e,keyValues:Object.values(u),filter:i,sx:{opacity:n?.4:1,...s}})}const gn={chartWrapper:{justifyContent:"center",alignItems:"center",width:"100%",height:500}};function yn({data:e,isLoading:t,isFetching:n,isSuccess:r,filter:i}){return t?a.jsx(ne,{}):!e.length||!r?a.jsx(te,{}):a.jsx(Me,{label:"Uniques",data:e,filter:i,sx:{...gn.chartWrapper,opacity:n?.4:1}})}function vn(e){const{brands:t,data:n,keyValue:r,defaultColor:i}=e,s=t.flatMap(({_raw:o})=>{var l,c;const u=n?.find(h=>h.brandUuid===o.brandUuid),m=(u?.interval??[]).map(h=>({date:+new Date(h.date),value:Number(h[r]||0)})).filter(h=>h.value>0);return{uuid:o.brandUuid,name:o.brandName,integrationType:De(o.integrationType),color:o.integrationType==="hosted"&&(l=o.additionalData)!=null&&l.primaryColor?(c=o.additionalData)==null?void 0:c.primaryColor:i??dt(o.brandUuid),chartData:m}});return $t.chain(s).sortBy(o=>o.name).toArray().value()}const bn=({data:e,brands:t})=>e.flatMap(n=>{const r=t.find(i=>i.brandUuid===n.brandUuid);return!r||!n.interval?[]:n.interval.map(i=>({month:new Date(i.date).toISOString(),brand:r.brandName,integrationType:De(r.integrationType),total:i.oneClickCreated,finished:i.oneClickSuccess,totalCost:i.totalCost}))}),jn=({data:e,isLoading:t,showTotalCost:n=!0})=>t?a.jsx(ne,{}):e!=null&&e.length?a.jsx(Ye,{component:we,children:a.jsxs(Je,{children:[a.jsx(Qe,{children:a.jsxs(ke,{children:[a.jsx(N,{children:"Month"}),a.jsx(N,{children:"Brand"}),a.jsx(N,{children:"Integration Type"}),a.jsx(N,{align:"right",children:"Started"}),a.jsx(N,{align:"right",children:"Finished"}),n&&a.jsx(N,{align:"right",children:"Total Cost"})]})}),a.jsx(et,{children:e.map(r=>a.jsxs(ke,{children:[a.jsx(N,{children:new Date(r.month).toLocaleDateString(void 0,{month:"short",year:"numeric",timeZone:"UTC"})}),a.jsx(N,{children:r.brand}),a.jsx(N,{children:r.integrationType}),a.jsx(N,{align:"right",children:r.total}),a.jsx(N,{align:"right",children:r.finished}),n&&a.jsx(N,{align:"right",children:r.totalCost??"-"})]},`${r.brand}-${r.month}`))})]})}):a.jsx(te,{});function wn({lastUpdated:e}){return a.jsxs(I,{variant:"caption",color:"text.secondary",fontWeight:"600",children:["The data was last updated on"," ",At(e??Date.now(),{hour12:!1}),"."]})}export{on as BigNumber,te as EmptyChartSection,cn as ErrorCodesChart,ne as LoadingChartSection,wn as MetricLastUpdated,jn as MonthlyBillableSignupsTable,yn as OneClickOverTimeChart,xn as OneClickPercentageChart,Pe as PieChart,dn as ReasonCodesChart,fn as RiskScoreBarChart,hn as RiskScorePieChart,Me as SeriesChart,_e as SeriesChartLegend,Fe as SeriesPercentageChart,ee as SimpleBarChart,Ge as SimpleLegend,bn as mapMonthlyBillableSignupsData,vn as mapTimeSeriesData};
|
1
|
+
"use strict";import{B as a,i as s,E as e,L as r,j as i,M as t,g as C,O as h,P as n,R as o,e as S,d as m,S as g,a as p,b as c,k as d,c as l,f as O,h as b,m as k}from"../../shared/SignupBigNumbers-K1v6XoXN.mjs";export{a as BigNumber,s as EmptyChartSection,e as ErrorCodesChart,r as LoadingChartSection,i as MetricLastUpdated,t as MonthlySignupsOverviewTable,C as OneClickOverTimeChart,h as OneClickPercentageChart,n as PieChart,o as ReasonCodesChart,S as RiskScoreBarChart,m as RiskScorePieChart,g as SeriesChart,p as SeriesChartLegend,c as SeriesPercentageChart,d as SignupBigNumbers,l as SimpleBarChart,O as SimpleLegend,b as mapMonthlySignupsOverviewTableData,k as mapTimeSeriesData};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";import{A as a,c as s,l as e,B as
|
1
|
+
"use strict";import{A as a,c as s,l as e,B as r,n as t,m as n,C as i,D as o,f as p,E as c,j as m,F as u,I as d,b as h,L as C,O as S,h as l,e as g,P,Q as B,R as I,S as k,d as b,k as T,T as L,g as O,a as y,V as R,i as f,t as v,u as E}from"../shared/index-9gHtH_UR.mjs";import{a as D,b as A,P as F,S as N}from"../shared/PageSectionHeader-DdpDhBZG.mjs";import{B as M,C as x,i as H,E as W,L as j,j as w,M as Q,g as V,O as q,P as z,R as U,e as G,d as J,S as K,a as X,b as Y,k as Z,c as _,f as $,W as aa,h as sa,m as ea,u as ra}from"../shared/SignupBigNumbers-K1v6XoXN.mjs";import{SnackbarProvider as ta}from"notistack";export{a as AcceptTermsNotice,s as Alert,e as Backdrop,r as Banner,M as BigNumber,t as BrandFilterInput,n as Button,i as CredentialRequestsEditor,x as CustomAlertComponent,o as DateInput,p as DateRangeInput,c as EmailInput,H as EmptyChartSection,W as ErrorCodesChart,m as ExactBirthdayBanner,u as FullWidthAlert,d as Image,h as LegalLink,C as LinkButton,j as LoadingChartSection,w as MetricLastUpdated,Q as MonthlySignupsOverviewTable,S as OTPInput,l as OneClickForm,V as OneClickOverTimeChart,q as OneClickPercentageChart,D as PageHeader,A as PageSectionHeader,F as Paragraph,g as PhoneInput,z as PieChart,P as PrivacyPolicyNotice,B as QRCodeDisplay,U as ReasonCodesChart,I as ResendPhoneBanner,G as RiskScoreBarChart,J as RiskScorePieChart,k as SSNInput,N as SectionHeader,b as SelectInput,K as SeriesChart,X as SeriesChartLegend,Y as SeriesPercentageChart,Z as SignupBigNumbers,_ as SimpleBarChart,$ as SimpleLegend,ta as SnackbarProvider,T as TestPhoneNumbersBanner,L as TextButton,O as TimezoneInput,y as Typography,R as VerifiedImage,f as VerifiedIncLogo,aa as When,sa as mapMonthlySignupsOverviewTableData,ea as mapTimeSeriesData,v as toOption,E as useBrandFilterInput,ra as useSnackbar};
|
package/dist/hooks/index.mjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";import{b as s,d as a,a as e,j as
|
1
|
+
"use strict";import{b as s,d as a,a as e,j as u,u as o,e as r,c as i,f as t,g as l,h as c,i as m}from"../shared/useIntersectionObserver-CbpWuEs0.mjs";import{u as p,a as n}from"../shared/useCopyToClipboard-_Ur9Q8Gv.mjs";import{a as d,u as C}from"../shared/useOnClickOutside-P5GTcgh8.mjs";import{u as b}from"../shared/useCounter-BV32zXDQ.mjs";export{s as useCallbackRef,p as useCopyToClipboard,b as useCounter,a as useDebounceValue,e as useDisclosure,u as useIntersectionObserver,o as useLocalStorage,d as useOnClickOutside,n as usePrevious,C as useQRCode,r as useScript,i as useSearchParams,t as useThrottle,l as useToggle,c as useWindowScroll,m as useWindowSize};
|
package/dist/index.mjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";import{A as e,c as t,l as r,B as o,n,m as
|
1
|
+
"use strict";import{A as e,c as t,l as r,B as o,n as i,m as n,C as m,D as l,f as u,E as c,j as d,F as p,I as h,b as S,L as g,O as C,h as f,e as k,P,Q as y,R as b,S as B,d as D,k as T,T as I,g as w,a as v,V as O,i as R,o as L,q as N,r as M,w as E,p as x,s as F,t as Y,u as A,v as W}from"./shared/index-9gHtH_UR.mjs";import{a as z,b as G,P as U,S as j}from"./shared/PageSectionHeader-DdpDhBZG.mjs";import{B as H,C as V,i as Q,E as q,L as $,j as K,M as X,g as Z,O as _,P as J,R as aa,e as sa,d as ea,S as ta,a as ra,b as oa,k as ia,c as na,f as ma,W as la,l as ua,o as ca,n as da,p as pa,h as ha,m as Sa,u as ga,q as Ca}from"./shared/SignupBigNumbers-K1v6XoXN.mjs";import{b as fa,d as ka,a as Pa,j as ya,u as ba,e as Ba,c as Da,f as Ta,g as Ia,h as wa,i as va}from"./shared/useIntersectionObserver-CbpWuEs0.mjs";import{u as Oa,a as Ra}from"./shared/useCopyToClipboard-_Ur9Q8Gv.mjs";import{a as La,u as Na}from"./shared/useOnClickOutside-P5GTcgh8.mjs";import{u as Ma}from"./shared/useCounter-BV32zXDQ.mjs";import{b as Ea,a as xa,v as Fa,e as Ya,d as Aa,p as Wa,u as za,h as Ga,j as Ua,g as ja,o as Ha,s as Va,m as Qa,c as qa,l as $a,n as Ka,q as Xa,f as Za,i as _a,r as Ja,z as as,t as ss,x as es,k as ts,w as rs,y as os}from"./shared/shadows-Dhd7FrwF.mjs";import{masks as is}from"./utils/masks/index.mjs";import{toCapitalize as ns,toSentenceCase as ms}from"./utils/string/index.mjs";import{k as ls}from"./shared/formatKebabToPretty-Du43TgPC.mjs";import{M as us,S as cs,U as ds,d as ps,e as hs,f as Ss,g as gs,a as Cs,s as fs}from"./shared/unix.schema-CMYTtXco.mjs";import{p as ks}from"./shared/phone.schema-XBbyizhq.mjs";import{SnackbarProvider as Ps}from"notistack";async function ys(a){try{return[await a,null]}catch(s){return[null,s]}}const bs=a=>a.replace(/(\d{3})-?(\d{2})-?(\d{4})/,"\u2022\u2022\u2022-\u2022\u2022-$3");export{e as AcceptTermsNotice,t as Alert,r as Backdrop,o as Banner,H as BigNumber,i as BrandFilterInput,n as Button,m as CredentialRequestsEditor,V as CustomAlertComponent,l as DateInput,u as DateRangeInput,c as EmailInput,Q as EmptyChartSection,q as ErrorCodesChart,d as ExactBirthdayBanner,p as FullWidthAlert,h as Image,S as LegalLink,g as LinkButton,$ as LoadingChartSection,us as MaskedAndUnmaskedSSNSchema,K as MetricLastUpdated,X as MonthlySignupsOverviewTable,C as OTPInput,f as OneClickForm,Z as OneClickOverTimeChart,_ as OneClickPercentageChart,z as PageHeader,G as PageSectionHeader,U as Paragraph,k as PhoneInput,J as PieChart,P as PrivacyPolicyNotice,y as QRCodeDisplay,aa as ReasonCodesChart,b as ResendPhoneBanner,sa as RiskScoreBarChart,ea as RiskScorePieChart,B as SSNInput,cs as SSNSchema,j as SectionHeader,D as SelectInput,ta as SeriesChart,ra as SeriesChartLegend,oa as SeriesPercentageChart,ia as SignupBigNumbers,na as SimpleBarChart,ma as SimpleLegend,Ps as SnackbarProvider,T as TestPhoneNumbersBanner,I as TextButton,w as TimezoneInput,v as Typography,ds as USDateSchema,O as VerifiedImage,R as VerifiedIncLogo,la as When,Ea as black,xa as blue,Fa as colors,L as countries,Ya as darkBlue,Aa as darkGreen,Wa as darkGrey,za as darkGreyContrast,Ga as darkRed,Ua as darkYellow,ps as descriptionSchema,hs as emailSchema,Ss as fieldSchema,ua as formatDateMMDDYYYY,ca as formatDateMMYY,da as formatDateToTimestamp,pa as formatExtendedDate,gs as getDateSchemaWithPastValidation,N as getPhoneData,M as getPhoneDataByFieldName,Cs as getUnixSchema,ja as green,Ha as grey,Va as greyContrast,Qa as infoContrast,ls as kebabCaseToPretty,qa as lightBlue,$a as lightGreen,Ka as lightGrey,Xa as lightGreyContrast,Za as lightRed,_a as lightYellow,ha as mapMonthlySignupsOverviewTableData,Sa as mapTimeSeriesData,is as masks,E as omitProperties,x as parseToPhoneNational,ks as phoneSchema,Ja as red,as as shadows,F as sortByCountryName,bs as ssnFormatter,fs as stateSchema,ss as textDisabled,es as theme,ns as toCapitalize,Y as toOption,ms as toSentenceCase,A as useBrandFilterInput,fa as useCallbackRef,Oa as useCopyToClipboard,Ma as useCounter,ka as useDebounceValue,Pa as useDisclosure,ya as useIntersectionObserver,ba as useLocalStorage,La as useOnClickOutside,Ra as usePrevious,Na as useQRCode,Ba as useScript,Da as useSearchParams,ga as useSnackbar,Ta as useThrottle,Ia as useToggle,wa as useWindowScroll,va as useWindowSize,Ca as uuidToHashedColor,W as validatePhone,ts as warningContrast,rs as white,ys as wrapPromise,os as yellow};
|