@alipay/ams-checkout 0.0.1726734012-dev.14 → 0.0.1726734012-dev.16

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.
@@ -5,14 +5,13 @@ export declare const getComponentSign: (params: IPaymentSessionMetaData) => Comp
5
5
  export declare const parseSessionData: (sessionData: string) => [IPaymentSessionMetaData, string];
6
6
  export type IAMSComponentOptions = IoptionsParams & {
7
7
  appVersion: string;
8
- isPreload?: boolean;
9
8
  };
10
9
  export declare class AMSComponent extends CoreInstance {
11
10
  _componentApp: ComponentApp;
12
11
  channelType: ComponentSignEnum[];
13
12
  productSceneVersion: string;
14
13
  timer: any;
15
- isSuccessfullyPreloaded: boolean;
14
+ static isSuccessfullyPreloaded: boolean;
16
15
  constructor(options: IAMSComponentOptions);
17
16
  private parameterInitAndCheck;
18
17
  private pluginAppendIframe;
@@ -140,7 +140,6 @@ export var AMSComponent = /*#__PURE__*/function (_CoreInstance) {
140
140
  _defineProperty(_assertThisInitialized(_this2), "channelType", void 0);
141
141
  _defineProperty(_assertThisInitialized(_this2), "productSceneVersion", void 0);
142
142
  _defineProperty(_assertThisInitialized(_this2), "timer", void 0);
143
- _defineProperty(_assertThisInitialized(_this2), "isSuccessfullyPreloaded", void 0);
144
143
  var ComponentPlugin = new ComponentApp({
145
144
  appVersion: options.appVersion
146
145
  });
@@ -150,7 +149,6 @@ export var AMSComponent = /*#__PURE__*/function (_CoreInstance) {
150
149
  _this2._registerPlugin(COMPONENTPLUGINID, ComponentPlugin);
151
150
  _this2._componentApp = _this2._getPlugin(COMPONENTPLUGINID);
152
151
  _this2.registerBusAbility();
153
- _this2.isSuccessfullyPreloaded = options.isPreload;
154
152
  return _this2;
155
153
  }
156
154
  _createClass(AMSComponent, [{
@@ -398,7 +396,6 @@ export var AMSComponent = /*#__PURE__*/function (_CoreInstance) {
398
396
  if (Array.isArray(channelType)) {
399
397
  for (var i = 0; i < channelType.length; i++) {
400
398
  this._componentApp.appendPreloadIframeNodes(channelType[i], productSceneVersion);
401
- this.isSuccessfullyPreloaded = true;
402
399
  }
403
400
  } else {
404
401
  this.logger.logError({
@@ -534,9 +531,7 @@ export var AMSComponent = /*#__PURE__*/function (_CoreInstance) {
534
531
  value: function preload(_options) {
535
532
  try {
536
533
  var _currentCompoentApp$c;
537
- var currentCompoentApp = new AMSComponent(_objectSpread(_objectSpread({}, _options), {}, {
538
- isPreload: true
539
- }));
534
+ var currentCompoentApp = new AMSComponent(_objectSpread({}, _options));
540
535
  currentCompoentApp.preloadComponent(_options.channelType, _options.productSceneVersion || '1.0');
541
536
  if (currentCompoentApp.channelType && (_currentCompoentApp$c = currentCompoentApp.channelType) !== null && _currentCompoentApp$c !== void 0 && _currentCompoentApp$c.some(function (val) {
542
537
  return val === ComponentSignEnum.EASY_PAY_WALLET || val === ComponentSignEnum.EASY_PAY_APM;
@@ -551,4 +546,5 @@ export var AMSComponent = /*#__PURE__*/function (_CoreInstance) {
551
546
  }
552
547
  }]);
553
548
  return AMSComponent;
554
- }(CoreInstance);
549
+ }(CoreInstance);
550
+ _defineProperty(AMSComponent, "isSuccessfullyPreloaded", void 0);
package/esm/index.js CHANGED
@@ -43,17 +43,15 @@ export var AMSCheckout = /*#__PURE__*/function (_AMSComponent) {
43
43
  _this = _super.call(this, _objectSpread({
44
44
  appVersion: AMSCheckoutAppVersion
45
45
  }, _options));
46
- console.log(_this.isSuccessfullyPreloaded, 'isSuccessfullyPreloaded');
47
- if (!_this.isSuccessfullyPreloaded) {
46
+ if (!AMSComponent.isSuccessfullyPreloaded) {
48
47
  _this.preloadComponent(channelType, productSceneVersion);
49
48
  }
50
- // this.channelType = channelType;
51
- // this.productSceneVersion = productSceneVersion;
52
49
  return _this;
53
50
  }
54
51
  _createClass(AMSCheckout, null, [{
55
52
  key: "preload",
56
53
  value: function preload(_options) {
54
+ AMSComponent.isSuccessfullyPreloaded = true;
57
55
  AMSComponent.preload(_objectSpread(_objectSpread({}, _options), {}, {
58
56
  appVersion: AMSCheckoutAppVersion
59
57
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alipay/ams-checkout",
3
- "version": "0.0.1726734012-dev.14",
3
+ "version": "0.0.1726734012-dev.16",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "main": "esm/index.js",