pay-sdk-react 1.1.2 → 1.1.4

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 (242) hide show
  1. package/README.md +37 -19
  2. package/README.zh-CN.md +37 -19
  3. package/dist/css/index.css +703 -1
  4. package/dist/css/index.min.css +1 -0
  5. package/dist/es/Airwallex/airwallex-button.js +56 -36
  6. package/dist/es/Airwallex/airwallex-modal.js +41 -34
  7. package/dist/es/Airwallex/airwallex-popup.js +43 -38
  8. package/dist/es/Airwallex/airwallex.js +26 -28
  9. package/dist/es/Airwallex/index.js +1 -1
  10. package/dist/es/Airwallex/style/index.css +335 -1
  11. package/dist/es/Airwallex/style/index.min.css +1 -0
  12. package/dist/es/Alipay/alipay-button.js +39 -24
  13. package/dist/es/Alipay/alipay-modal.js +37 -31
  14. package/dist/es/Alipay/alipay.js +22 -15
  15. package/dist/es/Alipay/index.d.ts +4 -4
  16. package/dist/es/Alipay/index.js +5 -5
  17. package/dist/es/Alipay/style/index.css +18 -1
  18. package/dist/es/Alipay/style/index.min.css +1 -0
  19. package/dist/es/Button/button.js +62 -37
  20. package/dist/es/Button/index.d.ts +2 -2
  21. package/dist/es/Button/index.js +2 -2
  22. package/dist/es/Button/style/index.css +95 -1
  23. package/dist/es/Button/style/index.min.css +1 -0
  24. package/dist/es/FullScreenLoading/index.js +40 -40
  25. package/dist/es/FullScreenLoading/interface.d.ts +2 -2
  26. package/dist/es/FullScreenLoading/style/index.css +239 -1
  27. package/dist/es/FullScreenLoading/style/index.min.css +1 -0
  28. package/dist/es/MAlipay/index.js +1 -1
  29. package/dist/es/MAlipay/m-alipay-auto-submit.js +9 -11
  30. package/dist/es/MAlipay/m-alipay-button.js +71 -51
  31. package/dist/es/MAlipay/style/index.css +252 -1
  32. package/dist/es/MAlipay/style/index.min.css +1 -0
  33. package/dist/es/MWeChat/index.d.ts +2 -2
  34. package/dist/es/MWeChat/index.js +2 -2
  35. package/dist/es/MWeChat/m-wechat-button.js +70 -50
  36. package/dist/es/MWeChat/style/index.css +252 -1
  37. package/dist/es/MWeChat/style/index.min.css +1 -0
  38. package/dist/es/Mask/index.d.ts +2 -2
  39. package/dist/es/Mask/index.js +2 -2
  40. package/dist/es/Mask/mask.js +48 -45
  41. package/dist/es/Mask/style/index.css +11 -1
  42. package/dist/es/Mask/style/index.min.css +1 -0
  43. package/dist/es/PayButton/index.js +2 -2
  44. package/dist/es/PayButton/interface.d.ts +9 -9
  45. package/dist/es/PayButton/interface.js +1 -1
  46. package/dist/es/PayMask/index.d.ts +2 -2
  47. package/dist/es/PayMask/index.js +2 -2
  48. package/dist/es/PayMask/interface.d.ts +8 -2
  49. package/dist/es/PayMask/pay-mask.js +48 -40
  50. package/dist/es/PayMask/style/index.css +62 -1
  51. package/dist/es/PayMask/style/index.min.css +1 -0
  52. package/dist/es/Paypal/index.d.ts +2 -2
  53. package/dist/es/Paypal/index.js +2 -2
  54. package/dist/es/Paypal/paypal-button.js +55 -36
  55. package/dist/es/Paypal/style/index.css +207 -1
  56. package/dist/es/Paypal/style/index.min.css +1 -0
  57. package/dist/es/Payssion/index.d.ts +2 -2
  58. package/dist/es/Payssion/index.js +2 -2
  59. package/dist/es/Payssion/payssion-button.js +56 -37
  60. package/dist/es/Payssion/style/index.css +157 -1
  61. package/dist/es/Payssion/style/index.min.css +1 -0
  62. package/dist/es/Stripe/index.d.ts +5 -5
  63. package/dist/es/Stripe/index.js +6 -6
  64. package/dist/es/Stripe/stripe-button.js +47 -33
  65. package/dist/es/Stripe/stripe-modal.js +38 -32
  66. package/dist/es/Stripe/stripe-popup.js +42 -37
  67. package/dist/es/Stripe/stripe.js +15 -15
  68. package/dist/es/Stripe/style/index.css +365 -1
  69. package/dist/es/Stripe/style/index.min.css +1 -0
  70. package/dist/es/Wechat/index.d.ts +4 -4
  71. package/dist/es/Wechat/index.js +5 -5
  72. package/dist/es/Wechat/style/index.css +25 -1
  73. package/dist/es/Wechat/style/index.min.css +1 -0
  74. package/dist/es/Wechat/wechat-button.js +38 -23
  75. package/dist/es/Wechat/wechat-modal.js +37 -31
  76. package/dist/es/Wechat/wechat.js +16 -12
  77. package/dist/es/confirm-modal/index.js +42 -39
  78. package/dist/es/confirm-modal/interface.d.ts +8 -2
  79. package/dist/es/confirm-modal/style/index.css +95 -1
  80. package/dist/es/confirm-modal/style/index.min.css +1 -0
  81. package/dist/es/dot-loading/dot-loading.js +25 -23
  82. package/dist/es/dot-loading/index.d.ts +2 -2
  83. package/dist/es/dot-loading/index.js +2 -2
  84. package/dist/es/dot-loading/style/index.css +3 -1
  85. package/dist/es/dot-loading/style/index.min.css +1 -0
  86. package/dist/es/hooks/use-initialized.js +2 -2
  87. package/dist/es/hooks/use-inner-visible.js +8 -4
  88. package/dist/es/hooks/use-lock-scroll.d.ts +2 -2
  89. package/dist/es/hooks/use-lock-scroll.js +30 -34
  90. package/dist/es/hooks/use-touch.d.ts +1 -1
  91. package/dist/es/hooks/use-touch.js +35 -31
  92. package/dist/es/hooks/usePayWindowOpen.d.ts +16 -10
  93. package/dist/es/hooks/usePayWindowOpen.js +81 -37
  94. package/dist/es/icons/IconAlipay/index.js +18 -16
  95. package/dist/es/icons/IconClose/index.js +24 -22
  96. package/dist/es/icons/IconPaypalText/index.js +24 -22
  97. package/dist/es/icons/IconPaypalWhite/index.js +19 -17
  98. package/dist/es/icons/IconPayssionPay/index.js +47 -45
  99. package/dist/es/icons/IconStripe/index.js +19 -17
  100. package/dist/es/icons/IconStripeText/index.js +19 -17
  101. package/dist/es/icons/IconWechatPay/index.js +18 -16
  102. package/dist/es/icons/interface.d.ts +1 -1
  103. package/dist/es/icons/style/index.css +45 -1
  104. package/dist/es/icons/style/index.min.css +1 -0
  105. package/dist/es/pay-modal/index.d.ts +2 -2
  106. package/dist/es/pay-modal/index.js +2 -2
  107. package/dist/es/pay-modal/pay-modal.js +45 -48
  108. package/dist/es/pay-modal/style/index.css +95 -1
  109. package/dist/es/pay-modal/style/index.min.css +1 -0
  110. package/dist/es/pay-popup/index.js +51 -53
  111. package/dist/es/pay-popup/interface.d.ts +6 -6
  112. package/dist/es/pay-popup/style/index.css +145 -1
  113. package/dist/es/pay-popup/style/index.min.css +1 -0
  114. package/dist/es/shared/enums/index.d.ts +21 -0
  115. package/dist/es/shared/enums/index.js +24 -1
  116. package/dist/es/shared/index.d.ts +1 -1
  117. package/dist/es/shared/index.js +1 -1
  118. package/dist/es/utils/can-use-dom.js +1 -1
  119. package/dist/es/utils/classNames.js +15 -11
  120. package/dist/es/utils/dom.js +18 -18
  121. package/dist/es/utils/get-container.js +2 -2
  122. package/dist/es/utils/get-scroll-parent.js +8 -9
  123. package/dist/es/utils/is.d.ts +10 -1
  124. package/dist/es/utils/is.js +68 -34
  125. package/dist/es/utils/native-props.d.ts +2 -2
  126. package/dist/es/utils/native-props.js +7 -9
  127. package/dist/es/utils/omit.js +3 -5
  128. package/dist/es/utils/qrcode.js +5 -5
  129. package/dist/es/utils/render-to-container.d.ts +1 -1
  130. package/dist/es/utils/render-to-container.js +4 -4
  131. package/dist/es/utils/should-render.d.ts +1 -1
  132. package/dist/es/utils/should-render.js +4 -4
  133. package/dist/es/utils/supports-passive.js +8 -7
  134. package/dist/es/utils/warning.js +0 -1
  135. package/dist/es/utils/with-default-props.js +6 -4
  136. package/dist/es/utils/with-stop-propagation.d.ts +3 -3
  137. package/dist/es/utils/with-stop-propagation.js +27 -14
  138. package/dist/lib/Airwallex/airwallex-button.js +12 -15
  139. package/dist/lib/Airwallex/airwallex-modal.js +11 -14
  140. package/dist/lib/Airwallex/airwallex-popup.js +16 -23
  141. package/dist/lib/Airwallex/airwallex.js +20 -25
  142. package/dist/lib/Airwallex/index.js +1 -1
  143. package/dist/lib/Airwallex/style/index.css +335 -1
  144. package/dist/lib/Airwallex/style/index.min.css +1 -0
  145. package/dist/lib/Alipay/alipay-button.js +12 -15
  146. package/dist/lib/Alipay/alipay-modal.js +9 -12
  147. package/dist/lib/Alipay/alipay.js +19 -23
  148. package/dist/lib/Alipay/index.js +1 -1
  149. package/dist/lib/Alipay/style/index.css +18 -1
  150. package/dist/lib/Alipay/style/index.min.css +1 -0
  151. package/dist/lib/Button/button.js +13 -13
  152. package/dist/lib/Button/index.js +1 -1
  153. package/dist/lib/Button/style/index.css +95 -1
  154. package/dist/lib/Button/style/index.min.css +1 -0
  155. package/dist/lib/FullScreenLoading/index.js +28 -29
  156. package/dist/lib/FullScreenLoading/style/index.css +239 -1
  157. package/dist/lib/FullScreenLoading/style/index.min.css +1 -0
  158. package/dist/lib/MAlipay/index.js +1 -1
  159. package/dist/lib/MAlipay/m-alipay-auto-submit.js +3 -4
  160. package/dist/lib/MAlipay/m-alipay-button.js +34 -44
  161. package/dist/lib/MAlipay/style/index.css +252 -1
  162. package/dist/lib/MAlipay/style/index.min.css +1 -0
  163. package/dist/lib/MWeChat/index.js +2 -2
  164. package/dist/lib/MWeChat/m-wechat-button.js +34 -44
  165. package/dist/lib/MWeChat/style/index.css +252 -1
  166. package/dist/lib/MWeChat/style/index.min.css +1 -0
  167. package/dist/lib/Mask/index.js +1 -1
  168. package/dist/lib/Mask/mask.js +6 -11
  169. package/dist/lib/Mask/style/index.css +11 -1
  170. package/dist/lib/Mask/style/index.min.css +1 -0
  171. package/dist/lib/PayButton/index.js +10 -10
  172. package/dist/lib/PayMask/index.js +1 -1
  173. package/dist/lib/PayMask/pay-mask.js +26 -24
  174. package/dist/lib/PayMask/style/index.css +62 -1
  175. package/dist/lib/PayMask/style/index.min.css +1 -0
  176. package/dist/lib/Paypal/index.js +2 -2
  177. package/dist/lib/Paypal/paypal-button.js +17 -22
  178. package/dist/lib/Paypal/style/index.css +207 -1
  179. package/dist/lib/Paypal/style/index.min.css +1 -0
  180. package/dist/lib/Payssion/index.js +2 -2
  181. package/dist/lib/Payssion/payssion-button.js +17 -22
  182. package/dist/lib/Payssion/style/index.css +157 -1
  183. package/dist/lib/Payssion/style/index.min.css +1 -0
  184. package/dist/lib/Stripe/index.js +1 -1
  185. package/dist/lib/Stripe/stripe-button.js +14 -17
  186. package/dist/lib/Stripe/stripe-modal.js +10 -13
  187. package/dist/lib/Stripe/stripe-popup.js +16 -23
  188. package/dist/lib/Stripe/stripe.js +8 -11
  189. package/dist/lib/Stripe/style/index.css +365 -1
  190. package/dist/lib/Stripe/style/index.min.css +1 -0
  191. package/dist/lib/Wechat/index.js +1 -1
  192. package/dist/lib/Wechat/style/index.css +25 -1
  193. package/dist/lib/Wechat/style/index.min.css +1 -0
  194. package/dist/lib/Wechat/wechat-button.js +12 -15
  195. package/dist/lib/Wechat/wechat-modal.js +9 -12
  196. package/dist/lib/Wechat/wechat.js +11 -12
  197. package/dist/lib/confirm-modal/index.js +24 -28
  198. package/dist/lib/confirm-modal/style/index.css +95 -1
  199. package/dist/lib/confirm-modal/style/index.min.css +1 -0
  200. package/dist/lib/dot-loading/dot-loading.js +3 -4
  201. package/dist/lib/dot-loading/index.js +1 -1
  202. package/dist/lib/dot-loading/style/index.css +3 -1
  203. package/dist/lib/dot-loading/style/index.min.css +1 -0
  204. package/dist/lib/hooks/use-lock-scroll.js +11 -12
  205. package/dist/lib/hooks/use-touch.js +10 -10
  206. package/dist/lib/hooks/usePayWindowOpen.js +63 -21
  207. package/dist/lib/icons/IconAlipay/index.js +6 -6
  208. package/dist/lib/icons/IconClose/index.js +8 -8
  209. package/dist/lib/icons/IconPaypalText/index.js +7 -7
  210. package/dist/lib/icons/IconPaypalWhite/index.js +6 -6
  211. package/dist/lib/icons/IconPayssionPay/index.js +13 -13
  212. package/dist/lib/icons/IconStripe/index.js +6 -6
  213. package/dist/lib/icons/IconStripeText/index.js +6 -6
  214. package/dist/lib/icons/IconWechatPay/index.js +6 -6
  215. package/dist/lib/icons/index.js +2 -2
  216. package/dist/lib/icons/style/index.css +45 -1
  217. package/dist/lib/icons/style/index.min.css +1 -0
  218. package/dist/lib/index.js +2 -2
  219. package/dist/lib/pay-modal/index.js +1 -1
  220. package/dist/lib/pay-modal/pay-modal.js +24 -30
  221. package/dist/lib/pay-modal/style/index.css +95 -1
  222. package/dist/lib/pay-modal/style/index.min.css +1 -0
  223. package/dist/lib/pay-popup/index.js +24 -28
  224. package/dist/lib/pay-popup/style/index.css +145 -1
  225. package/dist/lib/pay-popup/style/index.min.css +1 -0
  226. package/dist/lib/shared/enums/index.js +23 -1
  227. package/dist/lib/utils/can-use-dom.js +1 -1
  228. package/dist/lib/utils/classNames.js +6 -7
  229. package/dist/lib/utils/dom.js +9 -11
  230. package/dist/lib/utils/get-scroll-parent.js +2 -3
  231. package/dist/lib/utils/getPrefixCls.js +1 -1
  232. package/dist/lib/utils/is.js +32 -17
  233. package/dist/lib/utils/native-props.js +10 -10
  234. package/dist/lib/utils/omit.js +3 -6
  235. package/dist/lib/utils/qrcode.js +1 -1
  236. package/dist/lib/utils/supports-passive.js +4 -3
  237. package/dist/lib/utils/warning.js +2 -6
  238. package/dist/lib/utils/with-default-props.js +4 -8
  239. package/dist/lib/utils/with-stop-propagation.js +6 -9
  240. package/dist/umd/pay-sdk-react.umd.js +218 -130
  241. package/dist/umd/pay-sdk-react.umd.js.map +1 -1
  242. package/package.json +6 -3
@@ -1 +1,145 @@
1
- .pay-mask{position:fixed;z-index:1000;left:0;top:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.pay-icon{display:inline-block;color:inherit;width:16px;vertical-align:-2px;stroke:currentColor}.pay-icon[fill=currentColor]{fill:currentColor;stroke:none}.pay-icon[stroke=currentColor]{stroke:currentColor;fill:none}.pay-icon[fill=currentColor][stroke=currentColor]{fill:currentColor;stroke:currentColor}.pay-icon-paypal-text{width:64px;height:26px;max-width:72px;max-height:32px}.pay-icon-close{width:18px;height:18px}.pay-icon-stripe-text{width:24px;height:24px}.pay-icon-alipay{width:20px;height:20px}.pay-icon-wechat-pay{width:20px;height:20px}.pay-icon-payssion-pay{width:36px;height:20px}.pay-popup{position:fixed;z-index:1001}.pay-popup-body{position:fixed;display:flex;flex-direction:column;background-color:#fff;z-index:1010;box-sizing:border-box}.pay-popup-body.pay-popup-body-position-bottom{width:100%;left:0;bottom:0}.pay-popup-body.pay-popup-body-position-top{width:100%;left:0;top:0}.pay-popup-body.pay-popup-body-position-left{height:100%;width:80vw;left:0;top:0}.pay-popup-body.pay-popup-body-position-right{height:100%;width:80vw;right:0;top:0}.pay-popup-body.pay-popup-body-round.pay-popup-body-position-bottom{border-radius:16px 16px 0 0}.pay-popup-body.pay-popup-body-round.pay-popup-body-position-top{border-radius:0 0 16px 16px}.pay-popup-body.pay-popup-body-round.pay-popup-body-position-left{border-radius:0 16px 16px 0}.pay-popup-body.pay-popup-body-round.pay-popup-body-position-right{border-radius:16px 0 0 16px}.pay-popup-close-icon{position:absolute;z-index:1;cursor:pointer;padding:4px;font-size:18px;line-height:1;color:#999}.pay-popup-body.pay-popup-body-position-bottom .pay-popup-close-icon,.pay-popup-body.pay-popup-body-position-left .pay-popup-close-icon{top:8px;right:8px}.pay-popup-body.pay-popup-body-position-top .pay-popup-close-icon{bottom:8px;right:8px}.pay-popup-body.pay-popup-body-position-right .pay-popup-close-icon{top:8px;left:8px}.pay-popup-content{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch}.pay-popup-body.pay-popup-body-with-close.pay-popup-body-position-bottom .pay-popup-content,.pay-popup-body.pay-popup-body-with-close.pay-popup-body-position-left .pay-popup-content{padding-top:40px}.pay-popup-body.pay-popup-body-with-close.pay-popup-body-position-right .pay-popup-content{padding-top:40px}.pay-popup-body.pay-popup-body-with-close.pay-popup-body-position-top .pay-popup-content{padding-bottom:40px}
1
+ .pay-mask {
2
+ position: fixed;
3
+ z-index: 1000;
4
+ left: 0;
5
+ top: 0;
6
+ right: 0;
7
+ bottom: 0;
8
+ display: flex;
9
+ align-items: center;
10
+ justify-content: center;
11
+ }
12
+ .pay-icon {
13
+ display: inline-block;
14
+ color: inherit;
15
+ width: 16px;
16
+ vertical-align: -2px;
17
+ stroke: currentColor;
18
+ }
19
+ .pay-icon[fill='currentColor'] {
20
+ fill: currentColor;
21
+ stroke: none;
22
+ }
23
+ .pay-icon[stroke='currentColor'] {
24
+ stroke: currentColor;
25
+ fill: none;
26
+ }
27
+ .pay-icon[fill='currentColor'][stroke='currentColor'] {
28
+ fill: currentColor;
29
+ stroke: currentColor;
30
+ }
31
+ .pay-icon-paypal-text {
32
+ width: 64px;
33
+ height: 26px;
34
+ max-width: 72px;
35
+ max-height: 32px;
36
+ }
37
+ .pay-icon-close {
38
+ width: 18px;
39
+ height: 18px;
40
+ }
41
+ .pay-icon-stripe-text {
42
+ width: 24px;
43
+ height: 24px;
44
+ }
45
+ .pay-icon-alipay {
46
+ width: 20px;
47
+ height: 20px;
48
+ }
49
+ .pay-icon-wechat-pay {
50
+ width: 20px;
51
+ height: 20px;
52
+ }
53
+ .pay-icon-payssion-pay {
54
+ width: 36px;
55
+ height: 20px;
56
+ }
57
+ .pay-popup {
58
+ position: fixed;
59
+ z-index: 1001;
60
+ }
61
+ /* Base container for the animated popup body */
62
+ .pay-popup-body {
63
+ position: fixed;
64
+ display: flex;
65
+ flex-direction: column;
66
+ background-color: #ffffff;
67
+ z-index: 1010;
68
+ box-sizing: border-box;
69
+ }
70
+ /* --- Sizing and Positioning --- */
71
+ .pay-popup-body.pay-popup-body-position-bottom {
72
+ width: 100%;
73
+ left: 0;
74
+ bottom: 0;
75
+ }
76
+ .pay-popup-body.pay-popup-body-position-top {
77
+ width: 100%;
78
+ left: 0;
79
+ top: 0;
80
+ }
81
+ .pay-popup-body.pay-popup-body-position-left {
82
+ height: 100%;
83
+ width: 80vw;
84
+ left: 0;
85
+ top: 0;
86
+ }
87
+ .pay-popup-body.pay-popup-body-position-right {
88
+ height: 100%;
89
+ width: 80vw;
90
+ right: 0;
91
+ top: 0;
92
+ }
93
+ /* --- Round Corners Modifier --- */
94
+ .pay-popup-body.pay-popup-body-round.pay-popup-body-position-bottom {
95
+ border-radius: 16px 16px 0 0;
96
+ }
97
+ .pay-popup-body.pay-popup-body-round.pay-popup-body-position-top {
98
+ border-radius: 0 0 16px 16px;
99
+ }
100
+ .pay-popup-body.pay-popup-body-round.pay-popup-body-position-left {
101
+ border-radius: 0 16px 16px 0;
102
+ }
103
+ .pay-popup-body.pay-popup-body-round.pay-popup-body-position-right {
104
+ border-radius: 16px 0 0 16px;
105
+ }
106
+ /* --- Close Icon --- */
107
+ .pay-popup-close-icon {
108
+ position: absolute;
109
+ z-index: 1;
110
+ cursor: pointer;
111
+ padding: 4px;
112
+ font-size: 18px;
113
+ line-height: 1;
114
+ color: #999;
115
+ }
116
+ .pay-popup-body.pay-popup-body-position-bottom .pay-popup-close-icon,
117
+ .pay-popup-body.pay-popup-body-position-left .pay-popup-close-icon {
118
+ top: 8px;
119
+ right: 8px;
120
+ }
121
+ .pay-popup-body.pay-popup-body-position-top .pay-popup-close-icon {
122
+ bottom: 8px;
123
+ right: 8px;
124
+ }
125
+ .pay-popup-body.pay-popup-body-position-right .pay-popup-close-icon {
126
+ top: 8px;
127
+ left: 8px;
128
+ }
129
+ /* --- Content Area --- */
130
+ .pay-popup-content {
131
+ flex: 1;
132
+ overflow-y: auto;
133
+ -webkit-overflow-scrolling: touch;
134
+ }
135
+ /* --- Padding adjustment when close icon is visible --- */
136
+ .pay-popup-body.pay-popup-body-with-close.pay-popup-body-position-bottom .pay-popup-content,
137
+ .pay-popup-body.pay-popup-body-with-close.pay-popup-body-position-left .pay-popup-content {
138
+ padding-top: 40px;
139
+ }
140
+ .pay-popup-body.pay-popup-body-with-close.pay-popup-body-position-right .pay-popup-content {
141
+ padding-top: 40px;
142
+ }
143
+ .pay-popup-body.pay-popup-body-with-close.pay-popup-body-position-top .pay-popup-content {
144
+ padding-bottom: 40px;
145
+ }
@@ -0,0 +1 @@
1
+ .pay-mask{position:fixed;z-index:1000;left:0;top:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.pay-icon{display:inline-block;color:inherit;width:16px;vertical-align:-2px;stroke:currentColor}.pay-icon[fill=currentColor]{fill:currentColor;stroke:none}.pay-icon[stroke=currentColor]{stroke:currentColor;fill:none}.pay-icon[fill=currentColor][stroke=currentColor]{fill:currentColor;stroke:currentColor}.pay-icon-paypal-text{width:64px;height:26px;max-width:72px;max-height:32px}.pay-icon-close{width:18px;height:18px}.pay-icon-stripe-text{width:24px;height:24px}.pay-icon-alipay{width:20px;height:20px}.pay-icon-wechat-pay{width:20px;height:20px}.pay-icon-payssion-pay{width:36px;height:20px}.pay-popup{position:fixed;z-index:1001}.pay-popup-body{position:fixed;display:flex;flex-direction:column;background-color:#fff;z-index:1010;box-sizing:border-box}.pay-popup-body.pay-popup-body-position-bottom{width:100%;left:0;bottom:0}.pay-popup-body.pay-popup-body-position-top{width:100%;left:0;top:0}.pay-popup-body.pay-popup-body-position-left{height:100%;width:80vw;left:0;top:0}.pay-popup-body.pay-popup-body-position-right{height:100%;width:80vw;right:0;top:0}.pay-popup-body.pay-popup-body-round.pay-popup-body-position-bottom{border-radius:16px 16px 0 0}.pay-popup-body.pay-popup-body-round.pay-popup-body-position-top{border-radius:0 0 16px 16px}.pay-popup-body.pay-popup-body-round.pay-popup-body-position-left{border-radius:0 16px 16px 0}.pay-popup-body.pay-popup-body-round.pay-popup-body-position-right{border-radius:16px 0 0 16px}.pay-popup-close-icon{position:absolute;z-index:1;cursor:pointer;padding:4px;font-size:18px;line-height:1;color:#999}.pay-popup-body.pay-popup-body-position-bottom .pay-popup-close-icon,.pay-popup-body.pay-popup-body-position-left .pay-popup-close-icon{top:8px;right:8px}.pay-popup-body.pay-popup-body-position-top .pay-popup-close-icon{bottom:8px;right:8px}.pay-popup-body.pay-popup-body-position-right .pay-popup-close-icon{top:8px;left:8px}.pay-popup-content{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch}.pay-popup-body.pay-popup-body-with-close.pay-popup-body-position-bottom .pay-popup-content,.pay-popup-body.pay-popup-body-with-close.pay-popup-body-position-left .pay-popup-content{padding-top:40px}.pay-popup-body.pay-popup-body-with-close.pay-popup-body-position-right .pay-popup-content{padding-top:40px}.pay-popup-body.pay-popup-body-with-close.pay-popup-body-position-top .pay-popup-content{padding-bottom:40px}
@@ -55,3 +55,24 @@ export declare enum PaymentMethod {
55
55
  */
56
56
  Airwallex = "airwallex"
57
57
  }
58
+ /**
59
+ * @zh 支付页面打开模式枚举
60
+ * @en Payment page opening mode enum
61
+ */
62
+ export declare enum OpenPayUrlMode {
63
+ /**
64
+ * @zh 新页面或弹窗模式 - 使用 window.open() 打开新页面或弹窗,支持智能设备检测
65
+ * @en New page or popup mode - Use window.open() to open new page or popup, supports smart device detection
66
+ */
67
+ Window = "window",
68
+ /**
69
+ * @zh 新页面模式 - 使用 window.location.href 跳转到新页面
70
+ * @en New page mode - Use window.location.href to navigate to new page
71
+ */
72
+ Href = "href",
73
+ /**
74
+ * @zh 替换页面模式 - 使用 window.location.replace 替换当前页面
75
+ * @en Replace page mode - Use window.location.replace to replace current page
76
+ */
77
+ Replace = "replace"
78
+ }
@@ -1,4 +1,4 @@
1
- export let PaymentMethod = /*#__PURE__*/function (PaymentMethod) {
1
+ export var PaymentMethod = /*#__PURE__*/function (PaymentMethod) {
2
2
  /**
3
3
  * @zh 微信(pc)
4
4
  * @en Wechat(pc)
@@ -55,4 +55,27 @@ export let PaymentMethod = /*#__PURE__*/function (PaymentMethod) {
55
55
  */
56
56
  PaymentMethod["Airwallex"] = "airwallex";
57
57
  return PaymentMethod;
58
+ }({});
59
+
60
+ /**
61
+ * @zh 支付页面打开模式枚举
62
+ * @en Payment page opening mode enum
63
+ */
64
+ export var OpenPayUrlMode = /*#__PURE__*/function (OpenPayUrlMode) {
65
+ /**
66
+ * @zh 新页面或弹窗模式 - 使用 window.open() 打开新页面或弹窗,支持智能设备检测
67
+ * @en New page or popup mode - Use window.open() to open new page or popup, supports smart device detection
68
+ */
69
+ OpenPayUrlMode["Window"] = "window";
70
+ /**
71
+ * @zh 新页面模式 - 使用 window.location.href 跳转到新页面
72
+ * @en New page mode - Use window.location.href to navigate to new page
73
+ */
74
+ OpenPayUrlMode["Href"] = "href";
75
+ /**
76
+ * @zh 替换页面模式 - 使用 window.location.replace 替换当前页面
77
+ * @en Replace page mode - Use window.location.replace to replace current page
78
+ */
79
+ OpenPayUrlMode["Replace"] = "replace";
80
+ return OpenPayUrlMode;
58
81
  }({});
@@ -1 +1 @@
1
- export * from "./enums";
1
+ export * from './enums';
@@ -1 +1 @@
1
- export * from "./enums";
1
+ export * from './enums';
@@ -1 +1 @@
1
- export const canUseDom = !!(typeof window !== "undefined" && typeof document !== "undefined" && window.document && window.document.createElement);
1
+ export var canUseDom = !!(typeof window !== 'undefined' && typeof document !== 'undefined' && window.document && window.document.createElement);
@@ -1,27 +1,31 @@
1
- import { isArray, isObject, isString } from "./is";
2
- import warning from "./warning";
3
- // eslint-disable-next-line import/no-anonymous-default-export
1
+ import _toConsumableArray from "@babel/runtime-corejs3/helpers/esm/toConsumableArray";
2
+ import { isArray, isObject, isString } from './is';
3
+ import warning from './warning';
4
4
  export default function () {
5
- const length = arguments.length;
6
- let classNames = [];
7
- for (let i = 0; i < length; i++) {
8
- const v = i < 0 || arguments.length <= i ? undefined : arguments[i];
5
+ var _arguments = arguments;
6
+ var length = arguments.length;
7
+ var classNames = [];
8
+ var _loop = function _loop() {
9
+ var v = i < 0 || _arguments.length <= i ? undefined : _arguments[i];
9
10
  if (!v) {
10
- continue;
11
+ return 1; // continue
11
12
  }
12
13
  if (isString(v)) {
13
14
  classNames.push(v);
14
15
  } else if (isArray(v)) {
15
16
  classNames = classNames.concat(v);
16
17
  } else if (isObject(v)) {
17
- Object.keys(v).forEach(k => {
18
+ Object.keys(v).forEach(function (k) {
18
19
  if (v[k]) {
19
20
  classNames.push(k);
20
21
  }
21
22
  });
22
23
  } else {
23
- warning(true, "arguments must be one of string/array/object.");
24
+ warning(true, 'arguments must be one of string/array/object.');
24
25
  }
26
+ };
27
+ for (var i = 0; i < length; i++) {
28
+ if (_loop()) continue;
25
29
  }
26
- return [...new Set(classNames)].join(" ");
30
+ return _toConsumableArray(new Set(classNames)).join(' ');
27
31
  }
@@ -1,66 +1,66 @@
1
- const NOOP = () => {};
2
- export const isServerRendering = function () {
1
+ var NOOP = function NOOP() {};
2
+ export var isServerRendering = function () {
3
3
  try {
4
- return !(typeof window !== "undefined" && document !== undefined);
4
+ return !(typeof window !== 'undefined' && document !== undefined);
5
5
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
6
6
  } catch (e) {
7
7
  return true;
8
8
  }
9
9
  }();
10
- export const clientWindow = function () {
10
+ export var clientWindow = function () {
11
11
  if (isServerRendering) {
12
12
  return undefined;
13
13
  }
14
14
  return window;
15
15
  }();
16
- export const clientDocument = function () {
16
+ export var clientDocument = function () {
17
17
  if (isServerRendering) {
18
18
  return undefined;
19
19
  }
20
20
  return document;
21
21
  }();
22
- export const localStorage = function () {
22
+ export var localStorage = function () {
23
23
  if (isServerRendering) {
24
24
  return NOOP;
25
25
  }
26
26
  return window.localStorage;
27
27
  }();
28
- export const location = function () {
28
+ export var location = function () {
29
29
  if (isServerRendering) {
30
30
  return NOOP;
31
31
  }
32
32
  return function (action, value) {
33
- if (action === "replace") {
33
+ if (action === 'replace') {
34
34
  window.location.replace(value);
35
35
  }
36
- if (action === "href") {
36
+ if (action === 'href') {
37
37
  window.location.href = value;
38
38
  }
39
- if (action === "reload") {
39
+ if (action === 'reload') {
40
40
  window.location.reload();
41
41
  }
42
- if (action === "protocol") {
42
+ if (action === 'protocol') {
43
43
  return window.location.protocol;
44
44
  }
45
- if (action === "host") {
45
+ if (action === 'host') {
46
46
  return window.location.host;
47
47
  }
48
- if (action === "search") {
48
+ if (action === 'search') {
49
49
  var _window$location$sear;
50
- return (_window$location$sear = window.location.search) !== null && _window$location$sear !== void 0 ? _window$location$sear : "";
50
+ return (_window$location$sear = window.location.search) !== null && _window$location$sear !== void 0 ? _window$location$sear : '';
51
51
  }
52
52
  };
53
53
  }();
54
- export const open = function () {
54
+ export var open = function () {
55
55
  if (isServerRendering) {
56
56
  return NOOP;
57
57
  }
58
58
  return function (url) {
59
- let target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "_blank";
59
+ var target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '_blank';
60
60
  window.open(url, target);
61
61
  };
62
62
  }();
63
- export const on = function () {
63
+ export var on = function () {
64
64
  if (isServerRendering) {
65
65
  return NOOP;
66
66
  }
@@ -69,7 +69,7 @@ export const on = function () {
69
69
  element && element.addEventListener(event, handler, options || false);
70
70
  };
71
71
  }();
72
- export const off = function () {
72
+ export var off = function () {
73
73
  if (isServerRendering) {
74
74
  return NOOP;
75
75
  }
@@ -1,5 +1,5 @@
1
- import { isFunction } from "./is";
1
+ import { isFunction } from './is';
2
2
  export function resolveContainer(getContainer) {
3
- const container = isFunction(getContainer) ? getContainer() : getContainer;
3
+ var container = isFunction(getContainer) ? getContainer() : getContainer;
4
4
  return container || document.body;
5
5
  }
@@ -1,20 +1,19 @@
1
- import { canUseDom } from "./can-use-dom";
2
- const defaultRoot = canUseDom ? window : undefined;
3
- const overflowStylePatterns = ["scroll", "auto", "overlay"];
1
+ import { canUseDom } from './can-use-dom';
2
+ var defaultRoot = canUseDom ? window : undefined;
3
+ var overflowStylePatterns = ['scroll', 'auto', 'overlay'];
4
4
  function isElement(node) {
5
- const ELEMENT_NODE_TYPE = 1;
5
+ var ELEMENT_NODE_TYPE = 1;
6
6
  return node.nodeType === ELEMENT_NODE_TYPE;
7
7
  }
8
8
  export function getScrollParent(el) {
9
- let root = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultRoot;
10
- let node = el;
9
+ var root = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultRoot;
10
+ var node = el;
11
11
  while (node && node !== root && isElement(node)) {
12
12
  if (node === document.body) {
13
13
  return root;
14
14
  }
15
- const {
16
- overflowY
17
- } = window.getComputedStyle(node);
15
+ var _window$getComputedSt = window.getComputedStyle(node),
16
+ overflowY = _window$getComputedSt.overflowY;
18
17
  if (overflowStylePatterns.includes(overflowY) && node.scrollHeight > node.clientHeight) {
19
18
  return node;
20
19
  }
@@ -22,7 +22,16 @@ export declare const isClassComponent: (element: any) => boolean;
22
22
  export declare const isDOMElement: (element: any) => boolean;
23
23
  export declare const isLink: (text?: React.ReactNode) => boolean;
24
24
  export declare function isImageLinkAvailable(url: string): Promise<boolean>;
25
- export declare function isMobile(): boolean | undefined;
25
+ /**
26
+ * @zh 检测是否为移动设备
27
+ * @en Detect if it's a mobile device
28
+ */
29
+ export declare function isMobileDevice(): boolean | undefined;
30
+ /**
31
+ * @zh 检测是否为触摸设备
32
+ * @en Detect if it's a touch device
33
+ */
34
+ export declare function isTouchDevice(): boolean;
26
35
  export declare function isEmail(email: string): boolean;
27
36
  export declare function isSmsCode(code: string): boolean;
28
37
  export declare function isUsPhoneNumber(phone: string): boolean;
@@ -1,27 +1,31 @@
1
- import { isValidElement } from "react";
2
- import { canUseDom } from "./can-use-dom";
3
- import { clientWindow } from "./dom";
4
- const opt = Object.prototype.toString;
1
+ import _typeof from "@babel/runtime-corejs3/helpers/esm/typeof";
2
+ import _asyncToGenerator from "@babel/runtime-corejs3/helpers/esm/asyncToGenerator";
3
+ import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
4
+ import _trimInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/trim";
5
+ import { isValidElement } from 'react';
6
+ import { canUseDom } from './can-use-dom';
7
+ import { clientWindow } from './dom';
8
+ var opt = Object.prototype.toString;
5
9
  export function isArray(obj) {
6
- return opt.call(obj) === "[object Array]";
10
+ return opt.call(obj) === '[object Array]';
7
11
  }
8
12
  export function isObject(obj) {
9
- return opt.call(obj) === "[object Object]";
13
+ return opt.call(obj) === '[object Object]';
10
14
  }
11
15
  export function isString(obj) {
12
- return opt.call(obj) === "[object String]";
16
+ return opt.call(obj) === '[object String]';
13
17
  }
14
18
  export function isNumber(obj) {
15
- return opt.call(obj) === "[object Number]" && obj === obj;
19
+ return opt.call(obj) === '[object Number]' && obj === obj;
16
20
  }
17
21
  export function isRegExp(obj) {
18
- return opt.call(obj) === "[object RegExp]";
22
+ return opt.call(obj) === '[object RegExp]';
19
23
  }
20
24
  export function isFile(obj) {
21
- return opt.call(obj) === "[object File]";
25
+ return opt.call(obj) === '[object File]';
22
26
  }
23
27
  export function isBlob(obj) {
24
- return opt.call(obj) === "[object Blob]";
28
+ return opt.call(obj) === '[object Blob]';
25
29
  }
26
30
  function isHex(color) {
27
31
  return /^#[a-fA-F0-9]{3}$|#[a-fA-F0-9]{6}$/.test(color);
@@ -45,7 +49,7 @@ export function isNullOrUndefined(obj) {
45
49
  return obj === null || obj === undefined;
46
50
  }
47
51
  export function isFunction(obj) {
48
- return typeof obj === "function";
52
+ return typeof obj === 'function';
49
53
  }
50
54
  export function isEmptyObject(obj) {
51
55
  return isObject(obj) && Object.keys(obj).length === 0;
@@ -54,7 +58,7 @@ export function isEmptyReactNode(content, trim) {
54
58
  if (content === null || content === undefined || content === false) {
55
59
  return true;
56
60
  }
57
- if (typeof content === "string" && (trim ? content.trim() === "" : content === "")) {
61
+ if (typeof content === 'string' && (trim ? _trimInstanceProperty(content).call(content) === '' : content === '')) {
58
62
  return true;
59
63
  }
60
64
  return false;
@@ -66,48 +70,78 @@ export function isWindow(el) {
66
70
  return el === window;
67
71
  }
68
72
  export function isBoolean(value) {
69
- return typeof value === "boolean";
73
+ return typeof value === 'boolean';
70
74
  }
71
- export const isReactComponent = element => {
72
- return element && /*#__PURE__*/isValidElement(element) && typeof element.type === "function";
75
+ export var isReactComponent = function isReactComponent(element) {
76
+ return element && /*#__PURE__*/isValidElement(element) && typeof element.type === 'function';
73
77
  };
74
- export const isClassComponent = element => {
78
+ export var isClassComponent = function isClassComponent(element) {
75
79
  var _element$type$prototy;
76
80
  return isReactComponent(element) && !!((_element$type$prototy = element.type.prototype) !== null && _element$type$prototy !== void 0 && _element$type$prototy.isReactComponent);
77
81
  };
78
82
 
79
83
  // element 是合成的 dom 元素或者字符串,数字等
80
- export const isDOMElement = element => {
81
- return /*#__PURE__*/isValidElement(element) && typeof element.type === "string";
84
+ export var isDOMElement = function isDOMElement(element) {
85
+ return /*#__PURE__*/isValidElement(element) && typeof element.type === 'string';
82
86
  };
83
- export const isLink = text => {
84
- return isString(text) && (text.startsWith("http") || text.startsWith("https"));
87
+ export var isLink = function isLink(text) {
88
+ return isString(text) && (text.startsWith('http') || text.startsWith('https'));
85
89
  };
86
- export async function isImageLinkAvailable(url) {
87
- return new Promise(resolve => {
88
- const img = new Image();
89
- img.onload = () => resolve(true);
90
- img.onerror = () => resolve(false);
91
- img.src = url;
92
- });
90
+ export function isImageLinkAvailable(_x) {
91
+ return _isImageLinkAvailable.apply(this, arguments);
93
92
  }
94
- export function isMobile() {
95
- return clientWindow && /Android|iPhone|iPad|iPod|Windows Phone|BlackBerry|Mobile/i.test(clientWindow === null || clientWindow === void 0 ? void 0 : clientWindow.navigator.userAgent);
93
+
94
+ /**
95
+ * @zh 检测是否为移动设备
96
+ * @en Detect if it's a mobile device
97
+ */
98
+ function _isImageLinkAvailable() {
99
+ _isImageLinkAvailable = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(url) {
100
+ return _regeneratorRuntime.wrap(function (_context) {
101
+ while (1) switch (_context.prev = _context.next) {
102
+ case 0:
103
+ return _context.abrupt("return", new Promise(function (resolve) {
104
+ var img = new Image();
105
+ img.onload = function () {
106
+ return resolve(true);
107
+ };
108
+ img.onerror = function () {
109
+ return resolve(false);
110
+ };
111
+ img.src = url;
112
+ }));
113
+ case 1:
114
+ case "end":
115
+ return _context.stop();
116
+ }
117
+ }, _callee);
118
+ }));
119
+ return _isImageLinkAvailable.apply(this, arguments);
120
+ }
121
+ export function isMobileDevice() {
122
+ return clientWindow && /Android|webOS|iPhone|iPad|iPod|Windows Phone|BlackBerry|Mobile|IEMobile|Opera Mini/i.test(clientWindow === null || clientWindow === void 0 ? void 0 : clientWindow.navigator.userAgent);
123
+ }
124
+ /**
125
+ * @zh 检测是否为触摸设备
126
+ * @en Detect if it's a touch device
127
+ */
128
+ export function isTouchDevice() {
129
+ return 'ontouchstart' in window || navigator.maxTouchPoints > 0;
96
130
  }
97
131
  export function isEmail(email) {
98
- const emailReg = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
132
+ var emailReg = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
99
133
  return emailReg.test(email);
100
134
  }
101
135
  export function isSmsCode(code) {
102
- const codeReg = /\d{6}/;
136
+ var codeReg = /\d{6}/;
103
137
  return codeReg.test(code);
104
138
  }
105
139
  export function isUsPhoneNumber(phone) {
106
- const phoneRegex = /^[2-9]\d{2}[2-9]\d{6}$/;
140
+ var phoneRegex = /^[2-9]\d{2}[2-9]\d{6}$/;
107
141
  return phoneRegex.test(phone);
108
142
  }
109
143
  export function isPromise(obj) {
110
- return !!obj && typeof obj === "object" && typeof obj.then === "function";
144
+ return !!obj && _typeof(obj) === 'object' && typeof obj.then === 'function';
111
145
  }
112
146
 
113
147
  /**
@@ -1,5 +1,5 @@
1
- import React, { AriaAttributes } from "react";
2
- import type { CSSProperties, ReactElement } from "react";
1
+ import React, { AriaAttributes } from 'react';
2
+ import type { CSSProperties, ReactElement } from 'react';
3
3
  export type NativeProps<S extends string = never> = {
4
4
  className?: string;
5
5
  style?: CSSProperties & Partial<Record<S, string>>;
@@ -1,12 +1,10 @@
1
+ import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
1
2
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
4
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
5
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
- import React from "react";
7
- import cs from "./classNames";
4
+ import React from 'react';
5
+ import cs from './classNames';
8
6
  export function withNativeProps(props, element) {
9
- const p = _objectSpread({}, element.props);
7
+ var p = _objectSpread({}, element.props);
10
8
  if (props.className) {
11
9
  p.className = cs(element.props.className, props.className);
12
10
  }
@@ -16,9 +14,9 @@ export function withNativeProps(props, element) {
16
14
  if (props.tabIndex !== undefined) {
17
15
  p.tabIndex = props.tabIndex;
18
16
  }
19
- for (const key in props) {
20
- if (!props.hasOwnProperty(key)) continue;
21
- if (key.startsWith("data-") || key.startsWith("aria-")) {
17
+ for (var key in props) {
18
+ if (!Object.prototype.hasOwnProperty.call(props, key)) continue;
19
+ if (key.startsWith('data-') || key.startsWith('aria-')) {
22
20
  p[key] = props[key];
23
21
  }
24
22
  }
@@ -1,12 +1,10 @@
1
+ import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
1
2
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
4
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
5
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
4
  // delete keys from object
7
5
  export default function omit(obj, keys) {
8
- const clone = _objectSpread({}, obj);
9
- keys.forEach(key => {
6
+ var clone = _objectSpread({}, obj);
7
+ keys.forEach(function (key) {
10
8
  if (key in clone) {
11
9
  delete clone[key];
12
10
  }