@verifiedinc-public/shared-ui-elements 9.2.0 → 9.2.2
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.
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";import{RadioGroup as p}from"@mui/material";import{useController as m}from"react-hook-form";import{SdkIntegrationType as c}from"../types/sdk.mjs";import{useCredentialRequestsEditor as f}from"../CredentialRequestsEditor.context.mjs";import{useCredentialRequestField as v}from"../contexts/CredentialRequestFieldContext.mjs";import{RadioOption as d}from"./RadioOption.mjs";import{DataFieldSection as h}from"./DataFieldSection.mjs";import{jsx as e,jsxs as n,Fragment as b}from"react/jsx-runtime";function g({riskSignals:l}){var a;const{features:o,integrationType:r}=f(),i=r===c.Hosted||((a=o?.multi)==null?void 0:a.disabled)===!0||l==="none",t=v(),s=m({name:`${t?.path}.multi`});return(t?.level??0)>0?null:e(h,{title:"Multiple Values",description:l==="none"?"This option is disabled when the Risk Signals brand setting is set to Off":"Whether multiple data values should be included if available",tip:n(b,{children:[e("pre",{children:"POST /1-click"}),e("pre",{children:`{
|
|
2
2
|
multi?: boolean
|
|
3
|
-
}`})]}),sx:{opacity:i?.5:1},children:n(p,{value:s.field.value??!
|
|
3
|
+
}`})]}),sx:{opacity:i?.5:1},children:n(p,{value:s.field.value??!0,onChange:(C,u)=>{i||s.field.onChange({target:{value:u==="true"}})},children:[e(d,{isDefault:!0,value:!0,title:"Yes",description:"Multiple values will be included if available",tip:"true",inputProps:{"data-testid":"custom-demo-dialog-multi-yes-radio"},disabled:i}),e(d,{value:!1,title:"No",description:"Multiple values won't be included",tip:"false",inputProps:{"data-testid":"custom-demo-dialog-multi-no-radio"},disabled:i})]})})}export{g as DataFieldMulti};
|
|
@@ -3,6 +3,7 @@ interface ExportBillableEventsToCsvOptions {
|
|
|
3
3
|
data: BillableEventsTableRow[];
|
|
4
4
|
visibleProducts?: BillableProduct[];
|
|
5
5
|
filename?: string;
|
|
6
|
+
columnFormatters?: Record<string, (value: number, row: BillableEventsTableRow) => string>;
|
|
6
7
|
}
|
|
7
|
-
export declare function exportBillableEventsToCsv({ data, visibleProducts, filename, }: ExportBillableEventsToCsvOptions): void;
|
|
8
|
+
export declare function exportBillableEventsToCsv({ data, visibleProducts, filename, columnFormatters, }: ExportBillableEventsToCsvOptions): void;
|
|
8
9
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";import{BillableProduct as
|
|
2
|
-
`)?`"${t.replace(/"/g,'""')}"`:t}function
|
|
3
|
-
`),
|
|
1
|
+
"use strict";import{BillableProduct as g,BILLABLE_PRODUCTS as B}from"./BillableEventsTable.types.mjs";function n(c){const t=String(c);return t.includes(",")||t.includes('"')||t.includes(`
|
|
2
|
+
`)?`"${t.replace(/"/g,'""')}"`:t}function R({data:c,visibleProducts:t,filename:m="billable-events",columnFormatters:i}){const v=t??Object.values(g),a=B.filter(e=>v.includes(e.product)),u=a.flatMap(e=>e.columns),s=[],l=["",""];for(const e of a){l.push(n(e.label));for(let o=1;o<e.columns.length;o++)l.push("")}s.push(l.join(","));const f=["Brand","Integration Type"];for(const e of u)f.push(n(e.label));s.push(f.join(","));for(const e of c){const o=[n(e.brand),n(e.integrationType)];for(const d of u){const b=e.metrics[d.key]??0,h=i?.[d.key];o.push(h?n(h(b,e)):String(b))}s.push(o.join(","))}const j=s.join(`
|
|
3
|
+
`),L=new Blob([j],{type:"text/csv;charset=utf-8;"}),p=URL.createObjectURL(L),r=document.createElement("a");r.href=p,r.download=`${m}.csv`,r.click(),URL.revokeObjectURL(p)}export{R as exportBillableEventsToCsv};
|