zmp-sdk 2.16.0 → 2.16.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.
@@ -35217,7 +35217,7 @@
35217
35217
  },
35218
35218
  MP_OPEN_PROFILE_PICKER: {
35219
35219
  name: 'action.mp.open.profile.picker',
35220
- version_live: { iOS: 999 }
35220
+ version_live: { iOS: 432 }
35221
35221
  },
35222
35222
  GET_SUPPORTED_ACTIONS: {
35223
35223
  name: 'action.get.supported.actions',
@@ -36715,7 +36715,7 @@
36715
36715
  }
36716
36716
  _ZJSBridgeProvider_bridge = new WeakMap();
36717
36717
 
36718
- var version = "2.16.0";
36718
+ var version = "2.16.1";
36719
36719
 
36720
36720
  class Basics {
36721
36721
  /**
@@ -38565,11 +38565,23 @@
38565
38565
  */
38566
38566
  static createShortcut(object) {
38567
38567
  return __awaiter(this, void 0, void 0, function* () {
38568
- yield this.callNative(ACTION.CREATE_SHORTCUT.name, {
38569
- url: `${CONFIG.MINI_APP_LINK}/${this.getAppId()}/`,
38570
- title: document.title,
38571
- iconUrl: `https:${getMetaValue('og:image:url')}`
38572
- });
38568
+ const isIOS = checkPlatform().isIOS;
38569
+ let iconURL = getMetaValue('og:image:url');
38570
+ if (!(iconURL === null || iconURL === void 0 ? void 0 : iconURL.includes('https'))) {
38571
+ iconURL = `https:${iconURL}`;
38572
+ }
38573
+ if (isIOS) {
38574
+ const iosShortcutURL = `https://mini.zalo.me/shortcut.html?appId=${this.getAppId()}&appName=${document.title}&appIcon=${iconURL}`;
38575
+ return yield this.callNative(ACTION.OPEN_OUTAPP.name, {
38576
+ url: encodeURI(iosShortcutURL)
38577
+ });
38578
+ }
38579
+ else
38580
+ return yield this.callNative(ACTION.CREATE_SHORTCUT.name, {
38581
+ url: `${CONFIG.MINI_APP_LINK}/${this.getAppId()}/`,
38582
+ title: document.title,
38583
+ iconUrl: iconURL
38584
+ });
38573
38585
  });
38574
38586
  }
38575
38587
  /**
@@ -41311,6 +41323,7 @@
41311
41323
  __decorate([
41312
41324
  handleError,
41313
41325
  validate,
41326
+ __param(0, required(['SSID'])),
41314
41327
  __param(0, checkType('object', {
41315
41328
  SSID: checkData('string'),
41316
41329
  'password?': checkData('string'),
package/dist/index.es.js CHANGED
@@ -35214,7 +35214,7 @@ const ACTION = {
35214
35214
  },
35215
35215
  MP_OPEN_PROFILE_PICKER: {
35216
35216
  name: 'action.mp.open.profile.picker',
35217
- version_live: { iOS: 999 }
35217
+ version_live: { iOS: 432 }
35218
35218
  },
35219
35219
  GET_SUPPORTED_ACTIONS: {
35220
35220
  name: 'action.get.supported.actions',
@@ -36712,7 +36712,7 @@ class ZJSBridgeProvider {
36712
36712
  }
36713
36713
  _ZJSBridgeProvider_bridge = new WeakMap();
36714
36714
 
36715
- var version = "2.16.0";
36715
+ var version = "2.16.1";
36716
36716
 
36717
36717
  class Basics {
36718
36718
  /**
@@ -38562,11 +38562,23 @@ class Zalo {
38562
38562
  */
38563
38563
  static createShortcut(object) {
38564
38564
  return __awaiter(this, void 0, void 0, function* () {
38565
- yield this.callNative(ACTION.CREATE_SHORTCUT.name, {
38566
- url: `${CONFIG.MINI_APP_LINK}/${this.getAppId()}/`,
38567
- title: document.title,
38568
- iconUrl: `https:${getMetaValue('og:image:url')}`
38569
- });
38565
+ const isIOS = checkPlatform().isIOS;
38566
+ let iconURL = getMetaValue('og:image:url');
38567
+ if (!(iconURL === null || iconURL === void 0 ? void 0 : iconURL.includes('https'))) {
38568
+ iconURL = `https:${iconURL}`;
38569
+ }
38570
+ if (isIOS) {
38571
+ const iosShortcutURL = `https://mini.zalo.me/shortcut.html?appId=${this.getAppId()}&appName=${document.title}&appIcon=${iconURL}`;
38572
+ return yield this.callNative(ACTION.OPEN_OUTAPP.name, {
38573
+ url: encodeURI(iosShortcutURL)
38574
+ });
38575
+ }
38576
+ else
38577
+ return yield this.callNative(ACTION.CREATE_SHORTCUT.name, {
38578
+ url: `${CONFIG.MINI_APP_LINK}/${this.getAppId()}/`,
38579
+ title: document.title,
38580
+ iconUrl: iconURL
38581
+ });
38570
38582
  });
38571
38583
  }
38572
38584
  /**
@@ -41308,6 +41320,7 @@ __decorate([
41308
41320
  __decorate([
41309
41321
  handleError,
41310
41322
  validate,
41323
+ __param(0, required(['SSID'])),
41311
41324
  __param(0, checkType('object', {
41312
41325
  SSID: checkData('string'),
41313
41326
  'password?': checkData('string'),