sevago-sso-fe 1.0.50 → 1.0.52
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 +191 -256
- package/dist/common/constant/apps.data.d.ts +19 -19
- package/dist/common/utils/other/app.utils.d.ts +1 -1
- package/dist/components/elements/icon/index.d.ts +0 -1
- package/dist/components/elements/index.d.ts +0 -1
- package/dist/index.cjs.js +24 -53
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +25 -54
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/elements/icon/icon-button.element.d.ts +0 -10
- package/dist/components/elements/icon/icon-content.element.d.ts +0 -15
- package/dist/components/elements/radio/radio-group.element.d.ts +0 -16
- package/dist/components/elements/tooltip/index.d.ts +0 -1
- package/dist/components/elements/tooltip/tooltip-on-click.element.d.ts +0 -7
- package/dist/components/elements/tooltip/tooltip-on-hover.element.d.ts +0 -9
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { styled, Stack, TableCell, tableCellClasses, LinearProgress, linearProgressClasses, useTheme as useTheme$2, Skeleton, Box, Typography, IconButton, Icon, FormControlLabel, Radio
|
|
2
|
+
import { styled, Stack, TableCell, tableCellClasses, LinearProgress, linearProgressClasses, useTheme as useTheme$2, Skeleton, Box, Typography, IconButton, Icon, FormControlLabel, Radio } from "@mui/material";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import React__default, { useState, createContext, useRef, useLayoutEffect, useEffect, useContext, useId, useCallback, useMemo, Fragment as Fragment$1, createElement, useInsertionEffect, forwardRef, Component } from "react";
|
|
5
5
|
import { unstable_createGetCssVar, createSpacing as createSpacing$1, useTheme as useTheme$1 } from "@mui/system";
|
|
@@ -1028,14 +1028,14 @@ const truncateText = (text, maxLength = 27) => {
|
|
|
1028
1028
|
return `${text.substring(0, maxLength)}...`;
|
|
1029
1029
|
};
|
|
1030
1030
|
var Environment = /* @__PURE__ */ ((Environment2) => {
|
|
1031
|
-
Environment2["
|
|
1031
|
+
Environment2["DEVELOP"] = "develop";
|
|
1032
1032
|
Environment2["STAGING"] = "staging";
|
|
1033
1033
|
Environment2["PRODUCTION"] = "production";
|
|
1034
1034
|
return Environment2;
|
|
1035
1035
|
})(Environment || {});
|
|
1036
1036
|
const getCurrentEnvironment = () => {
|
|
1037
1037
|
const { hostname } = window.location;
|
|
1038
|
-
if (hostname.includes("dev.")) return "
|
|
1038
|
+
if (hostname.includes("dev.")) return "develop";
|
|
1039
1039
|
if (hostname.includes("sta.")) return "staging";
|
|
1040
1040
|
return "production";
|
|
1041
1041
|
};
|
|
@@ -6104,7 +6104,7 @@ const APP_GROUP_COLOR = {
|
|
|
6104
6104
|
]: "#EB6262"
|
|
6105
6105
|
};
|
|
6106
6106
|
const SSO = {
|
|
6107
|
-
|
|
6107
|
+
develop: "https://dev.account.sevago.local",
|
|
6108
6108
|
staging: "https://sta.account.sevago.local",
|
|
6109
6109
|
production: "https://account.sevago.com.vn"
|
|
6110
6110
|
};
|
|
@@ -6112,7 +6112,7 @@ const APP_OBJ = {
|
|
|
6112
6112
|
// GREEN
|
|
6113
6113
|
E_HIRING: {
|
|
6114
6114
|
path: {
|
|
6115
|
-
|
|
6115
|
+
develop: "https://dev.admin.office.sevago.local/e-hiring",
|
|
6116
6116
|
staging: "https://sta.admin.office.sevago.local/e-hiring",
|
|
6117
6117
|
production: "https://admin.office.sevago.local/e-hiring"
|
|
6118
6118
|
},
|
|
@@ -6126,7 +6126,7 @@ const APP_OBJ = {
|
|
|
6126
6126
|
},
|
|
6127
6127
|
HR: {
|
|
6128
6128
|
path: {
|
|
6129
|
-
|
|
6129
|
+
develop: "https://dev.admin.office.sevago.local/hr",
|
|
6130
6130
|
staging: "https://sta.admin.office.sevago.local/hr",
|
|
6131
6131
|
production: "https://admin.office.sevago.local/hr"
|
|
6132
6132
|
},
|
|
@@ -6140,7 +6140,7 @@ const APP_OBJ = {
|
|
|
6140
6140
|
},
|
|
6141
6141
|
PAYROLL: {
|
|
6142
6142
|
path: {
|
|
6143
|
-
|
|
6143
|
+
develop: "https://dev.admin.office.sevago.local/payroll",
|
|
6144
6144
|
staging: "https://sta.admin.office.sevago.local/payroll",
|
|
6145
6145
|
production: "https://admin.office.sevago.local/payroll"
|
|
6146
6146
|
},
|
|
@@ -6154,7 +6154,7 @@ const APP_OBJ = {
|
|
|
6154
6154
|
},
|
|
6155
6155
|
ORG: {
|
|
6156
6156
|
path: {
|
|
6157
|
-
|
|
6157
|
+
develop: "https://dev.admin.office.sevago.local/org",
|
|
6158
6158
|
staging: "https://sta.admin.office.sevago.local/org",
|
|
6159
6159
|
production: "https://admin.office.sevago.local/org"
|
|
6160
6160
|
},
|
|
@@ -6168,7 +6168,7 @@ const APP_OBJ = {
|
|
|
6168
6168
|
},
|
|
6169
6169
|
CHECKIN: {
|
|
6170
6170
|
path: {
|
|
6171
|
-
|
|
6171
|
+
develop: "https://dev.admin.office.sevago.local/checkin",
|
|
6172
6172
|
staging: "https://sta.admin.office.sevago.local/checkin",
|
|
6173
6173
|
production: "https://admin.office.sevago.local/checkin"
|
|
6174
6174
|
},
|
|
@@ -6183,7 +6183,7 @@ const APP_OBJ = {
|
|
|
6183
6183
|
// YELLOW
|
|
6184
6184
|
CHAT: {
|
|
6185
6185
|
path: {
|
|
6186
|
-
|
|
6186
|
+
develop: "https://dev.admin.office.sevago.local/chat",
|
|
6187
6187
|
staging: "https://sta.admin.office.sevago.local/chat",
|
|
6188
6188
|
production: "https://admin.office.sevago.local/chat"
|
|
6189
6189
|
},
|
|
@@ -6198,7 +6198,7 @@ const APP_OBJ = {
|
|
|
6198
6198
|
},
|
|
6199
6199
|
TRAINING: {
|
|
6200
6200
|
path: {
|
|
6201
|
-
|
|
6201
|
+
develop: "https://dev.admin.office.sevago.local/training",
|
|
6202
6202
|
staging: "https://sta.admin.office.sevago.local/training",
|
|
6203
6203
|
production: "https://admin.office.sevago.local/training"
|
|
6204
6204
|
},
|
|
@@ -6213,7 +6213,7 @@ const APP_OBJ = {
|
|
|
6213
6213
|
},
|
|
6214
6214
|
FORM: {
|
|
6215
6215
|
path: {
|
|
6216
|
-
|
|
6216
|
+
develop: "https://dev.admin.office.sevago.local/form",
|
|
6217
6217
|
staging: "https://sta.admin.office.sevago.local/form",
|
|
6218
6218
|
production: "https://admin.office.sevago.local/form"
|
|
6219
6219
|
},
|
|
@@ -6228,7 +6228,7 @@ const APP_OBJ = {
|
|
|
6228
6228
|
},
|
|
6229
6229
|
INSIDE: {
|
|
6230
6230
|
path: {
|
|
6231
|
-
|
|
6231
|
+
develop: "https://dev.admin.office.sevago.local/inside",
|
|
6232
6232
|
staging: "https://sta.admin.office.sevago.local/inside",
|
|
6233
6233
|
production: "https://admin.office.sevago.local/inside"
|
|
6234
6234
|
},
|
|
@@ -6243,7 +6243,7 @@ const APP_OBJ = {
|
|
|
6243
6243
|
},
|
|
6244
6244
|
BOOKING: {
|
|
6245
6245
|
path: {
|
|
6246
|
-
|
|
6246
|
+
develop: "https://dev.admin.office.sevago.local/booking",
|
|
6247
6247
|
staging: "https://sta.admin.office.sevago.local/booking",
|
|
6248
6248
|
production: "https://admin.office.sevago.local/booking"
|
|
6249
6249
|
},
|
|
@@ -6258,7 +6258,7 @@ const APP_OBJ = {
|
|
|
6258
6258
|
// BLUE
|
|
6259
6259
|
PROJECT: {
|
|
6260
6260
|
path: {
|
|
6261
|
-
|
|
6261
|
+
develop: "https://dev.admin.office.sevago.local/project",
|
|
6262
6262
|
staging: "https://sta.admin.office.sevago.local/project",
|
|
6263
6263
|
production: "https://admin.office.sevago.local/project"
|
|
6264
6264
|
},
|
|
@@ -6272,7 +6272,7 @@ const APP_OBJ = {
|
|
|
6272
6272
|
},
|
|
6273
6273
|
REQUEST: {
|
|
6274
6274
|
path: {
|
|
6275
|
-
|
|
6275
|
+
develop: "https://dev.admin.office.sevago.local/request",
|
|
6276
6276
|
staging: "https://sta.admin.office.sevago.local/request",
|
|
6277
6277
|
production: "https://admin.office.sevago.local/request"
|
|
6278
6278
|
},
|
|
@@ -6286,7 +6286,7 @@ const APP_OBJ = {
|
|
|
6286
6286
|
},
|
|
6287
6287
|
TRACKING: {
|
|
6288
6288
|
path: {
|
|
6289
|
-
|
|
6289
|
+
develop: "https://dev.admin.office.sevago.local/process",
|
|
6290
6290
|
staging: "https://sta.admin.office.sevago.local/process",
|
|
6291
6291
|
production: "https://admin.office.sevago.local/process"
|
|
6292
6292
|
},
|
|
@@ -6304,7 +6304,7 @@ const APP_OBJ = {
|
|
|
6304
6304
|
},
|
|
6305
6305
|
PROCESS: {
|
|
6306
6306
|
path: {
|
|
6307
|
-
|
|
6307
|
+
develop: "https://dev.admin.office.sevago.local/workflow",
|
|
6308
6308
|
staging: "https://sta.admin.office.sevago.local/workflow",
|
|
6309
6309
|
production: "https://admin.office.sevago.local/workflow"
|
|
6310
6310
|
},
|
|
@@ -6320,7 +6320,7 @@ const APP_OBJ = {
|
|
|
6320
6320
|
// RED
|
|
6321
6321
|
FORMULA_PRICE: {
|
|
6322
6322
|
path: {
|
|
6323
|
-
|
|
6323
|
+
develop: "https://dev.formula-price.sevago.local",
|
|
6324
6324
|
staging: "https://sta.formula-price.sevago.local",
|
|
6325
6325
|
production: "https://formula-price.sevago.local"
|
|
6326
6326
|
},
|
|
@@ -6334,7 +6334,7 @@ const APP_OBJ = {
|
|
|
6334
6334
|
},
|
|
6335
6335
|
E_CATALOGUE: {
|
|
6336
6336
|
path: {
|
|
6337
|
-
|
|
6337
|
+
develop: "https://dev.admin.e-catalogue.sevago.local",
|
|
6338
6338
|
staging: "https://sta.admin.e-catalogue.sevago.local",
|
|
6339
6339
|
production: "https://admin.e-catalogue.sevago.local"
|
|
6340
6340
|
},
|
|
@@ -6350,7 +6350,7 @@ const APP_OBJ = {
|
|
|
6350
6350
|
// PINK
|
|
6351
6351
|
LANDING_PAGE: {
|
|
6352
6352
|
path: {
|
|
6353
|
-
|
|
6353
|
+
develop: "https://dev.admin.landing-page.sevago.local",
|
|
6354
6354
|
staging: "https://sta.admin.landing-page.sevago.local",
|
|
6355
6355
|
production: "https://admin.landing-page.sevago.com.vn"
|
|
6356
6356
|
},
|
|
@@ -13750,10 +13750,12 @@ const AppGrid = ({
|
|
|
13750
13750
|
gap: gap2
|
|
13751
13751
|
},
|
|
13752
13752
|
children: visibleApps.map((app, index) => {
|
|
13753
|
+
const appUrl = app.path[env];
|
|
13754
|
+
const absoluteUrl = appUrl.startsWith("https://") ? appUrl : `${window.location.origin}${appUrl.startsWith("/") ? appUrl : `/${appUrl}`}`;
|
|
13753
13755
|
return /* @__PURE__ */ jsx(
|
|
13754
13756
|
"a",
|
|
13755
13757
|
{
|
|
13756
|
-
href:
|
|
13758
|
+
href: absoluteUrl,
|
|
13757
13759
|
target: "_blank",
|
|
13758
13760
|
rel: "noopener noreferrer",
|
|
13759
13761
|
style: {
|
|
@@ -14041,7 +14043,7 @@ const AppsSidebar = ({
|
|
|
14041
14043
|
captionVariant: "caption",
|
|
14042
14044
|
titleColor: theme.palette.grey[800],
|
|
14043
14045
|
captionColor: theme.palette.grey[600],
|
|
14044
|
-
env: Environment.
|
|
14046
|
+
env: Environment.DEVELOP
|
|
14045
14047
|
}
|
|
14046
14048
|
)
|
|
14047
14049
|
]
|
|
@@ -14077,36 +14079,6 @@ const RadioElement = ({ name, label, ...rest }) => {
|
|
|
14077
14079
|
}
|
|
14078
14080
|
);
|
|
14079
14081
|
};
|
|
14080
|
-
const TooltipOnClickElement = ({
|
|
14081
|
-
open,
|
|
14082
|
-
placement = "top",
|
|
14083
|
-
content,
|
|
14084
|
-
children,
|
|
14085
|
-
onOpen,
|
|
14086
|
-
onClose,
|
|
14087
|
-
onClickAway,
|
|
14088
|
-
...rest
|
|
14089
|
-
}) => {
|
|
14090
|
-
return (
|
|
14091
|
-
// Chỗ này có thể là bug, onClickAway apply ngay cả khi component chưa được render
|
|
14092
|
-
/* @__PURE__ */ jsx(ClickAwayListener, { onClickAway, children: /* @__PURE__ */ jsx(
|
|
14093
|
-
Tooltip,
|
|
14094
|
-
{
|
|
14095
|
-
PopperProps: { disablePortal: true },
|
|
14096
|
-
open,
|
|
14097
|
-
onOpen,
|
|
14098
|
-
onClose,
|
|
14099
|
-
disableFocusListener: true,
|
|
14100
|
-
disableHoverListener: true,
|
|
14101
|
-
disableTouchListener: true,
|
|
14102
|
-
placement,
|
|
14103
|
-
title: content,
|
|
14104
|
-
...rest,
|
|
14105
|
-
children: /* @__PURE__ */ jsx("span", { children })
|
|
14106
|
-
}
|
|
14107
|
-
) })
|
|
14108
|
-
);
|
|
14109
|
-
};
|
|
14110
14082
|
const TypographyContentCaption = ({ content, caption, sx = {}, sxContent, sxCaption }) => {
|
|
14111
14083
|
return /* @__PURE__ */ jsxs(Stack, { gap: 0, sx: { ...sx }, children: [
|
|
14112
14084
|
/* @__PURE__ */ jsx(
|
|
@@ -14280,7 +14252,6 @@ export {
|
|
|
14280
14252
|
SystemMonitorScreen,
|
|
14281
14253
|
SystemMonitorSidebarPart,
|
|
14282
14254
|
TYPOGRAPHY_STYLES,
|
|
14283
|
-
TooltipOnClickElement,
|
|
14284
14255
|
TypographyContentCaption,
|
|
14285
14256
|
TypographyFilter,
|
|
14286
14257
|
checkNowYear,
|