touchstudy-core 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +13 -9
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +5 -1
- package/dist/index.modern.js.map +1 -1
- package/dist/utils/constants.d.ts +1 -1
- package/dist/utils/isLocalHost.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -24,11 +24,15 @@ var setUser = toolkit.createAction("common/setUser");
|
|
24
24
|
var setLanguage = toolkit.createAction("common/setLanguage");
|
25
25
|
var reset = toolkit.createAction("common/reset");
|
26
26
|
|
27
|
+
var isLocalHost = Boolean(window.location.hostname === "localhost" || window.location.hostname === "[::1]" || window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));
|
28
|
+
|
27
29
|
var GOOGLE_CLIENT_ID = "64118819726-0qlur4qjrs9jbuu6rnoa0u91g680lmpg.apps.googleusercontent.com";
|
28
30
|
var GOOGLE_RECAPTCHA_ID = "6LfNtLUaAAAAAL24lbBV11jS-gBtt1mhtxb4NXs0";
|
29
31
|
var ACCESS_TOKEN = "ACCESS_TOKEN";
|
30
32
|
var DATE_MIN_VALUE = "0001-01-01T00:00:00+00:00";
|
31
|
-
var BASE_URL =
|
33
|
+
var BASE_URL = function () {
|
34
|
+
return isLocalHost ? "https://localhost:7045" : "api.studypeak.io";
|
35
|
+
}();
|
32
36
|
var PUSHER_CONFIG = {
|
33
37
|
cluster: "ap1",
|
34
38
|
key: "9018c77328885a14150b"
|
@@ -1381,16 +1385,16 @@ var canAccess = function canAccess(userRoles, componentRoles) {
|
|
1381
1385
|
var historyCore = history.createBrowserHistory();
|
1382
1386
|
|
1383
1387
|
Object.defineProperty(exports, 'I18nextProvider', {
|
1384
|
-
|
1385
|
-
|
1386
|
-
|
1387
|
-
|
1388
|
+
enumerable: true,
|
1389
|
+
get: function () {
|
1390
|
+
return reactI18next.I18nextProvider;
|
1391
|
+
}
|
1388
1392
|
});
|
1389
1393
|
Object.defineProperty(exports, 'useTranslation', {
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1393
|
-
|
1394
|
+
enumerable: true,
|
1395
|
+
get: function () {
|
1396
|
+
return reactI18next.useTranslation;
|
1397
|
+
}
|
1394
1398
|
});
|
1395
1399
|
exports.ACCESS_TOKEN = ACCESS_TOKEN;
|
1396
1400
|
exports.BASE_URL = BASE_URL;
|