@alipay/ams-checkout 0.0.1754626040-dev.1 → 0.0.1755250474-dev.1

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.
@@ -28,10 +28,10 @@ import { EVENT } from "../../../../constant";
28
28
  import { ServiceProvider } from "../../../../foundation/service";
29
29
  import { ApplePaySdk, handleGooglePay, isSkipRenderPaymentMethod } from "../../../../plugin/component/channel";
30
30
  import { LogConfig, Logger } from "../../../../util/logger";
31
- import { queryParse } from "../../../../util";
31
+ import { device, queryParse } from "../../../../util";
32
32
  import { parseSessionData } from "../../index";
33
33
  import { oneAccount, sdkAction } from "../mock";
34
- import { generateIframeSrc as _generateIframeSrc, isElementPC, isElementPad } from "../util";
34
+ import { generateIframeSrc as _generateIframeSrc, isElementPad } from "../util";
35
35
  import BaseElementProcessor from "./baseElementProcessor";
36
36
  var logger = new Logger(LogConfig, true);
37
37
  var PaymentProcessor = /*#__PURE__*/function (_BaseElementProcessor) {
@@ -255,7 +255,7 @@ var PaymentProcessor = /*#__PURE__*/function (_BaseElementProcessor) {
255
255
  isConnect = paymentSessionObj === null || paymentSessionObj === void 0 || (_paymentSessionObj$co = paymentSessionObj.connectFactor) === null || _paymentSessionObj$co === void 0 ? void 0 : _paymentSessionObj$co.enableConnect;
256
256
  LOCAL_MOCK = window.location.href.indexOf('LOCAL_MOCK=1') !== -1;
257
257
  _queryParse = queryParse(this.getElementUrl()), appType = _queryParse.appType;
258
- terminalType = isElementPad() ? 'WEB' : appType ? 'APP' : isElementPC() ? 'WEB' : 'WAP';
258
+ terminalType = isElementPad() ? 'WEB' : appType ? 'APP' : device.isMobile ? 'WAP' : 'WEB';
259
259
  generateActionQueryPromise = function generateActionQueryPromise() {
260
260
  return new Promise(function (resolve, reject) {
261
261
  var _displayInfo$merchant;
package/esm/index.d.ts CHANGED
@@ -25,7 +25,7 @@ export declare class AntomElement extends AMSCheckout {
25
25
  export declare class AddressElement extends AddressComponent {
26
26
  constructor(options: IoptionsAddressParams);
27
27
  }
28
- export declare class AMSElement extends ElementComponent {
28
+ export declare class Element extends ElementComponent {
29
29
  constructor(options: IElementOptions);
30
30
  }
31
31
  export declare class AMSEasyPay {
package/esm/index.js CHANGED
@@ -39,10 +39,10 @@ import { LogConfig, Logger } from "./util/logger";
39
39
  var logger = new Logger(LogConfig, true);
40
40
  export { AMSCheckoutPage } from "./core/component/ckp";
41
41
  export * from "./types";
42
- import { EVENT } from "./constant";
43
42
  import { AntomSDKCore } from "./foundation/core";
44
43
  import { AutoDebitProcessor } from "./foundation/product-processor/autoDebit";
45
44
  import { EasySafePayProcessor } from "./foundation/product-processor/easysafepay";
45
+ import { EVENT } from "./constant";
46
46
  export var AMSCheckout = /*#__PURE__*/function (_AMSComponent) {
47
47
  _inherits(AMSCheckout, _AMSComponent);
48
48
  var _super = _createSuper(AMSCheckout);
@@ -204,18 +204,18 @@ export var AddressElement = /*#__PURE__*/function (_AddressComponent) {
204
204
  }
205
205
  return _createClass(AddressElement);
206
206
  }(AddressComponent);
207
- export var AMSElement = /*#__PURE__*/function (_ElementComponent) {
208
- _inherits(AMSElement, _ElementComponent);
209
- var _super7 = _createSuper(AMSElement);
210
- function AMSElement(options) {
211
- _classCallCheck(this, AMSElement);
207
+ export var Element = /*#__PURE__*/function (_ElementComponent) {
208
+ _inherits(Element, _ElementComponent);
209
+ var _super7 = _createSuper(Element);
210
+ function Element(options) {
211
+ _classCallCheck(this, Element);
212
212
  var _options = Object.assign({}, options, {
213
213
  product: ProductSceneEnum.ELEMENT_PAYMENT,
214
214
  environment: options.environment
215
215
  });
216
216
  return _super7.call(this, _options);
217
217
  }
218
- return _createClass(AMSElement);
218
+ return _createClass(Element);
219
219
  }(ElementComponent);
220
220
  export var AMSEasyPay = /*#__PURE__*/function () {
221
221
  function AMSEasyPay(options) {
@@ -23,7 +23,7 @@ import { COMPONENTPLUGINID, COMPONENT_CLOSE_BLOCK_ID, COMPONENT_CLOSE_MASK_BLOCK
23
23
  import { ElementPaymentMethod } from "../../core/component/oldElement/type";
24
24
  import { queryPaymentInfo, submitPayInfo } from "../../service";
25
25
  import { ComponentSignEnum, DisplayTypeEnum, eventCodeEnum, MessageName, PlatformEnum, ProductSceneEnum, RedirectType, TargetEnum } from "../../types";
26
- import { getType, isJsonString, isPC } from "../../util";
26
+ import { getType, isJsonString, isPC, device } from "../../util";
27
27
  import { getBackScheme } from "../../util/getBackScheme";
28
28
  import { isLocalMock } from "../../util/mock";
29
29
  import { matchVersion } from "../../util/versionCompare";
@@ -71,7 +71,7 @@ var ComponentApp = /*#__PURE__*/function () {
71
71
  this.createPreloadIframeNode = function () {
72
72
  return Promise.resolve();
73
73
  };
74
- this.platform = isPC() ? PlatformEnum.desktop : PlatformEnum.mobile;
74
+ this.platform = device.isMobile ? PlatformEnum.mobile : PlatformEnum.desktop;
75
75
  this._isRetention = true;
76
76
  this._appLocationSearch = '';
77
77
  this._performanceData.push({
@@ -649,12 +649,12 @@ export declare enum eventCodeEnum {
649
649
  SDK_INIT_PARAMETER_ERROR = "SDK_INIT_PARAMETER_ERROR",
650
650
  SDK_CREATECOMPONENT_ERROR = "SDK_CREATECOMPONENT_ERROR",
651
651
  /**
652
- * 拉取WEB应用&收银台失败
653
- */
652
+ * 拉取WEB应用&收银台失败
653
+ */
654
654
  SDK_LAUNCH_PAYMENT_APP_ERROR = "SDK_LAUNCH_PAYMENT_APP_ERROR",
655
655
  /**
656
- * 拉取WEB应用&收银台成功
657
- */
656
+ * 拉取WEB应用&收银台成功
657
+ */
658
658
  SDK_CALL_URL_SUCCESS = "SDK_CALL_URL_SUCCESS",
659
659
  /**
660
660
  @deprecated 已废弃 请使用SDK_LAUNCH_PAYMENT_APP_ERROR
@@ -54,8 +54,4 @@ declare const isEmpty: (value: any) => boolean;
54
54
  * @returns 如果值为true或者字符串"true"(不区分大小写),则返回true,否则返回false
55
55
  */
56
56
  declare const isTrue: (value: unknown) => boolean;
57
- export declare const omit: <T extends {
58
- [x: string]: any;
59
- hasOwnProperty: (arg0: any) => any;
60
- }>(obj: T, keys: Array<keyof T>) => T;
61
57
  export { getType, EventCenter, getViewPort, getOrigin, serialize, isJsonString, isDom, isFunction, device, safeJson, isPC, queryParse, getDesignFontSize, amsSetSize, addSetFontSizeEvent, getOrSetStorageId, checkTimeElapsed, parseBase64ToString, loadSDKScript, isEmpty, isTrue, };
package/esm/util/index.js CHANGED
@@ -371,12 +371,4 @@ var isEmpty = function isEmpty(value) {
371
371
  var isTrue = function isTrue(value) {
372
372
  return value === true || typeof value === 'string' && value.toLowerCase() === 'true';
373
373
  };
374
- export var omit = function omit(obj, keys) {
375
- return Object.keys(obj).reduce(function (acc, key) {
376
- if (!keys.includes(key)) {
377
- acc[key] = obj[key];
378
- }
379
- return acc;
380
- }, {});
381
- };
382
374
  export { getType, EventCenter, getViewPort, getOrigin, serialize, isJsonString, isDom, isFunction, device, safeJson, isPC, queryParse, getDesignFontSize, amsSetSize, addSetFontSizeEvent, getOrSetStorageId, checkTimeElapsed, parseBase64ToString, loadSDKScript, isEmpty, isTrue };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alipay/ams-checkout",
3
- "version": "0.0.1754626040-dev.1",
3
+ "version": "0.0.1755250474-dev.1",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "main": "esm/index.js",