zmp-sdk 2.23.0 → 2.23.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/browser.min.js +18 -26
- package/dist/index.es.js +18 -26
- package/dist/index.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/browser.min.js
CHANGED
|
@@ -3743,7 +3743,7 @@
|
|
|
3743
3743
|
}
|
|
3744
3744
|
}
|
|
3745
3745
|
|
|
3746
|
-
var version = "2.23.
|
|
3746
|
+
var version = "2.23.1";
|
|
3747
3747
|
|
|
3748
3748
|
class Basics {
|
|
3749
3749
|
/**
|
|
@@ -6068,30 +6068,21 @@
|
|
|
6068
6068
|
case 'zmp':
|
|
6069
6069
|
const accessToken = yield this.getAccessToken();
|
|
6070
6070
|
const zmpShareableInfo = yield getZMPShareInfo(this.getAppId(), accessToken || '', object.data.title || '', object.data.description || '', object.data.thumbnail || '', object.data.path);
|
|
6071
|
-
|
|
6072
|
-
|
|
6073
|
-
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
|
|
6084
|
-
|
|
6085
|
-
|
|
6086
|
-
};
|
|
6087
|
-
}
|
|
6088
|
-
else {
|
|
6089
|
-
reqData = {
|
|
6090
|
-
link: zmpShareableInfo.shareableLink,
|
|
6091
|
-
chatOnly: object.data.chatOnly ? 1 : 0
|
|
6092
|
-
};
|
|
6093
|
-
object.type = 'link';
|
|
6094
|
-
}
|
|
6071
|
+
reqData = {
|
|
6072
|
+
data: {
|
|
6073
|
+
ZInstantAPIInfo: {
|
|
6074
|
+
url: `${zmpShareableInfo.zinstantApi}`,
|
|
6075
|
+
zinstantdata_id: `templateId=${zmpShareableInfo.ztemplateId}&appId=${this.getAppId()}&shareId=${zmpShareableInfo.shareId}`
|
|
6076
|
+
},
|
|
6077
|
+
previewMsgText: {
|
|
6078
|
+
msg: {
|
|
6079
|
+
en: 'Zalo Mini Program',
|
|
6080
|
+
vi: 'Chương trình nhỏ'
|
|
6081
|
+
}
|
|
6082
|
+
},
|
|
6083
|
+
enableReactions: 1
|
|
6084
|
+
}
|
|
6085
|
+
};
|
|
6095
6086
|
}
|
|
6096
6087
|
return yield this.getJSBridge()
|
|
6097
6088
|
.callNative(ACTION.OPEN_SHARESHEET, Object.assign(Object.assign({ type: ShareSheetType[type] }, reqData), { zapp: this.getZAppId() }), {
|
|
@@ -7501,8 +7492,9 @@
|
|
|
7501
7492
|
openWebview(object) {
|
|
7502
7493
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7503
7494
|
const url = new URL(object.url);
|
|
7495
|
+
const isVNPayLink = url.href.includes("vnpay");
|
|
7504
7496
|
const typeInapp = url.searchParams.get('typeInapp');
|
|
7505
|
-
if (_.isEmpty(typeInapp)) {
|
|
7497
|
+
if (!isVNPayLink && _.isEmpty(typeInapp)) {
|
|
7506
7498
|
url.searchParams.set('typeInapp', '1');
|
|
7507
7499
|
}
|
|
7508
7500
|
yield __classPrivateFieldGet(this, _SDKCreator_sdkService, "f").openWebview(url.href);
|
package/dist/index.es.js
CHANGED
|
@@ -3740,7 +3740,7 @@ class ZMPEEmitter extends eventemitter3 {
|
|
|
3740
3740
|
}
|
|
3741
3741
|
}
|
|
3742
3742
|
|
|
3743
|
-
var version$1 = "2.23.
|
|
3743
|
+
var version$1 = "2.23.1";
|
|
3744
3744
|
|
|
3745
3745
|
class Basics {
|
|
3746
3746
|
/**
|
|
@@ -6065,30 +6065,21 @@ class Zalo {
|
|
|
6065
6065
|
case 'zmp':
|
|
6066
6066
|
const accessToken = yield this.getAccessToken();
|
|
6067
6067
|
const zmpShareableInfo = yield getZMPShareInfo(this.getAppId(), accessToken || '', object.data.title || '', object.data.description || '', object.data.thumbnail || '', object.data.path);
|
|
6068
|
-
|
|
6069
|
-
|
|
6070
|
-
|
|
6071
|
-
|
|
6072
|
-
|
|
6073
|
-
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
};
|
|
6084
|
-
}
|
|
6085
|
-
else {
|
|
6086
|
-
reqData = {
|
|
6087
|
-
link: zmpShareableInfo.shareableLink,
|
|
6088
|
-
chatOnly: object.data.chatOnly ? 1 : 0
|
|
6089
|
-
};
|
|
6090
|
-
object.type = 'link';
|
|
6091
|
-
}
|
|
6068
|
+
reqData = {
|
|
6069
|
+
data: {
|
|
6070
|
+
ZInstantAPIInfo: {
|
|
6071
|
+
url: `${zmpShareableInfo.zinstantApi}`,
|
|
6072
|
+
zinstantdata_id: `templateId=${zmpShareableInfo.ztemplateId}&appId=${this.getAppId()}&shareId=${zmpShareableInfo.shareId}`
|
|
6073
|
+
},
|
|
6074
|
+
previewMsgText: {
|
|
6075
|
+
msg: {
|
|
6076
|
+
en: 'Zalo Mini Program',
|
|
6077
|
+
vi: 'Chương trình nhỏ'
|
|
6078
|
+
}
|
|
6079
|
+
},
|
|
6080
|
+
enableReactions: 1
|
|
6081
|
+
}
|
|
6082
|
+
};
|
|
6092
6083
|
}
|
|
6093
6084
|
return yield this.getJSBridge()
|
|
6094
6085
|
.callNative(ACTION.OPEN_SHARESHEET, Object.assign(Object.assign({ type: ShareSheetType[type] }, reqData), { zapp: this.getZAppId() }), {
|
|
@@ -8856,8 +8847,9 @@ let SDKCreator = class SDKCreator {
|
|
|
8856
8847
|
openWebview(object) {
|
|
8857
8848
|
return __awaiter(this, void 0, void 0, function* () {
|
|
8858
8849
|
const url = new URL(object.url);
|
|
8850
|
+
const isVNPayLink = url.href.includes("vnpay");
|
|
8859
8851
|
const typeInapp = url.searchParams.get('typeInapp');
|
|
8860
|
-
if (_.isEmpty(typeInapp)) {
|
|
8852
|
+
if (!isVNPayLink && _.isEmpty(typeInapp)) {
|
|
8861
8853
|
url.searchParams.set('typeInapp', '1');
|
|
8862
8854
|
}
|
|
8863
8855
|
yield __classPrivateFieldGet(this, _SDKCreator_sdkService, "f").openWebview(url.href);
|