@stigg/react-sdk 7.26.1 → 7.26.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.
- package/dist/{CreditUsageChart-O5KLTDTO.esm.js → CreditUsageChart-JCGHAQAN.esm.js} +4 -4
- package/dist/{CreditUsageChart-Z2VEQGTE.cjs.js → CreditUsageChart-X5Y6TAHZ.cjs.js} +19 -19
- package/dist/{chunk-EKWCT5WF.esm.js → chunk-TQCBOSDB.esm.js} +1 -1
- package/dist/{chunk-MY4ZIUAV.cjs.js → chunk-WJBNA42X.cjs.js} +1 -1
- package/dist/stigg-sdk.cjs.js +170 -170
- package/dist/stigg-sdk.esm.js +2 -2
- package/package.json +1 -1
package/dist/stigg-sdk.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {e,f,i,j,a,g,b,h,c,p,w,u,v,d,x,y,z,A,B,F,G,H as H$1,q,r,k,J,o,l,m,n}from'./chunk-
|
|
1
|
+
import {e,f,i,j,a,g,b,h,c,p,w,u,v,d,x,y,z,A,B,F,G,H as H$1,q,r,k,J,o,l,m,n}from'./chunk-TQCBOSDB.esm.js';export{s as StiggContext,t as StiggProvider,C as useActiveSubscriptions,x as useBooleanEntitlement,K as useCreditUsage,E as useCustomerPortal,A as useEnumEntitlement,z as useMeteredEntitlement,y as useNumericEntitlement,D as usePaywall,u as useStiggContext}from'./chunk-TQCBOSDB.esm.js';import {BillingModel,PaymentCollection,SubscriptionStatus,PricingType,BillingPeriod,SubscriptionScheduleType,ThresholdType,DiscountType,DiscountDurationType,Currency,BillingVendorIdentifier,CreditGrantType,WidgetType,FontWeight,MeterType,EntitlementResetPeriod,TiersMode,Alignment}from'@stigg/js-client-sdk';export*from'@stigg/js-client-sdk';import ii,{forwardRef,lazy,useContext,useMemo,useState,useEffect,useCallback,Suspense,useRef,createElement}from'react';import xu from'classnames';import Me from'@mui/material/Grid/index.js';import ac from'lodash/compact.js';import {NumericFormat,numericFormatter}from'react-number-format';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import Ma from'lodash/isFunction.js';import Rm from'react-spinners/ClipLoader.js';import {css,useTheme}from'@emotion/react';import ho from'dayjs';import Bm from'dayjs/plugin/utc.js';import Am from'dayjs/plugin/relativeTime.js';import Im from'dayjs/plugin/advancedFormat.js';import Po from'lodash/isNil.js';import Nm from'lodash/sum.js';import Zm from'currency-symbol-map';import jm from'@mui/material/InputAdornment/index.js';import Ym,{buttonClasses}from'@mui/material/Button/index.js';import qm from'@mui/material/TextField/index.js';import xl from'@mui/material/Divider/index.js';import eu from'@mui/material/OutlinedInput/index.js';import tu from'@mui/material/Select/index.js';import ou from'@mui/material/MenuItem/index.js';import ru from'lodash/map.js';import ke from'@mui/material/Box/index.js';import Wu from'react-switch';import ng from'lodash/countBy.js';import ig from'lodash/uniq.js';import Ql from'lodash/sortBy.js';import dg from'lodash/merge.js';import Qe from'react-loading-skeleton';import wg from'lodash/flatMap.js';import Us from'@mui/material/Tab/index.js';import Bg from'lodash/isEmpty.js';import Lg from'@mui/material/Tabs/index.js';import Ug from'@mui/material/useMediaQuery/index.js';import {ExternalLink,ChevronRight,Info,Minus,Plus,ArrowDown}from'react-feather';import xf from'@mui/material/Link/index.js';import uf,{tooltipClasses}from'@mui/material/Tooltip/index.js';import Bl from'lodash/keyBy.js';import bi from'color';import kf,{linearProgressClasses}from'@mui/material/LinearProgress/index.js';import Hf from'lodash/padStart.js';import Rl from'lodash/isUndefined.js';import {BillingModel as BillingModel$1,BillingPeriod as BillingPeriod$1}from'@stigg/api-client-js/src/generated/sdk.js';import Vn from'lodash/lowerCase.js';import ty from'lodash/range.js';import {produce}from'immer';import dy from'lodash/cloneDeep.js';import py from'lodash/remove.js';import {Elements,useStripe,useElements,AddressElement,PaymentElement}from'@stripe/react-stripe-js';import sh from'@mui/material/StepIcon/index.js';import hP from'lodash/partition.js';import xh from'@mui/material/CircularProgress/index.js';import bP from'@mui/material/Paper/index.js';import SP from'@mui/material/Alert/index.js';import wh from'@mui/material/Checkbox/index.js';import Bh from'@mui/material/FormControlLabel/index.js';import Ah from'lodash/isString.js';import fx from'@mui/material/Autocomplete/index.js';import yx from'@mui/material/Collapse/index.js';import {AL,AD,AO,AR,AM,AW,AU,AT,AZ,BS as BS$1,BH,BD,BB,BY,BE,BJ,BO,BA,BR,BG,BF,KH,CM,CA,CV,CL,CN,CO,CD,CR,HR,CY,CZ,DK,DO,EC,EG,SV,EE,ET,EU,FI,FR,GE,DE,GR,GN,HK,HU,IS as IS$1,IN,ID,IE,IL,IT,JP,KZ,KE,KG,LA,LV,LI,LT,LU,MY,MT,MR,MX,MD,ME,MA,NP,NL,NZ,NG,MK,NO,OM,PE,PH,PL,PT,RO,RU,SA,SN,RS,SG,SK,SI,ZA,KR,ES,SR,SE,CH,TW,TJ,TZ,TH,TR,UG,UA,AE,GB,US,UY,UZ,VE,VN,ZM,ZW}from'country-flag-icons/react/3x2';import td from'lodash/startCase.js';import od from'lodash/upperCase.js';import mP from'@mui/material/IconButton/index.js';import {styled}from'@mui/material/styles/index.js';import YP from'@mui/material/Radio/index.js';import tb from'@mui/material/Chip/index.js';import RS$1 from'lodash/capitalize.js';import {TableContainer,Table,Divider,TableCell,TableRow,TablePagination,TableBody,TableHead}from'@mui/material';import mS from'@mui/material/TableRow/index.js';function go(e,t,o){let r=o?` ${o}`:"";return (!e||e===1)&&t?`Up to ${t}${r}`:e&&e>1&&t?`${e}-${t}${r}`:e&&e>1?`Minimum ${e}${r}`:""}function ie(e,t="en-US"){if(e==null)return;let o={thousandSeparator:t==="en-US"?",":" ",decimalSeparator:".",decimalScale:0,fixedDecimalScale:true};return numericFormatter(String(Math.round(e)),o)}function jr(e,t="en-US"){let o={thousandSeparator:t==="en-US"?",":" ",decimalSeparator:".",decimalScale:2,fixedDecimalScale:true};return numericFormatter(String(e),o)}function Dt(e,t=1){if(e<1e6)return ie(e)||"0";let o=[{value:1e12,suffix:"T"},{value:1e9,suffix:"B"},{value:1e6,suffix:"M"}];for(let{value:r,suffix:n}of o)if(e>=r){let s=(e/r).toFixed(t);return s.includes(".")&&(s=s.replace(/\.0+$/,"").replace(/(\.\d*[1-9])0+$/,"$1")),`${s}${n}`}return ie(e)||"0"}var dm=e(f)`
|
|
2
2
|
margin: 0;
|
|
3
3
|
`,pm=e.div`
|
|
4
4
|
display: flex;
|
|
@@ -883,7 +883,7 @@ import {e,f,i,j,a,g,b,h,c,p,w,u,v,d,x,y,z,A,B,F,G,H as H$1,q,r,k,J,o,l,m,n}from'
|
|
|
883
883
|
border-radius: 8px;
|
|
884
884
|
border: 1px solid ${({theme:e})=>{var t,o;return (o=(t=e.stigg)==null?void 0:t.palette)==null?void 0:o.outlinedBorder}};
|
|
885
885
|
background-color: ${({theme:e})=>{var t,o;return (o=(t=e==null?void 0:e.stigg)==null?void 0:t.palette)==null?void 0:o.backgroundPaper}};
|
|
886
|
-
`;function wp({currencyId:e,localization:t,decimalPlaces:o,showUnits:r=true,showSymbol:n=false,onAddCredits:i}){let s=fe(ee),l=u({optional:true}),a$1=l==null?void 0:l.theme,{balance:c,isLoading:u$1,error:f$1}=et({currencyId:e}),{title:p,addCredits:h}=a(a({},F),t),g=jsx(Qb,{className:"stigg-credit-balance-container",children:jsxs(Kb,{className:"stigg-credit-balance-card",children:[jsxs(Lt,{children:[jsx(f,{variant:"h6",color:"primary",className:"stigg-credit-balance-title",children:p}),i&&c&&!f$1&&jsxs(Nt,{type:"button",onClick:()=>i(c),className:"stigg-credit-balance-add-credits-button",children:[jsx(Nr,{className:"stigg-credit-balance-add-credits-icon"}),h]})]}),jsx(kp,{balance:c,isLoading:u$1,error:f$1,decimalPlaces:o,showUnits:r,showSymbol:n})]})});return s?g:jsx(w,{componentTheme:a$1,children:g})}var Xb=lazy(()=>import('./CreditUsageChart-
|
|
886
|
+
`;function wp({currencyId:e,localization:t,decimalPlaces:o,showUnits:r=true,showSymbol:n=false,onAddCredits:i}){let s=fe(ee),l=u({optional:true}),a$1=l==null?void 0:l.theme,{balance:c,isLoading:u$1,error:f$1}=et({currencyId:e}),{title:p,addCredits:h}=a(a({},F),t),g=jsx(Qb,{className:"stigg-credit-balance-container",children:jsxs(Kb,{className:"stigg-credit-balance-card",children:[jsxs(Lt,{children:[jsx(f,{variant:"h6",color:"primary",className:"stigg-credit-balance-title",children:p}),i&&c&&!f$1&&jsxs(Nt,{type:"button",onClick:()=>i(c),className:"stigg-credit-balance-add-credits-button",children:[jsx(Nr,{className:"stigg-credit-balance-add-credits-icon"}),h]})]}),jsx(kp,{balance:c,isLoading:u$1,error:f$1,decimalPlaces:o,showUnits:r,showSymbol:n})]})});return s?g:jsx(w,{componentTheme:a$1,children:g})}var Xb=lazy(()=>import('./CreditUsageChart-JCGHAQAN.esm.js').then(e=>({default:e.CreditUsageChart})));function Ap(e){return jsx(Suspense,{fallback:null,children:jsx(Xb,a({},e))})}var jb=(e,t,o)=>o==="primary"?t.palette.primary:e>=100?t.palette.progress.high:e>=75?t.palette.progress.medium:t.palette.progress.low,eS=e.div`
|
|
887
887
|
width: 100%;
|
|
888
888
|
height: 8px;
|
|
889
889
|
background-color: ${({theme:e})=>e.stigg.palette.progress.background};
|
package/package.json
CHANGED