@ray-js/api 0.3.0-beta.1c347991
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/@types/api.d.ts +4 -0
- package/@types/index.d.ts +9 -0
- package/README.md +40 -0
- package/lib/authorize/index.android.js +1 -0
- package/lib/authorize/index.ios.js +1 -0
- package/lib/authorize/index.js +6 -0
- package/lib/authorize/index.md +20 -0
- package/lib/authorize/index.native.d.ts +1 -0
- package/lib/authorize/index.tuya.d.ts +1 -0
- package/lib/authorize/index.tuya.js +8 -0
- package/lib/authorize/index.web.js +6 -0
- package/lib/authorize/index.wechat.d.ts +1 -0
- package/lib/authorize/index.wechat.js +8 -0
- package/lib/authorizeStatus/index.android.js +1 -0
- package/lib/authorizeStatus/index.ios.js +1 -0
- package/lib/authorizeStatus/index.js +6 -0
- package/lib/authorizeStatus/index.md +20 -0
- package/lib/authorizeStatus/index.native.d.ts +1 -0
- package/lib/authorizeStatus/index.tuya.d.ts +1 -0
- package/lib/authorizeStatus/index.tuya.js +8 -0
- package/lib/authorizeStatus/index.web.js +6 -0
- package/lib/authorizeStatus/index.wechat.d.ts +1 -0
- package/lib/authorizeStatus/index.wechat.js +8 -0
- package/lib/beginEvent/index.android.js +1 -0
- package/lib/beginEvent/index.d.ts +1 -0
- package/lib/beginEvent/index.ios.js +1 -0
- package/lib/beginEvent/index.js +3 -0
- package/lib/beginEvent/index.md +20 -0
- package/lib/beginEvent/index.native.d.ts +1 -0
- package/lib/beginEvent/index.tuya.d.ts +1 -0
- package/lib/beginEvent/index.tuya.js +8 -0
- package/lib/beginEvent/index.web.js +3 -0
- package/lib/beginEvent/index.wechat.d.ts +1 -0
- package/lib/beginEvent/index.wechat.js +8 -0
- package/lib/chooseImage/index.android.js +1 -0
- package/lib/chooseImage/index.ios.js +1 -0
- package/lib/chooseImage/index.js +6 -0
- package/lib/chooseImage/index.md +20 -0
- package/lib/chooseImage/index.native.d.ts +1 -0
- package/lib/chooseImage/index.tuya.d.ts +1 -0
- package/lib/chooseImage/index.tuya.js +8 -0
- package/lib/chooseImage/index.web.js +6 -0
- package/lib/chooseImage/index.wechat.d.ts +1 -0
- package/lib/chooseImage/index.wechat.js +8 -0
- package/lib/clearStorage/index.android.js +1 -0
- package/lib/clearStorage/index.ios.js +1 -0
- package/lib/clearStorage/index.js +6 -0
- package/lib/clearStorage/index.md +20 -0
- package/lib/clearStorage/index.native.d.ts +1 -0
- package/lib/clearStorage/index.tuya.d.ts +1 -0
- package/lib/clearStorage/index.tuya.js +8 -0
- package/lib/clearStorage/index.web.js +6 -0
- package/lib/clearStorage/index.wechat.d.ts +1 -0
- package/lib/clearStorage/index.wechat.js +8 -0
- package/lib/clearStorageSync/index.android.js +1 -0
- package/lib/clearStorageSync/index.ios.js +1 -0
- package/lib/clearStorageSync/index.js +6 -0
- package/lib/clearStorageSync/index.md +20 -0
- package/lib/clearStorageSync/index.native.d.ts +1 -0
- package/lib/clearStorageSync/index.tuya.d.ts +1 -0
- package/lib/clearStorageSync/index.tuya.js +8 -0
- package/lib/clearStorageSync/index.web.js +6 -0
- package/lib/clearStorageSync/index.wechat.d.ts +1 -0
- package/lib/clearStorageSync/index.wechat.js +8 -0
- package/lib/core/index.android.js +1 -0
- package/lib/core/index.d.ts +1 -0
- package/lib/core/index.ios.js +1 -0
- package/lib/core/index.js +1 -0
- package/lib/core/index.tuya.js +1 -0
- package/lib/core/index.web.js +1 -0
- package/lib/core/index.wechat.js +1 -0
- package/lib/core/promisify/index.android.js +1 -0
- package/lib/core/promisify/index.d.ts +5 -0
- package/lib/core/promisify/index.ios.js +1 -0
- package/lib/core/promisify/index.js +27 -0
- package/lib/core/promisify/index.tuya.js +27 -0
- package/lib/core/promisify/index.web.js +27 -0
- package/lib/core/promisify/index.wechat.js +27 -0
- package/lib/endEvent/index.android.js +1 -0
- package/lib/endEvent/index.d.ts +1 -0
- package/lib/endEvent/index.ios.js +1 -0
- package/lib/endEvent/index.js +3 -0
- package/lib/endEvent/index.md +20 -0
- package/lib/endEvent/index.native.d.ts +1 -0
- package/lib/endEvent/index.tuya.d.ts +1 -0
- package/lib/endEvent/index.tuya.js +8 -0
- package/lib/endEvent/index.web.js +3 -0
- package/lib/endEvent/index.wechat.d.ts +1 -0
- package/lib/endEvent/index.wechat.js +8 -0
- package/lib/event/index.android.js +1 -0
- package/lib/event/index.d.ts +1 -0
- package/lib/event/index.ios.js +1 -0
- package/lib/event/index.js +3 -0
- package/lib/event/index.md +20 -0
- package/lib/event/index.native.d.ts +1 -0
- package/lib/event/index.tuya.d.ts +1 -0
- package/lib/event/index.tuya.js +8 -0
- package/lib/event/index.web.js +3 -0
- package/lib/event/index.wechat.d.ts +1 -0
- package/lib/event/index.wechat.js +8 -0
- package/lib/exitMiniProgram/index.android.js +1 -0
- package/lib/exitMiniProgram/index.d.ts +1 -0
- package/lib/exitMiniProgram/index.ios.js +1 -0
- package/lib/exitMiniProgram/index.js +3 -0
- package/lib/exitMiniProgram/index.md +20 -0
- package/lib/exitMiniProgram/index.native.d.ts +1 -0
- package/lib/exitMiniProgram/index.tuya.d.ts +1 -0
- package/lib/exitMiniProgram/index.tuya.js +8 -0
- package/lib/exitMiniProgram/index.web.js +3 -0
- package/lib/exitMiniProgram/index.wechat.d.ts +1 -0
- package/lib/exitMiniProgram/index.wechat.js +8 -0
- package/lib/getApp/index.android.js +1 -0
- package/lib/getApp/index.d.ts +1 -0
- package/lib/getApp/index.ios.js +1 -0
- package/lib/getApp/index.js +4 -0
- package/lib/getApp/index.md +24 -0
- package/lib/getApp/index.native.d.ts +2 -0
- package/lib/getApp/index.tuya.d.ts +2 -0
- package/lib/getApp/index.tuya.js +3 -0
- package/lib/getApp/index.web.js +4 -0
- package/lib/getApp/index.wechat.d.ts +2 -0
- package/lib/getApp/index.wechat.js +3 -0
- package/lib/getAppInfo/index.android.js +1 -0
- package/lib/getAppInfo/index.d.ts +1 -0
- package/lib/getAppInfo/index.ios.js +1 -0
- package/lib/getAppInfo/index.js +3 -0
- package/lib/getAppInfo/index.md +20 -0
- package/lib/getAppInfo/index.native.d.ts +2 -0
- package/lib/getAppInfo/index.tuya.d.ts +2 -0
- package/lib/getAppInfo/index.tuya.js +1 -0
- package/lib/getAppInfo/index.web.js +3 -0
- package/lib/getAppInfo/index.wechat.d.ts +1 -0
- package/lib/getAppInfo/index.wechat.js +3 -0
- package/lib/getBoundingClientRect/index.android.js +1 -0
- package/lib/getBoundingClientRect/index.d.ts +12 -0
- package/lib/getBoundingClientRect/index.ios.js +1 -0
- package/lib/getBoundingClientRect/index.js +1 -0
- package/lib/getBoundingClientRect/index.md +37 -0
- package/lib/getBoundingClientRect/index.tuya.d.ts +10 -0
- package/lib/getBoundingClientRect/index.tuya.js +23 -0
- package/lib/getBoundingClientRect/index.web.js +26 -0
- package/lib/getBoundingClientRect/index.wechat.d.ts +10 -0
- package/lib/getBoundingClientRect/index.wechat.js +23 -0
- package/lib/getClipboardData/index.android.js +1 -0
- package/lib/getClipboardData/index.ios.js +1 -0
- package/lib/getClipboardData/index.js +6 -0
- package/lib/getClipboardData/index.md +20 -0
- package/lib/getClipboardData/index.native.d.ts +1 -0
- package/lib/getClipboardData/index.tuya.d.ts +1 -0
- package/lib/getClipboardData/index.tuya.js +8 -0
- package/lib/getClipboardData/index.web.js +6 -0
- package/lib/getClipboardData/index.wechat.d.ts +1 -0
- package/lib/getClipboardData/index.wechat.js +8 -0
- package/lib/getCurrentPages/index.android.js +1 -0
- package/lib/getCurrentPages/index.d.ts +1 -0
- package/lib/getCurrentPages/index.ios.js +1 -0
- package/lib/getCurrentPages/index.js +4 -0
- package/lib/getCurrentPages/index.md +24 -0
- package/lib/getCurrentPages/index.native.d.ts +1 -0
- package/lib/getCurrentPages/index.tuya.d.ts +2 -0
- package/lib/getCurrentPages/index.tuya.js +3 -0
- package/lib/getCurrentPages/index.web.js +4 -0
- package/lib/getCurrentPages/index.wechat.d.ts +2 -0
- package/lib/getCurrentPages/index.wechat.js +3 -0
- package/lib/getElementById/index.android.js +1 -0
- package/lib/getElementById/index.d.ts +1 -0
- package/lib/getElementById/index.ios.js +1 -0
- package/lib/getElementById/index.js +7 -0
- package/lib/getElementById/index.md +24 -0
- package/lib/getElementById/index.native.d.ts +1 -0
- package/lib/getElementById/index.tuya.d.ts +2 -0
- package/lib/getElementById/index.tuya.js +8 -0
- package/lib/getElementById/index.web.js +7 -0
- package/lib/getElementById/index.wechat.d.ts +2 -0
- package/lib/getElementById/index.wechat.js +8 -0
- package/lib/getEnterOptions/index.android.js +1 -0
- package/lib/getEnterOptions/index.d.ts +1 -0
- package/lib/getEnterOptions/index.ios.js +1 -0
- package/lib/getEnterOptions/index.js +3 -0
- package/lib/getEnterOptions/index.md +20 -0
- package/lib/getEnterOptions/index.native.d.ts +1 -0
- package/lib/getEnterOptions/index.tuya.d.ts +1 -0
- package/lib/getEnterOptions/index.tuya.js +8 -0
- package/lib/getEnterOptions/index.web.js +3 -0
- package/lib/getEnterOptions/index.wechat.d.ts +1 -0
- package/lib/getEnterOptions/index.wechat.js +8 -0
- package/lib/getEnterOptionsSync/index.android.js +1 -0
- package/lib/getEnterOptionsSync/index.d.ts +1 -0
- package/lib/getEnterOptionsSync/index.ios.js +1 -0
- package/lib/getEnterOptionsSync/index.js +3 -0
- package/lib/getEnterOptionsSync/index.md +20 -0
- package/lib/getEnterOptionsSync/index.native.d.ts +1 -0
- package/lib/getEnterOptionsSync/index.tuya.d.ts +1 -0
- package/lib/getEnterOptionsSync/index.tuya.js +8 -0
- package/lib/getEnterOptionsSync/index.web.js +3 -0
- package/lib/getEnterOptionsSync/index.wechat.d.ts +1 -0
- package/lib/getEnterOptionsSync/index.wechat.js +8 -0
- package/lib/getI18nInfo/index.android.js +1 -0
- package/lib/getI18nInfo/index.ios.js +1 -0
- package/lib/getI18nInfo/index.js +4 -0
- package/lib/getI18nInfo/index.md +24 -0
- package/lib/getI18nInfo/index.tuya.d.ts +4 -0
- package/lib/getI18nInfo/index.tuya.js +10 -0
- package/lib/getI18nInfo/index.web.js +4 -0
- package/lib/getI18nInfo/index.wechat.d.ts +1 -0
- package/lib/getI18nInfo/index.wechat.js +3 -0
- package/lib/getLangContent/index.android.js +1 -0
- package/lib/getLangContent/index.d.ts +1 -0
- package/lib/getLangContent/index.ios.js +1 -0
- package/lib/getLangContent/index.js +3 -0
- package/lib/getLangContent/index.md +20 -0
- package/lib/getLangContent/index.native.d.ts +1 -0
- package/lib/getLangContent/index.tuya.d.ts +1 -0
- package/lib/getLangContent/index.tuya.js +8 -0
- package/lib/getLangContent/index.web.js +3 -0
- package/lib/getLangContent/index.wechat.d.ts +1 -0
- package/lib/getLangContent/index.wechat.js +8 -0
- package/lib/getLangKey/index.android.js +1 -0
- package/lib/getLangKey/index.d.ts +1 -0
- package/lib/getLangKey/index.ios.js +1 -0
- package/lib/getLangKey/index.js +3 -0
- package/lib/getLangKey/index.md +20 -0
- package/lib/getLangKey/index.native.d.ts +1 -0
- package/lib/getLangKey/index.tuya.d.ts +1 -0
- package/lib/getLangKey/index.tuya.js +8 -0
- package/lib/getLangKey/index.web.js +3 -0
- package/lib/getLangKey/index.wechat.d.ts +1 -0
- package/lib/getLangKey/index.wechat.js +8 -0
- package/lib/getLaunchOptions/index.android.js +1 -0
- package/lib/getLaunchOptions/index.d.ts +1 -0
- package/lib/getLaunchOptions/index.ios.js +1 -0
- package/lib/getLaunchOptions/index.js +3 -0
- package/lib/getLaunchOptions/index.md +20 -0
- package/lib/getLaunchOptions/index.native.d.ts +1 -0
- package/lib/getLaunchOptions/index.tuya.d.ts +1 -0
- package/lib/getLaunchOptions/index.tuya.js +8 -0
- package/lib/getLaunchOptions/index.web.js +3 -0
- package/lib/getLaunchOptions/index.wechat.d.ts +1 -0
- package/lib/getLaunchOptions/index.wechat.js +8 -0
- package/lib/getLaunchOptionsSync/index.android.js +1 -0
- package/lib/getLaunchOptionsSync/index.d.ts +2 -0
- package/lib/getLaunchOptionsSync/index.ios.js +1 -0
- package/lib/getLaunchOptionsSync/index.js +3 -0
- package/lib/getLaunchOptionsSync/index.md +20 -0
- package/lib/getLaunchOptionsSync/index.native.d.ts +1 -0
- package/lib/getLaunchOptionsSync/index.tuya.d.ts +2 -0
- package/lib/getLaunchOptionsSync/index.tuya.js +1 -0
- package/lib/getLaunchOptionsSync/index.web.js +3 -0
- package/lib/getLaunchOptionsSync/index.wechat.d.ts +3 -0
- package/lib/getLaunchOptionsSync/index.wechat.js +1 -0
- package/lib/getNetworkType/index.android.js +1 -0
- package/lib/getNetworkType/index.ios.js +1 -0
- package/lib/getNetworkType/index.js +6 -0
- package/lib/getNetworkType/index.md +20 -0
- package/lib/getNetworkType/index.native.d.ts +1 -0
- package/lib/getNetworkType/index.tuya.d.ts +1 -0
- package/lib/getNetworkType/index.tuya.js +8 -0
- package/lib/getNetworkType/index.web.js +6 -0
- package/lib/getNetworkType/index.wechat.d.ts +1 -0
- package/lib/getNetworkType/index.wechat.js +8 -0
- package/lib/getStorage/index.android.js +1 -0
- package/lib/getStorage/index.ios.js +1 -0
- package/lib/getStorage/index.js +6 -0
- package/lib/getStorage/index.md +20 -0
- package/lib/getStorage/index.native.d.ts +1 -0
- package/lib/getStorage/index.tuya.d.ts +1 -0
- package/lib/getStorage/index.tuya.js +8 -0
- package/lib/getStorage/index.web.js +6 -0
- package/lib/getStorage/index.wechat.d.ts +1 -0
- package/lib/getStorage/index.wechat.js +8 -0
- package/lib/getStorageSync/index.android.js +1 -0
- package/lib/getStorageSync/index.ios.js +1 -0
- package/lib/getStorageSync/index.js +6 -0
- package/lib/getStorageSync/index.md +20 -0
- package/lib/getStorageSync/index.native.d.ts +1 -0
- package/lib/getStorageSync/index.tuya.d.ts +1 -0
- package/lib/getStorageSync/index.tuya.js +8 -0
- package/lib/getStorageSync/index.web.js +6 -0
- package/lib/getStorageSync/index.wechat.d.ts +1 -0
- package/lib/getStorageSync/index.wechat.js +8 -0
- package/lib/getSystemInfo/index.android.js +1 -0
- package/lib/getSystemInfo/index.ios.js +1 -0
- package/lib/getSystemInfo/index.js +6 -0
- package/lib/getSystemInfo/index.md +20 -0
- package/lib/getSystemInfo/index.native.d.ts +2 -0
- package/lib/getSystemInfo/index.tuya.d.ts +2 -0
- package/lib/getSystemInfo/index.tuya.js +1 -0
- package/lib/getSystemInfo/index.web.js +6 -0
- package/lib/getSystemInfo/index.wechat.d.ts +3 -0
- package/lib/getSystemInfo/index.wechat.js +1 -0
- package/lib/getSystemInfoSync/index.android.js +1 -0
- package/lib/getSystemInfoSync/index.ios.js +1 -0
- package/lib/getSystemInfoSync/index.js +6 -0
- package/lib/getSystemInfoSync/index.md +20 -0
- package/lib/getSystemInfoSync/index.native.d.ts +2 -0
- package/lib/getSystemInfoSync/index.tuya.d.ts +2 -0
- package/lib/getSystemInfoSync/index.tuya.js +1 -0
- package/lib/getSystemInfoSync/index.web.js +6 -0
- package/lib/getSystemInfoSync/index.wechat.d.ts +3 -0
- package/lib/getSystemInfoSync/index.wechat.js +1 -0
- package/lib/goDeviceAlarm/index.android.js +1 -0
- package/lib/goDeviceAlarm/index.d.ts +1 -0
- package/lib/goDeviceAlarm/index.ios.js +1 -0
- package/lib/goDeviceAlarm/index.js +3 -0
- package/lib/goDeviceAlarm/index.md +20 -0
- package/lib/goDeviceAlarm/index.native.d.ts +1 -0
- package/lib/goDeviceAlarm/index.tuya.d.ts +1 -0
- package/lib/goDeviceAlarm/index.tuya.js +8 -0
- package/lib/goDeviceAlarm/index.web.js +3 -0
- package/lib/goDeviceAlarm/index.wechat.d.ts +1 -0
- package/lib/goDeviceAlarm/index.wechat.js +8 -0
- package/lib/goDeviceDetail/index.android.js +1 -0
- package/lib/goDeviceDetail/index.d.ts +1 -0
- package/lib/goDeviceDetail/index.ios.js +1 -0
- package/lib/goDeviceDetail/index.js +3 -0
- package/lib/goDeviceDetail/index.md +20 -0
- package/lib/goDeviceDetail/index.native.d.ts +1 -0
- package/lib/goDeviceDetail/index.tuya.d.ts +1 -0
- package/lib/goDeviceDetail/index.tuya.js +8 -0
- package/lib/goDeviceDetail/index.web.js +3 -0
- package/lib/goDeviceDetail/index.wechat.d.ts +1 -0
- package/lib/goDeviceDetail/index.wechat.js +8 -0
- package/lib/hideHomeButton/index.android.js +1 -0
- package/lib/hideHomeButton/index.d.ts +1 -0
- package/lib/hideHomeButton/index.ios.js +1 -0
- package/lib/hideHomeButton/index.js +3 -0
- package/lib/hideHomeButton/index.md +20 -0
- package/lib/hideHomeButton/index.native.d.ts +1 -0
- package/lib/hideHomeButton/index.tuya.d.ts +1 -0
- package/lib/hideHomeButton/index.tuya.js +8 -0
- package/lib/hideHomeButton/index.web.js +3 -0
- package/lib/hideHomeButton/index.wechat.d.ts +1 -0
- package/lib/hideHomeButton/index.wechat.js +8 -0
- package/lib/hideLoading/index.android.js +1 -0
- package/lib/hideLoading/index.ios.js +1 -0
- package/lib/hideLoading/index.js +6 -0
- package/lib/hideLoading/index.md +20 -0
- package/lib/hideLoading/index.native.d.ts +2 -0
- package/lib/hideLoading/index.tuya.d.ts +2 -0
- package/lib/hideLoading/index.tuya.js +1 -0
- package/lib/hideLoading/index.web.js +6 -0
- package/lib/hideLoading/index.wechat.d.ts +3 -0
- package/lib/hideLoading/index.wechat.js +1 -0
- package/lib/hideNavigationBarLoading/index.android.js +1 -0
- package/lib/hideNavigationBarLoading/index.d.ts +1 -0
- package/lib/hideNavigationBarLoading/index.ios.js +1 -0
- package/lib/hideNavigationBarLoading/index.js +3 -0
- package/lib/hideNavigationBarLoading/index.md +20 -0
- package/lib/hideNavigationBarLoading/index.native.d.ts +2 -0
- package/lib/hideNavigationBarLoading/index.tuya.d.ts +2 -0
- package/lib/hideNavigationBarLoading/index.tuya.js +1 -0
- package/lib/hideNavigationBarLoading/index.web.js +3 -0
- package/lib/hideNavigationBarLoading/index.wechat.d.ts +3 -0
- package/lib/hideNavigationBarLoading/index.wechat.js +1 -0
- package/lib/hideNotification/index.android.js +1 -0
- package/lib/hideNotification/index.d.ts +1 -0
- package/lib/hideNotification/index.ios.js +1 -0
- package/lib/hideNotification/index.js +3 -0
- package/lib/hideNotification/index.md +24 -0
- package/lib/hideNotification/index.native.d.ts +2 -0
- package/lib/hideNotification/index.tuya.js +3 -0
- package/lib/hideNotification/index.web.js +3 -0
- package/lib/hideNotification/index.wechat.js +3 -0
- package/lib/hideTabBar/index.android.js +1 -0
- package/lib/hideTabBar/index.d.ts +2 -0
- package/lib/hideTabBar/index.ios.js +1 -0
- package/lib/hideTabBar/index.js +3 -0
- package/lib/hideTabBar/index.md +20 -0
- package/lib/hideTabBar/index.native.d.ts +2 -0
- package/lib/hideTabBar/index.tuya.d.ts +2 -0
- package/lib/hideTabBar/index.tuya.js +1 -0
- package/lib/hideTabBar/index.web.js +3 -0
- package/lib/hideTabBar/index.wechat.d.ts +3 -0
- package/lib/hideTabBar/index.wechat.js +1 -0
- package/lib/hideTabBarRedDot/index.android.js +1 -0
- package/lib/hideTabBarRedDot/index.d.ts +1 -0
- package/lib/hideTabBarRedDot/index.ios.js +1 -0
- package/lib/hideTabBarRedDot/index.js +3 -0
- package/lib/hideTabBarRedDot/index.md +20 -0
- package/lib/hideTabBarRedDot/index.native.d.ts +1 -0
- package/lib/hideTabBarRedDot/index.tuya.d.ts +1 -0
- package/lib/hideTabBarRedDot/index.tuya.js +8 -0
- package/lib/hideTabBarRedDot/index.web.js +3 -0
- package/lib/hideTabBarRedDot/index.wechat.d.ts +1 -0
- package/lib/hideTabBarRedDot/index.wechat.js +8 -0
- package/lib/hideToast/index.android.js +1 -0
- package/lib/hideToast/index.ios.js +1 -0
- package/lib/hideToast/index.js +6 -0
- package/lib/hideToast/index.md +20 -0
- package/lib/hideToast/index.native.d.ts +2 -0
- package/lib/hideToast/index.tuya.d.ts +2 -0
- package/lib/hideToast/index.tuya.js +1 -0
- package/lib/hideToast/index.web.js +6 -0
- package/lib/hideToast/index.wechat.d.ts +3 -0
- package/lib/hideToast/index.wechat.js +1 -0
- package/lib/index.android.js +1 -0
- package/lib/index.d.ts +75 -0
- package/lib/index.ios.js +1 -0
- package/lib/index.js +82 -0
- package/lib/index.tuya.js +82 -0
- package/lib/index.web.js +82 -0
- package/lib/index.wechat.js +82 -0
- package/lib/makePhoneCall/index.android.js +1 -0
- package/lib/makePhoneCall/index.ios.js +1 -0
- package/lib/makePhoneCall/index.js +6 -0
- package/lib/makePhoneCall/index.md +20 -0
- package/lib/makePhoneCall/index.native.d.ts +1 -0
- package/lib/makePhoneCall/index.tuya.d.ts +1 -0
- package/lib/makePhoneCall/index.tuya.js +8 -0
- package/lib/makePhoneCall/index.web.js +6 -0
- package/lib/makePhoneCall/index.wechat.d.ts +1 -0
- package/lib/makePhoneCall/index.wechat.js +8 -0
- package/lib/navigateBack/index.android.js +1 -0
- package/lib/navigateBack/index.d.ts +3 -0
- package/lib/navigateBack/index.ios.js +1 -0
- package/lib/navigateBack/index.js +10 -0
- package/lib/navigateBack/index.md +20 -0
- package/lib/navigateBack/index.native.d.ts +2 -0
- package/lib/navigateBack/index.tuya.d.ts +2 -0
- package/lib/navigateBack/index.tuya.js +1 -0
- package/lib/navigateBack/index.web.js +10 -0
- package/lib/navigateBack/index.wechat.d.ts +3 -0
- package/lib/navigateBack/index.wechat.js +1 -0
- package/lib/navigateBackMiniProgram/index.android.js +1 -0
- package/lib/navigateBackMiniProgram/index.d.ts +1 -0
- package/lib/navigateBackMiniProgram/index.ios.js +1 -0
- package/lib/navigateBackMiniProgram/index.js +3 -0
- package/lib/navigateBackMiniProgram/index.md +20 -0
- package/lib/navigateBackMiniProgram/index.native.d.ts +1 -0
- package/lib/navigateBackMiniProgram/index.tuya.d.ts +1 -0
- package/lib/navigateBackMiniProgram/index.tuya.js +8 -0
- package/lib/navigateBackMiniProgram/index.web.js +3 -0
- package/lib/navigateBackMiniProgram/index.wechat.d.ts +1 -0
- package/lib/navigateBackMiniProgram/index.wechat.js +8 -0
- package/lib/navigateTo/index.android.js +1 -0
- package/lib/navigateTo/index.d.ts +3 -0
- package/lib/navigateTo/index.ios.js +1 -0
- package/lib/navigateTo/index.js +7 -0
- package/lib/navigateTo/index.md +20 -0
- package/lib/navigateTo/index.native.d.ts +2 -0
- package/lib/navigateTo/index.tuya.d.ts +2 -0
- package/lib/navigateTo/index.tuya.js +1 -0
- package/lib/navigateTo/index.web.js +7 -0
- package/lib/navigateTo/index.wechat.d.ts +3 -0
- package/lib/navigateTo/index.wechat.js +1 -0
- package/lib/navigateToMiniProgram/index.android.js +1 -0
- package/lib/navigateToMiniProgram/index.d.ts +1 -0
- package/lib/navigateToMiniProgram/index.ios.js +1 -0
- package/lib/navigateToMiniProgram/index.js +3 -0
- package/lib/navigateToMiniProgram/index.md +20 -0
- package/lib/navigateToMiniProgram/index.native.d.ts +1 -0
- package/lib/navigateToMiniProgram/index.tuya.d.ts +1 -0
- package/lib/navigateToMiniProgram/index.tuya.js +8 -0
- package/lib/navigateToMiniProgram/index.web.js +3 -0
- package/lib/navigateToMiniProgram/index.wechat.d.ts +1 -0
- package/lib/navigateToMiniProgram/index.wechat.js +8 -0
- package/lib/offBluetoothAdapterStateChange/index.android.js +1 -0
- package/lib/offBluetoothAdapterStateChange/index.ios.js +1 -0
- package/lib/offBluetoothAdapterStateChange/index.js +6 -0
- package/lib/offBluetoothAdapterStateChange/index.md +20 -0
- package/lib/offBluetoothAdapterStateChange/index.native.d.ts +1 -0
- package/lib/offBluetoothAdapterStateChange/index.tuya.d.ts +1 -0
- package/lib/offBluetoothAdapterStateChange/index.tuya.js +8 -0
- package/lib/offBluetoothAdapterStateChange/index.web.js +6 -0
- package/lib/offBluetoothAdapterStateChange/index.wechat.d.ts +1 -0
- package/lib/offBluetoothAdapterStateChange/index.wechat.js +8 -0
- package/lib/offNetworkStatusChange/index.android.js +1 -0
- package/lib/offNetworkStatusChange/index.ios.js +1 -0
- package/lib/offNetworkStatusChange/index.js +6 -0
- package/lib/offNetworkStatusChange/index.md +20 -0
- package/lib/offNetworkStatusChange/index.native.d.ts +1 -0
- package/lib/offNetworkStatusChange/index.tuya.d.ts +1 -0
- package/lib/offNetworkStatusChange/index.tuya.js +8 -0
- package/lib/offNetworkStatusChange/index.web.js +6 -0
- package/lib/offNetworkStatusChange/index.wechat.d.ts +1 -0
- package/lib/offNetworkStatusChange/index.wechat.js +8 -0
- package/lib/offProgressUpdate/index.android.js +1 -0
- package/lib/offProgressUpdate/index.ios.js +1 -0
- package/lib/offProgressUpdate/index.js +6 -0
- package/lib/offProgressUpdate/index.md +20 -0
- package/lib/offProgressUpdate/index.native.d.ts +1 -0
- package/lib/offProgressUpdate/index.tuya.d.ts +1 -0
- package/lib/offProgressUpdate/index.tuya.js +8 -0
- package/lib/offProgressUpdate/index.web.js +6 -0
- package/lib/offProgressUpdate/index.wechat.d.ts +1 -0
- package/lib/offProgressUpdate/index.wechat.js +8 -0
- package/lib/onBluetoothAdapterStateChange/index.android.js +1 -0
- package/lib/onBluetoothAdapterStateChange/index.ios.js +1 -0
- package/lib/onBluetoothAdapterStateChange/index.js +6 -0
- package/lib/onBluetoothAdapterStateChange/index.md +20 -0
- package/lib/onBluetoothAdapterStateChange/index.native.d.ts +1 -0
- package/lib/onBluetoothAdapterStateChange/index.tuya.d.ts +1 -0
- package/lib/onBluetoothAdapterStateChange/index.tuya.js +8 -0
- package/lib/onBluetoothAdapterStateChange/index.web.js +6 -0
- package/lib/onBluetoothAdapterStateChange/index.wechat.d.ts +1 -0
- package/lib/onBluetoothAdapterStateChange/index.wechat.js +8 -0
- package/lib/onNetworkStatusChange/index.android.js +1 -0
- package/lib/onNetworkStatusChange/index.ios.js +1 -0
- package/lib/onNetworkStatusChange/index.js +6 -0
- package/lib/onNetworkStatusChange/index.md +20 -0
- package/lib/onNetworkStatusChange/index.native.d.ts +1 -0
- package/lib/onNetworkStatusChange/index.tuya.d.ts +1 -0
- package/lib/onNetworkStatusChange/index.tuya.js +8 -0
- package/lib/onNetworkStatusChange/index.web.js +6 -0
- package/lib/onNetworkStatusChange/index.wechat.d.ts +1 -0
- package/lib/onNetworkStatusChange/index.wechat.js +8 -0
- package/lib/onProgressUpdate/index.android.js +1 -0
- package/lib/onProgressUpdate/index.ios.js +1 -0
- package/lib/onProgressUpdate/index.js +6 -0
- package/lib/onProgressUpdate/index.md +20 -0
- package/lib/onProgressUpdate/index.native.d.ts +1 -0
- package/lib/onProgressUpdate/index.tuya.d.ts +1 -0
- package/lib/onProgressUpdate/index.tuya.js +8 -0
- package/lib/onProgressUpdate/index.web.js +6 -0
- package/lib/onProgressUpdate/index.wechat.d.ts +1 -0
- package/lib/onProgressUpdate/index.wechat.js +8 -0
- package/lib/onRouterEvent/index.android.js +1 -0
- package/lib/onRouterEvent/index.d.ts +1 -0
- package/lib/onRouterEvent/index.ios.js +1 -0
- package/lib/onRouterEvent/index.js +3 -0
- package/lib/onRouterEvent/index.md +20 -0
- package/lib/onRouterEvent/index.native.d.ts +1 -0
- package/lib/onRouterEvent/index.tuya.d.ts +1 -0
- package/lib/onRouterEvent/index.tuya.js +8 -0
- package/lib/onRouterEvent/index.web.js +3 -0
- package/lib/onRouterEvent/index.wechat.d.ts +1 -0
- package/lib/onRouterEvent/index.wechat.js +8 -0
- package/lib/previewImage/index.android.js +1 -0
- package/lib/previewImage/index.ios.js +1 -0
- package/lib/previewImage/index.js +6 -0
- package/lib/previewImage/index.md +20 -0
- package/lib/previewImage/index.native.d.ts +1 -0
- package/lib/previewImage/index.tuya.d.ts +1 -0
- package/lib/previewImage/index.tuya.js +8 -0
- package/lib/previewImage/index.web.js +6 -0
- package/lib/previewImage/index.wechat.d.ts +1 -0
- package/lib/previewImage/index.wechat.js +8 -0
- package/lib/reLaunch/index.android.js +1 -0
- package/lib/reLaunch/index.d.ts +3 -0
- package/lib/reLaunch/index.ios.js +1 -0
- package/lib/reLaunch/index.js +7 -0
- package/lib/reLaunch/index.md +20 -0
- package/lib/reLaunch/index.native.d.ts +2 -0
- package/lib/reLaunch/index.tuya.d.ts +2 -0
- package/lib/reLaunch/index.tuya.js +1 -0
- package/lib/reLaunch/index.web.js +7 -0
- package/lib/reLaunch/index.wechat.d.ts +3 -0
- package/lib/reLaunch/index.wechat.js +1 -0
- package/lib/readFile/index.android.js +1 -0
- package/lib/readFile/index.ios.js +1 -0
- package/lib/readFile/index.js +6 -0
- package/lib/readFile/index.md +20 -0
- package/lib/readFile/index.native.d.ts +1 -0
- package/lib/readFile/index.tuya.d.ts +1 -0
- package/lib/readFile/index.tuya.js +8 -0
- package/lib/readFile/index.web.js +6 -0
- package/lib/readFile/index.wechat.d.ts +1 -0
- package/lib/readFile/index.wechat.js +8 -0
- package/lib/readFileSync/index.android.js +1 -0
- package/lib/readFileSync/index.ios.js +1 -0
- package/lib/readFileSync/index.js +6 -0
- package/lib/readFileSync/index.md +20 -0
- package/lib/readFileSync/index.native.d.ts +1 -0
- package/lib/readFileSync/index.tuya.d.ts +1 -0
- package/lib/readFileSync/index.tuya.js +8 -0
- package/lib/readFileSync/index.web.js +6 -0
- package/lib/readFileSync/index.wechat.d.ts +1 -0
- package/lib/readFileSync/index.wechat.js +8 -0
- package/lib/redirectTo/index.android.js +1 -0
- package/lib/redirectTo/index.d.ts +3 -0
- package/lib/redirectTo/index.ios.js +1 -0
- package/lib/redirectTo/index.js +9 -0
- package/lib/redirectTo/index.md +20 -0
- package/lib/redirectTo/index.native.d.ts +2 -0
- package/lib/redirectTo/index.tuya.d.ts +2 -0
- package/lib/redirectTo/index.tuya.js +1 -0
- package/lib/redirectTo/index.web.js +9 -0
- package/lib/redirectTo/index.wechat.d.ts +3 -0
- package/lib/redirectTo/index.wechat.js +1 -0
- package/lib/removeStorage/index.android.js +1 -0
- package/lib/removeStorage/index.ios.js +1 -0
- package/lib/removeStorage/index.js +6 -0
- package/lib/removeStorage/index.md +20 -0
- package/lib/removeStorage/index.native.d.ts +1 -0
- package/lib/removeStorage/index.tuya.d.ts +1 -0
- package/lib/removeStorage/index.tuya.js +8 -0
- package/lib/removeStorage/index.web.js +6 -0
- package/lib/removeStorage/index.wechat.d.ts +1 -0
- package/lib/removeStorage/index.wechat.js +8 -0
- package/lib/removeStorageSync/index.android.js +1 -0
- package/lib/removeStorageSync/index.ios.js +1 -0
- package/lib/removeStorageSync/index.js +6 -0
- package/lib/removeStorageSync/index.md +20 -0
- package/lib/removeStorageSync/index.native.d.ts +1 -0
- package/lib/removeStorageSync/index.tuya.d.ts +1 -0
- package/lib/removeStorageSync/index.tuya.js +8 -0
- package/lib/removeStorageSync/index.web.js +6 -0
- package/lib/removeStorageSync/index.wechat.d.ts +1 -0
- package/lib/removeStorageSync/index.wechat.js +8 -0
- package/lib/removeTabBarBadge/index.android.js +1 -0
- package/lib/removeTabBarBadge/index.d.ts +1 -0
- package/lib/removeTabBarBadge/index.ios.js +1 -0
- package/lib/removeTabBarBadge/index.js +3 -0
- package/lib/removeTabBarBadge/index.md +20 -0
- package/lib/removeTabBarBadge/index.native.d.ts +1 -0
- package/lib/removeTabBarBadge/index.tuya.d.ts +1 -0
- package/lib/removeTabBarBadge/index.tuya.js +8 -0
- package/lib/removeTabBarBadge/index.web.js +3 -0
- package/lib/removeTabBarBadge/index.wechat.d.ts +1 -0
- package/lib/removeTabBarBadge/index.wechat.js +8 -0
- package/lib/request/index.android.js +1 -0
- package/lib/request/index.ios.js +1 -0
- package/lib/request/index.js +6 -0
- package/lib/request/index.md +20 -0
- package/lib/request/index.native.d.ts +1 -0
- package/lib/request/index.tuya.d.ts +1 -0
- package/lib/request/index.tuya.js +8 -0
- package/lib/request/index.web.js +6 -0
- package/lib/request/index.wechat.d.ts +1 -0
- package/lib/request/index.wechat.js +8 -0
- package/lib/resizeImage/index.android.js +1 -0
- package/lib/resizeImage/index.d.ts +1 -0
- package/lib/resizeImage/index.ios.js +1 -0
- package/lib/resizeImage/index.js +3 -0
- package/lib/resizeImage/index.md +20 -0
- package/lib/resizeImage/index.native.d.ts +1 -0
- package/lib/resizeImage/index.tuya.d.ts +1 -0
- package/lib/resizeImage/index.tuya.js +8 -0
- package/lib/resizeImage/index.web.js +3 -0
- package/lib/resizeImage/index.wechat.d.ts +1 -0
- package/lib/resizeImage/index.wechat.js +8 -0
- package/lib/router/index.android.js +1 -0
- package/lib/router/index.d.ts +1 -0
- package/lib/router/index.ios.js +1 -0
- package/lib/router/index.js +3 -0
- package/lib/router/index.md +20 -0
- package/lib/router/index.native.d.ts +1 -0
- package/lib/router/index.tuya.d.ts +1 -0
- package/lib/router/index.tuya.js +8 -0
- package/lib/router/index.web.js +3 -0
- package/lib/router/index.wechat.d.ts +1 -0
- package/lib/router/index.wechat.js +8 -0
- package/lib/setClipboardData/index.android.js +1 -0
- package/lib/setClipboardData/index.ios.js +1 -0
- package/lib/setClipboardData/index.js +6 -0
- package/lib/setClipboardData/index.md +20 -0
- package/lib/setClipboardData/index.native.d.ts +1 -0
- package/lib/setClipboardData/index.tuya.d.ts +1 -0
- package/lib/setClipboardData/index.tuya.js +8 -0
- package/lib/setClipboardData/index.web.js +6 -0
- package/lib/setClipboardData/index.wechat.d.ts +1 -0
- package/lib/setClipboardData/index.wechat.js +8 -0
- package/lib/setNavigationBarColor/index.android.js +1 -0
- package/lib/setNavigationBarColor/index.d.ts +6 -0
- package/lib/setNavigationBarColor/index.ios.js +1 -0
- package/lib/setNavigationBarColor/index.js +7 -0
- package/lib/setNavigationBarColor/index.md +20 -0
- package/lib/setNavigationBarColor/index.native.d.ts +2 -0
- package/lib/setNavigationBarColor/index.tuya.d.ts +1 -0
- package/lib/setNavigationBarColor/index.tuya.js +8 -0
- package/lib/setNavigationBarColor/index.web.js +7 -0
- package/lib/setNavigationBarColor/index.wechat.d.ts +3 -0
- package/lib/setNavigationBarColor/index.wechat.js +1 -0
- package/lib/setNavigationBarTitle/index.android.js +1 -0
- package/lib/setNavigationBarTitle/index.d.ts +5 -0
- package/lib/setNavigationBarTitle/index.ios.js +1 -0
- package/lib/setNavigationBarTitle/index.js +7 -0
- package/lib/setNavigationBarTitle/index.md +20 -0
- package/lib/setNavigationBarTitle/index.native.d.ts +2 -0
- package/lib/setNavigationBarTitle/index.tuya.d.ts +1 -0
- package/lib/setNavigationBarTitle/index.tuya.js +8 -0
- package/lib/setNavigationBarTitle/index.web.js +7 -0
- package/lib/setNavigationBarTitle/index.wechat.d.ts +3 -0
- package/lib/setNavigationBarTitle/index.wechat.js +1 -0
- package/lib/setStorage/index.android.js +1 -0
- package/lib/setStorage/index.ios.js +1 -0
- package/lib/setStorage/index.js +6 -0
- package/lib/setStorage/index.md +20 -0
- package/lib/setStorage/index.native.d.ts +1 -0
- package/lib/setStorage/index.tuya.d.ts +1 -0
- package/lib/setStorage/index.tuya.js +8 -0
- package/lib/setStorage/index.web.js +6 -0
- package/lib/setStorage/index.wechat.d.ts +1 -0
- package/lib/setStorage/index.wechat.js +8 -0
- package/lib/setStorageSync/index.android.js +1 -0
- package/lib/setStorageSync/index.ios.js +1 -0
- package/lib/setStorageSync/index.js +6 -0
- package/lib/setStorageSync/index.md +20 -0
- package/lib/setStorageSync/index.native.d.ts +1 -0
- package/lib/setStorageSync/index.tuya.d.ts +1 -0
- package/lib/setStorageSync/index.tuya.js +8 -0
- package/lib/setStorageSync/index.web.js +6 -0
- package/lib/setStorageSync/index.wechat.d.ts +1 -0
- package/lib/setStorageSync/index.wechat.js +8 -0
- package/lib/setTabBarBadge/index.android.js +1 -0
- package/lib/setTabBarBadge/index.d.ts +1 -0
- package/lib/setTabBarBadge/index.ios.js +1 -0
- package/lib/setTabBarBadge/index.js +3 -0
- package/lib/setTabBarBadge/index.md +20 -0
- package/lib/setTabBarBadge/index.native.d.ts +1 -0
- package/lib/setTabBarBadge/index.tuya.d.ts +1 -0
- package/lib/setTabBarBadge/index.tuya.js +8 -0
- package/lib/setTabBarBadge/index.web.js +3 -0
- package/lib/setTabBarBadge/index.wechat.d.ts +1 -0
- package/lib/setTabBarBadge/index.wechat.js +8 -0
- package/lib/setTabBarItem/index.android.js +1 -0
- package/lib/setTabBarItem/index.d.ts +1 -0
- package/lib/setTabBarItem/index.ios.js +1 -0
- package/lib/setTabBarItem/index.js +3 -0
- package/lib/setTabBarItem/index.md +20 -0
- package/lib/setTabBarItem/index.native.d.ts +1 -0
- package/lib/setTabBarItem/index.tuya.d.ts +1 -0
- package/lib/setTabBarItem/index.tuya.js +8 -0
- package/lib/setTabBarItem/index.web.js +3 -0
- package/lib/setTabBarItem/index.wechat.d.ts +1 -0
- package/lib/setTabBarItem/index.wechat.js +8 -0
- package/lib/setTabBarStyle/index.android.js +1 -0
- package/lib/setTabBarStyle/index.d.ts +1 -0
- package/lib/setTabBarStyle/index.ios.js +1 -0
- package/lib/setTabBarStyle/index.js +3 -0
- package/lib/setTabBarStyle/index.md +20 -0
- package/lib/setTabBarStyle/index.native.d.ts +1 -0
- package/lib/setTabBarStyle/index.tuya.d.ts +1 -0
- package/lib/setTabBarStyle/index.tuya.js +8 -0
- package/lib/setTabBarStyle/index.web.js +3 -0
- package/lib/setTabBarStyle/index.wechat.d.ts +1 -0
- package/lib/setTabBarStyle/index.wechat.js +8 -0
- package/lib/showActionSheet/index.android.js +1 -0
- package/lib/showActionSheet/index.ios.js +1 -0
- package/lib/showActionSheet/index.js +6 -0
- package/lib/showActionSheet/index.md +20 -0
- package/lib/showActionSheet/index.native.d.ts +2 -0
- package/lib/showActionSheet/index.tuya.d.ts +2 -0
- package/lib/showActionSheet/index.tuya.js +1 -0
- package/lib/showActionSheet/index.web.js +6 -0
- package/lib/showActionSheet/index.wechat.d.ts +3 -0
- package/lib/showActionSheet/index.wechat.js +1 -0
- package/lib/showLoading/index.android.js +1 -0
- package/lib/showLoading/index.ios.js +1 -0
- package/lib/showLoading/index.js +6 -0
- package/lib/showLoading/index.md +20 -0
- package/lib/showLoading/index.native.d.ts +2 -0
- package/lib/showLoading/index.tuya.d.ts +2 -0
- package/lib/showLoading/index.tuya.js +1 -0
- package/lib/showLoading/index.web.js +6 -0
- package/lib/showLoading/index.wechat.d.ts +3 -0
- package/lib/showLoading/index.wechat.js +1 -0
- package/lib/showModal/index.android.js +1 -0
- package/lib/showModal/index.ios.js +1 -0
- package/lib/showModal/index.js +6 -0
- package/lib/showModal/index.md +20 -0
- package/lib/showModal/index.native.d.ts +2 -0
- package/lib/showModal/index.tuya.d.ts +2 -0
- package/lib/showModal/index.tuya.js +1 -0
- package/lib/showModal/index.web.js +6 -0
- package/lib/showModal/index.wechat.d.ts +3 -0
- package/lib/showModal/index.wechat.js +1 -0
- package/lib/showNavigationBarLoading/index.android.js +1 -0
- package/lib/showNavigationBarLoading/index.d.ts +1 -0
- package/lib/showNavigationBarLoading/index.ios.js +1 -0
- package/lib/showNavigationBarLoading/index.js +3 -0
- package/lib/showNavigationBarLoading/index.md +20 -0
- package/lib/showNavigationBarLoading/index.native.d.ts +2 -0
- package/lib/showNavigationBarLoading/index.tuya.d.ts +2 -0
- package/lib/showNavigationBarLoading/index.tuya.js +1 -0
- package/lib/showNavigationBarLoading/index.web.js +3 -0
- package/lib/showNavigationBarLoading/index.wechat.d.ts +3 -0
- package/lib/showNavigationBarLoading/index.wechat.js +1 -0
- package/lib/showNotification/index.android.js +1 -0
- package/lib/showNotification/index.d.ts +1 -0
- package/lib/showNotification/index.ios.js +1 -0
- package/lib/showNotification/index.js +3 -0
- package/lib/showNotification/index.md +40 -0
- package/lib/showNotification/index.native.d.ts +3 -0
- package/lib/showNotification/index.tuya.js +3 -0
- package/lib/showNotification/index.web.js +3 -0
- package/lib/showNotification/index.wechat.js +3 -0
- package/lib/showTabBar/index.android.js +1 -0
- package/lib/showTabBar/index.d.ts +2 -0
- package/lib/showTabBar/index.ios.js +1 -0
- package/lib/showTabBar/index.js +3 -0
- package/lib/showTabBar/index.md +20 -0
- package/lib/showTabBar/index.native.d.ts +2 -0
- package/lib/showTabBar/index.tuya.d.ts +2 -0
- package/lib/showTabBar/index.tuya.js +1 -0
- package/lib/showTabBar/index.web.js +3 -0
- package/lib/showTabBar/index.wechat.d.ts +3 -0
- package/lib/showTabBar/index.wechat.js +1 -0
- package/lib/showTabBarRedDot/index.android.js +1 -0
- package/lib/showTabBarRedDot/index.d.ts +1 -0
- package/lib/showTabBarRedDot/index.ios.js +1 -0
- package/lib/showTabBarRedDot/index.js +3 -0
- package/lib/showTabBarRedDot/index.md +20 -0
- package/lib/showTabBarRedDot/index.native.d.ts +1 -0
- package/lib/showTabBarRedDot/index.tuya.d.ts +1 -0
- package/lib/showTabBarRedDot/index.tuya.js +8 -0
- package/lib/showTabBarRedDot/index.web.js +3 -0
- package/lib/showTabBarRedDot/index.wechat.d.ts +1 -0
- package/lib/showTabBarRedDot/index.wechat.js +8 -0
- package/lib/showToast/index.android.js +1 -0
- package/lib/showToast/index.ios.js +1 -0
- package/lib/showToast/index.js +6 -0
- package/lib/showToast/index.md +20 -0
- package/lib/showToast/index.native.d.ts +2 -0
- package/lib/showToast/index.tuya.d.ts +1 -0
- package/lib/showToast/index.tuya.js +28 -0
- package/lib/showToast/index.web.js +6 -0
- package/lib/showToast/index.wechat.d.ts +1 -0
- package/lib/showToast/index.wechat.js +28 -0
- package/lib/startPullDownRefresh/index.android.js +1 -0
- package/lib/startPullDownRefresh/index.d.ts +1 -0
- package/lib/startPullDownRefresh/index.ios.js +1 -0
- package/lib/startPullDownRefresh/index.js +3 -0
- package/lib/startPullDownRefresh/index.md +20 -0
- package/lib/startPullDownRefresh/index.native.d.ts +1 -0
- package/lib/startPullDownRefresh/index.tuya.d.ts +1 -0
- package/lib/startPullDownRefresh/index.tuya.js +8 -0
- package/lib/startPullDownRefresh/index.web.js +3 -0
- package/lib/startPullDownRefresh/index.wechat.d.ts +1 -0
- package/lib/startPullDownRefresh/index.wechat.js +8 -0
- package/lib/stopPullDownRefresh/index.android.js +1 -0
- package/lib/stopPullDownRefresh/index.d.ts +1 -0
- package/lib/stopPullDownRefresh/index.ios.js +1 -0
- package/lib/stopPullDownRefresh/index.js +3 -0
- package/lib/stopPullDownRefresh/index.md +20 -0
- package/lib/stopPullDownRefresh/index.native.d.ts +1 -0
- package/lib/stopPullDownRefresh/index.tuya.d.ts +1 -0
- package/lib/stopPullDownRefresh/index.tuya.js +8 -0
- package/lib/stopPullDownRefresh/index.web.js +3 -0
- package/lib/stopPullDownRefresh/index.wechat.d.ts +1 -0
- package/lib/stopPullDownRefresh/index.wechat.js +8 -0
- package/lib/switchTab/index.android.js +1 -0
- package/lib/switchTab/index.d.ts +3 -0
- package/lib/switchTab/index.ios.js +1 -0
- package/lib/switchTab/index.js +7 -0
- package/lib/switchTab/index.md +20 -0
- package/lib/switchTab/index.native.d.ts +2 -0
- package/lib/switchTab/index.tuya.d.ts +2 -0
- package/lib/switchTab/index.tuya.js +1 -0
- package/lib/switchTab/index.web.js +7 -0
- package/lib/switchTab/index.wechat.d.ts +3 -0
- package/lib/switchTab/index.wechat.js +1 -0
- package/lib/trackEvent/index.android.js +1 -0
- package/lib/trackEvent/index.d.ts +1 -0
- package/lib/trackEvent/index.ios.js +1 -0
- package/lib/trackEvent/index.js +3 -0
- package/lib/trackEvent/index.md +20 -0
- package/lib/trackEvent/index.native.d.ts +1 -0
- package/lib/trackEvent/index.tuya.d.ts +1 -0
- package/lib/trackEvent/index.tuya.js +8 -0
- package/lib/trackEvent/index.web.js +3 -0
- package/lib/trackEvent/index.wechat.d.ts +1 -0
- package/lib/trackEvent/index.wechat.js +8 -0
- package/lib/uploadFile/index.android.js +1 -0
- package/lib/uploadFile/index.ios.js +1 -0
- package/lib/uploadFile/index.js +6 -0
- package/lib/uploadFile/index.md +20 -0
- package/lib/uploadFile/index.native.d.ts +1 -0
- package/lib/uploadFile/index.tuya.d.ts +1 -0
- package/lib/uploadFile/index.tuya.js +8 -0
- package/lib/uploadFile/index.web.js +6 -0
- package/lib/uploadFile/index.wechat.d.ts +1 -0
- package/lib/uploadFile/index.wechat.js +8 -0
- package/package.json +58 -0
package/@types/api.d.ts
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# @ray-js/builder-component
|
|
2
|
+
|
|
3
|
+
组件构建器,将文件按运行时拆分为多文件。
|
|
4
|
+
|
|
5
|
+
## Examples
|
|
6
|
+
|
|
7
|
+
### 全平台转换
|
|
8
|
+
|
|
9
|
+
input:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
src/index.ts
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
output:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
index.web.js
|
|
19
|
+
index.wechat.js
|
|
20
|
+
index.native.js
|
|
21
|
+
index.js
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### 按需平台
|
|
25
|
+
|
|
26
|
+
input:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
src/index.ts
|
|
30
|
+
src/index.wechat.ts
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
output:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
index.web.js
|
|
37
|
+
index.wechat.js # 原文件转换
|
|
38
|
+
index.native.js
|
|
39
|
+
index.js
|
|
40
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.default=_default;function _default(){if(!ty.authorize){console.warn('// TODO 暂未实现方法 ty.authorize');return;}return ty.authorize.apply(this,arguments);}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.default=_default;function _default(){if(!ty.authorize){console.warn('// TODO 暂未实现方法 ty.authorize');return;}return ty.authorize.apply(this,arguments);}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: authorize
|
|
3
|
+
nav:
|
|
4
|
+
title: API
|
|
5
|
+
path: /api
|
|
6
|
+
group:
|
|
7
|
+
title: 基础
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# authorize
|
|
11
|
+
|
|
12
|
+
权限请求方法
|
|
13
|
+
|
|
14
|
+
## 引入
|
|
15
|
+
|
|
16
|
+
```js
|
|
17
|
+
import { authorize } from '@ray-js/api';
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
> <XLink to="/api/kits/base-kit/authorize">`详细参考文档`</XLink>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.default=_default;function _default(){if(!ty.authorizeStatus){console.warn('// TODO 暂未实现方法 ty.authorizeStatus');return;}return ty.authorizeStatus.apply(this,arguments);}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.default=_default;function _default(){if(!ty.authorizeStatus){console.warn('// TODO 暂未实现方法 ty.authorizeStatus');return;}return ty.authorizeStatus.apply(this,arguments);}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: authorizeStatus
|
|
3
|
+
nav:
|
|
4
|
+
title: API
|
|
5
|
+
path: /api
|
|
6
|
+
group:
|
|
7
|
+
title: 基础
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# authorizeStatus
|
|
11
|
+
|
|
12
|
+
查询权限状态
|
|
13
|
+
|
|
14
|
+
## 引入
|
|
15
|
+
|
|
16
|
+
```js
|
|
17
|
+
import { authorizeStatus } from '@ray-js/api';
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
> <XLink to="/api/kits/base-kit/authorize-status">`详细参考文档`</XLink>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.default=_default;function _default(){if(!ty.beginEvent){console.warn('// TODO 暂未实现方法 ty.beginEvent');return;}return ty.beginEvent.apply(this,arguments);}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.default=_default;function _default(){if(!ty.beginEvent){console.warn('// TODO 暂未实现方法 ty.beginEvent');return;}return ty.beginEvent.apply(this,arguments);}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: beginEvent
|
|
3
|
+
nav:
|
|
4
|
+
title: API
|
|
5
|
+
path: /api
|
|
6
|
+
group:
|
|
7
|
+
title: 基础
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# beginEvent
|
|
11
|
+
|
|
12
|
+
链路点 开始事件埋点
|
|
13
|
+
|
|
14
|
+
## 引入
|
|
15
|
+
|
|
16
|
+
```js
|
|
17
|
+
import { beginEvent } from '@ray-js/api';
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
> <XLink to="/api/kits/ty-kit/begin-event">`详细参考文档`</XLink>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.default=_default;function _default(){if(!ty.chooseImage){console.warn('// TODO 暂未实现方法 ty.chooseImage');return;}return ty.chooseImage.apply(this,arguments);}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.default=_default;function _default(){if(!ty.chooseImage){console.warn('// TODO 暂未实现方法 ty.chooseImage');return;}return ty.chooseImage.apply(this,arguments);}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: chooseImage
|
|
3
|
+
nav:
|
|
4
|
+
title: API
|
|
5
|
+
path: /api
|
|
6
|
+
group:
|
|
7
|
+
title: 基础
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# chooseImage
|
|
11
|
+
|
|
12
|
+
从本地相册选择图片或使用相机拍照。
|
|
13
|
+
|
|
14
|
+
## 引入
|
|
15
|
+
|
|
16
|
+
```js
|
|
17
|
+
import { chooseImage } from '@ray-js/api';
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
> <XLink to="/api/kits/base-kit/choose-image">`详细参考文档`</XLink>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.default=_default;function _default(){if(!ty.clearStorage){console.warn('// TODO 暂未实现方法 ty.clearStorage');return;}return ty.clearStorage.apply(this,arguments);}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.default=_default;function _default(){if(!ty.clearStorage){console.warn('// TODO 暂未实现方法 ty.clearStorage');return;}return ty.clearStorage.apply(this,arguments);}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: clearStorage
|
|
3
|
+
nav:
|
|
4
|
+
title: API
|
|
5
|
+
path: /api
|
|
6
|
+
group:
|
|
7
|
+
title: 基础
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# clearStorage
|
|
11
|
+
|
|
12
|
+
清理本地数据缓存
|
|
13
|
+
|
|
14
|
+
## 引入
|
|
15
|
+
|
|
16
|
+
```js
|
|
17
|
+
import { clearStorage } from '@ray-js/api';
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
> <XLink to="/api/kits/base-kit/clear-storage">`详细参考文档`</XLink>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.default=_default;function _default(){if(!ty.clearStorageSync){console.warn('// TODO 暂未实现方法 ty.clearStorageSync');return;}return ty.clearStorageSync.apply(this,arguments);}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.default=_default;function _default(){if(!ty.clearStorageSync){console.warn('// TODO 暂未实现方法 ty.clearStorageSync');return;}return ty.clearStorageSync.apply(this,arguments);}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: clearStorageSync
|
|
3
|
+
nav:
|
|
4
|
+
title: API
|
|
5
|
+
path: /api
|
|
6
|
+
group:
|
|
7
|
+
title: 基础
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# clearStorageSync
|
|
11
|
+
|
|
12
|
+
清理本地数据缓存
|
|
13
|
+
|
|
14
|
+
## 引入
|
|
15
|
+
|
|
16
|
+
```js
|
|
17
|
+
import { clearStorageSync } from '@ray-js/api';
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
> <XLink to="/api/kits/base-kit/clear-storage-sync">`详细参考文档`</XLink>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});var _promisify=require("./promisify");Object.keys(_promisify).forEach(function(key){if(key==="default"||key==="__esModule")return;if(key in exports&&exports[key]===_promisify[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _promisify[key];}});});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './promisify';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});var _promisify=require("./promisify");Object.keys(_promisify).forEach(function(key){if(key==="default"||key==="__esModule")return;if(key in exports&&exports[key]===_promisify[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _promisify[key];}});});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './promisify';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './promisify';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './promisify';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './promisify';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.promisify=promisify;var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;})),keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){(0,_defineProperty2.default)(target,key,source[key]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}return target;}function promisify(api){return function(){var arg=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return new Promise(function(resolve,reject){var promisifyArg=arg;api(_objectSpread(_objectSpread({},promisifyArg),{},{success:function success(res){if(promisifyArg&&typeof promisifyArg.success==='function'){promisifyArg.success(res);}resolve(res);},fail:function fail(res){if(promisifyArg&&typeof promisifyArg.fail==='function'){promisifyArg.fail(res);}reject(res);}}));});};}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export interface PromisifyArgs<SuccessArg, FailArg> {
|
|
2
|
+
success?: (args: SuccessArg) => void;
|
|
3
|
+
fail?: (args: FailArg) => void;
|
|
4
|
+
}
|
|
5
|
+
export declare function promisify<Arg = any, SuccessArg = any, FailArg = any>(api: (arg: Arg & PromisifyArgs<SuccessArg, FailArg>) => void): (arg?: Arg & PromisifyArgs<SuccessArg, FailArg>) => Promise<SuccessArg>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.promisify=promisify;var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;})),keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){(0,_defineProperty2.default)(target,key,source[key]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}return target;}function promisify(api){return function(){var arg=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return new Promise(function(resolve,reject){var promisifyArg=arg;api(_objectSpread(_objectSpread({},promisifyArg),{},{success:function success(res){if(promisifyArg&&typeof promisifyArg.success==='function'){promisifyArg.success(res);}resolve(res);},fail:function fail(res){if(promisifyArg&&typeof promisifyArg.fail==='function'){promisifyArg.fail(res);}reject(res);}}));});};}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import "core-js/modules/es.object.to-string.js";
|
|
3
|
+
import "core-js/modules/es.promise.js";
|
|
4
|
+
export function promisify(api) {
|
|
5
|
+
return function () {
|
|
6
|
+
var arg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
7
|
+
return new Promise(function (resolve, reject) {
|
|
8
|
+
var promisifyArg = arg;
|
|
9
|
+
api(_objectSpread(_objectSpread({}, promisifyArg), {}, {
|
|
10
|
+
success: function success(res) {
|
|
11
|
+
if (promisifyArg && typeof promisifyArg.success === 'function') {
|
|
12
|
+
promisifyArg.success(res);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
resolve(res);
|
|
16
|
+
},
|
|
17
|
+
fail: function fail(res) {
|
|
18
|
+
if (promisifyArg && typeof promisifyArg.fail === 'function') {
|
|
19
|
+
promisifyArg.fail(res);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
reject(res);
|
|
23
|
+
}
|
|
24
|
+
}));
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import "core-js/modules/es.object.to-string.js";
|
|
3
|
+
import "core-js/modules/es.promise.js";
|
|
4
|
+
export function promisify(api) {
|
|
5
|
+
return function () {
|
|
6
|
+
var arg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
7
|
+
return new Promise(function (resolve, reject) {
|
|
8
|
+
var promisifyArg = arg;
|
|
9
|
+
api(_objectSpread(_objectSpread({}, promisifyArg), {}, {
|
|
10
|
+
success: function success(res) {
|
|
11
|
+
if (promisifyArg && typeof promisifyArg.success === 'function') {
|
|
12
|
+
promisifyArg.success(res);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
resolve(res);
|
|
16
|
+
},
|
|
17
|
+
fail: function fail(res) {
|
|
18
|
+
if (promisifyArg && typeof promisifyArg.fail === 'function') {
|
|
19
|
+
promisifyArg.fail(res);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
reject(res);
|
|
23
|
+
}
|
|
24
|
+
}));
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import "core-js/modules/es.object.to-string.js";
|
|
3
|
+
import "core-js/modules/es.promise.js";
|
|
4
|
+
export function promisify(api) {
|
|
5
|
+
return function () {
|
|
6
|
+
var arg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
7
|
+
return new Promise(function (resolve, reject) {
|
|
8
|
+
var promisifyArg = arg;
|
|
9
|
+
api(_objectSpread(_objectSpread({}, promisifyArg), {}, {
|
|
10
|
+
success: function success(res) {
|
|
11
|
+
if (promisifyArg && typeof promisifyArg.success === 'function') {
|
|
12
|
+
promisifyArg.success(res);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
resolve(res);
|
|
16
|
+
},
|
|
17
|
+
fail: function fail(res) {
|
|
18
|
+
if (promisifyArg && typeof promisifyArg.fail === 'function') {
|
|
19
|
+
promisifyArg.fail(res);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
reject(res);
|
|
23
|
+
}
|
|
24
|
+
}));
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
}
|