@opexa/portal-components 0.0.974 → 0.0.976

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.
Files changed (55) hide show
  1. package/dist/components/AccountInfo/AccountInfo.js +7 -2
  2. package/dist/components/KYC/KYCDefault/KYCDefault.js +5 -3
  3. package/dist/components/KYC/KycOpenOnHomeMount.js +5 -5
  4. package/dist/schemas/forgotPasswordSchema.d.ts +5 -5
  5. package/dist/ui/AlertDialog/AlertDialog.d.ts +187 -187
  6. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +17 -17
  7. package/dist/ui/Badge/Badge.d.ts +12 -12
  8. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  9. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  10. package/dist/ui/Carousel/Carousel.d.ts +99 -99
  11. package/dist/ui/Carousel/carousel.recipe.d.ts +11 -11
  12. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  13. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  14. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  15. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  16. package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
  17. package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
  18. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  19. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  20. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  21. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  22. package/dist/ui/Dialog/Dialog.d.ts +33 -33
  23. package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
  24. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  25. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  26. package/dist/ui/Menu/Menu.d.ts +360 -360
  27. package/dist/ui/Menu/menu.recipe.d.ts +20 -20
  28. package/dist/ui/Popover/Popover.d.ts +154 -154
  29. package/dist/ui/Popover/popover.recipe.d.ts +14 -14
  30. package/dist/ui/Progress/Progress.d.ts +27 -27
  31. package/dist/ui/Progress/progress.recipe.d.ts +3 -3
  32. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  33. package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
  34. package/dist/ui/Select/Select.d.ts +45 -45
  35. package/dist/ui/Select/select.recipe.d.ts +3 -3
  36. package/dist/ui/Table/Table.d.ts +21 -21
  37. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  38. package/dist/ui/Table/table.recipe.d.ts +3 -3
  39. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  40. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  41. package/dist/ui/Tooltip/Tooltip.d.ts +30 -30
  42. package/dist/ui/Tooltip/tooltip.recipe.d.ts +5 -5
  43. package/package.json +1 -1
  44. package/dist/client/hooks/useVerifyMobileNumber.d.ts +0 -3
  45. package/dist/client/hooks/useVerifyMobileNumber.js +0 -20
  46. package/dist/components/DepositWithdrawal/Deposit/AurixPayPayMayaDeposit/AurixPayGrabPayDeposit.d.ts +0 -1
  47. package/dist/components/DepositWithdrawal/Deposit/AurixPayPayMayaDeposit/AurixPayGrabPayDeposit.js +0 -241
  48. package/dist/components/SingleSignOn/SingleSignOn.d.ts +0 -4
  49. package/dist/components/SingleSignOn/SingleSignOn.js +0 -185
  50. package/dist/components/SingleSignOn/index.d.ts +0 -1
  51. package/dist/components/SingleSignOn/index.js +0 -1
  52. package/dist/lib/components/UpdateMobilePhoneNumber/UpdateMobilePhoneNumber.d.ts +0 -1
  53. package/dist/lib/components/UpdateMobilePhoneNumber/UpdateMobilePhoneNumber.js +0 -152
  54. package/dist/lib/components/UpdateMobilePhoneNumber/index.d.ts +0 -1
  55. package/dist/lib/components/UpdateMobilePhoneNumber/index.js +0 -1
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { ark } from '@ark-ui/react/factory';
4
4
  import FacebookLogin from '@greatsumini/react-facebook-login';
5
5
  import { zodResolver } from '@hookform/resolvers/zod';
@@ -13,8 +13,10 @@ import { z } from 'zod';
13
13
  import { useAccountQuery } from '../../client/hooks/useAccountQuery.js';
14
14
  import { useDisclosure } from '../../client/hooks/useDisclosure.js';
15
15
  import { useFacebookClientQuery } from '../../client/hooks/useFacebookClientQuery.js';
16
+ import { useFeatureFlag } from '../../client/hooks/useFeatureFlag.js';
16
17
  import { useGoogleClientIdQuery } from '../../client/hooks/useGoogleClientIdQuery.js';
17
18
  import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
19
+ import { useMemberVerificationQuery } from '../../client/hooks/useMemberVerificationQuery.js';
18
20
  import { useMobileNumberParser } from '../../client/hooks/useMobileNumberParser.js';
19
21
  import { useProfileCompletionQuery } from '../../client/hooks/useProfileCompletionQuery.js';
20
22
  import { useSessionQuery } from '../../client/hooks/useSessionQuery.js';
@@ -93,6 +95,9 @@ function ProfileInfo({ avatar }) {
93
95
  function PersonalInfo(props) {
94
96
  const accountQuery = useAccountQuery();
95
97
  const account = accountQuery.data;
98
+ const featureFlag = useFeatureFlag();
99
+ const verificationQuery = useMemberVerificationQuery();
100
+ const verification = verificationQuery.data;
96
101
  const updateAccountMutation = useUpdateAccountMutation({
97
102
  onSuccess() {
98
103
  toaster.success({
@@ -155,7 +160,7 @@ function PersonalInfo(props) {
155
160
  ? data.birthDay
156
161
  : undefined,
157
162
  });
158
- }), children: [_jsxs("div", { className: "px-4 py-5 lg:px-3xl lg:py-5", children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.realName, readOnly: !!account?.realName, children: [_jsx(Field.Label, { children: "Full name" }), _jsx(Field.Input, { ...form.register('realName') }), _jsx(Field.ErrorText, { children: form.formState.errors.realName?.message })] }), _jsxs(Field.Root, { className: "mt-6", invalid: !!form.formState.errors.birthDay, readOnly: !!account?.birthDay, children: [_jsx(Field.Label, { children: "Date of birth" }), _jsx(Field.Input, { type: "date", ...form.register('birthDay'), className: twMerge('h-full py-2.5', account?.birthDay && 'pointer-events-none') }), _jsx(Field.ErrorText, { children: form.formState.errors.birthDay?.message })] }), props.shouldShowBranchCode && (_jsxs(Field.Root, { className: "mt-6", invalid: !!form.formState.errors.birthDay, readOnly: !!account?.birthDay, children: [_jsx(Field.Label, { children: "Branch Code" }), _jsx(Field.Input, { type: "text", disabled: true, value: displayBranchName ?? account?.branchCode ?? '' })] }))] }), form.formState.isDirty && (_jsxs("div", { className: "flex justify-end gap-lg border-border-secondary border-t px-xl py-lg lg:px-3xl lg:py-xl", children: [_jsx(Button, { size: "sm", variant: "outline", fullWidth: false, disabled: updateAccountMutation.isPending, onClick: () => form.reset(), children: "Cancel" }), _jsx(Button, { type: "submit", size: "sm", fullWidth: false, disabled: !form.formState.isValid || updateAccountMutation.isPending, children: "Save Changes" })] }))] })] }));
163
+ }), children: [_jsxs("div", { className: "px-4 py-5 lg:px-3xl lg:py-5", children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.realName, readOnly: !!account?.realName, children: [_jsx(Field.Label, { children: "Full name" }), _jsx(Field.Input, { ...form.register('realName') }), _jsx(Field.ErrorText, { children: form.formState.errors.realName?.message })] }), _jsxs(Field.Root, { className: "mt-6", invalid: !!form.formState.errors.birthDay, readOnly: !!account?.birthDay, children: [_jsx(Field.Label, { children: "Date of birth" }), _jsx(Field.Input, { type: "date", ...form.register('birthDay'), className: twMerge('h-full py-2.5', account?.birthDay && 'pointer-events-none') }), _jsx(Field.ErrorText, { children: form.formState.errors.birthDay?.message })] }), props.shouldShowBranchCode && (_jsxs(Field.Root, { className: "mt-6", readOnly: true, children: [_jsx(Field.Label, { children: "Branch Code" }), _jsx(Field.Input, { type: "text", disabled: true, value: displayBranchName ?? account?.branchCode ?? '' })] })), featureFlag.enabled && (_jsxs(_Fragment, { children: [_jsxs(Field.Root, { className: "mt-6", readOnly: true, children: [_jsx(Field.Label, { children: "Address" }), _jsx(Field.Input, { type: "text", readOnly: true, value: verification?.address ?? '' })] }), _jsxs(Field.Root, { className: "mt-6", readOnly: true, children: [_jsx(Field.Label, { children: "Nature of Work" }), _jsx(Field.Input, { type: "text", readOnly: true, value: verification?.natureOfWork ?? '' })] })] }))] }), form.formState.isDirty && (_jsxs("div", { className: "flex justify-end gap-lg border-border-secondary border-t px-xl py-lg lg:px-3xl lg:py-xl", children: [_jsx(Button, { size: "sm", variant: "outline", fullWidth: false, disabled: updateAccountMutation.isPending, onClick: () => form.reset(), children: "Cancel" }), _jsx(Button, { type: "submit", size: "sm", fullWidth: false, disabled: !form.formState.isValid || updateAccountMutation.isPending, children: "Save Changes" })] }))] })] }));
159
164
  }
160
165
  function ContactInfo({ variant }) {
161
166
  const localeInfo = useLocaleInfo();
@@ -15,16 +15,18 @@ import { useKYCDefault } from './useKYCDefault.js';
15
15
  export function KYCDefault(props) {
16
16
  const globalStore = useGlobalStore(useShallow((ctx) => ({
17
17
  kyc: ctx.kyc,
18
+ disclaimer: ctx.disclaimer,
18
19
  kycReminder: ctx.kycReminder,
19
20
  responsibleGamingReminder: ctx.responsibleGamingReminder,
20
21
  updateMobilePhoneNumber: ctx.updateMobilePhoneNumber,
21
22
  })));
22
23
  const kyc = useKYCDefault(props?.isSkippable ?? false, props?.hasKYCReviewPromo ?? false);
23
24
  const { isLoading: sessionLoading } = useSessionQuery();
24
- const isDialogOpen = !globalStore.kycReminder.open &&
25
- globalStore.kyc.open &&
25
+ const isDialogOpen = globalStore.kyc.open &&
26
+ !globalStore.kycReminder.open &&
26
27
  !sessionLoading &&
27
- !globalStore.updateMobilePhoneNumber.open;
28
+ !globalStore.updateMobilePhoneNumber.open &&
29
+ !globalStore.disclaimer.open;
28
30
  return (_jsxs(_Fragment, { children: [_jsx(KYCDefaultContext, { value: kyc, children: _jsx(Dialog.Root, { open: isDialogOpen, onOpenChange: (details) => {
29
31
  globalStore.kyc.setOpen(details.open);
30
32
  }, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, onExitComplete: kyc.reset, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { className: "fixed top-[57px] overflow-hidden", children: _jsx(Dialog.Content, { className: "mx-auto h-full w-full overflow-y-auto bg-bg-primary-alt md:max-h-[95vh] lg:w-fit", children: _jsxs("div", { className: "mt-[calc(var(--safe-area-inset-top)*3)] flex h-dvh w-full flex-col overflow-y-auto p-3xl sm:h-fit lg:w-[400px]", children: [_jsx(Image, { src: props.logo, alt: "", width: 200, height: 100, className: "mx-auto mb-5 block h-7.5 w-auto", draggable: false }), _jsx(Indicator, {}), kyc.step === 1 && _jsx(IdentityVerification, {}), kyc.step === 2 && _jsx(PersonalInformation, {})] }) }) })] }) }) }), _jsx(KYCReminder, { ...props }), _jsx(KYCReview, {})] }));
@@ -27,8 +27,12 @@ export function KycOpenOnHomeMount(props) {
27
27
  const shouldShowReminder = Boolean(props.isSkippable);
28
28
  const hasSeenKycModal = sessionStorage.getItem('hasSeenKycModal');
29
29
  const isFirstVisit = !hasSeenKycModal;
30
+ // Handle member verification locked FIRST (highest priority)
31
+ if (isVerificationLocked) {
32
+ setkycReminderOpen(true);
33
+ }
30
34
  // Handle rejected verification status
31
- if (isRejected) {
35
+ else if (isRejected) {
32
36
  if (isFirstVisit) {
33
37
  setkycReminderOpen(false);
34
38
  setkycOpen(true);
@@ -51,10 +55,6 @@ export function KycOpenOnHomeMount(props) {
51
55
  setkycOpen(!shouldShowReminder);
52
56
  }
53
57
  }
54
- // Handle member verification locked
55
- else if (isVerificationLocked) {
56
- setkycReminderOpen(true);
57
- }
58
58
  // Handle completed kyc progress
59
59
  else if (isKycCompleted) {
60
60
  setkycReminderOpen(false);
@@ -8,25 +8,25 @@ export declare const createForgotPasswordSchema: (mobileNumberParser: MobileNumb
8
8
  mobileNumber: z.ZodEffects<z.ZodString, string, string>;
9
9
  verificationCode: z.ZodEffects<z.ZodString, string, string>;
10
10
  }, "strip", z.ZodTypeAny, {
11
- password: string;
12
- confirmPassword: string;
13
11
  mobileNumber: string;
14
12
  verificationCode: string;
15
- }, {
16
13
  password: string;
17
14
  confirmPassword: string;
15
+ }, {
18
16
  mobileNumber: string;
19
17
  verificationCode: string;
20
- }>, {
21
18
  password: string;
22
19
  confirmPassword: string;
20
+ }>, {
23
21
  mobileNumber: string;
24
22
  verificationCode: string;
25
- }, {
26
23
  password: string;
27
24
  confirmPassword: string;
25
+ }, {
28
26
  mobileNumber: string;
29
27
  verificationCode: string;
28
+ password: string;
29
+ confirmPassword: string;
30
30
  }>;
31
31
  export type ForgotPasswordSchema = z.infer<ReturnType<typeof createForgotPasswordSchema>>;
32
32
  export {};