@weareconceptstudio/account 2.1.12 → 2.1.14

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 (316) hide show
  1. package/cli/init-config.js +221 -0
  2. package/cli/postinstall.js +31 -0
  3. package/cli/test-user-integration.mjs +150 -0
  4. package/dist/AccountProvider.d.ts.map +1 -1
  5. package/dist/AccountProvider.js +14 -11
  6. package/dist/AccountProvider.js.map +1 -1
  7. package/dist/components/AccountButton/index.d.ts.map +1 -1
  8. package/dist/components/AccountButton/index.js +33 -5
  9. package/dist/components/AccountButton/index.js.map +1 -1
  10. package/dist/components/AccountButton/style.d.ts +2 -0
  11. package/dist/components/AccountButton/style.d.ts.map +1 -1
  12. package/dist/components/AccountButton/style.js +74 -0
  13. package/dist/components/AccountButton/style.js.map +1 -1
  14. package/dist/components/CartPageDetector.d.ts.map +1 -1
  15. package/dist/components/CartPageDetector.js +13 -0
  16. package/dist/components/CartPageDetector.js.map +1 -1
  17. package/dist/components/CustomCheckbox/index.d.ts +1 -1
  18. package/dist/components/CustomCheckbox/index.d.ts.map +1 -1
  19. package/dist/components/CustomCheckbox/index.js +4 -3
  20. package/dist/components/CustomCheckbox/index.js.map +1 -1
  21. package/dist/components/LineItemAttributes/index.d.ts +7 -0
  22. package/dist/components/LineItemAttributes/index.d.ts.map +1 -0
  23. package/dist/components/LineItemAttributes/index.js +24 -0
  24. package/dist/components/LineItemAttributes/index.js.map +1 -0
  25. package/dist/components/LineItemProductInfo/index.d.ts +14 -0
  26. package/dist/components/LineItemProductInfo/index.d.ts.map +1 -0
  27. package/dist/components/LineItemProductInfo/index.js +24 -0
  28. package/dist/components/LineItemProductInfo/index.js.map +1 -0
  29. package/dist/components/TotalCheckout/index.js +1 -1
  30. package/dist/components/TotalCheckout/index.js.map +1 -1
  31. package/dist/components/WarningMessageForPopup/index.js +3 -3
  32. package/dist/components/WarningMessageForPopup/index.js.map +1 -1
  33. package/dist/config.d.ts +4 -0
  34. package/dist/config.d.ts.map +1 -0
  35. package/dist/config.js +11 -0
  36. package/dist/config.js.map +1 -0
  37. package/dist/index.d.ts +3 -0
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +2 -0
  40. package/dist/index.js.map +1 -1
  41. package/dist/modules/account/AccountSettingsTemplate/AccountInfo/index.js +1 -1
  42. package/dist/modules/account/AccountSettingsTemplate/AccountInfo/index.js.map +1 -1
  43. package/dist/modules/account/AccountSettingsTemplate/AccountPassword/index.js +1 -1
  44. package/dist/modules/account/AccountSettingsTemplate/AccountPassword/index.js.map +1 -1
  45. package/dist/modules/account/AccountSettingsTemplate/Subscription/index.js +1 -1
  46. package/dist/modules/account/AccountSettingsTemplate/Subscription/index.js.map +1 -1
  47. package/dist/modules/address/AddressForm/index.d.ts.map +1 -1
  48. package/dist/modules/address/AddressForm/index.js +14 -11
  49. package/dist/modules/address/AddressForm/index.js.map +1 -1
  50. package/dist/modules/address/AddressForm/style.d.ts.map +1 -1
  51. package/dist/modules/address/AddressForm/style.js +71 -0
  52. package/dist/modules/address/AddressForm/style.js.map +1 -1
  53. package/dist/modules/address/AddressProvider.d.ts +2 -1
  54. package/dist/modules/address/AddressProvider.d.ts.map +1 -1
  55. package/dist/modules/address/AddressProvider.js +3 -2
  56. package/dist/modules/address/AddressProvider.js.map +1 -1
  57. package/dist/modules/address/SelectAddressPopup/index.js +1 -1
  58. package/dist/modules/address/SelectAddressPopup/index.js.map +1 -1
  59. package/dist/modules/address/ShippingBillingInfo/index.d.ts.map +1 -1
  60. package/dist/modules/address/ShippingBillingInfo/index.js +4 -33
  61. package/dist/modules/address/ShippingBillingInfo/index.js.map +1 -1
  62. package/dist/modules/auth/ForgotPasswordTemplate/index.js +1 -1
  63. package/dist/modules/auth/ForgotPasswordTemplate/index.js.map +1 -1
  64. package/dist/modules/auth/ResetPasswordTemplate/index.js +2 -2
  65. package/dist/modules/auth/ResetPasswordTemplate/index.js.map +1 -1
  66. package/dist/modules/auth/SignInTemplate/index.js +2 -2
  67. package/dist/modules/auth/SignInTemplate/index.js.map +1 -1
  68. package/dist/modules/auth/SignUpTemplate/index.d.ts.map +1 -1
  69. package/dist/modules/auth/SignUpTemplate/index.js +5 -5
  70. package/dist/modules/auth/SignUpTemplate/index.js.map +1 -1
  71. package/dist/modules/auth/SignUpTemplate/style.d.ts.map +1 -1
  72. package/dist/modules/auth/SignUpTemplate/style.js +6 -0
  73. package/dist/modules/auth/SignUpTemplate/style.js.map +1 -1
  74. package/dist/modules/auth/VerifyEmailAddressTemplate/index.js +1 -1
  75. package/dist/modules/auth/VerifyEmailAddressTemplate/index.js.map +1 -1
  76. package/dist/modules/cart/CartModificationWarningPopup/index.d.ts +6 -0
  77. package/dist/modules/cart/CartModificationWarningPopup/index.d.ts.map +1 -0
  78. package/dist/modules/cart/CartModificationWarningPopup/index.js +17 -0
  79. package/dist/modules/cart/CartModificationWarningPopup/index.js.map +1 -0
  80. package/dist/modules/cart/CartModificationWarningPopup/style.d.ts +3 -0
  81. package/dist/modules/cart/CartModificationWarningPopup/style.d.ts.map +1 -0
  82. package/dist/modules/cart/CartModificationWarningPopup/style.js +77 -0
  83. package/dist/modules/cart/CartModificationWarningPopup/style.js.map +1 -0
  84. package/dist/modules/cart/CartTemplate/index.d.ts +2 -1
  85. package/dist/modules/cart/CartTemplate/index.d.ts.map +1 -1
  86. package/dist/modules/cart/CartTemplate/index.js +2 -2
  87. package/dist/modules/cart/CartTemplate/index.js.map +1 -1
  88. package/dist/modules/cart/EmptyCart/index.d.ts.map +1 -1
  89. package/dist/modules/cart/EmptyCart/index.js +7 -3
  90. package/dist/modules/cart/EmptyCart/index.js.map +1 -1
  91. package/dist/modules/cart/components/CartItems/Item/EditButton.d.ts.map +1 -1
  92. package/dist/modules/cart/components/CartItems/Item/EditButton.js +0 -1
  93. package/dist/modules/cart/components/CartItems/Item/EditButton.js.map +1 -1
  94. package/dist/modules/cart/components/CartItems/Item/ItemActions.d.ts.map +1 -1
  95. package/dist/modules/cart/components/CartItems/Item/ItemActions.js +0 -1
  96. package/dist/modules/cart/components/CartItems/Item/ItemActions.js.map +1 -1
  97. package/dist/modules/cart/components/CartItems/Item/ItemAttributes.d.ts +3 -1
  98. package/dist/modules/cart/components/CartItems/Item/ItemAttributes.d.ts.map +1 -1
  99. package/dist/modules/cart/components/CartItems/Item/ItemAttributes.js +11 -34
  100. package/dist/modules/cart/components/CartItems/Item/ItemAttributes.js.map +1 -1
  101. package/dist/modules/cart/components/CartItems/Item/ItemImage.d.ts.map +1 -1
  102. package/dist/modules/cart/components/CartItems/Item/ItemImage.js +0 -1
  103. package/dist/modules/cart/components/CartItems/Item/ItemImage.js.map +1 -1
  104. package/dist/modules/cart/components/CartItems/Item/QuantitySelector.d.ts.map +1 -1
  105. package/dist/modules/cart/components/CartItems/Item/QuantitySelector.js +3 -12
  106. package/dist/modules/cart/components/CartItems/Item/QuantitySelector.js.map +1 -1
  107. package/dist/modules/cart/components/CartItems/Item/index.d.ts.map +1 -1
  108. package/dist/modules/cart/components/CartItems/Item/index.js +2 -5
  109. package/dist/modules/cart/components/CartItems/Item/index.js.map +1 -1
  110. package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemActions.d.ts.map +1 -1
  111. package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemActions.js +0 -1
  112. package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemActions.js.map +1 -1
  113. package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemAttributes.d.ts +3 -1
  114. package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemAttributes.d.ts.map +1 -1
  115. package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemAttributes.js +11 -34
  116. package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemAttributes.js.map +1 -1
  117. package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemImage.d.ts.map +1 -1
  118. package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemImage.js +0 -1
  119. package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemImage.js.map +1 -1
  120. package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemQuantity.d.ts.map +1 -1
  121. package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemQuantity.js +3 -12
  122. package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemQuantity.js.map +1 -1
  123. package/dist/modules/cart/components/CartItems/ItemMobile/index.d.ts.map +1 -1
  124. package/dist/modules/cart/components/CartItems/ItemMobile/index.js +2 -5
  125. package/dist/modules/cart/components/CartItems/ItemMobile/index.js.map +1 -1
  126. package/dist/modules/cart/components/CartItems/index.d.ts.map +1 -1
  127. package/dist/modules/cart/components/CartItems/index.js +0 -1
  128. package/dist/modules/cart/components/CartItems/index.js.map +1 -1
  129. package/dist/modules/cart/components/CartItems/style.d.ts.map +1 -1
  130. package/dist/modules/cart/components/CartItems/style.js +6 -3
  131. package/dist/modules/cart/components/CartItems/style.js.map +1 -1
  132. package/dist/modules/cart/components/CartItems/util.d.ts.map +1 -1
  133. package/dist/modules/cart/components/CartItems/util.js +1 -2
  134. package/dist/modules/cart/components/CartItems/util.js.map +1 -1
  135. package/dist/modules/cart/index.d.ts +1 -0
  136. package/dist/modules/cart/index.d.ts.map +1 -1
  137. package/dist/modules/cart/index.js +1 -0
  138. package/dist/modules/cart/index.js.map +1 -1
  139. package/dist/modules/checkout/CheckoutTemplate/StepReview/index.d.ts.map +1 -1
  140. package/dist/modules/checkout/CheckoutTemplate/StepReview/index.js +2 -6
  141. package/dist/modules/checkout/CheckoutTemplate/StepReview/index.js.map +1 -1
  142. package/dist/modules/checkout/CheckoutTemplate/index.d.ts +2 -1
  143. package/dist/modules/checkout/CheckoutTemplate/index.d.ts.map +1 -1
  144. package/dist/modules/checkout/CheckoutTemplate/index.js +12 -6
  145. package/dist/modules/checkout/CheckoutTemplate/index.js.map +1 -1
  146. package/dist/modules/checkout/CheckoutTemplate/style.d.ts.map +1 -1
  147. package/dist/modules/checkout/CheckoutTemplate/style.js +6 -1
  148. package/dist/modules/checkout/CheckoutTemplate/style.js.map +1 -1
  149. package/dist/modules/checkout/PaymentFailedTemplate/index.d.ts.map +1 -1
  150. package/dist/modules/checkout/PaymentFailedTemplate/index.js +3 -0
  151. package/dist/modules/checkout/PaymentFailedTemplate/index.js.map +1 -1
  152. package/dist/modules/checkout/ThankYouTemplate/index.d.ts.map +1 -1
  153. package/dist/modules/checkout/ThankYouTemplate/index.js +3 -0
  154. package/dist/modules/checkout/ThankYouTemplate/index.js.map +1 -1
  155. package/dist/modules/delivery/DeliveryOptions/index.d.ts.map +1 -1
  156. package/dist/modules/delivery/DeliveryOptions/index.js +11 -212
  157. package/dist/modules/delivery/DeliveryOptions/index.js.map +1 -1
  158. package/dist/modules/index.d.ts +1 -1
  159. package/dist/modules/index.js +1 -1
  160. package/dist/modules/index.js.map +1 -1
  161. package/dist/modules/order/OrderDetails/index.d.ts.map +1 -1
  162. package/dist/modules/order/OrderDetails/index.js +0 -1
  163. package/dist/modules/order/OrderDetails/index.js.map +1 -1
  164. package/dist/modules/order/OrderIndividualTemplate/index.d.ts.map +1 -1
  165. package/dist/modules/order/OrderIndividualTemplate/index.js +2 -10
  166. package/dist/modules/order/OrderIndividualTemplate/index.js.map +1 -1
  167. package/dist/modules/order/OrderedItems/Item/index.d.ts.map +1 -1
  168. package/dist/modules/order/OrderedItems/Item/index.js +2 -30
  169. package/dist/modules/order/OrderedItems/Item/index.js.map +1 -1
  170. package/dist/modules/order/OrderedItems/ItemMobile/index.d.ts.map +1 -1
  171. package/dist/modules/order/OrderedItems/ItemMobile/index.js +2 -28
  172. package/dist/modules/order/OrderedItems/ItemMobile/index.js.map +1 -1
  173. package/dist/modules/order/OrderedItems/Review/Popup/style.js +1 -1
  174. package/dist/modules/order/OrderedItems/Review/index.js +1 -1
  175. package/dist/modules/order/OrderedItems/Review/index.js.map +1 -1
  176. package/dist/modules/order/OrderedItems/index.d.ts.map +1 -1
  177. package/dist/modules/order/OrderedItems/index.js +0 -1
  178. package/dist/modules/order/OrderedItems/index.js.map +1 -1
  179. package/dist/modules/order/OrderedItems/style.d.ts.map +1 -1
  180. package/dist/modules/order/OrderedItems/style.js +8 -3
  181. package/dist/modules/order/OrderedItems/style.js.map +1 -1
  182. package/dist/modules/order/OrdersList/Item/index.d.ts.map +1 -1
  183. package/dist/modules/order/OrdersList/Item/index.js +0 -1
  184. package/dist/modules/order/OrdersList/Item/index.js.map +1 -1
  185. package/dist/modules/order/OrdersList/ItemMobile/index.d.ts.map +1 -1
  186. package/dist/modules/order/OrdersList/ItemMobile/index.js +0 -1
  187. package/dist/modules/order/OrdersList/ItemMobile/index.js.map +1 -1
  188. package/dist/modules/order/OrdersList/index.d.ts.map +1 -1
  189. package/dist/modules/order/OrdersList/index.js +0 -1
  190. package/dist/modules/order/OrdersList/index.js.map +1 -1
  191. package/dist/modules/order/OrdersList/style.d.ts.map +1 -1
  192. package/dist/modules/order/OrdersList/style.js +0 -1
  193. package/dist/modules/order/OrdersList/style.js.map +1 -1
  194. package/dist/modules/payment/PaymentMethodIcon/index.d.ts +8 -0
  195. package/dist/modules/payment/PaymentMethodIcon/index.d.ts.map +1 -0
  196. package/dist/modules/payment/PaymentMethodIcon/index.js +17 -0
  197. package/dist/modules/payment/PaymentMethodIcon/index.js.map +1 -0
  198. package/dist/modules/payment/PaymentMethodIcon/style.d.ts +3 -0
  199. package/dist/modules/payment/PaymentMethodIcon/style.d.ts.map +1 -0
  200. package/dist/modules/payment/PaymentMethodIcon/style.js +25 -0
  201. package/dist/modules/payment/PaymentMethodIcon/style.js.map +1 -0
  202. package/dist/modules/payment/PaymentMethodItem/index.d.ts.map +1 -1
  203. package/dist/modules/payment/PaymentMethodItem/index.js +2 -13
  204. package/dist/modules/payment/PaymentMethodItem/index.js.map +1 -1
  205. package/dist/modules/payment/SelectPaymentMethodPopup/index.js +1 -1
  206. package/dist/modules/payment/SelectPaymentMethodPopup/index.js.map +1 -1
  207. package/dist/modules/payment/icons.d.ts +2 -0
  208. package/dist/modules/payment/icons.d.ts.map +1 -1
  209. package/dist/modules/payment/icons.js +35 -27
  210. package/dist/modules/payment/icons.js.map +1 -1
  211. package/dist/modules/payment/index.d.ts +1 -0
  212. package/dist/modules/payment/index.d.ts.map +1 -1
  213. package/dist/modules/payment/index.js +1 -0
  214. package/dist/modules/payment/index.js.map +1 -1
  215. package/dist/modules/payment/paymentIconMap.d.ts +12 -0
  216. package/dist/modules/payment/paymentIconMap.d.ts.map +1 -0
  217. package/dist/modules/payment/paymentIconMap.js +31 -0
  218. package/dist/modules/payment/paymentIconMap.js.map +1 -0
  219. package/dist/modules/unsubscribe/UnsubscribeMessage.js +1 -1
  220. package/dist/modules/unsubscribe/UnsubscribeMessage.js.map +1 -1
  221. package/dist/modules/unsubscribe/UnsubscribeTemplate.js +1 -1
  222. package/dist/modules/unsubscribe/UnsubscribeTemplate.js.map +1 -1
  223. package/dist/server.d.ts +6 -0
  224. package/dist/server.d.ts.map +1 -0
  225. package/dist/server.js +5 -0
  226. package/dist/server.js.map +1 -0
  227. package/dist/stores/orderStore.d.ts.map +1 -1
  228. package/dist/stores/orderStore.js.map +1 -1
  229. package/dist/styles/theme.d.ts.map +1 -1
  230. package/dist/styles/theme.js +5 -0
  231. package/dist/styles/theme.js.map +1 -1
  232. package/dist/styles/variables.d.ts.map +1 -1
  233. package/dist/styles/variables.js +4 -0
  234. package/dist/styles/variables.js.map +1 -1
  235. package/dist/translations/en.d.ts +20 -7
  236. package/dist/translations/en.d.ts.map +1 -1
  237. package/dist/translations/en.js +21 -8
  238. package/dist/translations/en.js.map +1 -1
  239. package/dist/translations/hy.d.ts +2 -7
  240. package/dist/translations/hy.d.ts.map +1 -1
  241. package/dist/translations/hy.js +3 -8
  242. package/dist/translations/hy.js.map +1 -1
  243. package/dist/translations/index.d.ts +26 -28
  244. package/dist/translations/index.d.ts.map +1 -1
  245. package/dist/translations/it.d.ts +2 -7
  246. package/dist/translations/it.d.ts.map +1 -1
  247. package/dist/translations/it.js +3 -8
  248. package/dist/translations/it.js.map +1 -1
  249. package/dist/translations/ru.d.ts +2 -7
  250. package/dist/translations/ru.d.ts.map +1 -1
  251. package/dist/translations/ru.js +3 -8
  252. package/dist/translations/ru.js.map +1 -1
  253. package/dist/user/UserProvider.d.ts +6 -0
  254. package/dist/user/UserProvider.d.ts.map +1 -0
  255. package/dist/user/UserProvider.js +128 -0
  256. package/dist/user/UserProvider.js.map +1 -0
  257. package/dist/user/checkUserRedirection.d.ts +21 -0
  258. package/dist/user/checkUserRedirection.d.ts.map +1 -0
  259. package/dist/user/checkUserRedirection.js +62 -0
  260. package/dist/user/checkUserRedirection.js.map +1 -0
  261. package/dist/user/createUserMethods.d.ts +21 -0
  262. package/dist/user/createUserMethods.d.ts.map +1 -0
  263. package/dist/user/createUserMethods.js +162 -0
  264. package/dist/user/createUserMethods.js.map +1 -0
  265. package/dist/user/getUser.d.ts +14 -0
  266. package/dist/user/getUser.d.ts.map +1 -0
  267. package/dist/user/getUser.js +60 -0
  268. package/dist/user/getUser.js.map +1 -0
  269. package/dist/user/index.d.ts +6 -0
  270. package/dist/user/index.d.ts.map +1 -0
  271. package/dist/user/index.js +6 -0
  272. package/dist/user/index.js.map +1 -0
  273. package/dist/user/langPath.d.ts +3 -0
  274. package/dist/user/langPath.d.ts.map +1 -0
  275. package/dist/user/langPath.js +23 -0
  276. package/dist/user/langPath.js.map +1 -0
  277. package/dist/user/types.d.ts +139 -0
  278. package/dist/user/types.d.ts.map +1 -0
  279. package/dist/user/types.js +2 -0
  280. package/dist/user/types.js.map +1 -0
  281. package/dist/user/userConfig.d.ts +23 -0
  282. package/dist/user/userConfig.d.ts.map +1 -0
  283. package/dist/user/userConfig.js +24 -0
  284. package/dist/user/userConfig.js.map +1 -0
  285. package/dist/utils/buttonClassNames.d.ts +9 -0
  286. package/dist/utils/buttonClassNames.d.ts.map +1 -0
  287. package/dist/utils/buttonClassNames.js +10 -0
  288. package/dist/utils/buttonClassNames.js.map +1 -0
  289. package/dist/utils/buttonTypes.d.ts +12 -0
  290. package/dist/utils/buttonTypes.d.ts.map +1 -0
  291. package/dist/utils/buttonTypes.js +18 -0
  292. package/dist/utils/buttonTypes.js.map +1 -0
  293. package/dist/utils/config.d.ts +14 -7
  294. package/dist/utils/config.d.ts.map +1 -1
  295. package/dist/utils/config.js +35 -5
  296. package/dist/utils/config.js.map +1 -1
  297. package/dist/utils/createAccountButtonEntry.d.ts +5 -0
  298. package/dist/utils/createAccountButtonEntry.d.ts.map +1 -0
  299. package/dist/utils/createAccountButtonEntry.js +33 -0
  300. package/dist/utils/createAccountButtonEntry.js.map +1 -0
  301. package/dist/utils/lineItemDisplay.d.ts +11 -0
  302. package/dist/utils/lineItemDisplay.d.ts.map +1 -0
  303. package/dist/utils/lineItemDisplay.js +165 -0
  304. package/dist/utils/lineItemDisplay.js.map +1 -0
  305. package/dist/utils/payment.d.ts +56 -11
  306. package/dist/utils/payment.d.ts.map +1 -1
  307. package/dist/utils/payment.js +43 -5
  308. package/dist/utils/payment.js.map +1 -1
  309. package/package.json +30 -7
  310. package/templates/README.md +41 -0
  311. package/templates/account.config.example.ts +77 -0
  312. package/templates/address.config.example.ts +55 -0
  313. package/templates/index.example.ts +24 -0
  314. package/templates/integrations.config.example.ts +28 -0
  315. package/templates/routes.config.example.ts +56 -0
  316. package/templates/user.config.example.ts +45 -0
@@ -12,6 +12,14 @@ export namespace accountConfig {
12
12
  export { defaultPaymentOptions as paymentOptions };
13
13
  export let CartItemEditFavoriteButton: any;
14
14
  export let button: {};
15
+ export namespace buttonClassNames {
16
+ let base: string;
17
+ namespace variants {
18
+ let auth: string;
19
+ let form: string;
20
+ let checkout: string;
21
+ }
22
+ }
15
23
  export namespace globalSettings {
16
24
  let hasShippingCost: boolean;
17
25
  let hasVariants: boolean;
@@ -55,7 +63,6 @@ export namespace accountConfig {
55
63
  let showQuantityColumn: boolean;
56
64
  let showPriceColumn: boolean;
57
65
  let showTotalColumn: boolean;
58
- let preferTourAttributes: boolean;
59
66
  let itemColumnTitle: string;
60
67
  let quantityColumnTitle: string;
61
68
  let priceColumnTitle: string;
@@ -65,12 +72,14 @@ export namespace accountConfig {
65
72
  }
66
73
  }
67
74
  }
68
- export namespace auth {
75
+ export namespace auth_1 {
69
76
  let signInUrl: any;
70
77
  namespace social {
71
78
  let google: boolean;
72
79
  }
73
80
  }
81
+ export { auth_1 as auth };
82
+ export let userIntegration: any;
74
83
  export namespace cart {
75
84
  export let showShopLinks: boolean;
76
85
  export namespace item_1 {
@@ -94,8 +103,6 @@ export namespace accountConfig {
94
103
  export { showPriceColumn_1 as showPriceColumn };
95
104
  let showTotalColumn_1: boolean;
96
105
  export { showTotalColumn_1 as showTotalColumn };
97
- let preferTourAttributes_1: boolean;
98
- export { preferTourAttributes_1 as preferTourAttributes };
99
106
  let itemColumnTitle_1: string;
100
107
  export { itemColumnTitle_1 as itemColumnTitle };
101
108
  let quantityColumnTitle_1: string;
@@ -135,7 +142,8 @@ export namespace accountConfig {
135
142
  let options: any[];
136
143
  let cartKey: string;
137
144
  }
138
- export namespace checkout {
145
+ export namespace checkout_1 {
146
+ export let abandonPaymentEndpoint: any;
139
147
  export let hideInternalPayment: boolean;
140
148
  export let paymentOptions: any;
141
149
  export let paymentPlacement: string;
@@ -166,8 +174,6 @@ export namespace accountConfig {
166
174
  export { showPriceColumn_2 as showPriceColumn };
167
175
  let showTotalColumn_2: boolean;
168
176
  export { showTotalColumn_2 as showTotalColumn };
169
- let preferTourAttributes_2: boolean;
170
- export { preferTourAttributes_2 as preferTourAttributes };
171
177
  let itemColumnTitle_2: string;
172
178
  export { itemColumnTitle_2 as itemColumnTitle };
173
179
  let quantityColumnTitle_2: string;
@@ -185,6 +191,7 @@ export namespace accountConfig {
185
191
  }
186
192
  export { item_3 as item };
187
193
  }
194
+ export { checkout_1 as checkout };
188
195
  }
189
196
  import { defaultPaymentOptions } from './payment';
190
197
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/utils/config.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAAsC,WAAW"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/utils/config.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAAsC,WAAW"}
@@ -1,5 +1,4 @@
1
1
  import { defaultPaymentOptions } from './payment';
2
- // TODO: NEW VERSIONS
3
2
  export const accountConfig = {
4
3
  fontFamily: 'core_Font',
5
4
  shopUrl: '/',
@@ -14,7 +13,20 @@ export const accountConfig = {
14
13
  productUrlPrefix: null,
15
14
  paymentOptions: defaultPaymentOptions,
16
15
  CartItemEditFavoriteButton: null,
16
+ /**
17
+ * Per-project custom buttons. Key = btnType (auth | form | checkout | full-width | …).
18
+ * @example { auth: { component: MyButton, props: { className: 'account-button account-button--auth' } } }
19
+ */
17
20
  button: {},
21
+ /** Optional class name tokens for custom buttons (merged with project overrides). */
22
+ buttonClassNames: {
23
+ base: 'account-button',
24
+ variants: {
25
+ auth: 'account-button--auth',
26
+ form: 'account-button--form',
27
+ checkout: 'account-button--checkout',
28
+ },
29
+ },
18
30
  globalSettings: {
19
31
  hasShippingCost: true,
20
32
  hasVariants: false,
@@ -59,7 +71,6 @@ export const accountConfig = {
59
71
  showQuantityColumn: true,
60
72
  showPriceColumn: true,
61
73
  showTotalColumn: true,
62
- preferTourAttributes: false,
63
74
  itemColumnTitle: 'account.order_balance.item',
64
75
  quantityColumnTitle: 'account.order_balance.quantity',
65
76
  priceColumnTitle: 'account.order_balance.price',
@@ -75,6 +86,12 @@ export const accountConfig = {
75
86
  google: true,
76
87
  },
77
88
  },
89
+ /**
90
+ * Optional UserProvider integration (endpoints, redirects, cookie key).
91
+ * Pass the same object to <UserProvider userIntegration={...} />.
92
+ * @example { endpoints: { login: 'login', logout: 'logout', currentUser: 'current-user' } }
93
+ */
94
+ userIntegration: null,
78
95
  cart: {
79
96
  showShopLinks: true,
80
97
  item: {
@@ -93,7 +110,6 @@ export const accountConfig = {
93
110
  showQuantityColumn: true,
94
111
  showPriceColumn: true,
95
112
  showTotalColumn: true,
96
- preferTourAttributes: false,
97
113
  itemColumnTitle: 'account.order_balance.item',
98
114
  quantityColumnTitle: 'account.order_balance.quantity',
99
115
  priceColumnTitle: 'account.order_balance.price',
@@ -126,14 +142,29 @@ export const accountConfig = {
126
142
  cartKey: 'shippingMethodId',
127
143
  },
128
144
  checkout: {
145
+ /** Optional API path called when checkout payment redirect did not complete. */
146
+ abandonPaymentEndpoint: null,
129
147
  hideInternalPayment: false,
130
148
  /**
131
149
  * Optional. If set, checkout uses payment-options design: radio list (e.g. PayPal / Card).
132
150
  * Each option can have:
133
- * - value: string (e.g. 'paypal', 'credit_card', 'cash_on_delivery')
151
+ * - value: string (e.g. 'paypal', 'credit_card', 'apple_pay', 'google_pay', 'cash_on_delivery')
134
152
  * - label: translation key or plain string
135
153
  * - description?: translation key or plain string
136
154
  * - withForm?: boolean (for options like credit_card that should render a Card form block)
155
+ * - icon?: React node (optional custom icon; overrides built-in SVG)
156
+ *
157
+ * Built-in icons: credit_card, apple_pay, google_pay, paypal, cash_on_delivery, idram, telcell, etc.
158
+ * Monochrome icons use theme.account.colors.account_paymentIconColor.
159
+ * Size: theme.account.paymentIcon.size. Override via accountConfig.account or project theme.
160
+ * Visa / Mastercard keep brand colors (.payment-method-icon--brand).
161
+ *
162
+ * Example:
163
+ * checkout: {
164
+ * hideInternalPayment: false,
165
+ * paymentPlacement: 'summary',
166
+ * paymentOptions: walletCheckoutPaymentOptions,
167
+ * }
137
168
  *
138
169
  * When paymentOptions is provided:
139
170
  * - The Card form block is shown only if the selected option has withForm: true.
@@ -158,7 +189,6 @@ export const accountConfig = {
158
189
  showQuantityColumn: true,
159
190
  showPriceColumn: true,
160
191
  showTotalColumn: true,
161
- preferTourAttributes: false,
162
192
  itemColumnTitle: 'account.order_balance.item',
163
193
  quantityColumnTitle: 'account.order_balance.quantity',
164
194
  priceColumnTitle: 'account.order_balance.price',
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/utils/config.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAElD,qBAAqB;AAErB,MAAM,CAAC,MAAM,aAAa,GAAG;IAC5B,UAAU,EAAE,WAAW;IACvB,OAAO,EAAE,GAAG;IACZ,MAAM,EAAE,EAAE;IACV,QAAQ,EAAE,IAAI;IACd,iBAAiB,EAAE,IAAI;IACvB,2HAA2H;IAC3H,yBAAyB,EAAE,IAAI;IAC/B,wBAAwB,EAAE,IAAI;IAC9B,OAAO,EAAE,IAAI;IACb,YAAY,EAAE,IAAI;IAClB,gBAAgB,EAAE,IAAI;IACtB,cAAc,EAAE,qBAAqB;IACrC,0BAA0B,EAAE,IAAI;IAEhC,MAAM,EAAE,EAAE;IAEV,cAAc,EAAE;QACf,eAAe,EAAE,IAAI;QACrB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,IAAI;QAClB,cAAc,EAAE,KAAK;QACrB,iBAAiB,EAAE,IAAI;QACvB,kBAAkB,EAAE,IAAI;QACxB,gBAAgB,EAAE,IAAI;QACtB,gBAAgB,EAAE,IAAI;QACtB,kBAAkB,EAAE,IAAI;QACxB,aAAa,EAAE,IAAI;QACnB,iBAAiB,EAAE,IAAI;QACvB,qBAAqB,EAAE,IAAI;QAC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;;;;;;;;WAwBG;QACH,cAAc,EAAE,IAAI;QACpB,0GAA0G;QAC1G,2HAA2H;QAC3H,gBAAgB,EAAE,QAAQ;QAE1B,IAAI,EAAE;YACL,IAAI,EAAE;gBACL,IAAI,EAAE,KAAK;gBACX,IAAI,EAAE,IAAI;aACV;YACD,QAAQ,EAAE,KAAK;YACf,MAAM,EAAE,KAAK;YACb,cAAc,EAAE,KAAK;YACrB,MAAM,EAAE,KAAK;YACb,uBAAuB,EAAE,IAAI;YAC7B,OAAO,EAAE;gBACR,cAAc,EAAE,IAAI;gBACpB,kBAAkB,EAAE,IAAI;gBACxB,eAAe,EAAE,IAAI;gBACrB,eAAe,EAAE,IAAI;gBACrB,eAAe,EAAE,4BAA4B;gBAC7C,mBAAmB,EAAE,gCAAgC;gBACrD,gBAAgB,EAAE,6BAA6B;gBAC/C,gBAAgB,EAAE,6BAA6B;gBAC/C,aAAa,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;gBAChC,iBAAiB,EAAE,CAAC,cAAc,EAAE,cAAc,CAAC;aACnD;SACD;KACD;CACD,CAAC"}
@@ -0,0 +1,5 @@
1
+ export function createAccountButtonEntry(component: any, variant: any, props?: {}): {
2
+ component: any;
3
+ props: {};
4
+ };
5
+ //# sourceMappingURL=createAccountButtonEntry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createAccountButtonEntry.d.ts","sourceRoot":"","sources":["../../src/utils/createAccountButtonEntry.js"],"names":[],"mappings":"AAmBO;;;EAgBN"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Helpers for wiring custom buttons in accountConfig.button.
3
+ *
4
+ * @example
5
+ * // In your project _config.ts:
6
+ * import MyButton from '@/components/Button';
7
+ * import { createAccountButtonEntry } from '@weareconceptstudio/account/config';
8
+ *
9
+ * accountConfig: {
10
+ * button: {
11
+ * auth: createAccountButtonEntry(MyButton, 'auth', { btnType: 'primary' }),
12
+ * form: createAccountButtonEntry(MyButton, 'form', { btnType: 'primary' }),
13
+ * checkout: createAccountButtonEntry(MyButton, 'checkout', { btnType: 'primary' }),
14
+ * 'full-width': createAccountButtonEntry(MyButton, 'auth', { btnType: 'primary' }),
15
+ * },
16
+ * }
17
+ */
18
+ import { ACCOUNT_BUTTON_CLASS_NAMES } from './buttonClassNames';
19
+ export const createAccountButtonEntry = (component, variant, props = {}) => {
20
+ const variantClass = ACCOUNT_BUTTON_CLASS_NAMES.variants[variant];
21
+ if (!variantClass) {
22
+ return { component, props };
23
+ }
24
+ const { className: propClassName, ...restProps } = props;
25
+ return {
26
+ component,
27
+ props: {
28
+ ...restProps,
29
+ className: [ACCOUNT_BUTTON_CLASS_NAMES.base, variantClass, propClassName].filter(Boolean).join(' '),
30
+ },
31
+ };
32
+ };
33
+ //# sourceMappingURL=createAccountButtonEntry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createAccountButtonEntry.js","sourceRoot":"","sources":["../../src/utils/createAccountButtonEntry.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAEhE,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,KAAK,GAAG,EAAE,EAAE,EAAE;IAC1E,MAAM,YAAY,GAAG,0BAA0B,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAElE,IAAI,CAAC,YAAY,EAAE,CAAC;QACnB,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;IAC7B,CAAC;IAED,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;IAEzD,OAAO;QACN,SAAS;QACT,KAAK,EAAE;YACN,GAAG,SAAS;YACZ,SAAS,EAAE,CAAC,0BAA0B,CAAC,IAAI,EAAE,YAAY,EAAE,aAAa,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;SACnG;KACD,CAAC;AACH,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ export function normalizeDisplayAttribute(entry: any): {
2
+ text: string;
3
+ label?: undefined;
4
+ } | {
5
+ label: any;
6
+ text: string;
7
+ };
8
+ export function resolveLineItemTitle(data: any, display?: {}): any;
9
+ export function resolveLineItemAttributes(data: any, display?: {}, options?: {}): any;
10
+ export function canOpenLineItemProduct(data: any, itemTitle: any): boolean;
11
+ //# sourceMappingURL=lineItemDisplay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lineItemDisplay.d.ts","sourceRoot":"","sources":["../../src/utils/lineItemDisplay.js"],"names":[],"mappings":"AAKO;;;;;;EAuBN;AAEM,mEAYN;AA8FM,sFAiEN;AAEM,2EAAgG"}
@@ -0,0 +1,165 @@
1
+ /**
2
+ * Shared line-item title and attribute resolution for cart, checkout, and order views.
3
+ * Projects can send `display_attributes` from the API, or fall back to variants / config keys.
4
+ */
5
+ export const normalizeDisplayAttribute = (entry) => {
6
+ if (entry == null || entry === '') {
7
+ return null;
8
+ }
9
+ if (typeof entry === 'string' || typeof entry === 'number') {
10
+ return { text: String(entry) };
11
+ }
12
+ if (typeof entry === 'object') {
13
+ const value = entry.value ?? entry.text;
14
+ if (value == null || value === '') {
15
+ return null;
16
+ }
17
+ return {
18
+ label: entry.label,
19
+ text: String(value),
20
+ };
21
+ }
22
+ return null;
23
+ };
24
+ export const resolveLineItemTitle = (data, display = {}) => {
25
+ const keys = display.itemTitleKeys || ['product_name', 'name', 'title'];
26
+ for (const key of keys) {
27
+ const value = data?.[key] ?? data?.product?.[key];
28
+ if (value !== undefined && value !== null && value !== '') {
29
+ return value;
30
+ }
31
+ }
32
+ return data?.product?.name || data?.product_name || null;
33
+ };
34
+ const isTourBookingProduct = (product) => product?.type === 'group' || product?.type === 'private';
35
+ const buildTourBookingAttributes = (data, translate) => {
36
+ const product = data?.product;
37
+ if (!isTourBookingProduct(product)) {
38
+ return null;
39
+ }
40
+ const attributes = [];
41
+ const tourType = product.type;
42
+ const tourTypeValue = translate?.(tourType === 'private' ? 'account.tour_booking.privateTour' : 'account.tour_booking.groupTour');
43
+ if (tourTypeValue) {
44
+ attributes.push({
45
+ label: translate?.('account.tour_booking.tourType'),
46
+ text: tourTypeValue,
47
+ });
48
+ }
49
+ const selectedDate = product?.start_date || data?.start_date;
50
+ if (selectedDate) {
51
+ attributes.push({
52
+ label: translate?.('account.tour_booking.selectedDate'),
53
+ text: String(selectedDate),
54
+ });
55
+ }
56
+ const adults = Number(product?.adults ?? data?.adults ?? 0);
57
+ const children = Number(product?.children ?? data?.children ?? 0);
58
+ const totalParticipants = adults + children;
59
+ if (totalParticipants > 0) {
60
+ attributes.push({
61
+ label: translate?.('account.tour_booking.participants'),
62
+ text: translate?.('account.tour_booking.people', { count: totalParticipants }) ||
63
+ String(totalParticipants),
64
+ });
65
+ }
66
+ const language = product?.tour_language;
67
+ if (language) {
68
+ attributes.push({
69
+ label: translate?.('account.tour_booking.language'),
70
+ text: String(language),
71
+ });
72
+ }
73
+ const duration = product?.duration;
74
+ if (duration) {
75
+ attributes.push({
76
+ label: translate?.('account.tour_booking.duration'),
77
+ text: String(duration),
78
+ });
79
+ }
80
+ if (tourType === 'private') {
81
+ if (product?.have_lunch) {
82
+ const lunchSelected = product?.selected_addons?.lunch;
83
+ attributes.push({
84
+ label: translate?.('account.tour_booking.lunch'),
85
+ text: lunchSelected
86
+ ? translate?.('account.tour_booking.included')
87
+ : translate?.('account.tour_booking.notIncluded'),
88
+ });
89
+ }
90
+ if (product?.tickets_price) {
91
+ const ticketsSelected = product?.selected_addons?.tickets;
92
+ attributes.push({
93
+ label: translate?.('account.tour_booking.tickets'),
94
+ text: ticketsSelected
95
+ ? translate?.('account.tour_booking.included')
96
+ : translate?.('account.tour_booking.notIncluded'),
97
+ });
98
+ }
99
+ }
100
+ else if (product?.have_lunch) {
101
+ attributes.push({
102
+ label: translate?.('account.tour_booking.lunch'),
103
+ text: translate?.('account.tour_booking.included'),
104
+ });
105
+ }
106
+ return attributes.length > 0 ? attributes : null;
107
+ };
108
+ export const resolveLineItemAttributes = (data, display = {}, options = {}) => {
109
+ const { selectedVariant, selectedOption, translate } = options;
110
+ const product = data?.product;
111
+ const isTourBooking = isTourBookingProduct(product);
112
+ const apiAttributes = data?.display_attributes ?? product?.display_attributes;
113
+ if (Array.isArray(apiAttributes) && apiAttributes.length > 0) {
114
+ return apiAttributes.map(normalizeDisplayAttribute).filter(Boolean);
115
+ }
116
+ if (isTourBooking) {
117
+ const tourAttributes = buildTourBookingAttributes(data, translate);
118
+ if (tourAttributes) {
119
+ return tourAttributes;
120
+ }
121
+ return [];
122
+ }
123
+ const variantAttributes = [];
124
+ if (selectedVariant?.color?.name) {
125
+ variantAttributes.push({
126
+ label: translate?.('account.general_actions.color'),
127
+ text: selectedVariant.color.name,
128
+ capitalize: true,
129
+ });
130
+ }
131
+ else if (data?.color) {
132
+ variantAttributes.push({
133
+ label: translate?.('account.general_actions.color'),
134
+ text: data.color,
135
+ capitalize: true,
136
+ });
137
+ }
138
+ if (selectedOption?.size?.name) {
139
+ variantAttributes.push({
140
+ label: translate?.('account.general_actions.size'),
141
+ text: selectedOption.size.name,
142
+ });
143
+ }
144
+ else if (data?.size) {
145
+ variantAttributes.push({
146
+ label: translate?.('account.general_actions.size'),
147
+ text: data.size,
148
+ });
149
+ }
150
+ if (variantAttributes.length > 0) {
151
+ return variantAttributes;
152
+ }
153
+ const attributeKeys = display.itemAttributeKeys || [];
154
+ if (attributeKeys.length > 0) {
155
+ return attributeKeys
156
+ .map((key) => data?.[key] ?? data?.product?.[key])
157
+ .filter((value) => value !== undefined && value !== null && value !== '')
158
+ .map((text) => ({ text: String(text) }));
159
+ }
160
+ return [data?.product?.short_info_1, data?.product?.short_info_2]
161
+ .filter((value) => value !== undefined && value !== null && value !== '')
162
+ .map((text) => ({ text: String(text) }));
163
+ };
164
+ export const canOpenLineItemProduct = (data, itemTitle) => Boolean(data?.product) || Boolean(itemTitle);
165
+ //# sour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C,OAAO,iBAAiB,CAAC;IAC1B,CAAC;IAED,MAAM,aAAa,GAAG,OAAO,CAAC,iBAAiB,IAAI,EAAE,CAAC;IAEtD,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC9B,OAAO,aAAa;aAClB,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;aACjD,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,EAAE,CAAC;aACxE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3C,CAAC;IAED,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,CAAC;SAC/D,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,EAAE,CAAC;SACxE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;AAC3C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,OAAO,CAAC,SAAS,CAAC,CAAC"}
@@ -1,33 +1,78 @@
1
- export namespace cashOnDeliveryPaymentOption {
2
- let label: string;
3
- let value: string;
1
+ export namespace PAYMENT_METHOD_VALUES {
2
+ let CREDIT_CARD: string;
3
+ let APPLE_PAY: string;
4
+ let GOOGLE_PAY: string;
5
+ let PAYPAL: string;
6
+ let CASH_ON_DELIVERY: string;
7
+ let IDRAM: string;
8
+ let TELCELL: string;
9
+ let POS_TERMINAL: string;
10
+ let INECOPAY: string;
11
+ let VISA: string;
12
+ let MASTERCARD: string;
4
13
  }
5
- export namespace idramPaymentOption {
14
+ export namespace creditCardPaymentOption {
15
+ export let label: string;
16
+ import value = PAYMENT_METHOD_VALUES.CREDIT_CARD;
17
+ export { value };
18
+ export let withForm: boolean;
19
+ }
20
+ export namespace applePayPaymentOption {
6
21
  let label_1: string;
7
22
  export { label_1 as label };
8
- let value_1: string;
23
+ import value_1 = PAYMENT_METHOD_VALUES.APPLE_PAY;
9
24
  export { value_1 as value };
10
25
  }
11
- export namespace posTerminalPaymentOption {
26
+ export namespace googlePayPaymentOption {
12
27
  let label_2: string;
13
28
  export { label_2 as label };
14
- let value_2: string;
29
+ import value_2 = PAYMENT_METHOD_VALUES.GOOGLE_PAY;
15
30
  export { value_2 as value };
16
31
  }
17
- export namespace telcellPaymentOption {
32
+ export namespace paypalPaymentOption {
18
33
  let label_3: string;
19
34
  export { label_3 as label };
20
- let value_3: string;
35
+ import value_3 = PAYMENT_METHOD_VALUES.PAYPAL;
21
36
  export { value_3 as value };
22
37
  }
23
- export namespace inecopayPaymentOption {
38
+ export namespace cashOnDeliveryPaymentOption {
24
39
  let label_4: string;
25
40
  export { label_4 as label };
26
- let value_4: string;
41
+ import value_4 = PAYMENT_METHOD_VALUES.CASH_ON_DELIVERY;
27
42
  export { value_4 as value };
28
43
  }
44
+ export namespace idramPaymentOption {
45
+ let label_5: string;
46
+ export { label_5 as label };
47
+ import value_5 = PAYMENT_METHOD_VALUES.IDRAM;
48
+ export { value_5 as value };
49
+ }
50
+ export namespace posTerminalPaymentOption {
51
+ let label_6: string;
52
+ export { label_6 as label };
53
+ import value_6 = PAYMENT_METHOD_VALUES.POS_TERMINAL;
54
+ export { value_6 as value };
55
+ }
56
+ export namespace telcellPaymentOption {
57
+ let label_7: string;
58
+ export { label_7 as label };
59
+ import value_7 = PAYMENT_METHOD_VALUES.TELCELL;
60
+ export { value_7 as value };
61
+ }
62
+ export namespace inecopayPaymentOption {
63
+ let label_8: string;
64
+ export { label_8 as label };
65
+ import value_8 = PAYMENT_METHOD_VALUES.INECOPAY;
66
+ export { value_8 as value };
67
+ }
68
+ /** Default regional / offline methods */
29
69
  export const defaultPaymentOptions: {
30
70
  label: string;
31
71
  value: string;
32
72
  }[];
73
+ /** Example set for card + wallet checkout (use in checkout.paymentOptions) */
74
+ export const walletCheckoutPaymentOptions: {
75
+ label: string;
76
+ value: string;
77
+ }[];
33
78
  //# sourceMappingURL=payment.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../src/utils/payment.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA;;;IAME"}
1
+ {"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../src/utils/payment.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4DA,yCAAyC;AACzC;;;IAME;AAEF,8EAA8E;AAC9E;;;IAKE"}
@@ -1,23 +1,54 @@
1
+ export const PAYMENT_METHOD_VALUES = {
2
+ CREDIT_CARD: 'credit_card',
3
+ APPLE_PAY: 'apple_pay',
4
+ GOOGLE_PAY: 'google_pay',
5
+ PAYPAL: 'paypal',
6
+ CASH_ON_DELIVERY: 'cash_on_delivery',
7
+ IDRAM: 'idram',
8
+ TELCELL: 'telcell',
9
+ POS_TERMINAL: 'pos_terminal',
10
+ INECOPAY: 'inecopay',
11
+ VISA: 'visa',
12
+ MASTERCARD: 'mastercard',
13
+ };
14
+ export const creditCardPaymentOption = {
15
+ label: 'account.payment_management.creditCard',
16
+ value: PAYMENT_METHOD_VALUES.CREDIT_CARD,
17
+ withForm: true,
18
+ };
19
+ export const applePayPaymentOption = {
20
+ label: 'account.payment_management.applePay',
21
+ value: PAYMENT_METHOD_VALUES.APPLE_PAY,
22
+ };
23
+ export const googlePayPaymentOption = {
24
+ label: 'account.payment_management.googlePay',
25
+ value: PAYMENT_METHOD_VALUES.GOOGLE_PAY,
26
+ };
27
+ export const paypalPaymentOption = {
28
+ label: 'account.payment_management.paypal',
29
+ value: PAYMENT_METHOD_VALUES.PAYPAL,
30
+ };
1
31
  export const cashOnDeliveryPaymentOption = {
2
32
  label: 'Cash',
3
- value: 'cash_on_delivery',
33
+ value: PAYMENT_METHOD_VALUES.CASH_ON_DELIVERY,
4
34
  };
5
35
  export const idramPaymentOption = {
6
36
  label: 'Idram',
7
- value: 'idram',
37
+ value: PAYMENT_METHOD_VALUES.IDRAM,
8
38
  };
9
39
  export const posTerminalPaymentOption = {
10
40
  label: 'POS TERMINAL',
11
- value: 'pos_terminal',
41
+ value: PAYMENT_METHOD_VALUES.POS_TERMINAL,
12
42
  };
13
43
  export const telcellPaymentOption = {
14
44
  label: 'Telcell',
15
- value: 'telcell',
45
+ value: PAYMENT_METHOD_VALUES.TELCELL,
16
46
  };
17
47
  export const inecopayPaymentOption = {
18
48
  label: 'Inecopay',
19
- value: 'inecopay',
49
+ value: PAYMENT_METHOD_VALUES.INECOPAY,
20
50
  };
51
+ /** Default regional / offline methods */
21
52
  export const defaultPaymentOptions = [
22
53
  cashOnDeliveryPaymentOption,
23
54
  idramPaymentOption,
@@ -25,4 +56,11 @@ export const defaultPaymentOptions = [
25
56
  telcellPaymentOption,
26
57
  inecopayPaymentOption,
27
58
  ];
59
+ /** Example set for card + wallet checkout (use in checkout.paymentOptions) */
60
+ export const walletCheckoutPaymentOptions = [
61
+ creditCardPaymentOption,
62
+ applePayPaymentOption,
63
+ googlePayPaymentOption,
64
+ paypalPaymentOption,
65
+ ];
28
66
  //# sourceMappingURL=payment.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"payment.js","sourceRoot":"","sources":["../../src/utils/payment.js"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,2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