@ikas/storefront 6.1.0-beta.38 → 6.1.0-beta.381

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 (319) hide show
  1. package/build/analytics/analytics.d.ts +8 -3
  2. package/build/analytics/analytics.js +1 -1
  3. package/build/analytics/events.d.ts +4 -1
  4. package/build/analytics/events.js +1 -1
  5. package/build/analytics/facebookPixel.d.ts +13 -0
  6. package/build/analytics/facebookPixel.js +1 -1
  7. package/build/analytics/googleAnalytics.d.ts +3 -2
  8. package/build/analytics/googleAnalytics.js +1 -1
  9. package/build/analytics/googleTagManager.d.ts +5 -3
  10. package/build/analytics/googleTagManager.js +1 -1
  11. package/build/analytics/head/index.d.ts +17 -2
  12. package/build/analytics/head/index.js +1 -1
  13. package/build/analytics/ikasV3.d.ts +2 -1
  14. package/build/analytics/ikasV3.js +1 -1
  15. package/build/analytics/openAiPixel.d.ts +31 -0
  16. package/build/analytics/openAiPixel.js +1 -0
  17. package/build/components/checkout/components/address-form/index.js +1 -1
  18. package/build/components/checkout/components/address-form/model.d.ts +5 -0
  19. package/build/components/checkout/components/address-form/model.js +1 -1
  20. package/build/components/checkout/components/adyen/index.js +1 -1
  21. package/build/components/checkout/components/button/index.d.ts +1 -0
  22. package/build/components/checkout/components/button/index.js +1 -1
  23. package/build/components/checkout/components/button/style.module.scss.js +1 -1
  24. package/build/components/checkout/components/cart-summary/cart-item/index.js +1 -1
  25. package/build/components/checkout/components/cart-summary/cart-item/style.module.scss.js +1 -1
  26. package/build/components/checkout/components/cart-summary/index.d.ts +10 -1
  27. package/build/components/checkout/components/cart-summary/index.js +1 -1
  28. package/build/components/checkout/components/cart-summary/style.module.scss.js +1 -1
  29. package/build/components/checkout/components/checkbox/index.d.ts +1 -0
  30. package/build/components/checkout/components/checkbox/index.js +1 -1
  31. package/build/components/checkout/components/checkout-load-failed/index.d.ts +14 -0
  32. package/build/components/checkout/components/checkout-load-failed/index.js +1 -0
  33. package/build/components/checkout/components/checkout-load-failed/style.module.scss.js +1 -0
  34. package/build/components/checkout/components/credit-card-form/model.js +1 -1
  35. package/build/components/checkout/components/customer-addresses/index.d.ts +1 -0
  36. package/build/components/checkout/components/customer-addresses/index.js +1 -1
  37. package/build/components/checkout/components/customer-addresses/model.js +1 -1
  38. package/build/components/checkout/components/error/stock-error/index.js +1 -1
  39. package/build/components/checkout/components/form-item/index.js +1 -1
  40. package/build/components/checkout/components/form-item/model.d.ts +5 -3
  41. package/build/components/checkout/components/form-item/model.js +1 -1
  42. package/build/components/checkout/components/form-item/style.module.scss.js +1 -1
  43. package/build/components/checkout/components/hepsipay/index.d.ts +9 -0
  44. package/build/components/checkout/components/hepsipay/index.js +1 -0
  45. package/build/components/checkout/components/input-with-button/style.module.scss.js +1 -1
  46. package/build/components/checkout/components/iyzico/index.d.ts +8 -0
  47. package/build/components/checkout/components/iyzico/index.js +1 -0
  48. package/build/components/checkout/components/master-pass/credit-card-form/index.js +1 -1
  49. package/build/components/checkout/components/modal/index.d.ts +1 -0
  50. package/build/components/checkout/components/modal/index.js +1 -1
  51. package/build/components/checkout/components/modal/style.module.scss.js +1 -1
  52. package/build/components/checkout/components/offer-product/index.js +1 -1
  53. package/build/components/checkout/components/offer-product/style.module.scss.js +1 -1
  54. package/build/components/checkout/components/phone-number-input/index.d.ts +3 -1
  55. package/build/components/checkout/components/phone-number-input/index.js +1 -1
  56. package/build/components/checkout/components/quick-registration/completed.js +1 -1
  57. package/build/components/checkout/components/quick-registration/index.js +1 -1
  58. package/build/components/checkout/components/quick-registration/model.js +1 -1
  59. package/build/components/checkout/components/secure-card-form/index.d.ts +13 -0
  60. package/build/components/checkout/components/secure-card-form/index.js +1 -0
  61. package/build/components/checkout/components/secure-card-form/masterpass-bridge-model.d.ts +33 -0
  62. package/build/components/checkout/components/secure-card-form/masterpass-bridge-model.js +1 -0
  63. package/build/components/checkout/components/secure-card-form/model.d.ts +67 -0
  64. package/build/components/checkout/components/secure-card-form/model.js +1 -0
  65. package/build/components/checkout/components/secure-card-form/protocol.d.ts +220 -0
  66. package/build/components/checkout/components/secure-card-form/protocol.js +1 -0
  67. package/build/components/checkout/components/secure-card-form/style.module.scss.js +1 -0
  68. package/build/components/checkout/components/select-box/index.d.ts +3 -0
  69. package/build/components/checkout/components/select-box/index.js +1 -1
  70. package/build/components/checkout/components/step-container/index.d.ts +5 -0
  71. package/build/components/checkout/components/step-container/index.js +1 -1
  72. package/build/components/checkout/components/step-container/style.module.scss.js +1 -1
  73. package/build/components/checkout/components/stripe/checkout-form.js +1 -1
  74. package/build/components/checkout/components/stripe-express/index.d.ts +7 -0
  75. package/build/components/checkout/components/stripe-express/index.js +1 -0
  76. package/build/components/checkout/components/stripe-express/style.module.scss.js +1 -0
  77. package/build/components/checkout/components/svg/arrow-loyalty.d.ts +6 -0
  78. package/build/components/checkout/components/svg/arrow-loyalty.js +1 -0
  79. package/build/components/checkout/components/svg/arrow-right-loyalty.d.ts +6 -0
  80. package/build/components/checkout/components/svg/arrow-right-loyalty.js +1 -0
  81. package/build/components/checkout/components/svg/coupon-code-tag.d.ts +6 -0
  82. package/build/components/checkout/components/svg/coupon-code-tag.js +1 -0
  83. package/build/components/checkout/components/svg/credit-balance.d.ts +6 -0
  84. package/build/components/checkout/components/svg/credit-balance.js +1 -0
  85. package/build/components/checkout/components/svg/gift-cart-tag.d.ts +6 -0
  86. package/build/components/checkout/components/svg/gift-cart-tag.js +1 -0
  87. package/build/components/checkout/components/svg/gift-loyalty.d.ts +6 -0
  88. package/build/components/checkout/components/svg/gift-loyalty.js +1 -0
  89. package/build/components/checkout/components/svg/info.d.ts +6 -0
  90. package/build/components/checkout/components/svg/info.js +1 -0
  91. package/build/components/checkout/components/svg/left-arrow-loyalty.d.ts +6 -0
  92. package/build/components/checkout/components/svg/left-arrow-loyalty.js +1 -0
  93. package/build/components/checkout/components/svg/package-loyalty.d.ts +6 -0
  94. package/build/components/checkout/components/svg/package-loyalty.js +1 -0
  95. package/build/components/checkout/components/svg/percentage-loyalty.d.ts +6 -0
  96. package/build/components/checkout/components/svg/percentage-loyalty.js +1 -0
  97. package/build/components/checkout/components/svg/refresh.d.ts +6 -0
  98. package/build/components/checkout/components/svg/refresh.js +1 -0
  99. package/build/components/checkout/components/svg/star-loyalty.d.ts +6 -0
  100. package/build/components/checkout/components/svg/star-loyalty.js +1 -0
  101. package/build/components/checkout/components/svg/store-credit-tag.d.ts +6 -0
  102. package/build/components/checkout/components/svg/store-credit-tag.js +1 -0
  103. package/build/components/checkout/components/svg/subscription.d.ts +6 -0
  104. package/build/components/checkout/components/svg/subscription.js +1 -0
  105. package/build/components/checkout/components/tkpay/index.d.ts +8 -0
  106. package/build/components/checkout/components/tkpay/index.js +1 -0
  107. package/build/components/checkout/index.d.ts +1 -0
  108. package/build/components/checkout/index.js +1 -1
  109. package/build/components/checkout/model.d.ts +167 -8
  110. package/build/components/checkout/model.js +1 -1
  111. package/build/components/checkout/modelMasterPass.d.ts +6 -2
  112. package/build/components/checkout/modelMasterPass.js +1 -1
  113. package/build/components/checkout/steps/step-info/index.js +1 -1
  114. package/build/components/checkout/steps/step-info/style.module.scss.js +1 -0
  115. package/build/components/checkout/steps/step-payment/billing-address/index.js +1 -1
  116. package/build/components/checkout/steps/step-payment/index.js +1 -1
  117. package/build/components/checkout/steps/step-payment/payment-gateways/index.js +1 -1
  118. package/build/components/checkout/steps/step-payment/payment-gateways/miles-smiles/header.d.ts +4 -0
  119. package/build/components/checkout/steps/step-payment/payment-gateways/miles-smiles/header.js +1 -0
  120. package/build/components/checkout/steps/step-payment/payment-gateways/miles-smiles/index.d.ts +14 -0
  121. package/build/components/checkout/steps/step-payment/payment-gateways/miles-smiles/index.js +1 -0
  122. package/build/components/checkout/steps/step-payment/payment-gateways/miles-smiles/login-required.d.ts +13 -0
  123. package/build/components/checkout/steps/step-payment/payment-gateways/miles-smiles/login-required.js +1 -0
  124. package/build/components/checkout/steps/step-payment/payment-gateways/miles-smiles/miles-smiles-logo.d.ts +7 -0
  125. package/build/components/checkout/steps/step-payment/payment-gateways/miles-smiles/miles-smiles-logo.js +1 -0
  126. package/build/components/checkout/steps/step-payment/payment-gateways/miles-smiles/style.module.scss.js +1 -0
  127. package/build/components/checkout/steps/step-payment/payment-gateways/store-credit/index.d.ts +7 -0
  128. package/build/components/checkout/steps/step-payment/payment-gateways/store-credit/index.js +1 -0
  129. package/build/components/checkout/steps/step-payment/payment-gateways/store-credit/style.module.scss.js +1 -0
  130. package/build/components/checkout/steps/step-payment/payment-gateways/style.module.scss.js +1 -1
  131. package/build/components/checkout/steps/step-shipping/index.js +1 -1
  132. package/build/components/checkout/steps/step-success/index.js +1 -1
  133. package/build/components/checkout/style.module.scss.js +1 -1
  134. package/build/components/image/index.d.ts +1 -0
  135. package/build/components/image/index.js +1 -1
  136. package/build/components/index.d.ts +3 -0
  137. package/build/components/page/head.js +1 -1
  138. package/build/components/page/index.d.ts +1 -1
  139. package/build/components/page/index.js +1 -1
  140. package/build/components/page/widgets/common.d.ts +2 -0
  141. package/build/components/page/widgets/common.js +1 -0
  142. package/build/components/page/widgets/loyaltyWidget.d.ts +13 -0
  143. package/build/components/page/widgets/loyaltyWidget.js +1 -0
  144. package/build/components/page/widgets/popupWidget.d.ts +16 -0
  145. package/build/components/page/widgets/popupWidget.js +1 -0
  146. package/build/components/page-editor/ThemeComponentEditor.js +1 -1
  147. package/build/components/page-editor/model.d.ts +2 -0
  148. package/build/components/page-editor/model.js +1 -1
  149. package/build/components/pay-with-ikas/index.d.ts +9 -0
  150. package/build/components/pay-with-ikas/index.js +1 -0
  151. package/build/components/paypal-express-checkout/index.d.ts +9 -0
  152. package/build/components/paypal-express-checkout/index.js +1 -0
  153. package/build/components/plain-image/index.d.ts +13 -0
  154. package/build/components/plain-image/index.js +1 -0
  155. package/build/ext/@ikas/fe-api-client/build/config/index.js +1 -0
  156. package/build/ext/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/formatIncompletePhoneNumber.js +1 -0
  157. package/build/ext/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/getCountries.js +1 -0
  158. package/build/ext/@ikas/popup-renderer/build/ext/libphonenumber-js/min/exports/formatIncompletePhoneNumber.js +1 -0
  159. package/build/ext/@ikas/popup-renderer/build/ext/libphonenumber-js/min/exports/getCountries.js +1 -0
  160. package/build/ext/@ikas/popup-renderer/build/ext/libphonenumber-js/min/exports/getCountryCallingCode.js +1 -0
  161. package/build/ext/@ikas/popup-renderer/build/ext/libphonenumber-js/min/exports/isSupportedCountry.js +1 -0
  162. package/build/ext/@ikas/popup-renderer/build/ext/libphonenumber-js/min/exports/parsePhoneNumber.js +1 -0
  163. package/build/ext/@ikas/popup-renderer/build/ext/mobx-react-lite/es/ObserverComponent.js +1 -0
  164. package/build/ext/@ikas/popup-renderer/build/ext/mobx-react-lite/es/index.js +1 -0
  165. package/build/ext/@ikas/popup-renderer/build/ext/mobx-react-lite/es/observer.js +1 -0
  166. package/build/ext/@ikas/popup-renderer/build/ext/mobx-react-lite/es/useObserver.js +1 -0
  167. package/build/ext/@ikas/popup-renderer/build/ext/mobx-react-lite/es/utils/UniversalFinalizationRegistry.js +1 -0
  168. package/build/ext/@ikas/popup-renderer/build/ext/mobx-react-lite/es/utils/assertEnvironment.js +1 -0
  169. package/build/ext/@ikas/popup-renderer/build/ext/mobx-react-lite/es/utils/observerBatching.js +1 -0
  170. package/build/ext/@ikas/popup-renderer/build/ext/mobx-react-lite/es/utils/observerFinalizationRegistry.js +1 -0
  171. package/build/ext/@ikas/popup-renderer/build/ext/mobx-react-lite/es/utils/printDebugValue.js +1 -0
  172. package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/button-element-renderer/index.js +1 -1
  173. package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/checkbox-item-view/index.js +1 -1
  174. package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/index.js +1 -1
  175. package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/input-item-view/index.js +1 -1
  176. package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/phone-input-item-view/get-countries.js +1 -0
  177. package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/phone-input-item-view/index.js +1 -0
  178. package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/image-column-element-renderer/index.js +1 -1
  179. package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/image-element-renderer/index.js +1 -1
  180. package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/index.js +1 -1
  181. package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/product-list-renderer/index.js +1 -1
  182. package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/social-element-renderer/index.js +1 -1
  183. package/build/ext/@ikas/popup-renderer/build/popup-renderer/helpers/index.js +1 -1
  184. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/form-settings/index.js +1 -1
  185. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/image/index.js +1 -1
  186. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/image-column/index.js +1 -1
  187. package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/product/index.js +1 -1
  188. package/build/hooks/useCustomerReviews.d.ts +2 -0
  189. package/build/hooks/useCustomerReviews.js +1 -1
  190. package/build/hooks/useDimension.js +1 -1
  191. package/build/hooks/useStore.js +1 -1
  192. package/build/index.js +1 -1
  193. package/build/models/data/checkout-settings/address-field-restriction/index.d.ts +10 -0
  194. package/build/models/data/checkout-settings/address-field-restriction/index.js +1 -0
  195. package/build/models/data/checkout-settings/index.d.ts +3 -0
  196. package/build/models/data/checkout-settings/index.js +1 -1
  197. package/build/models/data/customer/address/ikas-localized-customer-address.d.ts +1 -0
  198. package/build/models/data/customer/address/ikas-localized-customer-address.js +1 -1
  199. package/build/models/data/customer/review/index.d.ts +4 -1
  200. package/build/models/data/customer/review/index.js +1 -1
  201. package/build/models/data/index.d.ts +6 -0
  202. package/build/models/data/order/address/ikas-localized-order-address.d.ts +1 -0
  203. package/build/models/data/order/address/ikas-localized-order-address.js +1 -1
  204. package/build/models/data/order/adjustment/index.d.ts +3 -1
  205. package/build/models/data/order/adjustment/index.js +1 -1
  206. package/build/models/data/order/gift-card-line/index.d.ts +2 -1
  207. package/build/models/data/order/gift-card-line/index.js +1 -1
  208. package/build/models/data/order/index.d.ts +21 -2
  209. package/build/models/data/order/index.js +1 -1
  210. package/build/models/data/order/line-item/bundle-product-settings/index.d.ts +7 -0
  211. package/build/models/data/order/line-item/bundle-product-settings/index.js +1 -0
  212. package/build/models/data/order/line-item/index.d.ts +9 -1
  213. package/build/models/data/order/line-item/index.js +1 -1
  214. package/build/models/data/order/line-item/order-line-item-subscription-plan/index.d.ts +8 -0
  215. package/build/models/data/order/line-item/order-line-item-subscription-plan/index.js +1 -0
  216. package/build/models/data/order/line-item/order-line-item-subscription-plan/order-line-item-subscription-plan-discount/index.d.ts +6 -0
  217. package/build/models/data/order/line-item/order-line-item-subscription-plan/order-line-item-subscription-plan-discount/index.js +1 -0
  218. package/build/models/data/order/line-item/order-line-item-subscription-plan/order-line-item-subscription-plan-period/index.d.ts +14 -0
  219. package/build/models/data/order/line-item/order-line-item-subscription-plan/order-line-item-subscription-plan-period/index.js +1 -0
  220. package/build/models/data/order/loyalty-line/index.d.ts +9 -0
  221. package/build/models/data/order/loyalty-line/index.js +1 -0
  222. package/build/models/data/order/order-transaction-with-prices/index.d.ts +1 -0
  223. package/build/models/data/order/order-transaction-with-prices/index.js +1 -1
  224. package/build/models/data/order/refund/reason/index.d.ts +8 -0
  225. package/build/models/data/order/refund/reason/index.js +1 -0
  226. package/build/models/data/order/refund/reason/translation/index.d.ts +6 -0
  227. package/build/models/data/order/refund/reason/translation/index.js +1 -0
  228. package/build/models/data/order/refund/refundable-line/index.d.ts +10 -0
  229. package/build/models/data/order/refund/refundable-line/index.js +1 -0
  230. package/build/models/data/order/refund/refundable-lines/index.d.ts +10 -0
  231. package/build/models/data/order/refund/refundable-lines/index.js +1 -0
  232. package/build/models/data/order/refund/settings/index.d.ts +1 -0
  233. package/build/models/data/order/refund/settings/index.js +1 -1
  234. package/build/models/data/order/refund/settings/translation/index.d.ts +6 -0
  235. package/build/models/data/order/refund/settings/translation/index.js +1 -0
  236. package/build/models/data/payment-gateway/index.d.ts +1 -0
  237. package/build/models/data/payment-gateway/index.js +1 -1
  238. package/build/models/data/product/campaign-offer/index.d.ts +2 -0
  239. package/build/models/data/product/campaign-offer/index.js +1 -1
  240. package/build/models/data/product/filter/index.d.ts +2 -0
  241. package/build/models/data/product/filter/index.js +1 -1
  242. package/build/models/data/product/index.d.ts +10 -0
  243. package/build/models/data/product/index.js +1 -1
  244. package/build/models/data/product/translations/index.d.ts +7 -0
  245. package/build/models/data/product/translations/index.js +1 -0
  246. package/build/models/data/product/variant/bundle-settings/bundle-product/index.js +1 -1
  247. package/build/models/data/product/variant/index.d.ts +3 -0
  248. package/build/models/data/product/variant/index.js +1 -1
  249. package/build/models/data/product/variant/subscription-plan/index.d.ts +12 -0
  250. package/build/models/data/product/variant/subscription-plan/index.js +1 -0
  251. package/build/models/data/product/variant/subscription-plan/product-subscription-plan-discount/index.d.ts +6 -0
  252. package/build/models/data/product/variant/subscription-plan/product-subscription-plan-period/index.d.ts +23 -0
  253. package/build/models/data/product/variant/subscription-plan/product-subscription-plan-period/index.js +1 -0
  254. package/build/models/data/store-credit-balance/index.d.ts +26 -0
  255. package/build/models/data/store-credit-balance/index.js +1 -0
  256. package/build/models/data/storefront/index.d.ts +1 -0
  257. package/build/models/data/storefront/index.js +1 -1
  258. package/build/models/data/storefront-popup/index.d.ts +1 -0
  259. package/build/models/data/storefront-popup/index.js +1 -1
  260. package/build/models/data/storefront-popup/storefront-popup-display-filter/index.d.ts +4 -7
  261. package/build/models/data/storefront-popup/storefront-popup-display-filter/index.js +1 -1
  262. package/build/models/data/theme-json/component/prop/index.d.ts +1 -0
  263. package/build/models/data/theme-json/component/prop/index.js +1 -1
  264. package/build/models/data/theme-json/custom-data/index.d.ts +1 -0
  265. package/build/models/data/theme-json/custom-data/index.js +1 -1
  266. package/build/models/data/theme-json/index.js +1 -1
  267. package/build/models/ui/blog-category-list/index.js +1 -1
  268. package/build/models/ui/blog-list/index.d.ts +10 -1
  269. package/build/models/ui/blog-list/index.js +1 -1
  270. package/build/models/ui/brand-list/index.js +1 -1
  271. package/build/models/ui/category-list/index.js +1 -1
  272. package/build/models/ui/customer-review-list/index.d.ts +8 -0
  273. package/build/models/ui/customer-review-list/index.js +1 -1
  274. package/build/models/ui/customer-review-summary-list/index.js +1 -1
  275. package/build/models/ui/product-list/index.d.ts +25 -2
  276. package/build/models/ui/product-list/index.js +1 -1
  277. package/build/models/ui/raffle-list/index.js +1 -1
  278. package/build/models/ui/validator/form/account-info.js +1 -1
  279. package/build/models/ui/validator/form/address.js +1 -1
  280. package/build/models/ui/validator/form/ikas-address.js +1 -1
  281. package/build/models/ui/validator/form/login.d.ts +20 -6
  282. package/build/models/ui/validator/form/login.js +1 -1
  283. package/build/models/ui/validator/form/register.d.ts +15 -6
  284. package/build/models/ui/validator/form/register.js +1 -1
  285. package/build/page-data-init/index.d.ts +22 -0
  286. package/build/page-data-init/index.js +1 -1
  287. package/build/pages/checkout.js +1 -1
  288. package/build/store/blog/index.js +1 -1
  289. package/build/store/brand/index.js +1 -1
  290. package/build/store/cart/api.d.ts +3 -1
  291. package/build/store/cart/api.js +1 -1
  292. package/build/store/cart/index.d.ts +28 -2
  293. package/build/store/cart/index.js +1 -1
  294. package/build/store/category/index.js +1 -1
  295. package/build/store/checkout/index.d.ts +9 -1
  296. package/build/store/checkout/index.js +1 -1
  297. package/build/store/customer/api.d.ts +35 -13
  298. package/build/store/customer/api.js +1 -1
  299. package/build/store/customer/index.d.ts +87 -9
  300. package/build/store/customer/index.js +1 -1
  301. package/build/store/html-meta-data/index.js +1 -1
  302. package/build/store/index.d.ts +2 -0
  303. package/build/store/location/index.js +1 -1
  304. package/build/store/product/index.d.ts +2 -1
  305. package/build/store/product/index.js +1 -1
  306. package/build/utils/helper.d.ts +2 -0
  307. package/build/utils/helper.js +1 -1
  308. package/build/utils/miles-smiles.d.ts +19 -0
  309. package/build/utils/miles-smiles.js +1 -0
  310. package/package.json +18 -16
  311. package/build/components/popup/index.d.ts +0 -2
  312. package/build/components/popup/index.js +0 -1
  313. package/build/components/popup/renderer/index.d.ts +0 -8
  314. package/build/components/popup/renderer/index.js +0 -1
  315. package/build/components/popup/renderer/model.d.ts +0 -24
  316. package/build/components/popup/renderer/model.js +0 -1
  317. package/build/components/popup/utils/index.d.ts +0 -13
  318. package/build/components/popup/utils/index.js +0 -1
  319. package/build/store/storefront-popup/index.js +0 -1
@@ -1 +1 @@
1
- import*as e from"react";import{observer as t}from"mobx-react-lite";import{CheckoutStep as n}from"../../model.js";import{Button as a}from"../button/index.js";import i from"./select/index.js";import o from"../svg/cross.js";import{useTranslation as r}from"../../../../utils/i18n.js";import c from"./style.module.scss.js";import{IkasAmountType as s}from"@ikas/storefront-models";import"@ikas/storefront-config";import{formatCurrency as l}from"../../../../utils/currency.js";var u=function(t){var a,i,o=t.seconds,s=t.onFinish,l=t.campaignOffer,u=t.vm,f=t.isPopupClosed,m=t.step,p=r().t,v=e.useState(o),g=v[0],C=v[1];e.useEffect((function(){C(o)}),[o]),e.useEffect((function(){var e=setInterval((function(){g>0?C(g-1):(clearInterval(e),s())}),1e3);return function(){return clearInterval(e)}}),[g]);var S=l.offer.countdownMinutes&&(m!==n.SUCCESS?!!(null===(a=u.customizationProps)||void 0===a?void 0:a.campaignOfferCountdownStyleIsLine):!!(null===(i=u.customizationProps)||void 0===i?void 0:i.campaignOfferCountdownStyleIsLineSuccessPage))||f;return e.createElement("div",{className:S?c.CountdownContainerIsLine:c.CountdownContainer},e.createElement("div",{className:c.CountdownTextMain},!S&&e.createElement("span",{className:c.CountdownText},p("checkout-page:timeRemaining")),e.createElement("span",{className:c.CountdownTime},d(g))))},d=function(e){var t=Math.floor(e/60/60),n=Math.floor(e/60)-60*t,a=e%60;return 0!==t?t.toString().padStart(2,"0")+":":n.toString().padStart(2,"0")+":"+a.toString().padStart(2,"0")},f=t((function(t){var d,f,m,p,v,g,C,S=t.vm,h=t.campaignOffer,E=t.index,P=t.activeIndex,O=t.offersLength,V=t.handleNext,I=t.handlePrev,w=t.setActiveIndex,N=t.isPopupShow,y=t.closePopup,M=t.showPopup,j=t.isPopupClosed,B=t.desktopMiddlePhase,k=t.step,T=r().t,A=h.product,x=k!==n.SUCCESS?!!(null===(d=S.customizationProps)||void 0===d?void 0:d.campaignOfferIsSmallDesign)&&N:!!(null===(f=S.customizationProps)||void 0===f?void 0:f.showCampaignIsBiggerImage)&&k===n.SUCCESS,D=e.useRef(null),L=e.useRef(null),z=e.useRef(null),R=e.useState(0),b=R[0],U=R[1];e.useEffect((function(){var e,t,a,i,o,r,c,s;if(void 0!==typeof window){var l=.8*window.innerHeight,u=0,d=0,f=0;D.current&&(u=null===(t=null===(e=D.current)||void 0===e?void 0:e.getBoundingClientRect())||void 0===t?void 0:t.height),L.current&&(d=null===(i=null===(a=L.current)||void 0===a?void 0:a.getBoundingClientRect())||void 0===i?void 0:i.height),z.current&&(f=null===(r=null===(o=z.current)||void 0===o?void 0:o.getBoundingClientRect())||void 0===r?void 0:r.height);var m=(k===n.SUCCESS?null===(c=S.customizationProps)||void 0===c?void 0:c.campaignOfferCountdownStyleIsLineSuccessPage:null===(s=S.customizationProps)||void 0===s?void 0:s.campaignOfferCountdownStyleIsLine)?25:70,p=navigator.userAgent.match(/Version\/[\d\.]+.*Safari/)?20:0;U(l-u-d-f-p-m)}}),[N]);var F=e.useState(null),H=F[0],X=F[1],q=e.useState(null),G=q[0],J=q[1],K=e.useMemo((function(){var e,t,n,a,i,o,r,c=null===(e=A.selectedVariant.images)||void 0===e?void 0:e.filter((function(e){return!e.isVideo}));return(null===(t=A.selectedVariant.mainImage)||void 0===t?void 0:t.isVideo)&&(null==c?void 0:c.length)?null===(n=c[0].image)||void 0===n?void 0:n.thumbnailSrc:x||B?null===(i=null===(a=A.selectedVariant.mainImage)||void 0===a?void 0:a.image)||void 0===i?void 0:i.getSrc(360):null===(r=null===(o=A.selectedVariant.mainImage)||void 0===o?void 0:o.image)||void 0===r?void 0:r.thumbnailSrc}),[A.selectedVariant,x,B]),Q=e.useMemo((function(){if(!h.offer.countdownMinutes||!h.campaignOffer.offerStartDate)return 0;var e=Math.round(((new Date).getTime()-new Date(h.campaignOffer.offerStartDate).getTime())/1e3);return e>60*h.offer.countdownMinutes?0:60*h.offer.countdownMinutes-e}),[h]),W=function(e){w(0),S.updateCartCampaignOffer({accepted:e,cartId:S.checkout.id,campaignOfferId:h.campaignOffer.campaignOfferId,campaignOfferProductId:h.offer.id,productId:h.offer.productId,variantId:A.selectedVariant.id})},Y=function(){W(!0)},Z=function(){W(!1)},$=function(e,t){var n=null;A.displayedVariantTypes.forEach((function(t){t.displayedVariantValues.forEach((function(t){t.variant.id===e&&(n=t.variantValue)}))}));var a=A.variants.find((function(t){return t.id===e})),i=!!a&&!!a.variantValues&&!!a.variantValues.length&&a.variantValues[t];i&&A.selectVariantValue(i,!0),A.displayedVariantTypes.forEach((function(t){t.displayedVariantValues.forEach((function(t){t.variant.id===e&&(n=t.variantValue)}))})),n?A.selectVariantValue(n,!0):$(e,t+1)},_=h.offer.countdownMinutes&&(k!==n.SUCCESS?!!(null===(m=S.customizationProps)||void 0===m?void 0:m.campaignOfferCountdownStyleIsLine):!!(null===(p=S.customizationProps)||void 0===p?void 0:p.campaignOfferCountdownStyleIsLineSuccessPage))||j&&h.offer.countdownMinutes;return e.createElement("div",{style:{transform:"translateX(-".concat(100*P,"%)")},className:[c.Container,E===P?c.ActiveOffer:"",N?c.PopupContainer:"",B?c.PopupContainerDesktop:"",k===n.SUCCESS?c.Border:""].join(" ")},h.offer.countdownMinutes&&(k!==n.SUCCESS?!(null===(v=S.customizationProps)||void 0===v?void 0:v.campaignOfferCountdownStyleIsLine):!(null===(g=S.customizationProps)||void 0===g?void 0:g.campaignOfferCountdownStyleIsLineSuccessPage))&&!j&&e.createElement(u,{seconds:Q,onFinish:Z,vm:S,campaignOffer:h,step:k}),e.createElement("div",{onTouchStart:function(e){J(null),X(e.targetTouches[0].clientX)},onTouchMove:function(e){return J(e.targetTouches[0].clientX)},onTouchEnd:function(){if(H&&G&&O>1){var e=H-G,t=e>50;(t||e<-50)&&(t?V():I())}},className:[c.ContentContainer,O>1?c.ContentContainerItems:"",j?O>1?c.ContentContainerPopup:c.ContentContainerPopupItems:""].join(" ")},!!N&&e.createElement("div",{className:c.RejectButton,onClick:function(){return y&&y()}},e.createElement(o,null)),e.createElement("div",{ref:D,className:[c.HeaderMain,x&&!j?c.IsBigProductImage:"",_?c.IsLineCountDown:"",j?c.MobileSmallHeader:""].join(" ")},e.createElement("div",{className:c.Header},e.createElement("div",{className:c.Title},h.offer.title),!!h.offer.description&&!j&&e.createElement("div",{className:c.Description},h.offer.description)),_&&e.createElement(u,{seconds:Q,onFinish:Z,vm:S,campaignOffer:h,isPopupClosed:j,step:k})),e.createElement("div",{className:[c.ProductContainer,x&&!j?c.IsLineProductContainer:""].join(" ")},e.createElement("div",{style:N?{width:b,height:b}:{},className:[c.ImageContainer,x&&!j?c.BigImage:"",j?c.SmallImage:"",B?c.BiggerImage:""].join(" ")},e.createElement("img",{className:c.Image,src:K})),e.createElement("div",{ref:L,className:c.ProductDetails},e.createElement("div",{className:c.ProductName},A.name),A.hasVariant&&1===A.variants.length&&e.createElement("div",{className:c.VariantName},A.selectedVariant.variantValues.map((function(e){return e.name})).join(", ")),!(null===(C=S.customizationProps)||void 0===C?void 0:C.showCampaignHideDiscountBadge)&&A.selectedVariant.hasDiscount&&e.createElement("span",{className:c.DiscountBadge},h.offer.discountType===s.RATIO?"%".concat(A.selectedVariant.discountPercentage):l(h.offer.discountAmount||0,A.selectedVariant.price.currency||"",A.selectedVariant.price.currencySymbol||"")," ",T("checkout-page:discount")),e.createElement("div",{className:c.ProductPriceMain},A.selectedVariant.hasDiscount&&e.createElement("span",{className:c.Discount},A.selectedVariant.formattedSellPrice," "),e.createElement("span",{className:c.ProductPrice},h.offer.discountType===s.AMOUNT?l(A.selectedVariant.price.sellPrice-(h.offer.discountAmount||0),A.selectedVariant.price.currency||"",A.selectedVariant.price.currencySymbol||""):A.selectedVariant.formattedFinalPrice)),!j&&A.variants.length>1&&e.createElement("div",{className:c.Actions},A.variants.length>1&&e.createElement(i,{value:A.selectedVariant.id,onSelectChange:function(e){$(e,0)},options:A.variants.map((function(e){return{label:e.variantValues.map((function(e){return e.name})).join(", "),value:e.id}}))})),!!j&&e.createElement(a,{classes:[c.OfferButton,x?c.OfferAcceptButton:"",c.PopupOfferButton].join(" "),text:T("checkout-page:actions.acceptOffer"),onClick:function(){A.hasVariant?M&&M():Y()}}),!!B&&e.createElement("div",{className:[c.OfferActionsMain,x?c.OfferActionsMainBigImage:"",c.OfferActionsMainMiddlePhase].join(" ")},e.createElement(a,{classes:c.OfferButton,isLine:!0,text:T("checkout-page:actions.rejectOffer"),onClick:Z}),e.createElement(a,{classes:[c.OfferButton,x?c.OfferAcceptButton:""].join(" "),text:e.createElement("div",null,e.createElement("span",null,T("checkout-page:actions.acceptOffer")),e.createElement("span",null),e.createElement("span",null,A.selectedVariant.price.formattedFinalPrice)),onClick:Y})))),!(j||B)&&e.createElement("div",{ref:z,className:[c.OfferActionsMain,x?c.OfferActionsMainBigImage:""].join(" ")},e.createElement(a,{classes:c.OfferButton,isLine:!0,text:T("checkout-page:actions.rejectOffer"),onClick:Z}),e.createElement(a,{classes:[c.OfferButton,x?c.OfferAcceptButton:""].join(" "),text:T("checkout-page:actions.acceptOffer"),onClick:Y}))))}));export{f as default};
1
+ import*as e from"react";import{observer as t}from"mobx-react-lite";import{CheckoutStep as n}from"../../model.js";import{Button as a}from"../button/index.js";import i from"./select/index.js";import o from"../svg/cross.js";import{useTranslation as r}from"../../../../utils/i18n.js";import c from"./style.module.scss.js";import{IkasAmountType as s}from"@ikas/storefront-models";import{IkasStorefrontConfig as l}from"@ikas/storefront-config";import{formatCurrency as u}from"../../../../utils/currency.js";var d=function(t){var a,i,o=t.seconds,s=t.onFinish,l=t.campaignOffer,u=t.vm,d=t.isPopupClosed,m=t.step,p=r().t,v=e.useState(o),g=v[0],C=v[1];e.useEffect((function(){C(o)}),[o]),e.useEffect((function(){var e=setInterval((function(){g>0?C(g-1):(clearInterval(e),s())}),1e3);return function(){return clearInterval(e)}}),[g]);var S=l.offer.countdownMinutes&&(m!==n.SUCCESS?!!(null===(a=u.customizationProps)||void 0===a?void 0:a.campaignOfferCountdownStyleIsLine):!!(null===(i=u.customizationProps)||void 0===i?void 0:i.campaignOfferCountdownStyleIsLineSuccessPage))||d;return e.createElement("div",{className:S?c.CountdownContainerIsLine:c.CountdownContainer},e.createElement("div",{className:c.CountdownTextMain},!S&&e.createElement("span",{className:c.CountdownText},p("checkout-page:timeRemaining")),e.createElement("span",{className:c.CountdownTime},f(g))))},f=function(e){var t=Math.floor(e/60/60),n=Math.floor(e/60)-60*t,a=e%60;return 0!==t?t.toString().padStart(2,"0")+":":n.toString().padStart(2,"0")+":"+a.toString().padStart(2,"0")},m=t((function(t){var f,m,p,v,g,C,S,h=t.vm,E=t.campaignOffer,O=t.index,P=t.activeIndex,I=t.offersLength,V=t.handleNext,w=t.handlePrev,N=t.setActiveIndex,y=t.isPopupShow,B=t.closePopup,M=t.showPopup,j=t.isPopupClosed,k=t.desktopMiddlePhase,T=t.step,A=r().t,x=E.product,D=T!==n.SUCCESS?!!(null===(f=h.customizationProps)||void 0===f?void 0:f.campaignOfferIsSmallDesign)&&y:!!(null===(m=h.customizationProps)||void 0===m?void 0:m.showCampaignIsBiggerImage)&&T===n.SUCCESS,L=e.useRef(null),z=e.useRef(null),b=e.useRef(null),R=e.useState(0),U=R[0],F=R[1],H=["0ead1005-b19c-4680-8ab7-a8a1cca3244e","ec27eadf-1953-4c71-9680-f213332694a2"].includes(l.getStorefrontId()||"");e.useEffect((function(){var e,t,a,i,o,r,c,s;if(void 0!==typeof window){var l=.8*window.innerHeight,u=0,d=0,f=0;L.current&&(u=null===(t=null===(e=L.current)||void 0===e?void 0:e.getBoundingClientRect())||void 0===t?void 0:t.height),z.current&&(d=null===(i=null===(a=z.current)||void 0===a?void 0:a.getBoundingClientRect())||void 0===i?void 0:i.height),b.current&&(f=null===(r=null===(o=b.current)||void 0===o?void 0:o.getBoundingClientRect())||void 0===r?void 0:r.height);var m=(T===n.SUCCESS?null===(c=h.customizationProps)||void 0===c?void 0:c.campaignOfferCountdownStyleIsLineSuccessPage:null===(s=h.customizationProps)||void 0===s?void 0:s.campaignOfferCountdownStyleIsLine)?25:70,p=navigator.userAgent.match(/Version\/[\d\.]+.*Safari/)?20:0;F(l-u-d-f-p-m)}}),[y]);var X=e.useState(null),q=X[0],G=X[1],J=e.useState(null),K=J[0],Q=J[1],W=e.useMemo((function(){var e,t,n,a,i,o,r,c=null===(e=x.selectedVariant.images)||void 0===e?void 0:e.filter((function(e){return!e.isVideo}));return(null===(t=x.selectedVariant.mainImage)||void 0===t?void 0:t.isVideo)&&(null==c?void 0:c.length)?null===(n=c[0].image)||void 0===n?void 0:n.thumbnailSrc:D||k?null===(i=null===(a=x.selectedVariant.mainImage)||void 0===a?void 0:a.image)||void 0===i?void 0:i.getSrc(360):null===(r=null===(o=x.selectedVariant.mainImage)||void 0===o?void 0:o.image)||void 0===r?void 0:r.thumbnailSrc}),[x.selectedVariant,D,k]),Y=function(e){N(0),h.updateCartCampaignOffer({accepted:e,cartId:h.checkout.id,campaignOfferId:E.campaignOffer.campaignOfferId,campaignOfferProductId:E.offer.id,productId:E.offer.productId,variantId:x.selectedVariant.id})},Z=function(){Y(!1)},$=function(){Y(!0)},_=e.useMemo((function(){if(!E.offer.countdownMinutes||!E.campaignOffer.offerStartDate)return 0;var e=Math.round(((new Date).getTime()-new Date(E.campaignOffer.offerStartDate).getTime())/1e3);return e>60*E.offer.countdownMinutes?(Z(),0):60*E.offer.countdownMinutes-e}),[E]),ee=function(e,t){var n=null;x.displayedVariantTypes.forEach((function(t){t.displayedVariantValues.forEach((function(t){t.variant.id===e&&(n=t.variantValue)}))}));var a=x.variants.find((function(t){return t.id===e})),i=!!a&&!!a.variantValues&&!!a.variantValues.length&&a.variantValues[t];i&&x.selectVariantValue(i,!0),x.displayedVariantTypes.forEach((function(t){t.displayedVariantValues.forEach((function(t){t.variant.id===e&&(n=t.variantValue)}))})),n?x.selectVariantValue(n,!0):ee(e,t+1)},te=E.offer.countdownMinutes&&(T!==n.SUCCESS?!!(null===(p=h.customizationProps)||void 0===p?void 0:p.campaignOfferCountdownStyleIsLine):!!(null===(v=h.customizationProps)||void 0===v?void 0:v.campaignOfferCountdownStyleIsLineSuccessPage))||j&&E.offer.countdownMinutes;return e.createElement("div",{style:{transform:"translateX(-".concat(100*P,"%)")},className:[c.Container,O===P?c.ActiveOffer:"",y?c.PopupContainer:"",k?c.PopupContainerDesktop:"",T===n.SUCCESS?c.Border:""].join(" ")},E.offer.countdownMinutes&&(T!==n.SUCCESS?!(null===(g=h.customizationProps)||void 0===g?void 0:g.campaignOfferCountdownStyleIsLine):!(null===(C=h.customizationProps)||void 0===C?void 0:C.campaignOfferCountdownStyleIsLineSuccessPage))&&!j&&e.createElement(d,{seconds:_,onFinish:Z,vm:h,campaignOffer:E,step:T}),e.createElement("div",{onTouchStart:function(e){Q(null),G(e.targetTouches[0].clientX)},onTouchMove:function(e){return Q(e.targetTouches[0].clientX)},onTouchEnd:function(){if(q&&K&&I>1){var e=q-K,t=e>50;(t||e<-50)&&(t?V():w())}},className:[c.ContentContainer,I>1?c.ContentContainerItems:"",j?I>1?c.ContentContainerPopup:c.ContentContainerPopupItems:""].join(" ")},!!y&&e.createElement("div",{className:c.RejectButton,onClick:function(){return B&&B()}},e.createElement(o,null)),e.createElement("div",{ref:L,className:[c.HeaderMain,D&&!j?c.IsBigProductImage:"",te?c.IsLineCountDown:"",j?c.MobileSmallHeader:""].join(" ")},e.createElement("div",{className:c.Header},e.createElement("div",{className:c.Title},E.offer.title),!!E.offer.description&&!j&&e.createElement("div",{className:c.Description},E.offer.description)),te&&e.createElement(d,{seconds:_,onFinish:Z,vm:h,campaignOffer:E,isPopupClosed:j,step:T})),e.createElement("div",{className:[c.ProductContainer,D&&!j?c.IsLineProductContainer:""].join(" ")},e.createElement("div",{style:y?{width:U,height:U}:{},className:[c.ImageContainer,D&&!j?c.BigImage:"",j?c.SmallImage:"",k?c.BiggerImage:""].join(" ")},e.createElement("img",{className:c.Image,src:W})),e.createElement("div",{ref:z,className:c.ProductDetails},e.createElement("div",{className:c.ProductName},x.name),x.hasVariant&&1===x.variants.length&&e.createElement("div",{className:c.VariantName},x.selectedVariant.variantValues.map((function(e){return e.name})).join(", ")),!(null===(S=h.customizationProps)||void 0===S?void 0:S.showCampaignHideDiscountBadge)&&x.selectedVariant.hasDiscount&&e.createElement("span",{className:c.DiscountBadge},E.offer.discountType===s.RATIO?"%".concat(x.selectedVariant.discountPercentage):u(E.offer.discountAmount||0,x.selectedVariant.price.currency||"",x.selectedVariant.price.currencySymbol||"")," ",A("checkout-page:discount")),e.createElement("div",{className:c.ProductPriceMain},x.selectedVariant.hasDiscount&&e.createElement("span",{className:c.Discount},x.selectedVariant.formattedSellPrice," "),e.createElement("span",{className:c.ProductPrice},E.offer.discountType===s.AMOUNT?u(x.selectedVariant.price.sellPrice-(E.offer.discountAmount||0),x.selectedVariant.price.currency||"",x.selectedVariant.price.currencySymbol||""):x.selectedVariant.formattedFinalPrice)),!j&&x.variants.length>1&&e.createElement("div",{className:c.Actions},x.variants.length>1&&e.createElement(i,{value:x.selectedVariant.id,onSelectChange:function(e){ee(e,0)},options:x.variants.map((function(e){return{label:e.variantValues.map((function(e){return e.name})).join(", "),value:e.id}}))})),!!j&&e.createElement(a,{classes:[c.OfferButton,D?c.OfferAcceptButton:"",H?c.ProteinOceanOfferButton:"",c.PopupOfferButton].join(" "),text:A("checkout-page:actions.acceptOffer"),onClick:function(){x.hasVariant&&x.variants.length>1?M&&M():$()}}),!!k&&e.createElement("div",{className:[c.OfferActionsMain,D?c.OfferActionsMainBigImage:"",c.OfferActionsMainMiddlePhase].join(" ")},e.createElement(a,{classes:c.OfferButton,isLine:!0,text:A("checkout-page:actions.rejectOffer"),onClick:Z}),e.createElement(a,{classes:[c.OfferButton,D?c.OfferAcceptButton:"",H?c.ProteinOceanOfferButton:""].join(" "),text:e.createElement("div",null,e.createElement("span",null,A("checkout-page:actions.acceptOffer")),e.createElement("span",null),e.createElement("span",null,x.selectedVariant.price.formattedFinalPrice)),onClick:$})))),!(j||k)&&e.createElement("div",{ref:b,className:[c.OfferActionsMain,D?c.OfferActionsMainBigImage:""].join(" ")},e.createElement(a,{classes:c.OfferButton,isLine:!0,text:A("checkout-page:actions.rejectOffer"),onClick:Z}),e.createElement(a,{classes:[c.OfferButton,D?c.OfferAcceptButton:"",H?c.ProteinOceanOfferButton:""].join(" "),text:A("checkout-page:actions.acceptOffer"),onClick:$}))))}));export{m as default};
@@ -1 +1 @@
1
- import n from'./../../../../ext/style-inject/dist/style-inject.es.js';var e={Container:"style-module_Container__-EKYc",Border:"style-module_Border__DqZgC",ActiveOffer:"style-module_ActiveOffer__JZyW-",CountdownContainer:"style-module_CountdownContainer__bc-5v",CountdownContainerIsLine:"style-module_CountdownContainerIsLine__YtdAv",CountdownTextMain:"style-module_CountdownTextMain__S9Rrn",CountdownText:"style-module_CountdownText__Hd-3I",CountdownTime:"style-module_CountdownTime__a2aRF",ContentContainer:"style-module_ContentContainer__tC3zO",HeaderMain:"style-module_HeaderMain__-tiUy",Header:"style-module_Header__J2wyt",IsLineCountDown:"style-module_IsLineCountDown__xgFDT",IsBigProductImage:"style-module_IsBigProductImage__YdAgY",IsLineProductContainer:"style-module_IsLineProductContainer__3Nkqr",Title:"style-module_Title__4T394",Description:"style-module_Description__GPKR-",RejectButton:"style-module_RejectButton__3SwP8",ProductContainer:"style-module_ProductContainer__9qr9n",ImageContainer:"style-module_ImageContainer__gxlXU",PlaceHolderProductContainer:"style-module_PlaceHolderProductContainer__XVvyr",BigImage:"style-module_BigImage__n1DH9",SmallImage:"style-module_SmallImage__42qY-",BiggerImage:"style-module_BiggerImage__2M7Dw",Image:"style-module_Image__gDla7",ProductDetails:"style-module_ProductDetails__a-gJx",ProductName:"style-module_ProductName__yTmJx",VariantName:"style-module_VariantName__DF1mY",Brand:"style-module_Brand__UxK7C",ProductPriceMain:"style-module_ProductPriceMain__IJHv-",ProductPrice:"style-module_ProductPrice__U6Lhy",Discount:"style-module_Discount__tjllJ",Actions:"style-module_Actions__XZsJD",DiscountBadge:"style-module_DiscountBadge__deWxZ",ContentContainerItems:"style-module_ContentContainerItems__SIB05",OfferActionsMain:"style-module_OfferActionsMain__9axsN",OfferActionsMainMiddlePhase:"style-module_OfferActionsMainMiddlePhase__7VryS",OfferButton:"style-module_OfferButton__pkhNI",OfferActionsMainBigImage:"style-module_OfferActionsMainBigImage__qCPQB",MobileSmallHeader:"style-module_MobileSmallHeader__zrlIx",ContentContainerPopup:"style-module_ContentContainerPopup__Pburr",ContentContainerPopupItems:"style-module_ContentContainerPopupItems__7Azct",PopupOfferButton:"style-module_PopupOfferButton__-9ljg",PopupContainer:"style-module_PopupContainer__sL4sY",PopupContainerDesktop:"style-module_PopupContainerDesktop__c13p-"};n(".style-module_Container__-EKYc {\n margin: 32px 0 48px 0;\n border: 1px solid var(--checkout-border-color);\n border-radius: 8px;\n flex-shrink: 0;\n width: 100%;\n transition: 0.5s ease;\n background-color: var(--checkout-campaign-container-bg-color);\n}\n@media only screen and (max-width: 1000px) {\n .style-module_Container__-EKYc {\n margin: 0;\n border-radius: 0;\n border: unset;\n border-bottom: 1px solid var(--checkout-border-color);\n }\n}\n@media only screen and (max-width: 1000px) {\n .style-module_Container__-EKYc.style-module_Border__DqZgC {\n border-top: 1px solid var(--checkout-border-color);\n }\n}\n\n.style-module_ActiveOffer__JZyW- {\n position: relative;\n opacity: 1;\n}\n\n.style-module_CountdownContainer__bc-5v {\n display: flex;\n justify-content: center;\n padding: 12px 16px;\n border-radius: 8px 8px 0 0;\n background-color: var(--checkout-campaign-countdown-bg-color);\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CountdownContainer__bc-5v {\n border-radius: 0;\n }\n}\n\n.style-module_CountdownContainerIsLine__YtdAv {\n display: flex;\n justify-content: center;\n padding: 4px 12px;\n border-radius: 8px;\n background-color: var(--checkout-campaign-countdown-bg-color);\n height: 32px;\n}\n\n.style-module_CountdownTextMain__S9Rrn {\n gap: 6px;\n display: flex;\n}\n\n.style-module_CountdownText__Hd-3I {\n color: var(--checkout-campaign-countdown-text-color);\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n}\n\n.style-module_CountdownTime__a2aRF {\n color: var(--checkout-campaign-countdown-time-color);\n font-size: 16px;\n font-weight: 700;\n line-height: 24px;\n}\n\n.style-module_ContentContainer__tC3zO {\n padding: 24px;\n width: 100%;\n position: relative;\n}\n\n.style-module_HeaderMain__-tiUy {\n display: flex;\n flex-direction: column;\n margin-bottom: 16px;\n}\n\n.style-module_Header__J2wyt {\n display: flex;\n flex-direction: column;\n}\n\n.style-module_IsLineCountDown__xgFDT {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n}\n.style-module_IsLineCountDown__xgFDT .style-module_Header__J2wyt {\n width: 75%;\n}\n\n@media only screen and (max-width: 1000px) {\n .style-module_IsBigProductImage__YdAgY {\n flex-direction: column;\n justify-content: center;\n text-align: center;\n row-gap: 16px;\n align-items: center;\n }\n}\n\n@media only screen and (max-width: 1000px) {\n .style-module_IsLineProductContainer__3Nkqr {\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 256px;\n margin: 0 auto;\n row-gap: 12px;\n }\n}\n\n.style-module_Title__4T394 {\n font-size: 20px;\n color: var(--checkout-campaign-title-color);\n font-weight: 500;\n line-height: 32px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_Title__4T394 {\n font-size: 18px;\n line-height: 26px;\n }\n}\n\n.style-module_Description__GPKR- {\n color: var(--checkout-campaign-description-color);\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n}\n\n.style-module_RejectButton__3SwP8 {\n height: 35px;\n width: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n right: 16px;\n top: 10px;\n cursor: pointer;\n position: absolute;\n}\n\n.style-module_ProductContainer__9qr9n {\n display: flex;\n}\n\n.style-module_ImageContainer__gxlXU {\n height: 80px;\n width: 80px;\n position: relative;\n background-color: #fff;\n margin-right: 12px;\n border-radius: 8px;\n border: 1px solid var(--checkout-border-color);\n}\n.style-module_ImageContainer__gxlXU svg {\n width: 40px;\n height: 40px;\n}\n\n.style-module_PlaceHolderProductContainer__XVvyr {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.style-module_BigImage__n1DH9 {\n height: 152px;\n width: 152px;\n margin-right: 16px;\n}\n.style-module_BigImage__n1DH9 svg {\n width: 80px;\n height: 80px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_BigImage__n1DH9 {\n height: 256px;\n width: 256px;\n margin-right: 0;\n }\n}\n\n.style-module_SmallImage__42qY- {\n height: 52px;\n width: 52px;\n}\n\n.style-module_BiggerImage__2M7Dw {\n height: 320px;\n width: 320px;\n}\n\n.style-module_Image__gDla7 {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 8px;\n}\n\n.style-module_ProductDetails__a-gJx {\n flex: 1;\n width: 100%;\n position: relative;\n}\n\n.style-module_ProductName__yTmJx {\n margin-bottom: 4px;\n font-size: 16px;\n color: var(--checkout-primary-text-color);\n font-weight: 500;\n line-height: 24px;\n}\n\n.style-module_VariantName__DF1mY {\n margin-bottom: 4px;\n font-size: 14px;\n color: var(--checkout-primary-text-color);\n line-height: 20px;\n}\n\n.style-module_Brand__UxK7C {\n margin-bottom: 2px;\n font-size: 14px;\n color: var(--checkout-primary-text-color);\n line-height: 20px;\n}\n\n.style-module_ProductPriceMain__IJHv- {\n gap: 6px;\n display: flex;\n}\n\n.style-module_ProductPrice__U6Lhy {\n font-size: 16px;\n font-weight: 500;\n color: var(--checkout-primary-text-color);\n line-height: 24px;\n}\n\n.style-module_Discount__tjllJ {\n font-size: 16px;\n font-weight: 400;\n color: var(--checkout-secondary-text-color);\n text-decoration: line-through;\n line-height: 24px;\n}\n\n.style-module_Actions__XZsJD {\n display: flex;\n margin-top: 16px;\n width: 100%;\n}\n\n.style-module_DiscountBadge__deWxZ {\n color: var(--checkout-campaign-discount-percentage-color);\n background-color: var(--checkout-campaign-discount-percentage-bg-color);\n display: flex;\n padding: 4px 8px;\n border-radius: 4px;\n font-size: 14px;\n font-weight: 700;\n line-height: 20px;\n width: max-content;\n margin-bottom: 4px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_DiscountBadge__deWxZ {\n font-size: 12px;\n }\n}\n\n.style-module_ContentContainerItems__SIB05 {\n position: relative;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_ContentContainerItems__SIB05 {\n padding-bottom: 60px;\n }\n}\n\n.style-module_OfferActionsMain__9axsN {\n display: flex;\n gap: 12px;\n margin-top: 24px;\n}\n\n.style-module_OfferActionsMainMiddlePhase__7VryS {\n display: flex;\n flex-direction: column;\n gap: 12px;\n margin-top: 24px;\n flex-direction: column-reverse;\n position: absolute;\n bottom: 0;\n width: 100%;\n}\n.style-module_OfferActionsMainMiddlePhase__7VryS .style-module_OfferButton__pkhNI div span:nth-child(2) {\n background-color: rgb(255, 255, 255);\n width: 2px;\n height: 2px;\n display: flex;\n}\n.style-module_OfferActionsMainMiddlePhase__7VryS .style-module_OfferButton__pkhNI div {\n display: flex;\n align-items: center;\n gap: 8px;\n font-weight: 500;\n}\n.style-module_OfferActionsMainMiddlePhase__7VryS .style-module_OfferButton__pkhNI div span {\n font-weight: 500;\n}\n\n@media only screen and (max-width: 1000px) {\n .style-module_OfferActionsMainBigImage__qCPQB {\n display: flex;\n flex-direction: column;\n flex-direction: column-reverse;\n }\n}\n\n.style-module_OfferButton__pkhNI {\n font-weight: 500 !important;\n width: 100%;\n height: 52px !important;\n font-size: 16px;\n}\n\n.style-module_MobileSmallHeader__zrlIx {\n margin-bottom: 10px;\n}\n.style-module_MobileSmallHeader__zrlIx .style-module_Header__J2wyt .style-module_Title__4T394 {\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n}\n\n.style-module_ContentContainerPopup__Pburr {\n padding: 16px;\n padding-bottom: 60px;\n}\n.style-module_ContentContainerPopup__Pburr .style-module_ProductContainer__9qr9n .style-module_ProductDetails__a-gJx {\n position: relative;\n}\n\n.style-module_ContentContainerPopupItems__7Azct {\n padding: 16px;\n}\n.style-module_ContentContainerPopupItems__7Azct .style-module_ProductContainer__9qr9n .style-module_ProductDetails__a-gJx {\n position: relative;\n}\n\n.style-module_PopupOfferButton__-9ljg {\n position: absolute;\n bottom: 0;\n right: 0;\n width: 40%;\n font-size: 12px;\n height: 44px !important;\n}\n\n.style-module_PopupContainer__sL4sY {\n border-bottom: unset;\n}\n.style-module_PopupContainer__sL4sY .style-module_ContentContainer__tC3zO {\n padding-bottom: 16px;\n}\n\n.style-module_PopupContainerDesktop__c13p- {\n border: 1px solid var(--checkout-border-color);\n}");export{e as default};
1
+ import n from'./../../../../ext/style-inject/dist/style-inject.es.js';var e={Container:"style-module_Container__-EKYc",Border:"style-module_Border__DqZgC",ActiveOffer:"style-module_ActiveOffer__JZyW-",CountdownContainer:"style-module_CountdownContainer__bc-5v",CountdownContainerIsLine:"style-module_CountdownContainerIsLine__YtdAv",CountdownTextMain:"style-module_CountdownTextMain__S9Rrn",CountdownText:"style-module_CountdownText__Hd-3I",CountdownTime:"style-module_CountdownTime__a2aRF",ContentContainer:"style-module_ContentContainer__tC3zO",HeaderMain:"style-module_HeaderMain__-tiUy",Header:"style-module_Header__J2wyt",IsLineCountDown:"style-module_IsLineCountDown__xgFDT",IsBigProductImage:"style-module_IsBigProductImage__YdAgY",IsLineProductContainer:"style-module_IsLineProductContainer__3Nkqr",Title:"style-module_Title__4T394",Description:"style-module_Description__GPKR-",RejectButton:"style-module_RejectButton__3SwP8",ProductContainer:"style-module_ProductContainer__9qr9n",ImageContainer:"style-module_ImageContainer__gxlXU",PlaceHolderProductContainer:"style-module_PlaceHolderProductContainer__XVvyr",BigImage:"style-module_BigImage__n1DH9",SmallImage:"style-module_SmallImage__42qY-",BiggerImage:"style-module_BiggerImage__2M7Dw",Image:"style-module_Image__gDla7",ProductDetails:"style-module_ProductDetails__a-gJx",ProductName:"style-module_ProductName__yTmJx",VariantName:"style-module_VariantName__DF1mY",Brand:"style-module_Brand__UxK7C",ProductPriceMain:"style-module_ProductPriceMain__IJHv-",ProductPrice:"style-module_ProductPrice__U6Lhy",Discount:"style-module_Discount__tjllJ",Actions:"style-module_Actions__XZsJD",DiscountBadge:"style-module_DiscountBadge__deWxZ",ContentContainerItems:"style-module_ContentContainerItems__SIB05",OfferActionsMain:"style-module_OfferActionsMain__9axsN",OfferActionsMainMiddlePhase:"style-module_OfferActionsMainMiddlePhase__7VryS",OfferButton:"style-module_OfferButton__pkhNI",OfferActionsMainBigImage:"style-module_OfferActionsMainBigImage__qCPQB",ProteinOceanOfferButton:"style-module_ProteinOceanOfferButton__ypr7i",MobileSmallHeader:"style-module_MobileSmallHeader__zrlIx",ContentContainerPopup:"style-module_ContentContainerPopup__Pburr",ContentContainerPopupItems:"style-module_ContentContainerPopupItems__7Azct",PopupOfferButton:"style-module_PopupOfferButton__-9ljg",PopupContainer:"style-module_PopupContainer__sL4sY",PopupContainerDesktop:"style-module_PopupContainerDesktop__c13p-"};n(".style-module_Container__-EKYc {\n margin: 32px 0 48px 0;\n border: 1px solid var(--checkout-border-color);\n border-radius: 8px;\n flex-shrink: 0;\n width: 100%;\n transition: 0.5s ease;\n background-color: var(--checkout-campaign-container-bg-color);\n}\n@media only screen and (max-width: 1000px) {\n .style-module_Container__-EKYc {\n margin: 0;\n border-radius: 0;\n border: unset;\n border-bottom: 1px solid var(--checkout-border-color);\n }\n}\n@media only screen and (max-width: 1000px) {\n .style-module_Container__-EKYc.style-module_Border__DqZgC {\n border-top: 1px solid var(--checkout-border-color);\n }\n}\n\n.style-module_ActiveOffer__JZyW- {\n position: relative;\n opacity: 1;\n}\n\n.style-module_CountdownContainer__bc-5v {\n display: flex;\n justify-content: center;\n padding: 12px 16px;\n border-radius: 8px 8px 0 0;\n background-color: var(--checkout-campaign-countdown-bg-color);\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CountdownContainer__bc-5v {\n border-radius: 0;\n }\n}\n\n.style-module_CountdownContainerIsLine__YtdAv {\n display: flex;\n justify-content: center;\n padding: 4px 12px;\n border-radius: 8px;\n background-color: var(--checkout-campaign-countdown-bg-color);\n height: 32px;\n}\n\n.style-module_CountdownTextMain__S9Rrn {\n gap: 6px;\n display: flex;\n}\n\n.style-module_CountdownText__Hd-3I {\n color: var(--checkout-campaign-countdown-text-color);\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n}\n\n.style-module_CountdownTime__a2aRF {\n color: var(--checkout-campaign-countdown-time-color);\n font-size: 16px;\n font-weight: 700;\n line-height: 24px;\n}\n\n.style-module_ContentContainer__tC3zO {\n padding: 24px;\n width: 100%;\n position: relative;\n}\n\n.style-module_HeaderMain__-tiUy {\n display: flex;\n flex-direction: column;\n margin-bottom: 16px;\n}\n\n.style-module_Header__J2wyt {\n display: flex;\n flex-direction: column;\n}\n\n.style-module_IsLineCountDown__xgFDT {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n}\n.style-module_IsLineCountDown__xgFDT .style-module_Header__J2wyt {\n width: 75%;\n}\n\n@media only screen and (max-width: 1000px) {\n .style-module_IsBigProductImage__YdAgY {\n flex-direction: column;\n justify-content: center;\n text-align: center;\n row-gap: 16px;\n align-items: center;\n }\n}\n\n@media only screen and (max-width: 1000px) {\n .style-module_IsLineProductContainer__3Nkqr {\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 256px;\n margin: 0 auto;\n row-gap: 12px;\n }\n}\n\n.style-module_Title__4T394 {\n font-size: 20px;\n color: var(--checkout-campaign-title-color);\n font-weight: 500;\n line-height: 32px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_Title__4T394 {\n font-size: 18px;\n line-height: 26px;\n }\n}\n\n.style-module_Description__GPKR- {\n color: var(--checkout-campaign-description-color);\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n}\n\n.style-module_RejectButton__3SwP8 {\n height: 35px;\n width: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n right: 16px;\n top: 10px;\n cursor: pointer;\n position: absolute;\n}\n\n.style-module_ProductContainer__9qr9n {\n display: flex;\n}\n\n.style-module_ImageContainer__gxlXU {\n height: 80px;\n width: 80px;\n position: relative;\n background-color: #fff;\n margin-right: 12px;\n border-radius: 8px;\n border: 1px solid var(--checkout-border-color);\n}\n.style-module_ImageContainer__gxlXU svg {\n width: 40px;\n height: 40px;\n}\n\n.style-module_PlaceHolderProductContainer__XVvyr {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.style-module_BigImage__n1DH9 {\n height: 152px;\n width: 152px;\n margin-right: 16px;\n}\n.style-module_BigImage__n1DH9 svg {\n width: 80px;\n height: 80px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_BigImage__n1DH9 {\n height: 256px;\n width: 256px;\n margin-right: 0;\n }\n}\n\n.style-module_SmallImage__42qY- {\n height: 52px;\n width: 52px;\n}\n\n.style-module_BiggerImage__2M7Dw {\n height: 320px;\n width: 320px;\n}\n\n.style-module_Image__gDla7 {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 8px;\n}\n\n.style-module_ProductDetails__a-gJx {\n flex: 1;\n width: 100%;\n position: relative;\n}\n\n.style-module_ProductName__yTmJx {\n margin-bottom: 4px;\n font-size: 16px;\n color: var(--checkout-primary-text-color);\n font-weight: 500;\n line-height: 24px;\n}\n\n.style-module_VariantName__DF1mY {\n margin-bottom: 4px;\n font-size: 14px;\n color: var(--checkout-primary-text-color);\n line-height: 20px;\n}\n\n.style-module_Brand__UxK7C {\n margin-bottom: 2px;\n font-size: 14px;\n color: var(--checkout-primary-text-color);\n line-height: 20px;\n}\n\n.style-module_ProductPriceMain__IJHv- {\n gap: 6px;\n display: flex;\n}\n\n.style-module_ProductPrice__U6Lhy {\n font-size: 16px;\n font-weight: 500;\n color: var(--checkout-primary-text-color);\n line-height: 24px;\n}\n\n.style-module_Discount__tjllJ {\n font-size: 16px;\n font-weight: 400;\n color: var(--checkout-secondary-text-color);\n text-decoration: line-through;\n line-height: 24px;\n}\n\n.style-module_Actions__XZsJD {\n display: flex;\n margin-top: 16px;\n width: 100%;\n}\n\n.style-module_DiscountBadge__deWxZ {\n color: var(--checkout-campaign-discount-percentage-color);\n background-color: var(--checkout-campaign-discount-percentage-bg-color);\n display: flex;\n padding: 4px 8px;\n border-radius: 4px;\n font-size: 14px;\n font-weight: 700;\n line-height: 20px;\n width: max-content;\n margin-bottom: 4px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_DiscountBadge__deWxZ {\n font-size: 12px;\n }\n}\n\n.style-module_ContentContainerItems__SIB05 {\n position: relative;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_ContentContainerItems__SIB05 {\n padding-bottom: 60px;\n }\n}\n\n.style-module_OfferActionsMain__9axsN {\n display: flex;\n gap: 12px;\n margin-top: 24px;\n}\n\n.style-module_OfferActionsMainMiddlePhase__7VryS {\n display: flex;\n flex-direction: column;\n gap: 12px;\n margin-top: 24px;\n flex-direction: column-reverse;\n position: absolute;\n bottom: 0;\n width: 100%;\n}\n.style-module_OfferActionsMainMiddlePhase__7VryS .style-module_OfferButton__pkhNI div span:nth-child(2) {\n background-color: rgb(255, 255, 255);\n width: 2px;\n height: 2px;\n display: flex;\n}\n.style-module_OfferActionsMainMiddlePhase__7VryS .style-module_OfferButton__pkhNI div {\n display: flex;\n align-items: center;\n gap: 8px;\n font-weight: 500;\n}\n.style-module_OfferActionsMainMiddlePhase__7VryS .style-module_OfferButton__pkhNI div span {\n font-weight: 500;\n}\n\n@media only screen and (max-width: 1000px) {\n .style-module_OfferActionsMainBigImage__qCPQB {\n display: flex;\n flex-direction: column;\n flex-direction: column-reverse;\n }\n}\n\n.style-module_OfferButton__pkhNI {\n font-weight: 500 !important;\n width: 100%;\n height: 52px !important;\n font-size: 16px;\n}\n\n.style-module_ProteinOceanOfferButton__ypr7i {\n font-weight: 600 !important;\n}\n\n.style-module_MobileSmallHeader__zrlIx {\n margin-bottom: 10px;\n}\n.style-module_MobileSmallHeader__zrlIx .style-module_Header__J2wyt .style-module_Title__4T394 {\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n}\n\n.style-module_ContentContainerPopup__Pburr {\n padding: 16px;\n padding-bottom: 60px;\n}\n.style-module_ContentContainerPopup__Pburr .style-module_ProductContainer__9qr9n .style-module_ProductDetails__a-gJx {\n position: relative;\n}\n\n.style-module_ContentContainerPopupItems__7Azct {\n padding: 16px;\n}\n.style-module_ContentContainerPopupItems__7Azct .style-module_ProductContainer__9qr9n .style-module_ProductDetails__a-gJx {\n position: relative;\n}\n\n.style-module_PopupOfferButton__-9ljg {\n position: absolute;\n bottom: 0;\n right: 0;\n width: 40%;\n font-size: 12px;\n height: 44px !important;\n}\n\n.style-module_PopupContainer__sL4sY {\n border-bottom: unset;\n}\n.style-module_PopupContainer__sL4sY .style-module_ContentContainer__tC3zO {\n padding-bottom: 16px;\n}\n\n.style-module_PopupContainerDesktop__c13p- {\n border: 1px solid var(--checkout-border-color);\n}");export{e as default};
@@ -5,6 +5,8 @@ declare type Props = {
5
5
  placeholder: string | undefined;
6
6
  value: string;
7
7
  onChange: (value: string) => void;
8
+ name?: string;
9
+ autoComplete?: string;
8
10
  };
9
- export declare const PhoneNumberInput: React.FC<Props>;
11
+ export declare const PhoneNumberInput: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<Props & React.RefAttributes<HTMLInputElement>, keyof Props | "key"> & React.RefAttributes<HTMLInputElement>>>;
10
12
  export {};
@@ -1 +1 @@
1
- import{__awaiter as e,__generator as t}from'./../../../../ext/tslib/tslib.es6.js';import*as a from"react";import{observer as r}from"mobx-react-lite";import n,{isSupportedCountry as l,formatIncompletePhoneNumber as o,getCountryCallingCode as s,parseIncompletePhoneNumber as c}from"libphonenumber-js";import u from"./get-countries.js";import i from"./style.module.scss.js";var m=r((function(r){var m=r.defaultCountry,v=r.disabled,f=void 0!==v&&v,d=r.placeholder,g=r.value,p=r.onChange,b=a.useState([]),E=b[0],h=b[1],y=a.useState(m||"TR"),N=y[0],C=y[1],S=a.useState(""),F=S[0],j=S[1];a.useEffect((function(){x();var e=N;if(l(e)||(e="US"),g){var t=n(g);t&&t.country&&(e=t.country),j(o(g,e))}else k(e);C(e)}),[m]);var x=function(){return e(void 0,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return[4,u()];case 1:return e=t.sent(),h(e),[2]}}))}))},k=function(e){var t=s(e);j("+".concat(t))},w=function(e){return o(e,N)};return a.createElement(a.Fragment,null,a.createElement("div",{className:i.SelectFlag},a.createElement("div",{className:i.FlagContainer},a.createElement("div",{className:i.Flag},a.createElement("img",{className:i.FlagImage,alt:N,src:"https://cdn.myikas.com/sf/assets/flags/3x2/".concat(N,".svg")}),a.createElement("div",{className:i.Arrow})),a.createElement("select",{className:i.Select,value:N,onChange:function(e){if(e.target.value){var t=e.target.value;C(t),k(t)}},disabled:f},E.map((function(e){return a.createElement("option",{key:e.value,value:e.value},e.label)}))))),a.createElement("input",{type:"tel",autoComplete:"tel",className:i.Input,value:F,onChange:function(e){var t=E.find((function(t){var a;return t.value===(null===(a=n(e.target.value))||void 0===a?void 0:a.country)}));t&&C(t.value);var a=w(e.target.value);j(a),p(a?c(a):e.target.value)},placeholder:d,disabled:f}))}));export{m as PhoneNumberInput};
1
+ import{__awaiter as e,__generator as t}from'./../../../../ext/tslib/tslib.es6.js';import*as a from"react";import{observer as r}from"mobx-react-lite";import n,{formatIncompletePhoneNumber as l,getCountryCallingCode as o,isSupportedCountry as c,parseIncompletePhoneNumber as u}from"libphonenumber-js";import s from"./get-countries.js";import i from"./style.module.scss.js";var m=function(e,t){var a=n(e),r=n(e,t),c=a||r,s=(null==c?void 0:c.country)||t,i=o(s),m=u(e),v=e.trimStart().startsWith("+"),f=m.startsWith(i),d=e;if(!m||v||f)v||!f||e.includes("+")||(d="+".concat(m));else{var p=m.replace(/^0+/,"");d="+".concat(i).concat(p)}return{formatted:l(d,s),country:s}},v=r(a.forwardRef((function(r,l){var v=r.defaultCountry,f=r.disabled,d=void 0!==f&&f,p=r.placeholder,g=r.value,y=r.onChange,b=r.name,h=r.autoComplete,E=void 0===h?"tel":h,N=a.useState([]),S=N[0],C=N[1],F=a.useState(v||"TR"),j=F[0],R=F[1],w=a.useState(""),x=w[0],I=w[1];a.useEffect((function(){T();var e=function(e,t){if("KK"===e&&(e="TR"),c(e)||(e="US"),t){var a=n(t);if(null==a?void 0:a.country)return a.country}return e}(v||j||"TR",g);if(g){var t=m(g,e),a=t.formatted,r=t.country;I(a),R(r)}else K(e),R(e)}),[v]);var T=function(){return e(void 0,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return[4,s()];case 1:return e=t.sent(),C(e),[2]}}))}))},k=function(e){var t=m(e.target.value,j),a=t.formatted,r=t.country;R(r),I(a),y(a?u(a):e.target.value)},K=function(e){var t=o(e);I("+".concat(t))};return a.createElement(a.Fragment,null,a.createElement("div",{className:i.SelectFlag},a.createElement("div",{className:i.FlagContainer},a.createElement("div",{className:i.Flag},a.createElement("img",{className:i.FlagImage,alt:j,src:"https://cdn.myikas.com/sf/assets/flags/3x2/".concat(j,".svg")}),a.createElement("div",{className:i.Arrow})),a.createElement("select",{className:i.Select,value:j,onInput:function(e){if(e.target.value){var t=e.target.value;R(t),K(t)}},disabled:d},S.map((function(e){return a.createElement("option",{key:e.value,value:e.value},e.label)}))))),a.createElement("input",{ref:l,id:b,name:b,type:"tel",autoComplete:E,className:i.Input,value:x,onChange:k,onBlur:function(e){var t=u(x);u(e.target.value)!==t&&k(e)},placeholder:p,disabled:d}))})));export{v as PhoneNumberInput};
@@ -1 +1 @@
1
- import*as e from"react";import{observer as t}from"mobx-react-lite";import{Button as o}from"../button/index.js";import"@ikas/storefront-config";import{useTranslation as i}from"../../../../utils/i18n.js";import c from"../svg/success-circle.js";import r from"./style.module.scss.js";var a=t((function(t){var a=t.vm,m=i().t;return e.createElement("div",{className:r.Container},e.createElement("div",{className:r.TitleContainer},e.createElement(c,{className:r.Icon}),e.createElement("div",{className:r.CompletedTitle},m("checkout-page:quickRegistration.completedTitle"))),e.createElement("div",{className:r.SubTitle},m("checkout-page:quickRegistration.completedSubtitle")),e.createElement(o,{text:m("checkout-page:actions.login"),onClick:a.onGoToLoginClick,style:{width:"100%",marginTop:32}}))}));export{a as QuickRegistrationCompleted};
1
+ import*as e from"react";import{observer as t}from"mobx-react-lite";import{Button as o}from"../button/index.js";import"@ikas/storefront-config";import{useTranslation as i}from"../../../../utils/i18n.js";import r from"../svg/success-circle.js";import c from"./style.module.scss.js";var a=t((function(t){var a=t.vm,m=i().t;return e.createElement("div",{className:c.Container},e.createElement("div",{className:c.TitleContainer},e.createElement(r,{className:c.Icon}),e.createElement("div",{className:c.CompletedTitle},m("checkout-page:quickRegistration.completedTitle"))),e.createElement("div",{className:c.SubTitle},m("checkout-page:quickRegistration.completedSubtitle")),e.createElement(o,{href:a.getGoToLoginHref(),text:m("checkout-page:actions.login"),style:{width:"100%",marginTop:32}}))}));export{a as QuickRegistrationCompleted};
@@ -1 +1 @@
1
- import*as e from"react";import{observer as t}from"mobx-react-lite";import{FormItem as r}from"../form-item/index.js";import{FormItemType as o,FormItemInputType as a}from"../form-item/model.js";import{Button as i}from"../button/index.js";import"@ikas/storefront-config";import{useTranslation as s}from"../../../../utils/i18n.js";import{QuickRegistrationCompleted as m}from"./completed.js";import{QuickRegistrationViewModel as c}from"./model.js";import n from"./style.module.scss.js";var l=t((function(t){var l=t.vm,u=s().t,p=e.useMemo((function(){return new c(l,u)}),[]);return l.checkout.customer?p.isRegisteredCustomer?e.createElement(m,{vm:l}):e.createElement("div",{className:n.Container},e.createElement("div",{className:n.Title},u("checkout-page:quickRegistration.title")),e.createElement("div",{className:n.SubTitle},u("checkout-page:quickRegistration.subtitle")),e.createElement("div",{className:n.EmailContainer},e.createElement("div",{className:n.Label},u("checkout-page:quickRegistration.accountEmail"),":"),e.createElement("div",{className:n.Email},l.checkout.customer.email)),e.createElement(r,{type:o.TEXT,inputType:a.PASSWORD,label:u("checkout-page:password"),value:p.password,onChange:p.onPasswordChange,hasError:!!p.passwordErrorMessage,errorText:p.passwordErrorMessage}),e.createElement(i,{style:{width:"100%",marginTop:16},text:u("checkout-page:actions.signup"),isLoading:p.isLoading,onClick:p.onSubmit})):null}));export{l as QuickRegistration};
1
+ import*as e from"react";import{observer as t}from"mobx-react-lite";import{FormItem as r}from"../form-item/index.js";import{FormItemType as o,FormItemInputType as a}from"../form-item/model.js";import{Button as i}from"../button/index.js";import"@ikas/storefront-config";import{useTranslation as s}from"../../../../utils/i18n.js";import{QuickRegistrationCompleted as m}from"./completed.js";import{QuickRegistrationViewModel as c}from"./model.js";import n from"./style.module.scss.js";var l=t((function(t){var l=t.vm,u=s().t,p=e.useMemo((function(){return new c(l,u)}),[]);return l.checkout.customer?p.isRegisteredCustomer?e.createElement(m,{vm:l}):e.createElement("div",{className:n.Container},e.createElement("div",{className:n.Title},u("checkout-page:quickRegistration.title")),e.createElement("div",{className:n.SubTitle},u("checkout-page:quickRegistration.subtitle")),e.createElement("div",{className:n.EmailContainer},e.createElement("div",{className:n.Label},u("checkout-page:quickRegistration.accountEmail"),":"),e.createElement("div",{className:n.Email},l.checkout.customer.email)),e.createElement(r,{name:"password",type:o.TEXT,inputType:a.PASSWORD,label:u("checkout-page:password"),value:p.password,onChange:p.onPasswordChange,hasError:!!p.passwordErrorMessage,errorText:p.passwordErrorMessage}),e.createElement(i,{style:{width:"100%",marginTop:16},text:u("checkout-page:actions.signup"),isLoading:p.isLoading,onClick:p.onSubmit})):null}));export{l as QuickRegistration};
@@ -1 +1 @@
1
- import{__awaiter as e,__generator as t}from'./../../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as o,observable as i}from"mobx";import"../../../../models/data/blog/category/index.js";import"../../../../models/data/blog/content/index.js";import"../../../../models/data/blog/meta-data/index.js";import"../../../../models/data/blog/tag/index.js";import"../../../../models/data/blog/index.js";import"../../../../models/data/brand/index.js";import"@ikas/storefront-models";import"../../../../models/data/campaign-offer/index.js";import"../../../../models/data/cart/campaign-offer/index.js";import"../../../../models/data/cart/index.js";import"../../../../models/data/category/path-item/index.js";import"../../../../models/data/category/index.js";import"../../../../models/data/checkout/index.js";import"../../../../models/data/checkout-settings/index.js";import"../../../../models/data/city/index.js";import"../../../../models/data/country/index.js";import"../../../../models/data/customer/address/region/index.js";import"../../../../models/data/customer/address/index.js";import"../../../../models/data/customer/address/ikas-localized-customer-address.js";import"../../../../models/data/customer/attribute/index.js";import"../../../../models/data/customer/review/summary/index.js";import"../../../../models/data/customer/review/index.js";import"../../../../models/data/customer/index.js";import"../../../../models/data/customer-form-data-input/index.js";import"../../../../models/data/district/index.js";import"../../../../models/data/favorite-product/index.js";import"../../../../models/data/filter-category/index.js";import"../../../../models/data/html-meta-data/index.js";import"../../../../models/data/image/index.js";import"../../../../models/data/order/address/region/index.js";import"../../../../models/data/order/address/index.js";import"../../../../models/data/order/line-item/option/value/index.js";import"../../../../models/data/order/line-item/variant/value/index.js";import"../../../../models/data/order/line-item/variant/index.js";import"../../../../models/data/order/line-item/index.js";import"../../../../models/data/order/order-transaction-with-prices/index.js";import"../../../../models/data/order/package/index.js";import"../../../../models/data/order/transaction/index.js";import"../../../../models/data/order/index.js";import"../../../../models/data/payment-gateway/index.js";import"../../../../models/data/product/attribute-value/index.js";import"../../../../models/data/product/filter/index.js";import"../../../../models/data/product/campaign-offer/index.js";import"../../../../models/data/product/option-set/option/index.js";import"../../../../models/data/product/option-set/index.js";import"../../../../models/data/product/stock-location/index.js";import"../../../../models/data/product/variant/price/index.js";import"../../../../models/data/product/variant/index.js";import"../../../../models/data/variant-type/index.js";import"../../../../models/data/product/index.js";import"../../../../models/data/raffle/index.js";import"../../../../models/data/shipping-zone/state/city/district/region/index.js";import"../../../../models/data/state/index.js";import"../../../../models/data/storefront-popup/storefront-popup-display-filter/index.js";import"../../../../models/data/storefront-popup/storefront-popup-display-settings/index.js";import"../../../../models/data/storefront-popup/storefront-popup-page-filter/index.js";import"../../../../models/data/storefront-popup/index.js";import"../../../../models/data/theme-json/index.js";import"../../../../models/data/theme-json/component/index.js";import"../../../../models/data/theme-json/custom-data/index.js";import"../../../../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";import"../../../../models/ui/blog-list/index.js";import"../../../../models/ui/blog-category-list/index.js";import"../../../../models/ui/brand-list/index.js";import"../../../../models/ui/category-list/index.js";import"../../../../models/ui/product-list/index.js";import"../../../../models/ui/product-attribute-detail/index.js";import"../../../../models/ui/product-attribute-list/index.js";import"../../../../models/ui/customer-review-list/index.js";import"../../../../models/ui/customer-review-summary-list/index.js";import{Validator as r}from"../../../../models/ui/validator/index.js";import{RequiredRule as s,MinRule as d}from"../../../../models/ui/validator/rules/index.js";import"../../../../models/ui/validator/form/login.js";import"../../../../models/ui/validator/form/address.js";import"../../../../models/ui/validator/form/ikas-address.js";import"../../../../models/ui/validator/form/register.js";import"../../../../models/ui/validator/form/contact-form.js";import"../../../../models/ui/validator/form/forgot-password.js";import"../../../../models/ui/validator/form/recover-password.js";import"../../../../models/ui/validator/form/account-info.js";import"../../../../models/ui/validator/form/raffle-form.js";import"../../../../models/ui/validator/form/customer-review.js";import"../../../../models/ui/raffle-list/index.js";var a=function(){function a(a,m){var n=this;this.model={password:""},this._isLoading=!1,this._isRegisteredCustomer=!1,this.onPasswordChange=function(e){n.model.password=e},this.validateAll=function(){return n.validator.validateAll()},this.onSubmit=function(){return e(n,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return[4,this.validateAll()];case 1:return t.sent()?[3,3]:(this._isLoading=!0,[4,this.vm.registerCustomer(this.password)]);case 2:(null==(e=t.sent())?void 0:e.isSuccess)&&(this._isRegisteredCustomer=!0),this._isLoading=!1,t.label=3;case 3:return[2]}}))}))},o(this,{model:i}),this.vm=a,this.t=m,this.validator=new r(this.model,[new s({fieldKey:"password",valuePath:"password",message:m("checkout-page:passwordRequiredError")}),new d({fieldKey:"password",valuePath:"password",minValue:6,message:m("checkout-page:passwordMinError",{value:6})})])}return Object.defineProperty(a.prototype,"password",{get:function(){return this.model.password},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"isLoading",{get:function(){return this._isLoading},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"isRegisteredCustomer",{get:function(){return this._isRegisteredCustomer},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"hasError",{get:function(){return this.validator.hasError},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"passwordErrorMessage",{get:function(){return this.validator.results.password.errorMessage},enumerable:!1,configurable:!0}),a}();export{a as QuickRegistrationViewModel};
1
+ import{__awaiter as e,__generator as t}from'./../../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as o,observable as i}from"mobx";import"../../../../models/data/blog/category/index.js";import"../../../../models/data/blog/content/index.js";import"../../../../models/data/blog/meta-data/index.js";import"../../../../models/data/blog/tag/index.js";import"../../../../models/data/blog/index.js";import"../../../../models/data/brand/index.js";import"@ikas/storefront-models";import"../../../../models/data/campaign-offer/index.js";import"../../../../models/data/cart/campaign-offer/index.js";import"../../../../models/data/cart/index.js";import"../../../../models/data/category/path-item/index.js";import"../../../../models/data/category/index.js";import"../../../../models/data/checkout/index.js";import"../../../../models/data/checkout-settings/index.js";import"../../../../models/data/city/index.js";import"../../../../models/data/country/index.js";import"../../../../models/data/customer/address/region/index.js";import"../../../../models/data/customer/address/index.js";import"../../../../models/data/customer/address/ikas-localized-customer-address.js";import"../../../../models/data/customer/attribute/index.js";import"../../../../models/data/customer/review/summary/index.js";import"../../../../models/data/customer/review/index.js";import"../../../../models/data/customer/index.js";import"../../../../models/data/customer-form-data-input/index.js";import"../../../../models/data/district/index.js";import"../../../../models/data/favorite-product/index.js";import"../../../../models/data/filter-category/index.js";import"../../../../models/data/html-meta-data/index.js";import"../../../../models/data/image/index.js";import"../../../../models/data/order/address/region/index.js";import"../../../../models/data/order/address/index.js";import"../../../../models/data/order/line-item/option/value/index.js";import"../../../../models/data/order/line-item/variant/value/index.js";import"../../../../models/data/order/line-item/variant/index.js";import"../../../../models/data/order/line-item/index.js";import"../../../../models/data/order/order-transaction-with-prices/index.js";import"../../../../models/data/order/package/index.js";import"../../../../models/data/order/transaction/index.js";import"../../../../models/data/order/index.js";import"../../../../models/data/payment-gateway/index.js";import"../../../../models/data/product/attribute-value/index.js";import"../../../../models/data/product/filter/index.js";import"../../../../models/data/product/campaign-offer/index.js";import"../../../../models/data/product/option-set/option/index.js";import"../../../../models/data/product/option-set/index.js";import"../../../../models/data/product/stock-location/index.js";import"../../../../models/data/product/variant/price/index.js";import"../../../../models/data/product/variant/index.js";import"../../../../models/data/variant-type/index.js";import"../../../../models/data/product/index.js";import"../../../../models/data/raffle/index.js";import"../../../../models/data/shipping-zone/state/city/district/region/index.js";import"../../../../models/data/state/index.js";import"../../../../models/data/storefront-popup/storefront-popup-display-settings/index.js";import"../../../../models/data/storefront-popup/storefront-popup-page-filter/index.js";import"../../../../models/data/storefront-popup/index.js";import"../../../../models/data/theme-json/index.js";import"../../../../models/data/theme-json/component/index.js";import"../../../../models/data/theme-json/custom-data/index.js";import"../../../../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";import"../../../../models/ui/blog-list/index.js";import"../../../../models/ui/blog-category-list/index.js";import"../../../../models/ui/brand-list/index.js";import"../../../../models/ui/category-list/index.js";import"../../../../models/ui/product-list/index.js";import"../../../../models/ui/product-attribute-detail/index.js";import"../../../../models/ui/product-attribute-list/index.js";import"../../../../models/ui/customer-review-list/index.js";import"../../../../models/ui/customer-review-summary-list/index.js";import{Validator as r}from"../../../../models/ui/validator/index.js";import{RequiredRule as s,MinRule as d}from"../../../../models/ui/validator/rules/index.js";import"../../../../models/ui/validator/form/login.js";import"../../../../models/ui/validator/form/address.js";import"../../../../models/ui/validator/form/ikas-address.js";import"../../../../models/ui/validator/form/register.js";import"../../../../models/ui/validator/form/contact-form.js";import"../../../../models/ui/validator/form/forgot-password.js";import"../../../../models/ui/validator/form/recover-password.js";import"../../../../models/ui/validator/form/account-info.js";import"../../../../models/ui/validator/form/raffle-form.js";import"../../../../models/ui/validator/form/customer-review.js";import"../../../../models/ui/raffle-list/index.js";var a=function(){function a(a,m){var n=this;this.model={password:""},this._isLoading=!1,this._isRegisteredCustomer=!1,this.onPasswordChange=function(e){n.model.password=e},this.validateAll=function(){return n.validator.validateAll()},this.onSubmit=function(){return e(n,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return[4,this.validateAll()];case 1:return t.sent()?[3,3]:(this._isLoading=!0,[4,this.vm.registerCustomer(this.password)]);case 2:(null==(e=t.sent())?void 0:e.isSuccess)&&(this._isRegisteredCustomer=!0),this._isLoading=!1,t.label=3;case 3:return[2]}}))}))},o(this,{model:i}),this.vm=a,this.t=m,this.validator=new r(this.model,[new s({fieldKey:"password",valuePath:"password",message:m("checkout-page:passwordRequiredError")}),new d({fieldKey:"password",valuePath:"password",minValue:6,message:m("checkout-page:passwordMinError",{value:6})})])}return Object.defineProperty(a.prototype,"password",{get:function(){return this.model.password},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"isLoading",{get:function(){return this._isLoading},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"isRegisteredCustomer",{get:function(){return this._isRegisteredCustomer},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"hasError",{get:function(){return this.validator.hasError},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"passwordErrorMessage",{get:function(){return this.validator.results.password.errorMessage},enumerable:!1,configurable:!0}),a}();export{a as QuickRegistrationViewModel};
@@ -0,0 +1,13 @@
1
+ import * as React from "react";
2
+ import CheckoutViewModel from "../../model";
3
+ declare type Props = {
4
+ vm: CheckoutViewModel;
5
+ };
6
+ /**
7
+ * Card inputs rendered inside a cross-origin iframe. Scripts on the
8
+ * storefront page (theme, merchant scripts, tag managers) cannot read what
9
+ * is typed here; the checkout only receives validity, BIN and brand, and the
10
+ * frame sends the sale itself. The frame also runs the MasterPass SDK.
11
+ */
12
+ export declare const SecureCardForm: React.FC<Props>;
13
+ export {};
@@ -0,0 +1 @@
1
+ import*as e from"react";import{observer as r}from"mobx-react-lite";import{createTranslationInputData as t,useTranslation as a}from"../../../../utils/i18n.js";import{IkasStorefrontConfig as o}from"@ikas/storefront-config";import{SECURE_CARD_THEME_KEYS as n}from"./protocol.js";import c from"./style.module.scss.js";var s=["VISA","MASTER_CARD","AMERICAN_EXPRESS","TROY"],l=r((function(r){var n,l=r.vm,u=a().t,d=l.secureCard,f=e.useRef(null),E=e.useState((function(){return d.frameSrc}))[0],p=e.useMemo((function(){return{cardNumber:u("checkout-page:cardNumber"),cardNumberError:u("checkout-page:cardNumberError"),cardHolderName:u("checkout-page:cardHolderName"),cardHolderNameError:u("checkout-page:cardHolderError"),expirationDate:u("checkout-page:cardExpiry"),expirationDateError:u("checkout-page:cardExpiryError"),cvv:u("checkout-page:cardCVC"),cvvError:u("checkout-page:cardCVCError"),cvvTooltip:u("checkout-page:cardCVCTooltip")}}),[u]),v=null===(n=l.installmentInfo)||void 0===n?void 0:n.cardAssociation,h=v&&s.includes(v)?v:null,k=e.useMemo((function(){var e,r,a=null===(r=null===(e=o.getTranslations()["checkout-page"])||void 0===e?void 0:e.masterPass)||void 0===r?void 0:r.creditCardForm;return t(null==a?void 0:a.checkboxLabel).map((function(e){return"{{ link }}"===e.value?{text:(null==a?void 0:a.checkboxLabelLink)||"MasterPass",isLink:!0}:{text:e.isVariable?"Masterpass":e.value,isLink:!1}}))}),[]),b=l.isPaymentGatewayHasMasterPass?l.masterPassSavePhoneNumber:null,g=e.useMemo((function(){return null!==b?{labelParts:k,phoneNumber:b}:null}),[k,b]);e.useEffect((function(){if(f.current)return d.connect(f.current,{theme:m(),labels:p,showErrors:l.isErrorsVisible,masterPassEnabled:l.hasMasterPassGateway,cardBrand:h,masterPass:g})}),[]),e.useEffect((function(){d.update({masterPass:g})}),[g]),e.useEffect((function(){d.update({labels:p})}),[p]),e.useEffect((function(){d.update({showErrors:l.isErrorsVisible})}),[l.isErrorsVisible]),e.useEffect((function(){d.update({cardBrand:h})}),[h]);var N=d.isReady;return e.createElement("div",{className:c.SecureCardForm,"aria-busy":!N},e.createElement("iframe",{ref:f,src:E,title:u("checkout-page:cardNumber"),scrolling:"no",referrerPolicy:"no-referrer",className:[c.Frame,N?"":c.FrameHidden].join(" "),style:{height:d.height}}),e.createElement(i,{isHidden:N}))})),i=function(r){var t=r.isHidden;return e.createElement("div",{className:[c.Skeleton,t?c.SkeletonHidden:""].join(" "),"aria-hidden":"true"},e.createElement("div",{className:c.SkeletonRow},e.createElement(u,null)),e.createElement("div",{className:c.SkeletonRow},e.createElement(u,null)),e.createElement("div",{className:c.SkeletonGrid},e.createElement(u,null),e.createElement(u,null)))},u=function(){return e.createElement("div",{className:c.SkeletonInput},e.createElement("div",{className:c.SkeletonLabel}))};function m(){var e=getComputedStyle(document.documentElement),r=getComputedStyle(document.body),t={fontFamily:r.fontFamily,fontSize:r.fontSize};return n.forEach((function(r){var a=e.getPropertyValue(r).trim();a&&(t[r]=a)})),t}export{l as SecureCardForm};
@@ -0,0 +1,33 @@
1
+ import type { MFS, MFS_CB_TYPE } from "../../modelMasterPass";
2
+ import SecureCardViewModel from "./model";
3
+ /** Response codes produced by the card frame itself rather than by MasterPass. */
4
+ export declare const SECURE_MASTERPASS_ERROR_PREFIX = "IKAS_SECURE_";
5
+ /**
6
+ * Drop-in replacement for `window.MFS` used by MasterPassModel when secure
7
+ * card fields are on. Every call is forwarded to the card iframe, where the
8
+ * real SDK runs, so the SDK's in-memory state (the OTP token) and the card
9
+ * data stay on the secure origin.
10
+ */
11
+ export default class MasterPassBridgeViewModel implements MFS {
12
+ private secureCard;
13
+ private clientId;
14
+ private pending;
15
+ constructor(secureCard: SecureCardViewModel);
16
+ /** Clears the card and the "save card to MasterPass" consent in the frame. */
17
+ resetFrame: () => void;
18
+ setClientId: (clientId: string) => void;
19
+ /** The API address is fixed inside the frame. */
20
+ setAddress: (_address: string) => void;
21
+ /** The OTP token stays inside the frame; resendOtp uses it there. */
22
+ getLastToken: () => string;
23
+ checkMasterPass: (formData: FormData, cb: MFS_CB_TYPE) => void;
24
+ register: (formData: FormData, cb: MFS_CB_TYPE) => void;
25
+ linkCardToClient: (formData: FormData, cb: MFS_CB_TYPE) => void;
26
+ validateTransaction: (formData: FormData, cb: MFS_CB_TYPE) => void;
27
+ deleteCard: (formData: FormData, cb: MFS_CB_TYPE) => void;
28
+ listCards: (phoneNumber: string, token: string, cb: MFS_CB_TYPE) => void;
29
+ resendOtp: (_token: string, language: string, cb: MFS_CB_TYPE) => void;
30
+ private call;
31
+ private handleMessage;
32
+ private fail;
33
+ }
@@ -0,0 +1 @@
1
+ import{__assign as t}from'./../../../../ext/tslib/tslib.es6.js';import e from"./model.js";var s=["rtaPan","expiryDate","cvc","cvv"],n="IKAS_SECURE_",a=function(){function n(e){var s=this;this.clientId="",this.pending=new Map,this.resetFrame=function(){s.secureCard.reset()},this.setClientId=function(t){s.clientId=t},this.setAddress=function(t){},this.getLastToken=function(){return""},this.checkMasterPass=function(t,e){return s.call("checkMasterPass",t,e)},this.register=function(t,e){return s.call("register",t,e)},this.linkCardToClient=function(t,e){return s.call("linkCardToClient",t,e)},this.validateTransaction=function(t,e){return s.call("validateTransaction",t,e)},this.deleteCard=function(t,e){return s.call("deleteCard",t,e)},this.listCards=function(t,e,n){return s.call("listCards",{msisdn:t,token:e},n)},this.resendOtp=function(t,e,n){return s.call("resendOtp",{sendSmsLanguage:e},n)},this.handleMessage=function(e){var n=s.pending.get(e.requestId);if(n)if(clearTimeout(n.timer),s.pending.delete(e.requestId),e.ok){var a=e.response;n.callback(e.status,t(t({},a),{transactionId:a.transactionId||"",accountStatus:a.accountStatus,url3D:a.url3D||"",cards:a.cards||[]}))}else s.fail(n.callback,e.errorCode)},this.secureCard=e,e.setMasterPassListener(this.handleMessage)}return n.prototype.call=function(t,n,a){var r=this,i={},c=function(t,e){"string"!=typeof t||s.includes(e)||(i[e]=t)};n instanceof FormData?n.forEach(c):Object.keys(n).forEach((function(t){return c(n[t],t)}));var l=e.createId(),o=setTimeout((function(){r.pending.delete(l),r.fail(a,"TIMEOUT")}),6e4);this.pending.set(l,{callback:a,timer:o}),this.secureCard.postMasterPassCall({type:"masterPassCall",requestId:l,method:t,clientId:this.clientId,params:i})||(clearTimeout(o),this.pending.delete(l),this.fail(a,"SDK_UNAVAILABLE"))},n.prototype.fail=function(t,e){t(0,{responseCode:"IKAS_SECURE_"+e,transactionId:"",accountStatus:void 0,url3D:"",cards:[]})},n}();export{n as SECURE_MASTERPASS_ERROR_PREFIX,a as default};
@@ -0,0 +1,67 @@
1
+ import { MasterPassFrameMessage, MasterPassParentMessage, SecureCardBrand, SecureCardFieldsState, SecureCardGraphQLError, SecureCardLabels, SecureCardMasterPassConfig, SecureCardSaleErrorCode, SecureCardSaleInput, SecureCardSaleResponse, SecureCardTheme } from "./protocol";
2
+ export declare type SecureCardSaleResult = {
3
+ ok: true;
4
+ data: SecureCardSaleResponse | null;
5
+ errors: SecureCardGraphQLError[];
6
+ } | {
7
+ ok: false;
8
+ errorCode: SecureCardSaleErrorCode;
9
+ };
10
+ declare type FrameConfig = {
11
+ theme: SecureCardTheme;
12
+ labels: SecureCardLabels;
13
+ showErrors: boolean;
14
+ masterPassEnabled: boolean;
15
+ cardBrand: SecureCardBrand | null;
16
+ masterPass: SecureCardMasterPassConfig | null;
17
+ };
18
+ declare type Callbacks = {
19
+ onBinChange: (bin: string | null) => void;
20
+ onMasterPassConsentChange: (checked: boolean) => void;
21
+ };
22
+ /**
23
+ * Parent-side counterpart of the secure card fields iframe. Holds only what
24
+ * the iframe is allowed to share (validity, BIN, brand, transaction result);
25
+ * raw card data never reaches this class.
26
+ */
27
+ export default class SecureCardViewModel {
28
+ fields: SecureCardFieldsState | null;
29
+ isValid: boolean;
30
+ isReady: boolean;
31
+ bin: string | null;
32
+ brand: SecureCardBrand;
33
+ height: number;
34
+ /** Shopper ticked "save card to MasterPass" inside the card frame. */
35
+ masterPassConsent: boolean;
36
+ channelId: string;
37
+ private frameWindow;
38
+ private config;
39
+ private pending;
40
+ private callbacks;
41
+ private readyListeners;
42
+ private masterPassListener;
43
+ constructor(callbacks: Callbacks);
44
+ /** Base URL of the secure card fields app, e.g. https://secure-card.ikas.com */
45
+ static get baseUrl(): string | undefined;
46
+ static get isEnabled(): boolean;
47
+ static createId(): string;
48
+ get frameOrigin(): string;
49
+ get frameSrc(): string;
50
+ connect: (iframe: HTMLIFrameElement, config: FrameConfig) => () => void;
51
+ update: (partial: Partial<FrameConfig>) => void;
52
+ reset: () => void;
53
+ /** Called every time the frame (re)loads and is ready for messages. */
54
+ onReady: (listener: () => void) => void;
55
+ setMasterPassListener: (listener: (message: MasterPassFrameMessage) => void) => void;
56
+ /** Returns false when the frame is not ready to take the call. */
57
+ postMasterPassCall: (message: MasterPassParentMessage) => boolean;
58
+ /**
59
+ * Sends the sale from the frame, which adds the card the shopper typed.
60
+ * Uses the same API headers and customer token as the page's own requests.
61
+ */
62
+ submitSale: (input: SecureCardSaleInput) => Promise<SecureCardSaleResult>;
63
+ private post;
64
+ private setBin;
65
+ private onMessage;
66
+ }
67
+ export {};
@@ -0,0 +1 @@
1
+ import{__assign as e}from'./../../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as n}from"mobx";import'./../../../../ext/@ikas/fe-api-client/build/utils/api.js';import'./../../../../ext/axios/index.js';import t from'./../../../../ext/@ikas/fe-api-client/build/config/index.js';import'./../../../../ext/@ikas/fe-api-client/build/ext/lodash/_defineProperty.js';import'./../../../../ext/@ikas/fe-api-client/build/ext/lodash/_baseGetTag.js';import'./../../../../ext/@ikas/fe-api-client/build/ext/lodash/_stringToPath.js';import'./../../../../ext/@ikas/fe-api-client/build/ext/lodash/_baseToString.js';import{createEnvelope as i,SECURE_CARD_API_HEADER_NAMES as s,isEnvelope as r}from"./protocol.js";var a=function(){function a(i){var o=this;this.fields=null,this.isValid=!1,this.isReady=!1,this.bin=null,this.brand="UNKNOWN",this.height=216,this.masterPassConsent=!1,this.channelId=a.createId(),this.frameWindow=null,this.config=null,this.pending=new Map,this.readyListeners=[],this.masterPassListener=null,this.connect=function(e,n){return o.frameWindow=e.contentWindow,o.config=n,window.addEventListener("message",o.onMessage),function(){window.removeEventListener("message",o.onMessage),o.frameWindow=null,o.isReady=!1,o.pending.forEach((function(e){clearTimeout(e.timer),e.resolve({ok:!1,errorCode:"TIMEOUT"})})),o.pending.clear()}},this.update=function(n){o.config&&(o.config=e(e({},o.config),n),o.isReady&&o.post(e({type:"update"},n)))},this.reset=function(){o.fields=null,o.isValid=!1,o.setBin(null),o.brand="UNKNOWN",o.isReady&&o.post({type:"reset"})},this.onReady=function(e){o.readyListeners.push(e)},this.setMasterPassListener=function(e){o.masterPassListener=e},this.postMasterPassCall=function(e){return!!o.isReady&&(o.post(e),!0)},this.submitSale=function(e){if(!o.isReady)return Promise.resolve({ok:!1,errorCode:"NETWORK_ERROR"});var n={};s.forEach((function(e){var i,s=null===(i=t.HEADERS)||void 0===i?void 0:i[e];"string"==typeof s&&s&&(n[e]=s)}));var i={input:JSON.parse(JSON.stringify(e)),headers:n,token:t.TOKEN||null},r=a.createId();return new Promise((function(e){var n=setTimeout((function(){o.pending.delete(r),e({ok:!1,errorCode:"TIMEOUT"})}),12e4);o.pending.set(r,{resolve:e,timer:n}),o.post({type:"submitSale",requestId:r,request:i})}))},this.onMessage=function(n){var t;if(n.origin===o.frameOrigin&&o.frameWindow&&n.source===o.frameWindow&&r(n.data,o.channelId)){var i=n.data.payload;switch(i.type){case"ready":o.isReady=!0,o.config&&o.post(e({type:"init"},o.config)),o.readyListeners.forEach((function(e){return e()}));break;case"change":o.fields=i.fields,o.isValid=!!i.isValid,o.brand=i.brand,o.setBin("string"==typeof i.bin&&/^\d{8}$/.test(i.bin)?i.bin:null);break;case"masterPassConsent":o.masterPassConsent=!!i.checked,o.callbacks.onMasterPassConsentChange(o.masterPassConsent);break;case"resize":"number"==typeof i.height&&i.height>0&&(o.height=Math.min(Math.ceil(i.height),1e3));break;case"saleResult":var s=o.pending.get(i.requestId);if(!s)return;clearTimeout(s.timer),o.pending.delete(i.requestId),s.resolve(i.ok?{ok:!0,data:i.data,errors:Array.isArray(i.errors)?i.errors:[]}:{ok:!1,errorCode:i.errorCode});break;case"masterPassResult":null===(t=o.masterPassListener)||void 0===t||t.call(o,i)}}},this.callbacks=i,n(this,{frameWindow:!1,config:!1,pending:!1,callbacks:!1,readyListeners:!1,masterPassListener:!1})}return Object.defineProperty(a,"baseUrl",{get:function(){return process.env.NEXT_PUBLIC_SECURE_CARD_FIELDS_URL||void 0},enumerable:!1,configurable:!0}),Object.defineProperty(a,"isEnabled",{get:function(){return!!a.baseUrl},enumerable:!1,configurable:!0}),a.createId=function(){var e=new Uint8Array(16);return globalThis.crypto.getRandomValues(e),Array.from(e,(function(e){return e.toString(16).padStart(2,"0")})).join("")},Object.defineProperty(a.prototype,"frameOrigin",{get:function(){return new URL(a.baseUrl).origin},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"frameSrc",{get:function(){var e=new URL("frame",function(e){return e.endsWith("/")?e:e+"/"}(a.baseUrl));return e.searchParams.set("parentOrigin",window.location.origin),e.searchParams.set("channel",this.channelId),e.toString()},enumerable:!1,configurable:!0}),a.prototype.post=function(e){var n;null===(n=this.frameWindow)||void 0===n||n.postMessage(i(this.channelId,e),this.frameOrigin)},a.prototype.setBin=function(e){e!==this.bin&&(this.bin=e,this.callbacks.onBinChange(e))},a}();export{a as default};
@@ -0,0 +1,220 @@
1
+ /**
2
+ * postMessage contract between the checkout page (parent) and the
3
+ * secure card fields iframe served from its own origin
4
+ * (apps/secure-card-fields).
5
+ *
6
+ * Raw card data (PAN, CVV, expiry, holder name) must NEVER appear in any
7
+ * message below. The only card-derived values allowed to cross the frame
8
+ * boundary are the BIN (first 8 digits, needed for installment lookup) and
9
+ * the detected brand. The frame adds the card to the sale request itself and
10
+ * only returns the API's transaction result.
11
+ *
12
+ * This file has no imports on purpose: it is bundled into both the
13
+ * storefront and the iframe app.
14
+ */
15
+ export declare const SECURE_CARD_PROTOCOL = "ikas-secure-card";
16
+ export declare const SECURE_CARD_PROTOCOL_VERSION = 1;
17
+ export declare type SecureCardFieldName = "cardNumber" | "cardHolderName" | "expirationDate" | "cvv";
18
+ export declare const SECURE_CARD_FIELD_NAMES: SecureCardFieldName[];
19
+ export declare type SecureCardFieldState = {
20
+ isEmpty: boolean;
21
+ isValid: boolean;
22
+ };
23
+ export declare type SecureCardFieldsState = Record<SecureCardFieldName, SecureCardFieldState>;
24
+ export declare type SecureCardBrand = "VISA" | "MASTER_CARD" | "AMERICAN_EXPRESS" | "TROY" | "UNKNOWN";
25
+ /**
26
+ * Only these CSS custom properties are accepted by the frame. Values are
27
+ * validated inside the frame as well, so a hostile parent cannot inject
28
+ * `url(...)` or other CSS that could exfiltrate input values.
29
+ */
30
+ export declare const SECURE_CARD_THEME_KEYS: readonly ["--checkout-primary-text-color", "--checkout-secondary-text-color", "--checkout-primary-bg-color", "--checkout-border-color", "--checkout-button-bg-color", "--checkout-error-color"];
31
+ export declare type SecureCardThemeKey = typeof SECURE_CARD_THEME_KEYS[number];
32
+ export declare type SecureCardTheme = Partial<Record<SecureCardThemeKey, string>> & {
33
+ fontFamily?: string;
34
+ fontSize?: string;
35
+ };
36
+ export declare type SecureCardLabels = {
37
+ cardNumber: string;
38
+ cardNumberError: string;
39
+ cardHolderName: string;
40
+ cardHolderNameError: string;
41
+ expirationDate: string;
42
+ expirationDateError: string;
43
+ cvv: string;
44
+ cvvError: string;
45
+ cvvTooltip: string;
46
+ };
47
+ /**
48
+ * "Save card to MasterPass" consent, rendered inside the card frame so that
49
+ * only a real click there can authorise handing the card to MasterPass.
50
+ * Parts flagged `isLink` are rendered as a link to the MasterPass terms,
51
+ * whose URL is fixed inside the frame.
52
+ */
53
+ export declare type SecureCardMasterPassConfig = {
54
+ labelParts: {
55
+ text: string;
56
+ isLink: boolean;
57
+ }[];
58
+ /** Phone number the card will be saved to, shown next to the checkbox. */
59
+ phoneNumber: string;
60
+ };
61
+ /**
62
+ * `createSaleTransactionWithCart` input as built by the checkout, minus the
63
+ * card. `paymentMethodDetail` may only carry `installmentCount` and
64
+ * `threeDSecure`; the frame adds the card fields.
65
+ */
66
+ export declare type SecureCardSaleInput = {
67
+ cartId: string;
68
+ paymentGatewayId?: string | null;
69
+ paymentMethodDetail: {
70
+ installmentCount: number;
71
+ threeDSecure: boolean;
72
+ };
73
+ masterPassDetail?: object | null;
74
+ metadata?: object | null;
75
+ milesSmiles?: object | null;
76
+ };
77
+ /**
78
+ * Storefront API request headers the frame forwards (see setAPIClientConfig).
79
+ * `x-checkout-origin` is not here: the frame sets it from the verified parent
80
+ * origin, and the page must not be able to supply it.
81
+ */
82
+ export declare const SECURE_CARD_API_HEADER_NAMES: readonly ["x-api-key", "x-sfid", "x-sfrid", "x-sid", "x-vid", "x-jid", "x-timezone", "x-coupon-code"];
83
+ export declare type SecureCardSaleRequest = {
84
+ input: SecureCardSaleInput;
85
+ headers: Partial<Record<typeof SECURE_CARD_API_HEADER_NAMES[number], string>>;
86
+ /** Customer token, sent as a Bearer token. */
87
+ token: string | null;
88
+ };
89
+ /** Mirrors the storefront API's TransactionResponse. */
90
+ export declare type SecureCardSaleResponse = {
91
+ error: {
92
+ code: string | null;
93
+ declineCode: string | null;
94
+ message: string | null;
95
+ } | null;
96
+ orderId: string | null;
97
+ orderNumber: string | null;
98
+ returnSlug: string | null;
99
+ sessionToken: string | null;
100
+ transactionId: string | null;
101
+ transactionStatus: string | null;
102
+ };
103
+ export declare type SecureCardGraphQLError = {
104
+ message: string;
105
+ extensions?: {
106
+ code?: string;
107
+ };
108
+ };
109
+ export declare type SecureCardSaleErrorCode = "INVALID_CARD" | "BAD_REQUEST" | "BUSY" | "NETWORK_ERROR" | "TIMEOUT";
110
+ export declare type SecureCardParentMessage = {
111
+ type: "init";
112
+ theme: SecureCardTheme;
113
+ labels: SecureCardLabels;
114
+ showErrors: boolean;
115
+ /** Loads the MasterPass SDK in the frame. */
116
+ masterPassEnabled: boolean;
117
+ } | {
118
+ type: "update";
119
+ theme?: SecureCardTheme;
120
+ labels?: SecureCardLabels;
121
+ showErrors?: boolean;
122
+ /** Brand resolved by the installment lookup, overrides local detection. */
123
+ cardBrand?: SecureCardBrand | null;
124
+ /** null hides the MasterPass consent checkbox. */
125
+ masterPass?: SecureCardMasterPassConfig | null;
126
+ } | {
127
+ type: "submitSale";
128
+ requestId: string;
129
+ request: SecureCardSaleRequest;
130
+ } | {
131
+ type: "reset";
132
+ };
133
+ export declare type SecureCardFrameMessage = {
134
+ type: "ready";
135
+ } | {
136
+ type: "change";
137
+ fields: SecureCardFieldsState;
138
+ isValid: boolean;
139
+ /** First 8 digits once at least 8 digits are entered, otherwise null. */
140
+ bin: string | null;
141
+ brand: SecureCardBrand;
142
+ } | {
143
+ type: "resize";
144
+ height: number;
145
+ } | {
146
+ type: "masterPassConsent";
147
+ checked: boolean;
148
+ } | {
149
+ type: "saleResult";
150
+ requestId: string;
151
+ ok: true;
152
+ data: SecureCardSaleResponse | null;
153
+ errors: SecureCardGraphQLError[];
154
+ } | {
155
+ type: "saleResult";
156
+ requestId: string;
157
+ ok: false;
158
+ errorCode: SecureCardSaleErrorCode;
159
+ };
160
+ /**
161
+ * MasterPass calls. The card frame also hosts the MasterPass SDK, and every
162
+ * MasterPass call goes through it because the SDK keeps per-flow state (e.g.
163
+ * the token OTP validation refers to) in memory. For `register` the frame
164
+ * adds the card from its own inputs; the parent never sends card fields.
165
+ */
166
+ export declare type MasterPassMethod = "checkMasterPass" | "register" | "linkCardToClient" | "validateTransaction" | "resendOtp" | "listCards" | "deleteCard";
167
+ /** Saved MasterPass card. `Value1` is masked by MasterPass (e.g. 557113******75). */
168
+ export declare type MasterPassCard = {
169
+ BankIca: string;
170
+ CardStatus: string;
171
+ EftCode: string;
172
+ IsMasterPassMember: string;
173
+ LoyaltyCode: string;
174
+ Name: string;
175
+ ProductName: string;
176
+ PromtCpin: string;
177
+ UniqueId: string;
178
+ Value1: string;
179
+ Value2: string;
180
+ };
181
+ export declare type MasterPassResponse = {
182
+ responseCode: string;
183
+ responseDescription?: string;
184
+ transactionId?: string;
185
+ accountStatus?: string;
186
+ url3D?: string;
187
+ cards?: MasterPassCard[];
188
+ };
189
+ export declare type MasterPassCallErrorCode = "SDK_UNAVAILABLE" | "BAD_REQUEST" | "CONSENT_REQUIRED" | "INVALID_CARD" | "SDK_ERROR";
190
+ export declare type MasterPassParentMessage = {
191
+ type: "masterPassCall";
192
+ requestId: string;
193
+ method: MasterPassMethod;
194
+ clientId: string;
195
+ /** Plain string params; card fields are rejected by the frame. */
196
+ params: Record<string, string>;
197
+ };
198
+ export declare type MasterPassFrameMessage = {
199
+ type: "masterPassResult";
200
+ requestId: string;
201
+ ok: true;
202
+ status: number;
203
+ response: MasterPassResponse;
204
+ } | {
205
+ type: "masterPassResult";
206
+ requestId: string;
207
+ ok: false;
208
+ errorCode: MasterPassCallErrorCode;
209
+ };
210
+ declare type AnyMessage = SecureCardParentMessage | SecureCardFrameMessage | MasterPassParentMessage | MasterPassFrameMessage;
211
+ export declare type SecureCardEnvelope<T extends AnyMessage> = {
212
+ protocol: typeof SECURE_CARD_PROTOCOL;
213
+ version: typeof SECURE_CARD_PROTOCOL_VERSION;
214
+ /** Distinguishes multiple frames on the same page. */
215
+ channelId: string;
216
+ payload: T;
217
+ };
218
+ export declare function createEnvelope<T extends AnyMessage>(channelId: string, payload: T): SecureCardEnvelope<T>;
219
+ export declare function isEnvelope(data: unknown, channelId: string): data is SecureCardEnvelope<any>;
220
+ export {};
@@ -0,0 +1 @@
1
+ var o="ikas-secure-card",r=1,c=["--checkout-primary-text-color","--checkout-secondary-text-color","--checkout-primary-bg-color","--checkout-border-color","--checkout-button-bg-color","--checkout-error-color"],e=["x-api-key","x-sfid","x-sfrid","x-sid","x-vid","x-jid","x-timezone","x-coupon-code"];function t(o,r){return{protocol:"ikas-secure-card",version:1,channelId:o,payload:r}}function a(o,r){if(!o||"object"!=typeof o)return!1;var c=o;return"ikas-secure-card"===c.protocol&&1===c.version&&c.channelId===r&&!!c.payload&&"string"==typeof c.payload.type}export{e as SECURE_CARD_API_HEADER_NAMES,o as SECURE_CARD_PROTOCOL,r as SECURE_CARD_PROTOCOL_VERSION,c as SECURE_CARD_THEME_KEYS,t as createEnvelope,a as isEnvelope};
@@ -0,0 +1 @@
1
+ import e from'./../../../../ext/style-inject/dist/style-inject.es.js';var n={SecureCardForm:"style-module_SecureCardForm__lph3n",Frame:"style-module_Frame__jiho4",FrameHidden:"style-module_FrameHidden__pMTxp",Skeleton:"style-module_Skeleton__WRJA7",SkeletonHidden:"style-module_SkeletonHidden__I-m6B",SkeletonRow:"style-module_SkeletonRow__F3ARa",SkeletonGrid:"style-module_SkeletonGrid__Fl34l",SkeletonInput:"style-module_SkeletonInput__HB0su",SkeletonLabel:"style-module_SkeletonLabel__TauRG",SecureCardSkeletonPulse:"style-module_SecureCardSkeletonPulse__fPW1j"};e(".style-module_SecureCardForm__lph3n {\n position: relative;\n}\n\n.style-module_Frame__jiho4 {\n display: block;\n width: calc(100% + 4px);\n margin: -2px;\n border: 0;\n opacity: 1;\n transition: opacity 0.15s;\n}\n.style-module_FrameHidden__pMTxp {\n opacity: 0;\n visibility: hidden;\n}\n\n.style-module_Skeleton__WRJA7 {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n pointer-events: none;\n opacity: 1;\n transition: opacity 0.15s;\n}\n.style-module_SkeletonHidden__I-m6B {\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.15s, visibility 0s 0.15s;\n}\n\n.style-module_SkeletonRow__F3ARa {\n padding-bottom: 16px;\n}\n\n.style-module_SkeletonGrid__Fl34l {\n display: grid;\n grid-gap: 16px;\n grid-template-columns: repeat(2, 1fr);\n}\n\n.style-module_SkeletonInput__HB0su {\n box-sizing: border-box;\n height: 56px;\n border: 1px solid var(--checkout-border-color);\n border-radius: 8px;\n background-color: var(--checkout-primary-bg-color);\n padding: 0 16px;\n display: flex;\n align-items: center;\n}\n\n.style-module_SkeletonLabel__TauRG {\n height: 10px;\n width: 40%;\n max-width: 160px;\n border-radius: 5px;\n background-color: var(--checkout-border-color);\n animation: style-module_SecureCardSkeletonPulse__fPW1j 1.2s ease-in-out infinite;\n}\n@media (prefers-reduced-motion: reduce) {\n .style-module_SkeletonLabel__TauRG {\n animation: none;\n }\n}\n\n@keyframes style-module_SecureCardSkeletonPulse__fPW1j {\n 0%, 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.4;\n }\n}");export{n as default};
@@ -6,6 +6,9 @@ declare type Props = {
6
6
  rightContent?: React.ReactElement;
7
7
  bottomContent?: React.ReactNode;
8
8
  bottomContentVisible?: boolean;
9
+ /** Keeps bottomContent mounted (hidden) while not shown, e.g. for iframes
10
+ * that must not reload. */
11
+ keepBottomContentMounted?: boolean;
9
12
  hasError?: boolean;
10
13
  errorText?: string;
11
14
  onClick?: () => void;
@@ -1 +1 @@
1
- import*as e from"react";import{observer as t}from"mobx-react-lite";import o from"./style.module.scss.js";import{Toggle as r}from"../toggle/index.js";var n=t((function(t){var n=t.label,a=t.description,l=t.isSelected,i=t.rightContent,m=t.bottomContent,s=t.bottomContentVisible,c=t.hasError,d=t.errorText,u=t.onClick,v=e.useMemo((function(){var e=[o.SelectBox];return l&&e.push(o.Selected),l&&c&&e.push(o.Error),e.join(" ")}),[l]),p=e.useMemo((function(){return e.createElement("div",{className:o.BottomContent},m)}),[m]);return e.createElement("div",{className:o.SelectBoxContainer},e.createElement("div",{className:v,onClick:u},e.createElement("div",{className:o.TopContent},e.createElement(r,{value:l,label:n,description:a,removePadding:!0}),!!i&&e.createElement("div",{className:o.RightContent},i)),!!m&&(l||s)&&p),!!d&&c&&l&&e.createElement("div",{className:o.SelectBoxError},d))}));export{n as default};
1
+ import*as e from"react";import{observer as t}from"mobx-react-lite";import o from"./style.module.scss.js";import{Toggle as n}from"../toggle/index.js";var r=t((function(t){var r=t.label,a=t.description,l=t.isSelected,m=t.rightContent,s=t.bottomContent,i=t.bottomContentVisible,c=t.keepBottomContentMounted,d=t.hasError,u=t.errorText,v=t.onClick,p=e.useMemo((function(){var e=[o.SelectBox];return l&&e.push(o.Selected),l&&d&&e.push(o.Error),e.join(" ")}),[l]),C=e.useMemo((function(){return e.createElement("div",{className:o.BottomContent},s)}),[s]);return e.createElement("div",{className:o.SelectBoxContainer},e.createElement("div",{className:p,onClick:v},e.createElement("div",{className:o.TopContent},e.createElement(n,{value:l,label:r,description:a,removePadding:!0}),!!m&&e.createElement("div",{className:o.RightContent},m)),!!s&&(c?e.createElement("div",{className:o.BottomContent,style:l||i?void 0:{display:"none"}},s):(l||i)&&C)),!!u&&d&&l&&e.createElement("div",{className:o.SelectBoxError},u))}));export{r as default};