jubo-sdk 1.2.1 → 1.2.2-beta.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.
package/dist/JuboSdk.d.ts CHANGED
@@ -8,6 +8,8 @@ declare class JuboSdk {
8
8
  readonly isApp: boolean;
9
9
  /** 是否是小程序 */
10
10
  readonly isMiniProgram: boolean;
11
+ /** 是否是支付宝小程序 */
12
+ readonly isAlipayMini: boolean;
11
13
  /** 是否是h5 */
12
14
  readonly isH5: boolean;
13
15
  /** 是否是H5内嵌 */
@@ -8,6 +8,8 @@ declare class OldJuboSdk {
8
8
  readonly isApp: boolean;
9
9
  /** 是否是小程序 */
10
10
  readonly isMiniProgram: boolean;
11
+ /** 是否是支付宝小程序 */
12
+ readonly isAlipayMini: boolean;
11
13
  /** 是否是h5 */
12
14
  readonly isH5: boolean;
13
15
  /** 是否是H5内嵌 */
package/dist/index.cjs.js CHANGED
@@ -392,10 +392,10 @@ var store$1 = sharedStore;
392
392
  (shared$4.exports = function (key, value) {
393
393
  return store$1[key] || (store$1[key] = value !== undefined ? value : {});
394
394
  })('versions', []).push({
395
- version: '3.33.0',
395
+ version: '3.33.1',
396
396
  mode: 'global',
397
397
  copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
398
- license: 'https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE',
398
+ license: 'https://github.com/zloirock/core-js/blob/v3.33.1/LICENSE',
399
399
  source: 'https://github.com/zloirock/core-js'
400
400
  });
401
401
 
@@ -710,7 +710,7 @@ if (DESCRIPTORS$7 && !FUNCTION_NAME_EXISTS) {
710
710
  * @Date: 2023-03-20 19:26:34
711
711
  * @Description:
712
712
  * @LastEditors: Lanrri
713
- * @LastEditTime: 2023-06-14 15:55:26
713
+ * @LastEditTime: 2023-10-19 19:27:02
714
714
  */
715
715
  exports.systemTypeEnum = void 0;
716
716
  (function (systemTypeEnum) {
@@ -746,6 +746,10 @@ exports.shellTypeEnum = void 0;
746
746
  shellTypeEnum["wechat"] = "wechat";
747
747
  /** 微信小程序 */
748
748
  shellTypeEnum["wechat-miniprogram"] = "wechat-miniprogram";
749
+ /** 支付宝 */
750
+ shellTypeEnum["alipay"] = "alipay";
751
+ /** 支付宝小程序 */
752
+ shellTypeEnum["alipay-miniprogram"] = "alipay-miniprogram";
749
753
  /** qq */
750
754
  shellTypeEnum["qq"] = "qq";
751
755
  /** uc */
@@ -1565,13 +1569,12 @@ var es_array_iterator = defineIterator$2(Array, 'Array', function (iterated, kin
1565
1569
  }, function () {
1566
1570
  var state = getInternalState$2(this);
1567
1571
  var target = state.target;
1568
- var kind = state.kind;
1569
1572
  var index = state.index++;
1570
1573
  if (!target || index >= target.length) {
1571
1574
  state.target = undefined;
1572
1575
  return createIterResultObject$2(undefined, true);
1573
1576
  }
1574
- switch (kind) {
1577
+ switch (state.kind) {
1575
1578
  case 'keys': return createIterResultObject$2(index, false);
1576
1579
  case 'values': return createIterResultObject$2(target[index], false);
1577
1580
  } return createIterResultObject$2([index, target[index]], false);
@@ -5150,12 +5153,20 @@ var supporterArr = [{
5150
5153
  }];
5151
5154
  var defaultShellArr = [{
5152
5155
  shell: 'wechat-miniprogram',
5153
- shellRegexp: /miniprogram/g,
5156
+ shellRegexp: /(?=.*micromessenger)(?=.*miniprogram)/g,
5154
5157
  shellValueRegexp: /miniprogram\/[\d._]+/g
5155
5158
  }, {
5156
5159
  shell: 'wechat',
5157
5160
  shellRegexp: /micromessenger/g,
5158
5161
  shellValueRegexp: /micromessenger\/[\d._]+/g
5162
+ }, {
5163
+ shell: 'alipay-miniprogram',
5164
+ shellRegexp: /(?=.*aliapp)(?=.*miniprogram)/g,
5165
+ shellValueRegexp: /miniprogram\/[\d._]+/g
5166
+ }, {
5167
+ shell: 'alipay',
5168
+ shellRegexp: /aliapp/g,
5169
+ shellValueRegexp: /aliapp\(AP\/([\d.]+)\)/g
5159
5170
  }, {
5160
5171
  shell: 'qq',
5161
5172
  shellRegexp: /qqbrowser/g,
@@ -6343,6 +6354,13 @@ var OldJuboSdk = /** @class */function () {
6343
6354
  writable: true,
6344
6355
  value: false
6345
6356
  });
6357
+ /** 是否是支付宝小程序 */
6358
+ Object.defineProperty(this, "isAlipayMini", {
6359
+ enumerable: true,
6360
+ configurable: true,
6361
+ writable: true,
6362
+ value: false
6363
+ });
6346
6364
  /** 是否是h5 */
6347
6365
  Object.defineProperty(this, "isH5", {
6348
6366
  enumerable: true,
@@ -7112,6 +7130,13 @@ var JuboSdk = /** @class */function () {
7112
7130
  writable: true,
7113
7131
  value: false
7114
7132
  });
7133
+ /** 是否是支付宝小程序 */
7134
+ Object.defineProperty(this, "isAlipayMini", {
7135
+ enumerable: true,
7136
+ configurable: true,
7137
+ writable: true,
7138
+ value: false
7139
+ });
7115
7140
  /** 是否是h5 */
7116
7141
  Object.defineProperty(this, "isH5", {
7117
7142
  enumerable: true,
@@ -7181,10 +7206,11 @@ var JuboSdk = /** @class */function () {
7181
7206
  this.name = options.name;
7182
7207
  this.isApp = browserType.isShell('airmart') || device === 'ios' || device === 'android';
7183
7208
  this.isMiniProgram = browserType.isShell('wechat-miniprogram') || device === 'wx';
7209
+ this.isAlipayMini = browserType.isShell('alipay-miniprogram') || device === 'alipay-mini';
7184
7210
  this.isH5 = device === 'h5';
7185
7211
  this.isIframe = device === 'h5' && window.top !== window.self;
7186
7212
  this.isIos = browserType.system === 'ios' || device === 'ios';
7187
- this.device = this.isMiniProgram ? 'wx' : this.isApp ? browserType.system : device;
7213
+ this.device = device === 'h5' ? 'h5' : this.isAlipayMini ? 'alipay' : this.isMiniProgram ? 'wx' : this.isApp ? browserType.system : device;
7188
7214
  this.isCanShowNav = this.isApp && true;
7189
7215
  this.version = version;
7190
7216
  this.channel = channel;
@@ -7791,6 +7817,6 @@ exports.default = JuboSdk;
7791
7817
  exports.ls = ls;
7792
7818
 
7793
7819
  if(typeof window !== 'undefined') {
7794
- window._juboSDK_VERSION_ = '1.2.1'
7820
+ window._juboSDK_VERSION_ = '1.2.2-beta.1'
7795
7821
  }
7796
7822
  //# sourceMappingURL=index.cjs.js.map