@tarojs/taro-h5 3.4.8 → 3.5.0-alpha.10
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/api/ad/index.js +1 -1
- package/dist/api/ai/facial.js +1 -1
- package/dist/api/ai/visual.js +1 -1
- package/dist/api/alipay/index.js +1 -1
- package/dist/api/base/crypto.js +1 -1
- package/dist/api/base/debug.js +1 -1
- package/dist/api/base/index.js +1 -1
- package/dist/api/base/performance.js +1 -1
- package/dist/api/base/system.js +30 -26
- package/dist/api/base/update.js +1 -1
- package/dist/api/base/weapp/app-event.js +1 -1
- package/dist/api/base/weapp/life-cycle.js +1 -1
- package/dist/api/canvas/CanvasContext.js +27 -16
- package/dist/api/canvas/canvasGetImageData.js +2 -2
- package/dist/api/canvas/canvasPutImageData.js +2 -2
- package/dist/api/canvas/canvasToTempFilePath.js +2 -2
- package/dist/api/canvas/createCanvasContext.js +1 -1
- package/dist/api/canvas/index.js +1 -1
- package/dist/api/cloud/index.js +1 -1
- package/dist/api/data-analysis/index.js +1 -1
- package/dist/api/device/accelerometer.js +2 -2
- package/dist/api/device/accessibility.js +1 -1
- package/dist/api/device/battery.js +14 -5
- package/dist/api/device/bluetooth-ble.js +1 -1
- package/dist/api/device/bluetooth-peripheral.js +1 -1
- package/dist/api/device/bluetooth.js +1 -1
- package/dist/api/device/calendar.js +1 -1
- package/dist/api/device/clipboard.js +14 -5
- package/dist/api/device/compass.js +2 -2
- package/dist/api/device/contact.js +1 -1
- package/dist/api/device/crypto.js +1 -1
- package/dist/api/device/gyroscope.js +1 -1
- package/dist/api/device/iBeacon.js +1 -1
- package/dist/api/device/keyboard.js +1 -1
- package/dist/api/device/memory.js +1 -1
- package/dist/api/device/motion.js +2 -2
- package/dist/api/device/network.js +14 -5
- package/dist/api/device/nfc.js +1 -1
- package/dist/api/device/phone.js +2 -2
- package/dist/api/device/scan.js +1 -1
- package/dist/api/device/screen.js +1 -1
- package/dist/api/device/vibrate.js +1 -1
- package/dist/api/device/wifi.js +1 -1
- package/dist/api/ext/index.js +1 -1
- package/dist/api/files/index.js +1 -1
- package/dist/api/location/chooseLocation.js +14 -9
- package/dist/api/location/getLocation.js +2 -2
- package/dist/api/location/index.js +1 -1
- package/dist/api/media/EditorContext.js +1 -1
- package/dist/api/media/audio/InnerAudioContext.js +2 -2
- package/dist/api/media/audio/index.js +1 -1
- package/dist/api/media/background-audio/BackgroundAudioManager.js +2 -2
- package/dist/api/media/background-audio/index.js +1 -1
- package/dist/api/media/camera.js +1 -1
- package/dist/api/media/image/chooseImage.js +2 -2
- package/dist/api/media/image/getImageInfo.js +2 -2
- package/dist/api/media/image/index.js +1 -1
- package/dist/api/media/image/previewImage.js +14 -5
- package/dist/api/media/live.js +1 -1
- package/dist/api/media/map.js +1 -1
- package/dist/api/media/media-recorder.js +1 -1
- package/dist/api/media/recorder.js +1 -1
- package/dist/api/media/video/index.js +2 -2
- package/dist/api/media/video-decoder.js +1 -1
- package/dist/api/media/video-processing.js +1 -1
- package/dist/api/media/voip.js +1 -1
- package/dist/api/navigate/index.js +1 -1
- package/dist/api/network/download.js +1 -1
- package/dist/api/network/mdns.js +1 -1
- package/dist/api/network/request/index.js +1 -1
- package/dist/api/network/tcp.js +1 -1
- package/dist/api/network/udp.js +1 -1
- package/dist/api/network/upload.js +1 -1
- package/dist/api/network/websocket/index.js +2 -2
- package/dist/api/open-api/account.js +1 -1
- package/dist/api/open-api/address.js +1 -1
- package/dist/api/open-api/authorize.js +1 -1
- package/dist/api/open-api/card.js +1 -1
- package/dist/api/open-api/channels-live.js +1 -1
- package/dist/api/open-api/customer-service.js +1 -1
- package/dist/api/open-api/facial.js +1 -1
- package/dist/api/open-api/favorites.js +1 -1
- package/dist/api/open-api/group.js +1 -1
- package/dist/api/open-api/invoice.js +1 -1
- package/dist/api/open-api/license-plate.js +1 -1
- package/dist/api/open-api/login.js +1 -1
- package/dist/api/open-api/red-package.js +1 -1
- package/dist/api/open-api/settings.js +1 -1
- package/dist/api/open-api/soter.js +1 -1
- package/dist/api/open-api/subscribe-message.js +1 -1
- package/dist/api/open-api/user-info.js +1 -1
- package/dist/api/open-api/werun.js +1 -1
- package/dist/api/payment/index.js +1 -1
- package/dist/api/share/index.js +1 -1
- package/dist/api/storage/background-fetch.js +1 -1
- package/dist/api/storage/index.js +2 -2
- package/dist/api/swan/index.js +1 -1
- package/dist/api/taro.js +3 -4
- package/dist/api/ui/background.js +1 -1
- package/dist/api/ui/fonts.js +13 -4
- package/dist/api/ui/interaction/actionSheet.js +4 -13
- package/dist/api/ui/interaction/index.js +19 -10
- package/dist/api/ui/interaction/modal.js +7 -28
- package/dist/api/ui/interaction/toast.js +15 -41
- package/dist/api/ui/menu.js +1 -1
- package/dist/api/ui/navigation-bar/index.js +2 -2
- package/dist/api/ui/pull-down-refresh.js +1 -1
- package/dist/api/ui/scroll/index.js +2 -2
- package/dist/api/ui/sticky.js +1 -1
- package/dist/api/ui/tab-bar.js +2 -2
- package/dist/api/ui/window.js +2 -2
- package/dist/api/worker/index.js +1 -1
- package/dist/api/wxml/index.js +1 -1
- package/dist/api/wxml/selectorQuery.js +1 -1
- package/dist/index.cjs.js +326 -156
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +5170 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/{api/utils → utils}/animation.js +0 -0
- package/dist/{api/utils → utils}/handler.js +0 -0
- package/dist/{api/utils → utils}/index.js +0 -0
- package/dist/{api/utils → utils}/lodash.js +0 -0
- package/dist/{api/utils → utils}/valid.js +0 -0
- package/package.json +14 -14
- package/src/api/ad/index.ts +1 -1
- package/src/api/ai/facial.ts +1 -1
- package/src/api/ai/visual.ts +1 -1
- package/src/api/alipay/index.ts +1 -1
- package/src/api/base/crypto.ts +1 -1
- package/src/api/base/debug.ts +1 -1
- package/src/api/base/index.ts +1 -1
- package/src/api/base/performance.ts +1 -1
- package/src/api/base/system.ts +2 -2
- package/src/api/base/update.ts +1 -1
- package/src/api/base/weapp/app-event.ts +1 -1
- package/src/api/base/weapp/life-cycle.ts +1 -1
- package/src/api/canvas/canvasGetImageData.ts +2 -2
- package/src/api/canvas/canvasPutImageData.ts +2 -2
- package/src/api/canvas/canvasToTempFilePath.ts +2 -2
- package/src/api/canvas/createCanvasContext.ts +1 -1
- package/src/api/canvas/index.ts +1 -1
- package/src/api/cloud/index.ts +1 -1
- package/src/api/data-analysis/index.ts +1 -1
- package/src/api/device/accelerometer.ts +2 -2
- package/src/api/device/accessibility.ts +1 -1
- package/src/api/device/battery.ts +2 -2
- package/src/api/device/bluetooth-ble.ts +1 -1
- package/src/api/device/bluetooth-peripheral.ts +1 -1
- package/src/api/device/bluetooth.ts +1 -1
- package/src/api/device/calendar.ts +1 -1
- package/src/api/device/clipboard.ts +1 -1
- package/src/api/device/compass.ts +2 -2
- package/src/api/device/contact.ts +1 -1
- package/src/api/device/crypto.ts +1 -1
- package/src/api/device/gyroscope.ts +1 -1
- package/src/api/device/iBeacon.ts +1 -1
- package/src/api/device/keyboard.ts +1 -1
- package/src/api/device/memory.ts +1 -1
- package/src/api/device/motion.ts +2 -2
- package/src/api/device/network.ts +2 -2
- package/src/api/device/nfc.ts +1 -1
- package/src/api/device/phone.ts +2 -2
- package/src/api/device/scan.ts +1 -1
- package/src/api/device/screen.ts +1 -1
- package/src/api/device/vibrate.ts +1 -1
- package/src/api/device/wifi.ts +1 -1
- package/src/api/ext/index.ts +1 -1
- package/src/api/files/index.ts +1 -1
- package/src/api/location/chooseLocation.ts +1 -1
- package/src/api/location/getLocation.ts +2 -2
- package/src/api/location/index.ts +1 -1
- package/src/api/media/EditorContext.ts +1 -1
- package/src/api/media/audio/InnerAudioContext.ts +2 -2
- package/src/api/media/audio/index.ts +1 -1
- package/src/api/media/background-audio/BackgroundAudioManager.ts +2 -2
- package/src/api/media/background-audio/index.ts +1 -1
- package/src/api/media/camera.ts +1 -1
- package/src/api/media/image/chooseImage.ts +2 -2
- package/src/api/media/image/getImageInfo.ts +2 -2
- package/src/api/media/image/index.ts +1 -1
- package/src/api/media/image/previewImage.ts +2 -2
- package/src/api/media/live.ts +1 -1
- package/src/api/media/map.ts +1 -1
- package/src/api/media/media-recorder.ts +1 -1
- package/src/api/media/recorder.ts +1 -1
- package/src/api/media/video/index.ts +2 -2
- package/src/api/media/video-decoder.ts +1 -1
- package/src/api/media/video-processing.ts +1 -1
- package/src/api/media/voip.ts +1 -1
- package/src/api/navigate/index.ts +1 -1
- package/src/api/network/download.ts +2 -2
- package/src/api/network/mdns.ts +1 -1
- package/src/api/network/request/index.ts +1 -1
- package/src/api/network/tcp.ts +1 -1
- package/src/api/network/udp.ts +1 -1
- package/src/api/network/upload.ts +2 -2
- package/src/api/network/websocket/index.ts +2 -2
- package/src/api/open-api/account.ts +1 -1
- package/src/api/open-api/address.ts +1 -1
- package/src/api/open-api/authorize.ts +1 -1
- package/src/api/open-api/card.ts +1 -1
- package/src/api/open-api/channels-live.ts +1 -1
- package/src/api/open-api/customer-service.ts +1 -1
- package/src/api/open-api/facial.ts +1 -1
- package/src/api/open-api/favorites.ts +1 -1
- package/src/api/open-api/group.ts +1 -1
- package/src/api/open-api/invoice.ts +1 -1
- package/src/api/open-api/license-plate.ts +1 -1
- package/src/api/open-api/login.ts +1 -1
- package/src/api/open-api/red-package.ts +1 -1
- package/src/api/open-api/settings.ts +1 -1
- package/src/api/open-api/soter.ts +1 -1
- package/src/api/open-api/subscribe-message.ts +1 -1
- package/src/api/open-api/user-info.ts +1 -1
- package/src/api/open-api/werun.ts +1 -1
- package/src/api/payment/index.ts +1 -1
- package/src/api/share/index.ts +1 -1
- package/src/api/storage/background-fetch.ts +1 -1
- package/src/api/storage/index.ts +2 -2
- package/src/api/swan/index.ts +1 -1
- package/src/api/taro.ts +3 -8
- package/src/api/ui/background.ts +1 -1
- package/src/api/ui/fonts.ts +1 -1
- package/src/api/ui/interaction/actionSheet.ts +3 -3
- package/src/api/ui/interaction/index.ts +2 -2
- package/src/api/ui/interaction/modal.ts +3 -3
- package/src/api/ui/interaction/toast.ts +3 -3
- package/src/api/ui/menu.ts +1 -1
- package/src/api/ui/navigation-bar/index.ts +2 -2
- package/src/api/ui/pull-down-refresh.ts +1 -1
- package/src/api/ui/scroll/index.ts +3 -3
- package/src/api/ui/sticky.ts +1 -1
- package/src/api/ui/tab-bar.ts +2 -2
- package/src/api/ui/window.ts +2 -2
- package/src/api/worker/index.ts +1 -1
- package/src/api/wxml/index.ts +1 -1
- package/src/api/wxml/selectorQuery.ts +1 -1
- package/src/{api/utils → utils}/animation.ts +0 -0
- package/src/{api/utils → utils}/handler.ts +0 -0
- package/src/{api/utils → utils}/index.ts +0 -0
- package/src/{api/utils → utils}/lodash.ts +2 -2
- package/src/{api/utils → utils}/valid.ts +0 -0
- package/dist/dist/api/ad/index.d.ts +0 -6
- package/dist/dist/api/ai/facial.d.ts +0 -9
- package/dist/dist/api/ai/index.d.ts +0 -2
- package/dist/dist/api/ai/visual.d.ts +0 -6
- package/dist/dist/api/alipay/index.d.ts +0 -3
- package/dist/dist/api/base/crypto.d.ts +0 -3
- package/dist/dist/api/base/debug.d.ts +0 -9
- package/dist/dist/api/base/index.d.ts +0 -12
- package/dist/dist/api/base/performance.d.ts +0 -6
- package/dist/dist/api/base/system.d.ts +0 -25
- package/dist/dist/api/base/update.d.ts +0 -6
- package/dist/dist/api/base/weapp/app-event.d.ts +0 -48
- package/dist/dist/api/base/weapp/life-cycle.d.ts +0 -6
- package/dist/dist/api/canvas/CanvasContext.d.ts +0 -104
- package/dist/dist/api/canvas/canvasGetImageData.d.ts +0 -5
- package/dist/dist/api/canvas/canvasPutImageData.d.ts +0 -6
- package/dist/dist/api/canvas/canvasToTempFilePath.d.ts +0 -6
- package/dist/dist/api/canvas/createCanvasContext.d.ts +0 -5
- package/dist/dist/api/canvas/index.d.ts +0 -12
- package/dist/dist/api/cloud/index.d.ts +0 -31
- package/dist/dist/api/data-analysis/index.d.ts +0 -12
- package/dist/dist/api/device/accelerometer.d.ts +0 -17
- package/dist/dist/api/device/accessibility.d.ts +0 -3
- package/dist/dist/api/device/battery.d.ts +0 -5
- package/dist/dist/api/device/bluetooth-ble.d.ts +0 -48
- package/dist/dist/api/device/bluetooth-peripheral.d.ts +0 -9
- package/dist/dist/api/device/bluetooth.d.ts +0 -39
- package/dist/dist/api/device/calendar.d.ts +0 -6
- package/dist/dist/api/device/clipboard.d.ts +0 -15
- package/dist/dist/api/device/compass.d.ts +0 -17
- package/dist/dist/api/device/contact.d.ts +0 -6
- package/dist/dist/api/device/crypto.d.ts +0 -3
- package/dist/dist/api/device/gyroscope.d.ts +0 -12
- package/dist/dist/api/device/iBeacon.d.ts +0 -21
- package/dist/dist/api/device/index.d.ts +0 -23
- package/dist/dist/api/device/keyboard.d.ts +0 -12
- package/dist/dist/api/device/memory.d.ts +0 -6
- package/dist/dist/api/device/motion.d.ts +0 -17
- package/dist/dist/api/device/network.d.ts +0 -20
- package/dist/dist/api/device/nfc.d.ts +0 -21
- package/dist/dist/api/device/phone.d.ts +0 -2
- package/dist/dist/api/device/scan.d.ts +0 -3
- package/dist/dist/api/device/screen.d.ts +0 -18
- package/dist/dist/api/device/vibrate.d.ts +0 -9
- package/dist/dist/api/device/wifi.d.ts +0 -33
- package/dist/dist/api/ext/index.d.ts +0 -6
- package/dist/dist/api/files/index.d.ts +0 -24
- package/dist/dist/api/framework/index.d.ts +0 -4
- package/dist/dist/api/index.d.ts +0 -24
- package/dist/dist/api/location/chooseLocation.d.ts +0 -6
- package/dist/dist/api/location/getLocation.d.ts +0 -2
- package/dist/dist/api/location/index.d.ts +0 -29
- package/dist/dist/api/media/EditorContext.d.ts +0 -42
- package/dist/dist/api/media/audio/InnerAudioContext.d.ts +0 -58
- package/dist/dist/api/media/audio/index.d.ts +0 -29
- package/dist/dist/api/media/background-audio/BackgroundAudioManager.d.ts +0 -71
- package/dist/dist/api/media/background-audio/index.d.ts +0 -29
- package/dist/dist/api/media/camera.d.ts +0 -3
- package/dist/dist/api/media/image/chooseImage.d.ts +0 -5
- package/dist/dist/api/media/image/getImageInfo.d.ts +0 -5
- package/dist/dist/api/media/image/index.d.ts +0 -15
- package/dist/dist/api/media/image/previewImage.d.ts +0 -8
- package/dist/dist/api/media/index.d.ts +0 -12
- package/dist/dist/api/media/live.d.ts +0 -6
- package/dist/dist/api/media/map.d.ts +0 -3
- package/dist/dist/api/media/media-recorder.d.ts +0 -3
- package/dist/dist/api/media/recorder.d.ts +0 -9
- package/dist/dist/api/media/video/index.d.ts +0 -24
- package/dist/dist/api/media/video-decoder.d.ts +0 -3
- package/dist/dist/api/media/video-processing.d.ts +0 -3
- package/dist/dist/api/media/voip.d.ts +0 -42
- package/dist/dist/api/navigate/index.d.ts +0 -12
- package/dist/dist/api/network/download.d.ts +0 -6
- package/dist/dist/api/network/index.d.ts +0 -7
- package/dist/dist/api/network/mdns.d.ts +0 -30
- package/dist/dist/api/network/request/index.d.ts +0 -4
- package/dist/dist/api/network/tcp.d.ts +0 -3
- package/dist/dist/api/network/udp.d.ts +0 -3
- package/dist/dist/api/network/upload.d.ts +0 -5
- package/dist/dist/api/network/utils.d.ts +0 -44
- package/dist/dist/api/network/websocket/index.d.ts +0 -7
- package/dist/dist/api/network/websocket/socketTask.d.ts +0 -25
- package/dist/dist/api/open-api/account.d.ts +0 -3
- package/dist/dist/api/open-api/address.d.ts +0 -3
- package/dist/dist/api/open-api/authorize.d.ts +0 -6
- package/dist/dist/api/open-api/card.d.ts +0 -6
- package/dist/dist/api/open-api/channels-live.d.ts +0 -18
- package/dist/dist/api/open-api/customer-service.d.ts +0 -3
- package/dist/dist/api/open-api/facial.d.ts +0 -12
- package/dist/dist/api/open-api/favorites.d.ts +0 -6
- package/dist/dist/api/open-api/group.d.ts +0 -3
- package/dist/dist/api/open-api/index.d.ts +0 -18
- package/dist/dist/api/open-api/invoice.d.ts +0 -6
- package/dist/dist/api/open-api/license-plate.d.ts +0 -3
- package/dist/dist/api/open-api/login.d.ts +0 -9
- package/dist/dist/api/open-api/red-package.d.ts +0 -3
- package/dist/dist/api/open-api/settings.d.ts +0 -6
- package/dist/dist/api/open-api/soter.d.ts +0 -9
- package/dist/dist/api/open-api/subscribe-message.d.ts +0 -3
- package/dist/dist/api/open-api/user-info.d.ts +0 -6
- package/dist/dist/api/open-api/werun.d.ts +0 -6
- package/dist/dist/api/payment/index.d.ts +0 -6
- package/dist/dist/api/route/index.d.ts +0 -1
- package/dist/dist/api/share/index.d.ts +0 -30
- package/dist/dist/api/storage/background-fetch.d.ts +0 -12
- package/dist/dist/api/storage/index.d.ts +0 -18
- package/dist/dist/api/swan/index.d.ts +0 -63
- package/dist/dist/api/taro.d.ts +0 -12
- package/dist/dist/api/ui/animation/index.d.ts +0 -2
- package/dist/dist/api/ui/background.d.ts +0 -6
- package/dist/dist/api/ui/custom-component.d.ts +0 -1
- package/dist/dist/api/ui/fonts.d.ts +0 -2
- package/dist/dist/api/ui/index.d.ts +0 -12
- package/dist/dist/api/ui/interaction/actionSheet.d.ts +0 -61
- package/dist/dist/api/ui/interaction/index.d.ts +0 -14
- package/dist/dist/api/ui/interaction/modal.d.ts +0 -69
- package/dist/dist/api/ui/interaction/toast.d.ts +0 -85
- package/dist/dist/api/ui/menu.d.ts +0 -3
- package/dist/dist/api/ui/navigation-bar/index.d.ts +0 -15
- package/dist/dist/api/ui/pull-down-refresh.d.ts +0 -9
- package/dist/dist/api/ui/scroll/index.d.ts +0 -5
- package/dist/dist/api/ui/sticky.d.ts +0 -3
- package/dist/dist/api/ui/tab-bar.d.ts +0 -34
- package/dist/dist/api/ui/window.d.ts +0 -15
- package/dist/dist/api/utils/animation.d.ts +0 -6
- package/dist/dist/api/utils/handler.d.ts +0 -48
- package/dist/dist/api/utils/index.d.ts +0 -39
- package/dist/dist/api/utils/lodash.d.ts +0 -2
- package/dist/dist/api/utils/valid.d.ts +0 -2
- package/dist/dist/api/worker/index.d.ts +0 -3
- package/dist/dist/api/wxml/index.d.ts +0 -5
- package/dist/dist/api/wxml/nodesRef.d.ts +0 -13
- package/dist/dist/api/wxml/selectorQuery.d.ts +0 -24
- package/dist/dist/index.d.ts +0 -4
- package/dist/dist/types/type.d.ts +0 -29
- package/dist/types/type.js +0 -2
- package/src/types/api.d.ts +0 -4
- package/src/types/define.d.ts +0 -2
- package/src/types/index.d.ts +0 -3
- package/src/types/type.ts +0 -32
package/dist/api/ad/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { temporarilyNotSupport } from '
|
|
1
|
+
import { temporarilyNotSupport } from '../../utils';
|
|
2
2
|
// 广告
|
|
3
3
|
export const createRewardedVideoAd = temporarilyNotSupport('createRewardedVideoAd');
|
|
4
4
|
export const createInterstitialAd = temporarilyNotSupport('createInterstitialAd');
|
package/dist/api/ai/facial.js
CHANGED
package/dist/api/ai/visual.js
CHANGED
package/dist/api/alipay/index.js
CHANGED
package/dist/api/base/crypto.js
CHANGED
package/dist/api/base/debug.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { temporarilyNotSupport } from '
|
|
1
|
+
import { temporarilyNotSupport } from '../../utils';
|
|
2
2
|
export const setEnableDebug = temporarilyNotSupport('setEnableDebug');
|
|
3
3
|
export const getRealtimeLogManager = temporarilyNotSupport('getRealtimeLogManager');
|
|
4
4
|
export const getLogManager = temporarilyNotSupport('getLogManager');
|
package/dist/api/base/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { fromByteArray, toByteArray } from 'base64-js';
|
|
2
|
-
import { temporarilyNotSupport } from '
|
|
2
|
+
import { temporarilyNotSupport } from '../../utils';
|
|
3
3
|
// TODO env 环境变量
|
|
4
4
|
export const canIUse = temporarilyNotSupport('canIUse');
|
|
5
5
|
export function arrayBufferToBase64(arrayBuffer) {
|
package/dist/api/base/system.js
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
1
10
|
import MobileDetect from 'mobile-detect';
|
|
2
|
-
import { temporarilyNotSupport } from '
|
|
3
|
-
import { MethodHandler } from '
|
|
11
|
+
import { temporarilyNotSupport } from '../../utils';
|
|
12
|
+
import { MethodHandler } from '../../utils/handler';
|
|
4
13
|
/** 跳转系统蓝牙设置页 */
|
|
5
14
|
export const openSystemBluetoothSetting = temporarilyNotSupport('openSystemBluetoothSetting');
|
|
6
15
|
/** 跳转系统微信授权管理页 */
|
|
@@ -125,44 +134,39 @@ export const getSystemInfoSync = () => {
|
|
|
125
134
|
const appBaseInfo = getAppBaseInfo();
|
|
126
135
|
const appAuthorizeSetting = getAppAuthorizeSetting();
|
|
127
136
|
delete deviceInfo.abi;
|
|
128
|
-
const info = {
|
|
129
|
-
...windowInfo,
|
|
130
|
-
...systemSetting,
|
|
131
|
-
...deviceInfo,
|
|
132
|
-
...appBaseInfo,
|
|
137
|
+
const info = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, windowInfo), systemSetting), deviceInfo), appBaseInfo), {
|
|
133
138
|
/** 用户字体大小(单位px)。以微信客户端「我-设置-通用-字体大小」中的设置为准 */
|
|
134
|
-
fontSizeSetting: NaN,
|
|
139
|
+
fontSizeSetting: NaN,
|
|
135
140
|
/** 允许微信使用相册的开关(仅 iOS 有效) */
|
|
136
|
-
albumAuthorized: appAuthorizeSetting.albumAuthorized === 'authorized',
|
|
141
|
+
albumAuthorized: appAuthorizeSetting.albumAuthorized === 'authorized',
|
|
137
142
|
/** 允许微信使用摄像头的开关 */
|
|
138
|
-
cameraAuthorized: appAuthorizeSetting.cameraAuthorized === 'authorized',
|
|
143
|
+
cameraAuthorized: appAuthorizeSetting.cameraAuthorized === 'authorized',
|
|
139
144
|
/** 允许微信使用定位的开关 */
|
|
140
|
-
locationAuthorized: appAuthorizeSetting.locationAuthorized === 'authorized',
|
|
145
|
+
locationAuthorized: appAuthorizeSetting.locationAuthorized === 'authorized',
|
|
141
146
|
/** 允许微信使用麦克风的开关 */
|
|
142
|
-
microphoneAuthorized: appAuthorizeSetting.microphoneAuthorized === 'authorized',
|
|
147
|
+
microphoneAuthorized: appAuthorizeSetting.microphoneAuthorized === 'authorized',
|
|
143
148
|
/** 允许微信通知的开关 */
|
|
144
|
-
notificationAuthorized: appAuthorizeSetting.notificationAuthorized === 'authorized',
|
|
149
|
+
notificationAuthorized: appAuthorizeSetting.notificationAuthorized === 'authorized',
|
|
145
150
|
/** 允许微信通知带有提醒的开关(仅 iOS 有效) */
|
|
146
|
-
notificationAlertAuthorized: appAuthorizeSetting.notificationAlertAuthorized === 'authorized',
|
|
151
|
+
notificationAlertAuthorized: appAuthorizeSetting.notificationAlertAuthorized === 'authorized',
|
|
147
152
|
/** 允许微信通知带有标记的开关(仅 iOS 有效) */
|
|
148
|
-
notificationBadgeAuthorized: appAuthorizeSetting.notificationBadgeAuthorized === 'authorized',
|
|
153
|
+
notificationBadgeAuthorized: appAuthorizeSetting.notificationBadgeAuthorized === 'authorized',
|
|
149
154
|
/** 允许微信通知带有声音的开关(仅 iOS 有效) */
|
|
150
|
-
notificationSoundAuthorized: appAuthorizeSetting.notificationSoundAuthorized === 'authorized',
|
|
155
|
+
notificationSoundAuthorized: appAuthorizeSetting.notificationSoundAuthorized === 'authorized',
|
|
151
156
|
/** 允许微信使用日历的开关 */
|
|
152
|
-
phoneCalendarAuthorized: appAuthorizeSetting.phoneCalendarAuthorized === 'authorized',
|
|
157
|
+
phoneCalendarAuthorized: appAuthorizeSetting.phoneCalendarAuthorized === 'authorized',
|
|
153
158
|
/** `true` 表示模糊定位,`false` 表示精确定位,仅 iOS 支持 */
|
|
154
|
-
locationReducedAccuracy: appAuthorizeSetting.locationReducedAccuracy,
|
|
159
|
+
locationReducedAccuracy: appAuthorizeSetting.locationReducedAccuracy,
|
|
155
160
|
/** 小程序当前运行环境 */
|
|
156
|
-
environment: ''
|
|
157
|
-
};
|
|
161
|
+
environment: '' });
|
|
158
162
|
return info;
|
|
159
163
|
};
|
|
160
164
|
/** 获取系统信息 */
|
|
161
|
-
export const getSystemInfoAsync =
|
|
165
|
+
export const getSystemInfoAsync = (options = {}) => __awaiter(void 0, void 0, void 0, function* () {
|
|
162
166
|
const { success, fail, complete } = options;
|
|
163
167
|
const handle = new MethodHandler({ name: 'getSystemInfoAsync', success, fail, complete });
|
|
164
168
|
try {
|
|
165
|
-
const info =
|
|
169
|
+
const info = yield getSystemInfoSync();
|
|
166
170
|
return handle.success(info);
|
|
167
171
|
}
|
|
168
172
|
catch (error) {
|
|
@@ -170,13 +174,13 @@ export const getSystemInfoAsync = async (options = {}) => {
|
|
|
170
174
|
errMsg: error
|
|
171
175
|
});
|
|
172
176
|
}
|
|
173
|
-
};
|
|
177
|
+
});
|
|
174
178
|
/** 获取系统信息 */
|
|
175
|
-
export const getSystemInfo =
|
|
179
|
+
export const getSystemInfo = (options = {}) => __awaiter(void 0, void 0, void 0, function* () {
|
|
176
180
|
const { success, fail, complete } = options;
|
|
177
181
|
const handle = new MethodHandler({ name: 'getSystemInfo', success, fail, complete });
|
|
178
182
|
try {
|
|
179
|
-
const info =
|
|
183
|
+
const info = yield getSystemInfoSync();
|
|
180
184
|
return handle.success(info);
|
|
181
185
|
}
|
|
182
186
|
catch (error) {
|
|
@@ -184,4 +188,4 @@ export const getSystemInfo = async (options = {}) => {
|
|
|
184
188
|
errMsg: error
|
|
185
189
|
});
|
|
186
190
|
}
|
|
187
|
-
};
|
|
191
|
+
});
|
package/dist/api/base/update.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { temporarilyNotSupport } from '
|
|
1
|
+
import { temporarilyNotSupport } from '../../../utils';
|
|
2
2
|
// 应用级事件
|
|
3
3
|
export const onUnhandledRejection = temporarilyNotSupport('onUnhandledRejection');
|
|
4
4
|
export const onThemeChange = temporarilyNotSupport('onThemeChange');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { temporarilyNotSupport } from '
|
|
1
|
+
import { temporarilyNotSupport } from '../../../utils';
|
|
2
2
|
// 生命周期
|
|
3
3
|
export const getLaunchOptionsSync = temporarilyNotSupport('getLaunchOptionsSync');
|
|
4
4
|
export const getEnterOptionsSync = temporarilyNotSupport('getEnterOptionsSync');
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
1
10
|
const TextBaseLineMap = {
|
|
2
11
|
top: 'top',
|
|
3
12
|
bottom: 'bottom',
|
|
@@ -81,24 +90,26 @@ export class CanvasContext {
|
|
|
81
90
|
* 将之前在绘图上下文中的描述(路径、变形、样式)画到 canvas 中。
|
|
82
91
|
* @todo 每次 draw 都会读取 width 和 height
|
|
83
92
|
*/
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
93
|
+
draw(reserve, callback) {
|
|
94
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
95
|
+
try {
|
|
96
|
+
if (!reserve) {
|
|
97
|
+
this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
|
|
98
|
+
}
|
|
99
|
+
// 部分 action 是异步的
|
|
100
|
+
for (const { func, args } of this.actions) {
|
|
101
|
+
yield func.apply(this.ctx, args);
|
|
102
|
+
}
|
|
103
|
+
this.emptyActions();
|
|
104
|
+
callback && callback();
|
|
88
105
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
106
|
+
catch (e) {
|
|
107
|
+
/* eslint-disable no-throw-literal */
|
|
108
|
+
throw {
|
|
109
|
+
errMsg: e.message
|
|
110
|
+
};
|
|
92
111
|
}
|
|
93
|
-
|
|
94
|
-
callback && callback();
|
|
95
|
-
}
|
|
96
|
-
catch (e) {
|
|
97
|
-
/* eslint-disable no-throw-literal */
|
|
98
|
-
throw {
|
|
99
|
-
errMsg: e.message
|
|
100
|
-
};
|
|
101
|
-
}
|
|
112
|
+
});
|
|
102
113
|
}
|
|
103
114
|
drawImage(imageResource, ...extra) {
|
|
104
115
|
this.enqueueActions(() => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MethodHandler } from '
|
|
2
|
-
import { findDOM } from '
|
|
1
|
+
import { MethodHandler } from '../../utils/handler';
|
|
2
|
+
import { findDOM } from '../../utils';
|
|
3
3
|
/**
|
|
4
4
|
* 将像素数据绘制到画布。在自定义组件下,第二个参数传入自定义组件实例 this,以操作组件内 <canvas> 组件
|
|
5
5
|
* @todo 暂未支持尺寸相关功能
|
package/dist/api/canvas/index.js
CHANGED
package/dist/api/cloud/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { temporarilyNotSupport } from '
|
|
1
|
+
import { temporarilyNotSupport } from '../../utils';
|
|
2
2
|
export const reportMonitor = temporarilyNotSupport('reportMonitor');
|
|
3
3
|
export const reportAnalytics = temporarilyNotSupport('reportAnalytics');
|
|
4
4
|
export const reportEvent = temporarilyNotSupport('reportEvent');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { throttle } from '
|
|
2
|
-
import { CallbackManager, MethodHandler } from '
|
|
1
|
+
import { throttle } from '../../utils';
|
|
2
|
+
import { CallbackManager, MethodHandler } from '../../utils/handler';
|
|
3
3
|
const callbackManager = new CallbackManager();
|
|
4
4
|
let devicemotionListener;
|
|
5
5
|
/**
|
|
@@ -1,13 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { temporarilyNotSupport } from '../../utils';
|
|
11
|
+
import { MethodHandler } from '../../utils/handler';
|
|
3
12
|
// 电量
|
|
4
13
|
export const getBatteryInfoSync = temporarilyNotSupport('getBatteryInfoSync');
|
|
5
|
-
export const getBatteryInfo =
|
|
14
|
+
export const getBatteryInfo = ({ success, fail, complete } = {}) => __awaiter(void 0, void 0, void 0, function* () {
|
|
6
15
|
var _a;
|
|
7
16
|
const handle = new MethodHandler({ name: 'getBatteryInfo', success, fail, complete });
|
|
8
17
|
try {
|
|
9
18
|
// @ts-ignore
|
|
10
|
-
const battery =
|
|
19
|
+
const battery = yield ((_a = navigator.getBattery) === null || _a === void 0 ? void 0 : _a.call(navigator));
|
|
11
20
|
return handle.success({
|
|
12
21
|
isCharging: battery.charging,
|
|
13
22
|
level: Number(battery.level || 0) * 100
|
|
@@ -18,4 +27,4 @@ export const getBatteryInfo = async ({ success, fail, complete } = {}) => {
|
|
|
18
27
|
errMsg: (error === null || error === void 0 ? void 0 : error.message) || error
|
|
19
28
|
});
|
|
20
29
|
}
|
|
21
|
-
};
|
|
30
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { temporarilyNotSupport } from '
|
|
1
|
+
import { temporarilyNotSupport } from '../../utils';
|
|
2
2
|
// 蓝牙-低功耗中心设备
|
|
3
3
|
export const writeBLECharacteristicValue = temporarilyNotSupport('writeBLECharacteristicValue');
|
|
4
4
|
export const setBLEMTU = temporarilyNotSupport('setBLEMTU');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { temporarilyNotSupport } from '
|
|
1
|
+
import { temporarilyNotSupport } from '../../utils';
|
|
2
2
|
// 蓝牙-低功耗外围设备
|
|
3
3
|
export const onBLEPeripheralConnectionStateChanged = temporarilyNotSupport('onBLEPeripheralConnectionStateChanged');
|
|
4
4
|
export const offBLEPeripheralConnectionStateChanged = temporarilyNotSupport('offBLEPeripheralConnectionStateChanged');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { temporarilyNotSupport } from '
|
|
1
|
+
import { temporarilyNotSupport } from '../../utils';
|
|
2
2
|
// 蓝牙-通用
|
|
3
3
|
export const stopBluetoothDevicesDiscovery = temporarilyNotSupport('stopBluetoothDevicesDiscovery');
|
|
4
4
|
export const startBluetoothDevicesDiscovery = temporarilyNotSupport('startBluetoothDevicesDiscovery');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { temporarilyNotSupport } from '
|
|
1
|
+
import { temporarilyNotSupport } from '../../utils';
|
|
2
2
|
// 日历
|
|
3
3
|
export const addPhoneRepeatCalendar = temporarilyNotSupport('addPhoneRepeatCalendar');
|
|
4
4
|
export const addPhoneCalendar = temporarilyNotSupport('addPhoneCalendar');
|
|
@@ -4,8 +4,17 @@
|
|
|
4
4
|
* setClipboardData: https://github.com/chameleon-team/chameleon-api/tree/master/src/interfaces/setClipBoardData
|
|
5
5
|
* getClipboardData: https://github.com/chameleon-team/chameleon-api/tree/master/src/interfaces/getClipBoardData
|
|
6
6
|
*/
|
|
7
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
12
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
13
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14
|
+
});
|
|
15
|
+
};
|
|
7
16
|
import { setStorage, setStorageSync, getStorageSync } from '../storage/index';
|
|
8
|
-
import { MethodHandler } from '
|
|
17
|
+
import { MethodHandler } from '../../utils/handler';
|
|
9
18
|
const CLIPBOARD_STORAGE_NAME = 'taro_clipboard';
|
|
10
19
|
document.addEventListener('copy', () => {
|
|
11
20
|
var _a;
|
|
@@ -19,7 +28,7 @@ document.addEventListener('copy', () => {
|
|
|
19
28
|
/**
|
|
20
29
|
* 设置系统剪贴板的内容
|
|
21
30
|
*/
|
|
22
|
-
export const setClipboardData =
|
|
31
|
+
export const setClipboardData = ({ data, success, fail, complete }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
23
32
|
const handle = new MethodHandler({ name: 'setClipboardData', success, fail, complete });
|
|
24
33
|
try {
|
|
25
34
|
setStorageSync(CLIPBOARD_STORAGE_NAME, data);
|
|
@@ -49,11 +58,11 @@ export const setClipboardData = async ({ data, success, fail, complete }) => {
|
|
|
49
58
|
catch (e) {
|
|
50
59
|
return handle.fail({ errMsg: e.message });
|
|
51
60
|
}
|
|
52
|
-
};
|
|
61
|
+
});
|
|
53
62
|
/**
|
|
54
63
|
* 获取系统剪贴板的内容
|
|
55
64
|
*/
|
|
56
|
-
export const getClipboardData =
|
|
65
|
+
export const getClipboardData = ({ success, fail, complete } = {}) => __awaiter(void 0, void 0, void 0, function* () {
|
|
57
66
|
const handle = new MethodHandler({ name: 'getClipboardData', success, fail, complete });
|
|
58
67
|
try {
|
|
59
68
|
const data = getStorageSync(CLIPBOARD_STORAGE_NAME);
|
|
@@ -62,4 +71,4 @@ export const getClipboardData = async ({ success, fail, complete } = {}) => {
|
|
|
62
71
|
catch (e) {
|
|
63
72
|
return handle.fail({ errMsg: e.message });
|
|
64
73
|
}
|
|
65
|
-
};
|
|
74
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getDeviceInfo } from '../base/system';
|
|
2
|
-
import { throttle } from '
|
|
3
|
-
import { CallbackManager, MethodHandler } from '
|
|
2
|
+
import { throttle } from '../../utils';
|
|
3
|
+
import { CallbackManager, MethodHandler } from '../../utils/handler';
|
|
4
4
|
const callbackManager = new CallbackManager();
|
|
5
5
|
let compassListener;
|
|
6
6
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { temporarilyNotSupport } from '
|
|
1
|
+
import { temporarilyNotSupport } from '../../utils';
|
|
2
2
|
// 蓝牙-信标(Beacon)
|
|
3
3
|
export const stopBeaconDiscovery = temporarilyNotSupport('stopBeaconDiscovery');
|
|
4
4
|
export const startBeaconDiscovery = temporarilyNotSupport('startBeaconDiscovery');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { temporarilyNotSupport } from '
|
|
1
|
+
import { temporarilyNotSupport } from '../../utils';
|
|
2
2
|
// 键盘
|
|
3
3
|
export const onKeyboardHeightChange = temporarilyNotSupport('onKeyboardHeightChange');
|
|
4
4
|
export const offKeyboardHeightChange = temporarilyNotSupport('offKeyboardHeightChange');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { throttle } from '
|
|
2
|
-
import { CallbackManager, MethodHandler } from '
|
|
1
|
+
import { throttle } from '../../utils';
|
|
2
|
+
import { CallbackManager, MethodHandler } from '../../utils/handler';
|
|
3
3
|
const callbackManager = new CallbackManager();
|
|
4
4
|
let deviceMotionListener;
|
|
5
5
|
const INTERVAL_MAP = {
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { CallbackManager, MethodHandler } from '../../utils/handler';
|
|
11
|
+
import { temporarilyNotSupport } from '../../utils';
|
|
3
12
|
function getConnection() {
|
|
4
13
|
// @ts-ignore
|
|
5
14
|
return navigator.connection || navigator.mozConnection || navigator.webkitConnection || navigator.msConnection;
|
|
@@ -46,12 +55,12 @@ export const getNetworkType = (options = {}) => {
|
|
|
46
55
|
return handle.success({ networkType });
|
|
47
56
|
};
|
|
48
57
|
const networkStatusManager = new CallbackManager();
|
|
49
|
-
const networkStatusListener =
|
|
50
|
-
const { networkType } =
|
|
58
|
+
const networkStatusListener = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
59
|
+
const { networkType } = yield getNetworkType();
|
|
51
60
|
const isConnected = networkType !== 'none';
|
|
52
61
|
const obj = { isConnected, networkType };
|
|
53
62
|
networkStatusManager.trigger(obj);
|
|
54
|
-
};
|
|
63
|
+
});
|
|
55
64
|
/**
|
|
56
65
|
* 在最近的八次网络请求中, 出现下列三个现象之一则判定弱网。
|
|
57
66
|
* - 出现三次以上连接超时
|
package/dist/api/device/nfc.js
CHANGED
package/dist/api/device/phone.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { shouldBeObject, getParameterError } from '
|
|
2
|
-
import { MethodHandler } from '
|
|
1
|
+
import { shouldBeObject, getParameterError } from '../../utils';
|
|
2
|
+
import { MethodHandler } from '../../utils/handler';
|
|
3
3
|
export const makePhoneCall = (options) => {
|
|
4
4
|
// options must be an Object
|
|
5
5
|
const isObject = shouldBeObject(options);
|
package/dist/api/device/scan.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { temporarilyNotSupport } from '
|
|
1
|
+
import { temporarilyNotSupport } from '../../utils';
|
|
2
2
|
// 屏幕
|
|
3
3
|
export const setVisualEffectOnCapture = temporarilyNotSupport('setVisualEffectOnCapture');
|
|
4
4
|
export const setScreenBrightness = temporarilyNotSupport('setScreenBrightness');
|
package/dist/api/device/wifi.js
CHANGED
package/dist/api/ext/index.js
CHANGED
package/dist/api/files/index.js
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
1
12
|
import { stringify } from 'query-string';
|
|
2
|
-
import { MethodHandler } from '
|
|
13
|
+
import { MethodHandler } from '../../utils/handler';
|
|
3
14
|
import './style.css';
|
|
4
15
|
function createLocationChooser(handler, key = LOCATION_APIKEY, mapOpt = {}) {
|
|
5
16
|
var _a, _b, _c;
|
|
6
|
-
const { latitude, longitude,
|
|
7
|
-
const query = {
|
|
8
|
-
key,
|
|
9
|
-
type: 1,
|
|
10
|
-
coord: ((_a = mapOpt.coord) !== null && _a !== void 0 ? _a : [latitude, longitude].every(e => Number(e) >= 0)) ? `${latitude},${longitude}` : undefined,
|
|
11
|
-
referer: 'myapp',
|
|
12
|
-
...opts
|
|
13
|
-
};
|
|
17
|
+
const { latitude, longitude } = mapOpt, opts = __rest(mapOpt, ["latitude", "longitude"]);
|
|
18
|
+
const query = Object.assign({ key, type: 1, coord: ((_a = mapOpt.coord) !== null && _a !== void 0 ? _a : [latitude, longitude].every(e => Number(e) >= 0)) ? `${latitude},${longitude}` : undefined, referer: 'myapp' }, opts);
|
|
14
19
|
const html = `
|
|
15
20
|
<div class='taro_choose_location'>
|
|
16
21
|
<div class='taro_choose_location_bar'>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { processOpenApi, shouldBeObject } from '
|
|
2
|
-
import { MethodHandler } from '
|
|
1
|
+
import { processOpenApi, shouldBeObject } from '../../utils';
|
|
2
|
+
import { MethodHandler } from '../../utils/handler';
|
|
3
3
|
const getLocationByW3CApi = (options) => {
|
|
4
4
|
var _a;
|
|
5
5
|
// 断言 options 必须是 Object
|