acsi-core 0.1.56 → 0.1.58
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.css +1 -8
- package/dist/index.d.ts +2 -2
- package/dist/index.js +21 -13
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +21 -13
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -463,11 +463,4 @@
|
|
|
463
463
|
line-height: 24.55px; }
|
|
464
464
|
|
|
465
465
|
._1Bmhs {
|
|
466
|
-
cursor: pointer;
|
|
467
|
-
width: -moz-fit-content;
|
|
468
|
-
width: fit-content;
|
|
469
|
-
max-width: 100%; }
|
|
470
|
-
._1Bmhs ._CaA-9 {
|
|
471
|
-
width: -moz-fit-content;
|
|
472
|
-
width: fit-content;
|
|
473
|
-
max-width: 100%; }
|
|
466
|
+
cursor: pointer; }
|
package/dist/index.d.ts
CHANGED
|
@@ -15,7 +15,6 @@ import { ToastContainer, toast } from "react-toastify";
|
|
|
15
15
|
import { Role } from "./containers/Login/configs/constants";
|
|
16
16
|
import CustomPagination from "./components/Paginations/CustomPagination";
|
|
17
17
|
import useGoogleSignOut from "./utils/hooks/useGoogleSignOut";
|
|
18
|
-
import utcToLocalTime from "./utils/utcToLocalTime";
|
|
19
18
|
import { CoreButton, CoreInput, CoreSelect, CoreCheckbox, CoreRadio, CoreError, CoreModal, CoreRange, CoreTextArea, CoreSearch, CoreSelectCompact, CoreInputCompact, CoreTitleInput, CoreTooltip } from "./components";
|
|
20
19
|
import { getErrorMessage } from "./utils/getErrorMessage";
|
|
21
20
|
import { GoogleOAuthProvider } from '@react-oauth/google';
|
|
@@ -23,5 +22,6 @@ import CustomSelect from "./components/Selects/CustomSelect";
|
|
|
23
22
|
import CustomAsyncSelect from "./components/Selects/CustomAsyncSelect";
|
|
24
23
|
import CustomCreatable from "./components/Selects/CustomCreatable";
|
|
25
24
|
import CustomSelectOption from "./components/Selects/CustomSelectOption";
|
|
25
|
+
import utcToLocalTime from "./utils/utcToLocalTime";
|
|
26
26
|
import Cookies from "js-cookie";
|
|
27
|
-
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
|
|
27
|
+
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 };
|
package/dist/index.js
CHANGED
|
@@ -7,10 +7,10 @@ var React__default = _interopDefault(React);
|
|
|
7
7
|
var reactstrap = require('reactstrap');
|
|
8
8
|
var axios = _interopDefault(require('axios'));
|
|
9
9
|
var moment = _interopDefault(require('moment'));
|
|
10
|
+
var Cookies = _interopDefault(require('js-cookie'));
|
|
10
11
|
var reactRouterDom = require('react-router-dom');
|
|
11
12
|
var reactRedux = require('react-redux');
|
|
12
13
|
var google = require('@react-oauth/google');
|
|
13
|
-
var Cookies = _interopDefault(require('js-cookie'));
|
|
14
14
|
var reactGoogleLogin = require('@leecheuk/react-google-login');
|
|
15
15
|
var material = require('@mui/material');
|
|
16
16
|
var reactToastify = require('react-toastify');
|
|
@@ -132,7 +132,10 @@ var apiUpload = axios.create({
|
|
|
132
132
|
}
|
|
133
133
|
if (error.response.status == 403) {
|
|
134
134
|
localStorage.removeItem(ACCESS_TOKEN);
|
|
135
|
+
localStorage.removeItem(ORGANIZATION_TENANT);
|
|
136
|
+
localStorage.removeItem(ORGANIZATION_TEAM);
|
|
135
137
|
localStorage.removeItem("USER_EMAIL");
|
|
138
|
+
Cookies.remove('auth');
|
|
136
139
|
window.location.href = "/login";
|
|
137
140
|
}
|
|
138
141
|
return Promise.reject(error);
|
|
@@ -930,6 +933,9 @@ var apiUpload$1 = axios.create({
|
|
|
930
933
|
}
|
|
931
934
|
if (error.response.status == 403) {
|
|
932
935
|
localStorage.removeItem(ACCESS_TOKEN);
|
|
936
|
+
localStorage.removeItem(ORGANIZATION_TENANT);
|
|
937
|
+
localStorage.removeItem(ORGANIZATION_TEAM);
|
|
938
|
+
Cookies.remove('auth');
|
|
933
939
|
localStorage.removeItem("USER_EMAIL");
|
|
934
940
|
window.location.href = "/login";
|
|
935
941
|
}
|
|
@@ -1018,6 +1024,8 @@ var useGoogleSignOut = function useGoogleSignOut(props) {
|
|
|
1018
1024
|
var handleSignOut = function handleSignOut() {
|
|
1019
1025
|
localStorage.removeItem("USER_INFORMATION");
|
|
1020
1026
|
localStorage.removeItem(ACCESS_TOKEN);
|
|
1027
|
+
localStorage.removeItem(ORGANIZATION_TENANT);
|
|
1028
|
+
localStorage.removeItem(ORGANIZATION_TEAM);
|
|
1021
1029
|
try {
|
|
1022
1030
|
signOut();
|
|
1023
1031
|
} catch (error) {
|
|
@@ -1217,15 +1225,6 @@ var CustomPagination = function CustomPagination(_ref) {
|
|
|
1217
1225
|
})));
|
|
1218
1226
|
};
|
|
1219
1227
|
|
|
1220
|
-
var utcToLocalTime = (function (time, FORMAT) {
|
|
1221
|
-
if (time === DATE_MIN_VALUE || time == null) return "";
|
|
1222
|
-
try {
|
|
1223
|
-
return moment.utc(time).local().format(FORMAT || "yyyy-MM-DD");
|
|
1224
|
-
} catch (_unused) {
|
|
1225
|
-
return "";
|
|
1226
|
-
}
|
|
1227
|
-
});
|
|
1228
|
-
|
|
1229
1228
|
function _extends() {
|
|
1230
1229
|
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
1231
1230
|
for (var e = 1; e < arguments.length; e++) {
|
|
@@ -2146,7 +2145,7 @@ var CoreTitleInput = function CoreTitleInput(props) {
|
|
|
2146
2145
|
}));
|
|
2147
2146
|
};
|
|
2148
2147
|
|
|
2149
|
-
var styles$d = {"core-tooltip":"_1Bmhs"
|
|
2148
|
+
var styles$d = {"core-tooltip":"_1Bmhs"};
|
|
2150
2149
|
|
|
2151
2150
|
var CoreTooltip = function CoreTooltip(props) {
|
|
2152
2151
|
var id = props.id,
|
|
@@ -2183,7 +2182,7 @@ var CoreTooltip = function CoreTooltip(props) {
|
|
|
2183
2182
|
onMouseEnter: handleMouseEnter,
|
|
2184
2183
|
onMouseLeave: handleMouseLeave
|
|
2185
2184
|
}, React__default.createElement("div", {
|
|
2186
|
-
className: styles$d["
|
|
2185
|
+
className: styles$d["icon"]
|
|
2187
2186
|
}, children), content && React__default.createElement(reactstrap.Tooltip, {
|
|
2188
2187
|
target: id,
|
|
2189
2188
|
isOpen: isOpenTooltip,
|
|
@@ -2392,15 +2391,24 @@ var CustomSelectOption = function CustomSelectOption(_ref) {
|
|
|
2392
2391
|
}, rest));
|
|
2393
2392
|
};
|
|
2394
2393
|
|
|
2394
|
+
var utcToLocalTime = (function (time, FORMAT) {
|
|
2395
|
+
if (time === DATE_MIN_VALUE || time == null) return "";
|
|
2396
|
+
try {
|
|
2397
|
+
return moment.utc(time).local().format(FORMAT || "yyyy-MM-DD");
|
|
2398
|
+
} catch (_unused) {
|
|
2399
|
+
return "";
|
|
2400
|
+
}
|
|
2401
|
+
});
|
|
2402
|
+
|
|
2395
2403
|
var historyCore = history.createBrowserHistory();
|
|
2396
2404
|
|
|
2405
|
+
exports.Cookies = Cookies;
|
|
2397
2406
|
Object.defineProperty(exports, 'GoogleOAuthProvider', {
|
|
2398
2407
|
enumerable: true,
|
|
2399
2408
|
get: function () {
|
|
2400
2409
|
return google.GoogleOAuthProvider;
|
|
2401
2410
|
}
|
|
2402
2411
|
});
|
|
2403
|
-
exports.Cookies = Cookies;
|
|
2404
2412
|
Object.defineProperty(exports, 'ToastContainer', {
|
|
2405
2413
|
enumerable: true,
|
|
2406
2414
|
get: function () {
|