@alipay/ams-checkout 1.23.0 → 1.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/dist/umd/ams-checkout.min.js +1 -1
  2. package/esm/component/channel.d.ts +19 -0
  3. package/esm/component/channel.js +87 -0
  4. package/esm/component/component.inline.style.d.ts +10 -0
  5. package/esm/component/component.inline.style.js +121 -0
  6. package/esm/component/component.popup.style.d.ts +23 -0
  7. package/esm/component/component.popup.style.js +190 -0
  8. package/esm/component/popupWindow.style.d.ts +11 -0
  9. package/esm/component/popupWindow.style.js +121 -0
  10. package/esm/config/index.d.ts +7 -7
  11. package/esm/config/index.js +10 -10
  12. package/esm/constant/index.d.ts +9 -5
  13. package/esm/constant/index.js +12 -78
  14. package/esm/core/component/ckp/index.js +6 -5
  15. package/esm/core/component/element/components/address.d.ts +19 -0
  16. package/esm/core/component/element/components/address.js +68 -0
  17. package/esm/core/component/element/components/auth.d.ts +17 -0
  18. package/esm/core/component/element/components/auth.js +60 -0
  19. package/esm/core/component/element/components/payment.d.ts +19 -0
  20. package/esm/core/component/element/components/payment.js +74 -0
  21. package/esm/core/component/element/index.d.ts +47 -0
  22. package/esm/core/component/element/index.js +816 -0
  23. package/esm/core/component/element/mock.d.ts +4 -0
  24. package/esm/core/component/element/mock.js +491 -0
  25. package/esm/core/component/element/type.d.ts +190 -0
  26. package/esm/core/component/element/type.js +35 -0
  27. package/esm/core/component/element/utils.d.ts +13 -0
  28. package/esm/core/component/element/utils.js +6 -0
  29. package/esm/core/component/index.d.ts +4 -4
  30. package/esm/core/component/index.js +14 -14
  31. package/esm/core/drop-in/index.js +2 -2
  32. package/esm/core/instance/index.js +9 -9
  33. package/esm/foundation/core/index.d.ts +26 -0
  34. package/esm/foundation/core/index.js +366 -0
  35. package/esm/foundation/index.d.ts +75 -0
  36. package/esm/foundation/index.js +42 -0
  37. package/esm/foundation/product-processor/easysafepay/deps.d.ts +18 -0
  38. package/esm/foundation/product-processor/easysafepay/deps.js +12 -0
  39. package/esm/foundation/product-processor/easysafepay/index.d.ts +26 -0
  40. package/esm/foundation/product-processor/easysafepay/index.js +463 -0
  41. package/esm/foundation/service/api-bus/ability/callback.d.ts +9 -0
  42. package/esm/foundation/service/api-bus/ability/callback.js +55 -0
  43. package/esm/foundation/service/api-bus/ability/globalData.d.ts +10 -0
  44. package/esm/foundation/service/api-bus/ability/globalData.js +89 -0
  45. package/esm/foundation/service/api-bus/ability/request.d.ts +10 -0
  46. package/esm/foundation/service/api-bus/ability/request.js +151 -0
  47. package/esm/foundation/service/api-bus/ability/security.d.ts +12 -0
  48. package/esm/foundation/service/api-bus/ability/security.js +161 -0
  49. package/esm/foundation/service/api-bus/ability/tracker.d.ts +9 -0
  50. package/esm/foundation/service/api-bus/ability/tracker.js +80 -0
  51. package/esm/foundation/service/api-bus/busManager.d.ts +127 -0
  52. package/esm/foundation/service/api-bus/busManager.js +398 -0
  53. package/esm/foundation/service/api-bus/index.d.ts +20 -0
  54. package/esm/foundation/service/api-bus/index.js +88 -0
  55. package/esm/foundation/service/api-bus/interface.d.ts +48 -0
  56. package/esm/foundation/service/api-bus/interface.js +54 -0
  57. package/esm/foundation/service/container/index.d.ts +30 -0
  58. package/esm/foundation/service/container/index.js +298 -0
  59. package/esm/foundation/service/container/popup.d.ts +17 -0
  60. package/esm/foundation/service/container/popup.js +103 -0
  61. package/esm/foundation/service/container/utils.d.ts +7 -0
  62. package/esm/foundation/service/container/utils.js +48 -0
  63. package/esm/foundation/service/event-center.d.ts +76 -0
  64. package/esm/foundation/service/event-center.js +243 -0
  65. package/esm/foundation/service/global-data/index.d.ts +11 -0
  66. package/esm/foundation/service/global-data/index.js +68 -0
  67. package/esm/foundation/service/index.d.ts +19 -0
  68. package/esm/foundation/service/index.js +82 -0
  69. package/esm/foundation/service/log/index.d.ts +43 -0
  70. package/esm/foundation/service/log/index.js +235 -0
  71. package/esm/foundation/service/log/types.d.ts +32 -0
  72. package/esm/foundation/service/log/types.js +1 -0
  73. package/esm/foundation/service/requester/deps.d.ts +17 -0
  74. package/esm/foundation/service/requester/deps.js +11 -0
  75. package/esm/foundation/service/requester/requester.d.ts +22 -0
  76. package/esm/foundation/service/requester/requester.js +214 -0
  77. package/esm/foundation/service/security/index.d.ts +28 -0
  78. package/esm/foundation/service/security/index.js +286 -0
  79. package/esm/foundation/service/security/security.d.ts +33 -0
  80. package/esm/foundation/service/security/security.js +182 -0
  81. package/esm/foundation/utils/gray_scale_utils.d.ts +7 -0
  82. package/esm/foundation/utils/gray_scale_utils.js +40 -0
  83. package/esm/foundation/utils/payment_context_utils.d.ts +13 -0
  84. package/esm/foundation/utils/payment_context_utils.js +57 -0
  85. package/esm/foundation/utils/payment_product_utils.d.ts +13 -0
  86. package/esm/foundation/utils/payment_product_utils.js +38 -0
  87. package/esm/foundation/utils/redirect_utils.d.ts +11 -0
  88. package/esm/foundation/utils/redirect_utils.js +263 -0
  89. package/esm/foundation/utils/system_events.d.ts +4 -0
  90. package/esm/foundation/utils/system_events.js +66 -0
  91. package/esm/foundation/utils/web_app_url_utils.d.ts +46 -0
  92. package/esm/foundation/utils/web_app_url_utils.js +112 -0
  93. package/esm/index.d.ts +12 -6
  94. package/esm/index.js +75 -64
  95. package/esm/plugin/applepay/component.js +3 -3
  96. package/esm/plugin/applepay/service.d.ts +2 -2
  97. package/esm/plugin/applepay/service.js +2 -2
  98. package/esm/plugin/component/cashierApp.d.ts +7 -5
  99. package/esm/plugin/component/cashierApp.js +15 -8
  100. package/esm/plugin/component/channel.d.ts +4 -4
  101. package/esm/plugin/component/component.inline.style.d.ts +4 -4
  102. package/esm/plugin/component/component.inline.style.js +10 -8
  103. package/esm/plugin/component/component.popup.style.d.ts +6 -6
  104. package/esm/plugin/component/component.popup.style.js +6 -6
  105. package/esm/plugin/component/index.d.ts +8 -7
  106. package/esm/plugin/component/index.js +160 -103
  107. package/esm/plugin/const.js +5 -5
  108. package/esm/plugin/drop-in/index.d.ts +5 -5
  109. package/esm/plugin/drop-in/index.js +7 -7
  110. package/esm/plugin/type.d.ts +3 -3
  111. package/esm/service/element.d.ts +4 -0
  112. package/esm/service/element.js +51 -0
  113. package/esm/service/index.d.ts +1 -0
  114. package/esm/service/index.js +2 -0
  115. package/esm/types/index.d.ts +247 -39
  116. package/esm/types/index.js +109 -59
  117. package/esm/util/createIframeNode.d.ts +2 -2
  118. package/esm/util/createIframeNode.js +3 -3
  119. package/esm/util/getBackScheme.js +95 -3
  120. package/esm/util/security.d.ts +2 -2
  121. package/esm/util/security.js +2 -2
  122. package/package.json +2 -1
  123. package/esm/util/ua/index.d.ts +0 -2
  124. package/esm/util/ua/index.js +0 -2
  125. package/esm/util/ua/isAndroid.d.ts +0 -4
  126. package/esm/util/ua/isAndroid.js +0 -7
  127. package/esm/util/ua/isIOS.d.ts +0 -4
  128. package/esm/util/ua/isIOS.js +0 -7
@@ -1,11 +1,11 @@
1
1
  import type AMSCheckout from '../../core/instance';
2
- import type { eventPayload, eventPayloadContext, IappendIframeNodesParams, IMerchantAppointParam, Iselector } from '../../types';
3
- import { componentSignEnum, DeviceIdParameter, platformEnum, renderDisplayTypeEnum } from '../../types';
4
- type IrenderFuncParams = (context: ComponentApp, selector: Iselector, renderDisplayType: renderDisplayTypeEnum) => Promise<void>;
2
+ import type { EventPayload, EventPayloadContext, IappendIframeNodesParams, IMerchantAppointParam, Iselector } from '../../types';
3
+ import { ComponentSignEnum, DeviceIdParameter, PlatformEnum, DisplayTypeEnum } from '../../types';
4
+ type IrenderFuncParams = (context: ComponentApp, selector: Iselector, renderDisplayType: DisplayTypeEnum) => Promise<void>;
5
5
  export default class ComponentApp {
6
6
  app: null | HTMLIFrameElement;
7
7
  AMSSDK: AMSCheckout;
8
- platform: platformEnum;
8
+ platform: PlatformEnum;
9
9
  _performanceData: any[];
10
10
  _loadAppPromiseResolve: ((value: boolean) => void) | null;
11
11
  _isInitComponent: boolean;
@@ -51,7 +51,7 @@ export default class ComponentApp {
51
51
  /**
52
52
  * @description render iframe content
53
53
  */
54
- appendIframeNodes(componentSign: componentSignEnum, renderParams: IappendIframeNodesParams): Promise<void>;
54
+ appendIframeNodes(componentSign: ComponentSignEnum, renderParams: IappendIframeNodesParams): Promise<void>;
55
55
  appendPreloadIframeNodes(componentSign: any, productSceneVersion: any): void;
56
56
  private setParameterDefaultValues;
57
57
  private renderInlineLoading;
@@ -82,7 +82,8 @@ export default class ComponentApp {
82
82
  /**
83
83
  * @description Processing messages from iframe
84
84
  */
85
- _handleAppMessage(data: eventPayload): void;
85
+ _handleAppMessage(data: EventPayload): void;
86
+ private logEventCallback;
86
87
  private dismissLoadingFunc;
87
88
  private handleSizeChanged;
88
89
  private handleAuthUrlInfo;
@@ -101,7 +102,7 @@ export default class ComponentApp {
101
102
  * @description Send message to iframe
102
103
  */
103
104
  dispatchToApp(payload: {
104
- context: eventPayloadContext;
105
+ context: EventPayloadContext;
105
106
  }, targetElement?: any): any;
106
107
  /**
107
108
  * @description Subscribe to messages from SDK