hylid-bridge 4.0.7 → 4.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -66
- package/lib/bridges.d.ts +1 -378
- package/lib/bridges.js +0 -694
- package/lib/clients/mp/alipay/index.d.ts +2 -4
- package/lib/clients/mp/alipay/index.js +2 -4
- package/lib/clients/mp/alipayhk/index.d.ts +2 -4
- package/lib/clients/mp/alipayhk/index.js +2 -4
- package/lib/clients/mp/chope/index.d.ts +1 -1
- package/lib/clients/mp/dana/index.d.ts +2 -4
- package/lib/clients/mp/dana/index.js +2 -4
- package/lib/clients/mp/demo/index.d.ts +1 -1
- package/lib/clients/mp/gcash/index.d.ts +2 -4
- package/lib/clients/mp/gcash/index.js +2 -4
- package/lib/clients/mp/tngd/index.d.ts +2 -4
- package/lib/clients/mp/tngd/index.js +2 -4
- package/lib/clients/mp/truemoney/index.d.ts +2 -4
- package/lib/clients/mp/truemoney/index.js +2 -4
- package/lib/clients/mp_web/alipay/index.d.ts +2 -4
- package/lib/clients/mp_web/alipay/index.js +1 -3
- package/lib/clients/mp_web/alipayhk/index.d.ts +2 -56
- package/lib/clients/mp_web/alipayhk/index.js +2 -28
- package/lib/clients/mp_web/chope/index.d.ts +2 -4
- package/lib/clients/mp_web/chope/index.js +1 -3
- package/lib/clients/mp_web/dana/index.d.ts +2 -56
- package/lib/clients/mp_web/dana/index.js +2 -28
- package/lib/clients/mp_web/demo/index.d.ts +2 -4
- package/lib/clients/mp_web/demo/index.js +1 -3
- package/lib/clients/mp_web/gcash/index.d.ts +2 -56
- package/lib/clients/mp_web/gcash/index.js +2 -28
- package/lib/clients/mp_web/mpay/index.d.ts +2 -54
- package/lib/clients/mp_web/mpay/index.js +2 -26
- package/lib/clients/mp_web/tngd/index.d.ts +2 -56
- package/lib/clients/mp_web/tngd/index.js +2 -28
- package/lib/clients/mp_web/toss/index.d.ts +2 -54
- package/lib/clients/mp_web/toss/index.js +2 -26
- package/lib/clients/mp_web/truemoney/index.d.ts +2 -56
- package/lib/clients/mp_web/truemoney/index.js +2 -28
- package/lib/clients/web/alipay/index.d.ts +3 -131
- package/lib/clients/web/alipay/index.js +3 -47
- package/lib/clients/web/demo/index.d.ts +2 -4
- package/lib/clients/web/demo/index.js +2 -4
- package/lib/clients/web/h5/index.d.ts +2 -42
- package/lib/clients/web/h5/index.js +2 -14
- package/lib/clients/web/tngdh5ng/index.d.ts +1 -3
- package/lib/clients/web/tngdh5ng/index.js +2 -4
- package/lib/common/apis/custom/web/h5/request.d.ts +1 -1
- package/lib/common/apis/generated/mp/request.d.ts +2 -2
- package/lib/common/apis/generated/mp_web/request.d.ts +2 -2
- package/lib/dsl.d.ts +1 -10
- package/lib/dsl.js +1 -28
- package/lib/umd/index.js +1 -1
- package/lib/umd/mp_web_alipay.js +1 -1
- package/lib/umd/mp_web_alipayhk.js +1 -1
- package/lib/umd/mp_web_chope.js +1 -1
- package/lib/umd/mp_web_dana.js +1 -1
- package/lib/umd/mp_web_demo.js +1 -1
- package/lib/umd/mp_web_gcash.js +1 -1
- package/lib/umd/mp_web_mpay.js +1 -2
- package/lib/umd/mp_web_tngd.js +1 -1
- package/lib/umd/mp_web_toss.js +1 -2
- package/lib/umd/mp_web_truemoney.js +1 -1
- package/lib/umd/web_alipay.js +1 -2
- package/lib/umd/web_demo.js +1 -1
- package/lib/umd/web_h5.js +1 -1
- package/lib/umd/web_tngdh5ng.js +1 -1
- package/package.json +6 -6
- package/lib/clients/mp/alipay/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/mp/alipay/defineRuntimeConfig.js +0 -3
- package/lib/clients/mp/alipayhk/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/mp/alipayhk/defineRuntimeConfig.js +0 -3
- package/lib/clients/mp/dana/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/mp/dana/defineRuntimeConfig.js +0 -3
- package/lib/clients/mp/gcash/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/mp/gcash/defineRuntimeConfig.js +0 -3
- package/lib/clients/mp/tngd/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/mp/tngd/defineRuntimeConfig.js +0 -3
- package/lib/clients/mp/truemoney/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/mp/truemoney/defineRuntimeConfig.js +0 -3
- package/lib/clients/mp_web/alipay/getCurrentLanguage.d.ts +0 -2
- package/lib/clients/mp_web/alipay/getCurrentLanguage.js +0 -3
- package/lib/clients/mp_web/alipayhk/createWithoutAuthRpc.d.ts +0 -2
- package/lib/clients/mp_web/alipayhk/createWithoutAuthRpc.js +0 -3
- package/lib/clients/mp_web/alipayhk/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/mp_web/alipayhk/defineRuntimeConfig.js +0 -3
- package/lib/clients/mp_web/alipayhk/getCurrentLanguage.d.ts +0 -2
- package/lib/clients/mp_web/alipayhk/getCurrentLanguage.js +0 -3
- package/lib/clients/mp_web/alipayhk/openApPayCodePage.d.ts +0 -2
- package/lib/clients/mp_web/alipayhk/openApPayCodePage.js +0 -3
- package/lib/clients/mp_web/alipayhk/openInApp.d.ts +0 -2
- package/lib/clients/mp_web/alipayhk/openInApp.js +0 -3
- package/lib/clients/mp_web/alipayhk/openInBrowser.d.ts +0 -2
- package/lib/clients/mp_web/alipayhk/openInBrowser.js +0 -3
- package/lib/clients/mp_web/alipayhk/openOtherApp.d.ts +0 -2
- package/lib/clients/mp_web/alipayhk/openOtherApp.js +0 -3
- package/lib/clients/mp_web/alipayhk/openPayCodePage.d.ts +0 -2
- package/lib/clients/mp_web/alipayhk/openPayCodePage.js +0 -3
- package/lib/clients/mp_web/alipayhk/openScanPage.d.ts +0 -2
- package/lib/clients/mp_web/alipayhk/openScanPage.js +0 -3
- package/lib/clients/mp_web/alipayhk/openURL.d.ts +0 -2
- package/lib/clients/mp_web/alipayhk/openURL.js +0 -3
- package/lib/clients/mp_web/alipayhk/openWebURL.d.ts +0 -2
- package/lib/clients/mp_web/alipayhk/openWebURL.js +0 -3
- package/lib/clients/mp_web/alipayhk/popWindow.d.ts +0 -2
- package/lib/clients/mp_web/alipayhk/popWindow.js +0 -3
- package/lib/clients/mp_web/alipayhk/rpcWithAuth.d.ts +0 -2
- package/lib/clients/mp_web/alipayhk/rpcWithAuth.js +0 -3
- package/lib/clients/mp_web/chope/getCurrentLanguage.d.ts +0 -2
- package/lib/clients/mp_web/chope/getCurrentLanguage.js +0 -3
- package/lib/clients/mp_web/dana/createWithoutAuthRpc.d.ts +0 -2
- package/lib/clients/mp_web/dana/createWithoutAuthRpc.js +0 -3
- package/lib/clients/mp_web/dana/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/mp_web/dana/defineRuntimeConfig.js +0 -3
- package/lib/clients/mp_web/dana/getCurrentLanguage.d.ts +0 -2
- package/lib/clients/mp_web/dana/getCurrentLanguage.js +0 -3
- package/lib/clients/mp_web/dana/openApPayCodePage.d.ts +0 -2
- package/lib/clients/mp_web/dana/openApPayCodePage.js +0 -3
- package/lib/clients/mp_web/dana/openInApp.d.ts +0 -2
- package/lib/clients/mp_web/dana/openInApp.js +0 -3
- package/lib/clients/mp_web/dana/openInBrowser.d.ts +0 -2
- package/lib/clients/mp_web/dana/openInBrowser.js +0 -3
- package/lib/clients/mp_web/dana/openOtherApp.d.ts +0 -2
- package/lib/clients/mp_web/dana/openOtherApp.js +0 -3
- package/lib/clients/mp_web/dana/openPayCodePage.d.ts +0 -2
- package/lib/clients/mp_web/dana/openPayCodePage.js +0 -3
- package/lib/clients/mp_web/dana/openScanPage.d.ts +0 -2
- package/lib/clients/mp_web/dana/openScanPage.js +0 -3
- package/lib/clients/mp_web/dana/openURL.d.ts +0 -2
- package/lib/clients/mp_web/dana/openURL.js +0 -3
- package/lib/clients/mp_web/dana/openWebURL.d.ts +0 -2
- package/lib/clients/mp_web/dana/openWebURL.js +0 -3
- package/lib/clients/mp_web/dana/popWindow.d.ts +0 -2
- package/lib/clients/mp_web/dana/popWindow.js +0 -3
- package/lib/clients/mp_web/dana/rpcWithAuth.d.ts +0 -2
- package/lib/clients/mp_web/dana/rpcWithAuth.js +0 -3
- package/lib/clients/mp_web/demo/getCurrentLanguage.d.ts +0 -2
- package/lib/clients/mp_web/demo/getCurrentLanguage.js +0 -3
- package/lib/clients/mp_web/gcash/createWithoutAuthRpc.d.ts +0 -2
- package/lib/clients/mp_web/gcash/createWithoutAuthRpc.js +0 -3
- package/lib/clients/mp_web/gcash/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/mp_web/gcash/defineRuntimeConfig.js +0 -3
- package/lib/clients/mp_web/gcash/getCurrentLanguage.d.ts +0 -2
- package/lib/clients/mp_web/gcash/getCurrentLanguage.js +0 -3
- package/lib/clients/mp_web/gcash/openApPayCodePage.d.ts +0 -2
- package/lib/clients/mp_web/gcash/openApPayCodePage.js +0 -3
- package/lib/clients/mp_web/gcash/openInApp.d.ts +0 -2
- package/lib/clients/mp_web/gcash/openInApp.js +0 -3
- package/lib/clients/mp_web/gcash/openInBrowser.d.ts +0 -2
- package/lib/clients/mp_web/gcash/openInBrowser.js +0 -3
- package/lib/clients/mp_web/gcash/openOtherApp.d.ts +0 -2
- package/lib/clients/mp_web/gcash/openOtherApp.js +0 -3
- package/lib/clients/mp_web/gcash/openPayCodePage.d.ts +0 -2
- package/lib/clients/mp_web/gcash/openPayCodePage.js +0 -3
- package/lib/clients/mp_web/gcash/openScanPage.d.ts +0 -2
- package/lib/clients/mp_web/gcash/openScanPage.js +0 -3
- package/lib/clients/mp_web/gcash/openURL.d.ts +0 -2
- package/lib/clients/mp_web/gcash/openURL.js +0 -3
- package/lib/clients/mp_web/gcash/openWebURL.d.ts +0 -2
- package/lib/clients/mp_web/gcash/openWebURL.js +0 -3
- package/lib/clients/mp_web/gcash/popWindow.d.ts +0 -2
- package/lib/clients/mp_web/gcash/popWindow.js +0 -3
- package/lib/clients/mp_web/gcash/rpcWithAuth.d.ts +0 -2
- package/lib/clients/mp_web/gcash/rpcWithAuth.js +0 -3
- package/lib/clients/mp_web/mpay/createWithoutAuthRpc.d.ts +0 -2
- package/lib/clients/mp_web/mpay/createWithoutAuthRpc.js +0 -3
- package/lib/clients/mp_web/mpay/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/mp_web/mpay/defineRuntimeConfig.js +0 -3
- package/lib/clients/mp_web/mpay/openApPayCodePage.d.ts +0 -2
- package/lib/clients/mp_web/mpay/openApPayCodePage.js +0 -3
- package/lib/clients/mp_web/mpay/openInApp.d.ts +0 -2
- package/lib/clients/mp_web/mpay/openInApp.js +0 -3
- package/lib/clients/mp_web/mpay/openInBrowser.d.ts +0 -2
- package/lib/clients/mp_web/mpay/openInBrowser.js +0 -3
- package/lib/clients/mp_web/mpay/openOtherApp.d.ts +0 -2
- package/lib/clients/mp_web/mpay/openOtherApp.js +0 -3
- package/lib/clients/mp_web/mpay/openPayCodePage.d.ts +0 -2
- package/lib/clients/mp_web/mpay/openPayCodePage.js +0 -3
- package/lib/clients/mp_web/mpay/openScanPage.d.ts +0 -2
- package/lib/clients/mp_web/mpay/openScanPage.js +0 -3
- package/lib/clients/mp_web/mpay/openURL.d.ts +0 -2
- package/lib/clients/mp_web/mpay/openURL.js +0 -3
- package/lib/clients/mp_web/mpay/openWebURL.d.ts +0 -2
- package/lib/clients/mp_web/mpay/openWebURL.js +0 -3
- package/lib/clients/mp_web/mpay/popWindow.d.ts +0 -2
- package/lib/clients/mp_web/mpay/popWindow.js +0 -3
- package/lib/clients/mp_web/mpay/rpcWithAuth.d.ts +0 -2
- package/lib/clients/mp_web/mpay/rpcWithAuth.js +0 -3
- package/lib/clients/mp_web/tngd/createWithoutAuthRpc.d.ts +0 -2
- package/lib/clients/mp_web/tngd/createWithoutAuthRpc.js +0 -3
- package/lib/clients/mp_web/tngd/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/mp_web/tngd/defineRuntimeConfig.js +0 -3
- package/lib/clients/mp_web/tngd/getCurrentLanguage.d.ts +0 -2
- package/lib/clients/mp_web/tngd/getCurrentLanguage.js +0 -3
- package/lib/clients/mp_web/tngd/openApPayCodePage.d.ts +0 -2
- package/lib/clients/mp_web/tngd/openApPayCodePage.js +0 -3
- package/lib/clients/mp_web/tngd/openInApp.d.ts +0 -2
- package/lib/clients/mp_web/tngd/openInApp.js +0 -3
- package/lib/clients/mp_web/tngd/openInBrowser.d.ts +0 -2
- package/lib/clients/mp_web/tngd/openInBrowser.js +0 -3
- package/lib/clients/mp_web/tngd/openOtherApp.d.ts +0 -2
- package/lib/clients/mp_web/tngd/openOtherApp.js +0 -3
- package/lib/clients/mp_web/tngd/openPayCodePage.d.ts +0 -2
- package/lib/clients/mp_web/tngd/openPayCodePage.js +0 -3
- package/lib/clients/mp_web/tngd/openScanPage.d.ts +0 -2
- package/lib/clients/mp_web/tngd/openScanPage.js +0 -3
- package/lib/clients/mp_web/tngd/openURL.d.ts +0 -2
- package/lib/clients/mp_web/tngd/openURL.js +0 -3
- package/lib/clients/mp_web/tngd/openWebURL.d.ts +0 -2
- package/lib/clients/mp_web/tngd/openWebURL.js +0 -3
- package/lib/clients/mp_web/tngd/popWindow.d.ts +0 -2
- package/lib/clients/mp_web/tngd/popWindow.js +0 -3
- package/lib/clients/mp_web/tngd/rpcWithAuth.d.ts +0 -2
- package/lib/clients/mp_web/tngd/rpcWithAuth.js +0 -3
- package/lib/clients/mp_web/toss/createWithoutAuthRpc.d.ts +0 -2
- package/lib/clients/mp_web/toss/createWithoutAuthRpc.js +0 -3
- package/lib/clients/mp_web/toss/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/mp_web/toss/defineRuntimeConfig.js +0 -3
- package/lib/clients/mp_web/toss/openApPayCodePage.d.ts +0 -2
- package/lib/clients/mp_web/toss/openApPayCodePage.js +0 -3
- package/lib/clients/mp_web/toss/openInApp.d.ts +0 -2
- package/lib/clients/mp_web/toss/openInApp.js +0 -3
- package/lib/clients/mp_web/toss/openInBrowser.d.ts +0 -2
- package/lib/clients/mp_web/toss/openInBrowser.js +0 -3
- package/lib/clients/mp_web/toss/openOtherApp.d.ts +0 -2
- package/lib/clients/mp_web/toss/openOtherApp.js +0 -3
- package/lib/clients/mp_web/toss/openPayCodePage.d.ts +0 -2
- package/lib/clients/mp_web/toss/openPayCodePage.js +0 -3
- package/lib/clients/mp_web/toss/openScanPage.d.ts +0 -2
- package/lib/clients/mp_web/toss/openScanPage.js +0 -3
- package/lib/clients/mp_web/toss/openURL.d.ts +0 -2
- package/lib/clients/mp_web/toss/openURL.js +0 -3
- package/lib/clients/mp_web/toss/openWebURL.d.ts +0 -2
- package/lib/clients/mp_web/toss/openWebURL.js +0 -3
- package/lib/clients/mp_web/toss/popWindow.d.ts +0 -2
- package/lib/clients/mp_web/toss/popWindow.js +0 -3
- package/lib/clients/mp_web/toss/rpcWithAuth.d.ts +0 -2
- package/lib/clients/mp_web/toss/rpcWithAuth.js +0 -3
- package/lib/clients/mp_web/truemoney/createWithoutAuthRpc.d.ts +0 -2
- package/lib/clients/mp_web/truemoney/createWithoutAuthRpc.js +0 -3
- package/lib/clients/mp_web/truemoney/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/mp_web/truemoney/defineRuntimeConfig.js +0 -3
- package/lib/clients/mp_web/truemoney/getCurrentLanguage.d.ts +0 -2
- package/lib/clients/mp_web/truemoney/getCurrentLanguage.js +0 -3
- package/lib/clients/mp_web/truemoney/openApPayCodePage.d.ts +0 -2
- package/lib/clients/mp_web/truemoney/openApPayCodePage.js +0 -3
- package/lib/clients/mp_web/truemoney/openInApp.d.ts +0 -2
- package/lib/clients/mp_web/truemoney/openInApp.js +0 -3
- package/lib/clients/mp_web/truemoney/openInBrowser.d.ts +0 -2
- package/lib/clients/mp_web/truemoney/openInBrowser.js +0 -3
- package/lib/clients/mp_web/truemoney/openOtherApp.d.ts +0 -2
- package/lib/clients/mp_web/truemoney/openOtherApp.js +0 -3
- package/lib/clients/mp_web/truemoney/openPayCodePage.d.ts +0 -2
- package/lib/clients/mp_web/truemoney/openPayCodePage.js +0 -3
- package/lib/clients/mp_web/truemoney/openScanPage.d.ts +0 -2
- package/lib/clients/mp_web/truemoney/openScanPage.js +0 -3
- package/lib/clients/mp_web/truemoney/openURL.d.ts +0 -2
- package/lib/clients/mp_web/truemoney/openURL.js +0 -3
- package/lib/clients/mp_web/truemoney/openWebURL.d.ts +0 -2
- package/lib/clients/mp_web/truemoney/openWebURL.js +0 -3
- package/lib/clients/mp_web/truemoney/popWindow.d.ts +0 -2
- package/lib/clients/mp_web/truemoney/popWindow.js +0 -3
- package/lib/clients/mp_web/truemoney/rpcWithAuth.d.ts +0 -2
- package/lib/clients/mp_web/truemoney/rpcWithAuth.js +0 -3
- package/lib/clients/web/alipay/addNotifyListener.d.ts +0 -2
- package/lib/clients/web/alipay/addNotifyListener.js +0 -3
- package/lib/clients/web/alipay/chooseDistrict.d.ts +0 -2
- package/lib/clients/web/alipay/chooseDistrict.js +0 -3
- package/lib/clients/web/alipay/createWithoutAuthRpc.d.ts +0 -2
- package/lib/clients/web/alipay/createWithoutAuthRpc.js +0 -3
- package/lib/clients/web/alipay/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/web/alipay/defineRuntimeConfig.js +0 -3
- package/lib/clients/web/alipay/easyShare.d.ts +0 -2
- package/lib/clients/web/alipay/easyShare.js +0 -3
- package/lib/clients/web/alipay/getCurrentLanguage.d.ts +0 -2
- package/lib/clients/web/alipay/getCurrentLanguage.js +0 -3
- package/lib/clients/web/alipay/getMainSelectedCity.d.ts +0 -2
- package/lib/clients/web/alipay/getMainSelectedCity.js +0 -3
- package/lib/clients/web/alipay/homeAddAppToMyApps.d.ts +0 -2
- package/lib/clients/web/alipay/homeAddAppToMyApps.js +0 -3
- package/lib/clients/web/alipay/homeCanAddAppToMyApps.d.ts +0 -2
- package/lib/clients/web/alipay/homeCanAddAppToMyApps.js +0 -3
- package/lib/clients/web/alipay/openApPayCodePage.d.ts +0 -2
- package/lib/clients/web/alipay/openApPayCodePage.js +0 -3
- package/lib/clients/web/alipay/openInApp.d.ts +0 -2
- package/lib/clients/web/alipay/openInApp.js +0 -3
- package/lib/clients/web/alipay/openInBrowser.d.ts +0 -2
- package/lib/clients/web/alipay/openInBrowser.js +0 -3
- package/lib/clients/web/alipay/openOtherApp.d.ts +0 -2
- package/lib/clients/web/alipay/openOtherApp.js +0 -3
- package/lib/clients/web/alipay/openPayCodePage.d.ts +0 -2
- package/lib/clients/web/alipay/openPayCodePage.js +0 -3
- package/lib/clients/web/alipay/openScanPage.d.ts +0 -2
- package/lib/clients/web/alipay/openScanPage.js +0 -3
- package/lib/clients/web/alipay/openURL.d.ts +0 -2
- package/lib/clients/web/alipay/openURL.js +0 -3
- package/lib/clients/web/alipay/openWebURL.d.ts +0 -2
- package/lib/clients/web/alipay/openWebURL.js +0 -3
- package/lib/clients/web/alipay/popWindow.d.ts +0 -2
- package/lib/clients/web/alipay/popWindow.js +0 -3
- package/lib/clients/web/alipay/postNotification.d.ts +0 -2
- package/lib/clients/web/alipay/postNotification.js +0 -3
- package/lib/clients/web/alipay/removeNotifyListener.d.ts +0 -2
- package/lib/clients/web/alipay/removeNotifyListener.js +0 -3
- package/lib/clients/web/alipay/rpcWithAuth.d.ts +0 -2
- package/lib/clients/web/alipay/rpcWithAuth.js +0 -3
- package/lib/clients/web/alipay/rpcWithAuthAPlus.d.ts +0 -2
- package/lib/clients/web/alipay/rpcWithAuthAPlus.js +0 -3
- package/lib/clients/web/demo/getCurrentLanguage.d.ts +0 -2
- package/lib/clients/web/demo/getCurrentLanguage.js +0 -3
- package/lib/clients/web/h5/createWithoutAuthRpc.d.ts +0 -2
- package/lib/clients/web/h5/createWithoutAuthRpc.js +0 -3
- package/lib/clients/web/h5/defineRuntimeConfig.d.ts +0 -2
- package/lib/clients/web/h5/defineRuntimeConfig.js +0 -3
- package/lib/clients/web/h5/getCurrentLanguage.d.ts +0 -2
- package/lib/clients/web/h5/getCurrentLanguage.js +0 -3
- package/lib/clients/web/h5/openURL.d.ts +0 -2
- package/lib/clients/web/h5/openURL.js +0 -3
- package/lib/clients/web/h5/popWindow.d.ts +0 -2
- package/lib/clients/web/h5/popWindow.js +0 -3
- package/lib/clients/web/h5/rpcWithAuth.d.ts +0 -2
- package/lib/clients/web/h5/rpcWithAuth.js +0 -3
- package/lib/clients/web/tngdh5ng/getCurrentLanguage.d.ts +0 -2
- package/lib/clients/web/tngdh5ng/getCurrentLanguage.js +0 -3
- package/lib/common/apis/generated/mp_web/createWithoutAuthRpc.d.ts +0 -27
- package/lib/common/apis/generated/mp_web/createWithoutAuthRpc.js +0 -7
- package/lib/common/apis/generated/mp_web/defineRuntimeConfig.d.ts +0 -2
- package/lib/common/apis/generated/mp_web/defineRuntimeConfig.js +0 -7
- package/lib/common/apis/generated/web/chooseDistrict.d.ts +0 -41
- package/lib/common/apis/generated/web/chooseDistrict.js +0 -8
- package/lib/common/apis/generated/web/easyShare.d.ts +0 -32
- package/lib/common/apis/generated/web/easyShare.js +0 -8
- package/lib/common/apis/generated/web/getMainSelectedCity.d.ts +0 -27
- package/lib/common/apis/generated/web/getMainSelectedCity.js +0 -8
- package/lib/common/apis/generated/web/homeAddAppToMyApps.d.ts +0 -5
- package/lib/common/apis/generated/web/homeAddAppToMyApps.js +0 -8
- package/lib/common/apis/generated/web/homeCanAddAppToMyApps.d.ts +0 -13
- package/lib/common/apis/generated/web/homeCanAddAppToMyApps.js +0 -8
- package/lib/common/apis/generated/web/postNotification.d.ts +0 -9
- package/lib/common/apis/generated/web/postNotification.js +0 -8
- package/lib/internal/apis/custom/mp_web/alipayhk/openApPayCodePage.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/openApPayCodePage.js +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/openInApp.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/openInApp.js +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/openInBrowser.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/openInBrowser.js +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/openOtherApp.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/openOtherApp.js +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/openPayCodePage.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/openPayCodePage.js +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/openScanPage.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/openScanPage.js +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/openURL.d.ts +0 -2
- package/lib/internal/apis/custom/mp_web/alipayhk/openURL.js +0 -26
- package/lib/internal/apis/custom/mp_web/alipayhk/openWebURL.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/openWebURL.js +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/popWindow.d.ts +0 -2
- package/lib/internal/apis/custom/mp_web/alipayhk/popWindow.js +0 -4
- package/lib/internal/apis/custom/mp_web/alipayhk/rpcWithAuth.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/alipayhk/rpcWithAuth.js +0 -32
- package/lib/internal/apis/custom/mp_web/mpay/openApPayCodePage.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/openApPayCodePage.js +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/openInApp.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/openInApp.js +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/openInBrowser.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/openInBrowser.js +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/openOtherApp.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/openOtherApp.js +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/openPayCodePage.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/openPayCodePage.js +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/openScanPage.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/openScanPage.js +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/openURL.d.ts +0 -2
- package/lib/internal/apis/custom/mp_web/mpay/openURL.js +0 -26
- package/lib/internal/apis/custom/mp_web/mpay/openWebURL.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/openWebURL.js +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/rpcWithAuth.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/mpay/rpcWithAuth.js +0 -27
- package/lib/internal/apis/custom/mp_web/tngd/openApPayCodePage.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/tngd/openApPayCodePage.js +0 -3
- package/lib/internal/apis/custom/mp_web/tngd/openInApp.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/tngd/openInApp.js +0 -3
- package/lib/internal/apis/custom/mp_web/tngd/openInBrowser.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/tngd/openInBrowser.js +0 -3
- package/lib/internal/apis/custom/mp_web/tngd/openOtherApp.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/tngd/openOtherApp.js +0 -3
- package/lib/internal/apis/custom/mp_web/tngd/openPayCodePage.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/tngd/openPayCodePage.js +0 -3
- package/lib/internal/apis/custom/mp_web/tngd/openScanPage.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/tngd/openScanPage.js +0 -3
- package/lib/internal/apis/custom/mp_web/tngd/openURL.d.ts +0 -6
- package/lib/internal/apis/custom/mp_web/tngd/openURL.js +0 -30
- package/lib/internal/apis/custom/mp_web/tngd/openWebURL.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/tngd/openWebURL.js +0 -3
- package/lib/internal/apis/custom/mp_web/toss/rpcWithAuth.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/toss/rpcWithAuth.js +0 -27
- package/lib/internal/apis/custom/mp_web/truemoney/openApPayCodePage.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/truemoney/openApPayCodePage.js +0 -12
- package/lib/internal/apis/custom/mp_web/truemoney/openInApp.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/truemoney/openInApp.js +0 -3
- package/lib/internal/apis/custom/mp_web/truemoney/openInBrowser.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/truemoney/openInBrowser.js +0 -3
- package/lib/internal/apis/custom/mp_web/truemoney/openOtherApp.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/truemoney/openOtherApp.js +0 -3
- package/lib/internal/apis/custom/mp_web/truemoney/openPayCodePage.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/truemoney/openPayCodePage.js +0 -12
- package/lib/internal/apis/custom/mp_web/truemoney/openScanPage.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/truemoney/openScanPage.js +0 -12
- package/lib/internal/apis/custom/mp_web/truemoney/openURL.d.ts +0 -6
- package/lib/internal/apis/custom/mp_web/truemoney/openURL.js +0 -30
- package/lib/internal/apis/custom/mp_web/truemoney/openWebURL.d.ts +0 -3
- package/lib/internal/apis/custom/mp_web/truemoney/openWebURL.js +0 -3
- package/lib/internal/apis/custom/web/addNotifyListener.d.ts +0 -6
- package/lib/internal/apis/custom/web/addNotifyListener.js +0 -170
- package/lib/internal/apis/custom/web/alipay/openApPayCodePage.d.ts +0 -3
- package/lib/internal/apis/custom/web/alipay/openApPayCodePage.js +0 -3
- package/lib/internal/apis/custom/web/alipay/openInApp.d.ts +0 -3
- package/lib/internal/apis/custom/web/alipay/openInApp.js +0 -3
- package/lib/internal/apis/custom/web/alipay/openInBrowser.d.ts +0 -3
- package/lib/internal/apis/custom/web/alipay/openInBrowser.js +0 -3
- package/lib/internal/apis/custom/web/alipay/openOtherApp.d.ts +0 -3
- package/lib/internal/apis/custom/web/alipay/openOtherApp.js +0 -3
- package/lib/internal/apis/custom/web/alipay/openPayCodePage.d.ts +0 -3
- package/lib/internal/apis/custom/web/alipay/openPayCodePage.js +0 -3
- package/lib/internal/apis/custom/web/alipay/openScanPage.d.ts +0 -3
- package/lib/internal/apis/custom/web/alipay/openScanPage.js +0 -3
- package/lib/internal/apis/custom/web/alipay/openURL.d.ts +0 -2
- package/lib/internal/apis/custom/web/alipay/openURL.js +0 -26
- package/lib/internal/apis/custom/web/alipay/openWebURL.d.ts +0 -3
- package/lib/internal/apis/custom/web/alipay/openWebURL.js +0 -3
- package/lib/internal/apis/custom/web/alipay/popWindow.d.ts +0 -2
- package/lib/internal/apis/custom/web/alipay/popWindow.js +0 -4
- package/lib/internal/apis/custom/web/createWithoutAuthRpc.d.ts +0 -3
- package/lib/internal/apis/custom/web/createWithoutAuthRpc.js +0 -51
- package/lib/internal/apis/custom/web/defineRuntimeConfig.d.ts +0 -3
- package/lib/internal/apis/custom/web/defineRuntimeConfig.js +0 -7
- package/lib/internal/apis/custom/web/getCurrentLanguage.d.ts +0 -2
- package/lib/internal/apis/custom/web/getCurrentLanguage.js +0 -12
- package/lib/internal/apis/custom/web/h5/openURL.d.ts +0 -2
- package/lib/internal/apis/custom/web/h5/openURL.js +0 -15
- package/lib/internal/apis/custom/web/h5/popWindow.d.ts +0 -2
- package/lib/internal/apis/custom/web/h5/popWindow.js +0 -3
- package/lib/internal/apis/custom/web/removeNotifyListener.d.ts +0 -4
- package/lib/internal/apis/custom/web/removeNotifyListener.js +0 -27
- package/lib/internal/apis/custom/web/rpcWithAuthAPlus.d.ts +0 -3
- package/lib/internal/apis/custom/web/rpcWithAuthAPlus.js +0 -31
- package/lib/internal/utils/baseOpenUrl.d.ts +0 -15
- package/lib/internal/utils/baseOpenUrl.js +0 -125
- package/lib/internal/utils/index.d.ts +0 -9
- package/lib/internal/utils/index.js +0 -71
- package/lib/internal/utils/language.d.ts +0 -4
- package/lib/internal/utils/language.js +0 -46
- package/lib/internal/utils/network/authLogin.d.ts +0 -8
- package/lib/internal/utils/network/authLogin.js +0 -564
- package/lib/internal/utils/network/index.d.ts +0 -7
- package/lib/internal/utils/network/index.js +0 -246
- package/lib/internal/utils/router.d.ts +0 -35
- package/lib/internal/utils/router.js +0 -157
- package/lib/umd/mp_web_mpay.js.LICENSE.txt +0 -1
- package/lib/umd/mp_web_toss.js.LICENSE.txt +0 -1
- package/lib/umd/web_alipay.js.LICENSE.txt +0 -1
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
var __assign = this && this.__assign || function () {
|
|
2
|
-
__assign = Object.assign || function (t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
6
|
-
}
|
|
7
|
-
return t;
|
|
8
|
-
};
|
|
9
|
-
return __assign.apply(this, arguments);
|
|
10
|
-
};
|
|
11
|
-
import { call } from '@hylid/call';
|
|
12
|
-
// 基本的打开 url 相关函数
|
|
13
|
-
export var openApPayCodePage = function openApPayCodePage() {
|
|
14
|
-
return call('startApp', {
|
|
15
|
-
// HK钱包 当前不支持传参跳 A+ 支付码, 跳到支付页手动切换
|
|
16
|
-
appId: '20000056'
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
|
-
export var openApPayCodePageAPlus = function openApPayCodePageAPlus() {
|
|
20
|
-
return call('navigateToBizScene', {
|
|
21
|
-
sceneCode: 'APLUS_QR_PAY'
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
export var openPayCodePage = function openPayCodePage() {
|
|
25
|
-
return call('startApp', {
|
|
26
|
-
appId: '20000056'
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
export var openPayCodePageAPlus = function openPayCodePageAPlus() {
|
|
30
|
-
return call('navigateToBizScene', {
|
|
31
|
-
sceneCode: 'QR_PAY'
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
export var openScanPage = function openScanPage() {
|
|
35
|
-
return call('startApp', {
|
|
36
|
-
appId: '10000007'
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
|
-
export var openScanPageAPlus = function openScanPageAPlus() {
|
|
40
|
-
return call('navigateToBizScene', {
|
|
41
|
-
sceneCode: 'SCAN'
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
export var pushWindow = function pushWindow(options) {
|
|
45
|
-
return call('pushWindow', options);
|
|
46
|
-
};
|
|
47
|
-
export var openInBrowser = function openInBrowser(options) {
|
|
48
|
-
return call('openInBrowser', options);
|
|
49
|
-
};
|
|
50
|
-
export var openInBrowserAPlus = function openInBrowserAPlus(_a) {
|
|
51
|
-
var url = _a.url;
|
|
52
|
-
return call('navigateToBizScene', {
|
|
53
|
-
sceneCode: 'SCHEME',
|
|
54
|
-
param: {
|
|
55
|
-
scheme: url
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
/**
|
|
60
|
-
* 获取小程序页面url. 若有套壳 H5 url, 则拼接在 path 后
|
|
61
|
-
*/
|
|
62
|
-
function getMpPageUrl(params) {
|
|
63
|
-
var url = params.url,
|
|
64
|
-
path = params.path;
|
|
65
|
-
// aplus:// 自定义链接path可能为'/';以及无 path 的情况,兜底为 /pages/index/index
|
|
66
|
-
var mpPagePath = !path || path === '/' ? '/pages/index/index' : path;
|
|
67
|
-
if (!url) {
|
|
68
|
-
return mpPagePath;
|
|
69
|
-
}
|
|
70
|
-
var separator = mpPagePath.includes('?') ? '&' : '?';
|
|
71
|
-
return "".concat(mpPagePath).concat(separator, "url=").concat(encodeURIComponent(url));
|
|
72
|
-
}
|
|
73
|
-
export var openInApp = function openInApp(params) {
|
|
74
|
-
return call('navigateTo', {
|
|
75
|
-
url: getMpPageUrl(params)
|
|
76
|
-
});
|
|
77
|
-
};
|
|
78
|
-
function paramsToAlipayScheme(params) {
|
|
79
|
-
var appId = params.appId,
|
|
80
|
-
path = params.path,
|
|
81
|
-
launchParams = params.launchParams;
|
|
82
|
-
var scheme = "alipays://platformapi/startapp?appId=".concat(appId);
|
|
83
|
-
if (path) {
|
|
84
|
-
scheme += "&page=".concat(encodeURIComponent(path));
|
|
85
|
-
}
|
|
86
|
-
var query = '';
|
|
87
|
-
if (launchParams) {
|
|
88
|
-
query = Object.keys(launchParams).map(function (key) {
|
|
89
|
-
return "".concat(key, "=").concat(launchParams[key]);
|
|
90
|
-
}).join('&');
|
|
91
|
-
scheme += "&query=".concat(encodeURIComponent(query));
|
|
92
|
-
}
|
|
93
|
-
if (launchParams === null || launchParams === void 0 ? void 0 : launchParams.chInfo) {
|
|
94
|
-
scheme += "&chInfo=".concat(launchParams.chInfo);
|
|
95
|
-
}
|
|
96
|
-
return scheme;
|
|
97
|
-
}
|
|
98
|
-
export var openOtherApp = function openOtherApp(args) {
|
|
99
|
-
return call('pushWindow', {
|
|
100
|
-
url: paramsToAlipayScheme(args)
|
|
101
|
-
});
|
|
102
|
-
};
|
|
103
|
-
export var openOtherAppAPlus = function openOtherAppAPlus(args) {
|
|
104
|
-
return call('navigateToMiniProgram', __assign(__assign({}, args), {
|
|
105
|
-
extraData: args === null || args === void 0 ? void 0 : args.launchParams
|
|
106
|
-
}));
|
|
107
|
-
};
|
|
108
|
-
export var openWebURL = function openWebURL(_a) {
|
|
109
|
-
var url = _a.url;
|
|
110
|
-
return call('startApp', {
|
|
111
|
-
appId: '20000067',
|
|
112
|
-
param: {
|
|
113
|
-
url: url
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
};
|
|
117
|
-
export var openWebURLAPlus = function openWebURLAPlus(_a) {
|
|
118
|
-
var url = _a.url;
|
|
119
|
-
return call('navigateToBizScene', {
|
|
120
|
-
sceneCode: 'WEB_PAGE',
|
|
121
|
-
param: {
|
|
122
|
-
url: url
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const implAsyncBridge: <T extends (args: any) => Promise<any>>(func: (newArgs: Omit<Parameters<T>[0], "success" | "fail" | "complete">, resolve: (res: Awaited<ReturnType<T>>) => void, reject: (err: any) => void) => void) => T;
|
|
2
|
-
export declare const isRegExp: (obj: any) => obj is RegExp;
|
|
3
|
-
export declare const isString: (obj: any) => obj is string;
|
|
4
|
-
export declare const isFunction: (obj: any) => obj is Function;
|
|
5
|
-
export declare const isObject: (obj: any) => obj is object;
|
|
6
|
-
export declare const isNumber: (obj: any) => obj is number;
|
|
7
|
-
export declare const isArray: (arg: any) => arg is any[];
|
|
8
|
-
export declare const isBoolean: (obj: any) => obj is boolean;
|
|
9
|
-
export declare const merge: <T>(...args: Array<Record<string, any> | undefined>) => T;
|
|
@@ -1,71 +0,0 @@
|
|
|
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) t[p] = s[p];
|
|
4
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
5
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
6
|
-
}
|
|
7
|
-
return t;
|
|
8
|
-
};
|
|
9
|
-
export var implAsyncBridge = function implAsyncBridge(func) {
|
|
10
|
-
return function (args) {
|
|
11
|
-
return new Promise(function (resolve, reject) {
|
|
12
|
-
var _a = args || {},
|
|
13
|
-
success = _a.success,
|
|
14
|
-
fail = _a.fail,
|
|
15
|
-
complete = _a.complete,
|
|
16
|
-
reset = __rest(_a, ["success", "fail", "complete"]);
|
|
17
|
-
func(
|
|
18
|
-
// newArgs
|
|
19
|
-
reset,
|
|
20
|
-
// resolve
|
|
21
|
-
function (res) {
|
|
22
|
-
resolve(res);
|
|
23
|
-
success === null || success === void 0 ? void 0 : success(res);
|
|
24
|
-
complete === null || complete === void 0 ? void 0 : complete(res);
|
|
25
|
-
},
|
|
26
|
-
// reject
|
|
27
|
-
function (err) {
|
|
28
|
-
reject(err);
|
|
29
|
-
fail === null || fail === void 0 ? void 0 : fail(err);
|
|
30
|
-
complete === null || complete === void 0 ? void 0 : complete(err);
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
var is = function is(type) {
|
|
36
|
-
return function (obj) {
|
|
37
|
-
return toString.call(obj) === "[object ".concat(type, "]");
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
export var isRegExp = is('RegExp');
|
|
41
|
-
export var isString = is('String');
|
|
42
|
-
export var isFunction = is('Function');
|
|
43
|
-
export var isObject = is('Object');
|
|
44
|
-
export var isNumber = is('Number');
|
|
45
|
-
export var isArray = Array.isArray;
|
|
46
|
-
export var isBoolean = is('Boolean');
|
|
47
|
-
var _merge = function merge() {
|
|
48
|
-
var args = [];
|
|
49
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
50
|
-
args[_i] = arguments[_i];
|
|
51
|
-
}
|
|
52
|
-
return args.reduce(function (t, c) {
|
|
53
|
-
var _a;
|
|
54
|
-
if (!c) return t;
|
|
55
|
-
var data = Object.entries(c);
|
|
56
|
-
var length = data.length;
|
|
57
|
-
for (var i = 0; i < length; i++) {
|
|
58
|
-
var _b = data[i],
|
|
59
|
-
key = _b[0],
|
|
60
|
-
value = _b[1];
|
|
61
|
-
if (isObject(value)) {
|
|
62
|
-
// eslint-disable-next-line no-param-reassign
|
|
63
|
-
t[key] = _merge(t[key], value);
|
|
64
|
-
} else {
|
|
65
|
-
Object.assign(t, (_a = {}, _a[key] = value, _a));
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
return t;
|
|
69
|
-
}, {});
|
|
70
|
-
};
|
|
71
|
-
export { _merge as merge };
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
|
-
// html lang
|
|
3
|
-
export function getLanguageFromHTMLTag() {
|
|
4
|
-
var _a;
|
|
5
|
-
if ((typeof document === "undefined" ? "undefined" : _typeof(document)) === 'object') {
|
|
6
|
-
var language = (_a = document.documentElement) === null || _a === void 0 ? void 0 : _a.lang;
|
|
7
|
-
if (language) {
|
|
8
|
-
return language;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
// userAgent language
|
|
13
|
-
export function getLanguageFromUserAgent() {
|
|
14
|
-
var _a;
|
|
15
|
-
if ((typeof window === "undefined" ? "undefined" : _typeof(window)) === 'object') {
|
|
16
|
-
var UA = ((_a = window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) || '';
|
|
17
|
-
var langFromUA = (/Language\/([^\s]*)/i.exec(UA) || []).pop();
|
|
18
|
-
if (langFromUA) {
|
|
19
|
-
return langFromUA;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
// browser language
|
|
24
|
-
export function getLanguageFromNavigator() {
|
|
25
|
-
var _a;
|
|
26
|
-
if ((typeof window === "undefined" ? "undefined" : _typeof(window)) === 'object' && window.navigator) {
|
|
27
|
-
var navigator_1 = window.navigator;
|
|
28
|
-
// 1. navigator.languages -- 用户设置的内容显示语言,是个数组
|
|
29
|
-
// 2. navigator.language -- 浏览器 UI 的语言
|
|
30
|
-
// 3. navigator.userLanguage -- IE 用户设置的内容显示语言
|
|
31
|
-
// 4. navigator.browserLanguage -- IE 浏览器 UI 的语言
|
|
32
|
-
var language = ((_a = navigator_1.languages) === null || _a === void 0 ? void 0 : _a[0]) || navigator_1.language || navigator_1.userLanguage || navigator_1.browserLanguage;
|
|
33
|
-
if (language) {
|
|
34
|
-
return language;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
export var getLanguageFromQuery = function getLanguageFromQuery() {
|
|
39
|
-
var _a;
|
|
40
|
-
if ((typeof window === "undefined" ? "undefined" : _typeof(window)) === 'object') {
|
|
41
|
-
var match = (_a = window.location.search) === null || _a === void 0 ? void 0 : _a.match(/__lang__=([^&]*)/);
|
|
42
|
-
if (match) {
|
|
43
|
-
return match[1];
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
};
|