@opexa/portal-components 0.0.16 → 0.0.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/client/hooks/index.d.ts +3 -0
- package/dist/client/hooks/useGlobalStore.d.ts +11 -1
- package/dist/client/hooks/useGlobalStore.js +1 -1
- package/dist/client/hooks/useGlobalStore.mjs +81 -35
- package/dist/client/hooks/useMarkMessageAsReadMutation.d.ts +6 -0
- package/dist/client/hooks/useMarkMessageAsReadMutation.js +1 -0
- package/dist/client/hooks/useMarkMessageAsReadMutation.mjs +39 -0
- package/dist/client/hooks/useMessagesQuery.d.ts +3 -0
- package/dist/client/hooks/useMessagesQuery.js +1 -0
- package/dist/client/hooks/useMessagesQuery.mjs +47 -0
- package/dist/client/hooks/useUnreadMessagesCountQuery.d.ts +3 -0
- package/dist/client/hooks/useUnreadMessagesCountQuery.js +1 -0
- package/dist/client/hooks/useUnreadMessagesCountQuery.mjs +38 -0
- package/dist/client-hooks.js +1 -1
- package/dist/client-hooks.mjs +38 -32
- package/dist/components/Account/Account.d.ts +3 -1
- package/dist/components/Account/Account.js +1 -1
- package/dist/components/Account/Account.mjs +163 -96
- package/dist/components/Banner/Banner.js +1 -1
- package/dist/components/Banner/Banner.mjs +6 -6
- package/dist/components/BetRecords/BetRecords.js +1 -1
- package/dist/components/BetRecords/BetRecords.mjs +357 -325
- package/dist/components/Bonus/Bonus.client.d.ts +2 -0
- package/dist/components/Bonus/Bonus.d.ts +10 -0
- package/dist/components/Bonus/index.d.ts +1 -0
- package/dist/components/Bonuses/Bonuses.d.ts +15 -0
- package/dist/components/Bonuses/Bonuses.js +1 -0
- package/dist/components/Bonuses/Bonuses.mjs +125 -0
- package/dist/components/Bonuses/index.d.ts +1 -0
- package/dist/components/DepositWithdrawal/AmountChoices.js +1 -1
- package/dist/components/DepositWithdrawal/AmountChoices.mjs +9 -6
- package/dist/components/DepositWithdrawal/Deposit/AvailablePromos.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/AvailablePromos.mjs +11 -8
- package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.mjs +5 -2
- package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.mjs +5 -2
- package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.mjs +16 -13
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.mjs +5 -2
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositVCA.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositVCA.mjs +9 -6
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.mjs +18 -15
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositQrCode.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositQrCode.mjs +9 -6
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositSuccess.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositSuccess.mjs +9 -6
- package/dist/components/DepositWithdrawal/DepositWithdrawal.js +1 -1
- package/dist/components/DepositWithdrawal/DepositWithdrawal.mjs +46 -46
- package/dist/components/DepositWithdrawal/PaymentMethods.js +1 -1
- package/dist/components/DepositWithdrawal/PaymentMethods.mjs +26 -23
- package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.js +1 -1
- package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.mjs +86 -76
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js +1 -1
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.mjs +118 -108
- package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.js +1 -1
- package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.mjs +75 -65
- package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.js +1 -1
- package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.mjs +96 -86
- package/dist/components/Disclaimer/Disclaimer.js +1 -1
- package/dist/components/Disclaimer/Disclaimer.mjs +11 -8
- package/dist/components/Empty/Empty.js +1 -1
- package/dist/components/Empty/Empty.mjs +14 -10
- package/dist/components/GameLaunch/GameLaunch.js +1 -1
- package/dist/components/GameLaunch/GameLaunch.mjs +42 -39
- package/dist/components/Games/Games.client.js +1 -1
- package/dist/components/Games/Games.client.mjs +47 -44
- package/dist/components/Games/Games.d.ts +7 -2
- package/dist/components/JackpotCounter/JackpotCounter.d.ts +4 -2
- package/dist/components/JackpotCounter/JackpotCounter.js +1 -1
- package/dist/components/JackpotCounter/JackpotCounter.mjs +38 -34
- package/dist/components/JackpotCounter/JackpotCounterItem.d.ts +3 -1
- package/dist/components/JackpotCounter/JackpotCounterItem.js +1 -1
- package/dist/components/JackpotCounter/JackpotCounterItem.mjs +282 -124
- package/dist/components/JackpotCounter/JackpotCounterItem.module.css.js +1 -1
- package/dist/components/JackpotCounter/JackpotCounterItem.module.css.mjs +11 -8
- package/dist/components/Jackpots/JackpotGameProviders.d.ts +1 -0
- package/dist/components/Jackpots/JackpotItem.d.ts +7 -0
- package/dist/components/Jackpots/JackpotItemMobile.d.ts +7 -0
- package/dist/components/Jackpots/Jackpots.d.ts +8 -0
- package/dist/components/Jackpots/index.d.ts +1 -0
- package/dist/components/Marquee/Marquee.js +1 -1
- package/dist/components/Marquee/Marquee.mjs +12 -14
- package/dist/components/Messages/MessageItem.d.ts +4 -0
- package/dist/components/Messages/MessageItem.js +1 -0
- package/dist/components/Messages/MessageItem.mjs +66 -0
- package/dist/components/Messages/MessagePopup.d.ts +1 -0
- package/dist/components/Messages/MessagePopup.js +1 -0
- package/dist/components/Messages/MessagePopup.mjs +89 -0
- package/dist/components/Messages/Messages.d.ts +1 -0
- package/dist/components/Messages/Messages.js +1 -0
- package/dist/components/Messages/Messages.mjs +147 -0
- package/dist/components/Messages/index.d.ts +1 -0
- package/dist/components/Messages/utils.d.ts +3 -0
- package/dist/components/Messages/utils.js +1 -0
- package/dist/components/Messages/utils.mjs +16 -0
- package/dist/components/Promos/PromoCarousel.js +1 -1
- package/dist/components/Promos/PromoCarousel.mjs +27 -24
- package/dist/components/Promos/PromoGrid.js +1 -1
- package/dist/components/Promos/PromoGrid.mjs +7 -7
- package/dist/components/Promos/PromoItem.js +1 -1
- package/dist/components/Promos/PromoItem.mjs +10 -7
- package/dist/components/Promos/Promos.d.ts +4 -2
- package/dist/components/SignIn/SignIn.d.ts +0 -1
- package/dist/components/SignIn/SignIn.js +1 -1
- package/dist/components/SignIn/SignIn.mjs +32 -41
- package/dist/components/SignIn/SignInForm.js +1 -1
- package/dist/components/SignIn/SignInForm.mjs +167 -160
- package/dist/components/SignUp/SignUp.d.ts +0 -1
- package/dist/components/SignUp/SignUp.js +1 -1
- package/dist/components/SignUp/SignUp.mjs +32 -41
- package/dist/components/SignUp/SignUpForm.js +1 -1
- package/dist/components/SignUp/SignUpForm.mjs +123 -116
- package/dist/components/TopWins/TopWins.client.js +1 -1
- package/dist/components/TopWins/TopWins.client.mjs +14 -14
- package/dist/components/TopWins/TopWins.d.ts +2 -1
- package/dist/components/TournamentCounter/TournamentCounter.d.ts +4 -2
- package/dist/components/TournamentCounter/TournamentCounter.js +1 -1
- package/dist/components/TournamentCounter/TournamentCounter.mjs +27 -24
- package/dist/components/TransactionRecords/DepositRecordsTable.js +1 -1
- package/dist/components/TransactionRecords/DepositRecordsTable.mjs +113 -99
- package/dist/components/TransactionRecords/TableFilters.d.ts +3 -1
- package/dist/components/TransactionRecords/TableFilters.js +1 -1
- package/dist/components/TransactionRecords/TableFilters.mjs +193 -132
- package/dist/components/TransactionRecords/TransactionRecords.js +1 -1
- package/dist/components/TransactionRecords/TransactionRecords.mjs +21 -17
- package/dist/components/TransactionRecords/TransactionRecordsTable.js +1 -1
- package/dist/components/TransactionRecords/TransactionRecordsTable.mjs +89 -77
- package/dist/components/TransactionRecords/WithdrawalRecordsTable.js +1 -1
- package/dist/components/TransactionRecords/WithdrawalRecordsTable.mjs +105 -96
- package/dist/components/index.d.ts +2 -0
- package/dist/components.js +1 -1
- package/dist/components.mjs +36 -32
- package/dist/icons/ArrowNarrowDownIcon.d.ts +2 -0
- package/dist/icons/ArrowNarrowUpIcon.d.ts +2 -0
- package/dist/icons/Bell01Icon.d.ts +2 -0
- package/dist/icons/Bell01Icon.js +1 -0
- package/dist/icons/Bell01Icon.mjs +27 -0
- package/dist/icons/BellRingIcon.d.ts +2 -0
- package/dist/icons/BellRingIcon.js +1 -0
- package/dist/icons/BellRingIcon.mjs +27 -0
- package/dist/icons/EyeIcon.d.ts +2 -0
- package/dist/icons/EyeIcon.js +1 -0
- package/dist/icons/EyeIcon.mjs +25 -0
- package/dist/icons/EyeOffIcon.d.ts +2 -0
- package/dist/icons/EyeOffIcon.js +1 -0
- package/dist/icons/EyeOffIcon.mjs +22 -0
- package/dist/icons/StarIcon.d.ts +2 -0
- package/dist/icons/StarIcon.js +1 -0
- package/dist/icons/StarIcon.mjs +19 -0
- package/dist/icons/StopWatchIcon.d.ts +2 -0
- package/dist/icons/StopWatchIcon.js +1 -0
- package/dist/icons/StopWatchIcon.mjs +22 -0
- package/dist/icons/Trophy01Icon.d.ts +2 -0
- package/dist/icons/Trophy01Icon.js +1 -0
- package/dist/icons/Trophy01Icon.mjs +22 -0
- package/dist/icons/index.d.ts +6 -0
- package/dist/icons.d.ts +2 -0
- package/dist/icons.js +1 -0
- package/dist/icons.mjs +62 -0
- package/dist/images/first-place.png.js +1 -0
- package/dist/images/first-place.png.mjs +4 -0
- package/dist/images/leaderboard.png.js +1 -0
- package/dist/images/leaderboard.png.mjs +4 -0
- package/dist/images/placeholder-avatar.png.js +1 -0
- package/dist/images/placeholder-avatar.png.mjs +4 -0
- package/dist/images/responsible-gaming.png.js +1 -1
- package/dist/images/responsible-gaming.png.mjs +2 -2
- package/dist/portal-components.css +1 -1
- package/dist/server/utils/prefetchUnreadMessagesCountQuery.d.ts +2 -0
- package/dist/theme.css +130 -4
- package/dist/ui/AlertDialog/alertDialog.recipe.js +1 -1
- package/dist/ui/AlertDialog/alertDialog.recipe.mjs +6 -6
- package/dist/ui/Badge/Badge.d.ts +274 -27
- package/dist/ui/Badge/Badge.js +1 -1
- package/dist/ui/Badge/Badge.mjs +14 -10
- package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
- package/dist/ui/Badge/badge.anatomy.js +1 -1
- package/dist/ui/Badge/badge.anatomy.mjs +1 -0
- package/dist/ui/Badge/badge.recipe.d.ts +57 -9
- package/dist/ui/Badge/badge.recipe.js +1 -1
- package/dist/ui/Badge/badge.recipe.mjs +57 -21
- package/dist/ui/Button/button.recipe.d.ts +2 -2
- package/dist/ui/Button/button.recipe.js +1 -1
- package/dist/ui/Button/button.recipe.mjs +17 -7
- package/dist/ui/Checkbox/checkbox.recipe.js +1 -1
- package/dist/ui/Checkbox/checkbox.recipe.mjs +6 -6
- package/dist/ui/Collapsible/Collapsible.d.ts +114 -0
- package/dist/ui/Collapsible/Collapsible.js +1 -0
- package/dist/ui/Collapsible/Collapsible.mjs +13 -0
- package/dist/ui/Collapsible/collapsible.recipe.d.ts +28 -0
- package/dist/ui/Collapsible/collapsible.recipe.js +1 -0
- package/dist/ui/Collapsible/collapsible.recipe.mjs +18 -0
- package/dist/ui/Collapsible/index.d.ts +1 -0
- package/dist/ui/DatePicker/datePicker.recipe.js +1 -1
- package/dist/ui/DatePicker/datePicker.recipe.mjs +37 -6
- package/dist/ui/Dialog/dialog.recipe.js +1 -1
- package/dist/ui/Dialog/dialog.recipe.mjs +3 -3
- package/dist/ui/Drawer/drawer.recipe.js +1 -1
- package/dist/ui/Drawer/drawer.recipe.mjs +6 -6
- package/dist/ui/Field/field.recipe.js +1 -1
- package/dist/ui/Field/field.recipe.mjs +10 -12
- package/dist/ui/IconButton/iconButton.recipe.d.ts +2 -2
- package/dist/ui/IconButton/iconButton.recipe.js +1 -1
- package/dist/ui/IconButton/iconButton.recipe.mjs +6 -6
- package/dist/ui/NumberInput/numberInput.recipe.js +1 -1
- package/dist/ui/NumberInput/numberInput.recipe.mjs +8 -8
- package/dist/ui/PasswordInput/PasswordInput.d.ts +242 -1
- package/dist/ui/PasswordInput/PasswordInput.js +1 -0
- package/dist/ui/PasswordInput/PasswordInput.mjs +18 -0
- package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +6 -18
- package/dist/ui/PasswordInput/passwordInput.recipe.js +1 -0
- package/dist/ui/PasswordInput/passwordInput.recipe.mjs +48 -0
- package/dist/ui/PinInput/pinInput.recipe.js +1 -1
- package/dist/ui/PinInput/pinInput.recipe.mjs +3 -3
- package/dist/ui/Popover/popover.recipe.js +1 -1
- package/dist/ui/Popover/popover.recipe.mjs +1 -1
- package/dist/ui/Progress/Progress.d.ts +335 -1
- package/dist/ui/Progress/Progress.js +1 -1
- package/dist/ui/Progress/Progress.mjs +15 -2
- package/dist/ui/Progress/progress.recipe.d.ts +37 -1
- package/dist/ui/Progress/progress.recipe.js +1 -0
- package/dist/ui/Progress/progress.recipe.mjs +41 -0
- package/dist/ui/Prose.d.ts +2 -0
- package/dist/ui/Prose.js +1 -0
- package/dist/ui/Prose.mjs +47 -0
- package/dist/ui/SegmentGroup/segmentGroup.recipe.js +1 -1
- package/dist/ui/SegmentGroup/segmentGroup.recipe.mjs +3 -3
- package/dist/ui/Select/select.recipe.js +1 -1
- package/dist/ui/Select/select.recipe.mjs +6 -6
- package/dist/ui/Table/table.recipe.js +1 -1
- package/dist/ui/Table/table.recipe.mjs +4 -4
- package/dist/ui/Tabs/tabs.recipe.js +1 -1
- package/dist/ui/Tabs/tabs.recipe.mjs +3 -3
- package/dist/ui/index.d.ts +3 -0
- package/dist/ui.js +1 -1
- package/dist/ui.mjs +36 -30
- package/dist/utils/queryKeys.d.ts +4 -1
- package/dist/utils/queryKeys.js +1 -1
- package/dist/utils/queryKeys.mjs +34 -26
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +35 -32
- package/package.json +11 -5
- package/dist/components/Promos/PromosContent.d.ts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),x=require("@ark-ui/react"),o=require("@date-fns/tz"),a=require("date-fns"),S=require("react");require("@opexa/portal-sdk-core");require("@tanstack/react-query");require("tiny-invariant");require("../../constants/index.js");const m=require("../../utils/capitalize.js"),g=require("../../utils/formatNumber.js");require("../../utils/getLocaleInfo.js");require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");require("../../utils/parseDecimal.js");require("lodash-es");require("@opexa/portal-sdk-core/object-id");require("../../client/hooks/useGlobalStore.js");const q=require("../../client/hooks/useInfiniteQueryHelper.js"),w=require("../../client/hooks/useLocaleInfo.js");require("usehooks-ts");const R=require("../../client/hooks/useTransactionRecordsQuery.js"),P=require("../../icons/ChevronDownIcon.js"),H=require("../../icons/ChevronLeftIcon.js"),D=require("../../icons/ChevronRightIcon.js"),F=require("../../icons/File02Icon.js"),O=require("../../icons/SpinnerIcon.js");require("../../ui/AlertDialog/AlertDialog.js");require("../../ui/Avatar/Avatar.js");require("../../ui/Badge/Badge.js");require("../../ui/Button/button.recipe.js");require("../../ui/Checkbox/Checkbox.js");require("../../ui/Clipboard/Clipboard.js");require("../../ui/Collapsible/Collapsible.js");require("../../ui/DatePicker/DatePicker.js");require("../../ui/Dialog/Dialog.js");require("../../ui/Drawer/Drawer.js");require("../../ui/Field/Field.js");const h=require("../../ui/IconButton/IconButton.js");require("../../ui/NumberInput/NumberInput.js");require("../../ui/PasswordInput/PasswordInput.js");require("../../ui/PinInput/PinInput.js");require("../../ui/Popover/Popover.js");require("tailwind-merge");require("../../ui/Progress/Progress.js");require("../../ui/SegmentGroup/SegmentGroup.js");const s=require("../../ui/Select/Select.js"),r=require("../../ui/Table/Table.js");require("../../ui/Tabs/Tabs.js");const B=require("../Empty/Empty.js"),E=require("./TableFilters.js");function M(){const[i,j]=S.useState(),t=w.useLocaleInfo(),{page:y,pageSize:p,hasNextPage:b,hasPrevPage:N,next:f,prev:T,rows:c,setPageSize:v,totalPages:C,loading:l,firstPage:I}=q.useInfiniteQueryHelper(R.useTransactionRecordsQuery,{filter:{...i&&{dateTimeCreated:{...i.start&&{greaterThanOrEqual:new o.TZDateMini(a.startOfDay(i.start),t.timezone).toISOString()},...i.end&&{lesserThanOrEqual:new o.TZDateMini(a.endOfDay(i.end),t.timezone).toISOString()}}}}});return e.jsxs(e.Fragment,{children:[e.jsx(E.TableFilters,{value:{timestamp:i},onChange:n=>{j(n.timestamp),I()},enabledFilters:{transactionType:!0}}),c.length<=0&&e.jsx(B.Empty,{icon:l?O.SpinnerIcon:F.File02Icon,title:l?"Just a moment":"No data",message:l?"Fetching latest transaction records...":"No data is currently available.",className:"mt-5xl"}),c.length>=1&&e.jsxs("div",{className:"border-border-primary -ml-4 mt-3xl w-dvw border-y lg:-ml-0 lg:w-full lg:rounded-xl lg:border-x",children:[e.jsx("div",{className:"border-border-primary scrollbar-thumb:bg-bg-quaternary scrollbar-track:bg-transparent scrollbar:h-2 scrollbar-thumb:rounded-full overflow-hidden overflow-x-auto rounded-xl rounded-b-none border-b",children:e.jsxs(r.Root,{className:"border-0",children:[e.jsx(r.Header,{children:e.jsxs(r.Row,{children:[e.jsx(r.Heading,{children:"Transaction Type"}),e.jsx(r.Heading,{children:"Transaction Time"}),e.jsx(r.Heading,{children:"Amount"}),e.jsx(r.Heading,{children:"Current Balance"}),e.jsx(r.Heading,{children:"Reference Number"}),e.jsx(r.Heading,{children:"Content"})]})}),e.jsx(r.Body,{children:c.map(n=>e.jsxs(r.Row,{children:[e.jsx(r.Cell,{className:"!py-1",children:m.capitalize(n.type,{delimiter:m.capitalize.delimiters.UNDERSCORE})}),e.jsxs(r.Cell,{className:"!py-1",children:[e.jsx("div",{className:"leading-tight",children:a.format(n.dateTimeCreated,"MM/dd/yyyy",{in:o.tz(t.timezone)})}),e.jsx("div",{className:"text-text-tertiary-600 leading-tight",children:a.format(n.dateTimeCreated,"hh:mm a",{in:o.tz(t.timezone)})})]}),e.jsx(r.Cell,{className:"!py-1",children:g.formatNumber(n.amount,{currency:t.currency.code,minDecimalPlaces:2})}),e.jsx(r.Cell,{className:"!py-1",children:g.formatNumber(n.currentBalance,{currency:t.currency.code,minDecimalPlaces:2})}),e.jsx(r.Cell,{className:"!py-1",children:n.referenceNumber}),e.jsx(r.Cell,{className:"!py-1",children:n.content||"/"})]},n.id))})]})}),e.jsxs("div",{className:"flex items-center gap-lg px-4 py-3",children:[e.jsxs("p",{className:"text-text-secondary-700 order-2 grow text-center text-sm font-medium lg:order-none lg:grow-0",children:["Page ",y," of ",C]}),e.jsx("div",{className:"hidden grow lg:block"}),e.jsx(s.Root,{size:"sm",value:[p.toString()],onValueChange:n=>{const d=parseInt(n.value[0]),z=isNaN(d)?10:d;v(z)},collection:u,lazyMount:!0,className:"hidden lg:block",children:e.jsxs(s.Trigger,{children:[e.jsx(s.ValueText,{}),e.jsx(s.Indicator,{asChild:!0,children:e.jsx(P.ChevronDownIcon,{})}),e.jsx(x.Portal,{children:e.jsx(s.Positioner,{children:e.jsx(s.Content,{children:u.items.map(n=>e.jsx(s.Item,{item:n,children:u.stringifyItem(n)},n))})})})]})}),e.jsxs("div",{className:"contents lg:flex",children:[e.jsx(h.IconButton,{size:"sm",variant:"outline",colorScheme:"gray",className:"order-1 lg:order-none lg:rounded-r-none lg:border-r-0",disabled:!N||l,onClick:()=>T(),children:e.jsx(H.ChevronLeftIcon,{className:"size-5"})}),e.jsx(h.IconButton,{size:"sm",variant:"outline",colorScheme:"gray",className:"order-3 lg:order-none lg:rounded-l-none",disabled:!b||l,onClick:()=>f(),children:e.jsx(D.ChevronRightIcon,{className:"size-5"})})]})]})]})]})}const u=x.createListCollection({items:q.useInfiniteQueryHelper.config.pageSizes,itemToValue:i=>i.toString(),itemToString:i=>`${i} items per page`});exports.TransactionRecordsTable=M;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { createListCollection as
|
|
3
|
-
import { TZDateMini as d, tz as
|
|
4
|
-
import { endOfDay as E, startOfDay as
|
|
5
|
-
import { useState as
|
|
1
|
+
import { jsxs as t, Fragment as D, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { createListCollection as O, Portal as k } from "@ark-ui/react";
|
|
3
|
+
import { TZDateMini as d, tz as p } from "@date-fns/tz";
|
|
4
|
+
import { endOfDay as E, startOfDay as F, format as h } from "date-fns";
|
|
5
|
+
import { useState as B } from "react";
|
|
6
6
|
import "@opexa/portal-sdk-core";
|
|
7
7
|
import "@tanstack/react-query";
|
|
8
8
|
import "tiny-invariant";
|
|
9
9
|
import "../../constants/index.mjs";
|
|
10
|
-
import { capitalize as
|
|
11
|
-
import { formatNumber as
|
|
10
|
+
import { capitalize as g } from "../../utils/capitalize.mjs";
|
|
11
|
+
import { formatNumber as u } from "../../utils/formatNumber.mjs";
|
|
12
12
|
import "../../utils/getLocaleInfo.mjs";
|
|
13
13
|
import "../../utils/getQueryClient.mjs";
|
|
14
14
|
import "../../utils/isMobile.mjs";
|
|
@@ -16,14 +16,14 @@ import "../../utils/parseDecimal.mjs";
|
|
|
16
16
|
import "lodash-es";
|
|
17
17
|
import "@opexa/portal-sdk-core/object-id";
|
|
18
18
|
import "../../client/hooks/useGlobalStore.mjs";
|
|
19
|
-
import { useInfiniteQueryHelper as
|
|
20
|
-
import { useLocaleInfo as
|
|
19
|
+
import { useInfiniteQueryHelper as b } from "../../client/hooks/useInfiniteQueryHelper.mjs";
|
|
20
|
+
import { useLocaleInfo as M } from "../../client/hooks/useLocaleInfo.mjs";
|
|
21
21
|
import "usehooks-ts";
|
|
22
|
-
import { useTransactionRecordsQuery as
|
|
23
|
-
import { ChevronDownIcon as
|
|
24
|
-
import { ChevronLeftIcon as
|
|
25
|
-
import { ChevronRightIcon as
|
|
26
|
-
import { File02Icon as
|
|
22
|
+
import { useTransactionRecordsQuery as q } from "../../client/hooks/useTransactionRecordsQuery.mjs";
|
|
23
|
+
import { ChevronDownIcon as H } from "../../icons/ChevronDownIcon.mjs";
|
|
24
|
+
import { ChevronLeftIcon as L } from "../../icons/ChevronLeftIcon.mjs";
|
|
25
|
+
import { ChevronRightIcon as V } from "../../icons/ChevronRightIcon.mjs";
|
|
26
|
+
import { File02Icon as j } from "../../icons/File02Icon.mjs";
|
|
27
27
|
import { SpinnerIcon as Q } from "../../icons/SpinnerIcon.mjs";
|
|
28
28
|
import "../../ui/AlertDialog/AlertDialog.mjs";
|
|
29
29
|
import "../../ui/Avatar/Avatar.mjs";
|
|
@@ -31,55 +31,58 @@ import "../../ui/Badge/Badge.mjs";
|
|
|
31
31
|
import "../../ui/Button/button.recipe.mjs";
|
|
32
32
|
import "../../ui/Checkbox/Checkbox.mjs";
|
|
33
33
|
import "../../ui/Clipboard/Clipboard.mjs";
|
|
34
|
+
import "../../ui/Collapsible/Collapsible.mjs";
|
|
34
35
|
import "../../ui/DatePicker/DatePicker.mjs";
|
|
35
36
|
import "../../ui/Dialog/Dialog.mjs";
|
|
36
37
|
import "../../ui/Drawer/Drawer.mjs";
|
|
37
38
|
import "../../ui/Field/Field.mjs";
|
|
38
|
-
import { IconButton as
|
|
39
|
+
import { IconButton as f } from "../../ui/IconButton/IconButton.mjs";
|
|
39
40
|
import "../../ui/NumberInput/NumberInput.mjs";
|
|
41
|
+
import "../../ui/PasswordInput/PasswordInput.mjs";
|
|
40
42
|
import "../../ui/PinInput/PinInput.mjs";
|
|
41
43
|
import "../../ui/Popover/Popover.mjs";
|
|
42
44
|
import "tailwind-merge";
|
|
45
|
+
import "../../ui/Progress/Progress.mjs";
|
|
43
46
|
import "../../ui/SegmentGroup/SegmentGroup.mjs";
|
|
44
47
|
import { Root as $, Trigger as A, ValueText as J, Indicator as U, Positioner as Z, Content as G, Item as K } from "../../ui/Select/Select.mjs";
|
|
45
|
-
import { Root as W, Header as X, Row as
|
|
48
|
+
import { Root as W, Header as X, Row as y, Heading as n, Body as Y, Cell as l } from "../../ui/Table/Table.mjs";
|
|
46
49
|
import "../../ui/Tabs/Tabs.mjs";
|
|
47
50
|
import { Empty as _ } from "../Empty/Empty.mjs";
|
|
48
51
|
import { TableFilters as ee } from "./TableFilters.mjs";
|
|
49
|
-
function
|
|
50
|
-
const [o,
|
|
52
|
+
function Ye() {
|
|
53
|
+
const [o, N] = B(), i = M(), {
|
|
51
54
|
page: v,
|
|
52
|
-
pageSize:
|
|
55
|
+
pageSize: x,
|
|
53
56
|
hasNextPage: T,
|
|
54
57
|
hasPrevPage: C,
|
|
55
|
-
next:
|
|
56
|
-
prev:
|
|
57
|
-
rows:
|
|
58
|
-
setPageSize:
|
|
59
|
-
totalPages:
|
|
58
|
+
next: z,
|
|
59
|
+
prev: S,
|
|
60
|
+
rows: m,
|
|
61
|
+
setPageSize: I,
|
|
62
|
+
totalPages: w,
|
|
60
63
|
loading: a,
|
|
61
|
-
firstPage:
|
|
62
|
-
} =
|
|
64
|
+
firstPage: P
|
|
65
|
+
} = b(q, {
|
|
63
66
|
filter: {
|
|
64
67
|
...o && {
|
|
65
68
|
dateTimeCreated: {
|
|
66
69
|
...o.start && {
|
|
67
70
|
greaterThanOrEqual: new d(
|
|
68
|
-
|
|
69
|
-
|
|
71
|
+
F(o.start),
|
|
72
|
+
i.timezone
|
|
70
73
|
).toISOString()
|
|
71
74
|
},
|
|
72
75
|
...o.end && {
|
|
73
76
|
lesserThanOrEqual: new d(
|
|
74
77
|
E(o.end),
|
|
75
|
-
|
|
78
|
+
i.timezone
|
|
76
79
|
).toISOString()
|
|
77
80
|
}
|
|
78
81
|
}
|
|
79
82
|
}
|
|
80
83
|
}
|
|
81
84
|
});
|
|
82
|
-
return /* @__PURE__ */
|
|
85
|
+
return /* @__PURE__ */ t(D, { children: [
|
|
83
86
|
/* @__PURE__ */ e(
|
|
84
87
|
ee,
|
|
85
88
|
{
|
|
@@ -87,97 +90,106 @@ function Ke() {
|
|
|
87
90
|
timestamp: o
|
|
88
91
|
},
|
|
89
92
|
onChange: (r) => {
|
|
90
|
-
|
|
93
|
+
N(r.timestamp), P();
|
|
94
|
+
},
|
|
95
|
+
enabledFilters: {
|
|
96
|
+
transactionType: !0
|
|
91
97
|
}
|
|
92
98
|
}
|
|
93
99
|
),
|
|
94
|
-
|
|
100
|
+
m.length <= 0 && /* @__PURE__ */ e(
|
|
95
101
|
_,
|
|
96
102
|
{
|
|
97
|
-
icon: a ? Q :
|
|
103
|
+
icon: a ? Q : j,
|
|
98
104
|
title: a ? "Just a moment" : "No data",
|
|
99
105
|
message: a ? "Fetching latest transaction records..." : "No data is currently available.",
|
|
100
|
-
className: "mt-
|
|
106
|
+
className: "mt-5xl"
|
|
101
107
|
}
|
|
102
108
|
),
|
|
103
|
-
|
|
104
|
-
/* @__PURE__ */ e("div", { className: "border-
|
|
105
|
-
/* @__PURE__ */ e(X, { children: /* @__PURE__ */
|
|
106
|
-
/* @__PURE__ */ e(
|
|
107
|
-
/* @__PURE__ */ e(
|
|
108
|
-
/* @__PURE__ */ e(
|
|
109
|
-
/* @__PURE__ */ e(
|
|
110
|
-
/* @__PURE__ */ e(
|
|
111
|
-
/* @__PURE__ */ e(
|
|
109
|
+
m.length >= 1 && /* @__PURE__ */ t("div", { className: "border-border-primary -ml-4 mt-3xl w-dvw border-y lg:-ml-0 lg:w-full lg:rounded-xl lg:border-x", children: [
|
|
110
|
+
/* @__PURE__ */ e("div", { className: "border-border-primary scrollbar-thumb:bg-bg-quaternary scrollbar-track:bg-transparent scrollbar:h-2 scrollbar-thumb:rounded-full overflow-hidden overflow-x-auto rounded-xl rounded-b-none border-b", children: /* @__PURE__ */ t(W, { className: "border-0", children: [
|
|
111
|
+
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ t(y, { children: [
|
|
112
|
+
/* @__PURE__ */ e(n, { children: "Transaction Type" }),
|
|
113
|
+
/* @__PURE__ */ e(n, { children: "Transaction Time" }),
|
|
114
|
+
/* @__PURE__ */ e(n, { children: "Amount" }),
|
|
115
|
+
/* @__PURE__ */ e(n, { children: "Current Balance" }),
|
|
116
|
+
/* @__PURE__ */ e(n, { children: "Reference Number" }),
|
|
117
|
+
/* @__PURE__ */ e(n, { children: "Content" })
|
|
112
118
|
] }) }),
|
|
113
|
-
/* @__PURE__ */ e(Y, { children:
|
|
114
|
-
/* @__PURE__ */ e(
|
|
115
|
-
delimiter:
|
|
116
|
-
}) }),
|
|
117
|
-
/* @__PURE__ */ e(n, { children: B(r.dateTimeCreated, "yyyy MMM dd hh:mma", {
|
|
118
|
-
in: O(m.timezone)
|
|
119
|
+
/* @__PURE__ */ e(Y, { children: m.map((r) => /* @__PURE__ */ t(y, { children: [
|
|
120
|
+
/* @__PURE__ */ e(l, { className: "!py-1", children: g(r.type, {
|
|
121
|
+
delimiter: g.delimiters.UNDERSCORE
|
|
119
122
|
}) }),
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
|
|
123
|
+
/* @__PURE__ */ t(l, { className: "!py-1", children: [
|
|
124
|
+
/* @__PURE__ */ e("div", { className: "leading-tight", children: h(r.dateTimeCreated, "MM/dd/yyyy", {
|
|
125
|
+
in: p(i.timezone)
|
|
126
|
+
}) }),
|
|
127
|
+
/* @__PURE__ */ e("div", { className: "text-text-tertiary-600 leading-tight", children: h(r.dateTimeCreated, "hh:mm a", {
|
|
128
|
+
in: p(i.timezone)
|
|
129
|
+
}) })
|
|
130
|
+
] }),
|
|
131
|
+
/* @__PURE__ */ e(l, { className: "!py-1", children: u(r.amount, {
|
|
132
|
+
currency: i.currency.code,
|
|
122
133
|
minDecimalPlaces: 2
|
|
123
134
|
}) }),
|
|
124
|
-
/* @__PURE__ */ e(
|
|
125
|
-
currency:
|
|
135
|
+
/* @__PURE__ */ e(l, { className: "!py-1", children: u(r.currentBalance, {
|
|
136
|
+
currency: i.currency.code,
|
|
126
137
|
minDecimalPlaces: 2
|
|
127
138
|
}) }),
|
|
128
|
-
/* @__PURE__ */ e(
|
|
129
|
-
/* @__PURE__ */ e(
|
|
139
|
+
/* @__PURE__ */ e(l, { className: "!py-1", children: r.referenceNumber }),
|
|
140
|
+
/* @__PURE__ */ e(l, { className: "!py-1", children: r.content || "/" })
|
|
130
141
|
] }, r.id)) })
|
|
131
142
|
] }) }),
|
|
132
|
-
/* @__PURE__ */
|
|
133
|
-
/* @__PURE__ */
|
|
143
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-lg px-4 py-3", children: [
|
|
144
|
+
/* @__PURE__ */ t("p", { className: "text-text-secondary-700 order-2 grow text-center text-sm font-medium lg:order-none lg:grow-0", children: [
|
|
134
145
|
"Page ",
|
|
135
146
|
v,
|
|
136
147
|
" of ",
|
|
137
|
-
|
|
148
|
+
w
|
|
138
149
|
] }),
|
|
139
|
-
/* @__PURE__ */ e("div", { className: "grow" }),
|
|
150
|
+
/* @__PURE__ */ e("div", { className: "hidden grow lg:block" }),
|
|
140
151
|
/* @__PURE__ */ e(
|
|
141
152
|
$,
|
|
142
153
|
{
|
|
143
154
|
size: "sm",
|
|
144
|
-
value: [
|
|
155
|
+
value: [x.toString()],
|
|
145
156
|
onValueChange: (r) => {
|
|
146
|
-
const s = parseInt(r.value[0]),
|
|
147
|
-
|
|
157
|
+
const s = parseInt(r.value[0]), R = isNaN(s) ? 10 : s;
|
|
158
|
+
I(R);
|
|
148
159
|
},
|
|
149
160
|
collection: c,
|
|
150
161
|
lazyMount: !0,
|
|
151
|
-
|
|
162
|
+
className: "hidden lg:block",
|
|
163
|
+
children: /* @__PURE__ */ t(A, { children: [
|
|
152
164
|
/* @__PURE__ */ e(J, {}),
|
|
153
|
-
/* @__PURE__ */ e(U, { asChild: !0, children: /* @__PURE__ */ e(
|
|
154
|
-
/* @__PURE__ */ e(
|
|
165
|
+
/* @__PURE__ */ e(U, { asChild: !0, children: /* @__PURE__ */ e(H, {}) }),
|
|
166
|
+
/* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(G, { children: c.items.map((r) => /* @__PURE__ */ e(K, { item: r, children: c.stringifyItem(r) }, r)) }) }) })
|
|
155
167
|
] })
|
|
156
168
|
}
|
|
157
169
|
),
|
|
158
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ t("div", { className: "contents lg:flex", children: [
|
|
159
171
|
/* @__PURE__ */ e(
|
|
160
|
-
|
|
172
|
+
f,
|
|
161
173
|
{
|
|
162
174
|
size: "sm",
|
|
163
175
|
variant: "outline",
|
|
164
176
|
colorScheme: "gray",
|
|
165
|
-
className: "rounded-r-none border-r-0",
|
|
177
|
+
className: "order-1 lg:order-none lg:rounded-r-none lg:border-r-0",
|
|
166
178
|
disabled: !C || a,
|
|
167
|
-
onClick: () =>
|
|
168
|
-
children: /* @__PURE__ */ e(
|
|
179
|
+
onClick: () => S(),
|
|
180
|
+
children: /* @__PURE__ */ e(L, { className: "size-5" })
|
|
169
181
|
}
|
|
170
182
|
),
|
|
171
183
|
/* @__PURE__ */ e(
|
|
172
|
-
|
|
184
|
+
f,
|
|
173
185
|
{
|
|
174
186
|
size: "sm",
|
|
175
187
|
variant: "outline",
|
|
176
188
|
colorScheme: "gray",
|
|
177
|
-
className: "rounded-l-none",
|
|
189
|
+
className: "order-3 lg:order-none lg:rounded-l-none",
|
|
178
190
|
disabled: !T || a,
|
|
179
|
-
onClick: () =>
|
|
180
|
-
children: /* @__PURE__ */ e(
|
|
191
|
+
onClick: () => z(),
|
|
192
|
+
children: /* @__PURE__ */ e(V, { className: "size-5" })
|
|
181
193
|
}
|
|
182
194
|
)
|
|
183
195
|
] })
|
|
@@ -185,11 +197,11 @@ function Ke() {
|
|
|
185
197
|
] })
|
|
186
198
|
] });
|
|
187
199
|
}
|
|
188
|
-
const c =
|
|
189
|
-
items:
|
|
200
|
+
const c = O({
|
|
201
|
+
items: b.config.pageSizes,
|
|
190
202
|
itemToValue: (o) => o.toString(),
|
|
191
203
|
itemToString: (o) => `${o} items per page`
|
|
192
204
|
});
|
|
193
205
|
export {
|
|
194
|
-
|
|
206
|
+
Ye as TransactionRecordsTable
|
|
195
207
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("@ark-ui/react"),a=require("@date-fns/tz"),c=require("date-fns"),x=require("react");require("@opexa/portal-sdk-core");require("@tanstack/react-query");require("tiny-invariant");require("../../constants/index.js");const o=require("../../utils/capitalize.js"),m=require("../../utils/formatNumber.js");require("../../utils/getLocaleInfo.js");require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");require("../../utils/parseDecimal.js");require("lodash-es");require("@opexa/portal-sdk-core/object-id");require("../../client/hooks/useGlobalStore.js");const p=require("../../client/hooks/useInfiniteQueryHelper.js"),E=require("../../client/hooks/useLocaleInfo.js");require("usehooks-ts");const H=require("../../client/hooks/useWithdrawalRecordsQuery.js"),P=require("../../icons/ChevronDownIcon.js"),F=require("../../icons/ChevronLeftIcon.js"),L=require("../../icons/ChevronRightIcon.js"),M=require("../../icons/File02Icon.js"),O=require("../../icons/SpinnerIcon.js");require("../../ui/AlertDialog/AlertDialog.js");require("../../ui/Avatar/Avatar.js");const q=require("../../ui/Badge/Badge.js");require("../../ui/Button/button.recipe.js");require("../../ui/Checkbox/Checkbox.js");require("../../ui/Clipboard/Clipboard.js");require("../../ui/Collapsible/Collapsible.js");require("../../ui/DatePicker/DatePicker.js");require("../../ui/Dialog/Dialog.js");require("../../ui/Drawer/Drawer.js");require("../../ui/Field/Field.js");const j=require("../../ui/IconButton/IconButton.js");require("../../ui/NumberInput/NumberInput.js");require("../../ui/PasswordInput/PasswordInput.js");require("../../ui/PinInput/PinInput.js");require("../../ui/Popover/Popover.js");require("tailwind-merge");require("../../ui/Progress/Progress.js");require("../../ui/SegmentGroup/SegmentGroup.js");const t=require("../../ui/Select/Select.js"),i=require("../../ui/Table/Table.js");require("../../ui/Tabs/Tabs.js");const W=require("../Empty/Empty.js"),k=require("./TableFilters.js");function B(){const[s,y]=x.useState(),[d,N]=x.useState(),n=E.useLocaleInfo(),{page:w,pageSize:f,hasNextPage:C,hasPrevPage:S,next:I,prev:v,rows:u,setPageSize:z,totalPages:T,loading:l,firstPage:R}=p.useInfiniteQueryHelper(H.useWithdrawalRecordsQuery,{filter:{...d&&{status:{equal:d}},...s&&{dateTimeCreated:{...s.start&&{greaterThanOrEqual:new a.TZDateMini(c.startOfDay(s.start),n.timezone).toISOString()},...s.end&&{lesserThanOrEqual:new a.TZDateMini(c.endOfDay(s.end),n.timezone).toISOString()}}}}});return e.jsxs(e.Fragment,{children:[e.jsx(k.TableFilters,{enabledFilters:{withdrawalStatus:!0},value:{timestamp:s,withdrawalStatus:d},onChange:r=>{R(),y(r.timestamp),N(r.withdrawalStatus)}}),u.length<=0&&e.jsx(W.Empty,{icon:l?O.SpinnerIcon:M.File02Icon,title:l?"Just a moment":"No data",message:l?"Fetching latest withdrawal records...":"No data is currently available.",className:"mt-5xl"}),u.length>=1&&e.jsxs("div",{className:"border-border-primary -ml-4 mt-3xl w-dvw border-y lg:-ml-0 lg:w-full lg:rounded-xl lg:border-x",children:[e.jsx("div",{className:"border-border-primary scrollbar-thumb:bg-bg-quaternary scrollbar-track:bg-transparent scrollbar:h-2 scrollbar-thumb:rounded-full overflow-hidden overflow-x-auto rounded-xl rounded-b-none border-b",children:e.jsxs(i.Root,{className:"border-0",children:[e.jsx(i.Header,{children:e.jsxs(i.Row,{children:[e.jsx(i.Heading,{children:"Withdrawal No."}),e.jsx(i.Heading,{children:"Reference"}),e.jsx(i.Heading,{children:"Withdrawal Method"}),e.jsx(i.Heading,{children:"Mobile Number"}),e.jsx(i.Heading,{children:"Withdrawal Amount"}),e.jsx(i.Heading,{children:"Net Amount"}),e.jsx(i.Heading,{children:"Transaction Fee"}),e.jsx(i.Heading,{children:"Bank Name"}),e.jsx(i.Heading,{children:"Withdrawal Time"}),e.jsx(i.Heading,{children:"Status"})]})}),e.jsx(i.Body,{children:u.map(r=>e.jsxs(i.Row,{children:[e.jsx(i.Cell,{className:"!py-1",children:r.withdrawalNumber}),e.jsx(i.Cell,{className:"!py-1",children:r.reference}),e.jsx(i.Cell,{className:"!py-1",children:o.capitalize(r.type,{delimiter:o.capitalize.delimiters.UNDERSCORE})}),e.jsx(i.Cell,{className:"!py-1",children:r.recipientMobileNumber}),e.jsx(i.Cell,{className:"!py-1",children:m.formatNumber(r.amount,{currency:n.currency.code,minDecimalPlaces:2})}),e.jsx(i.Cell,{className:"!py-1",children:m.formatNumber(r.netAmount,{currency:n.currency.code,minDecimalPlaces:2})}),e.jsx(i.Cell,{className:"!py-1",children:m.formatNumber(r.fee,{currency:n.currency.code,minDecimalPlaces:2})}),e.jsx(i.Cell,{className:"!py-1",children:r.bank}),e.jsxs(i.Cell,{className:"!py-1",children:[e.jsx("div",{className:"leading-tight",children:c.format(r.dateTimeCreated,"MM/dd/yyyy",{in:a.tz(n.timezone)})}),e.jsx("div",{className:"text-text-tertiary-600 leading-tight",children:c.format(r.dateTimeCreated,"hh:mm a",{in:a.tz(n.timezone)})})]}),e.jsx(i.Cell,{className:"!py-1",children:e.jsx(q.Root,{variant:"subtle",colorScheme:r.status==="FAILED"||r.status==="REJECTED"||r.status==="CANCELLED"?"danger":r.status==="PENDING"?"warning":"success",children:e.jsx(q.Label,{children:o.capitalize(r.status,{delimiter:o.capitalize.delimiters.UNDERSCORE})})})})]},r.id))})]})}),e.jsxs("div",{className:"flex items-center gap-lg px-4 py-3",children:[e.jsxs("p",{className:"text-text-secondary-700 order-2 grow text-center text-sm font-medium lg:order-none lg:grow-0",children:["Page ",w," of ",T]}),e.jsx("div",{className:"hidden grow lg:block"}),e.jsx(t.Root,{size:"sm",value:[f.toString()],onValueChange:r=>{const g=parseInt(r.value[0]),D=isNaN(g)?10:g;z(D)},collection:h,lazyMount:!0,className:"hidden lg:block",children:e.jsxs(t.Trigger,{children:[e.jsx(t.ValueText,{}),e.jsx(t.Indicator,{asChild:!0,children:e.jsx(P.ChevronDownIcon,{})}),e.jsx(b.Portal,{children:e.jsx(t.Positioner,{children:e.jsx(t.Content,{children:h.items.map(r=>e.jsx(t.Item,{item:r,children:h.stringifyItem(r)},r))})})})]})}),e.jsxs("div",{className:"contents lg:flex",children:[e.jsx(j.IconButton,{size:"sm",variant:"outline",colorScheme:"gray",className:"order-1 lg:order-none lg:rounded-r-none lg:border-r-0",disabled:!S||l,onClick:()=>v(),children:e.jsx(F.ChevronLeftIcon,{className:"size-5"})}),e.jsx(j.IconButton,{size:"sm",variant:"outline",colorScheme:"gray",className:"order-3 lg:order-none lg:rounded-l-none",disabled:!C||l,onClick:()=>I(),children:e.jsx(L.ChevronRightIcon,{className:"size-5"})})]})]})]})]})}const h=b.createListCollection({items:p.useInfiniteQueryHelper.config.pageSizes,itemToValue:s=>s.toString(),itemToString:s=>`${s} items per page`});exports.WithdrawalRecordsTable=B;
|