@verifiedinc-public/shared-ui-elements 12.9.0 → 12.9.1-rc.18
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/DataTable/DataTable.context.d.ts +2 -0
- package/dist/components/DataTable/DataTable.context.mjs +1 -1
- package/dist/components/DataTable/DataTable.export.mjs +3 -3
- package/dist/components/DataTable/DataTable.mjs +1 -1
- package/dist/components/DataTable/DataTableExpandRow.d.ts +28 -0
- package/dist/components/DataTable/DataTableExpandRow.mjs +1 -0
- package/dist/components/DataTable/DataTableHeaderCell.mjs +1 -1
- package/dist/components/DataTable/index.d.ts +1 -0
- package/dist/components/NetworkRules/NetworkRules.context.d.ts +11 -0
- package/dist/components/NetworkRules/NetworkRules.context.mjs +1 -0
- package/dist/components/NetworkRules/dialog/NetworkRuleDeleteDialog.d.ts +16 -0
- package/dist/components/NetworkRules/dialog/NetworkRuleDeleteDialog.mjs +1 -0
- package/dist/components/NetworkRules/dialog/NetworkRuleDiscardDialog.d.ts +10 -0
- package/dist/components/NetworkRules/dialog/NetworkRuleDiscardDialog.mjs +1 -0
- package/dist/components/NetworkRules/dialog/index.d.ts +2 -0
- package/dist/components/NetworkRules/editor/NetworkRuleEditorDialog.d.ts +10 -0
- package/dist/components/NetworkRules/editor/NetworkRuleEditorDialog.mjs +1 -0
- package/dist/components/NetworkRules/editor/NetworkRuleEditorForm.d.ts +24 -0
- package/dist/components/NetworkRules/editor/NetworkRuleEditorForm.mjs +1 -0
- package/dist/components/NetworkRules/editor/fields/ConditionRow.d.ts +10 -0
- package/dist/components/NetworkRules/editor/fields/ConditionRow.mjs +1 -0
- package/dist/components/NetworkRules/editor/fields/ConditionValuesInput.d.ts +13 -0
- package/dist/components/NetworkRules/editor/fields/ConditionValuesInput.mjs +1 -0
- package/dist/components/NetworkRules/editor/fields/ConditionsField.d.ts +7 -0
- package/dist/components/NetworkRules/editor/fields/ConditionsField.mjs +1 -0
- package/dist/components/NetworkRules/editor/fields/DateField.d.ts +19 -0
- package/dist/components/NetworkRules/editor/fields/DateField.mjs +2 -0
- package/dist/components/NetworkRules/editor/fields/NotesField.d.ts +12 -0
- package/dist/components/NetworkRules/editor/fields/NotesField.mjs +1 -0
- package/dist/components/NetworkRules/editor/fields/StatusField.d.ts +5 -0
- package/dist/components/NetworkRules/editor/fields/StatusField.mjs +1 -0
- package/dist/components/NetworkRules/editor/fields/values/InlineValuesInput.d.ts +12 -0
- package/dist/components/NetworkRules/editor/fields/values/InlineValuesInput.mjs +1 -0
- package/dist/components/NetworkRules/editor/fields/values/RemoteValuesInput.d.ts +17 -0
- package/dist/components/NetworkRules/editor/fields/values/RemoteValuesInput.mjs +1 -0
- package/dist/components/NetworkRules/editor/fields/values/TextValuesInput.d.ts +12 -0
- package/dist/components/NetworkRules/editor/fields/values/TextValuesInput.mjs +1 -0
- package/dist/components/NetworkRules/editor/index.d.ts +5 -0
- package/dist/components/NetworkRules/editor/schema.d.ts +84 -0
- package/dist/components/NetworkRules/editor/schema.mjs +1 -0
- package/dist/components/NetworkRules/hooks/index.d.ts +5 -0
- package/dist/components/NetworkRules/hooks/useHeldWhileClosed.d.ts +2 -0
- package/dist/components/NetworkRules/hooks/useHeldWhileClosed.mjs +1 -0
- package/dist/components/NetworkRules/hooks/useNetworkRuleSourceSearch.d.ts +26 -0
- package/dist/components/NetworkRules/hooks/useNetworkRuleSourceSearch.mjs +1 -0
- package/dist/components/NetworkRules/hooks/useNetworkRulesCatalog.d.ts +3 -0
- package/dist/components/NetworkRules/hooks/useNetworkRulesCatalog.mjs +1 -0
- package/dist/components/NetworkRules/hooks/useNetworkRulesDialogs.d.ts +39 -0
- package/dist/components/NetworkRules/hooks/useNetworkRulesDialogs.mjs +1 -0
- package/dist/components/NetworkRules/hooks/useResolvedConditionOptions.d.ts +16 -0
- package/dist/components/NetworkRules/hooks/useResolvedConditionOptions.mjs +1 -0
- package/dist/components/NetworkRules/index.d.ts +9 -0
- package/dist/components/NetworkRules/index.mjs +1 -0
- package/dist/components/NetworkRules/shared/NetworkStatusChip.d.ts +5 -0
- package/dist/components/NetworkRules/shared/NetworkStatusChip.mjs +1 -0
- package/dist/components/NetworkRules/shared/OptionChips.d.ts +9 -0
- package/dist/components/NetworkRules/shared/OptionChips.mjs +1 -0
- package/dist/components/NetworkRules/shared/index.d.ts +2 -0
- package/dist/components/NetworkRules/statuses.d.ts +3 -0
- package/dist/components/NetworkRules/statuses.mjs +1 -0
- package/dist/components/NetworkRules/table/NetworkRuleConditionsTable.d.ts +9 -0
- package/dist/components/NetworkRules/table/NetworkRuleConditionsTable.mjs +1 -0
- package/dist/components/NetworkRules/table/NetworkRuleExpandedPanel.d.ts +14 -0
- package/dist/components/NetworkRules/table/NetworkRuleExpandedPanel.mjs +1 -0
- package/dist/components/NetworkRules/table/NetworkRuleRow.d.ts +9 -0
- package/dist/components/NetworkRules/table/NetworkRuleRow.mjs +1 -0
- package/dist/components/NetworkRules/table/NetworkRulesTable.d.ts +17 -0
- package/dist/components/NetworkRules/table/NetworkRulesTable.mjs +1 -0
- package/dist/components/NetworkRules/table/columns.d.ts +11 -0
- package/dist/components/NetworkRules/table/columns.mjs +1 -0
- package/dist/components/NetworkRules/table/index.d.ts +5 -0
- package/dist/components/NetworkRules/types.d.ts +113 -0
- package/dist/components/NetworkRules/utils/catalog.d.ts +20 -0
- package/dist/components/NetworkRules/utils/catalog.mjs +1 -0
- package/dist/components/NetworkRules/utils/condition.d.ts +7 -0
- package/dist/components/NetworkRules/utils/condition.mjs +1 -0
- package/dist/components/NetworkRules/utils/date.d.ts +6 -0
- package/dist/components/NetworkRules/utils/date.mjs +1 -0
- package/dist/components/NetworkRules/utils/index.d.ts +3 -0
- package/dist/components/UI/LogoAvatar.d.ts +14 -0
- package/dist/components/UI/LogoAvatar.mjs +1 -0
- package/dist/components/UI/LogoChip.d.ts +14 -0
- package/dist/components/UI/LogoChip.mjs +1 -0
- package/dist/components/UI/index.d.ts +2 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/styles/lib/react-datepicker.d.ts +1 -1
- package/dist/styles/lib/react-datepicker.mjs +8 -2
- package/dist/styles/theme.mjs +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { NetworkRuleOption, NetworkRuleSourceService } from '../types';
|
|
2
|
+
export interface UseNetworkRuleSourceSearchOptions {
|
|
3
|
+
/** Page size. Defaults to 20. */
|
|
4
|
+
limit?: number;
|
|
5
|
+
/** Defaults to 300ms. */
|
|
6
|
+
debounceMs?: number;
|
|
7
|
+
/** False holds the query, e.g. while the list is closed. */
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface UseNetworkRuleSourceSearchResult {
|
|
11
|
+
/** Every page loaded so far, in order. */
|
|
12
|
+
options: NetworkRuleOption[];
|
|
13
|
+
/** The first page is loading. */
|
|
14
|
+
isLoading: boolean;
|
|
15
|
+
isLoadingMore: boolean;
|
|
16
|
+
hasMore: boolean;
|
|
17
|
+
loadMore: () => void;
|
|
18
|
+
/** False when no service is registered under `source`. */
|
|
19
|
+
isSupported: boolean;
|
|
20
|
+
service: NetworkRuleSourceService | undefined;
|
|
21
|
+
error: unknown;
|
|
22
|
+
/** Re-runs the current search after a failure. */
|
|
23
|
+
retry: () => void;
|
|
24
|
+
}
|
|
25
|
+
/** Paged search-as-you-type against `services.sources[source]`. */
|
|
26
|
+
export declare function useNetworkRuleSourceSearch(source: string | undefined, search: string, { limit, debounceMs, enabled, }?: UseNetworkRuleSourceSearchOptions): UseNetworkRuleSourceSearchResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{useMemo as M}from"react";import{useInfiniteQuery as N,keepPreviousData as k}from"@tanstack/react-query";import{useDebounceValue as w}from"../../../hooks/useDebounceValue.mjs";import{useNetworkRulesServices as x}from"../NetworkRules.context.mjs";function b(t,g,{limit:i=20,debounceMs:m=300,enabled:p=!0}={}){const{scope:v,sources:u}=x(),r=t?u?.[t]:void 0,n=w(g.trim(),m),s=N({queryKey:["network-rules",v,"source",t,n,i],queryFn:async({pageParam:a,signal:e})=>r?await r.search({search:n||void 0,limit:i,skip:a},e):[],initialPageParam:0,getNextPageParam:(a,e)=>a.length<i?void 0:e.reduce((o,y)=>o+y.length,0),enabled:p&&r!==void 0,placeholderData:k}),h=M(()=>{var a;const e=new Map;for(const o of((a=s.data)==null?void 0:a.pages.flat())??[])e.has(o.value)||e.set(o.value,o);return[...e.values()]},[s.data]),{hasNextPage:c,isFetching:l,isFetchingNextPage:d,fetchNextPage:f,refetch:P}=s;return{options:h,isLoading:l&&!d,isLoadingMore:d,hasMore:c,loadMore:()=>{c&&!l&&f()},isSupported:r!==void 0,service:r,error:s.error,retry:()=>{P()}}}export{b as useNetworkRuleSourceSearch};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{useQuery as r}from"@tanstack/react-query";import{useNetworkRulesServices as o}from"../NetworkRules.context.mjs";const a=300*1e3;function u(){const{scope:e,getCatalog:s}=o();return r({queryKey:["network-rules",e,"catalog"],queryFn:async({signal:t})=>await s(t),staleTime:a})}export{u as useNetworkRulesCatalog};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { NetworkRuleDeleteDialogProps } from '../dialog/NetworkRuleDeleteDialog';
|
|
2
|
+
import { NetworkRuleEditorDialogProps } from '../editor/NetworkRuleEditorDialog';
|
|
3
|
+
import { NetworkRuleRowHandlers } from '../table/NetworkRuleExpandedPanel';
|
|
4
|
+
import { NetworkRule, NetworkRuleServerError } from '../types';
|
|
5
|
+
export interface NetworkRulesEditorState {
|
|
6
|
+
open: boolean;
|
|
7
|
+
/** Undefined for a new rule. */
|
|
8
|
+
rule?: NetworkRule;
|
|
9
|
+
focusConditionIndex?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface NetworkRulesDeletionState {
|
|
12
|
+
open: boolean;
|
|
13
|
+
rule?: NetworkRule;
|
|
14
|
+
/** Set when one condition is being deleted rather than the rule. */
|
|
15
|
+
conditionIndex?: number;
|
|
16
|
+
}
|
|
17
|
+
/** Table callbacks wired to the dialogs; `onToggleEnabled` stays with the consumer. */
|
|
18
|
+
export type NetworkRulesDialogTableHandlers = Required<Pick<NetworkRuleRowHandlers, 'onEdit' | 'onDelete' | 'onEditCondition' | 'onDeleteCondition'>>;
|
|
19
|
+
export type NetworkRulesEditorDialogProps = Pick<NetworkRuleEditorDialogProps, 'open' | 'rule' | 'focusConditionIndex' | 'serverErrors' | 'onClose'>;
|
|
20
|
+
export type NetworkRulesDeleteDialogProps = Pick<NetworkRuleDeleteDialogProps, 'open' | 'rule' | 'conditionIndex' | 'onClose'>;
|
|
21
|
+
export interface UseNetworkRulesDialogsResult {
|
|
22
|
+
editor: NetworkRulesEditorState;
|
|
23
|
+
deletion: NetworkRulesDeletionState;
|
|
24
|
+
/** Cleared on open and close. */
|
|
25
|
+
serverErrors: NetworkRuleServerError[] | undefined;
|
|
26
|
+
setServerErrors: (errors: NetworkRuleServerError[] | undefined) => void;
|
|
27
|
+
openCreate: () => void;
|
|
28
|
+
openEdit: (rule: NetworkRule) => void;
|
|
29
|
+
openEditCondition: (rule: NetworkRule, index: number) => void;
|
|
30
|
+
closeEditor: () => void;
|
|
31
|
+
requestDeleteRule: (rule: NetworkRule) => void;
|
|
32
|
+
requestDeleteCondition: (rule: NetworkRule, index: number) => void;
|
|
33
|
+
closeDeletion: () => void;
|
|
34
|
+
tableHandlers: NetworkRulesDialogTableHandlers;
|
|
35
|
+
editorDialogProps: NetworkRulesEditorDialogProps;
|
|
36
|
+
deleteDialogProps: NetworkRulesDeleteDialogProps;
|
|
37
|
+
}
|
|
38
|
+
/** Which dialog is open and about what. Data stays with the consumer. */
|
|
39
|
+
export declare function useNetworkRulesDialogs(): UseNetworkRulesDialogsResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{useState as E,useCallback as o,useMemo as v}from"react";function b(){const[n,t]=E({open:!1}),[i,d]=E({open:!1}),[s,r]=E(),x=o(()=>{r(void 0),t({open:!0})},[]),l=o(e=>{r(void 0),t({open:!0,rule:e})},[]),u=o((e,D)=>{r(void 0),t({open:!0,rule:e,focusConditionIndex:D})},[]),p=o(()=>{r(void 0),t(e=>({...e,open:!1}))},[]),a=o(e=>{d({open:!0,rule:e})},[]),c=o((e,D)=>{d({open:!0,rule:e,conditionIndex:D})},[]),C=o(()=>{d(e=>({...e,open:!1}))},[]),I=v(()=>({onEdit:l,onDelete:a,onEditCondition:u,onDeleteCondition:c}),[l,a,u,c]),f=v(()=>({open:n.open,rule:n.rule,focusConditionIndex:n.focusConditionIndex,serverErrors:s,onClose:p}),[n,s,p]),g=v(()=>({open:i.open,rule:i.rule,conditionIndex:i.conditionIndex,onClose:C}),[i,C]);return{editor:n,deletion:i,serverErrors:s,setServerErrors:r,openCreate:x,openEdit:l,openEditCondition:u,closeEditor:p,requestDeleteRule:a,requestDeleteCondition:c,closeDeletion:C,tableHandlers:I,editorDialogProps:f,deleteDialogProps:g}}export{b as useNetworkRulesDialogs};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { NetworkRuleKeyDef, NetworkRuleOption, NetworkRuleSourceService } from '../types';
|
|
2
|
+
export interface UseResolvedConditionOptionsParams {
|
|
3
|
+
/** Options already known to the caller; never sent to `resolve`. */
|
|
4
|
+
known?: readonly NetworkRuleOption[];
|
|
5
|
+
}
|
|
6
|
+
export interface UseResolvedConditionOptionsResult {
|
|
7
|
+
/** One option per stored value, in the stored order. */
|
|
8
|
+
options: NetworkRuleOption[];
|
|
9
|
+
isLoading: boolean;
|
|
10
|
+
service: NetworkRuleSourceService | undefined;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Stored values → displayable options: matched from inline options, resolved
|
|
14
|
+
* through the key's remote source, or labelled by themselves.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useResolvedConditionOptions(keyDef: NetworkRuleKeyDef | undefined, values: string[], { known }?: UseResolvedConditionOptionsParams): UseResolvedConditionOptionsResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{useMemo as m}from"react";import{useQuery as y,keepPreviousData as g}from"@tanstack/react-query";import{useNetworkRulesServices as h}from"../NetworkRules.context.mjs";import{hasInlineOptions as k,hasRemoteSource as w,toOptions as c}from"../utils/catalog.mjs";const O=300*1e3;function R(e,s,{known:a=[]}={}){const{scope:f,sources:p}=h(),v=k(e),i=w(e)?e.values.source:void 0,n=i?p?.[i]:void 0,t=n?.resolve,r=m(()=>s.filter(o=>!a.some(u=>u.value===o)).sort((o,u)=>o.localeCompare(u)),[s,a]),d=t!==void 0&&r.length>0,l=y({queryKey:["network-rules",f,"resolve",i,r],queryFn:async({signal:o})=>t?await t(r,o):[],enabled:d,staleTime:O,placeholderData:g});return{options:m(()=>v?c(s,e.values.options):c(s,[...a,...l.data??[]]),[v,e,s,a,l.data]),isLoading:d&&l.isPending,service:n}}export{R as useResolvedConditionOptions};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{NETWORK_RULE_STATUSES as e,getStatusPresentation as o}from"./statuses.mjs";import{NetworkRulesProvider as a,useNetworkRuleStatuses as s,useNetworkRulesServices as t}from"./NetworkRules.context.mjs";import{ConditionValuesInput as r}from"./editor/fields/ConditionValuesInput.mjs";import{DateField as l}from"./editor/fields/DateField.mjs";import{NETWORK_RULES_COLUMN_IDS as i,buildNetworkRulesColumns as u}from"./table/columns.mjs";import{NetworkRuleConditionsTable as m}from"./table/NetworkRuleConditionsTable.mjs";import{NetworkRuleDeleteDialog as R}from"./dialog/NetworkRuleDeleteDialog.mjs";import{NetworkRuleDiscardDialog as n}from"./dialog/NetworkRuleDiscardDialog.mjs";import{NetworkRuleEditorDialog as p}from"./editor/NetworkRuleEditorDialog.mjs";import{NetworkRuleEditorForm as N}from"./editor/NetworkRuleEditorForm.mjs";import{NetworkRuleExpandedPanel as w}from"./table/NetworkRuleExpandedPanel.mjs";import{NetworkRuleRow as k}from"./table/NetworkRuleRow.mjs";import{NetworkRulesTable as d}from"./table/NetworkRulesTable.mjs";import{NetworkStatusChip as f}from"./shared/NetworkStatusChip.mjs";import{OptionChips as S}from"./shared/OptionChips.mjs";import{dayToRuleDate as D,formatRuleDate as C,ruleDateToDay as g}from"./utils/date.mjs";import{dedupeValues as O,emptyConditionFormValues as h,fromNetworkRuleFormValues as T,normalizeConditionValues as E,toNetworkRuleFormValues as F}from"./utils/condition.mjs";import{getKeyDef as c,getKeyLabel as L,getOperatorLabel as b,getStatusLabel as V,hasInlineOptions as y,hasRemoteSource as _,isOperatorMulti as K,toOptions as U}from"./utils/catalog.mjs";import{networkRuleConditionFormSchema as v,networkRuleFormSchema as I}from"./editor/schema.mjs";import{useHeldWhileClosed as P}from"./hooks/useHeldWhileClosed.mjs";import{useNetworkRuleSourceSearch as W}from"./hooks/useNetworkRuleSourceSearch.mjs";import{useNetworkRulesCatalog as M}from"./hooks/useNetworkRulesCatalog.mjs";import{useNetworkRulesDialogs as x}from"./hooks/useNetworkRulesDialogs.mjs";import{useResolvedConditionOptions as z}from"./hooks/useResolvedConditionOptions.mjs";export{r as ConditionValuesInput,l as DateField,i as NETWORK_RULES_COLUMN_IDS,e as NETWORK_RULE_STATUSES,m as NetworkRuleConditionsTable,R as NetworkRuleDeleteDialog,n as NetworkRuleDiscardDialog,p as NetworkRuleEditorDialog,N as NetworkRuleEditorForm,w as NetworkRuleExpandedPanel,k as NetworkRuleRow,a as NetworkRulesProvider,d as NetworkRulesTable,f as NetworkStatusChip,S as OptionChips,u as buildNetworkRulesColumns,D as dayToRuleDate,O as dedupeValues,h as emptyConditionFormValues,C as formatRuleDate,T as fromNetworkRuleFormValues,c as getKeyDef,L as getKeyLabel,b as getOperatorLabel,V as getStatusLabel,o as getStatusPresentation,y as hasInlineOptions,_ as hasRemoteSource,K as isOperatorMulti,v as networkRuleConditionFormSchema,I as networkRuleFormSchema,E as normalizeConditionValues,g as ruleDateToDay,F as toNetworkRuleFormValues,U as toOptions,P as useHeldWhileClosed,W as useNetworkRuleSourceSearch,s as useNetworkRuleStatuses,M as useNetworkRulesCatalog,x as useNetworkRulesDialogs,t as useNetworkRulesServices,z as useResolvedConditionOptions};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ChipProps } from '@mui/material';
|
|
2
|
+
export interface NetworkStatusChipProps extends Omit<ChipProps, 'label' | 'color' | 'icon'> {
|
|
3
|
+
status: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function NetworkStatusChip({ status, size, sx, ...chipProps }: Readonly<NetworkStatusChipProps>): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{Chip as i}from"@mui/material";import{getStatusPresentation as e}from"../statuses.mjs";import{jsx as l}from"react/jsx-runtime";function n({status:r,size:s="small",sx:o,...a}){const t=e(r);return l(i,{size:s,label:t.label,color:t.color??"default",icon:t.icon,sx:[{"& .MuiChip-label":{fontWeight:700}},...Array.isArray(o)?o:[o]],...a})}export{n as NetworkStatusChip};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { NetworkRuleOption, NetworkRuleRenderChip } from '../types';
|
|
3
|
+
export interface OptionChipsProps {
|
|
4
|
+
options: readonly NetworkRuleOption[];
|
|
5
|
+
renderChip?: NetworkRuleRenderChip;
|
|
6
|
+
emptyPlaceholder?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/** Condition values as a wrapping row of chips. */
|
|
9
|
+
export declare function OptionChips({ options, renderChip, emptyPlaceholder, }: Readonly<OptionChipsProps>): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{Fragment as i}from"react";import{Stack as o,Chip as t}from"@mui/material";import{jsx as r,Fragment as s}from"react/jsx-runtime";function m({options:a,renderChip:l,emptyPlaceholder:p="-"}){return a.length===0?r(s,{children:p}):r(o,{direction:"row",flexWrap:"wrap",useFlexGap:!0,gap:.75,children:a.map(e=>{const n={size:"small",label:e.label};return r(i,{children:l?l(e,n):r(t,{...n})},e.value)})})}export{m as OptionChips};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{Close as r,QuestionMark as t,Check as a}from"@mui/icons-material";import{jsx as e}from"react/jsx-runtime";const l={IN_NETWORK:{label:"In Network",color:"success",icon:e(a,{fontSize:"small"})},INDETERMINATE:{label:"Indeterminate",color:"warning",icon:e(t,{fontSize:"small"})},OUT_OF_NETWORK:{label:"Out of Network",color:"error",icon:e(r,{fontSize:"small"})}},n=o=>o.toLowerCase().split(/[_\s]+/).filter(Boolean).map(s=>s[0].toUpperCase()+s.slice(1)).join(" ");function i(o){return l[o]??{label:n(o)}}export{l as NETWORK_RULE_STATUSES,i as getStatusPresentation};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NetworkRule, NetworkRuleCatalog } from '../types';
|
|
2
|
+
export interface NetworkRuleConditionsTableProps {
|
|
3
|
+
rule: NetworkRule;
|
|
4
|
+
catalog?: NetworkRuleCatalog;
|
|
5
|
+
readOnly?: boolean;
|
|
6
|
+
onEditCondition?: (rule: NetworkRule, index: number) => void;
|
|
7
|
+
onDeleteCondition?: (rule: NetworkRule, index: number) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function NetworkRuleConditionsTable({ rule, catalog, readOnly, onEditCondition, onDeleteCondition, }: Readonly<NetworkRuleConditionsTableProps>): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{useMemo as f}from"react";import{Typography as g,Table as y,TableHead as w,TableRow as p,TableCell as i,TableBody as x,Chip as v,Skeleton as k,IconButton as m}from"@mui/material";import{Edit as T,Delete as S}from"@mui/icons-material";import{useResolvedConditionOptions as $}from"../hooks/useResolvedConditionOptions.mjs";import{OptionChips as z}from"../shared/OptionChips.mjs";import{getKeyDef as D,getKeyLabel as O,getOperatorLabel as E}from"../utils/catalog.mjs";import{normalizeConditionValues as K}from"../utils/condition.mjs";import{jsx as o,jsxs as c}from"react/jsx-runtime";function L({rule:e,condition:n,index:t,catalog:a,showActions:s,onEditCondition:l,onDeleteCondition:r}){const d=D(a,n.key),C=f(()=>K(n.value),[n.value]),{options:u,isLoading:b,service:h}=$(d,C);return c(p,{children:[o(i,{sx:{whiteSpace:"nowrap"},children:o(v,{label:O(a,n.key)})}),o(i,{sx:{whiteSpace:"nowrap"},children:E(a,n.operator)}),o(i,{sx:{width:"100%"},children:b?o(k,{variant:"text",width:160}):o(z,{options:u,renderChip:h?.renderChip})}),s&&c(i,{align:"right",sx:{whiteSpace:"nowrap"},children:[l&&o(m,{size:"small",color:"primary","aria-label":`Edit condition ${t+1}`,onClick:()=>l(e,t),children:o(T,{fontSize:"small"})}),r&&o(m,{size:"small",color:"error","aria-label":`Delete condition ${t+1}`,disabled:e.conditions.length<=1,onClick:()=>r(e,t),children:o(S,{fontSize:"small"})})]})]})}function R({rule:e,catalog:n,readOnly:t=!1,onEditCondition:a,onDeleteCondition:s}){const l=!t&&(a!==void 0||s!==void 0);return e.conditions.length===0?o(g,{variant:"body2",color:"text.secondary",children:"No conditions"}):c(y,{"aria-label":`Conditions for ${e.name}`,children:[o(w,{children:c(p,{children:[o(i,{children:"Key"}),o(i,{children:"Operator"}),o(i,{children:"Values"}),l&&o(i,{align:"right",children:"Actions"})]})}),o(x,{children:e.conditions.map((r,d)=>o(L,{rule:e,condition:r,index:d,catalog:n,showActions:l,onEditCondition:a,onDeleteCondition:s},`${r.key}-${r.operator}-${d}`))})]})}export{R as NetworkRuleConditionsTable};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NetworkRule, NetworkRuleCatalog } from '../types';
|
|
2
|
+
export interface NetworkRuleRowHandlers {
|
|
3
|
+
onToggleEnabled?: (rule: NetworkRule, enabled: boolean) => void;
|
|
4
|
+
onEdit?: (rule: NetworkRule) => void;
|
|
5
|
+
onDelete?: (rule: NetworkRule) => void;
|
|
6
|
+
onEditCondition?: (rule: NetworkRule, index: number) => void;
|
|
7
|
+
onDeleteCondition?: (rule: NetworkRule, index: number) => void;
|
|
8
|
+
}
|
|
9
|
+
export interface NetworkRuleExpandedPanelProps extends NetworkRuleRowHandlers {
|
|
10
|
+
rule: NetworkRule;
|
|
11
|
+
catalog?: NetworkRuleCatalog;
|
|
12
|
+
readOnly?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function NetworkRuleExpandedPanel({ rule, catalog, readOnly, onEdit, onDelete, onEditCondition, onDeleteCondition, }: Readonly<NetworkRuleExpandedPanelProps>): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{Stack as n,Button as d,Typography as i}from"@mui/material";import{Edit as x,Delete as h}from"@mui/icons-material";import{CopyableUuid as u}from"../../CopyableUuid/index.mjs";import{NetworkRuleConditionsTable as m}from"./NetworkRuleConditionsTable.mjs";import{jsxs as o,jsx as t}from"react/jsx-runtime";function f({rule:e,catalog:c,readOnly:l=!1,onEdit:r,onDelete:a,onEditCondition:s,onDeleteCondition:p}){return o(n,{spacing:2,useFlexGap:!0,sx:{px:3,py:2},children:[!l&&(r!==void 0||a!==void 0)&&o(n,{direction:"row",spacing:2,alignItems:"center",children:[r&&t(d,{variant:"text",startIcon:t(x,{}),onClick:()=>r(e),children:"Edit"}),a&&t(d,{variant:"text",color:"error",startIcon:t(h,{}),onClick:()=>a(e),children:"Delete"})]}),o(n,{direction:"row",spacing:4,alignItems:"flex-start",children:[o(n,{children:[t(i,{variant:"caption",color:"text.secondary",children:"Rule UUID"}),t(u,{uuid:e.uuid,label:"Rule UUID",variant:"button",head:36,tail:0,mono:!0,iconSx:{fontSize:14,p:.125}})]}),e.notes&&o(n,{sx:{maxWidth:480},children:[t(i,{variant:"caption",color:"text.secondary",children:"Notes"}),t(i,{variant:"body2",children:e.notes})]})]}),o(n,{spacing:1,children:[t(i,{sx:{fontSize:11,fontWeight:700,letterSpacing:.6,textTransform:"uppercase"},children:"Conditions"}),t(m,{rule:e,catalog:c,readOnly:l,onEditCondition:s,onDeleteCondition:p})]})]})}export{f as NetworkRuleExpandedPanel};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DataTableRowContext } from '../../DataTable/DataTable.types';
|
|
2
|
+
import { NetworkRule, NetworkRuleCatalog } from '../types';
|
|
3
|
+
import { NetworkRuleRowHandlers } from './NetworkRuleExpandedPanel';
|
|
4
|
+
export interface NetworkRuleRowProps extends DataTableRowContext<NetworkRule>, NetworkRuleRowHandlers {
|
|
5
|
+
catalog?: NetworkRuleCatalog;
|
|
6
|
+
readOnly?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/** A rule row plus its collapsible detail row, for `DataTable`'s `renderRow`. */
|
|
9
|
+
export declare function NetworkRuleRow({ row, rowProps, getCellProps, catalog, readOnly, onToggleEnabled, ...handlers }: Readonly<NetworkRuleRowProps>): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{TableRow as u,TableCell as h,Collapse as O,Box as g,Stack as _,Chip as v,Tooltip as S,Switch as T}from"@mui/material";import{flexRender as P}from"@tanstack/react-table";import{useResizeObserver as I}from"../../../hooks/useResizeObserver.mjs";import{useDataTableContext as k}from"../../DataTable/DataTable.context.mjs";import{EXPAND_TRANSITION_MS as A,EXPANDED_ROW_PANEL_SX as L,EXPAND_COLUMN_ID as W,ExpandRowToggle as X}from"../../DataTable/DataTableExpandRow.mjs";import{NetworkStatusChip as $}from"../shared/NetworkStatusChip.mjs";import{NETWORK_RULES_COLUMN_IDS as s}from"./columns.mjs";import{NetworkRuleExpandedPanel as z}from"./NetworkRuleExpandedPanel.mjs";import{jsxs as w,Fragment as M,jsx as e}from"react/jsx-runtime";function U({row:o,rowProps:x,getCellProps:f,catalog:b,readOnly:i=!1,onToggleEnabled:l,...E}){var d;const C=o.getIsExpanded(),t=o.original,n=t.enabled??!0,c=t.conditions.length,m=o.getVisibleCells(),{scrollContainerRef:p}=k();I(p);const r=(d=p.current)==null?void 0:d.clientWidth,N=r!==void 0&&r>0?r:"100%",R=a=>{switch(a.column.id){case W:return e(X,{row:o});case s.enabled:return e(S,{title:n?"Enabled":"Disabled",placement:"top",children:e("span",{children:e(T,{size:"small",checked:n,disabled:i||l===void 0,onChange:(y,D)=>l?.(t,D),inputProps:{"aria-label":`${n?"Disable":"Enable"} rule ${t.name}`}})})});case s.name:return w(_,{direction:"row",spacing:1,alignItems:"center",minWidth:0,children:[e(g,{component:"span",title:t.name,sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.name}),e(v,{size:"small",label:`${c} ${c===1?"condition":"conditions"}`})]});case s.status:return e($,{status:t.status});default:return P(a.column.columnDef.cell,a.getContext())}};return w(M,{children:[e(u,{...x,hover:!0,sx:{"& > td":{borderBottom:"unset"}},children:m.map(a=>e(h,{...f(a),children:R(a)},a.id))}),e(u,{children:e(h,{sx:{py:0,px:0},colSpan:m.length,children:e(O,{in:C,timeout:A,unmountOnExit:!0,children:e(g,{sx:{...L,width:N},children:e(z,{rule:t,catalog:b,readOnly:i,...E})})})})})]})}export{U as NetworkRuleRow};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DataTableProps } from '../../DataTable/DataTable.types';
|
|
2
|
+
import { NetworkRule } from '../types';
|
|
3
|
+
import { NetworkRuleRowHandlers } from './NetworkRuleExpandedPanel';
|
|
4
|
+
type PaginationProps = Pick<DataTableProps<NetworkRule>, 'pagination' | 'onPaginationChange' | 'manualPagination' | 'rowCount' | 'pageSizeOptions'>;
|
|
5
|
+
export interface NetworkRulesTableProps extends NetworkRuleRowHandlers, PaginationProps {
|
|
6
|
+
rules: NetworkRule[];
|
|
7
|
+
isLoading?: boolean;
|
|
8
|
+
/** No toggle, no row or condition actions. */
|
|
9
|
+
readOnly?: boolean;
|
|
10
|
+
emptyMessage?: string;
|
|
11
|
+
/** Defaults to 640. `'100%'` fills a parent with a definite height. */
|
|
12
|
+
maxHeight?: number | string;
|
|
13
|
+
/** Defaults to 900. */
|
|
14
|
+
minWidth?: number | string;
|
|
15
|
+
}
|
|
16
|
+
export declare function NetworkRulesTable({ rules, isLoading, readOnly, emptyMessage, maxHeight, minWidth, pagination, onPaginationChange, manualPagination, rowCount, pageSizeOptions, ...handlers }: Readonly<NetworkRulesTableProps>): import("react").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{useMemo as g}from"react";import{Alert as N,Button as S,Box as x,TableRow as L,TableCell as P,Skeleton as O}from"@mui/material";import{DataTable as T}from"../../DataTable/DataTable.mjs";import{EXPAND_COLUMN_ID as v}from"../../DataTable/DataTableExpandRow.mjs";import{useNetworkRuleStatuses as M}from"../NetworkRules.context.mjs";import{useNetworkRulesCatalog as z}from"../hooks/useNetworkRulesCatalog.mjs";import{getStatusLabel as E}from"../utils/catalog.mjs";import{buildNetworkRulesColumns as I,NETWORK_RULES_COLUMN_IDS as o}from"./columns.mjs";import{NetworkRuleRow as _}from"./NetworkRuleRow.mjs";import{jsx as e,Fragment as A}from"react/jsx-runtime";const D=4;function U({columnCount:a}){return e(A,{children:Array.from({length:D},(i,n)=>e(L,{children:Array.from({length:a},(m,l)=>e(P,{children:e(O,{variant:"text"})},l))},n))})}function F(a){return[{id:o.status,label:"Status",kind:"multiSelect",columnId:o.status,options:a.map(i=>{const n=E(i);return{label:n,value:n}})},{id:o.enabled,label:"Enabled",kind:"boolean",columnId:o.enabled}]}function H({rules:a,isLoading:i=!1,readOnly:n=!1,emptyMessage:m="No network rules yet",maxHeight:l=640,minWidth:c=900,pagination:h,onPaginationChange:b,manualPagination:p,rowCount:f,pageSizeOptions:C,...w}){const s=z(),r=s.data,d=M()??r?.statuses??[],u=r!==void 0,R=g(()=>I(),[]),k=g(()=>F(d),[d]),y=l==="100%";return!u&&s.isError?e(N,{severity:"error",action:e(S,{color:"inherit",size:"small",onClick:()=>{s.refetch()},children:"Retry"}),children:"The rule catalog could not be loaded, so rules cannot be shown."}):e(x,{sx:y?{height:"100%",minHeight:0}:void 0,children:e(T,{data:u?a:[],columns:R,getRowId:t=>t.uuid,isLoading:i||!u,initialPageSize:10,pagination:h,onPaginationChange:b,manualPagination:p,rowCount:f,pageSizeOptions:C,showToolbar:!0,enableColumnMenu:!0,enableColumnResizing:!0,enableColumnPinning:!0,initialColumnPinning:{left:[v,o.enabled,o.name],right:[]},filterFields:k,tableLayout:"fixed",minWidth:c,maxHeight:l,emptyMessage:m,renderRow:t=>e(_,{...t,catalog:r,readOnly:n,...w}),renderLoading:t=>e(U,{columnCount:t})})})}export{H as NetworkRulesTable};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ColumnDef } from '@tanstack/react-table';
|
|
2
|
+
import { NetworkRule } from '../types';
|
|
3
|
+
export declare const NETWORK_RULES_COLUMN_IDS: {
|
|
4
|
+
readonly enabled: "enabled";
|
|
5
|
+
readonly name: "name";
|
|
6
|
+
readonly status: "status";
|
|
7
|
+
readonly startDate: "startDate";
|
|
8
|
+
readonly endDate: "endDate";
|
|
9
|
+
readonly notes: "notes";
|
|
10
|
+
};
|
|
11
|
+
export declare function buildNetworkRulesColumns(): Array<ColumnDef<NetworkRule, unknown>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{expandColumn as s}from"../../DataTable/DataTableExpandRow.mjs";import{getStatusLabel as l}from"../utils/catalog.mjs";import{formatRuleDate as t}from"../utils/date.mjs";const a={enabled:"enabled",name:"name",status:"status",startDate:"startDate",endDate:"endDate",notes:"notes"},n=({getValue:e})=>e()??"-";function r(){return[s(),{id:a.enabled,header:"Enabled",accessorFn:e=>e.enabled??!0,enableColumnFilter:!1,enableResizing:!1,meta:{width:100,disableColumnMenu:!0}},{id:a.name,header:"Rule Name",accessorFn:e=>e.name,enableColumnFilter:!1,meta:{width:320}},{id:a.status,header:"Status",accessorFn:e=>l(e.status),enableColumnFilter:!1,meta:{width:200}},{id:a.startDate,header:"Starts",accessorFn:e=>t(e.startDate)??void 0,cell:n,enableColumnFilter:!1,meta:{width:280}},{id:a.endDate,header:"Ends",accessorFn:e=>t(e.endDate)??void 0,cell:n,enableColumnFilter:!1,meta:{width:280}},{id:a.notes,header:"Notes",accessorFn:e=>e.notes??"-",enableColumnFilter:!1,meta:{width:300}}]}export{a as NETWORK_RULES_COLUMN_IDS,r as buildNetworkRulesColumns};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { ChipProps } from '@mui/material';
|
|
3
|
+
import { QueryClient } from '@tanstack/react-query';
|
|
4
|
+
export type NetworkRuleOption<TData = unknown> = {
|
|
5
|
+
value: string;
|
|
6
|
+
label: string;
|
|
7
|
+
/** The raw record a remote source returned; read only by that source's renderers. */
|
|
8
|
+
data?: TData;
|
|
9
|
+
};
|
|
10
|
+
export type NetworkRuleStatusPresentation = {
|
|
11
|
+
label: string;
|
|
12
|
+
color?: ChipProps['color'];
|
|
13
|
+
icon?: ReactElement;
|
|
14
|
+
};
|
|
15
|
+
export type NetworkRuleOperatorDef = {
|
|
16
|
+
label: string;
|
|
17
|
+
/** Accepts several values. Defaults to true. */
|
|
18
|
+
multi?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export type NetworkRuleKeyValues = {
|
|
21
|
+
source: string;
|
|
22
|
+
options?: NetworkRuleOption[];
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* `values.options` → pick-list; `values.source` alone → search through
|
|
26
|
+
* `services.sources[source]`; no `values` → free text.
|
|
27
|
+
*/
|
|
28
|
+
export type NetworkRuleKeyDef = {
|
|
29
|
+
key: string;
|
|
30
|
+
label: string;
|
|
31
|
+
operators: string[];
|
|
32
|
+
type?: string;
|
|
33
|
+
values?: NetworkRuleKeyValues;
|
|
34
|
+
};
|
|
35
|
+
export type NetworkRuleCatalog = {
|
|
36
|
+
statuses: string[];
|
|
37
|
+
operators: Record<string, NetworkRuleOperatorDef>;
|
|
38
|
+
keys: NetworkRuleKeyDef[];
|
|
39
|
+
};
|
|
40
|
+
/** `value` is one string or several (inclusive OR). */
|
|
41
|
+
export type NetworkRuleCondition = {
|
|
42
|
+
key: string;
|
|
43
|
+
operator: string;
|
|
44
|
+
value: string | string[];
|
|
45
|
+
};
|
|
46
|
+
/** Dates are calendar days, `YYYY-MM-DD`: from the start day up to, not including, the end day. */
|
|
47
|
+
export type NetworkRule = {
|
|
48
|
+
uuid: string;
|
|
49
|
+
/** Per-brand sequence the server assigns on create; absent until then. */
|
|
50
|
+
number?: number;
|
|
51
|
+
name: string;
|
|
52
|
+
status: string;
|
|
53
|
+
notes?: string | null;
|
|
54
|
+
/** Defaults to true. */
|
|
55
|
+
enabled?: boolean;
|
|
56
|
+
startDate?: string | null;
|
|
57
|
+
endDate?: string | null;
|
|
58
|
+
conditions: NetworkRuleCondition[];
|
|
59
|
+
};
|
|
60
|
+
/** What the editor emits: a rule without its id. */
|
|
61
|
+
export type NetworkRuleData = Omit<NetworkRule, 'uuid'>;
|
|
62
|
+
export type NetworkRuleConditionFormValues = {
|
|
63
|
+
key: string;
|
|
64
|
+
operator: string;
|
|
65
|
+
values: string[];
|
|
66
|
+
};
|
|
67
|
+
export type NetworkRuleFormValues = {
|
|
68
|
+
name: string;
|
|
69
|
+
status: string;
|
|
70
|
+
notes: string | null;
|
|
71
|
+
enabled: boolean;
|
|
72
|
+
startDate: string | null;
|
|
73
|
+
endDate: string | null;
|
|
74
|
+
conditions: NetworkRuleConditionFormValues[];
|
|
75
|
+
};
|
|
76
|
+
/** Handed back with the submitted rule. */
|
|
77
|
+
export type NetworkRuleSubmitExtras = {
|
|
78
|
+
/** Note presets added while editing, not yet in `notePresets`. */
|
|
79
|
+
newNotePresets: string[];
|
|
80
|
+
};
|
|
81
|
+
/** A server validation error; `index` points at the offending condition. */
|
|
82
|
+
export type NetworkRuleServerError = {
|
|
83
|
+
index?: number;
|
|
84
|
+
key?: string;
|
|
85
|
+
operator?: string;
|
|
86
|
+
code: string;
|
|
87
|
+
message?: string;
|
|
88
|
+
};
|
|
89
|
+
export type NetworkRuleSourceSearchParams = {
|
|
90
|
+
search?: string;
|
|
91
|
+
limit?: number;
|
|
92
|
+
skip?: number;
|
|
93
|
+
};
|
|
94
|
+
export type NetworkRuleRenderOption<TData = unknown> = (option: NetworkRuleOption<TData>) => ReactNode;
|
|
95
|
+
/** Receives the props the default chip would get; spread them to keep size, deletion and keyboard behaviour. */
|
|
96
|
+
export type NetworkRuleRenderChip<TData = unknown> = (option: NetworkRuleOption<TData>, chipProps: ChipProps) => ReactNode;
|
|
97
|
+
/** One remote option source, keyed by `NetworkRuleKeyDef.values.source`. */
|
|
98
|
+
export type NetworkRuleSourceService<TData = unknown> = {
|
|
99
|
+
search: (params: NetworkRuleSourceSearchParams, signal?: AbortSignal) => Promise<Array<NetworkRuleOption<TData>>>;
|
|
100
|
+
/** Labels for stored values. Without it they render as their raw string. */
|
|
101
|
+
resolve?: (values: string[], signal?: AbortSignal) => Promise<Array<NetworkRuleOption<TData>>>;
|
|
102
|
+
renderOption?: NetworkRuleRenderOption<TData>;
|
|
103
|
+
renderChip?: NetworkRuleRenderChip<TData>;
|
|
104
|
+
searchPlaceholder?: string;
|
|
105
|
+
};
|
|
106
|
+
export type NetworkRulesServices = {
|
|
107
|
+
/** Namespaces the query keys when several providers share one query client, e.g. `${env}:${brandUuid}`. */
|
|
108
|
+
scope?: string;
|
|
109
|
+
getCatalog: (signal?: AbortSignal) => Promise<NetworkRuleCatalog>;
|
|
110
|
+
sources?: Record<string, NetworkRuleSourceService<any>>;
|
|
111
|
+
/** Shared with the host app; otherwise the provider creates its own. */
|
|
112
|
+
queryClient?: QueryClient;
|
|
113
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { NetworkRuleCatalog, NetworkRuleKeyDef, NetworkRuleOption } from '../types';
|
|
2
|
+
export declare function getKeyDef(catalog: NetworkRuleCatalog | undefined, key: string): NetworkRuleKeyDef | undefined;
|
|
3
|
+
export declare function getKeyLabel(catalog: NetworkRuleCatalog | undefined, key: string): string;
|
|
4
|
+
export declare function getOperatorLabel(catalog: NetworkRuleCatalog | undefined, operator: string): string;
|
|
5
|
+
/** Unknown operators count as multi, so the editor is never stricter than the catalog. */
|
|
6
|
+
export declare function isOperatorMulti(catalog: NetworkRuleCatalog | undefined, operator: string): boolean;
|
|
7
|
+
export declare function getStatusLabel(status: string): string;
|
|
8
|
+
export declare function hasInlineOptions(keyDef: NetworkRuleKeyDef | undefined): keyDef is NetworkRuleKeyDef & {
|
|
9
|
+
values: {
|
|
10
|
+
source: string;
|
|
11
|
+
options: NetworkRuleOption[];
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export declare function hasRemoteSource(keyDef: NetworkRuleKeyDef | undefined): keyDef is NetworkRuleKeyDef & {
|
|
15
|
+
values: {
|
|
16
|
+
source: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
/** One option per value, in order; a value `options` lacks is labelled by itself. */
|
|
20
|
+
export declare function toOptions(values: readonly string[], options: readonly NetworkRuleOption[]): NetworkRuleOption[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{getStatusPresentation as o}from"../statuses.mjs";function r(e,t){return e?.keys.find(l=>l.key===t)}function u(e,t){var l;return((l=r(e,t))==null?void 0:l.label)??t}function i(e,t){var l;return((l=e?.operators[t])==null?void 0:l.label)??t}function s(e,t){var l;return((l=e?.operators[t])==null?void 0:l.multi)??!0}function v(e){return o(e).label}function a(e){var t;return Array.isArray((t=e?.values)==null?void 0:t.options)}function f(e){var t;return!a(e)&&typeof((t=e?.values)==null?void 0:t.source)=="string"&&e.values.source.length>0}function d(e,t){return e.map(l=>t.find(n=>n.value===l)??{value:l,label:l})}export{r as getKeyDef,u as getKeyLabel,i as getOperatorLabel,v as getStatusLabel,a as hasInlineOptions,f as hasRemoteSource,s as isOperatorMulti,d as toOptions};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { NetworkRule, NetworkRuleConditionFormValues, NetworkRuleData, NetworkRuleFormValues } from '../types';
|
|
2
|
+
export declare function normalizeConditionValues(value: string | string[] | null | undefined): string[];
|
|
3
|
+
export declare function emptyConditionFormValues(): NetworkRuleConditionFormValues;
|
|
4
|
+
export declare function toNetworkRuleFormValues(rule?: Partial<NetworkRule> | null): NetworkRuleFormValues;
|
|
5
|
+
export declare function fromNetworkRuleFormValues(values: NetworkRuleFormValues): NetworkRuleData;
|
|
6
|
+
/** Case-insensitive, trimmed, blanks dropped; keeps the first spelling seen. */
|
|
7
|
+
export declare function dedupeValues(values: readonly string[]): string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function l(e){return Array.isArray(e)?e:e==null||e===""?[]:[e]}function t(){return{key:"",operator:"",values:[]}}function u(e){return{name:e?.name??"",status:e?.status??"",notes:e?.notes??null,enabled:e?.enabled??!0,startDate:e?.startDate??null,endDate:e?.endDate??null,conditions:(e?.conditions??[]).map(n=>({key:n.key,operator:n.operator,values:l(n.value)}))}}function i(e){var n;return{name:e.name.trim(),status:e.status,notes:(n=e.notes)!=null&&n.trim()?e.notes.trim():null,enabled:e.enabled,startDate:e.startDate,endDate:e.endDate,conditions:e.conditions.map(o=>({key:o.key,operator:o.operator,value:o.values}))}}function d(e){const n=new Set,o=[];for(const s of e){const a=s.trim();if(!a)continue;const r=a.toLowerCase();n.has(r)||(n.add(r),o.push(a))}return o}export{d as dedupeValues,t as emptyConditionFormValues,i as fromNetworkRuleFormValues,l as normalizeConditionValues,u as toNetworkRuleFormValues};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** `YYYY-MM-DD` → a local Date on that day, for pickers. */
|
|
2
|
+
export declare function ruleDateToDay(value?: string | null): Date | null;
|
|
3
|
+
/** A picked Date → `YYYY-MM-DD` from its local calendar fields. */
|
|
4
|
+
export declare function dayToRuleDate(date?: Date | null): string | null;
|
|
5
|
+
/** `YYYY-MM-DD` → "October 1, 2026". */
|
|
6
|
+
export declare function formatRuleDate(value?: string | null): string | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{format as l}from"date-fns";const s=/^(\d{4})-(\d{2})-(\d{2})$/;function o(e){const n=e?s.exec(e):null;if(!n)return null;const[u,r,a]=n.slice(1).map(Number),t=new Date(u,r-1,a);return t.getFullYear()===u&&t.getMonth()===r-1&&t.getDate()===a?t:null}function y(e){return!e||Number.isNaN(e.getTime())?null:l(e,"yyyy-MM-dd")}function c(e){const n=o(e);return n?l(n,"MMMM d, yyyy"):null}export{y as dayToRuleDate,c as formatRuleDate,o as ruleDateToDay};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AvatarProps } from '@mui/material';
|
|
2
|
+
export interface LogoAvatarProps extends Omit<AvatarProps, 'src' | 'children'> {
|
|
3
|
+
/** Entity name; its first letter is the fallback when there is no (working) logo. */
|
|
4
|
+
name: string;
|
|
5
|
+
logoUrl?: string | null;
|
|
6
|
+
/** Width and height in px. Defaults to 32. */
|
|
7
|
+
size?: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Rounded-square avatar showing an entity's logo, falling back to its initial
|
|
11
|
+
* on a primary background when the logo is missing or fails to load. Matches
|
|
12
|
+
* the payer avatar in the 1-Click health insurance field.
|
|
13
|
+
*/
|
|
14
|
+
export declare function LogoAvatar({ name, logoUrl, size, sx, slotProps, ...avatarProps }: Readonly<LogoAvatarProps>): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{useState as u}from"react";import{Avatar as d}from"@mui/material";import{jsx as p}from"react/jsx-runtime";function g({name:s,logoUrl:r,size:o=32,sx:a,slotProps:t,...l}){var i;const[e,m]=u(null),n=r&&r!==e?r:void 0;return p(d,{src:n,alt:`${s} logo`,variant:"rounded",...l,sx:[{width:o,height:o,fontSize:Math.round(o*.5),borderRadius:1,bgcolor:n?"transparent":"primary.main"},...Array.isArray(a)?a:[a]],slotProps:{...t,img:{...t?.img,onError:()=>{m(r??null)}}},children:(i=s.trim()[0])==null?void 0:i.toUpperCase()})}export{g as LogoAvatar};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ChipProps } from '@mui/material';
|
|
2
|
+
export interface LogoChipProps extends Omit<ChipProps, 'avatar'> {
|
|
3
|
+
/** Entity name; drives the avatar's fallback initial. Pass `label` separately for the chip text. */
|
|
4
|
+
name: string;
|
|
5
|
+
logoUrl?: string | null;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* A chip carrying a `LogoAvatar`. The avatar is a rounded square, so it is
|
|
9
|
+
* inset a little further than MUI's default round avatar to keep the pill's
|
|
10
|
+
* curve from clipping its corners. MUI paints chip avatars in gray text, which
|
|
11
|
+
* would swallow the fallback initial on its primary background, so the initial
|
|
12
|
+
* is pinned to the primary contrast color.
|
|
13
|
+
*/
|
|
14
|
+
export declare function LogoChip({ name, logoUrl, label, sx, ...chipProps }: Readonly<LogoChipProps>): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{Chip as l}from"@mui/material";import{LogoAvatar as p}from"./LogoAvatar.mjs";import{jsx as o}from"react/jsx-runtime";function s({name:r,logoUrl:t,label:i,sx:a,...m}){return o(l,{...m,label:i??r,avatar:o(p,{name:r,logoUrl:t}),sx:[{"& .MuiChip-avatar":{marginLeft:"10px",color:"primary.contrastText"}},...Array.isArray(a)?a:[a]]})}export{s as LogoChip};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{Paragraph as a}from"./typographies/Paragraph.mjs";import{SectionHeader as r}from"./typographies/SectionHeader.mjs";import{PageHeader as e}from"./typographies/PageHeader.mjs";import{PageSectionHeader as t}from"./typographies/PageSectionHeader.mjs";import{Typography as o}from"./Typography/index.mjs";import{CredentialRequestsEditor as i}from"./CredentialRequestsEditor/index.mjs";import{When as s}from"./When.mjs";import{Image as m}from"./Image.mjs";import{QRCodeDisplay as n}from"./QRCodeDisplay/index.mjs";import{CustomAlertComponent as p,useSnackbar as l}from"./Snackbar/index.mjs";import{Backdrop as f}from"./Backdrop/index.mjs";import{Button as d}from"./Button/index.mjs";import{BrandFilterInput as c}from"./BrandFilterInput/index.mjs";import{SeriesChart as C}from"./chart/SeriesChart/index.mjs";import{SeriesChartLegend as u}from"./chart/SeriesChartLegend/index.mjs";import{SeriesPercentageChart as T}from"./chart/SeriesPercentageChart/index.mjs";import{BigNumber as h}from"./chart/BigNumber/index.mjs";import{SimpleBarChart as B}from"./chart/SimpleBarChart/index.mjs";import{AreaChart as g}from"./chart/AreaChart/index.mjs";import{ErrorCodesChart as S}from"./chart/ErrorCodesChart/index.mjs";import{ReasonCodesChart as P}from"./chart/ReasonCodesChart/index.mjs";import{PieChart as D}from"./chart/PieChart/index.mjs";import{RiskScorePieChart as v}from"./chart/RiskScorePieChart/index.mjs";import{RiskScoreBarChart as F}from"./chart/RiskScoreBarChart/index.mjs";import{SimpleLegend as b}from"./chart/SimpleLegend/index.mjs";import{LoadingChartSection as I}from"./chart/LoadingChartSection.mjs";import{EmptyChartSection as O}from"./chart/EmptyChartSection.mjs";import{MetricLastUpdated as L}from"./chart/MetricLastUpdated.mjs";import{FunnelChart as y}from"./chart/FunnelChart/index.mjs";import{ConversionOverTimeChart as E,normalizePercentData as k}from"./chart/ConversionOverTimeChart/index.mjs";import{WhenStyled as A}from"./WhenStyled.mjs";import{RequiredLabel as V}from"./RequiredLabel/index.mjs";import{CopyableUuid as R}from"./CopyableUuid/index.mjs";import{Tip as x}from"./Tip/index.mjs";import{AcceptTermsNotice as N}from"./terms/AcceptTermsNotice.mjs";import{AdaptativeBox as M}from"./UI/AdaptativeBox.mjs";import{AddressInput as w}from"./form/AddressInput/index.mjs";import{Alert as W}from"./Alert/Alert.mjs";import{BILLABLE_PRODUCTS as H,BillableProduct as z}from"./chart/BillableEventsTable/BillableEventsTable.types.mjs";import{Banner as _}from"./Banners/Banner.mjs";import{BasePhoneInput as U}from"./form/BasePhoneInput.mjs";import{BillableEventsProductTable as q}from"./chart/BillableEventsProductTable/BillableEventsProductTable.mjs";import{BillableEventsTable as Q}from"./chart/BillableEventsTable/BillableEventsTable.mjs";import{BrandDetailsPanel as K}from"./chart/BillableEventsTable/BrandDetailsPanel.mjs";import{CalendlyDialog as Y,CalendlyDialogComponent as X}from"./dialog/CalendlyDialog.mjs";import{ContentWithLoader as $}from"./UI/ContentWithLoader.mjs";import{CustomDialog as j}from"./dialog/Dialog.mjs";import{DataTable as G}from"./DataTable/DataTable.mjs";import{DateInput as J}from"./form/DateInput/index.mjs";import{DateRangeInput as Z}from"./form/DateRangeInput/index.mjs";import{DefaultInput as aa}from"./form/DefaultInput.mjs";import{EmailInput as ra}from"./form/EmailInput.mjs";import{ExactBirthdayBanner as ea}from"./Banners/ExactBirthdayBanner.mjs";import{ExportToPdfButton as ta}from"./buttons/ExportToPdfButton.mjs";import{Form as oa}from"./form/NewOneClickForm/core/form/form.mjs";import{FormBuilder as ia}from"./form/NewOneClickForm/core/form/formBuilder.mjs";import{FormField as sa}from"./form/NewOneClickForm/core/form/formField.mjs";import{FormFieldBuilder as ma}from"./form/NewOneClickForm/core/form/formFieldBuilder.mjs";import{FormProvider as na,useForm as pa}from"./form/NewOneClickForm/react/core/form.context.mjs";import{FullWidthAlert as la}from"./Alert/FullWidthAlert.mjs";import{IconPlayer as fa}from"./icons/IconPlayer.mjs";import{LegalLink as da}from"./terms/LegalLink.mjs";import{LinkButton as ca}from"./buttons/LinkButton.mjs";import{LogDetailPanel as Ca}from"./logs/LogsTable/LogDetailPanel.mjs";import{LogsInfoAlert as ua}from"./logs/LogsInfoAlert/LogsInfoAlert.mjs";import{LogsTable as Ta}from"./logs/LogsTable/LogsTable.mjs";import{NPIInput as ha}from"./form/NPIInput/index.mjs";import{NewOneClickForm as Ba}from"./form/NewOneClickForm/react/ui/form.mjs";import{OTPInput as ga}from"./form/OTPInput.mjs";import{OneClickVerificationEventsOverTimeChart as Sa}from"./chart/OneClickVerificationEventsOverTimeChart/OneClickVerificationEventsOverTimeChart.mjs";import{OneClickVerificationFunnelChart as Pa}from"./chart/OneClickVerificationFunnelChart/OneClickVerificationFunnelChart.mjs";import{OneClickVerificationSuccessOverTimeChart as Da}from"./chart/OneClickVerificationSuccessOverTimeChart/OneClickVerificationSuccessOverTimeChart.mjs";import{OriginalButton as va}from"./buttons/OriginalButton.mjs";import{OverviewBigNumbers as Fa}from"./chart/OverviewBigNumbers/OverviewBigNumbers.mjs";import{PersistentDialog as ba}from"./dialog/PersistentDialog.mjs";import{PhoneInput as Ia}from"./form/PhoneInput.mjs";import{PoweredByVerified as Oa}from"./verified/powered-by-verified/index.mjs";import{PrettyPhoneInput as La}from"./form/PrettyPhoneInput.mjs";import{PrivacyPolicyNotice as ya}from"./terms/PrivacyPolicyNotice.mjs";import{RadioOption as Ea}from"./form/RadioOption.mjs";import{ResendPhoneBanner as ka}from"./Banners/ResendPhoneBanner.mjs";import{SSNInput as Aa}from"./form/SSNInput.mjs";import{SelectInput as Va}from"./form/SelectInput.mjs";import{SnackbarProvider as Ra}from"notistack";import{SynchronizedMetricsChart as xa,TOTAL_DATA_KEY as Na,enrichWithTotal as Ma,mergeChartData as wa}from"./chart/SynchronizedMetricsChart/SynchronizedMetricsChart.mjs";import{TTSMagicButton as Wa}from"./text-to-signup/magic-button.mjs";import{TTSMagicLegalLanguage as Ha}from"./text-to-signup/magic-legal-language.mjs";import{TTSMagicQRCode as za}from"./text-to-signup/magic-qr-code.mjs";import{TTSOverTimeChart as _a}from"./chart/TTSOverTimeChart/TTSOverTimeChart.mjs";import{TestPhoneNumbersBanner as Ua}from"./Banners/TestPhoneNumbersBanner.mjs";import{TextButton as qa}from"./buttons/TextButton.mjs";import{TimezoneInput as Qa}from"./form/TimezoneInput/index.mjs";import{VerifiedImage as Ka}from"./verified/VerifiedImage.mjs";import{VerifiedIncLogo as Ya}from"./verified/VerifiedIncLogo.mjs";import{applyFieldFilters as Xa,buildInitialFilterState as $a,effectiveFilterFieldCount as ja,emptyFieldValue as Ga,isFilterFieldActive as Ja}from"./DataTable/DataTable.filterState.mjs";import{applySearch as Za,getLeafAccessorsById as ar}from"./DataTable/DataTable.filters.mjs";import{defaultOverviewMetrics as rr}from"./chart/OverviewBigNumbers/OverviewBigNumbers.types.mjs";import{exportBillableEventsToCsv as er}from"./chart/BillableEventsTable/exportBillableEventsToCsv.mjs";import{exportDataTableToCsv as tr,exportDataTableToExcel as or,getDataTableExportModel as ir,printDataTable as sr}from"./DataTable/DataTable.export.mjs";import{formatBillableMetric as mr,formatChallengeInput as nr,formatHealthDataProviderMode as pr,formatPromptForChallenge as lr}from"./chart/BillableEventsTable/format.mjs";import{mapBillableEventsProductTableData as fr}from"./chart/BillableEventsProductTable/BillableEventsProductTableDataMapper.mjs";import{mapBillableEventsTableData as dr}from"./chart/BillableEventsTable/BillableEventsTableDataMapper.mjs";import{mapOneClickVerificationAreaSeriesData as cr}from"./chart/OneClickVerificationEventsOverTimeChart/OneClickVerificationEventsOverTimeChart.map.mjs";import{mapOneClickVerificationFunnelChartData as Cr}from"./chart/OneClickVerificationFunnelChart/OneClickVerificationFunnelChart.map.mjs";import{mapOneClickVerificationSuccessOverTimeChartData as ur}from"./chart/OneClickVerificationSuccessOverTimeChart/OneClickVerificationSuccessOverTimeChart.map.mjs";import{mapSeriesTimeSeriesData as Tr}from"./chart/SeriesChart/SeriesChart.map.mjs";import{mapTTSTimeSeriesData as hr}from"./chart/TTSOverTimeChart/TTSOverTimeChart.map.mjs";import{toCreatePatchCredentials as Br}from"./form/NewOneClickForm/core/mappers/create-patch.map.mjs";import{toOption as gr,useBrandFilterInput as Sr}from"./BrandFilterInput/BrandFilterInput.hook.mjs";import{toShareCredentials as Pr}from"./form/NewOneClickForm/core/mappers/share.map.mjs";export{N as AcceptTermsNotice,M as AdaptativeBox,w as AddressInput,W as Alert,g as AreaChart,H as BILLABLE_PRODUCTS,f as Backdrop,_ as Banner,U as BasePhoneInput,h as BigNumber,q as BillableEventsProductTable,Q as BillableEventsTable,z as BillableProduct,K as BrandDetailsPanel,c as BrandFilterInput,d as Button,Y as CalendlyDialog,X as CalendlyDialogComponent,$ as ContentWithLoader,E as ConversionOverTimeChart,R as CopyableUuid,i as CredentialRequestsEditor,p as CustomAlertComponent,j as CustomDialog,G as DataTable,J as DateInput,Z as DateRangeInput,aa as DefaultInput,ra as EmailInput,O as EmptyChartSection,S as ErrorCodesChart,ea as ExactBirthdayBanner,ta as ExportToPdfButton,oa as Form,ia as FormBuilder,sa as FormField,ma as FormFieldBuilder,na as FormProvider,la as FullWidthAlert,y as FunnelChart,fa as IconPlayer,m as Image,da as LegalLink,ca as LinkButton,I as LoadingChartSection,Ca as LogDetailPanel,ua as LogsInfoAlert,Ta as LogsTable,L as MetricLastUpdated,ha as NPIInput,Ba as NewOneClickForm,ga as OTPInput,Sa as OneClickVerificationEventsOverTimeChart,Pa as OneClickVerificationFunnelChart,Da as OneClickVerificationSuccessOverTimeChart,va as OriginalButton,Fa as OverviewBigNumbers,e as PageHeader,t as PageSectionHeader,a as Paragraph,ba as PersistentDialog,Ia as PhoneInput,D as PieChart,Oa as PoweredByVerified,La as PrettyPhoneInput,ya as PrivacyPolicyNotice,n as QRCodeDisplay,Ea as RadioOption,P as ReasonCodesChart,V as RequiredLabel,ka as ResendPhoneBanner,F as RiskScoreBarChart,v as RiskScorePieChart,Aa as SSNInput,r as SectionHeader,Va as SelectInput,C as SeriesChart,u as SeriesChartLegend,T as SeriesPercentageChart,B as SimpleBarChart,b as SimpleLegend,Ra as SnackbarProvider,xa as SynchronizedMetricsChart,Na as TOTAL_DATA_KEY,Wa as TTSMagicButton,Ha as TTSMagicLegalLanguage,za as TTSMagicQRCode,_a as TTSOverTimeChart,Ua as TestPhoneNumbersBanner,qa as TextButton,Qa as TimezoneInput,x as Tip,o as Typography,Ka as VerifiedImage,Ya as VerifiedIncLogo,s as When,A as WhenStyled,Xa as applyFieldFilters,Za as applySearch,$a as buildInitialFilterState,rr as defaultOverviewMetrics,ja as effectiveFilterFieldCount,Ga as emptyFieldValue,Ma as enrichWithTotal,er as exportBillableEventsToCsv,tr as exportDataTableToCsv,or as exportDataTableToExcel,mr as formatBillableMetric,nr as formatChallengeInput,pr as formatHealthDataProviderMode,lr as formatPromptForChallenge,ir as getDataTableExportModel,ar as getLeafAccessorsById,Ja as isFilterFieldActive,fr as mapBillableEventsProductTableData,dr as mapBillableEventsTableData,cr as mapOneClickVerificationAreaSeriesData,Cr as mapOneClickVerificationFunnelChartData,ur as mapOneClickVerificationSuccessOverTimeChartData,Tr as mapSeriesTimeSeriesData,hr as mapTTSTimeSeriesData,wa as mergeChartData,k as normalizePercentData,sr as printDataTable,Br as toCreatePatchCredentials,gr as toOption,Pr as toShareCredentials,Sr as useBrandFilterInput,pa as useForm,l as useSnackbar};
|
|
1
|
+
"use strict";import{Paragraph as a}from"./typographies/Paragraph.mjs";import{SectionHeader as e}from"./typographies/SectionHeader.mjs";import{PageHeader as r}from"./typographies/PageHeader.mjs";import{PageSectionHeader as o}from"./typographies/PageSectionHeader.mjs";import{Typography as t}from"./Typography/index.mjs";import{CredentialRequestsEditor as s}from"./CredentialRequestsEditor/index.mjs";import{When as i}from"./When.mjs";import{Image as m}from"./Image.mjs";import{QRCodeDisplay as l}from"./QRCodeDisplay/index.mjs";import{CustomAlertComponent as n,useSnackbar as p}from"./Snackbar/index.mjs";import{Backdrop as u}from"./Backdrop/index.mjs";import{Button as f}from"./Button/index.mjs";import{BrandFilterInput as d}from"./BrandFilterInput/index.mjs";import{SeriesChart as C}from"./chart/SeriesChart/index.mjs";import{SeriesChartLegend as c}from"./chart/SeriesChartLegend/index.mjs";import{SeriesPercentageChart as T}from"./chart/SeriesPercentageChart/index.mjs";import{BigNumber as h}from"./chart/BigNumber/index.mjs";import{SimpleBarChart as S}from"./chart/SimpleBarChart/index.mjs";import{AreaChart as g}from"./chart/AreaChart/index.mjs";import{ErrorCodesChart as D}from"./chart/ErrorCodesChart/index.mjs";import{ReasonCodesChart as R}from"./chart/ReasonCodesChart/index.mjs";import{PieChart as P}from"./chart/PieChart/index.mjs";import{RiskScorePieChart as k}from"./chart/RiskScorePieChart/index.mjs";import{RiskScoreBarChart as N}from"./chart/RiskScoreBarChart/index.mjs";import{SimpleLegend as B}from"./chart/SimpleLegend/index.mjs";import{LoadingChartSection as O}from"./chart/LoadingChartSection.mjs";import{EmptyChartSection as F}from"./chart/EmptyChartSection.mjs";import{MetricLastUpdated as I}from"./chart/MetricLastUpdated.mjs";import{FunnelChart as b}from"./chart/FunnelChart/index.mjs";import{ConversionOverTimeChart as E,normalizePercentData as L}from"./chart/ConversionOverTimeChart/index.mjs";import{WhenStyled as v}from"./WhenStyled.mjs";import{RequiredLabel as w}from"./RequiredLabel/index.mjs";import{CopyableUuid as y}from"./CopyableUuid/index.mjs";import{Tip as A}from"./Tip/index.mjs";import{NETWORK_RULE_STATUSES as V,getStatusPresentation as _}from"./NetworkRules/statuses.mjs";import{NetworkRulesProvider as x,useNetworkRuleStatuses as M,useNetworkRulesServices as W}from"./NetworkRules/NetworkRules.context.mjs";import{AcceptTermsNotice as U}from"./terms/AcceptTermsNotice.mjs";import{AdaptativeBox as H}from"./UI/AdaptativeBox.mjs";import{AddressInput as K}from"./form/AddressInput/index.mjs";import{Alert as z}from"./Alert/Alert.mjs";import{BILLABLE_PRODUCTS as X,BillableProduct as q}from"./chart/BillableEventsTable/BillableEventsTable.types.mjs";import{Banner as Q}from"./Banners/Banner.mjs";import{BasePhoneInput as Y}from"./form/BasePhoneInput.mjs";import{BillableEventsProductTable as $}from"./chart/BillableEventsProductTable/BillableEventsProductTable.mjs";import{BillableEventsTable as G}from"./chart/BillableEventsTable/BillableEventsTable.mjs";import{BrandDetailsPanel as J}from"./chart/BillableEventsTable/BrandDetailsPanel.mjs";import{CalendlyDialog as Z,CalendlyDialogComponent as j}from"./dialog/CalendlyDialog.mjs";import{ConditionValuesInput as aa}from"./NetworkRules/editor/fields/ConditionValuesInput.mjs";import{ContentWithLoader as ea}from"./UI/ContentWithLoader.mjs";import{CustomDialog as ra}from"./dialog/Dialog.mjs";import{DataTable as oa}from"./DataTable/DataTable.mjs";import{DateField as ta}from"./NetworkRules/editor/fields/DateField.mjs";import{DateInput as sa}from"./form/DateInput/index.mjs";import{DateRangeInput as ia}from"./form/DateRangeInput/index.mjs";import{DefaultInput as ma}from"./form/DefaultInput.mjs";import{EXPANDED_ROW_PANEL_SX as la,EXPAND_COLUMN_ID as na,EXPAND_TRANSITION_MS as pa,ExpandRowToggle as ua,expandColumn as fa}from"./DataTable/DataTableExpandRow.mjs";import{EmailInput as da}from"./form/EmailInput.mjs";import{ExactBirthdayBanner as Ca}from"./Banners/ExactBirthdayBanner.mjs";import{ExportToPdfButton as ca}from"./buttons/ExportToPdfButton.mjs";import{Form as Ta}from"./form/NewOneClickForm/core/form/form.mjs";import{FormBuilder as ha}from"./form/NewOneClickForm/core/form/formBuilder.mjs";import{FormField as Sa}from"./form/NewOneClickForm/core/form/formField.mjs";import{FormFieldBuilder as ga}from"./form/NewOneClickForm/core/form/formFieldBuilder.mjs";import{FormProvider as Da,useForm as Ra}from"./form/NewOneClickForm/react/core/form.context.mjs";import{FullWidthAlert as Pa}from"./Alert/FullWidthAlert.mjs";import{IconPlayer as ka}from"./icons/IconPlayer.mjs";import{LegalLink as Na}from"./terms/LegalLink.mjs";import{LinkButton as Ba}from"./buttons/LinkButton.mjs";import{LogDetailPanel as Oa}from"./logs/LogsTable/LogDetailPanel.mjs";import{LogoAvatar as Fa}from"./UI/LogoAvatar.mjs";import{LogoChip as Ia}from"./UI/LogoChip.mjs";import{LogsInfoAlert as ba}from"./logs/LogsInfoAlert/LogsInfoAlert.mjs";import{LogsTable as Ea}from"./logs/LogsTable/LogsTable.mjs";import{NETWORK_RULES_COLUMN_IDS as La,buildNetworkRulesColumns as va}from"./NetworkRules/table/columns.mjs";import{NPIInput as wa}from"./form/NPIInput/index.mjs";import{NetworkRuleConditionsTable as ya}from"./NetworkRules/table/NetworkRuleConditionsTable.mjs";import{NetworkRuleDeleteDialog as Aa}from"./NetworkRules/dialog/NetworkRuleDeleteDialog.mjs";import{NetworkRuleDiscardDialog as Va}from"./NetworkRules/dialog/NetworkRuleDiscardDialog.mjs";import{NetworkRuleEditorDialog as _a}from"./NetworkRules/editor/NetworkRuleEditorDialog.mjs";import{NetworkRuleEditorForm as xa}from"./NetworkRules/editor/NetworkRuleEditorForm.mjs";import{NetworkRuleExpandedPanel as Ma}from"./NetworkRules/table/NetworkRuleExpandedPanel.mjs";import{NetworkRuleRow as Wa}from"./NetworkRules/table/NetworkRuleRow.mjs";import{NetworkRulesTable as Ua}from"./NetworkRules/table/NetworkRulesTable.mjs";import{NetworkStatusChip as Ha}from"./NetworkRules/shared/NetworkStatusChip.mjs";import{NewOneClickForm as Ka}from"./form/NewOneClickForm/react/ui/form.mjs";import{OTPInput as za}from"./form/OTPInput.mjs";import{OneClickVerificationEventsOverTimeChart as Xa}from"./chart/OneClickVerificationEventsOverTimeChart/OneClickVerificationEventsOverTimeChart.mjs";import{OneClickVerificationFunnelChart as qa}from"./chart/OneClickVerificationFunnelChart/OneClickVerificationFunnelChart.mjs";import{OneClickVerificationSuccessOverTimeChart as Qa}from"./chart/OneClickVerificationSuccessOverTimeChart/OneClickVerificationSuccessOverTimeChart.mjs";import{OptionChips as Ya}from"./NetworkRules/shared/OptionChips.mjs";import{OriginalButton as $a}from"./buttons/OriginalButton.mjs";import{OverviewBigNumbers as Ga}from"./chart/OverviewBigNumbers/OverviewBigNumbers.mjs";import{PersistentDialog as Ja}from"./dialog/PersistentDialog.mjs";import{PhoneInput as Za}from"./form/PhoneInput.mjs";import{PoweredByVerified as ja}from"./verified/powered-by-verified/index.mjs";import{PrettyPhoneInput as ae}from"./form/PrettyPhoneInput.mjs";import{PrivacyPolicyNotice as ee}from"./terms/PrivacyPolicyNotice.mjs";import{RadioOption as re}from"./form/RadioOption.mjs";import{ResendPhoneBanner as oe}from"./Banners/ResendPhoneBanner.mjs";import{SSNInput as te}from"./form/SSNInput.mjs";import{SelectInput as se}from"./form/SelectInput.mjs";import{SnackbarProvider as ie}from"notistack";import{SynchronizedMetricsChart as me,TOTAL_DATA_KEY as le,enrichWithTotal as ne,mergeChartData as pe}from"./chart/SynchronizedMetricsChart/SynchronizedMetricsChart.mjs";import{TTSMagicButton as ue}from"./text-to-signup/magic-button.mjs";import{TTSMagicLegalLanguage as fe}from"./text-to-signup/magic-legal-language.mjs";import{TTSMagicQRCode as de}from"./text-to-signup/magic-qr-code.mjs";import{TTSOverTimeChart as Ce}from"./chart/TTSOverTimeChart/TTSOverTimeChart.mjs";import{TestPhoneNumbersBanner as ce}from"./Banners/TestPhoneNumbersBanner.mjs";import{TextButton as Te}from"./buttons/TextButton.mjs";import{TimezoneInput as he}from"./form/TimezoneInput/index.mjs";import{VerifiedImage as Se}from"./verified/VerifiedImage.mjs";import{VerifiedIncLogo as ge}from"./verified/VerifiedIncLogo.mjs";import{applyFieldFilters as De,buildInitialFilterState as Re,effectiveFilterFieldCount as Pe,emptyFieldValue as ke,isFilterFieldActive as Ne}from"./DataTable/DataTable.filterState.mjs";import{applySearch as Be,getLeafAccessorsById as Oe}from"./DataTable/DataTable.filters.mjs";import{dayToRuleDate as Fe,formatRuleDate as Ie,ruleDateToDay as be}from"./NetworkRules/utils/date.mjs";import{dedupeValues as Ee,emptyConditionFormValues as Le,fromNetworkRuleFormValues as ve,normalizeConditionValues as we,toNetworkRuleFormValues as ye}from"./NetworkRules/utils/condition.mjs";import{defaultOverviewMetrics as Ae}from"./chart/OverviewBigNumbers/OverviewBigNumbers.types.mjs";import{exportBillableEventsToCsv as Ve}from"./chart/BillableEventsTable/exportBillableEventsToCsv.mjs";import{exportDataTableToCsv as _e,exportDataTableToExcel as xe,getDataTableExportModel as Me,printDataTable as We}from"./DataTable/DataTable.export.mjs";import{formatBillableMetric as Ue,formatChallengeInput as He,formatHealthDataProviderMode as Ke,formatPromptForChallenge as ze}from"./chart/BillableEventsTable/format.mjs";import{getKeyDef as Xe,getKeyLabel as qe,getOperatorLabel as Qe,getStatusLabel as Ye,hasInlineOptions as $e,hasRemoteSource as Ge,isOperatorMulti as Je,toOptions as Ze}from"./NetworkRules/utils/catalog.mjs";import{mapBillableEventsProductTableData as je}from"./chart/BillableEventsProductTable/BillableEventsProductTableDataMapper.mjs";import{mapBillableEventsTableData as ar}from"./chart/BillableEventsTable/BillableEventsTableDataMapper.mjs";import{mapOneClickVerificationAreaSeriesData as er}from"./chart/OneClickVerificationEventsOverTimeChart/OneClickVerificationEventsOverTimeChart.map.mjs";import{mapOneClickVerificationFunnelChartData as rr}from"./chart/OneClickVerificationFunnelChart/OneClickVerificationFunnelChart.map.mjs";import{mapOneClickVerificationSuccessOverTimeChartData as or}from"./chart/OneClickVerificationSuccessOverTimeChart/OneClickVerificationSuccessOverTimeChart.map.mjs";import{mapSeriesTimeSeriesData as tr}from"./chart/SeriesChart/SeriesChart.map.mjs";import{mapTTSTimeSeriesData as sr}from"./chart/TTSOverTimeChart/TTSOverTimeChart.map.mjs";import{networkRuleConditionFormSchema as ir,networkRuleFormSchema as mr}from"./NetworkRules/editor/schema.mjs";import{toCreatePatchCredentials as lr}from"./form/NewOneClickForm/core/mappers/create-patch.map.mjs";import{toOption as nr,useBrandFilterInput as pr}from"./BrandFilterInput/BrandFilterInput.hook.mjs";import{toShareCredentials as ur}from"./form/NewOneClickForm/core/mappers/share.map.mjs";import{useHeldWhileClosed as fr}from"./NetworkRules/hooks/useHeldWhileClosed.mjs";import{useNetworkRuleSourceSearch as dr}from"./NetworkRules/hooks/useNetworkRuleSourceSearch.mjs";import{useNetworkRulesCatalog as Cr}from"./NetworkRules/hooks/useNetworkRulesCatalog.mjs";import{useNetworkRulesDialogs as cr}from"./NetworkRules/hooks/useNetworkRulesDialogs.mjs";import{useResolvedConditionOptions as Tr}from"./NetworkRules/hooks/useResolvedConditionOptions.mjs";export{U as AcceptTermsNotice,H as AdaptativeBox,K as AddressInput,z as Alert,g as AreaChart,X as BILLABLE_PRODUCTS,u as Backdrop,Q as Banner,Y as BasePhoneInput,h as BigNumber,$ as BillableEventsProductTable,G as BillableEventsTable,q as BillableProduct,J as BrandDetailsPanel,d as BrandFilterInput,f as Button,Z as CalendlyDialog,j as CalendlyDialogComponent,aa as ConditionValuesInput,ea as ContentWithLoader,E as ConversionOverTimeChart,y as CopyableUuid,s as CredentialRequestsEditor,n as CustomAlertComponent,ra as CustomDialog,oa as DataTable,ta as DateField,sa as DateInput,ia as DateRangeInput,ma as DefaultInput,la as EXPANDED_ROW_PANEL_SX,na as EXPAND_COLUMN_ID,pa as EXPAND_TRANSITION_MS,da as EmailInput,F as EmptyChartSection,D as ErrorCodesChart,Ca as ExactBirthdayBanner,ua as ExpandRowToggle,ca as ExportToPdfButton,Ta as Form,ha as FormBuilder,Sa as FormField,ga as FormFieldBuilder,Da as FormProvider,Pa as FullWidthAlert,b as FunnelChart,ka as IconPlayer,m as Image,Na as LegalLink,Ba as LinkButton,O as LoadingChartSection,Oa as LogDetailPanel,Fa as LogoAvatar,Ia as LogoChip,ba as LogsInfoAlert,Ea as LogsTable,I as MetricLastUpdated,La as NETWORK_RULES_COLUMN_IDS,V as NETWORK_RULE_STATUSES,wa as NPIInput,ya as NetworkRuleConditionsTable,Aa as NetworkRuleDeleteDialog,Va as NetworkRuleDiscardDialog,_a as NetworkRuleEditorDialog,xa as NetworkRuleEditorForm,Ma as NetworkRuleExpandedPanel,Wa as NetworkRuleRow,x as NetworkRulesProvider,Ua as NetworkRulesTable,Ha as NetworkStatusChip,Ka as NewOneClickForm,za as OTPInput,Xa as OneClickVerificationEventsOverTimeChart,qa as OneClickVerificationFunnelChart,Qa as OneClickVerificationSuccessOverTimeChart,Ya as OptionChips,$a as OriginalButton,Ga as OverviewBigNumbers,r as PageHeader,o as PageSectionHeader,a as Paragraph,Ja as PersistentDialog,Za as PhoneInput,P as PieChart,ja as PoweredByVerified,ae as PrettyPhoneInput,ee as PrivacyPolicyNotice,l as QRCodeDisplay,re as RadioOption,R as ReasonCodesChart,w as RequiredLabel,oe as ResendPhoneBanner,N as RiskScoreBarChart,k as RiskScorePieChart,te as SSNInput,e as SectionHeader,se as SelectInput,C as SeriesChart,c as SeriesChartLegend,T as SeriesPercentageChart,S as SimpleBarChart,B as SimpleLegend,ie as SnackbarProvider,me as SynchronizedMetricsChart,le as TOTAL_DATA_KEY,ue as TTSMagicButton,fe as TTSMagicLegalLanguage,de as TTSMagicQRCode,Ce as TTSOverTimeChart,ce as TestPhoneNumbersBanner,Te as TextButton,he as TimezoneInput,A as Tip,t as Typography,Se as VerifiedImage,ge as VerifiedIncLogo,i as When,v as WhenStyled,De as applyFieldFilters,Be as applySearch,Re as buildInitialFilterState,va as buildNetworkRulesColumns,Fe as dayToRuleDate,Ee as dedupeValues,Ae as defaultOverviewMetrics,Pe as effectiveFilterFieldCount,Le as emptyConditionFormValues,ke as emptyFieldValue,ne as enrichWithTotal,fa as expandColumn,Ve as exportBillableEventsToCsv,_e as exportDataTableToCsv,xe as exportDataTableToExcel,Ue as formatBillableMetric,He as formatChallengeInput,Ke as formatHealthDataProviderMode,ze as formatPromptForChallenge,Ie as formatRuleDate,ve as fromNetworkRuleFormValues,Me as getDataTableExportModel,Xe as getKeyDef,qe as getKeyLabel,Oe as getLeafAccessorsById,Qe as getOperatorLabel,Ye as getStatusLabel,_ as getStatusPresentation,$e as hasInlineOptions,Ge as hasRemoteSource,Ne as isFilterFieldActive,Je as isOperatorMulti,je as mapBillableEventsProductTableData,ar as mapBillableEventsTableData,er as mapOneClickVerificationAreaSeriesData,rr as mapOneClickVerificationFunnelChartData,or as mapOneClickVerificationSuccessOverTimeChartData,tr as mapSeriesTimeSeriesData,sr as mapTTSTimeSeriesData,pe as mergeChartData,ir as networkRuleConditionFormSchema,mr as networkRuleFormSchema,we as normalizeConditionValues,L as normalizePercentData,We as printDataTable,be as ruleDateToDay,lr as toCreatePatchCredentials,ye as toNetworkRuleFormValues,nr as toOption,Ze as toOptions,ur as toShareCredentials,pr as useBrandFilterInput,Ra as useForm,fr as useHeldWhileClosed,dr as useNetworkRuleSourceSearch,M as useNetworkRuleStatuses,Cr as useNetworkRulesCatalog,cr as useNetworkRulesDialogs,W as useNetworkRulesServices,Tr as useResolvedConditionOptions,p as useSnackbar};
|