react-native-unit-components 1.1.0 → 1.2.0

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 (119) hide show
  1. package/README.md +70 -1
  2. package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -1
  3. package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
  4. package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js +8 -0
  5. package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
  6. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js +12 -0
  7. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
  8. package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.js.map +1 -1
  9. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js +4 -0
  10. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
  11. package/lib/commonjs/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem.js +6 -5
  12. package/lib/commonjs/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem.js.map +1 -1
  13. package/lib/commonjs/components/UNCardComponent/UNCardComponent.js.map +1 -1
  14. package/lib/commonjs/messages/nativeMessages/cardMessage.js +1 -13
  15. package/lib/commonjs/messages/nativeMessages/cardMessage.js.map +1 -1
  16. package/lib/commonjs/messages/webMessages/accountMessage.js +12 -0
  17. package/lib/commonjs/messages/webMessages/accountMessage.js.map +1 -0
  18. package/lib/commonjs/messages/webMessages/index.js.map +1 -1
  19. package/lib/commonjs/messages/webMessages/unitMessages.js.map +1 -1
  20. package/lib/commonjs/scripts/html/bodyScript.js +14 -3
  21. package/lib/commonjs/scripts/html/bodyScript.js.map +1 -1
  22. package/lib/commonjs/sharedTypes/account.types.js +31 -0
  23. package/lib/commonjs/sharedTypes/account.types.js.map +1 -0
  24. package/lib/commonjs/sharedTypes/achCredit.types.js.map +1 -1
  25. package/lib/commonjs/sharedTypes/bookPayment.types.js.map +1 -1
  26. package/lib/commonjs/sharedTypes/card.types.js.map +1 -1
  27. package/lib/commonjs/sharedTypes/index.js +11 -0
  28. package/lib/commonjs/sharedTypes/index.js.map +1 -1
  29. package/lib/commonjs/sharedTypes/onLoadResponse.types.js.map +1 -1
  30. package/lib/commonjs/sharedTypes/payments.types.js +6 -6
  31. package/lib/commonjs/sharedTypes/payments.types.js.map +1 -1
  32. package/lib/commonjs/sharedTypes/types.js.map +1 -1
  33. package/lib/commonjs/sharedTypes/wallet.types.js +13 -1
  34. package/lib/commonjs/sharedTypes/wallet.types.js.map +1 -1
  35. package/lib/commonjs/webComponent/html.js +2 -0
  36. package/lib/commonjs/webComponent/html.js.map +1 -1
  37. package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -1
  38. package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
  39. package/lib/module/components/UNAccountComponent/UNAccountComponent.js +8 -0
  40. package/lib/module/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
  41. package/lib/module/components/UNActivityComponent/UNActivityComponent.js +11 -0
  42. package/lib/module/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
  43. package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.js.map +1 -1
  44. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js +4 -0
  45. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
  46. package/lib/module/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem.js +7 -6
  47. package/lib/module/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem.js.map +1 -1
  48. package/lib/module/components/UNCardComponent/UNCardComponent.js.map +1 -1
  49. package/lib/module/messages/nativeMessages/cardMessage.js +0 -11
  50. package/lib/module/messages/nativeMessages/cardMessage.js.map +1 -1
  51. package/lib/module/messages/webMessages/accountMessage.js +5 -0
  52. package/lib/module/messages/webMessages/accountMessage.js.map +1 -0
  53. package/lib/module/messages/webMessages/index.js.map +1 -1
  54. package/lib/module/messages/webMessages/unitMessages.js.map +1 -1
  55. package/lib/module/scripts/html/bodyScript.js +14 -3
  56. package/lib/module/scripts/html/bodyScript.js.map +1 -1
  57. package/lib/module/sharedTypes/account.types.js +23 -0
  58. package/lib/module/sharedTypes/account.types.js.map +1 -0
  59. package/lib/module/sharedTypes/achCredit.types.js.map +1 -1
  60. package/lib/module/sharedTypes/bookPayment.types.js.map +1 -1
  61. package/lib/module/sharedTypes/card.types.js.map +1 -1
  62. package/lib/module/sharedTypes/index.js +1 -0
  63. package/lib/module/sharedTypes/index.js.map +1 -1
  64. package/lib/module/sharedTypes/onLoadResponse.types.js.map +1 -1
  65. package/lib/module/sharedTypes/payments.types.js +4 -4
  66. package/lib/module/sharedTypes/payments.types.js.map +1 -1
  67. package/lib/module/sharedTypes/types.js.map +1 -1
  68. package/lib/module/sharedTypes/wallet.types.js +11 -0
  69. package/lib/module/sharedTypes/wallet.types.js.map +1 -1
  70. package/lib/module/webComponent/html.js +2 -0
  71. package/lib/module/webComponent/html.js.map +1 -1
  72. package/lib/typescript/components/UNACHCreditComponent/UNACHCreditComponent.d.ts +2 -2
  73. package/lib/typescript/components/UNACHDebitComponent/UNACHDebitComponent.d.ts +2 -2
  74. package/lib/typescript/components/UNAccountComponent/UNAccountComponent.d.ts +4 -2
  75. package/lib/typescript/components/UNActivityComponent/UNActivityComponent.d.ts +2 -2
  76. package/lib/typescript/components/UNBookPaymentComponent/UNBookPaymentComponent.d.ts +2 -2
  77. package/lib/typescript/components/UNCardComponent/UNCardComponent.d.ts +2 -2
  78. package/lib/typescript/messages/nativeMessages/cardMessage.d.ts +4 -13
  79. package/lib/typescript/messages/webMessages/accountMessage.d.ts +8 -0
  80. package/lib/typescript/messages/webMessages/index.d.ts +3 -2
  81. package/lib/typescript/messages/webMessages/unitMessages.d.ts +2 -2
  82. package/lib/typescript/scripts/html/bodyScript.d.ts +1 -0
  83. package/lib/typescript/sharedTypes/account.types.d.ts +114 -0
  84. package/lib/typescript/sharedTypes/achCredit.types.d.ts +13 -13
  85. package/lib/typescript/sharedTypes/bookPayment.types.d.ts +11 -11
  86. package/lib/typescript/sharedTypes/card.types.d.ts +18 -18
  87. package/lib/typescript/sharedTypes/index.d.ts +1 -0
  88. package/lib/typescript/sharedTypes/onLoadResponse.types.d.ts +3 -3
  89. package/lib/typescript/sharedTypes/payments.types.d.ts +5 -5
  90. package/lib/typescript/sharedTypes/types.d.ts +7 -7
  91. package/lib/typescript/sharedTypes/wallet.types.d.ts +11 -2
  92. package/package.json +1 -1
  93. package/src/components/UNACHCreditComponent/UNACHCreditComponent.tsx +3 -3
  94. package/src/components/UNACHDebitComponent/UNACHDebitComponent.tsx +3 -3
  95. package/src/components/UNAccountComponent/UNAccountComponent.tsx +11 -3
  96. package/src/components/UNActivityComponent/UNActivityComponent.tsx +15 -4
  97. package/src/components/UNBookPaymentComponent/UNBookPaymentComponent.tsx +3 -3
  98. package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.tsx +11 -1
  99. package/src/components/UNBottomSheetComponent/components/UNAddToWalletBottomSheetItem.tsx +8 -7
  100. package/src/components/UNCardComponent/UNCardComponent.tsx +5 -5
  101. package/src/messages/nativeMessages/cardMessage.ts +5 -15
  102. package/src/messages/webMessages/accountMessage.ts +12 -0
  103. package/src/messages/webMessages/index.ts +3 -0
  104. package/src/messages/webMessages/unitMessages.ts +2 -2
  105. package/src/scripts/html/bodyScript.ts +14 -2
  106. package/src/sharedTypes/account.types.ts +117 -0
  107. package/src/sharedTypes/achCredit.types.ts +13 -13
  108. package/src/sharedTypes/bookPayment.types.ts +11 -11
  109. package/src/sharedTypes/card.types.ts +18 -18
  110. package/src/sharedTypes/index.ts +1 -0
  111. package/src/sharedTypes/onLoadResponse.types.ts +5 -5
  112. package/src/sharedTypes/payments.types.ts +5 -5
  113. package/src/sharedTypes/types.ts +8 -8
  114. package/src/sharedTypes/wallet.types.ts +13 -3
  115. package/src/webComponent/html.ts +2 -0
  116. package/ios/UnitReactNativeComponents.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -4
  117. package/ios/UnitReactNativeComponents.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  118. package/ios/UnitReactNativeComponents.xcodeproj/project.xcworkspace/xcuserdata/alonshprung.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  119. package/ios/UnitReactNativeComponents.xcodeproj/xcuserdata/alonshprung.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
@@ -1,46 +1,46 @@
1
- import type { Address, FullName, Limits, Relationship, Tags } from './types';
1
+ import type { UNAddress, UNFullName, UNLimits, UNRelationship, UNTags } from './types';
2
2
 
3
- export type UNCardData = IndividualDebitCard | BusinessDebitCard
3
+ export type UNCardData = UNIndividualDebitCard | UNBusinessDebitCard
4
4
 
5
- type CardStatus = 'Active' | 'Inactive' | 'Stolen' | 'Lost' | 'Frozen' | 'ClosedByCustomer' | 'SuspectedFraud'
5
+ type UNCardStatus = 'Active' | 'Inactive' | 'Stolen' | 'Lost' | 'Frozen' | 'ClosedByCustomer' | 'SuspectedFraud'
6
6
 
7
- export type IndividualDebitCard = {
7
+ export type UNIndividualDebitCard = {
8
8
  id: string,
9
9
  type: 'individualDebitCard' | 'individualVirtualDebitCard',
10
10
  attributes: {
11
11
  createdAt: string,
12
12
  last4Digits: string,
13
13
  expirationDate: string,
14
- status: CardStatus,
15
- shippingAddress?: Address, /* not exists in virtual card */
14
+ status: UNCardStatus,
15
+ shippingAddress?: UNAddress, /* not exists in virtual card */
16
16
  updatedAt?: string,
17
17
  design?: string,
18
18
  additionalEmbossedText?: string,
19
19
  idempotencyKey?: string,
20
- tags?: Tags,
21
- limits?: Limits,
20
+ tags?: UNTags,
21
+ limits?: UNLimits,
22
22
  printOnlyBusinessName?: boolean
23
23
  },
24
24
  relationships: {
25
- account: Relationship,
26
- customer: Relationship
25
+ account: UNRelationship,
26
+ customer: UNRelationship
27
27
  }
28
28
  }
29
29
 
30
- export type BusinessDebitCard = {
30
+ export type UNBusinessDebitCard = {
31
31
  id: string,
32
32
  type: 'businessDebitCard' | 'businessVirtualDebitCard',
33
33
  attributes: {
34
- fullName: FullName,
34
+ fullName: UNFullName,
35
35
  dateOfBirth: string,
36
- address: Address,
37
- shippingAddress?: Address,
36
+ address: UNAddress,
37
+ shippingAddress?: UNAddress,
38
38
  phone: string,
39
39
  email: string,
40
40
  createdAt: string,
41
41
  last4Digits: string,
42
42
  expirationDate: string,
43
- status: CardStatus,
43
+ status: UNCardStatus,
44
44
  updatedAt?: string,
45
45
  ssn?: string,
46
46
  passport?: string,
@@ -49,11 +49,11 @@ export type BusinessDebitCard = {
49
49
  additionalEmbossedText?: string,
50
50
  idempotencyKey?: string,
51
51
  tags?: Record<string, string>
52
- limits?: Limits,
52
+ limits?: UNLimits,
53
53
  printOnlyBusinessName?: boolean
54
54
  },
55
55
  relationships: {
56
- account: Relationship,
57
- customer: Relationship
56
+ account: UNRelationship,
57
+ customer: UNRelationship
58
58
  }
59
59
  }
@@ -3,3 +3,4 @@ export * from './card.types';
3
3
  export * from './onLoadResponse.types';
4
4
  export * from './achCredit.types';
5
5
  export * from './payments.types';
6
+ export * from "./account.types";
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable @typescript-eslint/ban-types */
2
2
  import type { UNCardData } from '../sharedTypes';
3
3
 
4
- export type SuccessResponseUnitOnLoad = {
4
+ export type UNSuccessResponseUnitOnLoad = {
5
5
  /*
6
6
  Object since the current response data types from 'Activities' and 'BookPayment' do not have documentation.
7
7
  When things are determined, we may update it
@@ -11,7 +11,7 @@ export type SuccessResponseUnitOnLoad = {
11
11
  errors: null
12
12
  }
13
13
 
14
- export type ErrorResponseUnitOnLoad = {
14
+ export type UNErrorResponseUnitOnLoad = {
15
15
  errors: [
16
16
  {
17
17
  status: string,
@@ -22,6 +22,6 @@ export type ErrorResponseUnitOnLoad = {
22
22
  }
23
23
  ]
24
24
  }
25
- export type ResponseUnitOnLoadEvent =
26
- | SuccessResponseUnitOnLoad
27
- | ErrorResponseUnitOnLoad
25
+ export type UNResponseUnitOnLoadEvent =
26
+ | UNSuccessResponseUnitOnLoad
27
+ | UNErrorResponseUnitOnLoad
@@ -1,14 +1,14 @@
1
- export type PaymentStatus = 'Sent' | 'Rejected'
1
+ export type UNPaymentStatus = 'Sent' | 'Rejected'
2
2
 
3
- export type AchCounterparty = {
3
+ export type UNAchCounterparty = {
4
4
  name: string
5
5
  accountNumber: string
6
6
  routingNumber: string
7
- accountType: AccountType
7
+ accountType: UNAccountType
8
8
  }
9
9
 
10
- type AccountType = 'Savings' | 'Checking'
10
+ type UNAccountType = 'Savings' | 'Checking'
11
11
 
12
- export enum CounterpartyVerificationMethod {
12
+ export enum UNCounterpartyVerificationMethod {
13
13
  Plaid = 'Plaid',
14
14
  }
@@ -1,4 +1,4 @@
1
- export type Address = {
1
+ export type UNAddress = {
2
2
  street: string,
3
3
  street2?: string,
4
4
  city: string,
@@ -7,29 +7,29 @@ export type Address = {
7
7
  country: string
8
8
  }
9
9
 
10
- export type Limits = {
10
+ export type UNLimits = {
11
11
  dailyWithdrawal?: string | number,
12
12
  dailyPurchase?: string | number,
13
13
  monthlyWithdrawal?: string | number,
14
14
  monthlyPurchase?: string | number,
15
15
  }
16
16
 
17
- type Data = {
17
+ type UNData = {
18
18
  type: string,
19
19
  id: string
20
20
  }
21
21
 
22
- export type Relationship = {
22
+ export type UNRelationship = {
23
23
  data:
24
24
  | null
25
25
  | []
26
- | Data
27
- | Data[]
26
+ | UNData
27
+ | UNData[]
28
28
  }
29
29
 
30
- export type FullName = {
30
+ export type UNFullName = {
31
31
  first: string,
32
32
  last: string
33
33
  }
34
34
 
35
- export type Tags = Record<string, string> // TODO: specify Tag type
35
+ export type UNTags = Record<string, string> // TODO: specify Tag type
@@ -1,5 +1,3 @@
1
- import type { CardAddToWalletStatus } from 'src/messages/nativeMessages/cardMessage';
2
-
3
1
  export enum UNWalletCode {
4
2
  Apple = 'ApplePayPushProvision',
5
3
  Google = 'GooglePayPushProvision',
@@ -13,5 +11,17 @@ export enum UNWalletName {
13
11
  export interface UNWallet {
14
12
  name: string;
15
13
  code: string;
16
- status: CardAddToWalletStatus
14
+ status: UNCardAddToWalletStatus
15
+ }
16
+
17
+ export enum UNCardAddToWalletStatus {
18
+ pending,
19
+ readyToProvisioning = 'ReadyToProvision',
20
+ addedToWallet = 'AlreadyProvisioned',
21
+ iosProvisionedInCurrentDevice = 'ProvisionedInCurrentDevice',
22
+ iosProvisionedInPairedDevice = 'ProvisionedInPairedDevice',
23
+ androidNotInstalled = 'NotInstalled',
24
+ androidWalletSetupNotCompleted = 'WalletSetupNotCompleted',
25
+ androidWalletAppUpdateAvailable = 'WalletAppUpdateAvailable'
26
+
17
27
  }
@@ -47,6 +47,8 @@ const htmlText = `
47
47
 
48
48
  ${LISTENERS.unitRequestExternalSdk}
49
49
 
50
+ ${LISTENERS.unitAccountChanged}
51
+
50
52
  ${DISPATCH_RENDERING_EVENT}
51
53
 
52
54
  ${HTML_PLACEHOLDER.SCRIPT_FROM_NATIVE}
@@ -1,4 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Workspace
3
- version = "1.0">
4
- </Workspace>
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>IDEDidComputeMac32BitWarning</key>
6
- <true/>
7
- </dict>
8
- </plist>
@@ -1,14 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>SchemeUserState</key>
6
- <dict>
7
- <key>UnitReactNativeComponents.xcscheme_^#shared#^_</key>
8
- <dict>
9
- <key>orderHint</key>
10
- <integer>0</integer>
11
- </dict>
12
- </dict>
13
- </dict>
14
- </plist>