hylid-bridge 2.1.0 → 2.1.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/README.md +1 -3
- package/lib/bridges.js +8 -0
- package/lib/clients/web/h5/confirm.d.ts +1 -0
- package/lib/clients/web/h5/confirm.js +1 -0
- package/lib/clients/web/h5/custom.d.ts +10 -0
- package/lib/clients/web/h5/custom.js +11 -1
- package/lib/clients/web/h5/getLocation.d.ts +1 -0
- package/lib/clients/web/h5/getLocation.js +4 -0
- package/lib/clients/web/h5/hideLoading.d.ts +1 -0
- package/lib/clients/web/h5/hideLoading.js +1 -0
- package/lib/clients/web/h5/index.d.ts +5 -0
- package/lib/clients/web/h5/request.d.ts +1 -1
- package/lib/clients/web/h5/showLoading.d.ts +2 -0
- package/lib/clients/web/h5/showLoading.js +4 -0
- package/lib/common/canIUse.js +4 -4
- package/lib/umd/index.js +2 -1
- package/lib/umd/index.js.LICENSE.txt +1 -0
- package/lib/umd/web_h5.js +2 -1
- package/lib/umd/web_h5.js.LICENSE.txt +1 -0
- package/package.json +4 -6
- package/CHANGELOG.md +0 -666
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# hylid-bridge
|
|
2
2
|
|
|
3
|
-
> Unite Api For
|
|
3
|
+
> Unite Api For MiniProgram Project.
|
|
4
4
|
|
|
5
5
|
## Description
|
|
6
6
|
|
|
@@ -30,8 +30,6 @@ Page({
|
|
|
30
30
|
});
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
refer: [AliPay Plus JSAPI Overview](https://miniprogram.alipay.com/docs/miniprogram/mpdev/api_overview)
|
|
34
|
-
|
|
35
33
|
### Use in Plain HTML
|
|
36
34
|
|
|
37
35
|
```html
|
package/lib/bridges.js
CHANGED
|
@@ -214,7 +214,11 @@ import webAlipayPlusShowNavigationBarLoading from "./clients/web/alipay_plus/sho
|
|
|
214
214
|
import webAlipayPlusShowToast from "./clients/web/alipay_plus/showToast";
|
|
215
215
|
import webAlipayPlusUploadFile from "./clients/web/alipay_plus/uploadFile";
|
|
216
216
|
import webH5Alert from "./clients/web/h5/alert";
|
|
217
|
+
import webH5Confirm from "./clients/web/h5/confirm";
|
|
218
|
+
import webH5GetLocation from "./clients/web/h5/getLocation";
|
|
219
|
+
import webH5HideLoading from "./clients/web/h5/hideLoading";
|
|
217
220
|
import webH5Request from "./clients/web/h5/request";
|
|
221
|
+
import webH5ShowLoading from "./clients/web/h5/showLoading";
|
|
218
222
|
import webH5ShowToast from "./clients/web/h5/showToast";
|
|
219
223
|
export var addFatigueAction = function addFatigueAction() {
|
|
220
224
|
var rest = [];
|
|
@@ -407,6 +411,7 @@ export var confirm = function confirm() {
|
|
|
407
411
|
if (appEnv.isMpWebAlipayPlus) return _confirm.apply(void 0, rest);
|
|
408
412
|
if (appEnv.isWebAlipay) return webAlipayConfirm.apply(void 0, rest);
|
|
409
413
|
if (appEnv.isWebAlipayPlus) return webAlipayPlusConfirm.apply(void 0, rest);
|
|
414
|
+
if (appEnv.isWebH5) return webH5Confirm.apply(void 0, rest);
|
|
410
415
|
return notFound.apply(void 0, __spreadArray(['confirm'], rest));
|
|
411
416
|
};
|
|
412
417
|
export var connectBLEDevice = function connectBLEDevice() {
|
|
@@ -713,6 +718,7 @@ export var getLocation = function getLocation() {
|
|
|
713
718
|
if (appEnv.isMpWebAlipayPlus) return _getLocation.apply(void 0, rest);
|
|
714
719
|
if (appEnv.isWebAlipay) return webAlipayGetLocation.apply(void 0, rest);
|
|
715
720
|
if (appEnv.isWebAlipayPlus) return webAlipayPlusGetLocation.apply(void 0, rest);
|
|
721
|
+
if (appEnv.isWebH5) return webH5GetLocation.apply(void 0, rest);
|
|
716
722
|
return notFound.apply(void 0, __spreadArray(['getLocation'], rest));
|
|
717
723
|
};
|
|
718
724
|
export var getNetworkType = function getNetworkType() {
|
|
@@ -943,6 +949,7 @@ export var hideLoading = function hideLoading() {
|
|
|
943
949
|
if (appEnv.isMpWebAlipayPlus) return _hideLoading.apply(void 0, rest);
|
|
944
950
|
if (appEnv.isWebAlipay) return _hideLoading.apply(void 0, rest);
|
|
945
951
|
if (appEnv.isWebAlipayPlus) return _hideLoading.apply(void 0, rest);
|
|
952
|
+
if (appEnv.isWebH5) return webH5HideLoading.apply(void 0, rest);
|
|
946
953
|
return notFound.apply(void 0, __spreadArray(['hideLoading'], rest));
|
|
947
954
|
};
|
|
948
955
|
export var hideNavigationBarLoading = function hideNavigationBarLoading() {
|
|
@@ -1896,6 +1903,7 @@ export var showLoading = function showLoading() {
|
|
|
1896
1903
|
if (appEnv.isMpWebAlipayPlus) return _showLoading.apply(void 0, rest);
|
|
1897
1904
|
if (appEnv.isWebAlipay) return _showLoading.apply(void 0, rest);
|
|
1898
1905
|
if (appEnv.isWebAlipayPlus) return _showLoading.apply(void 0, rest);
|
|
1906
|
+
if (appEnv.isWebH5) return webH5ShowLoading.apply(void 0, rest);
|
|
1899
1907
|
return notFound.apply(void 0, __spreadArray(['showLoading'], rest));
|
|
1900
1908
|
};
|
|
1901
1909
|
export var showNavigationBarLoading = function showNavigationBarLoading() {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { confirm as default } from 'miniapp-web-jsapi/lib/web/jsapi/confirm';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { confirm as default } from 'miniapp-web-jsapi/lib/web/jsapi/confirm';
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
import alert from './alert';
|
|
2
|
+
import hideLoading from './hideLoading';
|
|
2
3
|
import request from './request';
|
|
4
|
+
import showLoading from './showLoading';
|
|
3
5
|
import showToast from './showToast';
|
|
6
|
+
import hideToast from './hideToast';
|
|
7
|
+
import confirm from './confirm';
|
|
8
|
+
import getLocation from './getLocation';
|
|
4
9
|
declare const _default: {
|
|
5
10
|
alert: typeof alert;
|
|
6
11
|
request: typeof request;
|
|
12
|
+
showLoading: typeof showLoading;
|
|
13
|
+
hideLoading: typeof hideLoading;
|
|
7
14
|
showToast: typeof showToast;
|
|
15
|
+
hideToast: typeof hideToast;
|
|
16
|
+
confirm: typeof confirm;
|
|
17
|
+
getLocation: typeof getLocation;
|
|
8
18
|
};
|
|
9
19
|
export default _default;
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import alert from "./alert";
|
|
2
|
+
import hideLoading from "./hideLoading";
|
|
2
3
|
import request from "./request";
|
|
4
|
+
import showLoading from "./showLoading";
|
|
3
5
|
import showToast from "./showToast";
|
|
6
|
+
import hideToast from "./hideToast";
|
|
7
|
+
import confirm from "./confirm";
|
|
8
|
+
import getLocation from "./getLocation";
|
|
4
9
|
export default {
|
|
5
10
|
alert: alert,
|
|
6
11
|
request: request,
|
|
7
|
-
|
|
12
|
+
showLoading: showLoading,
|
|
13
|
+
hideLoading: hideLoading,
|
|
14
|
+
showToast: showToast,
|
|
15
|
+
hideToast: hideToast,
|
|
16
|
+
confirm: confirm,
|
|
17
|
+
getLocation: getLocation
|
|
8
18
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function getLocation(options?: any): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { hideLoading as default } from 'miniapp-web-jsapi/lib/web/jsapi/loading';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { hideLoading as default } from 'miniapp-web-jsapi/lib/web/jsapi/loading';
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
alert: typeof import("./alert").default;
|
|
3
3
|
request: typeof import("./request").default;
|
|
4
|
+
showLoading: typeof import("./showLoading").default;
|
|
5
|
+
hideLoading: typeof import("miniapp-web-jsapi/lib/web/jsapi/loading").hideLoading;
|
|
4
6
|
showToast: typeof import("./showToast").default;
|
|
7
|
+
hideToast: typeof import("miniapp-web-jsapi/lib/web/jsapi/toast").hideToast;
|
|
8
|
+
confirm: typeof import("miniapp-web-jsapi/lib/web/jsapi/confirm").confirm;
|
|
9
|
+
getLocation: typeof import("./getLocation").default;
|
|
5
10
|
};
|
|
6
11
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="miniprogram" />
|
|
2
|
-
export default function request(options?: RequestArgs): void
|
|
2
|
+
export default function request(options?: RequestArgs): Promise<void>;
|
package/lib/common/canIUse.js
CHANGED
|
@@ -14,7 +14,7 @@ var apis = {
|
|
|
14
14
|
clearStorageSync: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpTaobao],
|
|
15
15
|
closeBluetoothAdapter: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpWebAlipayPlus],
|
|
16
16
|
closeSocket: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpWebAlipayPlus],
|
|
17
|
-
confirm: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpTaobao, clientName.mpWebAlipayPlus, clientName.mpWebAlipay, clientName.webAlipayPlus, clientName.webAlipay],
|
|
17
|
+
confirm: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpTaobao, clientName.mpWebAlipayPlus, clientName.mpWebAlipay, clientName.webH5, clientName.webAlipayPlus, clientName.webAlipay],
|
|
18
18
|
connectBLEDevice: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpWebAlipayPlus],
|
|
19
19
|
connectSocket: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpWebAlipayPlus],
|
|
20
20
|
createAnimation: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpTaobao],
|
|
@@ -37,7 +37,7 @@ var apis = {
|
|
|
37
37
|
getConnectedBluetoothDevices: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpWebAlipayPlus],
|
|
38
38
|
getFileInfo: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpWebAlipayPlus, clientName.webAlipayPlus, clientName.webAlipay],
|
|
39
39
|
getImageInfo: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpWebAlipayPlus, clientName.mpWebAlipay, clientName.webAlipayPlus, clientName.webAlipay],
|
|
40
|
-
getLocation: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpTaobao, clientName.mpWebAlipayPlus, clientName.mpWebAlipay, clientName.webAlipayPlus, clientName.webAlipay],
|
|
40
|
+
getLocation: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpTaobao, clientName.mpWebAlipayPlus, clientName.mpWebAlipay, clientName.webH5, clientName.webAlipayPlus, clientName.webAlipay],
|
|
41
41
|
getNetworkType: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpTaobao, clientName.mpWebAlipayPlus, clientName.mpWebAlipay, clientName.webAlipayPlus, clientName.webAlipay],
|
|
42
42
|
getOpenUserInfo: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpTaobao, clientName.mpWebAlipayPlus, clientName.webAlipayPlus],
|
|
43
43
|
getPaymentCode: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpWebAlipayPlus, clientName.webAlipayPlus],
|
|
@@ -53,7 +53,7 @@ var apis = {
|
|
|
53
53
|
getSystemInfo: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpTaobao, clientName.mpWebAlipayPlus, clientName.mpWebAlipay, clientName.webAlipayPlus, clientName.webAlipay],
|
|
54
54
|
hideBackHome: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpTaobao],
|
|
55
55
|
hideKeyboard: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpTaobao, clientName.mpWebAlipayPlus, clientName.mpWebAlipay, clientName.webAlipayPlus, clientName.webAlipay],
|
|
56
|
-
hideLoading: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpTaobao, clientName.mpWebAlipayPlus, clientName.mpWebAlipay, clientName.webAlipayPlus, clientName.webAlipay],
|
|
56
|
+
hideLoading: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpTaobao, clientName.mpWebAlipayPlus, clientName.mpWebAlipay, clientName.webAlipayPlus, clientName.webAlipay, clientName.webH5],
|
|
57
57
|
hideNavigationBarLoading: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpWebAlipayPlus, clientName.mpWebAlipay, clientName.webAlipayPlus, clientName.webAlipay],
|
|
58
58
|
hideTabBar: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpTaobao, clientName.mpWebAlipayPlus],
|
|
59
59
|
hideToast: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpTaobao, clientName.mpWebAlipayPlus, clientName.mpWebAlipay, clientName.webAlipayPlus, clientName.webAlipay],
|
|
@@ -125,7 +125,7 @@ var apis = {
|
|
|
125
125
|
setTabBarStyle: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpTaobao, clientName.mpWebAlipayPlus],
|
|
126
126
|
showActionSheet: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpTaobao, clientName.mpWebAlipayPlus, clientName.webAlipayPlus, clientName.webAlipay],
|
|
127
127
|
showAuthGuide: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpTaobao, clientName.mpWebAlipayPlus, clientName.mpWebAlipay, clientName.webAlipayPlus, clientName.webAlipay],
|
|
128
|
-
showLoading: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpTaobao, clientName.mpWebAlipayPlus, clientName.mpWebAlipay, clientName.webAlipayPlus, clientName.webAlipay],
|
|
128
|
+
showLoading: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpTaobao, clientName.mpWebAlipayPlus, clientName.mpWebAlipay, clientName.webAlipayPlus, clientName.webAlipay, clientName.webH5],
|
|
129
129
|
showNavigationBarLoading: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpWebAlipayPlus, clientName.mpWebAlipay, clientName.webAlipayPlus, clientName.webAlipay],
|
|
130
130
|
showToast: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpTaobao, clientName.mpWebAlipayPlus, clientName.mpWebAlipay, clientName.webH5, clientName.webAlipayPlus, clientName.webAlipay],
|
|
131
131
|
signContract: [clientName.mpAlipayPlus, clientName.mpLazada, clientName.mpWebAlipayPlus, clientName.webAlipayPlus, clientName.webAlipay],
|