zmp-sdk 2.18.6 → 2.18.9
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/browser.min.js
CHANGED
|
@@ -2086,9 +2086,7 @@
|
|
|
2086
2086
|
return window.Debug(name);
|
|
2087
2087
|
}
|
|
2088
2088
|
return function (...args) {
|
|
2089
|
-
if (process.env.NODE_ENV === 'development')
|
|
2090
|
-
console.log(name, ...args);
|
|
2091
|
-
}
|
|
2089
|
+
if (process.env.NODE_ENV === 'development') ;
|
|
2092
2090
|
};
|
|
2093
2091
|
}
|
|
2094
2092
|
|
|
@@ -2172,8 +2170,6 @@
|
|
|
2172
2170
|
MediaPickerType[MediaPickerType["photo"] = 4] = "photo";
|
|
2173
2171
|
MediaPickerType[MediaPickerType["video"] = 5] = "video";
|
|
2174
2172
|
MediaPickerType[MediaPickerType["file"] = 6] = "file";
|
|
2175
|
-
MediaPickerType[MediaPickerType["multi_photo"] = 7] = "multi_photo";
|
|
2176
|
-
MediaPickerType[MediaPickerType["multi_video"] = 8] = "multi_video";
|
|
2177
2173
|
})(MediaPickerType || (MediaPickerType = {}));
|
|
2178
2174
|
|
|
2179
2175
|
const readCookie = (name) => {
|
|
@@ -2583,7 +2579,7 @@
|
|
|
2583
2579
|
},
|
|
2584
2580
|
PICK_MEDIA: {
|
|
2585
2581
|
name: 'action.pick.media',
|
|
2586
|
-
version_live: { iOS:
|
|
2582
|
+
version_live: { iOS: 452 }
|
|
2587
2583
|
},
|
|
2588
2584
|
MP_CLOSE_LOADINGVIEW: {
|
|
2589
2585
|
name: 'action.mp.close.loadingview'
|
|
@@ -2798,7 +2794,7 @@
|
|
|
2798
2794
|
fail.call(null, errorParsed, this);
|
|
2799
2795
|
}
|
|
2800
2796
|
else {
|
|
2801
|
-
|
|
2797
|
+
reject(errorParsed);
|
|
2802
2798
|
}
|
|
2803
2799
|
}
|
|
2804
2800
|
}));
|
|
@@ -2825,12 +2821,9 @@
|
|
|
2825
2821
|
}
|
|
2826
2822
|
}
|
|
2827
2823
|
const { handler } = catchDecoratorStore;
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
else {
|
|
2832
|
-
console.warn(error.message);
|
|
2833
|
-
}
|
|
2824
|
+
const errorParsed = handler.call(null, key, error, this);
|
|
2825
|
+
window.zmpSentry && window.zmpSentry.throwError(errorParsed.toString());
|
|
2826
|
+
throw errorParsed;
|
|
2834
2827
|
}
|
|
2835
2828
|
};
|
|
2836
2829
|
return descriptor;
|
|
@@ -4062,7 +4055,7 @@
|
|
|
4062
4055
|
}
|
|
4063
4056
|
_ZJSBridgeProvider_bridge = new WeakMap();
|
|
4064
4057
|
|
|
4065
|
-
var version = "2.18.
|
|
4058
|
+
var version = "2.18.9";
|
|
4066
4059
|
|
|
4067
4060
|
class Basics {
|
|
4068
4061
|
/**
|
|
@@ -5538,14 +5531,21 @@
|
|
|
5538
5531
|
return [key, value].join('=');
|
|
5539
5532
|
})
|
|
5540
5533
|
.join('&');
|
|
5541
|
-
|
|
5534
|
+
let appInfo;
|
|
5535
|
+
try {
|
|
5536
|
+
appInfo = yield getAppInfo(appId, 0);
|
|
5537
|
+
}
|
|
5538
|
+
catch (error) { }
|
|
5539
|
+
const mpInfo = {
|
|
5540
|
+
appId: appId
|
|
5541
|
+
};
|
|
5542
|
+
if (appInfo) {
|
|
5543
|
+
mpInfo.appName = appInfo.name;
|
|
5544
|
+
mpInfo.appAvtUrl = appInfo.logoUrl;
|
|
5545
|
+
}
|
|
5542
5546
|
yield this.callNative(ACTION.OPEN_MP, {
|
|
5543
5547
|
mpUrl: `${MINI_APP_INTERNAL_LINK}/${appId}/${queryParamString.length > 0 ? '?' + queryParamString : ''}`,
|
|
5544
|
-
mpInfo:
|
|
5545
|
-
appId: appId,
|
|
5546
|
-
appAvtUrl: appInfo.logoUrl || '',
|
|
5547
|
-
appName: appInfo.name || '',
|
|
5548
|
-
}
|
|
5548
|
+
mpInfo: mpInfo
|
|
5549
5549
|
});
|
|
5550
5550
|
});
|
|
5551
5551
|
}
|
|
@@ -5896,11 +5896,11 @@
|
|
|
5896
5896
|
data: {
|
|
5897
5897
|
ZInstantAPIInfo: {
|
|
5898
5898
|
url: `${zmpShareableInfo.zinstantApi}`,
|
|
5899
|
-
zinstantdata_id: `templateId
|
|
5899
|
+
zinstantdata_id: `templateId=${zmpShareableInfo.ztemplateId}&appId=${this.getAppId()}&shareId=${zmpShareableInfo.shareId}`
|
|
5900
5900
|
},
|
|
5901
5901
|
previewMsgText: {
|
|
5902
5902
|
msg: {
|
|
5903
|
-
en: 'Mini
|
|
5903
|
+
en: 'Zalo Mini Program',
|
|
5904
5904
|
vi: 'Chương trình nhỏ'
|
|
5905
5905
|
}
|
|
5906
5906
|
},
|
package/dist/index.es.js
CHANGED
|
@@ -2083,9 +2083,7 @@ function Debug(name) {
|
|
|
2083
2083
|
return window.Debug(name);
|
|
2084
2084
|
}
|
|
2085
2085
|
return function (...args) {
|
|
2086
|
-
if (process.env.NODE_ENV === 'development')
|
|
2087
|
-
console.log(name, ...args);
|
|
2088
|
-
}
|
|
2086
|
+
if (process.env.NODE_ENV === 'development') ;
|
|
2089
2087
|
};
|
|
2090
2088
|
}
|
|
2091
2089
|
|
|
@@ -2169,8 +2167,6 @@ var MediaPickerType;
|
|
|
2169
2167
|
MediaPickerType[MediaPickerType["photo"] = 4] = "photo";
|
|
2170
2168
|
MediaPickerType[MediaPickerType["video"] = 5] = "video";
|
|
2171
2169
|
MediaPickerType[MediaPickerType["file"] = 6] = "file";
|
|
2172
|
-
MediaPickerType[MediaPickerType["multi_photo"] = 7] = "multi_photo";
|
|
2173
|
-
MediaPickerType[MediaPickerType["multi_video"] = 8] = "multi_video";
|
|
2174
2170
|
})(MediaPickerType || (MediaPickerType = {}));
|
|
2175
2171
|
|
|
2176
2172
|
const readCookie = (name) => {
|
|
@@ -2580,7 +2576,7 @@ const ACTION = {
|
|
|
2580
2576
|
},
|
|
2581
2577
|
PICK_MEDIA: {
|
|
2582
2578
|
name: 'action.pick.media',
|
|
2583
|
-
version_live: { iOS:
|
|
2579
|
+
version_live: { iOS: 452 }
|
|
2584
2580
|
},
|
|
2585
2581
|
MP_CLOSE_LOADINGVIEW: {
|
|
2586
2582
|
name: 'action.mp.close.loadingview'
|
|
@@ -2795,7 +2791,7 @@ const handleError = (target, propertyName, descriptor) => {
|
|
|
2795
2791
|
fail.call(null, errorParsed, this);
|
|
2796
2792
|
}
|
|
2797
2793
|
else {
|
|
2798
|
-
|
|
2794
|
+
reject(errorParsed);
|
|
2799
2795
|
}
|
|
2800
2796
|
}
|
|
2801
2797
|
}));
|
|
@@ -2822,12 +2818,9 @@ const handleErrorSync = (target, key, descriptor) => {
|
|
|
2822
2818
|
}
|
|
2823
2819
|
}
|
|
2824
2820
|
const { handler } = catchDecoratorStore;
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
else {
|
|
2829
|
-
console.warn(error.message);
|
|
2830
|
-
}
|
|
2821
|
+
const errorParsed = handler.call(null, key, error, this);
|
|
2822
|
+
window.zmpSentry && window.zmpSentry.throwError(errorParsed.toString());
|
|
2823
|
+
throw errorParsed;
|
|
2831
2824
|
}
|
|
2832
2825
|
};
|
|
2833
2826
|
return descriptor;
|
|
@@ -4059,7 +4052,7 @@ class ZJSBridgeProvider {
|
|
|
4059
4052
|
}
|
|
4060
4053
|
_ZJSBridgeProvider_bridge = new WeakMap();
|
|
4061
4054
|
|
|
4062
|
-
var version$1 = "2.18.
|
|
4055
|
+
var version$1 = "2.18.9";
|
|
4063
4056
|
|
|
4064
4057
|
class Basics {
|
|
4065
4058
|
/**
|
|
@@ -5535,14 +5528,21 @@ class Window {
|
|
|
5535
5528
|
return [key, value].join('=');
|
|
5536
5529
|
})
|
|
5537
5530
|
.join('&');
|
|
5538
|
-
|
|
5531
|
+
let appInfo;
|
|
5532
|
+
try {
|
|
5533
|
+
appInfo = yield getAppInfo(appId, 0);
|
|
5534
|
+
}
|
|
5535
|
+
catch (error) { }
|
|
5536
|
+
const mpInfo = {
|
|
5537
|
+
appId: appId
|
|
5538
|
+
};
|
|
5539
|
+
if (appInfo) {
|
|
5540
|
+
mpInfo.appName = appInfo.name;
|
|
5541
|
+
mpInfo.appAvtUrl = appInfo.logoUrl;
|
|
5542
|
+
}
|
|
5539
5543
|
yield this.callNative(ACTION.OPEN_MP, {
|
|
5540
5544
|
mpUrl: `${MINI_APP_INTERNAL_LINK}/${appId}/${queryParamString.length > 0 ? '?' + queryParamString : ''}`,
|
|
5541
|
-
mpInfo:
|
|
5542
|
-
appId: appId,
|
|
5543
|
-
appAvtUrl: appInfo.logoUrl || '',
|
|
5544
|
-
appName: appInfo.name || '',
|
|
5545
|
-
}
|
|
5545
|
+
mpInfo: mpInfo
|
|
5546
5546
|
});
|
|
5547
5547
|
});
|
|
5548
5548
|
}
|
|
@@ -5893,11 +5893,11 @@ class Zalo {
|
|
|
5893
5893
|
data: {
|
|
5894
5894
|
ZInstantAPIInfo: {
|
|
5895
5895
|
url: `${zmpShareableInfo.zinstantApi}`,
|
|
5896
|
-
zinstantdata_id: `templateId
|
|
5896
|
+
zinstantdata_id: `templateId=${zmpShareableInfo.ztemplateId}&appId=${this.getAppId()}&shareId=${zmpShareableInfo.shareId}`
|
|
5897
5897
|
},
|
|
5898
5898
|
previewMsgText: {
|
|
5899
5899
|
msg: {
|
|
5900
|
-
en: 'Mini
|
|
5900
|
+
en: 'Zalo Mini Program',
|
|
5901
5901
|
vi: 'Chương trình nhỏ'
|
|
5902
5902
|
}
|
|
5903
5903
|
},
|