acsi-core 0.1.62 → 0.1.64
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.d.ts +2 -1
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +16 -1
- package/dist/index.modern.js.map +1 -1
- package/dist/utils/getImageUrl.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import Login from "./containers/Login/views/Login";
|
|
|
5
5
|
import store from "./store";
|
|
6
6
|
import getAccessToken from "./utils/getAccessToken";
|
|
7
7
|
import firstCheckToken from "./utils/firstCheckToken";
|
|
8
|
+
import getImageUrl from "./utils/getImageUrl";
|
|
8
9
|
import NotFound from "./components/Commons/NotFound";
|
|
9
10
|
import Loading from "./components/Loading/Loading";
|
|
10
11
|
import LayoutContext from "./layouts/LayoutContext";
|
|
@@ -27,4 +28,4 @@ import CustomCreatable from "./components/Selects/CustomCreatable";
|
|
|
27
28
|
import CustomSelectOption from "./components/Selects/CustomSelectOption";
|
|
28
29
|
import utcToLocalTime from "./utils/utcToLocalTime";
|
|
29
30
|
import Cookies from "js-cookie";
|
|
30
|
-
export { setLoading, setLoadingPage, BASE_URL, OPENSALT_BASE_URL, ACCESS_TOKEN, DATE_TIME_MIN_VALUE, ORGANIZATION_TEAM, ORGANIZATION_TENANT, firstCheckToken, Login, utcToLocalTime, getAccessToken, store, historyCore, setAlert, setUser, setTenant, setAddTenant, setTeam, setMenuCollapse, setIsRefetchSidebar, Loading, NotFound, LayoutContext, api, apiUpload, ConfirmDialog, CommonDialog, ToastContainer, toast, Role, Cookies, CustomPagination, useGoogleSignOut, CoreButton, CoreInput, CoreSelect, CoreCheckbox, CoreRadio, CoreError, CoreModal, CoreRange, CoreTextArea, CoreSearch, CoreSelectCompact, CoreInputCompact, CoreTitleInput, CoreTooltip, getErrorMessage, CustomSelect, CustomAsyncSelect, CustomCreatable, CustomSelectOption, GoogleOAuthProvider, useAmplitude, AmplitudeEvent, initializeAmplitude, };
|
|
31
|
+
export { setLoading, setLoadingPage, BASE_URL, OPENSALT_BASE_URL, ACCESS_TOKEN, DATE_TIME_MIN_VALUE, ORGANIZATION_TEAM, ORGANIZATION_TENANT, firstCheckToken, getImageUrl, Login, utcToLocalTime, getAccessToken, store, historyCore, setAlert, setUser, setTenant, setAddTenant, setTeam, setMenuCollapse, setIsRefetchSidebar, Loading, NotFound, LayoutContext, api, apiUpload, ConfirmDialog, CommonDialog, ToastContainer, toast, Role, Cookies, CustomPagination, useGoogleSignOut, CoreButton, CoreInput, CoreSelect, CoreCheckbox, CoreRadio, CoreError, CoreModal, CoreRange, CoreTextArea, CoreSearch, CoreSelectCompact, CoreInputCompact, CoreTitleInput, CoreTooltip, getErrorMessage, CustomSelect, CustomAsyncSelect, CustomCreatable, CustomSelectOption, GoogleOAuthProvider, useAmplitude, AmplitudeEvent, initializeAmplitude, };
|
package/dist/index.js
CHANGED
|
@@ -1019,6 +1019,21 @@ var firstCheckToken = function firstCheckToken() {
|
|
|
1019
1019
|
}));
|
|
1020
1020
|
};
|
|
1021
1021
|
|
|
1022
|
+
var getImageUrl = function getImageUrl(imageUrl) {
|
|
1023
|
+
try {
|
|
1024
|
+
if (!!imageUrl) {
|
|
1025
|
+
var imageTrimmed = imageUrl.trim();
|
|
1026
|
+
if (imageTrimmed.startsWith('http://') || imageTrimmed.startsWith('https://')) {
|
|
1027
|
+
return imageTrimmed;
|
|
1028
|
+
}
|
|
1029
|
+
return BASE_URL + "/images/" + imageTrimmed;
|
|
1030
|
+
}
|
|
1031
|
+
return "/images/avatar-default.png";
|
|
1032
|
+
} catch (err) {
|
|
1033
|
+
return "/images/avatar-default.png";
|
|
1034
|
+
}
|
|
1035
|
+
};
|
|
1036
|
+
|
|
1022
1037
|
var NotFound = function NotFound() {
|
|
1023
1038
|
return React__default.createElement("div", {
|
|
1024
1039
|
className: "not-found"
|
|
@@ -2665,6 +2680,7 @@ exports.apiUpload = apiUpload$1;
|
|
|
2665
2680
|
exports.firstCheckToken = firstCheckToken;
|
|
2666
2681
|
exports.getAccessToken = getAccessToken$1;
|
|
2667
2682
|
exports.getErrorMessage = getErrorMessage;
|
|
2683
|
+
exports.getImageUrl = getImageUrl;
|
|
2668
2684
|
exports.historyCore = historyCore;
|
|
2669
2685
|
exports.initializeAmplitude = initializeAmplitude;
|
|
2670
2686
|
exports.setAddTenant = setAddTenant;
|