jubo-sdk 1.5.0-beta.2 → 1.5.0-beta.6
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 +8 -0
- package/dist/OldJuboSdk.d.ts +8 -0
- package/dist/index.cjs.js +59 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +59 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +59 -1
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/utils/browserType.d.ts +4 -4
- package/package.json +1 -1
package/dist/JuboSdk.d.ts
CHANGED
|
@@ -28,6 +28,8 @@ declare class JuboSdk {
|
|
|
28
28
|
readonly channel: string;
|
|
29
29
|
readonly isfull: string;
|
|
30
30
|
readonly isOldApp: boolean;
|
|
31
|
+
/** 项目id */
|
|
32
|
+
readonly proid: string;
|
|
31
33
|
get detection(): boolean;
|
|
32
34
|
getOjbUrlFn(url: string): string;
|
|
33
35
|
/**
|
|
@@ -94,6 +96,12 @@ declare class JuboSdk {
|
|
|
94
96
|
* @param content 内容
|
|
95
97
|
*/
|
|
96
98
|
writeToClipboard(content: string): void;
|
|
99
|
+
/**
|
|
100
|
+
* 保存图片到相册
|
|
101
|
+
* @environment [ios, android]
|
|
102
|
+
* @param content 内容
|
|
103
|
+
*/
|
|
104
|
+
saveImageToAlbum(base64: string): void;
|
|
97
105
|
/**
|
|
98
106
|
* 隐藏或显示原生导航栏
|
|
99
107
|
* @environment [ios, android]
|
package/dist/OldJuboSdk.d.ts
CHANGED
|
@@ -28,6 +28,8 @@ declare class OldJuboSdk {
|
|
|
28
28
|
readonly channel: string;
|
|
29
29
|
readonly isfull: string;
|
|
30
30
|
readonly isOldApp: boolean;
|
|
31
|
+
/** 项目id */
|
|
32
|
+
readonly proid: string;
|
|
31
33
|
get detection(): boolean;
|
|
32
34
|
getOjbUrlFn(url: string): string;
|
|
33
35
|
/**
|
|
@@ -92,6 +94,12 @@ declare class OldJuboSdk {
|
|
|
92
94
|
* @param content 内容
|
|
93
95
|
*/
|
|
94
96
|
writeToClipboard(content: string): void;
|
|
97
|
+
/**
|
|
98
|
+
* 保存图片到相册
|
|
99
|
+
* @environment [ios, android]
|
|
100
|
+
* @param base64 内容
|
|
101
|
+
*/
|
|
102
|
+
saveImageToAlbum(base64: string): void;
|
|
95
103
|
/**
|
|
96
104
|
* 隐藏或显示原生导航栏
|
|
97
105
|
* @environment [ios, android]
|
package/dist/index.cjs.js
CHANGED
|
@@ -5290,6 +5290,10 @@ var browserType = BrowserType({
|
|
|
5290
5290
|
shell: 'channel',
|
|
5291
5291
|
shellRegexp: /channel/g,
|
|
5292
5292
|
shellValueRegexp: /channel=[\d._]+/g
|
|
5293
|
+
}, {
|
|
5294
|
+
shell: 'proid',
|
|
5295
|
+
shellRegexp: /proid/g,
|
|
5296
|
+
shellValueRegexp: /proid=[\d._]+/g
|
|
5293
5297
|
}]
|
|
5294
5298
|
});
|
|
5295
5299
|
|
|
@@ -6430,10 +6434,18 @@ var OldJuboSdk = /** @class */function () {
|
|
|
6430
6434
|
writable: true,
|
|
6431
6435
|
value: true
|
|
6432
6436
|
});
|
|
6437
|
+
/** 项目id */
|
|
6438
|
+
Object.defineProperty(this, "proid", {
|
|
6439
|
+
enumerable: true,
|
|
6440
|
+
configurable: true,
|
|
6441
|
+
writable: true,
|
|
6442
|
+
value: void 0
|
|
6443
|
+
});
|
|
6433
6444
|
var device = ls.get('device') || '';
|
|
6434
6445
|
var isfull = ls.get('isfull') || '';
|
|
6435
6446
|
var version = browserType.getShell('airmart') || ls.get('version') || '';
|
|
6436
6447
|
var channel = browserType.getShell('channel') || ls.get('channel') || '';
|
|
6448
|
+
var proid = browserType.getShell('proid') || ls.get('proid') || '';
|
|
6437
6449
|
this.options = options;
|
|
6438
6450
|
this.name = options.name;
|
|
6439
6451
|
this.isApp = browserType.isShell('airmart') || device === 'ios' || device === 'android';
|
|
@@ -6446,6 +6458,7 @@ var OldJuboSdk = /** @class */function () {
|
|
|
6446
6458
|
this.isCanShowNav = this.isApp && compareVersions(version, '2.5.0') >= 0 && isfull;
|
|
6447
6459
|
this.version = version;
|
|
6448
6460
|
this.channel = channel;
|
|
6461
|
+
this.proid = proid;
|
|
6449
6462
|
this.isfull = isfull;
|
|
6450
6463
|
return this;
|
|
6451
6464
|
}
|
|
@@ -6782,6 +6795,19 @@ var OldJuboSdk = /** @class */function () {
|
|
|
6782
6795
|
console.log('🚀 ~ file: OldJuboSdk.ts:270 ~ OldJuboSdk ~ title:', content);
|
|
6783
6796
|
}
|
|
6784
6797
|
});
|
|
6798
|
+
/**
|
|
6799
|
+
* 保存图片到相册
|
|
6800
|
+
* @environment [ios, android]
|
|
6801
|
+
* @param base64 内容
|
|
6802
|
+
*/
|
|
6803
|
+
Object.defineProperty(OldJuboSdk.prototype, "saveImageToAlbum", {
|
|
6804
|
+
enumerable: false,
|
|
6805
|
+
configurable: true,
|
|
6806
|
+
writable: true,
|
|
6807
|
+
value: function value(base64) {
|
|
6808
|
+
console.log('🚀 ~ file: OldJuboSdk.ts:270 ~ OldJuboSdk ~ title:', base64);
|
|
6809
|
+
}
|
|
6810
|
+
});
|
|
6785
6811
|
/**
|
|
6786
6812
|
* 隐藏或显示原生导航栏
|
|
6787
6813
|
* @environment [ios, android]
|
|
@@ -7248,10 +7274,18 @@ var JuboSdk = /** @class */function () {
|
|
|
7248
7274
|
writable: true,
|
|
7249
7275
|
value: false
|
|
7250
7276
|
});
|
|
7277
|
+
/** 项目id */
|
|
7278
|
+
Object.defineProperty(this, "proid", {
|
|
7279
|
+
enumerable: true,
|
|
7280
|
+
configurable: true,
|
|
7281
|
+
writable: true,
|
|
7282
|
+
value: void 0
|
|
7283
|
+
});
|
|
7251
7284
|
var device = ls.get('device') || '';
|
|
7252
7285
|
var isfull = ls.get('isfull') || '';
|
|
7253
7286
|
var version = browserType.getShell('airmart') || ls.get('version') || '';
|
|
7254
7287
|
var channel = browserType.getShell('channel') || ls.get('channel') || '';
|
|
7288
|
+
var proid = browserType.getShell('proid') || ls.get('proid') || '';
|
|
7255
7289
|
this.options = options;
|
|
7256
7290
|
this.name = options.name;
|
|
7257
7291
|
this.isApp = browserType.isShell('airmart') || device === 'ios' || device === 'android';
|
|
@@ -7265,6 +7299,7 @@ var JuboSdk = /** @class */function () {
|
|
|
7265
7299
|
this.isCanShowNav = this.isApp && true;
|
|
7266
7300
|
this.version = version;
|
|
7267
7301
|
this.channel = channel;
|
|
7302
|
+
this.proid = proid;
|
|
7268
7303
|
this.isfull = isfull;
|
|
7269
7304
|
this.isOldApp = this.isApp && compareVersions(version, this.options.oldAppVersion) <= 0;
|
|
7270
7305
|
if (this.isOldApp) {
|
|
@@ -7639,6 +7674,27 @@ var JuboSdk = /** @class */function () {
|
|
|
7639
7674
|
}
|
|
7640
7675
|
}
|
|
7641
7676
|
});
|
|
7677
|
+
/**
|
|
7678
|
+
* 保存图片到相册
|
|
7679
|
+
* @environment [ios, android]
|
|
7680
|
+
* @param content 内容
|
|
7681
|
+
*/
|
|
7682
|
+
Object.defineProperty(JuboSdk.prototype, "saveImageToAlbum", {
|
|
7683
|
+
enumerable: false,
|
|
7684
|
+
configurable: true,
|
|
7685
|
+
writable: true,
|
|
7686
|
+
value: function value(base64) {
|
|
7687
|
+
console.log('juboSDK.saveImageToAlbum', base64);
|
|
7688
|
+
if (!this.detection && this.isMiniProgram) return;
|
|
7689
|
+
try {
|
|
7690
|
+
dsBridge.call('saveImageToAlbum', {
|
|
7691
|
+
base64: base64
|
|
7692
|
+
});
|
|
7693
|
+
} catch (error) {
|
|
7694
|
+
console.log('🚀 ~ juboSDK.saveImageToAlbum', error);
|
|
7695
|
+
}
|
|
7696
|
+
}
|
|
7697
|
+
});
|
|
7642
7698
|
/**
|
|
7643
7699
|
* 隐藏或显示原生导航栏
|
|
7644
7700
|
* @environment [ios, android]
|
|
@@ -7918,10 +7974,12 @@ var device = urlData.device || ls.get('device') || '';
|
|
|
7918
7974
|
var isfull = urlData.isfull || ls.get('isfull') || '';
|
|
7919
7975
|
var version = urlData.version || ls.get('version') || '';
|
|
7920
7976
|
var channel = urlData.channel || ls.get('channel') || '';
|
|
7977
|
+
var proid = urlData.channel || ls.get('proid') || '';
|
|
7921
7978
|
ls.set('device', device);
|
|
7922
7979
|
ls.set('isfull', isfull);
|
|
7923
7980
|
ls.set('version', version);
|
|
7924
7981
|
ls.set('channel', channel);
|
|
7982
|
+
ls.set('proid', proid);
|
|
7925
7983
|
if (process.env.NODE_ENV === 'development') {
|
|
7926
7984
|
updateNotifier(pkg.name, pkg.version);
|
|
7927
7985
|
}
|
|
@@ -7932,6 +7990,6 @@ exports.default = JuboSdk;
|
|
|
7932
7990
|
exports.ls = ls;
|
|
7933
7991
|
|
|
7934
7992
|
if(typeof window !== 'undefined') {
|
|
7935
|
-
window._juboSDK_VERSION_ = '1.5.0-beta.
|
|
7993
|
+
window._juboSDK_VERSION_ = '1.5.0-beta.6'
|
|
7936
7994
|
}
|
|
7937
7995
|
//# sourceMappingURL=index.cjs.js.map
|