zmp-sdk 2.17.6-0 → 2.17.7
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 +86 -148
- package/dist/index.es.js +86 -148
- package/dist/index.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/types/src/services/zalo-mp-service.d.ts +1 -1
- package/package.json +1 -1
package/dist/browser.min.js
CHANGED
|
@@ -33807,54 +33807,38 @@
|
|
|
33807
33807
|
'default': zlib$1
|
|
33808
33808
|
});
|
|
33809
33809
|
|
|
33810
|
-
var
|
|
33811
|
-
|
|
33812
|
-
|
|
33813
|
-
|
|
33814
|
-
|
|
33815
|
-
|
|
33816
|
-
|
|
33817
|
-
|
|
33818
|
-
|
|
33819
|
-
|
|
33820
|
-
|
|
33821
|
-
|
|
33810
|
+
var name = "axios";
|
|
33811
|
+
var version$1 = "0.21.1";
|
|
33812
|
+
var description = "Promise based HTTP client for the browser and node.js";
|
|
33813
|
+
var main = "index.js";
|
|
33814
|
+
var scripts = {
|
|
33815
|
+
test: "grunt test && bundlesize",
|
|
33816
|
+
start: "node ./sandbox/server.js",
|
|
33817
|
+
build: "NODE_ENV=production grunt build",
|
|
33818
|
+
preversion: "npm test",
|
|
33819
|
+
version: "npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",
|
|
33820
|
+
postversion: "git push && git push --tags",
|
|
33821
|
+
examples: "node ./examples/server.js",
|
|
33822
|
+
coveralls: "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
|
|
33823
|
+
fix: "eslint --fix lib/**/*.js"
|
|
33822
33824
|
};
|
|
33823
|
-
var
|
|
33824
|
-
type: "
|
|
33825
|
-
|
|
33826
|
-
raw: "axios@0.21.1",
|
|
33827
|
-
name: "axios",
|
|
33828
|
-
escapedName: "axios",
|
|
33829
|
-
rawSpec: "0.21.1",
|
|
33830
|
-
saveSpec: null,
|
|
33831
|
-
fetchSpec: "0.21.1"
|
|
33825
|
+
var repository = {
|
|
33826
|
+
type: "git",
|
|
33827
|
+
url: "https://github.com/axios/axios.git"
|
|
33832
33828
|
};
|
|
33833
|
-
var
|
|
33834
|
-
"
|
|
33829
|
+
var keywords = [
|
|
33830
|
+
"xhr",
|
|
33831
|
+
"http",
|
|
33832
|
+
"ajax",
|
|
33833
|
+
"promise",
|
|
33834
|
+
"node"
|
|
33835
33835
|
];
|
|
33836
|
-
var
|
|
33837
|
-
var
|
|
33838
|
-
var _where = "/Users/nguyentuankiet/Work/Zalo/Projects/ZaloMiniProgram/TestNewFunction";
|
|
33839
|
-
var author = {
|
|
33840
|
-
name: "Matt Zabriskie"
|
|
33841
|
-
};
|
|
33842
|
-
var browser = {
|
|
33843
|
-
"./lib/adapters/http.js": "./lib/adapters/xhr.js"
|
|
33844
|
-
};
|
|
33836
|
+
var author = "Matt Zabriskie";
|
|
33837
|
+
var license = "MIT";
|
|
33845
33838
|
var bugs = {
|
|
33846
33839
|
url: "https://github.com/axios/axios/issues"
|
|
33847
33840
|
};
|
|
33848
|
-
var
|
|
33849
|
-
{
|
|
33850
|
-
path: "./dist/axios.min.js",
|
|
33851
|
-
threshold: "5kB"
|
|
33852
|
-
}
|
|
33853
|
-
];
|
|
33854
|
-
var dependencies = {
|
|
33855
|
-
"follow-redirects": "^1.10.0"
|
|
33856
|
-
};
|
|
33857
|
-
var description = "Promise based HTTP client for the browser and node.js";
|
|
33841
|
+
var homepage = "https://github.com/axios/axios";
|
|
33858
33842
|
var devDependencies = {
|
|
33859
33843
|
bundlesize: "^0.17.0",
|
|
33860
33844
|
coveralls: "^3.0.0",
|
|
@@ -33892,101 +33876,62 @@
|
|
|
33892
33876
|
webpack: "^1.13.1",
|
|
33893
33877
|
"webpack-dev-server": "^1.14.1"
|
|
33894
33878
|
};
|
|
33895
|
-
var
|
|
33896
|
-
|
|
33897
|
-
var keywords = [
|
|
33898
|
-
"xhr",
|
|
33899
|
-
"http",
|
|
33900
|
-
"ajax",
|
|
33901
|
-
"promise",
|
|
33902
|
-
"node"
|
|
33903
|
-
];
|
|
33904
|
-
var license = "MIT";
|
|
33905
|
-
var main = "index.js";
|
|
33906
|
-
var name = "axios";
|
|
33907
|
-
var repository = {
|
|
33908
|
-
type: "git",
|
|
33909
|
-
url: "git+https://github.com/axios/axios.git"
|
|
33910
|
-
};
|
|
33911
|
-
var scripts = {
|
|
33912
|
-
build: "NODE_ENV=production grunt build",
|
|
33913
|
-
coveralls: "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
|
|
33914
|
-
examples: "node ./examples/server.js",
|
|
33915
|
-
fix: "eslint --fix lib/**/*.js",
|
|
33916
|
-
postversion: "git push && git push --tags",
|
|
33917
|
-
preversion: "npm test",
|
|
33918
|
-
start: "node ./sandbox/server.js",
|
|
33919
|
-
test: "grunt test && bundlesize",
|
|
33920
|
-
version: "npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"
|
|
33879
|
+
var browser = {
|
|
33880
|
+
"./lib/adapters/http.js": "./lib/adapters/xhr.js"
|
|
33921
33881
|
};
|
|
33922
|
-
var
|
|
33882
|
+
var jsdelivr = "dist/axios.min.js";
|
|
33923
33883
|
var unpkg = "dist/axios.min.js";
|
|
33924
|
-
var
|
|
33884
|
+
var typings = "./index.d.ts";
|
|
33885
|
+
var dependencies = {
|
|
33886
|
+
"follow-redirects": "^1.10.0"
|
|
33887
|
+
};
|
|
33888
|
+
var bundlesize = [
|
|
33889
|
+
{
|
|
33890
|
+
path: "./dist/axios.min.js",
|
|
33891
|
+
threshold: "5kB"
|
|
33892
|
+
}
|
|
33893
|
+
];
|
|
33925
33894
|
var _package = {
|
|
33926
|
-
|
|
33927
|
-
|
|
33928
|
-
|
|
33929
|
-
|
|
33930
|
-
|
|
33931
|
-
|
|
33932
|
-
|
|
33933
|
-
_requested: _requested,
|
|
33934
|
-
_requiredBy: _requiredBy,
|
|
33935
|
-
_resolved: _resolved,
|
|
33936
|
-
_spec: _spec,
|
|
33937
|
-
_where: _where,
|
|
33895
|
+
name: name,
|
|
33896
|
+
version: version$1,
|
|
33897
|
+
description: description,
|
|
33898
|
+
main: main,
|
|
33899
|
+
scripts: scripts,
|
|
33900
|
+
repository: repository,
|
|
33901
|
+
keywords: keywords,
|
|
33938
33902
|
author: author,
|
|
33939
|
-
|
|
33903
|
+
license: license,
|
|
33940
33904
|
bugs: bugs,
|
|
33941
|
-
bundlesize: bundlesize,
|
|
33942
|
-
dependencies: dependencies,
|
|
33943
|
-
description: description,
|
|
33944
|
-
devDependencies: devDependencies,
|
|
33945
33905
|
homepage: homepage,
|
|
33906
|
+
devDependencies: devDependencies,
|
|
33907
|
+
browser: browser,
|
|
33946
33908
|
jsdelivr: jsdelivr,
|
|
33947
|
-
keywords: keywords,
|
|
33948
|
-
license: license,
|
|
33949
|
-
main: main,
|
|
33950
|
-
name: name,
|
|
33951
|
-
repository: repository,
|
|
33952
|
-
scripts: scripts,
|
|
33953
|
-
typings: typings,
|
|
33954
33909
|
unpkg: unpkg,
|
|
33955
|
-
|
|
33910
|
+
typings: typings,
|
|
33911
|
+
dependencies: dependencies,
|
|
33912
|
+
bundlesize: bundlesize
|
|
33956
33913
|
};
|
|
33957
33914
|
|
|
33958
33915
|
var _package$1 = /*#__PURE__*/Object.freeze({
|
|
33959
33916
|
__proto__: null,
|
|
33960
|
-
|
|
33961
|
-
|
|
33962
|
-
|
|
33963
|
-
|
|
33964
|
-
|
|
33965
|
-
|
|
33966
|
-
|
|
33967
|
-
_requested: _requested,
|
|
33968
|
-
_requiredBy: _requiredBy,
|
|
33969
|
-
_resolved: _resolved,
|
|
33970
|
-
_spec: _spec,
|
|
33971
|
-
_where: _where,
|
|
33917
|
+
name: name,
|
|
33918
|
+
version: version$1,
|
|
33919
|
+
description: description,
|
|
33920
|
+
main: main,
|
|
33921
|
+
scripts: scripts,
|
|
33922
|
+
repository: repository,
|
|
33923
|
+
keywords: keywords,
|
|
33972
33924
|
author: author,
|
|
33973
|
-
|
|
33925
|
+
license: license,
|
|
33974
33926
|
bugs: bugs,
|
|
33975
|
-
bundlesize: bundlesize,
|
|
33976
|
-
dependencies: dependencies,
|
|
33977
|
-
description: description,
|
|
33978
|
-
devDependencies: devDependencies,
|
|
33979
33927
|
homepage: homepage,
|
|
33928
|
+
devDependencies: devDependencies,
|
|
33929
|
+
browser: browser,
|
|
33980
33930
|
jsdelivr: jsdelivr,
|
|
33981
|
-
keywords: keywords,
|
|
33982
|
-
license: license,
|
|
33983
|
-
main: main,
|
|
33984
|
-
name: name,
|
|
33985
|
-
repository: repository,
|
|
33986
|
-
scripts: scripts,
|
|
33987
|
-
typings: typings,
|
|
33988
33931
|
unpkg: unpkg,
|
|
33989
|
-
|
|
33932
|
+
typings: typings,
|
|
33933
|
+
dependencies: dependencies,
|
|
33934
|
+
bundlesize: bundlesize,
|
|
33990
33935
|
'default': _package
|
|
33991
33936
|
});
|
|
33992
33937
|
|
|
@@ -36753,7 +36698,7 @@
|
|
|
36753
36698
|
}
|
|
36754
36699
|
_ZJSBridgeProvider_bridge = new WeakMap();
|
|
36755
36700
|
|
|
36756
|
-
var version = "2.17.
|
|
36701
|
+
var version = "2.17.7";
|
|
36757
36702
|
|
|
36758
36703
|
class Basics {
|
|
36759
36704
|
/**
|
|
@@ -38575,7 +38520,7 @@
|
|
|
38575
38520
|
break;
|
|
38576
38521
|
case 'zmp':
|
|
38577
38522
|
const accessToken = yield this.getAccessToken();
|
|
38578
|
-
const zmpShareableInfo = yield getZMPShareInfo(this.getAppId(), accessToken || '', object.data.title, object.data.description, object.data.thumbnail, object.data.path);
|
|
38523
|
+
const zmpShareableInfo = yield getZMPShareInfo(this.getAppId(), accessToken || '', object.data.title || '', object.data.description || '', object.data.thumbnail || '', object.data.path);
|
|
38579
38524
|
if (window.forceShareZMP) {
|
|
38580
38525
|
reqData = {
|
|
38581
38526
|
data: {
|
|
@@ -38835,27 +38780,21 @@
|
|
|
38835
38780
|
resolve(__classPrivateFieldGet(this, _ZaloMiniProgramSDKService_cookies));
|
|
38836
38781
|
}
|
|
38837
38782
|
else {
|
|
38838
|
-
|
|
38839
|
-
|
|
38840
|
-
|
|
38841
|
-
|
|
38842
|
-
|
|
38843
|
-
|
|
38844
|
-
.
|
|
38845
|
-
|
|
38846
|
-
|
|
38847
|
-
|
|
38848
|
-
|
|
38849
|
-
|
|
38850
|
-
|
|
38851
|
-
|
|
38852
|
-
|
|
38853
|
-
resolve(cookies);
|
|
38854
|
-
})
|
|
38855
|
-
.catch((error) => {
|
|
38856
|
-
reject(error);
|
|
38857
|
-
});
|
|
38858
|
-
}
|
|
38783
|
+
this.callNative(ACTION.JUMP_LOGIN, {})
|
|
38784
|
+
.then((data) => {
|
|
38785
|
+
const cookies = (data && data.cookiesOAuthLogins) || [];
|
|
38786
|
+
const jsToken = cookies.find((cookie) => cookie.name === COOKIE_NAME.JS_TOKEN);
|
|
38787
|
+
if (jsToken) {
|
|
38788
|
+
this.setJSToken(jsToken.value);
|
|
38789
|
+
window.ZJSBridge.setJSToken &&
|
|
38790
|
+
window.ZJSBridge.setJSToken(jsToken.value);
|
|
38791
|
+
}
|
|
38792
|
+
__classPrivateFieldSet(this, _ZaloMiniProgramSDKService_cookies, cookies);
|
|
38793
|
+
resolve(cookies);
|
|
38794
|
+
})
|
|
38795
|
+
.catch((error) => {
|
|
38796
|
+
reject(error);
|
|
38797
|
+
});
|
|
38859
38798
|
}
|
|
38860
38799
|
});
|
|
38861
38800
|
});
|
|
@@ -38973,17 +38912,12 @@
|
|
|
38973
38912
|
}
|
|
38974
38913
|
login(object) {
|
|
38975
38914
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38976
|
-
const onlyJump = object === null || object === void 0 ? void 0 : object.onlyJump;
|
|
38977
38915
|
const cookies = yield __classPrivateFieldGet(this, _ZaloMiniProgramSDKService_callJump).call(this);
|
|
38978
38916
|
const zOAuthCookie = cookies.find((cookie) => cookie.name === COOKIE_NAME.ZOAUTH);
|
|
38979
38917
|
const zOAuthVrfCookie = cookies.find((cookie) => cookie.name === COOKIE_NAME.ZOAUTH_VRF);
|
|
38980
38918
|
if (!lodash.isUndefined(zOAuthCookie) &&
|
|
38981
38919
|
!lodash.isNull(zOAuthCookie) &&
|
|
38982
38920
|
lodash.isString(zOAuthCookie.value)) {
|
|
38983
|
-
if (onlyJump) {
|
|
38984
|
-
__classPrivateFieldSet(this, _ZaloMiniProgramSDKService_accessToken, "default");
|
|
38985
|
-
return "Jump success";
|
|
38986
|
-
}
|
|
38987
38921
|
__classPrivateFieldSet(this, _ZaloMiniProgramSDKService_zOAuth, zOAuthCookie.value);
|
|
38988
38922
|
if (!lodash.isUndefined(zOAuthVrfCookie) &&
|
|
38989
38923
|
!lodash.isNull(zOAuthVrfCookie) &&
|
|
@@ -41520,6 +41454,7 @@
|
|
|
41520
41454
|
}
|
|
41521
41455
|
}
|
|
41522
41456
|
|
|
41457
|
+
var _a;
|
|
41523
41458
|
// Zalo Mini App API
|
|
41524
41459
|
const platform = checkPlatform();
|
|
41525
41460
|
let app;
|
|
@@ -41533,8 +41468,11 @@
|
|
|
41533
41468
|
ZaloJSBridge.getInstance().onMultiJSCall(key, data);
|
|
41534
41469
|
};
|
|
41535
41470
|
};
|
|
41471
|
+
const zalo_h5_event_handler = (_a = window === null || window === void 0 ? void 0 : window.zaloJSV2) === null || _a === void 0 ? void 0 : _a.zalo_h5_event_handler;
|
|
41536
41472
|
window.zaloJSV2 = {
|
|
41537
41473
|
zalo_h5_event_handler: function (eventId, eventName, eventData) {
|
|
41474
|
+
typeof zalo_h5_event_handler === 'function' &&
|
|
41475
|
+
zalo_h5_event_handler(eventId, eventName, eventData);
|
|
41538
41476
|
ZaloJSBridge.getInstance().nativeEventHandler(eventId, eventName, eventData);
|
|
41539
41477
|
}
|
|
41540
41478
|
};
|
package/dist/index.es.js
CHANGED
|
@@ -33804,54 +33804,38 @@ var zlib$2 = /*#__PURE__*/Object.freeze({
|
|
|
33804
33804
|
'default': zlib$1
|
|
33805
33805
|
});
|
|
33806
33806
|
|
|
33807
|
-
var
|
|
33808
|
-
|
|
33809
|
-
|
|
33810
|
-
|
|
33811
|
-
|
|
33812
|
-
|
|
33813
|
-
|
|
33814
|
-
|
|
33815
|
-
|
|
33816
|
-
|
|
33817
|
-
|
|
33818
|
-
|
|
33807
|
+
var name = "axios";
|
|
33808
|
+
var version$1 = "0.21.1";
|
|
33809
|
+
var description = "Promise based HTTP client for the browser and node.js";
|
|
33810
|
+
var main = "index.js";
|
|
33811
|
+
var scripts = {
|
|
33812
|
+
test: "grunt test && bundlesize",
|
|
33813
|
+
start: "node ./sandbox/server.js",
|
|
33814
|
+
build: "NODE_ENV=production grunt build",
|
|
33815
|
+
preversion: "npm test",
|
|
33816
|
+
version: "npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",
|
|
33817
|
+
postversion: "git push && git push --tags",
|
|
33818
|
+
examples: "node ./examples/server.js",
|
|
33819
|
+
coveralls: "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
|
|
33820
|
+
fix: "eslint --fix lib/**/*.js"
|
|
33819
33821
|
};
|
|
33820
|
-
var
|
|
33821
|
-
type: "
|
|
33822
|
-
|
|
33823
|
-
raw: "axios@0.21.1",
|
|
33824
|
-
name: "axios",
|
|
33825
|
-
escapedName: "axios",
|
|
33826
|
-
rawSpec: "0.21.1",
|
|
33827
|
-
saveSpec: null,
|
|
33828
|
-
fetchSpec: "0.21.1"
|
|
33822
|
+
var repository = {
|
|
33823
|
+
type: "git",
|
|
33824
|
+
url: "https://github.com/axios/axios.git"
|
|
33829
33825
|
};
|
|
33830
|
-
var
|
|
33831
|
-
"
|
|
33826
|
+
var keywords = [
|
|
33827
|
+
"xhr",
|
|
33828
|
+
"http",
|
|
33829
|
+
"ajax",
|
|
33830
|
+
"promise",
|
|
33831
|
+
"node"
|
|
33832
33832
|
];
|
|
33833
|
-
var
|
|
33834
|
-
var
|
|
33835
|
-
var _where = "/Users/nguyentuankiet/Work/Zalo/Projects/ZaloMiniProgram/TestNewFunction";
|
|
33836
|
-
var author = {
|
|
33837
|
-
name: "Matt Zabriskie"
|
|
33838
|
-
};
|
|
33839
|
-
var browser = {
|
|
33840
|
-
"./lib/adapters/http.js": "./lib/adapters/xhr.js"
|
|
33841
|
-
};
|
|
33833
|
+
var author = "Matt Zabriskie";
|
|
33834
|
+
var license = "MIT";
|
|
33842
33835
|
var bugs = {
|
|
33843
33836
|
url: "https://github.com/axios/axios/issues"
|
|
33844
33837
|
};
|
|
33845
|
-
var
|
|
33846
|
-
{
|
|
33847
|
-
path: "./dist/axios.min.js",
|
|
33848
|
-
threshold: "5kB"
|
|
33849
|
-
}
|
|
33850
|
-
];
|
|
33851
|
-
var dependencies = {
|
|
33852
|
-
"follow-redirects": "^1.10.0"
|
|
33853
|
-
};
|
|
33854
|
-
var description = "Promise based HTTP client for the browser and node.js";
|
|
33838
|
+
var homepage = "https://github.com/axios/axios";
|
|
33855
33839
|
var devDependencies = {
|
|
33856
33840
|
bundlesize: "^0.17.0",
|
|
33857
33841
|
coveralls: "^3.0.0",
|
|
@@ -33889,101 +33873,62 @@ var devDependencies = {
|
|
|
33889
33873
|
webpack: "^1.13.1",
|
|
33890
33874
|
"webpack-dev-server": "^1.14.1"
|
|
33891
33875
|
};
|
|
33892
|
-
var
|
|
33893
|
-
|
|
33894
|
-
var keywords = [
|
|
33895
|
-
"xhr",
|
|
33896
|
-
"http",
|
|
33897
|
-
"ajax",
|
|
33898
|
-
"promise",
|
|
33899
|
-
"node"
|
|
33900
|
-
];
|
|
33901
|
-
var license = "MIT";
|
|
33902
|
-
var main = "index.js";
|
|
33903
|
-
var name = "axios";
|
|
33904
|
-
var repository = {
|
|
33905
|
-
type: "git",
|
|
33906
|
-
url: "git+https://github.com/axios/axios.git"
|
|
33907
|
-
};
|
|
33908
|
-
var scripts = {
|
|
33909
|
-
build: "NODE_ENV=production grunt build",
|
|
33910
|
-
coveralls: "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
|
|
33911
|
-
examples: "node ./examples/server.js",
|
|
33912
|
-
fix: "eslint --fix lib/**/*.js",
|
|
33913
|
-
postversion: "git push && git push --tags",
|
|
33914
|
-
preversion: "npm test",
|
|
33915
|
-
start: "node ./sandbox/server.js",
|
|
33916
|
-
test: "grunt test && bundlesize",
|
|
33917
|
-
version: "npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"
|
|
33876
|
+
var browser = {
|
|
33877
|
+
"./lib/adapters/http.js": "./lib/adapters/xhr.js"
|
|
33918
33878
|
};
|
|
33919
|
-
var
|
|
33879
|
+
var jsdelivr = "dist/axios.min.js";
|
|
33920
33880
|
var unpkg = "dist/axios.min.js";
|
|
33921
|
-
var
|
|
33881
|
+
var typings = "./index.d.ts";
|
|
33882
|
+
var dependencies = {
|
|
33883
|
+
"follow-redirects": "^1.10.0"
|
|
33884
|
+
};
|
|
33885
|
+
var bundlesize = [
|
|
33886
|
+
{
|
|
33887
|
+
path: "./dist/axios.min.js",
|
|
33888
|
+
threshold: "5kB"
|
|
33889
|
+
}
|
|
33890
|
+
];
|
|
33922
33891
|
var _package = {
|
|
33923
|
-
|
|
33924
|
-
|
|
33925
|
-
|
|
33926
|
-
|
|
33927
|
-
|
|
33928
|
-
|
|
33929
|
-
|
|
33930
|
-
_requested: _requested,
|
|
33931
|
-
_requiredBy: _requiredBy,
|
|
33932
|
-
_resolved: _resolved,
|
|
33933
|
-
_spec: _spec,
|
|
33934
|
-
_where: _where,
|
|
33892
|
+
name: name,
|
|
33893
|
+
version: version$1,
|
|
33894
|
+
description: description,
|
|
33895
|
+
main: main,
|
|
33896
|
+
scripts: scripts,
|
|
33897
|
+
repository: repository,
|
|
33898
|
+
keywords: keywords,
|
|
33935
33899
|
author: author,
|
|
33936
|
-
|
|
33900
|
+
license: license,
|
|
33937
33901
|
bugs: bugs,
|
|
33938
|
-
bundlesize: bundlesize,
|
|
33939
|
-
dependencies: dependencies,
|
|
33940
|
-
description: description,
|
|
33941
|
-
devDependencies: devDependencies,
|
|
33942
33902
|
homepage: homepage,
|
|
33903
|
+
devDependencies: devDependencies,
|
|
33904
|
+
browser: browser,
|
|
33943
33905
|
jsdelivr: jsdelivr,
|
|
33944
|
-
keywords: keywords,
|
|
33945
|
-
license: license,
|
|
33946
|
-
main: main,
|
|
33947
|
-
name: name,
|
|
33948
|
-
repository: repository,
|
|
33949
|
-
scripts: scripts,
|
|
33950
|
-
typings: typings,
|
|
33951
33906
|
unpkg: unpkg,
|
|
33952
|
-
|
|
33907
|
+
typings: typings,
|
|
33908
|
+
dependencies: dependencies,
|
|
33909
|
+
bundlesize: bundlesize
|
|
33953
33910
|
};
|
|
33954
33911
|
|
|
33955
33912
|
var _package$1 = /*#__PURE__*/Object.freeze({
|
|
33956
33913
|
__proto__: null,
|
|
33957
|
-
|
|
33958
|
-
|
|
33959
|
-
|
|
33960
|
-
|
|
33961
|
-
|
|
33962
|
-
|
|
33963
|
-
|
|
33964
|
-
_requested: _requested,
|
|
33965
|
-
_requiredBy: _requiredBy,
|
|
33966
|
-
_resolved: _resolved,
|
|
33967
|
-
_spec: _spec,
|
|
33968
|
-
_where: _where,
|
|
33914
|
+
name: name,
|
|
33915
|
+
version: version$1,
|
|
33916
|
+
description: description,
|
|
33917
|
+
main: main,
|
|
33918
|
+
scripts: scripts,
|
|
33919
|
+
repository: repository,
|
|
33920
|
+
keywords: keywords,
|
|
33969
33921
|
author: author,
|
|
33970
|
-
|
|
33922
|
+
license: license,
|
|
33971
33923
|
bugs: bugs,
|
|
33972
|
-
bundlesize: bundlesize,
|
|
33973
|
-
dependencies: dependencies,
|
|
33974
|
-
description: description,
|
|
33975
|
-
devDependencies: devDependencies,
|
|
33976
33924
|
homepage: homepage,
|
|
33925
|
+
devDependencies: devDependencies,
|
|
33926
|
+
browser: browser,
|
|
33977
33927
|
jsdelivr: jsdelivr,
|
|
33978
|
-
keywords: keywords,
|
|
33979
|
-
license: license,
|
|
33980
|
-
main: main,
|
|
33981
|
-
name: name,
|
|
33982
|
-
repository: repository,
|
|
33983
|
-
scripts: scripts,
|
|
33984
|
-
typings: typings,
|
|
33985
33928
|
unpkg: unpkg,
|
|
33986
|
-
|
|
33929
|
+
typings: typings,
|
|
33930
|
+
dependencies: dependencies,
|
|
33931
|
+
bundlesize: bundlesize,
|
|
33987
33932
|
'default': _package
|
|
33988
33933
|
});
|
|
33989
33934
|
|
|
@@ -36750,7 +36695,7 @@ class ZJSBridgeProvider {
|
|
|
36750
36695
|
}
|
|
36751
36696
|
_ZJSBridgeProvider_bridge = new WeakMap();
|
|
36752
36697
|
|
|
36753
|
-
var version = "2.17.
|
|
36698
|
+
var version = "2.17.7";
|
|
36754
36699
|
|
|
36755
36700
|
class Basics {
|
|
36756
36701
|
/**
|
|
@@ -38572,7 +38517,7 @@ class Zalo {
|
|
|
38572
38517
|
break;
|
|
38573
38518
|
case 'zmp':
|
|
38574
38519
|
const accessToken = yield this.getAccessToken();
|
|
38575
|
-
const zmpShareableInfo = yield getZMPShareInfo(this.getAppId(), accessToken || '', object.data.title, object.data.description, object.data.thumbnail, object.data.path);
|
|
38520
|
+
const zmpShareableInfo = yield getZMPShareInfo(this.getAppId(), accessToken || '', object.data.title || '', object.data.description || '', object.data.thumbnail || '', object.data.path);
|
|
38576
38521
|
if (window.forceShareZMP) {
|
|
38577
38522
|
reqData = {
|
|
38578
38523
|
data: {
|
|
@@ -38832,27 +38777,21 @@ class ZaloMiniProgramSDKService extends ZJSBridgeProvider {
|
|
|
38832
38777
|
resolve(__classPrivateFieldGet(this, _ZaloMiniProgramSDKService_cookies));
|
|
38833
38778
|
}
|
|
38834
38779
|
else {
|
|
38835
|
-
|
|
38836
|
-
|
|
38837
|
-
|
|
38838
|
-
|
|
38839
|
-
|
|
38840
|
-
|
|
38841
|
-
.
|
|
38842
|
-
|
|
38843
|
-
|
|
38844
|
-
|
|
38845
|
-
|
|
38846
|
-
|
|
38847
|
-
|
|
38848
|
-
|
|
38849
|
-
|
|
38850
|
-
resolve(cookies);
|
|
38851
|
-
})
|
|
38852
|
-
.catch((error) => {
|
|
38853
|
-
reject(error);
|
|
38854
|
-
});
|
|
38855
|
-
}
|
|
38780
|
+
this.callNative(ACTION.JUMP_LOGIN, {})
|
|
38781
|
+
.then((data) => {
|
|
38782
|
+
const cookies = (data && data.cookiesOAuthLogins) || [];
|
|
38783
|
+
const jsToken = cookies.find((cookie) => cookie.name === COOKIE_NAME.JS_TOKEN);
|
|
38784
|
+
if (jsToken) {
|
|
38785
|
+
this.setJSToken(jsToken.value);
|
|
38786
|
+
window.ZJSBridge.setJSToken &&
|
|
38787
|
+
window.ZJSBridge.setJSToken(jsToken.value);
|
|
38788
|
+
}
|
|
38789
|
+
__classPrivateFieldSet(this, _ZaloMiniProgramSDKService_cookies, cookies);
|
|
38790
|
+
resolve(cookies);
|
|
38791
|
+
})
|
|
38792
|
+
.catch((error) => {
|
|
38793
|
+
reject(error);
|
|
38794
|
+
});
|
|
38856
38795
|
}
|
|
38857
38796
|
});
|
|
38858
38797
|
});
|
|
@@ -38970,17 +38909,12 @@ class ZaloMiniProgramSDKService extends ZJSBridgeProvider {
|
|
|
38970
38909
|
}
|
|
38971
38910
|
login(object) {
|
|
38972
38911
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38973
|
-
const onlyJump = object === null || object === void 0 ? void 0 : object.onlyJump;
|
|
38974
38912
|
const cookies = yield __classPrivateFieldGet(this, _ZaloMiniProgramSDKService_callJump).call(this);
|
|
38975
38913
|
const zOAuthCookie = cookies.find((cookie) => cookie.name === COOKIE_NAME.ZOAUTH);
|
|
38976
38914
|
const zOAuthVrfCookie = cookies.find((cookie) => cookie.name === COOKIE_NAME.ZOAUTH_VRF);
|
|
38977
38915
|
if (!lodash.isUndefined(zOAuthCookie) &&
|
|
38978
38916
|
!lodash.isNull(zOAuthCookie) &&
|
|
38979
38917
|
lodash.isString(zOAuthCookie.value)) {
|
|
38980
|
-
if (onlyJump) {
|
|
38981
|
-
__classPrivateFieldSet(this, _ZaloMiniProgramSDKService_accessToken, "default");
|
|
38982
|
-
return "Jump success";
|
|
38983
|
-
}
|
|
38984
38918
|
__classPrivateFieldSet(this, _ZaloMiniProgramSDKService_zOAuth, zOAuthCookie.value);
|
|
38985
38919
|
if (!lodash.isUndefined(zOAuthVrfCookie) &&
|
|
38986
38920
|
!lodash.isNull(zOAuthVrfCookie) &&
|
|
@@ -41517,6 +41451,7 @@ class MockSDKCreator extends SDKCreator {
|
|
|
41517
41451
|
}
|
|
41518
41452
|
}
|
|
41519
41453
|
|
|
41454
|
+
var _a;
|
|
41520
41455
|
// Zalo Mini App API
|
|
41521
41456
|
const platform = checkPlatform();
|
|
41522
41457
|
let app;
|
|
@@ -41530,8 +41465,11 @@ window.onMultiJSCall = (key) => {
|
|
|
41530
41465
|
ZaloJSBridge.getInstance().onMultiJSCall(key, data);
|
|
41531
41466
|
};
|
|
41532
41467
|
};
|
|
41468
|
+
const zalo_h5_event_handler = (_a = window === null || window === void 0 ? void 0 : window.zaloJSV2) === null || _a === void 0 ? void 0 : _a.zalo_h5_event_handler;
|
|
41533
41469
|
window.zaloJSV2 = {
|
|
41534
41470
|
zalo_h5_event_handler: function (eventId, eventName, eventData) {
|
|
41471
|
+
typeof zalo_h5_event_handler === 'function' &&
|
|
41472
|
+
zalo_h5_event_handler(eventId, eventName, eventData);
|
|
41535
41473
|
ZaloJSBridge.getInstance().nativeEventHandler(eventId, eventName, eventData);
|
|
41536
41474
|
}
|
|
41537
41475
|
};
|